query
stringlengths
11
3.13k
ru_query
stringlengths
9
3.91k
document
stringlengths
18
71k
metadata
dict
negatives
listlengths
0
100
negative_scores
listlengths
0
100
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
Register middleware groups on the router.
Зарегистрируйте группы middleware на маршрутизаторе.
protected function registerMiddlewareGroups() { foreach ($this->middlewareGroups as $key => $middleware) { $this->router->middlewareGroup($key, $middleware); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function registerMiddleware()\n {\n foreach ($this->routeMiddleware as $key => $middleware) {\n $this->router->middleware($key, $middleware);\n }\n }", "protected function registerRouteMiddleware()\n {\n // register route middleware.\n foreach ($this->routeMiddleware as $key => $middleware) {\n app('router')->middleware($key, $middleware);\n }\n // register middleware group.\n foreach ($this->middlewareGroups as $key => $middleware) {\n app('router')->middlewareGroup($key, $middleware);\n }\n }", "protected function registerMiddleware()\n {\n $router = $this->app['router'];\n\n $router->aliasMiddleware('admin.api.auth', AdminApiAuth::class);\n $router->aliasMiddleware('admin.auth', AdminAuth::class);\n $router->aliasMiddleware('admin.guest', RedirectIfAdminAuth::class);\n $router->aliasMiddleware('front.auth', FrontAuth::class);\n $router->aliasMiddleware('front.guest', RedirectIfFrontAuth::class);\n $router->aliasMiddleware('visitor', Visitor::class);\n $router->aliasMiddleware('permission', Permission::class);\n //$router->aliasMiddleware('product.viewed', ProductViewed::class);\n }", "private function registerRoutes()\n {\n Route::middlewareGroup('performance-monitor', config('performance-monitor.middleware', []));\n\n Route::group([\n 'namespace' => 'Fruitcake\\PerformanceMonitor\\Http\\Controllers',\n 'prefix' => config('performance-monitor.path'),\n 'middleware' => 'performance-monitor',\n ], function () {\n $this->loadRoutesFrom(__DIR__ . '/Http/routes.php');\n });\n }", "public static function getMiddlewareGroups()\n {\n /** @var \\Illuminate\\Routing\\Router $instance */\n return $instance->getMiddlewareGroups();\n }", "protected function registerRouteMiddleware()\n {\n // register route middleware.\n foreach ($this->routeMiddleware as $key => $middleware) {\n app('router')->aliasMiddleware($key, $middleware);\n }\n\n // register middleware group.\n foreach ($this->middlewareGroups as $key => $middleware) {\n app('router')->middlewareGroup($key, $middleware);\n }\n }", "protected function registerRouteMiddleware()\n {\n // register route middleware.\n foreach ($this->routeMiddleware as $key => $middleware) {\n app('router')->aliasMiddleware($key, $middleware);\n }\n\n // register middleware group.\n foreach ($this->middlewareGroups as $key => $middleware) {\n app('router')->middlewareGroup($key, $middleware);\n }\n }", "protected function registerRouteMiddleware()\n {\n // register route middleware.\n foreach ($this->routeMiddleware as $key => $middleware) {\n app('router')->aliasMiddleware($key, $middleware);\n }\n\n // register middleware group.\n foreach ($this->middlewareGroups as $key => $middleware) {\n app('router')->middlewareGroup($key, $middleware);\n }\n }", "protected function registerRouteMiddleware()\n {\n // register route middleware.\n foreach ($this->routeMiddleware as $key => $middleware) {\n app('router')->aliasMiddleware($key, $middleware);\n }\n\n // register middleware group.\n foreach ($this->middlewareGroups as $key => $middleware) {\n app('router')->middlewareGroup($key, $middleware);\n }\n }", "protected function registerRoutes()\n {\n Route::group([\n 'domain' => config('horizon.domain', null),\n 'prefix' => config('horizon.path'),\n 'namespace' => 'Laravel\\Horizon\\Http\\Controllers',\n 'middleware' => config('horizon.middleware', 'web'),\n ], function () {\n $this->loadRoutesFrom(__DIR__.'/../routes/web.php');\n });\n }", "public function registerMiddlewares()\n {\n $this->app['router']->aliasMiddleware('centurion.guest', CenturionRedirectIfAuthenticated::class);\n $this->app['router']->aliasMiddleware('centurion.auth', CenturionAuthenticate::class);\n $this->app['router']->aliasMiddleware('centurion.hasaccess', CenturionCheckAllPermissions::class);\n $this->app['router']->aliasMiddleware('centurion.hasanyaccess', CenturionCheckAnyPermissions::class);\n $this->app['router']->aliasMiddleware('centurion.hasrole', CenturionCheckRole::class);\n }", "protected function registerRoutes(): void\n {\n Route::group([\n 'namespace' => config('survey.routes.namespace'),\n 'prefix' => config('survey.routes.prefix'),\n 'middleware' => config('survey.routes.middleware'),\n ], function () {\n $this->loadRoutesFrom(__DIR__ . '/../routes/web.php');\n });\n }", "protected function registerRoutes()\n {\n $this->app['router']->group(config('langmanGUI.route_group_config'), function ($router) {\n $router->get('/langman', 'LangmanController@index');\n\n $router->post('/langman/scan', 'LangmanController@scan');\n\n $router->post('/langman/save', 'LangmanController@save');\n\n $router->post('/langman/add-language', 'LangmanController@addLanguage');\n });\n }", "private function registerMiddleware()\n {\n if ($this->app['config']['customerchat']['enabled'] &&\n $this->app['config']['customerchat']['autoinject']) {\n $router = $this->app['router'];\n $router->pushMiddlewareToGroup('web', \\Ltsochev\\CustomerChat\\Middleware\\AutoInjectMiddleware::class);\n }\n }", "protected function registerRouteMiddleware()\n {\n // register route middleware.\n foreach ($this->routeMiddleware as $key => $middleware) {\n app('router')->aliasMiddleware($key, $middleware);\n }\n }", "private function registerRoutes()\n {\n Route::group($this->routeConfiguration(), function () {\n $this->loadRoutesFrom(__DIR__ . '/../routes/web.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 }", "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::prefix('api')\n ->middleware('api')\n ->group(function () {\n $this->loadRoutesFrom(__DIR__.'/routes.php');\n });\n }", "private function registerRoutes(): void\r\n {\r\n Route::group($this->routeConfiguration(), function () {\r\n $this->loadRoutesFrom(__DIR__ . '/../Http/routes.php');\r\n });\r\n }", "private function addMiddleware()\n {\n foreach ($this->middlewares as $middleware) {\n $this->handler->addMiddleware($middleware);\n }\n }", "protected function registerMiddleware()\n {\n $this->app->routeMiddleware([\n 'hooks' => RequestMiddleware::class\n ]);\n }", "protected function registerRoutes(): void\n {\n Route::group([\n 'prefix' => config('sense.uri', 'sense'),\n 'namespace' => 'Cog\\Laravel\\Sense\\Http\\Controllers',\n 'middleware' => config('sense.middleware', 'web'),\n ], function () {\n $this->loadRoutesFrom(__DIR__ . '/../../routes/web.php');\n });\n }", "private function registerRoutes()\n {\n Route::group($this->routeConfiguration(), function () {\n $this->loadRoutesFrom(__DIR__.'/Http/routes.php');\n });\n }", "protected function registerRoutes()\n {\n Route::group($this->routeConfiguration(), function () {\n $this->loadRoutesFrom(__DIR__ . '/route.php');\n });\n }", "protected function registerRoutes()\n {\n Route::middleware('web')\n ->prefix(config('cscms.coderstudios.backend_prefix'))\n ->group(__DIR__.'/../routes/backend.php')\n ;\n\n Route::middleware('web')\n ->prefix(config('cscms.coderstudios.frontend_prefix'))\n ->group(__DIR__.'/../routes/frontend.php')\n ;\n }", "private function registerRoutes()\n {\n $path = config('mailmerge.path');\n $middlewareGroup = config('mailmerge.middleware_group');\n\n Route::namespace('MailMerge\\Http\\Controllers')\n ->middleware([$middlewareGroup, Authenticate::class])\n ->as('mailmerge.')\n ->prefix($path)\n ->group(function () {\n Route::post('/resend-batch', 'ResendBatchController@handle')->name('batch.resend');\n });\n\n Route::namespace('MailMerge\\Http\\Controllers\\Api')\n ->prefix('api')\n ->group(function () {\n Route::group(['middleware' => [ApiAuth::class, ClientSwitcher::class]], function () {\n Route::post('mails/batch', 'SendBatchController@handle');\n Route::post('mails/message', 'SendMailMessageController@handle');\n Route::get('logs', 'MailLogsController@index');\n });\n Route::group(['middleware' => VerifyMailgunWebhook::class], function () {\n Route::post('logs/mailgun-webhook', 'MailgunWebhookController@handle');\n });\n Route::post('logs/pepipost-webhook', 'PepipostWebhookController@handle');\n Route::post('logs/sendgrid-webhook', 'SendGridWebhookController@handle');\n });\n }", "public function routeMiddlewares()\n {\n return [\n // removing the Laravel's default route middleware's\n // 'auth' => \\App\\Port\\Middleware\\Middlewares\\Http\\Authenticate::class,\n // 'auth.basic' => \\App\\Port\\Middleware\\Middlewares\\Http\\AuthenticateWithBasicAuth::class,\n // 'guest' => \\App\\Port\\Middleware\\Middlewares\\Http\\RedirectIfAuthenticated::class,\n\n // JWT Package middleware's\n 'jwt.auth' => \\Tymon\\JWTAuth\\Middleware\\GetUserFromToken::class,\n 'jwt.refresh' => \\Tymon\\JWTAuth\\Middleware\\RefreshToken::class,\n\n // Entrust Package middleware's\n 'role' => \\Zizaco\\Entrust\\Middleware\\EntrustRole::class,\n 'permission' => \\Zizaco\\Entrust\\Middleware\\EntrustPermission::class,\n 'ability' => \\Zizaco\\Entrust\\Middleware\\EntrustAbility::class,\n\n\n 'role.web' => \\App\\Containers\\Authorization\\Middlewares\\EntrustRoleForWeb::class,\n\n // Hello API Visitor User Authentication middleware\n 'api.auth.visitor' => \\App\\Containers\\Authentication\\Middlewares\\VisitorsAuthentication::class,\n\n // Hello API User Authentication middleware for Web Pages\n 'web.auth' => \\App\\Containers\\Authentication\\Middlewares\\Authentication::class,\n\n // Hello API Requests Monitor\n 'mobile.requests.monitor' => \\App\\Containers\\Debugger\\Middlewares\\RequestsMonitorMiddleware::class,\n\n // ...\n ];\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 registerRoutes()\n {\n Route::group([\n 'prefix' => 'signere',\n 'namespace' => 'Sausin\\Signere\\Http\\Controllers',\n 'middleware' => 'api',\n ], 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 Route::group([\n 'namespace' => 'Slavic\\MissingPersons\\Http\\Controllers',\n 'middleware' => 'web',\n ], function () {\n $this->loadRoutesFrom(dirname(__DIR__, 1) . '/routes/web.php');\n $this->loadRoutesFrom(dirname(__DIR__, 1) . '/routes/breadcrumbs.php');\n });\n }", "protected function registerRoutes()\n {\n Route::group($this->apiRoutesConfiguration(), function () {\n $this->loadRoutesFrom(__DIR__ . '/../routes/api.php');\n $this->loadRoutesFrom(__DIR__ . '/../routes/web.php');\n });\n }", "protected function registerRoutes()\n {\n Route::as('entropy.')\n ->prefix(config('entropy.path'))\n ->middleware(config('entropy.middleware'))\n ->group(function () {\n $this->loadRoutesFrom(__DIR__ . '/../routes/web.php');\n });\n }", "protected function registerRoutes()\n {\n if(app()->environment() === 'admin'){\n Route::group($this->routeConfiguration(), function () {\n $this->loadRoutesFrom(__DIR__.'/../../vendor/laravel/telescope/src/Http/routes.php');\n });\n }\n }", "protected function registerRoutes()\n {\n Route::group($this->routeConfiguration(), function () {\n $this->loadRoutesFrom(__DIR__.'/../routes/api.php');\n });\n }", "public static function flushMiddlewareGroups()\n {\n /** @var \\Illuminate\\Routing\\Router $instance */\n return $instance->flushMiddlewareGroups();\n }", "public function map()\n {\n $this->router->group(['middleware' => 'guest'], function () {\n $this->router->post('auth', 'AuthController@store');\n $this->resource('users', 'UsersController', ['only' => ['store']]);\n });\n\n $this->router->group(['middleware' => 'auth'], function () {\n $this->resource('users', 'UsersController', ['only' => ['show']]);\n $this->resource('projects', 'ProjectsController', ['only' => ['store']]);\n\n $this->router->group(['middleware' => 'can:update,users'], function () {\n $this->resource('users', 'UsersController', ['only' => ['update', 'destroy']]);\n });\n\n $this->router->group(['middleware' => 'can:access,stories'], function () {\n $this->resource('stories', 'StoriesController', ['only' => ['show', 'update', 'destroy']]);\n });\n\n $this->router->group(['middleware' => 'can:access,projects'], function () {\n $this->resource('projects', 'ProjectsController', ['only' => ['show', 'update', 'destroy']]);\n $this->resource('projects.users', 'ProjectsUsersController', ['only' => ['update', 'destroy']]);\n $this->resource('projects.stories', 'ProjectsStoriesController', ['only' => ['index', 'store']]);\n });\n });\n }", "public function bootstrapRouter()\n {\n $this->register(RoutingServiceProvider::class);\n $this->router = $this['router'];\n $this->router->middlewareGroup(\"web\", []);\n }", "private function registerGlobalAfterMiddleware(): array\n {\n return [];\n }", "protected function registerAuthenticationRoutes()\n {\n $this->router->group(['namespace' => 'Authentication'], function () {\n $this->loginRoutes();\n $this->passwordRoutes();\n });\n }", "private function loadMiddleware()\n {\n foreach ($this->middlewares() as $middleware) {\n $this->app->add($middleware);\n }\n\n // Add the Slim built-in routing middleware\n // to the app middleware stack.\n $this->app->addRoutingMiddleware();\n }", "private function registerRoutes()\n {\n $defaults = [\n 'login' => 'login',\n 'logout' => 'logout',\n 'register' => 'register',\n 'callback' => 'callback',\n ];\n\n $options = Config::get('keycloak-web.routes', []);\n $options = array_merge($defaults, $options);\n\n // Register Routes\n $router = $this->app->make('router');\n\n if (! empty($options['login'])) {\n $router->middleware('web')->get($options['login'], 'Vizir\\KeycloakWebGuard\\Controllers\\AuthController@login')->name('keycloak.login');\n }\n\n if (! empty($options['logout'])) {\n $router->middleware('web')->get($options['logout'], 'Vizir\\KeycloakWebGuard\\Controllers\\AuthController@logout')->name('keycloak.logout');\n }\n\n if (! empty($options['register'])) {\n $router->middleware('web')->get($options['register'], 'Vizir\\KeycloakWebGuard\\Controllers\\AuthController@register')->name('keycloak.register');\n }\n\n if (! empty($options['callback'])) {\n $router->middleware('web')->get($options['callback'], 'Vizir\\KeycloakWebGuard\\Controllers\\AuthController@callback')->name('keycloak.callback');\n }\n }", "public function group() {\n $args = func_get_args();\n $pattern = array_shift($args);\n $callable = array_pop($args);\n $this->router->pushGroup($pattern, $args);\n if (is_callable($callable)) {\n call_user_func($callable);\n }\n $this->router->popGroup();\n }", "public function registerRoutes()\n {\n\n // Paypal ipn handler.\n $this->app['router']->post('paypal/payment', 'Paxifi\\Paypal\\Controller\\PaypalController@payment');\n\n // Paypal subscribe.\n $this->app['router']->post('paypal/subscribe', 'Paxifi\\Paypal\\Controller\\PaypalController@subscribe');\n\n $this->app['router']->group(['before' => 'oauth'], function () {\n\n $this->app['router']->group(['before' => 'oauth-owner:user'], function () {\n\n // Paypal user authorization.\n $this->app['router']->post('paypal/authorize', 'Paxifi\\Paypal\\Controller\\PaypalController@authorize');\n\n // Paypal driver sales.\n $this->app['router']->post('paypal/commission', 'Paxifi\\Commission\\Controller\\CommissionController@commission');\n\n // Paypal buy sticker single payment.\n $this->app['router']->post('paypal/sticker', 'Paxifi\\Paypal\\Controller\\PaypalController@buySticker');\n\n });\n\n });\n }", "protected function setUpRoutes()\n {\n $this->app['router']->get('/middleware-guard', function () {\n return 'You did it';\n })->middleware('exposable.guard');\n\n $this->app['router']->get('/middleware-expire', function () {\n return 'You did it';\n })->middleware('exposable.expire');\n\n $this->app['router']->get('/middleware-signature', function () {\n return 'You did it';\n })->middleware('exposable.signature');\n }", "protected function registerMiddleware(Kernel $kernel, Router $router)\n {\n // Register global middleware\n\n /*\n Laravel 5.2 hack\n In L5.1, when you pushMiddleware from a provider level the middleware\n is pushed AFTER the FULL stack, so ever after app/Http/Kernel.php array\n So in L5.1 your middleware stack looked like:\n 0 => \"Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode\"\n 1 => \"App\\Http\\Middleware\\EncryptCookies\"\n 2 => \"Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse\"\n 3 => \"Illuminate\\Session\\Middleware\\StartSession\"\n 4 => \"Illuminate\\View\\Middleware\\ShareErrorsFromSession\"\n 5 => \"Mrcore\\Wiki\\Http\\Middleware\\AnalyzeRoute\"\n\n BUT now in L5.2+ they changed the order. So when you pushMiddleware from\n this provider level, it pushes BEFORE the Kernel.php is added, so you get\n 0 => \"Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode\"\n 1 => \"Mrcore\\Wiki\\Http\\Middleware\\AnalyzeRoute\"\n\n This means your customer middleware has NO Session:: and NO Auth::\n Which means my AnalyzeRoute wiki middleware is completely useless.\n\n So this hack fires up the Session and Auth middleware. This will\n also allow Auth:: to be used in controller __construct which in L5.3\n this is not available.\n\n See https://github.com/laravel/framework/issues/15352\n See https://github.com/laravel/framework/issues/15072\n */\n #$kernel->pushMiddleware(\\App\\Http\\Middleware\\EncryptCookies::class);\n #$kernel->pushMiddleware(\\Illuminate\\Session\\Middleware\\StartSession::class);\n\n // So now my AnalyzeRoute has Auth:: access!\n $kernel->pushMiddleware(\\Mrcore\\Wiki\\Http\\Middleware\\AnalyzeRoute::class);\n\n // Register route based middleware\n // FIXME Laravel version 5.3 vs 5.5 hack, remove when 5.3 is deprecated at dynatron\n $version = app()->version();\n if (substr($version, 0, 3) == '5.3') {\n $router->middleware('auth.admin', \\Mrcore\\Wiki\\Http\\Middleware\\AuthenticateAdmin::class);\n } else {\n $router->aliasMiddleware('auth.admin', \\Mrcore\\Wiki\\Http\\Middleware\\AuthenticateAdmin::class);\n }\n\n // Authenticate mrcore applications and modules\n // Enable if you are testing laravel 5.3 new auth stuff\n $router->pushMiddlewareToGroup('web', \\Mrcore\\Wiki\\Http\\Middleware\\AuthenticateApp::class);\n }", "public function addMiddleware() {\n $this->middleware('api.logApiCalls');\n\n // catch all errors and return a JSON response\n $this->middleware('api.catchErrors');\n\n // require hmacauth middleware for all API requests by default\n $this->middleware('api.protectedAuth');\n }", "public function addMiddleware() {\n\t\t$this->middleware('api.catchErrors');\n\t\t\n\t\t//check for client API key\n\t\t$this->middleware('auth.client');\n \n }", "public function register()\n {\n $this->registerMiddlewares();\n\n //\n }", "public function map()\n {\n Route::group([\n 'namespace' => $this->namespace,\n 'prefix' => LaravelLocalization::setLocale(),\n 'middleware' => ['localize', 'locale_session_redirect', 'localization_redirect', 'web'],\n ], function (Router $router) {\n $this->adminRoutes();\n $this->publicRoutes();\n });\n }", "public function register()\n {\n Route::prefix('api')\n ->middleware('api')\n ->namespace('CapstoneLogic\\Pages')\n ->group(__DIR__ . '/../routes/api.php');\n }", "public function forAdmins(){\n $this->router->group(['middleware' => ['web','admin'], 'prefix' => 'admin'], function(){\n require_once __DIR__ . '/../routes/admin.php';\n });\n }", "protected function registerRoutes(): ApiRouteServiceProvider\n {\n // If the application has all routes cached, skip registering them\n if ($this->app->routesAreCached()) {\n // @codeCoverageIgnoreStart\n return $this;\n // @codeCoverageIgnoreEnd\n }\n\n $this->router->group(\n [\n 'prefix' => $this->getCmsPrefix(),\n 'as' => $this->getCmsNamePrefix(),\n 'middleware' => [ $this->getCmsMiddlewareGroup() ],\n ],\n function (Router $router) {\n\n $this->buildRoutesForAuth($router);\n\n // Embed the routes that require authorization in a group\n // with the middleware to keep guests out.\n\n $this->router->group(\n [\n 'middleware' => [\n CmsMiddleware::API_AUTHENTICATED,\n CmsMiddleware::API_AUTH_OWNER,\n ],\n ],\n function (Router $router) {\n\n $this->buildRoutesForMetaData($router);\n $this->buildRoutesForModules($router);\n }\n );\n }\n );\n\n return $this;\n }", "public function group(string $prefix, $callback, $middleware = null): void\n {\n $group = new self();\n // call the callback with the new router instance\n call_user_func($callback, $group);\n // check if a middleware was provided\n if ($middleware !== null) {\n // add the middleware to the new router instance\n $group->addMiddleware($middleware);\n }\n // loop through the routes of the new router instance\n foreach ($group->getRoutes() as $method => $routes) {\n // loop through the routes of the current method\n foreach ($routes as $route => $callback) {\n // add the prefix to the route path\n $this->routes[$method][$prefix . $route] = $callback;\n }\n }\n // loop through the named routes of the new router instance\n foreach ($group->getNamedRoutes() as $name => $route) {\n // add the prefix to the route path\n $this->namedRoutes[$name] = $prefix . $route;\n }\n // add the middleware of the new router instance to the current router\n $this->middleware = array_merge($this->middleware, $group->getMiddleware());\n // add the namespaces of the new router instance to the current router\n $this->namespaces = array_merge($this->namespaces, $group->getNamespaces());\n }", "public function register()\n {\n Route::prefix('api')\n ->middleware('api')\n ->namespace('Diary\\Api\\Http\\Controllers')\n ->group(base_path('modules/Diary/routes/api.php'));\n }", "protected function mapOAuthRegisterRoutes()\n {\n Route::prefix('/oauth/registrar')\n ->middleware('web')\n ->namespace($this->namespace)\n ->group(base_path('app/src/oauth/Applications/routes/oauth-register.php'));\n }", "public function boot()\r\n {\r\n Route::middlewareGroup('dashboard', [\r\n //Firewall::class,\r\n // RedirectInstall::class,\r\n AccessMiddleware::class,\r\n ]);\r\n\r\n $this->binding();\r\n\r\n parent::boot();\r\n }", "protected function registerMediaboxRoute()\n {\n MediaboxRoutes::register();\n\n if (config('mediabox.routes.web.register')) {\n $route = Route::prefix(config('mediabox.routes.web.prefix'));\n\n if (! empty(config('mediabox.routes.web.middlewares', []))) {\n $route->middleware(config('mediabox.routes.web.middlewares'));\n }\n\n $route->group(function () {\n Route::mediaResource(config('mediabox.routes.web.name'), config('mediabox.routes.web.controller'));\n });\n }\n }", "public function register()\n {\n if ( config('admin.filemanager', false) === false ) {\n return;\n }\n\n $this->mergeConfigs('lfm');\n\n Route::group(['prefix' => 'admin/filemanager', 'middleware' => ['web', 'ckfinder', ModelMiddleware::class]], function () {\n \\UniSharp\\LaravelFilemanager\\Lfm::routes();\n });\n }", "public function group(array $routerOptions, Closure $closure): void\n {\n $router = clone $this;\n $router->groupBaseUrl = $routerOptions[0];\n $router->groupBaseMiddleware = $routerOptions[self::INDEX_ROUTER_MIDDLEWARE] ?? [];\n # Pass to closure function a instate of route\n $closure($router);\n\n $this->addRouterGroup($router);\n }", "public function register()\n {\n // register global middleware.\n $kernel = $this->app->make(Kernel::class);\n foreach ($this->middleware as $middleware) {\n $kernel->pushMiddleware($middleware);\n }\n }", "public function registerRoutes()\r\n {\r\n $this->forAccessTokens();\r\n $this->forTransientTokens();\r\n $this->forClients();\r\n $this->forPersonalAccessTokens();\r\n }", "public function pushGroup(string $pattern, $callable): RouteGroup;", "public function boot()\n {\n $this->registerMiddleware();\n }", "public static function registerRoutes() {\n }", "public function addRoutes(Registrar $router)\n\t{\n\t\t$router->group(['prefix' => 'backoffice', 'middleware' => ['web', 'security:backoffice']], function(Registrar $router){\n\t\t\t$router->get('/', ['as' => self::HOME, 'uses' => DashboardController::class . '@dashboard']);\n\t\t});\n\t}", "private function appendMiddleware()\n {\n $this->middleware('HasAdminOrAuthorRole', [\n 'only' => ['create']\n ]);\n\n $this->middleware('CanEditPost', [\n 'only' => ['edit']\n ]);\n\n $this->middleware('DenyIfBeingEdited', [\n 'only' => ['edit']\n ]);\n }", "public function map() {\n\t\tRoute::prefix( '/'. wp_app()->get_wp_app_slug() )\n\t\t\t->group(\n\t\t\t\tfunction () {\n\t\t\t\t\tdo_action( 'enpii_base_wp_app_register_routes' );\n\t\t\t\t}\n\t\t\t);\n\n\t\tRoute::prefix( '/'. wp_app()->get_wp_app_api_slug() )\n\t\t\t->group(\n\t\t\t\tfunction () {\n\t\t\t\t\tdo_action( 'enpii_base_wp_app_api_register_routes' );\n\t\t\t\t}\n\t\t\t);\n\t}", "private function registerRoutes()\n {\n $this->mapWebRoutes();\n\n $this->mapApiRoutes();\n }", "public function registerRoutes(Router $router)\n {\n $router->group(\n [\n 'namespace' => $this->namespace,\n ],\n function ($router) {\n require app_path('Site/Http/routes.php');\n require app_path('Site/Http/routes_1.php');\n }\n );\n }", "public function applicationMiddlewares()\n {\n return [\n // Laravel default middleware's\n \\Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode::class,\n \\App\\Port\\Middleware\\Middlewares\\Http\\EncryptCookies::class,\n \\Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse::class,\n \\Illuminate\\Session\\Middleware\\StartSession::class,\n \\Illuminate\\View\\Middleware\\ShareErrorsFromSession::class,\n\n // removing some of the Laravel's default middleware's\n // \\App\\Port\\Middleware\\Middlewares\\Http\\VerifyCsrfToken::class,\n\n // CORS Package middleware\n \\Barryvdh\\Cors\\HandleCors::class,\n // Hello API Localization middleware\n \\App\\Port\\Middleware\\Middlewares\\Http\\Localization::class,\n ];\n }", "private function bootRoutes(): void\n {\n $this->app['router']->group([\n 'prefix' => 'api',\n 'middleware' => 'api',\n ], function () {\n $this->loadRoutesFrom(__DIR__ . '/../routes/api.php');\n });\n }", "abstract protected function registerRoutes();", "protected function mapApiRoutes()\n {\n Route::group([\n 'middleware' => ['api','auth.basic'],\n 'namespace' => $this->namespace,\n ], function ($router) {\n require base_path('routes/api.php');\n });\n }", "private function adminRoutes()\n {\n if (! method_exists($this, 'admin')) {\n return;\n }\n\n Route::group([\n 'namespace' => 'Admin',\n 'prefix' => 'admin',\n 'middleware' => ['admin'],\n ], function () {\n require $this->admin();\n });\n }", "protected function registerRoutes ()\n {\n $this->add(new JsonResponseMiddleware());\n \n Core::instance()->getContainer()['notFoundHandler'] = function ()\n {\n return function (Request $request, Response $response)\n {\n $html = file_get_contents(__DIR__ . '/Resources/html/index.html');\n $html = str_replace('../public', '/src/Resources/public', $html);\n \n $response->getBody()->write($html);\n \n return $response;\n };\n };\n \n $this->events()->publish('core.route.register');\n }", "protected function registerRoutes()\n {\n Route::group(['namespace' => '\\WeblaborMx\\SparkManualBilling\\Http\\Controllers', 'middleware' => ['web', 'auth', 'dev']], function () {\n Route::resource('spark/kiosk/crud/users', 'UserController');\n Route::resource('spark/kiosk/crud/teams', 'TeamController');\n Route::get('spark/kiosk/crud/teams/{team}/free-trial', 'TeamController@freeTrial');\n Route::post('spark/kiosk/crud/teams/{team}/free-trial', 'TeamController@freeTrialSave');\n Route::get('settings/teams/{team}/invoice-new/{invoice}', 'TeamController@invoice');\n });\n\n Blade::directive('smb_active', function ($route) {\n return \"<?php if(request()->is('$route/*') || request()->is('$route')) echo 'active';?>\";\n });\n }", "public function inject( $middleware ){\n if ( $middleware === $this->router ) $this->router_mounted = true;\n array_push( $this->middleware, $middleware );\n return $this;\n }", "protected function registerRoutes()\n {\n /** http://localhost/ */\n RouterStore::add(\n new WpQueryCondition('index|home|any'),\n new Action(function () {\n return View::display(\n '<h1 style=\"{{{style}}}\">{{{hello}}}</h1>',\n [\n 'hello' => 'Hello Wpci!',\n 'style' => 'line-height: 10; color: white; text-align: center; background: dimgrey',\n ]\n );\n }),\n 'pages.home'\n );\n\n /** http://localhost/wp-json/myapi/v2/hello */\n WpRestCondition::prefix('myapi/v2', function() {\n\n /** TODO: 1 before test don't forget turn on permalinks... not best behaviour */\n RouterStore::add(\n WpRestCondition::get('/hello'),\n new Action(function() {\n return new JsonResponse([\n 'message' => 'Hello Wpci!',\n ]);\n })\n );\n\n });\n }", "private function registerMiddleware()\n {\n /** @var \\Illuminate\\Foundation\\Http\\Kernel $kernel */\n $kernel = $this->app[Kernel::class];\n\n $kernel->pushMiddleware(ToolbarMiddleware::class);\n }", "public function boot()\n\t{\n\t\t// https://laracasts.com/discuss/channels/general-discussion/register-middleware-via-service-provider?page=3\n\t\tRoute::prependMiddlewareToGroup('web', SetTurbolinksHeader::class);\n\t}", "public function map()\n {\n Route::middleware('api')\n ->namespace($this->namespace)\n ->group(base_path('routes/api.php'));\n }", "public function register(\\ReRouter\\Interfaces\\Group $group)\n\t{\n\t\tforeach ($group->getRoutes() as $key => $route) {\n\t\t\tif ($route instanceof \\ReRouter\\Group) {\n\t\t\t\t$this->register($route);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$this->addRoute($route, $key);\n\t\t}\n\t\treturn $this;\n\t}", "public function map()\n {\n $this->adminGroup(function () {\n $this->mapAdminRoutes();\n });\n }", "protected function registerRoutes()\n {\n $this->registerStorageRoute();\n\n $this->registerMediaboxRoute();\n\n $this->registerApiMediaboxRoute();\n }", "protected function mapAuthenticatedWebRoutes()\n {\n Route::group([\n 'middleware' => ['web','auth'],\n 'namespace' => $this->namespace,\n ], function ($router) {\n require base_path('routes/web.php');\n });\n }", "protected function registerServices()\n {\n $di = $this->getDI();\n $di->set('router', function ()\n {\n /* @var $this Di */\n $router = new \\Phalcon\\Mvc\\Router();\n $defaultModule = self::MODULE_GUEST;\n\n $session = $this->get('session');\n\n if ($auth = $session->get('auth'))\n {\n /*\n * If we had more user types we would do a switch here\n * and check user type to set associated module\n */\n $defaultModule = self::MODULE_ADMIN;\n }\n $router->setDefaultModule($defaultModule);\n\n return $router;\n }, true);\n\n $this->setDI($di);\n }", "protected function defineRoutes()\n {\n if (! $this->app->routesAreCached()) {\n $router = app('router');\n\n $router->group(['namespace' => 'Kolimpri\\Auth\\Http\\Controllers'], function ($router) {\n require __DIR__.'/../Http/routes.php';\n });\n }\n }", "protected function middleware()\n\t{\n\t\treturn [];\n\t}", "public function __construct()\n {\n $this->middleware(CheckAdminGroup::class);\n }", "public function __construct()\n {\n $this->middleware(CheckAdminGroup::class);\n }", "function middleware($middleware){\n\t\tFrank::add_middleware($middleware);\n\t}", "public function addRouterGroup(Router $router): void\n {\n $this->groupRouters[] = $router;\n }", "private function applyGroupMiddleware(RouteBuilder $routeBuilder): void\n {\n $groupMiddlewareBindings = [];\n\n foreach ($this->groupOptionsStack as $groupOptions) {\n $groupMiddlewareBindings = [...$groupMiddlewareBindings, ...$groupOptions->middlewareBindings];\n }\n\n $routeBuilder->withManyMiddleware($groupMiddlewareBindings);\n }", "protected function configureRoutes()\n {\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/fortify.php');\n });\n }", "protected function registerRoutes()\n {\n $provider = $this;\n Route::macro('front', function ($model) use ($provider) {\n $front = getFront($model);\n $prefix = class_basename($front->base_url);\n\n Route::group(['prefix' => $prefix, 'namespace' => '\\WeblaborMx\\Front\\Http\\Controllers'], function () use ($model, $provider) \n {\n $controller = new FrontController($model);\n $provider->generateFrontRoutes($controller);\n });\n });\n\n Route::macro('lense', function ($model) use ($provider) {\n $model = 'Lenses\\\\'.$model;\n $front = getFront($model);\n $prefix = class_basename($front->base_url);\n\n Route::group(['prefix' => $prefix, 'namespace' => '\\WeblaborMx\\Front\\Http\\Controllers'], function () use ($model, $provider) \n {\n $controller = new FrontController($model);\n $provider->generateFrontRoutes($controller);\n \n });\n });\n\n Route::macro('page', function ($model, $route = null) {\n $singular = strtolower(Str::snake($model));\n $route = $route ?? $singular;\n Route::get($route, function() use ($model) {\n return (new PageController)->page($model, 'get');\n });\n Route::post($route, function() use ($model) {\n return (new PageController)->page($model, 'post');\n });\n Route::put($route, function() use ($model) {\n return (new PageController)->page($model, 'put');\n });\n Route::delete($route, function() use ($model) {\n return (new PageController)->page($model, 'delete');\n });\n });\n\n Route::post('api/laravel-front/upload-image', '\\WeblaborMx\\Front\\Http\\Controllers\\ToolsController@uploadImage');\n\n $this->app->make('form')->considerRequest(true);\n }" ]
[ "0.7536375", "0.70073324", "0.6943897", "0.69401896", "0.6810473", "0.6803434", "0.6803434", "0.6803434", "0.6803434", "0.6694564", "0.66523147", "0.6572569", "0.648002", "0.6462815", "0.64618164", "0.6445089", "0.64074016", "0.64074016", "0.64074016", "0.6400989", "0.63712656", "0.6349486", "0.63476527", "0.6344671", "0.6336023", "0.63340235", "0.6326879", "0.6319068", "0.6310267", "0.6297574", "0.6294527", "0.6294527", "0.62743694", "0.62737316", "0.62446946", "0.6235384", "0.6231925", "0.6219814", "0.6217224", "0.6204342", "0.6141805", "0.61280924", "0.60936254", "0.6073078", "0.6060212", "0.6011523", "0.59910727", "0.5956249", "0.59510905", "0.5950726", "0.5950374", "0.59080887", "0.59045076", "0.5896245", "0.5894507", "0.5886631", "0.58800185", "0.5817027", "0.5812786", "0.57933545", "0.57881546", "0.5780623", "0.5777504", "0.57650644", "0.5756214", "0.57460266", "0.57391393", "0.5717609", "0.5695632", "0.5683101", "0.5676961", "0.5671031", "0.5667032", "0.56618094", "0.56428957", "0.5636979", "0.5622868", "0.5612658", "0.5610236", "0.56029737", "0.5598789", "0.5598626", "0.55960417", "0.5592768", "0.5590673", "0.558109", "0.5568075", "0.5552085", "0.55465025", "0.5540505", "0.5536984", "0.55340654", "0.5529353", "0.5527335", "0.5527335", "0.5518663", "0.5517565", "0.5510462", "0.5506651", "0.5503245" ]
0.8797743
0
Register the middlewares on the router.
Зарегистрируйте middleware на роутере.
protected function registerMiddleware() { foreach ($this->routeMiddleware as $key => $middleware) { $this->router->middleware($key, $middleware); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function registerMiddlewares()\n {\n $this->app['router']->aliasMiddleware('centurion.guest', CenturionRedirectIfAuthenticated::class);\n $this->app['router']->aliasMiddleware('centurion.auth', CenturionAuthenticate::class);\n $this->app['router']->aliasMiddleware('centurion.hasaccess', CenturionCheckAllPermissions::class);\n $this->app['router']->aliasMiddleware('centurion.hasanyaccess', CenturionCheckAnyPermissions::class);\n $this->app['router']->aliasMiddleware('centurion.hasrole', CenturionCheckRole::class);\n }", "protected function registerMiddleware()\n {\n $router = $this->app['router'];\n\n $router->aliasMiddleware('admin.api.auth', AdminApiAuth::class);\n $router->aliasMiddleware('admin.auth', AdminAuth::class);\n $router->aliasMiddleware('admin.guest', RedirectIfAdminAuth::class);\n $router->aliasMiddleware('front.auth', FrontAuth::class);\n $router->aliasMiddleware('front.guest', RedirectIfFrontAuth::class);\n $router->aliasMiddleware('visitor', Visitor::class);\n $router->aliasMiddleware('permission', Permission::class);\n //$router->aliasMiddleware('product.viewed', ProductViewed::class);\n }", "private function addMiddleware()\n {\n foreach ($this->middlewares as $middleware) {\n $this->handler->addMiddleware($middleware);\n }\n }", "private function loadMiddleware()\n {\n foreach ($this->middlewares() as $middleware) {\n $this->app->add($middleware);\n }\n\n // Add the Slim built-in routing middleware\n // to the app middleware stack.\n $this->app->addRoutingMiddleware();\n }", "public function routeMiddlewares()\n {\n return [\n // removing the Laravel's default route middleware's\n // 'auth' => \\App\\Port\\Middleware\\Middlewares\\Http\\Authenticate::class,\n // 'auth.basic' => \\App\\Port\\Middleware\\Middlewares\\Http\\AuthenticateWithBasicAuth::class,\n // 'guest' => \\App\\Port\\Middleware\\Middlewares\\Http\\RedirectIfAuthenticated::class,\n\n // JWT Package middleware's\n 'jwt.auth' => \\Tymon\\JWTAuth\\Middleware\\GetUserFromToken::class,\n 'jwt.refresh' => \\Tymon\\JWTAuth\\Middleware\\RefreshToken::class,\n\n // Entrust Package middleware's\n 'role' => \\Zizaco\\Entrust\\Middleware\\EntrustRole::class,\n 'permission' => \\Zizaco\\Entrust\\Middleware\\EntrustPermission::class,\n 'ability' => \\Zizaco\\Entrust\\Middleware\\EntrustAbility::class,\n\n\n 'role.web' => \\App\\Containers\\Authorization\\Middlewares\\EntrustRoleForWeb::class,\n\n // Hello API Visitor User Authentication middleware\n 'api.auth.visitor' => \\App\\Containers\\Authentication\\Middlewares\\VisitorsAuthentication::class,\n\n // Hello API User Authentication middleware for Web Pages\n 'web.auth' => \\App\\Containers\\Authentication\\Middlewares\\Authentication::class,\n\n // Hello API Requests Monitor\n 'mobile.requests.monitor' => \\App\\Containers\\Debugger\\Middlewares\\RequestsMonitorMiddleware::class,\n\n // ...\n ];\n\n }", "protected function registerMiddleware()\n {\n $this->app->routeMiddleware([\n 'hooks' => RequestMiddleware::class\n ]);\n }", "protected function registerRouteMiddleware()\n {\n // register route middleware.\n foreach ($this->routeMiddleware as $key => $middleware) {\n app('router')->middleware($key, $middleware);\n }\n // register middleware group.\n foreach ($this->middlewareGroups as $key => $middleware) {\n app('router')->middlewareGroup($key, $middleware);\n }\n }", "public function addMiddleware() {\n\t\t$this->middleware('api.catchErrors');\n\t\t\n\t\t//check for client API key\n\t\t$this->middleware('auth.client');\n \n }", "private function registerMiddleware()\n {\n if ($this->app['config']['customerchat']['enabled'] &&\n $this->app['config']['customerchat']['autoinject']) {\n $router = $this->app['router'];\n $router->pushMiddlewareToGroup('web', \\Ltsochev\\CustomerChat\\Middleware\\AutoInjectMiddleware::class);\n }\n }", "protected function registerRouteMiddleware()\n {\n // register route middleware.\n foreach ($this->routeMiddleware as $key => $middleware) {\n app('router')->aliasMiddleware($key, $middleware);\n }\n }", "public function middlewares(array $middlewares): self;", "public function addMiddleware() {\n $this->middleware('api.logApiCalls');\n\n // catch all errors and return a JSON response\n $this->middleware('api.catchErrors');\n\n // require hmacauth middleware for all API requests by default\n $this->middleware('api.protectedAuth');\n }", "protected function registerRouteMiddleware()\n {\n // register route middleware.\n foreach ($this->routeMiddleware as $key => $middleware) {\n app('router')->aliasMiddleware($key, $middleware);\n }\n\n // register middleware group.\n foreach ($this->middlewareGroups as $key => $middleware) {\n app('router')->middlewareGroup($key, $middleware);\n }\n }", "protected function registerRouteMiddleware()\n {\n // register route middleware.\n foreach ($this->routeMiddleware as $key => $middleware) {\n app('router')->aliasMiddleware($key, $middleware);\n }\n\n // register middleware group.\n foreach ($this->middlewareGroups as $key => $middleware) {\n app('router')->middlewareGroup($key, $middleware);\n }\n }", "protected function registerRouteMiddleware()\n {\n // register route middleware.\n foreach ($this->routeMiddleware as $key => $middleware) {\n app('router')->aliasMiddleware($key, $middleware);\n }\n\n // register middleware group.\n foreach ($this->middlewareGroups as $key => $middleware) {\n app('router')->middlewareGroup($key, $middleware);\n }\n }", "protected function registerRouteMiddleware()\n {\n // register route middleware.\n foreach ($this->routeMiddleware as $key => $middleware) {\n app('router')->aliasMiddleware($key, $middleware);\n }\n\n // register middleware group.\n foreach ($this->middlewareGroups as $key => $middleware) {\n app('router')->middlewareGroup($key, $middleware);\n }\n }", "public function register()\n {\n $this->registerMiddlewares();\n\n //\n }", "protected function registerMiddlewareGroups()\n {\n foreach ($this->middlewareGroups as $key => $middleware) {\n $this->router->middlewareGroup($key, $middleware);\n }\n }", "public function applicationMiddlewares()\n {\n return [\n // Laravel default middleware's\n \\Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode::class,\n \\App\\Port\\Middleware\\Middlewares\\Http\\EncryptCookies::class,\n \\Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse::class,\n \\Illuminate\\Session\\Middleware\\StartSession::class,\n \\Illuminate\\View\\Middleware\\ShareErrorsFromSession::class,\n\n // removing some of the Laravel's default middleware's\n // \\App\\Port\\Middleware\\Middlewares\\Http\\VerifyCsrfToken::class,\n\n // CORS Package middleware\n \\Barryvdh\\Cors\\HandleCors::class,\n // Hello API Localization middleware\n \\App\\Port\\Middleware\\Middlewares\\Http\\Localization::class,\n ];\n }", "private function middlewares(): array\n {\n return [\n Middleware\\CorsEnabler::class,\n Middleware\\ErrorHandlerMiddleware::class,\n ];\n }", "public function boot()\n {\n $this->registerMiddleware();\n }", "protected function registerMiddleware(Kernel $kernel, Router $router)\n {\n // Register global middleware\n\n /*\n Laravel 5.2 hack\n In L5.1, when you pushMiddleware from a provider level the middleware\n is pushed AFTER the FULL stack, so ever after app/Http/Kernel.php array\n So in L5.1 your middleware stack looked like:\n 0 => \"Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode\"\n 1 => \"App\\Http\\Middleware\\EncryptCookies\"\n 2 => \"Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse\"\n 3 => \"Illuminate\\Session\\Middleware\\StartSession\"\n 4 => \"Illuminate\\View\\Middleware\\ShareErrorsFromSession\"\n 5 => \"Mrcore\\Wiki\\Http\\Middleware\\AnalyzeRoute\"\n\n BUT now in L5.2+ they changed the order. So when you pushMiddleware from\n this provider level, it pushes BEFORE the Kernel.php is added, so you get\n 0 => \"Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode\"\n 1 => \"Mrcore\\Wiki\\Http\\Middleware\\AnalyzeRoute\"\n\n This means your customer middleware has NO Session:: and NO Auth::\n Which means my AnalyzeRoute wiki middleware is completely useless.\n\n So this hack fires up the Session and Auth middleware. This will\n also allow Auth:: to be used in controller __construct which in L5.3\n this is not available.\n\n See https://github.com/laravel/framework/issues/15352\n See https://github.com/laravel/framework/issues/15072\n */\n #$kernel->pushMiddleware(\\App\\Http\\Middleware\\EncryptCookies::class);\n #$kernel->pushMiddleware(\\Illuminate\\Session\\Middleware\\StartSession::class);\n\n // So now my AnalyzeRoute has Auth:: access!\n $kernel->pushMiddleware(\\Mrcore\\Wiki\\Http\\Middleware\\AnalyzeRoute::class);\n\n // Register route based middleware\n // FIXME Laravel version 5.3 vs 5.5 hack, remove when 5.3 is deprecated at dynatron\n $version = app()->version();\n if (substr($version, 0, 3) == '5.3') {\n $router->middleware('auth.admin', \\Mrcore\\Wiki\\Http\\Middleware\\AuthenticateAdmin::class);\n } else {\n $router->aliasMiddleware('auth.admin', \\Mrcore\\Wiki\\Http\\Middleware\\AuthenticateAdmin::class);\n }\n\n // Authenticate mrcore applications and modules\n // Enable if you are testing laravel 5.3 new auth stuff\n $router->pushMiddlewareToGroup('web', \\Mrcore\\Wiki\\Http\\Middleware\\AuthenticateApp::class);\n }", "private function appendMiddleware()\n {\n $this->middleware('HasAdminOrAuthorRole', [\n 'only' => ['create']\n ]);\n\n $this->middleware('CanEditPost', [\n 'only' => ['edit']\n ]);\n\n $this->middleware('DenyIfBeingEdited', [\n 'only' => ['edit']\n ]);\n }", "public function getMiddlewares(): array\n {\n return $this->middlewares;\n }", "protected function setUpRoutes()\n {\n $this->app['router']->get('/middleware-guard', function () {\n return 'You did it';\n })->middleware('exposable.guard');\n\n $this->app['router']->get('/middleware-expire', function () {\n return 'You did it';\n })->middleware('exposable.expire');\n\n $this->app['router']->get('/middleware-signature', function () {\n return 'You did it';\n })->middleware('exposable.signature');\n }", "public function setupMiddleware()\n {\n $this->middleware('antares.auth');\n $this->middleware('antares.can:antares/translations::add-language', ['only' => ['create'],]);\n $this->middleware('antares.can:antares/translations::publish-translations', ['only' => ['publish'],]);\n $this->middleware('antares.can:antares/translations::export-translations', ['only' => ['export'],]);\n $this->middleware('antares.can:antares/translations::import-translations', ['only' => ['import'],]);\n $this->middleware('antares.can:antares/translations::change-language', ['only' => ['change'],]);\n }", "public function bootstrapRouter()\n {\n $this->register(RoutingServiceProvider::class);\n $this->router = $this['router'];\n $this->router->middlewareGroup(\"web\", []);\n }", "public function boot()\n {\n $this->app->routeMiddleware([\n 'admin.auth' => Middleware\\Admin::class,\n\t\t\t'user.auth' => Middleware\\User::class\n ]);\n }", "public function inject( $middleware ){\n if ( $middleware === $this->router ) $this->router_mounted = true;\n array_push( $this->middleware, $middleware );\n return $this;\n }", "abstract public function requestMiddlewares(): array;", "function middleware($middleware){\n\t\tFrank::add_middleware($middleware);\n\t}", "protected function registerRoutes ()\n {\n $this->add(new JsonResponseMiddleware());\n \n Core::instance()->getContainer()['notFoundHandler'] = function ()\n {\n return function (Request $request, Response $response)\n {\n $html = file_get_contents(__DIR__ . '/Resources/html/index.html');\n $html = str_replace('../public', '/src/Resources/public', $html);\n \n $response->getBody()->write($html);\n \n return $response;\n };\n };\n \n $this->events()->publish('core.route.register');\n }", "public function pipe(object ...$middlewares): void;", "public function middleware($middlewares)\n {\n foreach ($middlewares as $middleware) {\n $this->route['middleware'][] = $middleware;\n }\n\n return $this;\n }", "private function registerRoutes()\n {\n $defaults = [\n 'login' => 'login',\n 'logout' => 'logout',\n 'register' => 'register',\n 'callback' => 'callback',\n ];\n\n $options = Config::get('keycloak-web.routes', []);\n $options = array_merge($defaults, $options);\n\n // Register Routes\n $router = $this->app->make('router');\n\n if (! empty($options['login'])) {\n $router->middleware('web')->get($options['login'], 'Vizir\\KeycloakWebGuard\\Controllers\\AuthController@login')->name('keycloak.login');\n }\n\n if (! empty($options['logout'])) {\n $router->middleware('web')->get($options['logout'], 'Vizir\\KeycloakWebGuard\\Controllers\\AuthController@logout')->name('keycloak.logout');\n }\n\n if (! empty($options['register'])) {\n $router->middleware('web')->get($options['register'], 'Vizir\\KeycloakWebGuard\\Controllers\\AuthController@register')->name('keycloak.register');\n }\n\n if (! empty($options['callback'])) {\n $router->middleware('web')->get($options['callback'], 'Vizir\\KeycloakWebGuard\\Controllers\\AuthController@callback')->name('keycloak.callback');\n }\n }", "protected function router()\n {\n $last = 'Rougin\\Slytherin\\Fixture\\Middlewares\\LastMiddleware';\n\n $router = new \\Rougin\\Slytherin\\Routing\\Router;\n\n $router->get('/', 'Rougin\\Slytherin\\Fixture\\Classes\\NewClass@index');\n $router->get('/store', 'Rougin\\Slytherin\\Fixture\\Classes\\NewClass@store');\n $router->get('/request', 'Rougin\\Slytherin\\Fixture\\Classes\\WithServerRequestInterface@index');\n $router->get('/response', 'Rougin\\Slytherin\\Fixture\\Classes\\WithResponseInterface@index');\n $router->get('/error', 'Rougin\\Slytherin\\Fixture\\Classes\\WithResponseInterface@error');\n $router->get('/parameter', 'Rougin\\Slytherin\\Fixture\\Classes\\WithParameter@index');\n $router->get('/optional', 'Rougin\\Slytherin\\Fixture\\Classes\\WithOptionalParameter@index');\n $router->get('/middleware', 'Rougin\\Slytherin\\Fixture\\Classes\\NewClass@index', $last);\n $router->put('/hello', 'Rougin\\Slytherin\\Fixture\\Classes\\WithPutHttpMethod@index');\n $router->get('/typehint/:code', 'Rougin\\Slytherin\\Fixture\\Classes\\WithResponseInterface@typehint');\n\n $router->get('/callback', function () {\n return 'Hello, this is a callback';\n });\n\n return $router;\n }", "private function registerMiddleware()\n {\n /** @var \\Illuminate\\Foundation\\Http\\Kernel $kernel */\n $kernel = $this->app[Kernel::class];\n\n $kernel->pushMiddleware(ToolbarMiddleware::class);\n }", "public function initMiddleware(App $app)\n {\n $container = $app->getContainer();\n\n // // Register middleware for all routes\n // // If you are implementing per-route checks you must not add this\n // $app->add($container->get('csrf'));\n }", "public function setupMiddleware()\n {\n $this->middleware('antares.auth');\n $this->middleware(\"antares.can:antares/logger::report-send\", ['only' => ['send']]);\n }", "public function register()\n {\n $this->app->singleton('router', Router::class);\n $this->app->singleton('router.frontend', Frontend::class);\n\n $this->registerMiddlewares(config('stellar.backend-middleware'));\n }", "private function bootMiddlewareAliases(): void\n {\n foreach ($this->middleware as $alias => $middleware) {\n $this->app['router']->aliasMiddleware($alias, $middleware);\n }\n }", "protected function addMiddlewares($kernel)\n {\n foreach ($this->otherMiddlewares as $key => $value) {\n $kernel->pushMiddleware($value);\n }\n }", "protected function bindMiddlewares( \\Slim\\Route $route, array $middlewares )\n\t{\n\t\tforeach ( $middlewares as $mw )\n\t\t{\n\t\t\tif ( is_callable( $mw ) )\n\t\t\t{\n\t\t\t\t$route->setMiddleware( $mw );\n\t\t\t}\n\t\t\telseif ( is_string( $mw ) )\n\t\t\t{\n\t\t\t\t$mwSplit = explode( ':', $mw );\n\t\t\t\t$mwClass = $mwSplit[0];\n\t\t\t\t$mwMethod = $mwSplit[1];\n\n\t\t\t\t$route->setMiddleware( function() use ( $mwClass, $mwMethod ) {\n\t\t\t\t\t$middleware = $this->register( $mwClass );\n\t\t\t\t\tcall_user_func( array( $middleware, $mwMethod ) );\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}", "protected function addMiddleware(array $middlewares)\n {\n foreach ($middlewares as $name) {\n $this->c['app']->middleware(ucfirst($name));\n }\n }", "private function processMiddleware()\n {\n foreach ($this->registeredMiddleware as $middleware) {\n $this->app->call($middleware . '@handle');\n }\n }", "public function middlewares() : Collection\n {\n return $this->middlewares;\n }", "protected function registerMiddleware(Kernel $kernel, Router $router)\n {\n // Register global middleware\n #$kernel->pushMiddleware('Mrcore\\Components\\Http\\Middleware\\DoSomething');\n\n // Register route based middleware\n // FIXME Laravel version 5.3 vs 5.5 hack, remove when 5.3 is deprecated at dynatron\n #$version = app()->version();\n #if (substr($version, 0, 3) == '5.3') {\n #$router->middleware('auth.admin', \\Mrcore\\Components\\Http\\Middleware\\AuthenticateAdmin::class);\n #} else {\n #$router->aliasMiddleware('auth.admin', \\Mrcore\\Components\\Http\\Middleware\\AuthenticateAdmin::class);\n #}\n }", "public function addMiddleware(\\Closure $middleware) : void\n {\n $this->getMiddleware()->addMiddleWares($middleware);\n }", "protected function loadMiddlewares()\n {\n $middlewares_dir = $this->root_dir . DIRECTORY_SEPARATOR . \"middlewares\";\n $common_middlewares_file = $middlewares_dir . DIRECTORY_SEPARATOR . \"common.php\";\n if(is_dir($middlewares_dir) && is_file($common_middlewares_file)) {\n $this->middlewares = include $common_middlewares_file;\n } else {\n // its okay if there is not middlewares directory\n // then just set it to an empty array\n $this->middlewares = [];\n }\n }", "public function register()\n {\n $this\n ->registerMiddleware()\n ->loadConfig();\n }", "public function boot(Router $router)\n {\n $this->registerTranslations();\n $this->registerConfig();\n $this->registerViews();\n\n $router->middleware('admin_login_check', LoginCheckMiddleware::class);\n $router->middleware('has_role', HasRole::class);\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n $loader->alias('admin_login_check', LoginCheckMiddleware::class);\n $loader->alias('has_role', HasRole::class);\n\n\n\n }", "private function registerRoutes()\n {\n Route::middlewareGroup('performance-monitor', config('performance-monitor.middleware', []));\n\n Route::group([\n 'namespace' => 'Fruitcake\\PerformanceMonitor\\Http\\Controllers',\n 'prefix' => config('performance-monitor.path'),\n 'middleware' => 'performance-monitor',\n ], function () {\n $this->loadRoutesFrom(__DIR__ . '/Http/routes.php');\n });\n }", "public function boot()\n {\n if ($this->isLaravel()) {\n $this->aliasLaravelMiddleware();\n } elseif ($this->isLumen()) {\n $this->app->routeMiddleware($this->middlewareAliases);\n }\n\n $this->loadRoutesFrom(__DIR__ . '/../../routes/routes.php');\n\n $this->registerEvents();\n\n $this->registerCommands();\n }", "protected function registerRoutes()\n {\n Route::as('entropy.')\n ->prefix(config('entropy.path'))\n ->middleware(config('entropy.middleware'))\n ->group(function () {\n $this->loadRoutesFrom(__DIR__ . '/../routes/web.php');\n });\n }", "protected function registerRoutes()\n {\n Route::middleware('web')\n ->prefix(config('cscms.coderstudios.backend_prefix'))\n ->group(__DIR__.'/../routes/backend.php')\n ;\n\n Route::middleware('web')\n ->prefix(config('cscms.coderstudios.frontend_prefix'))\n ->group(__DIR__.'/../routes/frontend.php')\n ;\n }", "protected function registerMiddlewaresWithApp(array $middlewares) {\n $middlewareNamespace = $this->_app->config('app.namespace');\n $middlewareNamespace = rtrim($middlewareNamespace, '\\\\') . '\\\\' . 'middlewares' . '\\\\';\n\n // before adding middlewares to stack we don't know which our 'next' is, so we need to figure that out.\n $next = null;\n\n while (!empty($middlewares)) {\n $middleware = array_pop($middlewares);\n\n // first try application middlewares\n $middlewareName = $middlewareNamespace . $middleware;\n if (class_exists($middlewareName)) {\n $middlewareObj = new $middlewareName($this->_app);\n if ($next === null) {\n $next = $middlewareObj;\n }\n $this->_app->registerMiddleware($middlewareObj);\n // middleware has been found, no need to look at framework middlewares\n continue;\n }\n\n // try framework middlewares if not in application\n $middlewareName = '\\\\hfw\\\\middlewares\\\\' . $middleware;\n if (class_exists($middlewareName)) {\n $middlewareObj = new $middlewareName($this->_app);\n if ($next === null) {\n $next = $middlewareObj;\n }\n $this->_app->registerMiddleware($middlewareObj);\n } else {\n throw new NotImplementedException(\"Trying to register middleware '{$middlewareName}', but class not found.\");\n }\n }\n $this->_next = $next;\n }", "public function boot()\r\n {\r\n Route::middlewareGroup('dashboard', [\r\n //Firewall::class,\r\n // RedirectInstall::class,\r\n AccessMiddleware::class,\r\n ]);\r\n\r\n $this->binding();\r\n\r\n parent::boot();\r\n }", "public function boot()\n\t{\n\t\t// https://laracasts.com/discuss/channels/general-discussion/register-middleware-via-service-provider?page=3\n\t\tRoute::prependMiddlewareToGroup('web', SetTurbolinksHeader::class);\n\t}", "private function registerGlobalAfterMiddleware(): array\n {\n return [];\n }", "public function boot(\\Illuminate\\Routing\\Router $router) {\n\n include dirname(__DIR__) . '/Http/routes.php';\n\n\n // Register middleware\n $httpKernel = $this->app['Illuminate\\Contracts\\Http\\Kernel'];\n\n foreach ($this->middleware as $middleware) {\n $httpKernel->pushMiddleware($middleware);\n }\n\n foreach ($this->routeMiddleware as $key => $middleware) {\n $router->middleware($key, $middleware);\n }\n\n //Loading views\n //$this->loadViewsFrom(dirname(dirname(__DIR__)) . DIRECTORY_SEPARATOR . 'resources/views', 'etherbase');\n }", "public function setMiddleware($classes);", "public function map()\n {\n $this->router->group(['middleware' => 'guest'], function () {\n $this->router->post('auth', 'AuthController@store');\n $this->resource('users', 'UsersController', ['only' => ['store']]);\n });\n\n $this->router->group(['middleware' => 'auth'], function () {\n $this->resource('users', 'UsersController', ['only' => ['show']]);\n $this->resource('projects', 'ProjectsController', ['only' => ['store']]);\n\n $this->router->group(['middleware' => 'can:update,users'], function () {\n $this->resource('users', 'UsersController', ['only' => ['update', 'destroy']]);\n });\n\n $this->router->group(['middleware' => 'can:access,stories'], function () {\n $this->resource('stories', 'StoriesController', ['only' => ['show', 'update', 'destroy']]);\n });\n\n $this->router->group(['middleware' => 'can:access,projects'], function () {\n $this->resource('projects', 'ProjectsController', ['only' => ['show', 'update', 'destroy']]);\n $this->resource('projects.users', 'ProjectsUsersController', ['only' => ['update', 'destroy']]);\n $this->resource('projects.stories', 'ProjectsStoriesController', ['only' => ['index', 'store']]);\n });\n });\n }", "abstract public function responseMiddlewares(): array;", "public function addRoutes() \n {\n register_rest_route( 'kerigansolutions/v1', '/instagallerytoken',\n [\n 'methods' => 'GET',\n 'callback' => [ $this, 'exchangeToken' ],\n 'permission_callback' => '__return_true'\n ]\n );\n\n register_rest_route( 'kerigansolutions/v1', '/instagramdata',\n [\n 'methods' => 'GET',\n 'callback' => [ $this, 'getInstagramData' ],\n 'permission_callback' => '__return_true'\n ]\n );\n }", "public function register()\n {\n // register global middleware.\n $kernel = $this->app->make(Kernel::class);\n foreach ($this->middleware as $middleware) {\n $kernel->pushMiddleware($middleware);\n }\n }", "protected function registerControllers()\n {\n $app = $this;\n\n $this['init_controller'] = $this->protect(function(\\Phial\\Controller\\Controller $c) use ($app) {\n $c->setApplication($app);\n\n return $c;\n });\n\n $this['controller.user_admin_class'] = 'Phial\\\\Controller\\\\UserAdmin';\n $this['controller.user_admin'] = function($app) {\n $c = new $app['controller.user_admin_class']($app['users']);\n\n return $app['init_controller']($c);\n };\n\n $this['controller.admin_class'] = 'Phial\\\\Controller\\\\Admin';\n $this['controller.admin'] = function($app) {\n $c = new $app['controller.admin_class']();\n\n return $app['init_controller']($c);\n };\n\n $this['controller.account_class'] = __NAMESPACE__ . '\\\\Controller\\\\Account';\n $this['controller.account'] = function($app) {\n $c = new $app['controller.account_class']();\n\n return $app['init_controller']($c);\n };\n\n $this->mount('/admin', new Provider\\UserAdminControllerProvider());\n $this->mount('/admin', new Provider\\AdminControllerProvider());\n $this->mount('/account', new Provider\\AccountControllerProvider());\n }", "public function middleware()\n {\n // TODO: Implement middleware() method.\n }", "public function middleware($middlewares)\n {\n $routeLast = end($this->routes[$this->DOMAIN]);\n $route = $routeLast['match'];\n\n if (is_array($middlewares)) {\n $this->setMiddlewares($middlewares, $route, array());\n return;\n }\n $this->setMiddleware($middlewares, $route, array());\n return $this;\n }", "public static function setup($app)\n {\n static::setInstance($app);\n\n //\n // Setup middlewares\n //\n $app->add(new Middlewares\\ResponseTypeMiddleware());\n $app->add(new Middlewares\\ChannelMiddleware());\n $app->add(new Middlewares\\LogMiddleware());\n $app->add(new Middlewares\\AuthMiddleware());\n // $app->add(new Middlewares\\SessionMiddleware());\n $app->add(new Middlewares\\AppMiddleware());\n $app->add(new Middlewares\\MethodOverride());\n\n return static::registerCoreRoutes($app);\n }", "public function withMiddleware($middlewares): MiddlewareAwareContract\n {\n $this->validateInput($middlewares);\n\n if (\\is_string($middlewares) || \\is_object($middlewares)) {\n $className = \\is_object($middlewares) ? \\get_class($middlewares) : $middlewares;\n\n if (class_exists($className)) {\n $this->validateMiddleware($className);\n }\n\n $this->middlewares[$className] = $middlewares;\n\n return $this;\n }\n\n foreach ($middlewares as $middleware) {\n $className = $this->getMiddlewareClassName($middleware);\n\n if (class_exists($className)) {\n $this->validateMiddleware($className);\n }\n\n $this->middlewares[$className] = $middleware;\n }\n\n return $this;\n }", "protected function registerMediaboxRoute()\n {\n MediaboxRoutes::register();\n\n if (config('mediabox.routes.web.register')) {\n $route = Route::prefix(config('mediabox.routes.web.prefix'));\n\n if (! empty(config('mediabox.routes.web.middlewares', []))) {\n $route->middleware(config('mediabox.routes.web.middlewares'));\n }\n\n $route->group(function () {\n Route::mediaResource(config('mediabox.routes.web.name'), config('mediabox.routes.web.controller'));\n });\n }\n }", "public function __construct()\n {\n $this->middleware('registered');\n $this->middleware('admin');\n }", "public function boot()\n {\n //注册中间件\n foreach ($this->middlewares as $name => $middleware) {\n $this->app['router']->aliasMiddleware($name, \"App\\\\Modules\\\\Middleware\\\\{$middleware}\");\n }\n\n // 启动全部模块\n $this->app->register(BootstrapServiceProvider::class);\n }", "protected function collectGeneralMiddlewares(): array\n {\n return $this->repository->getGeneralMiddlewares();\n }", "public function create(array $middlewares): MiddlewarePipeline;", "public function register()\n {\n $request = $this->app->make('request');\n\n $this->registerRouter();\n $this->bindAlexaRequest($request);\n $this->bindCertificateProvider();\n $this->bindAlexa();\n $this->registerMiddleware();\n\n }", "public function register()\n {\n $this->loadAuthConfig();\n\n $this->registerRouteMiddleware();\n\n }", "protected function middleware()\n\t{\n\t\treturn [];\n\t}", "protected function routeMiddleware()\n {\n $router = $this->router;\n $dispatcher = $this->dispatcher;\n\n if (!$dispatcher->wasForwarded() && $router->wasMatched()) {\n $actionMethod = $dispatcher->getActionName();\n\n $route = $router->getMatchedRoute();\n\n $paths = $route->getPaths();\n\n if (!empty($paths['middleware'])) {\n $middlewares = $paths['middleware'];\n\n if (!is_array($middlewares)) {\n $middlewares = [$middlewares];\n }\n\n foreach ($middlewares as $key => $middleware) {\n if (is_int($key)) {\n $middlewareClass = $middleware;\n $middlewareParams = [];\n } else {\n $middlewareClass = $key;\n $middlewareParams = !is_array($middlewares) ? [$middleware] : $middleware;\n }\n\n $this->middleware($middlewareClass, ...$middlewareParams)->only([$actionMethod]);\n }\n }\n }\n }", "protected function middleware()\n {\n }", "protected function _registerRouters($config)\n {\n $this->getDI()->set('router', function () {\n\n $router = new Router(false);\n $router->removeExtraSlashes(true);\n\n // -- Load custom router --\n foreach ($this->config['routers'] as $link => $itemRouter)\n $router->add($link, $itemRouter);\n\n $router->add('/([a-zA-Z0-9\\_\\-]+)/:controller/:action/:params', array(\n 'sub-path' => 'app',\n 'sub-module' => 1,\n 'controller' => 2,\n 'action' => 3,\n 'params' => 4\n ))->convert('action', function($action){\n return Text::camelize($action);\n });\n\n $router->add('/([a-zA-Z0-9\\_\\-]+)/:controller[/]{0,1}', array(\n 'sub-path' => 'app',\n 'sub-module' => 1,\n 'controller' => 2,\n 'action' => 'index'\n ));\n\n $router->add('/([a-zA-Z0-9\\_\\-]+)[/]{0,1}', array(\n 'sub-path' => 'app',\n 'sub-module' => 1,\n 'controller' => 'index',\n 'action' => 'index'\n ));\n\n $router->add('[/]{0,1}', array(\n 'sub-path' => 'app',\n 'sub-module' => 'index',\n 'controller' => 'index',\n 'action' => 'index'\n ));\n\n // -- Nhung router Admin thi de phia sau, no se match voi router gan giong nhat --\n\n $router->add('/admin/([a-zA-Z0-9\\_\\-]+)/:controller/:action/:params', array(\n 'sub-path' => 'admin',\n 'sub-module' => 1,\n 'controller' => 2,\n 'action' => 3,\n 'params' => 4\n ))->convert('action', function($action){\n return Text::camelize($action);\n });;\n\n $router->add('/admin/([a-zA-Z0-9\\_\\-]+)/:controller[/]{0,1}', array(\n 'sub-path' => 'admin',\n 'sub-module' => 1,\n 'controller' => 2,\n 'action' => 'index'\n ));\n\n $router->add('/admin/([a-zA-Z0-9\\_\\-]+)[/]{0,1}', array(\n 'sub-path' => 'admin',\n 'sub-module' => 1,\n 'controller' => 'index',\n 'action' => 'index'\n ));\n\n $router->add('/admin[/]{0,1}', array(\n 'sub-path' => 'admin',\n 'sub-module' => 'index',\n 'controller' => 'index',\n 'action' => 'index'\n ));\n\n return $router;\n }, true);\n }", "public function shiftMiddleware(): MiddlewareInterface;", "public function register()\n {\n\t \n\t $this->app->instance('themosis_headers', []);\n\t \n add_filter( 'wp_headers', function($headers) {\n\t \n\t $this->app['themosis_headers'] = array_merge($this->app['themosis_headers'], $headers);\n\t \n\t return [];\n\t \n });\n \n $this->app->singleton('router', function ($container) {\n return new Router($container['events'], $container);\n });\n\t \n\t $this->app->singleton(Request::class, function() {\n\t\t\n\t\t return $this->app->request;\n\t\t \n\t });\n \n\t}", "public function boot()\n {\n if ($this->app instanceof LaravelApplication && !$this->app->runningInConsole()) {\n /** @var Kernel $kernel */\n $kernel = $this->app->make(Kernel::class);\n $kernel->prependMiddleware(Middleware::class);\n } elseif ($this->app instanceof LumenApplication) {\n $this->app->middleware([Middleware::class]);\n }\n }", "protected function registerRouterBindings()\n {\n $this->singleton('router', static function ($app) {\n return $app->router;\n });\n }", "public function run()\n {\n\n\t\t\t\t$middleware = new Middleware();\n\t\t\t\t$middleware->name = 'userexist';\n\t\t\t\t$middleware->class = '\\App\\Http\\Middleware\\UserExist';\n\t\t\t\t$middleware->save();\n\n\t\t\t\t$middleware = new Middleware();\n\t\t\t\t$middleware->name = 'checkrole';\n\t\t\t\t$middleware->class = '\\App\\Http\\Middleware\\CheckRole';\n\t\t\t\t$middleware->save();\n\n\t\t\t\t$middleware = new Middleware();\n\t\t\t\t$middleware->name = 'checkpermission';\n\t\t\t\t$middleware->class = '\\App\\Http\\Middleware\\CheckPermission';\n\t\t\t\t$middleware->save();\n\n\t\t\t\t$middleware = new Middleware();\n\t\t\t\t$middleware->name = 'usercanbeedited';\n\t\t\t\t$middleware->class = '\\App\\Http\\Middleware\\UserCanBeEdited';\n\t\t\t\t$middleware->save();\n\n }", "public function __construct()\n {\n $this->middleware('platform');\n $this->middleware('admin');\n }", "public function add(MiddlewareInterface $middleware): self;", "public function firstMiddleware()\n {\n return [\n FaviconIcoMiddleware::class,\n PoweredByMiddleware::class,\n ParserMiddleware::class,\n RouterMiddleware::class,\n ];\n }", "public function __construct()\n {\n $this->middleware('jwt.auth', ['only' => ['update', 'destroy', 'store']]);\n $this->middleware('pg.admin', ['only' => ['store', 'update', 'destroy']]);\n }", "public function boot()\n {\n\n $httpKernel = $this->app[ 'Illuminate\\Contracts\\Http\\Kernel' ];\n $httpKernel->pushMiddleware(Http\\Middleware\\Plugin::class);\n }", "public function register() {\n /** @var \\Illuminate\\Routing\\Router $router */\n $router = $this->app['router'];\n\n (new FrontendRouter($router))->register();\n }", "public function lastMiddleware()\n {\n return [\n UserMiddleware::class,\n ValidatorMiddleware::class,\n ];\n }", "public function __construct()\n {\n $this->middleware('auth');\n $this->middleware('activated');\n $this->middleware('admin');\n }", "public function __construct() {\n $this->middleware('admin_access', [ 'except' => [] ]);\n $this->middleware('api_jwt_auth', [ 'except' => [] ]);\n }", "public function __construct() {\n $this->middleware('admin_access', [ 'except' => [] ]);\n $this->middleware('api_jwt_auth', [ 'except' => [] ]);\n }", "private function initialization()\n {\n $this->middleware(function ($request, $next) {\n // Call the initializer with injection\n if (method_exists($this, 'initialize')) {\n App::call([$this, 'initialize']);\n }\n\n // Call the setup with injection\n if (method_exists($this, 'setup')) {\n App::call([$this, 'setup']);\n }\n\n return $next($request);\n });\n }", "public function boot(): void\r\n {\r\n $this->registerCommands();\r\n $this->registerPublishing();\r\n\r\n if (!Config::get('redis-gui.enabled')) {\r\n return;\r\n }\r\n\r\n Route::middlewareGroup('redis-gui', array_merge(Config::get('redis-gui.middleware', []), [\r\n Authorize::class\r\n ]));\r\n\r\n $this->registerRoutes();\r\n $this->loadViewsFrom(__DIR__ . '/../../resources/views', 'redis-gui');\r\n $this->loadTranslationsFrom(__DIR__ . '/../../lang', 'redis-gui');\r\n\r\n if (Request::is(Config::get('redis-gui.path') . '/api/*') && Request::wantsJson()) {\r\n $this->app->bind(ExceptionHandler::class, Handler::class);\r\n }\r\n }", "public function __construct()\n {\n $this->middleware('auth');\n $this->middleware('web');\n $this->middleware('admin:home');\n }", "public function setRouteMiddleware($config, Router $router)\n\t{\n\t\t$routeMiddleware = $config->get('routeMiddleware');\n\t\tforeach ($routeMiddleware as $key => $middleware) {\n\t\t\t$router->aliasMiddleware($key, $middleware);\n\t\t}\n\t}" ]
[ "0.80106723", "0.776971", "0.75409436", "0.7199919", "0.7196665", "0.7191226", "0.7143463", "0.702151", "0.7021146", "0.70103306", "0.6960549", "0.69534767", "0.69462556", "0.69462556", "0.69462556", "0.69462556", "0.6925819", "0.69199413", "0.6914242", "0.67931116", "0.6741431", "0.6719922", "0.6614192", "0.66138816", "0.66121376", "0.65849", "0.651428", "0.6481049", "0.6474944", "0.6457134", "0.6397568", "0.6378193", "0.6375144", "0.6351639", "0.6348568", "0.63277376", "0.6317961", "0.6309288", "0.63067985", "0.62992674", "0.62784594", "0.62754256", "0.62458354", "0.6214903", "0.6211256", "0.6201581", "0.61829567", "0.61552304", "0.61522806", "0.6143173", "0.6123404", "0.6114752", "0.610794", "0.608822", "0.6077493", "0.6067201", "0.6065098", "0.6046814", "0.6028439", "0.60278153", "0.59982604", "0.5994968", "0.59840757", "0.5978125", "0.5977941", "0.5957818", "0.5949255", "0.5939914", "0.59385586", "0.5935689", "0.5934352", "0.5928252", "0.59223443", "0.5914155", "0.5898163", "0.5886125", "0.58857256", "0.5883674", "0.5877861", "0.5865067", "0.585898", "0.58589494", "0.5840226", "0.5839142", "0.5836606", "0.5831817", "0.5830306", "0.58209187", "0.58123696", "0.580959", "0.5806359", "0.5803753", "0.5803309", "0.57888347", "0.5777021", "0.5777021", "0.57731724", "0.57710594", "0.5769901", "0.57627606" ]
0.81980276
0
Shorthand for a PluginOptions instance
Сокращение для экземпляра PluginOptions
function options_factory() { $locale = \Hbelv\Locale::create(); return \Hbelv\PluginOptions::create( $locale ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOptions()\n {\n if (null === $this->options) {\n $this->setOptions(new PluginOptions());\n }\n return $this->options;\n }", "public function setOptions(array $options = array())\n\t{\n\t\tif (isset($options['plugins'])) {\n\t\t\t$this->_options['plugins'] = $options['plugins'];\n\t\t}\n\t\treturn $this;\n\t}", "public function getPluginOptions()\n {\n if (!isset($this->pluginOptions['type'])) {\n $this->pluginOptions['type'] = $this->type;\n }\n return Json::encode($this->pluginOptions);\n }", "public function __construct($options = array())\n {\n if (isset($options['tplplugin'])) {\n $this->plugin = $options['tplplugin'];\n }\n }", "public function plugin_options() {\n\t\tinclude plugin_dir_path( dirname( __FILE__ ) ) . 'tmpl/options.php';\n\t}", "public function __construct( $options = array() ) {\n\n $this->plugin_directory = dirname(dirname(__FILE__)) . '/';\n\n if ( is_array( $options ) && ! empty( $options ) )\n $this->existing_options = $options;\n else\n $this->existing_options = array();\n }", "function init_options() {\n\t\t$this->options = new SF_Plugin_Options( 'socialflow', apply_filters( 'sf_init_options', $this->default_options ) );\n\t}", "function planmyday_vc_importer_set_options($options=array()) {\n\t\tif ( in_array('visual_composer', planmyday_storage_get('required_plugins')) && planmyday_exists_visual_composer() ) {\n\t\t\t// Add slugs to export options for this plugin\n\t\t\t$options['additional_options'][] = 'wpb_js_templates';\n\t\t}\n\t\treturn $options;\n\t}", "public function adminRenderPluginOptions() {\n }", "public function options(): array;", "public function options($opts)\n {\n }", "public function options();", "protected function options() { }", "protected function initPluginOptions()\n {\n if (!empty(Yii::$app->params['maskMoneyOptions'])) {\n $this->pluginOptions += Yii::$app->params['maskMoneyOptions'];\n } else {\n $this->setDefaultFormat('decimalSeparator', 'decimal');\n $this->setDefaultFormat('thousandSeparator', 'thousands');\n }\n }", "public function options(){}", "function planmyday_instagram_feed_importer_set_options($options=array()) {\n\t\tif ( in_array('instagram_feed', planmyday_storage_get('required_plugins')) && planmyday_exists_instagram_feed() ) {\n\t\t\t// Add slugs to export options for this plugin\n\t\t\t$options['additional_options'][] = 'sb_instagram_settings';\n\t\t}\n\t\treturn $options;\n\t}", "protected function getOptions() {}", "protected function getOptions() {}", "public function _getOptions($options)\n {\n }", "public function get_options()\n {\n if (count($this->plugin_options) == 0) {\n $this->plugin_options = get_option(CodesWholesaleConst::OPTIONS_NAME);\n }\n\n return $this->plugin_options;\n }", "function jardiwinery_booked_importer_set_options($options=array()) {\n\t\tif (in_array('booked', jardiwinery_storage_get('required_plugins')) && jardiwinery_exists_booked()) {\n\t\t\t$options['additional_options'][] = 'booked_%';\t\t// Add slugs to export options for this plugin\n\t\t}\n\t\treturn $options;\n\t}", "public static function getOptions() {}", "protected function defineOptions() {\n return [];\n }", "public function plugin_options($options)\n {\n foreach ($options as $key => $option) {\n add_option($key, $option);\n }\n }", "public function options()\n {\n\n }", "abstract protected static function getOptions();", "function get_options() {\n $opts = get_option($this->plugin_settings_key);\n $opts = empty($opts) ? array() : (array) $opts;\n\n // if we've introduced a new default key/value it'll show up.\n $opts = array_merge($this->plugin_default_opts, $opts);\n\n return $opts;\n }", "function get_options() {\n $opts = get_option($this->plugin_settings_key);\n $plugin_default_opts = $this->plugin_default_opts;\n $opts = empty($opts) ? $plugin_default_opts : (array) $opts;\n\n // could override cfg\n //$opts = array_merge($plugin_default_opts, $opts);\n // if we've introduced a new default key/value let's add it\n foreach ($plugin_default_opts as $setting_key => $default_value) {\n if (!isset($opts[$setting_key]) && isset($plugin_default_opts[$setting_key])) {\n $opts[$setting_key] = $default_value;\n }\n }\n\n return $opts;\n }", "public function options() {\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn [\n\t\t\t\n\t\t];\n\t}", "public function getOptions(){ }", "protected function getOptions()\n\t{\n\t\treturn [\n\t\t];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [\n\t\t];\n\t}", "public function get_options() {\n\t\t$opts = get_option( $this->plugin_slug );\n\n\t\treturn $opts;\n\t}", "protected function getOptions()\n\t{\n\t\treturn [\n\n\t\t];\n\t}", "protected function getOptions()\r\n {\r\n return [\r\n\r\n ];\r\n }", "public function getOptions() {}", "public function getOptions() {}", "public function getOptions() {}", "function get_opts( ) {\n\t\treturn $this->options;\n\t}", "protected function getOptions()\n {\n return [\n\n ];\n }", "protected function getOptions()\n {\n return [\n\n ];\n }", "protected function getOptions()\n {\n return [\n\n ];\n }", "protected function getOptions()\n {\n return [\n\n ];\n }", "protected function getOptions()\n {\n return [\n\n ];\n }", "protected function getOptions()\n {\n return [\n\n ];\n }", "protected function getOptions()\n {\n return [\n\n ];\n }", "protected function getOptions()\n {\n return [\n ];\n }", "protected function getOptions()\n {\n return [\n ];\n }", "protected function getOptions()\n {\n return [\n ];\n }", "protected function getOptions()\n {\n return [\n ];\n }", "protected function getOptions()\n {\n return [\n ];\n }", "protected function getOptions()\n {\n return [\n ];\n }", "protected function getOptions()\n {\n return [\n ];\n }", "protected function getOptions()\r\n {\r\n return [\r\n ];\r\n }", "protected function getOptions()\n {\n return [\n ['only', 'o', InputOption::VALUE_OPTIONAL, 'Types of plugins will be displayed.', null],\n ['direction', 'd', InputOption::VALUE_OPTIONAL, 'The direction of ordering.', 'asc'],\n ];\n }", "public function getOptions()\n {\n\n }", "protected function defineOptions() {\n $options = parent::defineOptions();\n $options['flag_id'] = array('default' => 'like');\n\n return $options;\n }", "abstract public function getOptions();", "function getOptions() {}", "public function options() {\n return array();\n }", "function options_init() {\n return array();\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();", "public function getOptions();", "function set_options($opts = array(), $override = 0) {\n if (!$override) {\n $old_opts = $this->get_options();\n $opts = array_merge($old_opts, $opts);\n }\n\n update_option($this->plugin_settings_key, $opts);\n\n return $opts;\n }", "function set_options($opts = array(), $override = 0) {\n if (!$override) {\n $old_opts = $this->get_options();\n $opts = array_merge($old_opts, $opts);\n }\n\n update_option($this->plugin_settings_key, $opts);\n\n return $opts;\n }", "function set_opts( $options ) {\n\t\t$this->options = array_merge( $this->options, $options );\n\t}", "protected function createOptions()\n {\n $isPng = ($this->getMimeTypeOfSource() == 'image/png');\n\n $this->options2 = new Options();\n $this->options2->addOptions(\n new IntegerOption('alpha-quality', 85, 0, 100),\n new BooleanOption('auto-filter', false),\n new IntegerOption('default-quality', ($isPng ? 85 : 75), 0, 100),\n new StringOption('encoding', 'auto', ['lossy', 'lossless', 'auto']),\n new BooleanOption('low-memory', false),\n new BooleanOption('log-call-arguments', false),\n new IntegerOption('max-quality', 85, 0, 100),\n new MetadataOption('metadata', 'none'),\n new IntegerOption('method', 6, 0, 6),\n new IntegerOption('near-lossless', 60, 0, 100),\n new StringOption('preset', 'none', ['none', 'default', 'photo', 'picture', 'drawing', 'icon', 'text']),\n new QualityOption('quality', ($isPng ? 85 : 'auto')),\n new IntegerOrNullOption('size-in-percentage', null, 0, 100),\n new BooleanOption('skip', false),\n new BooleanOption('use-nice', false),\n new ArrayOption('jpeg', []),\n new ArrayOption('png', [])\n );\n }", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "public function __construct($options);", "public function options($assoc = false);", "public function isOptions(){ }", "function planmyday_woocommerce_importer_set_options($options=array()) {\n\t\tif ( in_array('woocommerce', planmyday_storage_get('required_plugins')) && planmyday_exists_woocommerce() ) {\n\t\t\tif (is_array($options['files']) && count($options['files']) > 0) {\n\t\t\t\tforeach ($options['files'] as $k => $v) {\n\t\t\t\t\t$options['files'][$k]['file_with_woocommerce'] = str_replace('name.ext', 'woocommerce.txt', $v['file_with_']);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Add slugs to export options for this plugin\n\t\t\t$options['additional_options'][]\t= 'shop_%';\n\t\t\t$options['additional_options'][]\t= 'woocommerce_%';\n\t\t}\n\t\treturn $options;\n\t}", "private function options()\n {\n $options['pusher_scheme'] = ($this->config->item('pusher_scheme')) ?: NULL;\n $options['pusher_host'] = ($this->config->item('pusher_host')) ?: NULL;\n $options['pusher_port'] = ($this->config->item('pusher_port')) ?: NULL;\n $options['pusher_timeout'] = ($this->config->item('pusher_timeout')) ?: NULL;\n $options['pusher_encrypted'] = ($this->config->item('pusher_encrypted')) ?: NULL;\n\n $options = array_filter($options);\n\n return $options;\n }", "public static function iyzicoOptions()\n {\n $options = new Options();\n $options->setApiKey(config(\"kasiyer.key\"));\n $options->setSecretKey(config(\"kasiyer.secret\"));\n $options->setBaseUrl(config(\"kasiyer.base_url\"));\n\n return $options;\n }", "public function registerPluginOptions()\n {\n register_setting(\n self::OPTION_GROUP,\n self::OPTION_GROUP,\n array( $this, 'validate_settings' )\n );\n add_settings_section(\n self::SECTION_ID,\n __( 'Main settings', MENU_SLUG ),\n function() {},\n self::MENU_SLUG\n );\n $options = get_option( self::OPTION_GROUP );\n add_settings_field(\n self::FORM_URL_ID,\n __( 'Fanpage name', MENU_SLUG ),\n array( $this, 'renderInputField' ),\n self::MENU_SLUG,\n self::SECTION_ID,\n array(\n 'name' => self::FORM_URL_ID,\n 'value' => isset( $options[self::FORM_URL_ID] ) ? $options[self::FORM_URL_ID] : ''\n )\n );\n }", "public function getPluginConfiguration();", "public function getPluginConfiguration();", "public function options(array $options)\n {\n return $this->withMeta(['options' => $options]);\n }", "public function options(array $options)\n {\n return $this->withMeta(['options' => $options]);\n }", "protected function getOptions()\n\t{\n\t\treturn array(\n\n\t\t);\n\t}", "public function createOptions()\n {\n // default options\n $options = [\n 'hierarchical' => true,\n 'show_in_rest' => true,\n 'show_admin_column' => true,\n 'rewrite' => [\n 'slug' => $this->slug,\n ],\n ];\n // replace defaults with the options passed\n $options = array_replace_recursive($options, $this->options);\n // create and set labels\n if (!isset($options['labels'])) {\n $options['labels'] = $this->createLabels();\n }\n return $options;\n }", "function InitOptions() {\r\n $this->options['uninstall'] = 0;\r\n $this->options['allow_user_pass'] = 0;\r\n $this->options['login_redirect'] = array('subscriber' => '', 'contributor' => '', 'author' => '', 'editor' => '', 'administrator' => '');\r\n $this->options['login_text'] = __('Log In', 'simpelogin');\r\n $this->options['register_text'] = __('Register', 'simpelogin');\r\n $this->options['register_msg'] = __('A password will be e-mailed to you.', 'simpelogin');\r\n $this->options['register_complete'] = __('Registration complete. Please check your e-mail.', 'simpelogin');\r\n $this->options['password_text'] = __('Lost Password', 'simpelogin');\r\n $this->options['password_msg'] = __('Please enter your username or e-mail address. You will receive a new password via e-mail.', 'simpelogin');\r\n $this->options['show_gravatar'] = 1;\r\n $this->options['gravatar_size'] = 50;\r\n $this->options['dashboard_link'] = array('subscriber' => 1, 'contributor' => 1, 'author' => 1, 'editor' => 1, 'administrator' => 1);\r\n $this->options['dashboard_url'] = '';\r\n $this->options['profile_link'] = array('subscriber' => 1, 'contributor' => 1, 'author' => 1, 'editor' => 1, 'administrator' => 1);\r\n $this->options['profile_url'] = '';\r\n $this->options['custom_mail_from'] = get_option('admin_email');\r\n $this->options['custom_mail_from_name'] = get_option('blogname');\r\n }" ]
[ "0.71432", "0.6928967", "0.68378", "0.6683223", "0.6656692", "0.65983945", "0.6566201", "0.65459883", "0.64903635", "0.6405907", "0.6403191", "0.6393814", "0.6376045", "0.63648295", "0.63514626", "0.6328065", "0.62826973", "0.62826973", "0.6238631", "0.6192847", "0.6189876", "0.6172063", "0.6150622", "0.61401236", "0.61353236", "0.610136", "0.60942745", "0.60774463", "0.607061", "0.6065536", "0.60574967", "0.6057166", "0.6057166", "0.6050466", "0.60402036", "0.6034046", "0.6016658", "0.6016658", "0.6016324", "0.6006265", "0.60015553", "0.60015553", "0.60015553", "0.60015553", "0.60015553", "0.60015553", "0.60015553", "0.59870726", "0.59870726", "0.59870726", "0.59870726", "0.59870726", "0.59870726", "0.59870726", "0.5986261", "0.59853137", "0.5978236", "0.5977661", "0.59756047", "0.5957485", "0.59288955", "0.5919975", "0.5913981", "0.5913981", "0.5913981", "0.5913981", "0.5913981", "0.5913981", "0.5913981", "0.5913981", "0.5913981", "0.5913981", "0.5913981", "0.5913981", "0.5913981", "0.5913981", "0.5913981", "0.5913981", "0.5913981", "0.5908346", "0.5908346", "0.58911407", "0.5885131", "0.58756846", "0.58756846", "0.58756846", "0.58709115", "0.5870522", "0.58655655", "0.58516836", "0.58480775", "0.58429354", "0.58402735", "0.5838277", "0.5838277", "0.58363974", "0.58363974", "0.5834338", "0.58320683", "0.5830721" ]
0.73223245
0
/ Show a page $page = the shimmie page object $wiki_page = the wiki page, has >title and >body $nav_page = a wiki page object with navigation, has >body
Показать страницу $page = страница shimmie, $wiki_page = страница вики, имеет >title и >body $nav_page = объект страницы вики с навигацией, имеет >body
public function display_page(Page $page, WikiPage $wiki_page, $nav_page) { // $nav_page = WikiPage or null if(is_null($nav_page)) { $nav_page = new WikiPage(); $nav_page->body = ""; } $tfe = new TextFormattingEvent($nav_page->body); send_event($tfe); // only the admin can edit the sidebar global $user; if($user->is_admin()) { $tfe->formatted .= "<p>(<a href='".make_link("wiki/wiki:sidebar", "edit=on")."'>Edit</a>)"; } $page->set_title(html_escape($wiki_page->title)); $page->set_heading(html_escape($wiki_page->title)); if($tfe->formatted){ $page->add_block(new Block("Wiki Index", $tfe->formatted, "left", 10)); } $this->display_nav(); $page->add_block(new Block(html_escape($wiki_page->title), $this->create_display_html($wiki_page), "main", 10)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show (Page $page)\n {\n //\n }", "public function show(Page $page)\n {\n //\n }", "public function show(Page $page)\n {\n //\n }", "public function show(Page $page)\n {\n //\n }", "public function show(Page $page)\n {\n //\n }", "public function show(Page $page)\n {\n //\n }", "public function show(Page $page)\n {\n //\n }", "public function show(Page $page)\n {\n //\n }", "function page()\n{\n $o = preg_match('/^\\/s-([a-zA-Z0-9_]+)+-([\\d]+)$/', $_SERVER['REQUEST_URI'], $neededVariables);\n $url = $neededVariables[1];\n $id = $neededVariables[2];\n\n\t\t$view = new View();\n\t\t$view->set('content', $this -> index->page($url, $id)); // CONTENT OF PAGE TO SHOW \n\t\t\t$checkStatus = $view -> get('content');\n\t\t\tif($checkStatus['status'] === 'error404')\n\t\t\t{\n\t\t\t\theader(\"HTTP/1.0 404 Not Found\");\n\t\t\t\t$er404 = new View();\n\t\t\t\t$er404 -> set('all', $this -> index->all());\n\t\t\t\t$er404 -> main_part = $view -> render2('error404');\n\t\t\t\t$er404 -> render('layouts/layout');\t\n\t\t\t\texit;\t\t\t\n\t\t\t}\n\t\t$view->set('all', $this -> index->all());\n\t\t$view -> main_part = $view -> render2('page_content');\n\t\t$view -> meta_tags = $view -> render2('meta_tags');\n\t\t$view -> render('layouts/layout');\n\t\n}", "public function show(Page $page) {\n//\n }", "protected function show($page)\n {\n return $this->page_factory->show($page);\n }", "public function page();", "public function page();", "public static function page($page)\n {\n\tif ($page == \"maps\")\n\t{\n\t objects::maps();\n\t}\n\telseif ($page == \"units\")\n\t{\n\t objects::units();\n\t}\n\telseif ($page == \"guides\")\n\t{\n\t objects::guides();\n\t}\n\telseif ($page == \"replays\")\n\t{\n\t objects::replays();\n\t}\n\telseif ($page == \"edit_item\")\n\t{\n\t objects::edit();\n\t}\n\telseif ($page == \"dynamic\")\n\t{\n\t objects::dynamic();\n\t}\n\telseif ($page == \"detail\")\n\t{\n\t objects::detail();\n\t}\n\telseif ($page == \"search\")\n\t{\n\t\tobjects::search();\n\t}\n\telseif ($page == \"members\")\n\t{\n\t $result = db::executeQuery(\"SELECT * FROM users ORDER BY register_date ASC\");\n\t if (db::num_rows($result) > 0)\n\t {\n\t\techo \"<div class='sidemenu'><ul><li>Members (\".db::num_rows($result).\"):</li></ul></div>\";\n\t \t$data = array();\n\t\tarray_push($data,\"#\",\"Username\",\"Joined\",\"Message\");\n\t\twhile ($row = db::nextRowFromQuery($result))\n\t\t{\n\t\t $avatar = misc::avatar($row[\"uid\"]);\n\t\t $sendpm = \"<a href='?p=mail&m=compose&to=\".$row[\"uid\"].\"'>Send a PM</a>\";\n\t\t if ($row[\"uid\"] == user::uid())\n\t\t\t$sendpm = \"This is you!\";\n\t\t array_push($data,\"<a href='?profile=\".$row[\"uid\"].\"'><img src='\".$avatar.\"' style='max-width:50px;'></a>\",\"<a href='?profile=\".$row[\"uid\"].\"'>\".$row[\"login\"].\"</a>\", date(\"D M j, Y g:i a\", mail::convert_timestamp($row[\"register_date\"])), $sendpm);\n\t\t}\n\t\techo content::create_dynamic_list($data,4,\"members\",10,true,true);\n\t }\n\t}\n\telseif ($page == \"mail\")\n\t{\n\t mail::mbox();\n\t}\n\telseif ($page == \"gallery\")\n\t{\n\t objects::gallery();\n\t}\n }", "public function action_show()\n {\n //\n $page = $this->section->pages->where('name', '=', $this->request->param('page_name'))\n ->find();\n \n $page_url = '/' . $this->section->name . \"/$page->name\";\n\n $this->menu->set_current($page_url);\n $this->top_menu->set_current('/' . $this->section->name);\n\n Breadcrumbs::add(Breadcrumb::factory()->set_title($page->title ? $page->title : 'Страница не переведена'));\n\n $this->template->title = $page->title;\n\n $this->view_data['page'] = $page;\n }", "function Page() // display actual page\n\t{\t$this->HTMLHeader();\n\t\t$this->DisplayTitle();\n\t\techo \"<body>\\n\";\n\t\t$this->AKMembersBody();\n\t\techo \"</body>\\n</html>\\n\";\n\t}", "function socialwiki_print_page_content($page, $context, $swid) {\n global $PAGE, $USER, $SESSION;\n\n // Only increment page view when linked, not refreshed.\n $pagerefreshed = (null !== filter_input(INPUT_SERVER, 'HTTP_CACHE_CONTROL'))\n && filter_input(INPUT_SERVER, 'HTTP_CACHE_CONTROL') === 'max-age=0';\n if (!$pagerefreshed) {\n socialwiki_increment_pageviews($page);\n socialwiki_increment_user_views($USER->id, $page->id);\n }\n\n $content = socialwiki_parse_content(\n $page->format, $page->content, array('swid' => $swid, 'pageid' => $page->id, 'navi' => $SESSION->mod_socialwiki->navi));\n $html = file_rewrite_pluginfile_urls($content['parsed_text'], 'pluginfile.php',\n $context->id, 'mod_socialwiki', 'attachments', $swid);\n $wikioutput = $PAGE->get_renderer('mod_socialwiki');\n // This is where the page content, from the title down, is rendered!\n return $wikioutput->viewing_area(\n $content['toc'] . format_text($html, FORMAT_MOODLE, array('overflowdiv' => true, 'allowid' => true)), $page);\n}", "public function action_show()\n {\n $id = $this->request->param('id');\n $uri = $this->request->param('uri');\n\n $page = new Model_Page($id);\n\n if (!$page->id || $page->status == Model_Page::STATUS_REMOVED_PAGE) {\n throw new HTTP_Exception_404();\n }\n\n if ($uri != $page->uri) {\n $this->redirect('/p/' . $page->id . '/' . $page->uri);\n }\n\n $page->stats->hit();\n $page->views += 1;\n\n $page->children = $page->getChildrenPages();\n $page->comments = $page->getComments();\n\n $this->view['page'] = $page;\n\n $this->title = $page->title;\n $this->view['isWide'] = $page->type == Model_Page::EVENT || !$page->type == Model_Page::COMMUNITY && count($page->blocks) > self::BLOCKS_TO_WIDE;\n\n if ($this->view['isWide']) {\n $this->template->contentOnly = true;\n }\n\n if ($page->type == Model_Page::COMMUNITY) {\n $community_events = self::communityEvents($page->children);\n $total_events = count($community_events);\n $events_promo = self::communityEventsPromo($community_events);\n $list = $this->request->param('list') ?: self::LIST_PAGES;\n\n switch ($list) {\n\n case self::LIST_EVENTS:\n $communityFeed = array_reverse($community_events, false);\n break;\n\n case self::LIST_PAGES:\n $communityFeed = array_reverse($page->children, false);\n break;\n\n default:\n $communityFeed = [];\n break;\n }\n\n $this->template->aside = View::factory('templates/components/community_aside', ['page' => $page]);\n $this->template->content = View::factory('templates/pages/community_page', [\n 'page' => $page,\n 'events' => $events_promo,\n 'total_events' => $total_events,\n 'pages' => $communityFeed,\n 'list' => $list\n ]);\n } else {\n $this->template->content = View::factory('templates/pages/page', $this->view);\n }\n }", "public function page($page='g'){\n\t\t\t$this->load->helper('url');\n\t\t\t\n\t\t\t//Verifica si se encuentra el archivo\n\t\t\t if ( ! file_exists(APPPATH.'/views/'.$page.'.php'))\n\t\t\t{\n // Whoops, we don't have a page for that!\n show_404();\n\t\t\t}\n\t\t\t\t//Carga el header para todos, pero hay que hagregarlo o imprimirlo en cada pagina individual\n\t\t\t\t$data['head'] = $this->load->view('header','',TRUE);\n\t\t\t\t$this->load->view($page,$data);\n\t\t\t\n\t\t}", "public function show(Page $page)\n {\n dd($page);\n }", "public function show($page)\n\t{\n if($page == \"index\") {\n return view('index')->with('html_info', session('html_info'));\n }\n\t}", "public function showPage() {\n\t\t\t\t\n\t\t\techo \"<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0\n\t\t\t\tStrict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> \n\t\t <html xmlns='http://www.w3.org/1999/xhtml'> \n\t\t\t\t<head> \n\t\t\t\t<title>$this->title</title>\n\t\t\t\t<link href='style.css' rel='stylesheet' type='text/css'>\n\t\t\t <meta http-equiv='content-type' content='text/html; charset=utf-8' /> \n\t\t\t </head> <body>\n\t\t\t\t<div class = 'container'><div class = 'header'>\n\t\t\t <h1 class = 'Page31'>Page 31</h1></div>\n\t\t\t <div class = 'content'>\n\t\t\t $this->body<div class = 'divfelinloggning'>\n\t\t\t $this->message </div></div>\n\t\t\t <div class = 'footer'>\n\t\t\t\t<p class = 'ansvarig'> Responsible for the website : Måns Schütz</p>\n\t\t\t\t</div></div></body></html>\";\n\t\t}", "public function page($username){\n \tif ($this->checkUsername($username)) {\n \t\t$page_title = \"Pages\";\n \treturn view('partners.page')->with([\n \t\t'logged_user' => $this->logged_user,\n \t\t'page_title' => $page_title\n \t\t]);\n \t}else{\n \t\treturn $this->logoutUser();\n \t}\n \t\n }", "public function pageAction($page) {\r\n $page = Url::adjustLeft($page);\r\n return $this->view->renderLayout(\r\n 'main',\r\n ['layout' => 'main', 'page' => $page]\r\n );\r\n }", "public function page($slug = FALSE){\n\t\t\n\t\t//To save duplicate pages, redirect to / when no slug\n\t\tif($this->uri->uri_string() == \"page\" && $slug == FALSE){\n\t\t\tredirect(base_url(),'refresh');\n\t\t}\n\t\t\n\t\t//Is this page being redirected?\n\t\t$redirect = $this->Redirect->fetch_redirect(FALSE,$slug,'comic');\n\t\tif($redirect){\n\t\t\tredirect(base_url() . 'page/' . $redirect->redirect,'location',301);\n\t\t}\n\t\t\n\t\t$filters = array();\n\t\t\n\t\t//Set page filters\n\t\t$filters['verified'] = TRUE;\n\t\tif(!$this->ion_auth->logged_in()){ //Site visitor\n\t\t\t$nav_flag = TRUE;\n\t\t} else { //Admin user logged in, bypasses need for page to be published for preview purposes\n\t\t\t$nav_flag = FALSE; //We use this to represent whether the \"verified\" flag is set in nav formation otherwise it throws a wobbly\n\t\t}\n\t\t\n\t\t//Pass slug to page filters\n\t\tif($slug != FALSE){\n\t\t\t$filters['slug'] = $slug;\n\t\t}\n\t\t\n\t\t//Get the page - file required\n\t\t$this->data['page'] = $this->Comic->fetch_page($filters);\n\t\t\n\t\t//No page = 404\n\t\tif($this->data['page'] == FALSE){\n\t\t\t$this->page_not_found();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//Title\n\t\tif($slug != FALSE){\n\t\t\t$this->data['title'] = $this->data['page']->name;\n\t\t}\n\t\t\n\t\t//Fetch user settings, page links for navigation\n\t\t$this->data['nav_config'] \t= $this->navigation;\n\t\t$this->data['nav'] \t\t\t= $this->Comic->fetch_pages_nav(FALSE,$this->data['page']->slug,$nav_flag,TRUE);\n\t\t\n\t\t//Is an admin logged in? Then we're previewing everything\n\t\t$this->data['nav']['preview'] = FALSE;\n\t\tif($nav_flag == FALSE){\n\t\t\t$this->data['nav']['preview'] = TRUE;\n\t\t}\n\t\t\n\t\t//Grab all the tags\n\t\t$this->data['tags'] = $this->Tags->fetch_page_tags_collated($this->data['page']->comicid);\n\t\t\n\t\t//If chapters, get current chapter\n\t\tif($this->data['page']->chapterid){\n\t\t\t$chapter = $this->Chapters->fetch_chapter($filters = array('chapterid' => $this->data['page']->chapterid));\n\t\t\tif($chapter){\n\t\t\t\t$this->data['current_chapter'] \t\t\t= $chapter->name;\n\t\t\t\t$this->data['current_chapter_blurb'] \t= $chapter->description;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Meta\n\t\t$this->data['meta'] = array('url' => base_url(uri_string()));\n\t\tif(!isset($this->data['title'])){\n\t\t\t$this->data['meta']['title']\t\t= $this->data['site']['site_name'];\n\t\t\t$this->data['meta']['description']\t= $this->data['site']['site_slogan'];\n\t\t\tif($this->data['banners']){\n\t\t\t\t$this->data['meta']['image'] = base_url() . 'assets/banners/' . $this->data['banners'][array_rand($this->data['banners'],1)]->filename;\n\t\t\t} else {\n\t\t\t\t$this->data['meta']['image'] = base_url() . 'assets/pages/' . $this->data['page']->filename;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->data['meta']['title']\t\t= $this->data['title'] . ' | ' . $this->data['site']['site_name'];\n\t\t\t$this->data['meta']['description']\t= $this->data['page']->excerpt;\n\t\t\t$this->data['meta']['image']\t\t= base_url() . 'assets/pages/' . $this->data['page']->filename;\n\t\t}\n\t\t$this->data['meta'] = array_filter($this->data['meta']);\n\n\t\t//Log page view\n\t\tif(!$this->ion_auth->logged_in() && $this->router->fetch_method() != \"index\"){\n\t\t\t$url = '/' . $this->router->fetch_method() . '/' . $slug;\n\t\t\t$this->Logging->page_count_update($url,$type = \"page\");\n\t\t}\n\t\t\n\t\t//DEBUG\n\t\t//print_r($this->data['nav']);\n\t\t//print_r($page);\n\t\t//print_r($this->data['site']);\n\t\t\n\t\t//Serve up the view\n\t\t$this->_render_page_view('pages',$this->data);\n\t\t\n\t\t//End!\n\t\treturn;\n\t\t\n\t}", "abstract function output_page_item( $page );", "public function display_page(Page $page) {\n\t\tglobal $config;\n\n\t\t$theme_name = $config->get_string('theme', 'default');\n\t\t$data_href = get_base_href();\n\t\t$contact_link = $config->get_string('contact_link');\n\n\t\t$headers_html = \"\";\n\t\tksort($page->headers);\n\t\tforeach($page->headers as $line) {\n\t\t\t$headers_html .= \"\\t\\t$line\\n\";\n\t\t}\n\n\t\t$left_block_html = \"\";\n\t\t$user_block_html = \"\";\n\t\t$main_block_html = \"\";\n\t\t$subheading_block_html = \"\";\n\t\t$ads_block_html = \"\";\n\t\t\n\t\tforeach($page->blocks as $block) {\n\t\t\tswitch($block->section) {\n\t\t\t\tcase \"left\":\n\t\t\t\t\t$left_block_html .= $this->block_to_html($block, true);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"user\":\n\t\t\t\t\t$user_block_html .= $block->body; // $this->block_to_html($block, true);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"main\":\n\t\t\t\t\tif($block->header == \"Images\") {\n\t\t\t\t\t\t$block->header = \"&nbsp;\";\n\t\t\t\t\t}\n\t\t\t\t\t$main_block_html .= $this->block_to_html($block, false);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"subheading\":\n\t\t\t\t\t$subheading_block_html .= $this->block_to_html($block, false);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"ads\":\n\t\t\t\t\t$ads_block_html .= $this->block_to_html($block, false);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tprint \"<p>error: {$block->header} using an unknown section ({$block->section})\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$site_name = $config->get_string('site_title'); // bzchan: change from normal default to get title for top of page\n\t\t$main_page = $config->get_string('main_page'); // bzchan: change from normal default to get main page for top of page\n\t\t\n\t\t// hack\n\t\tglobal $user;\n\t\t$username = url_escape($user->name);\n\t\t$user_id= int_escape($user->id);\n\t\t\n\t\t// bzchan: CUSTOM LINKS are prepared here, change these to whatever you like\n\t\t$custom_links = \"\";\n\t\tif(!$user->is_anon()){\n\t\t\t$custom_links .= \"<li><a href='\".make_link('account/profile/'.$username).\"'><span>My Account</span></a></li>\";\n\t\t}\n\t\t$custom_links .= \"<li><a href='\".make_link('post/list').\"'><span>Posts</span></a></li>\";\n\t\t$custom_links .= \"<li><a href='\".make_link('comment/list').\"'><span>Comments</span></a></li>\";\n\t\t$custom_links .= \"<li><a href='\".make_link('note/list').\"'><span>Notes</span></a></li>\";\n\t\t$custom_links .= \"<li><a href='\".make_link('artist/list').\"'><span>Artists</span></a></li>\";\n\t\t$custom_links .= \"<li><a href='\".make_link('tags').\"'><span>Tags</span></a></li>\";\n\t\t$custom_links .= \"<li><a href='\".make_link('pool/list').\"'><span>Pools</span></a></li>\";\n\t\t$custom_links .= \"<li><a href='\".make_link('wiki').\"'><span>Wiki</span></a></li>\";\n\t\t$custom_links .= \"<li><a href='\".make_link('forum').\"'><span>Forum</span></a></li>\";\n\n\t\t$custom_sublinks = \"\";\n\t\t// hack\n\t\t$qp = _get_query_parts();\n\t\t// php sucks\n\t\tswitch($qp[0]) {\n\t\t\tdefault:\n\t\t\t\t$custom_sublinks .= $user_block_html;\n\t\t\t\tbreak;\n\t\t\tcase \"account\":\n\t\t\t\tif(!$user->is_anon()){\n\t\t\t\t\t$custom_sublinks .= \"<li><a href='\".make_link(\"post/list/favorited_by=$username/1\").\"'><span>Favorites</span></a></li>\";\n\t\t\t\t\t$custom_sublinks .= \"<li><a href='\".make_link(\"account/messages\").\"'><span>Messages</span></a></li>\";\n\t\t\t\t\t$custom_sublinks .= \"<li><a href='\".make_link(\"account/logout\").\"'><span>Logout</span></a></li>\";\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"post\":\n\t\t\t\t$custom_sublinks .= \"<li><a href='\".make_link(\"post/list\").\"'><span>All</span></a></li>\";\n\t\t\t\t$custom_sublinks .= \"<li><a href='\".make_link(\"upload\").\"'><span>Upload</span></a></li>\";\n\t\t\t\tif(!$user->is_anon()){\n\t\t\t\t\t$custom_sublinks .= \"<li><a href='\".make_link(\"post/list/favorited_by=$username/1\").\"'><span>Favorites</span></a></li>\";\n\t\t\t\t}\n\t\t\t\t$custom_sublinks .= \"<li><a href='\".make_link(\"post/popular\").\"'><span>Popular</span></a></li>\";\n\t\t\t\t$custom_sublinks .= \"<li><a href='\".make_link(\"wiki/Help:posts\").\"'><span>Help</span></a></li>\";\n\t\t\t\tbreak;\n\t\t\tcase \"journals\":\n\t\t\t\t$custom_sublinks .= \"<li><a href='\".make_link(\"journals/list\").\"'><span>All</span></a></li>\";\n\t\t\t\t$custom_sublinks .= \"<li><a href='\".make_link(\"journals/new\").\"'><span>New</span></a></li>\";\n\t\t\t\t$custom_sublinks .= \"<li><a href='\".make_link(\"journals/user/$username/1\").\"'><span>My Journals</span></a></li>\";\n\t\t\t\t$custom_sublinks .= \"<li><a href='\".make_link(\"wiki/Help:journals\").\"'><span>Help</span></a></li>\";\n\t\t\t\tbreak;\n\t\t\tcase \"comment\":\n\t\t\t\t$custom_sublinks .= \"<li><a href='\".make_link(\"comment/list\").\"'><span>All</span></a></li>\";\n\t\t\t\t$custom_sublinks .= \"<li><a href='\".make_link(\"wiki/Help:comments\").\"'><span>Help</span></a></li>\";\n\t\t\t\tbreak;\n\t\t\tcase \"forum\":\n\t\t\t\t$custom_sublinks .= \"<li><a href='\".make_link(\"forum/new\").\"'><span>New topic</span></a></li>\";\n\t\t\t\t$custom_sublinks .= \"<li><a href='\".make_link(\"wiki/Help:forum\").\"'><span>Help</span></a></li>\";\n\t\t\t\tbreak;\n\t\t\tcase \"upload\":\n\t\t\t\t$custom_sublinks .= \"<li><a href='\".make_link(\"post/list\").\"'><span>All</span></a></li>\";\n\t\t\t\t$custom_sublinks .= \"<li><a href='\".make_link(\"post/list/poster=$username/1\").\"'><span>My Posts</span></a></li>\";\n\t\t\t\t$custom_sublinks .= \"<li><a href='\".make_link(\"post/list/favorited_by=$username/1\").\"'><span>My Favorites</span></a></li>\";\n\t\t\t\t$custom_sublinks .= \"<li><a href='\".make_link(\"wiki/Help:upload\").\"'><span>Help</span></a></li>\";\n\t\t\t\tbreak;\n\t\t\tcase \"wiki\":\n\t\t\t\t$custom_sublinks .= \"<li><a href='\".make_link(\"wiki\").\"'><span>Index</a></span></li>\";\n\t\t\t\t$custom_sublinks .= \"<li><a href='\".make_link(\"wiki/rules\").\"'><span>Rules</a></span></li>\";\n\t\t\t\t$custom_sublinks .= \"<li><a href='\".make_link(\"wiki/Help:wiki\").\"'><span>Help</a></span></li>\";\n\t\t\t\tbreak;\n\t\t\tcase \"wiki_admin\":\n\t\t\t\t$custom_sublinks .= \"<li><a href='\".make_link(\"wiki\").\"'><span>Index</a></span></li>\";\n\t\t\t\t$custom_sublinks .= \"<li><a href='\".make_link(\"wiki/rules\").\"'><span>Rules</a></span></li>\";\n\t\t\t\t$custom_sublinks .= \"<li><a href='\".make_link(\"wiki/Help:wiki\").\"'><span>Help</a></span></li>\";\n\t\t\t\tbreak;\n\t\t\tcase \"artist\":\n\t\t\t\t$custom_sublinks .= \"<li><a href='\".make_link(\"artist/list\").\"'><span>List</span></a></li>\";\n\t\t\t\t$custom_sublinks .= \"<li><a href='\".make_link(\"artist/new\").\"'><span>New</span></a></li>\";\n\t\t\t\tbreak;\n\t\t\tcase \"tags\":\n\t\t\t\t$custom_sublinks .= \"<li><a href='\".make_link(\"tags/map\").\"'><span>Map</span></a></li>\";\n\t\t\t\t$custom_sublinks .= \"<li><a href='\".make_link(\"tags/alphabetic\").\"'><span>Alphabetic</span></a></li>\";\n\t\t\t\t$custom_sublinks .= \"<li><a href='\".make_link(\"tags/popularity\").\"'><span>Popularity</span></a></li>\";\n\t\t\t\t$custom_sublinks .= \"<li><a href='\".make_link(\"tags/categories\").\"'><span>Categories</span></a></li>\";\n\t\t\t\t$custom_sublinks .= \"<li><a href='\".make_link(\"tags/alias\").\"'><span>Aliases</span></a></li>\";\n\t\t\t\t$custom_sublinks .= \"<li><a href='\".make_link(\"wiki/Help:tags\").\"'><span>Help</span></a></li>\";\n\t\t\t\tbreak;\n\t\t\tcase \"advertisement\":\n\t\t\t\t$custom_sublinks .= \"<li><a href='\".make_link(\"advertisement/list\").\"'><span>List</span></a></li>\";\n\t\t\t\t$custom_sublinks .= \"<li><a href='\".make_link(\"advertisement/new\").\"'><span>New Advertisement</span></a></li>\";\n\t\t\t\t$custom_sublinks .= \"<li><a href='\".make_link(\"wiki/advertisement\").\"'><span>Help</span></a></li>\";\n\t\t\t\tbreak;\n\t\t\tcase \"note\":\n\t\t\t\t$custom_sublinks .= \"<li><a href='\".make_link(\"note/list\").\"'><span>List</span></a></li>\";\n\t\t\t\t$custom_sublinks .= \"<li><a href='\".make_link(\"note/search\").\"'><span>Search</span></a></li>\";\n\t\t\t\t$custom_sublinks .= \"<li><a href='\".make_link(\"note/requests\").\"'><span>Requests</span></a></li>\";\n\t\t\t\t$custom_sublinks .= \"<li><a href='\".make_link(\"note/updated\").\"'><span>Recent Changes</span></a></li>\";\n\t\t\t\t$custom_sublinks .= \"<li><a href='\".make_link(\"wiki/Help:note\").\"'><span>Help</span></a></li>\";\n\t\t\t\tbreak;\n\t\t\tcase \"pool\":\n\t\t\t\t$custom_sublinks .= \"<li><a href='\".make_link(\"pool/list\").\"'><span>List</span></a></li>\";\n\t\t\t\t$custom_sublinks .= \"<li><a href='\".make_link(\"pool/new\").\"'><span>New</span></a></li>\";\n\t\t\t\t$custom_sublinks .= \"<li><a href='\".make_link(\"pool/updated\").\"'><span>Recent Changes</span></a></li>\";\n\t\t\t\t$custom_sublinks .= \"<li><a href='\".make_link(\"wiki/Help:pool\").\"'><span>Help</span></a></li>\";\n\t\t\t\tbreak;\n\t\t}\n\n\t\t$debug = get_debug_info();\n\n\t\t$contact = empty($contact_link) ? \"\" : \"<br><a href='$contact_link'>Contact</a>\";\n\n\t\t$wrapper = \"\";\n\t\tif(strlen($page->heading) > 100) {\n\t\t\t$wrapper = ' style=\"height: 3em; overflow: auto;\"';\n\t\t}\n\t\t\n\t\t$copy_date = date(\"Y\");\n\n\t\tprint <<<EOD\n<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\">\n<html>\n\t<head>\n\t\t<title>{$page->title}</title>\n\t\t<meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\">\n\t\t<link rel=\"stylesheet\" href=\"$data_href/themes/$theme_name/style.css\" type=\"text/css\">\n\t\t$headers_html\n\t\t<link href=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJVJREFUeNpi/P//PwMlgImBQsCCzGFkZGQwMTEBO+nMmTOMyHLI4siuZkFXtFaTGcwOZjD5DzMEXRxkF9FeQNZMchigaw6+/hfDa3gNIKQZrwHEaAYHPHKIAmPh/yk/XQxFZpsuMyAHHLIenC6AagIDqKH/SQ5EYgwhFI2MhAwhJimjGEIoEJFtQA/1/1j1DHhuBAgwAHTlT2dZrEDHAAAAAElFTkSuQmCC\" rel=\"icon\" type=\"image/x-icon\" />\n\t</head>\n\n\t<body>\n\n\t<!-- Header Starts -->\n\t<div id=\"header\">\n\t\t<h1 id=\"logo\">\n\t\t</h1>\n\t</div>\n\t<!-- Header Ends -->\n\t\n\t<!-- Nav Starts -->\n\t<div id=\"nav\">\n\t\t<ul>\n\t\t\t$custom_links\n\t\t</ul>\n\t</div>\n\t<!-- Nav Ends -->\n\t\n\t<!-- Nav Starts -->\n\t<div id=\"sub-nav\">\n\t\t<ul>\n\t\t\t$custom_sublinks\n\t\t</ul>\n\t</div>\n\t<!-- Nav Ends -->\n\t\n\t<div id=\"subheading\">\n\t</div>\n\t\t\n\t<div id=\"page\">\n\t\t<div id=\"sidebar\">\n\t\t\t$left_block_html\n\t\t</div>\n\t\t<div id=\"content\">\n\t\t\t$main_block_html\n\t\t</div>\n\t</div>\n\t\n\t<div id=\"footer\">\n\t\tImages &copy; their respective owners. <a href=\"https://www.assembla.com/spaces/kimica\">Kimica</a> &copy; 2007-$copy_date.\n\t</div>\n\t\n\t</body>\n</html>\nEOD;\n\t}", "function page($_page, $data = [], $title = '')\r\n{\r\n\t$position = get_session('user')['LevelP'];\r\n\tif($position == 'admin'){\r\n\t\tview('ui/admin-header.pie', [ 'title' => $title] );\r\n\t}else if($position == 'pengelola'){\r\n\t\tview('ui/pengelola-header.pie', [ 'title' => $title] );\r\n\t}else{\r\n\t\tview('ui/anggota-header.pie', [ 'title' => $title] );\r\n\t}\r\n\tview($_page, $data);\r\n\tview('ui/footer.pie');\r\n}", "private function show() {\n /*La plantilla principal de la pagina*/\n $page = $this->view->loadTemplate('page');\n /*Cargo las plantillas en la vista*/\n $this->view->load($page->render([\n /*esto carga los metadata*/\n 'metatags' => $this->view->meta,\n /*el menu header*/\n 'menu' => $this->view->loadTemplate('menu'),\n /*este es el menu lateral*/\n 'sidebar' => $this->view->loadTemplate('sidebar'),\n /*esto es el cuerpo html*/\n 'main' => $this->main_tpl->render( $this->view->getContent() ),\n /*este es el footer*/\n 'footer' => $this->view->loadTemplate('footer'),\n /*El/los js*/\n 'js' => $this->view->js\n ]));\n $this->view->generate();\n }", "public function show(pages $pages)\n {\n //\n }", "private function show_interface($page, $data)\n\t{\n\t\tif(!empty($page && $data))\n\t\t{\n\t\t\t$this->load->view('head');\n\t\t\t$this->load->view('navbar');\n\t\t\t$this->load->view($page, $data);\n\t\t\t$this->load->view('sidebar');\n\t\t\t$this->load->view('foot');\n\t\t}\n\t\telseif(empty($data))\n\t\t{\n\t\t\t$this->load->view('head');\n\t\t\t$this->load->view('navbar');\n\t\t\t$this->load->view($page);\n\t\t\t$this->load->view('sidebar');\n\t\t\t$this->load->view('foot');\n\t\t}\n\t}", "function view ($pageid);", "public function page( $page ) {\n $this->p_page = $page;\n }", "public function displayPage() {\n\t\techo $this->head;\n\t\techo '<div id=\"outside\">';\n\t\techo '<header><h1>' . $this->h1 . '</h1></header>';\n\t\techo '<nav><ul>' . $this->li . '</ul></nav>';\n\t\techo $this->main . '</main>';\n\t\techo $this->foot;\n\t\techo '</div></body></html>';\n\t}", "public function showPage() {\n\t\t$this->tpl->displayTemplate();\n\t}", "function mm_show_page() {\n $output = '';\n\n mm_parse_args($mmtids, $oarg_list, $this_mmtid);\n if (!count($mmtids)) $mmtids = array($this_mmtid = mm_home_mmtid());\n $perms = mm_content_user_can($this_mmtid);\n\n $output = _mm_render_pages($mmtids, $oarg_list, $err);\n $links = array();\n\n if ($perms['IS_RECYCLED']) {\n if ($perms['IS_RECYCLE_BIN']) {\n $recyc_msg = t('The contents below are in the recycle bin.');\n }\n else {\n $recyc_msg = t('This page is in the recycle bin.');\n\n if (mm_content_recycle_enabled()) {\n $when = db_result(db_query(\"SELECT recycle_date FROM {mm_recycle} WHERE type = 'cat' AND id = %d\", $this_mmtid));\n $recyc_msg .= mm_content_get_recycle_autodel_time($when, NULL, $this_mmtid, t(' It'));\n }\n\n if ($perms['w'])\n if (count($mmtids) >= 2 && mm_content_user_can($mmtids[count($mmtids)-2], 'IS_RECYCLE_BIN')) {\n $recyc_msg .= t(' You can restore it using the %settings tab.', array('%settings' => t('Settings')));\n }\n else {\n foreach (array_reverse($mmtids) as $t)\n if (mm_content_user_can($t, 'IS_RECYCLE_BIN')) {\n if ($last_t && ($tree = mm_content_get($last_t)))\n $pg = l(mm_content_expand_name($tree->name), mm_content_get_mmtid_url($last_t));\n break;\n }\n else $last_t = $t;\n\n $recyc_msg .= t('<p>This page cannot be restored by itself. You must restore the topmost parent page in the recycle bin, !page.</p>', array('!page' => $pg));\n }\n }\n }\n\n if (!$err) {\n if ($perms['IS_RECYCLED']) drupal_set_message($recyc_msg);\n }\n else if ($err == 'no read') {\n $output .= $perms['IS_GROUP'] ? t('You do not have permission to see the members of this group.') : mm_access_denied();\n }\n else { // $err=='no content'\n if (!$perms['IS_GROUP'] && !variable_get('mm_hide_empty_pages', FALSE)) {\n global $user;\n $list = array();\n $entry = mm_content_get($this_mmtid, array(MM_GET_FLAGS, MM_GET_PARENTS));\n if ($perms['IS_USER'] && isset($entry->flags['user_home'])) {\n if ($entry->flags['user_home'] == $user->uid) {\n $list[0] = variable_get('mm_default_homepage', '');\n }\n if (empty($list[0])) {\n $list[0] = t('<h2>Welcome</h2><p>This is a personal homepage that has not been modified yet.</p>');\n }\n }\n else if ($perms['IS_RECYCLE_BIN'])\n $list[0] = ' ';\n else\n $list[0] = t('<p>This page does not yet have any content.</p>');\n\n $entry->perms = $perms;\n mm_module_invoke_all_array('mm_empty_page_alter', array($entry, &$list));\n $nada = join('', $list);\n }\n else $nada = ' ';\n\n if ($perms['u'] && !$perms['IS_RECYCLED'] && !$perms['IS_GROUP']) {\n $link = \"mm/$this_mmtid/contents/add\";\n if (!$perms['IS_GROUP'] && !variable_get('mm_hide_empty_pages', FALSE)) {\n $links[] = array(\n 'title' => t('Add content'),\n 'href' => $link,\n );\n }\n else {\n mm_goto($link);\n return;\n }\n }\n else if ($perms['IS_GROUP']) {\n $users = mm_content_get_users_in_group($this_mmtid, NULL, FALSE, 100, TRUE);\n $node = (object)array();\n\n if (!count($users)) $node->title = t('There are no users in this group.');\n else if ($users[''] == '...') {\n $node->title = t('A partial list of users in this group:');\n }\n else {\n $node->title = t('All users in this group:');\n }\n\n $node->body = join('<br />', $users);\n $node->type = 'story';\n $output = theme('node', $node, FALSE, TRUE);\n }\n else if ($perms['w'] || $perms['a'])\n if (!$perms['IS_GROUP'] && !variable_get('mm_hide_empty_pages', FALSE)) {\n if (!$perms['IS_RECYCLED'])\n $nada .= t('<p>You do not have permission to add content, however you can use the %settings tab to make changes to the page itself.</p>', array('%settings' => t('Settings')));\n }\n else {\n mm_goto(\"mm/$this_mmtid/settings\");\n return;\n }\n\n if ($perms['IS_RECYCLED'])\n if ($perms['IS_RECYCLE_BIN'])\n drupal_set_message(t('Select an item in the recycle bin from the menu.'));\n else\n drupal_set_message($recyc_msg);\n\n if ($output == '') {\n if (!isset($node)) $node = (object)array();\n $node->body = $nada;\n $node->links = $links;\n unset($links);\n $node->type = 'story';\n $output = theme('node', $node, FALSE, TRUE);\n }\n } // $err=='no content'\n\n if ($links) {\n $output .= theme('links', $links);\n }\n\n return $output;\n}", "protected function displayPage()\n {\n }", "public function show($page_id)\n\t{\n\t\treturn $this->success(Page::find($page_id));\n\t}", "function render_page() {\n\t\t$view = 'settings';\n\t\t$page_title = __( 'Afrozaar AWS Extras', 'afrozaar-extras' );\n\n\t\tif ( empty( $_GET['page'] ) ) { // input var okay\n\t\t\t// Not sure why we'd ever end up here, but just in case\n\t\t\twp_die( 'What the heck are we doin here?' );\n\t\t}\n\n\t\t$this->render_view( 'header', array( 'page' => $view, 'page_title' => $page_title ) );\n\t\t$this->render_view( $view );\n\t\t$this->render_view( 'footer' );\n\t}", "function page_showPageInfo($page_id) {\n\tglobal $gSession,$Auth;\n\n\t## first we get the information:\n\t$templateInfo = template_getTemplate($page_id);\n\t$structureInfo = structure_getStructureID($page_id);\n\t$pageInfo = page_getPageInfo($page_id);\n\n\t$created = $pageInfo['created'];\n\t$modified = $pageInfo['modified'];\n\t$page_id = $pageInfo['page_id'];\n\t$page_name = $structureInfo['text'];\n\t$template_name = $templateInfo['title'];\n\t$template_basename = $templateInfo['basename'];\n\n\t## now output the information\n\t$select_template = new Template(INTERFACE_DIR);\n\t$select_template->set_templatefile(array(\"header\" => \"templateinfo.tpl\",\"body\" => \"templateinfo.tpl\",\"simplebody\" => \"templateinfo.tpl\",\"footer\" => \"templateinfo.tpl\"));\n\n\t##$select_template->set_var(\"saveIMG\",\"lang/\".$Auth->auth[\"language\"].\"_button_save.gif\");\t\n\t$select_template->set_var('language_pagename',LANG_PageInfo);\n\t$select_template->set_var('language_pagenamedesc',LANG_PageInfoDesc);\n\t$select_template->pfill_block(\"header\");\n\n\t$select_template->set_var('language_pagename',LANG_PageName);\n\t$select_template->set_var('text','<b>'.$page_name.'</b>');\n\t$select_template->pfill_block(\"body\");\n\n\t$select_template->set_var('language_pagename',LANG_PageInfo_Created);\n\t$select_template->set_var('text','<i>'.$created.'</i>');\n\t$select_template->pfill_block(\"simplebody\");\t\n\n\t$select_template->set_var('language_pagename',LANG_PageInfo_Modified);\n\t$select_template->set_var('text','<i>'.$modified.'</i>');\n\t$select_template->pfill_block(\"simplebody\");\n\n\t$select_template->set_var('language_pagename','Author:');\n\t$select_template->set_var('text','<i>'.$pageInfo['user'].'</i>');\n\t$select_template->pfill_block(\"simplebody\");\n\n\t$select_template->set_var('language_pagename',LANG_PageInfo_PageId);\n\t$select_template->set_var('text','<i>'.$page_id.'</i>');\n\t$select_template->pfill_block(\"body\");\n\t\n\t$select_template->set_var('language_pagename',LANG_PageInfo_URL);\n\t$select_template->set_var('text',getTargetUrl($page_id));\n\t$select_template->pfill_block(\"simplebody\");\n\n\t$select_template->set_var('language_pagename',LANG_PageInfo_Template);\n\t$select_template->set_var('text','<b>'.$template_name.'</b>');\n\t$select_template->pfill_block(\"body\");\n\t\n\t$select_template->set_var('language_pagename','');\n\t$select_template->set_var('text','<i>'.$template_basename.'</i>');\n\t$select_template->pfill_block(\"simplebody\");\n\t\n\t$select_template->pfill_block(\"footer\");\n}", "function get_page()\n {\n if(!$this->private_info['page'] && $this->private_info['instanceid'] > 0) {\n $this->private_info['page'] = new NsisWebPage($this->get_pageid(),FETCH_CONTENT_BOTH);\n }\n return $this->private_info['page'];\n }", "function page($page = null);", "public function showPage( $arguments = array() ) {\n\t\tglobal $ftsdb, $page, $actual_action, $actual_id, $actual_page, $cmsMenus, $mbp_config, $fts_http;\n\n\t\textract( (array) $arguments ); // Extract our arguments into variables\n\t\t$page_content = $JQueryReadyScripts = '';\n\t\t$this->prepMenus();\n\n\t\t// Cycle through our pages and handle the content\n\t\tif ( $module_page == 'pages' ) {\n\t\t\t$page->setTemplateVar( 'PageTitle', \"Pages\" );\n\t\t\t$page->addBreadCrumb( \"Pages\", $cmsMenus['PAGES']['link'] );\n\n\t\t\tif ( user_access( 'cms_pages_access' ) ) {\n\t\t\t\t$currentDate = ( isset( $_GET['date'] ) ) ? keeptasafe( $_GET['date'] ) : time();\n\n\t\t\t\t//=================================================\n\t\t\t\t// Edit the Page\n\t\t\t\t//=================================================\n\t\t\t\tif ( $actual_action == \"editpage\" && isset( $actual_id ) && user_access( 'cms_pages_edit' ) ) {\n\t\t\t\t\t// Add breadcrumb\n\t\t\t\t\t$page->addBreadCrumb( \"Edit Page\", \"\" );\n\n\t\t\t\t\t$page_content .= '\n\t\t\t\t\t\t<div class=\"box tabbable\">\n\t\t\t\t\t\t\t<div class=\"box-header\">\n\t\t\t\t\t\t\t\t<h3><i class=\"glyphicons glyphicons-pen\"></i> ' . __( 'Edit Page' ) . '</h3>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"box-content\">\n\t\t\t\t\t\t\t\t' . printEditPageForm( $actual_id ) . '\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>';\n\n\t\t\t\t\t// Handle our JQuery needs\n\t\t\t\t\t$JQueryReadyScripts = returnEditPageFormJQuery( $actual_id );\n\t\t\t\t}\n\n\t\t\t\t//=================================================\n\t\t\t\t// Print out the table\n\t\t\t\t//=================================================\t\n\t\t\t\telse {\n\t\t\t\t\t$page_content = '\t\t\n\t\t\t\t\t\t<div class=\"box tabbable\">\n\t\t\t\t\t\t\t<div class=\"box-header\">\n\t\t\t\t\t\t\t\t<h3><i class=\"glyphicons glyphicons-pen\"></i> ' . __( 'Pages' ) . '</h3>\n\t\t\t\t\t\t\t\t<div class=\"toolbar\">\n\t\t\t\t\t\t\t\t\t<ul class=\"nav nav-tabs\">\n\t\t\t\t\t\t\t\t\t\t<li class=\"active\"><a href=\"#currentPages\" data-toggle=\"tab\"><span>Current Pages</span></a></li>\n\t\t\t\t\t\t\t\t\t\t' . ( ( user_access( 'cms_pages_create' ) ) ? '<li><a href=\"#createANewPage\" data-toggle=\"tab\"><span>Create a New Page</span></a></li>' : '' ) . '\n\t\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</div>\n\t\t\t\t\t\t\t<div class=\"tab-content\">\n\t\t\t\t\t\t\t\t<div id=\"currentPages\" class=\"tab-pane active\">\n\t\t\t\t\t\t\t\t\t<div id=\"updateMePages\">\n\t\t\t\t\t\t\t\t\t\t' . printPagesTable() . '\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' . ( ( user_access( 'cms_pages_create' ) ) ? '\n\t\t\t\t\t\t\t\t<div id=\"createANewPage\" class=\"tab-pane\">\n\t\t\t\t\t\t\t\t\t' . printNewPageForm() . '\n\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</div>\n\t\t\t\t\t\t</div>';\n\n\t\t\t\t\t// Add JQuery\t\t\t\n\t\t\t\t\t$JQueryReadyScripts = returnPagesTableJQuery();\n\t\t\t\t\tif ( user_access( 'cms_pages_create' ) ) {\n\t\t\t\t\t\t$JQueryReadyScripts .= returnNewPageFormJQuery( 1 );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$page_content = notAuthorizedNotice();\n\t\t\t}\n\t\t} elseif ( $module_page == 'sitemap' ) {\n\t\t\t$page->setTemplateVar( 'PageTitle', \"Sitemap\" );\n\t\t\t$page->addBreadCrumb( \"Sitemap\", '' );\n\n\t\t\t// set the content to be our list of links\n\t\t\tcallModuleHook( '', 'sitemapPage' ); // sets the proper variables so we can now get our sitemap list\n\t\t\t$page_content = returnSitemapList();\n\t\t} elseif ( $module_page == 'testimonials' ) {\n\t\t\t$page->setTemplateVar( 'PageTitle', \"Testimonials\" );\n\t\t\t$page->addBreadCrumb( \"Testimonials\", '' );\n\n\t\t\t$testimonials = $fts_http->request( $mbp_config['ftsmbp_cms_testimonials_url'] );\n\t\t\t$page_content .= '\t\n\t\t\t\t<div class=\"box\">\n\t\t\t\t\t<div class=\"box-header\">\n\t\t\t\t\t\t<h3>' . __( 'Testimonials' ) . '</h3>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"box-content\">\n\t\t\t\t\t\t' . $testimonials . '\n\t\t\t\t\t</div>\n\t\t\t\t</div>';\n\t\t} elseif ( $module_page == 'viewPage' ) {\n\t\t\t// Get page info for this slug\n\t\t\tif ( ! empty( $actual_page ) ) {\n\t\t\t\t$result = $ftsdb->select( DBTABLEPREFIX . \"pages\", \"slug = :slug LIMIT 1\", array(\n\t\t\t\t\t\":slug\" => $actual_page\n\t\t\t\t) );\n\n\t\t\t\tif ( $result ) {\n\t\t\t\t\tforeach ( $result as $row ) {\n\t\t\t\t\t\t$page->setTemplateVar( 'PageTitle', $row['page_title'] );\n\t\t\t\t\t\t$page->setTemplateVar( \"PageKeywords\", $row['keywords'] );\n\t\t\t\t\t\t$page->setTemplateVar( \"PageDescription\", $row['description'] );\n\t\t\t\t\t\t$page->addBreadCrumb( $row['title'], il( 'index.php?p=module&prefix=CMS&module_page=viewPage&page=' . $row['slug'] ) );\n\n\t\t\t\t\t\t$page_content .= \"\t\n\t\t\t\t\t\t\t<div class=\\\"box\\\">\n\t\t\t\t\t\t\t\t<div class=\\\"box-header\\\">\n\t\t\t\t\t\t\t\t\t<h3>\" . $row['title'] . \"</h3>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\\\"box-content\\\">\n\t\t\t\t\t\t\t\t\t\" . $row['content'] . \"\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}\n\t\t\t\t\t$result = null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Attach our centent\n\t\t$page->setTemplateVar( 'PageContent', $page_content );\n\t\t$page->setTemplateVar( \"JQueryReadyScript\", $JQueryReadyScripts );\n\t}", "public function pageBoxAction()\n {\n $pid = $this->getPidForAuthors();\n\n $result = $this->pagesRepository->findByIdentifier($pid);\n if ($result instanceof \\RKW\\RkwAuthors\\Domain\\Model\\Pages) {\n $this->view->assign('page', $result);\n $this->view->assign('showPid', $this->settings['showPid']);\n }\n\n }", "public function pages($page)\n {\n \t\n\n \t$menu = $this->buildmenu();//building a dynamic menu\n \t\n\n if(Page::where('title', $page)->first())\n {\n $current_page = Page::where('title', $page)->first();\n $content = 'The content of ' . $current_page->title;\n \n\n return view('pages.index')->with('current_page', $current_page)\n \t\t\t\t\t\t\t->with('page_content', $content)\n \t->with('pages', $menu);\n\n } else \n {\n return view('errors.404')->with('pages', $menu);\n }\n }", "function action_view()\n{\n\tglobal $page, $pagestore, $ParseEngine, $version;\n\n\t$pg = $pagestore->page($page);\n\tif($version != '')\n\t\t{ $pg->version = $version; }\n\t$pg->read();\n\n\tgen_headers($pg->time);\n\n\ttemplate_view(array('page' => $pg->as_array(),\n\t\t\t\t\t\t\t\t\t\t\t'title' => $pg->title,\n\t\t\t\t\t\t\t\t\t\t\t'html' => parseText($pg->text, $ParseEngine, $page),\n\t\t\t\t\t\t\t\t\t\t\t'editable' => $pg->acl_check(),\n\t\t\t\t\t\t\t\t\t\t\t'timestamp' => $pg->time,\n\t\t\t\t\t\t\t\t\t\t\t'archive' => $version != '',\n\t\t\t\t\t\t\t\t\t\t\t'version' => $pg->version));\n}", "public static function\t\tprint_page(){\r\n\t\tif (WOME::$cache_mode == 'page')\r\n\t\t{\r\n\t\t\t//save the previous buffer\r\n\t\t\tWOME::initcache_save_buffer(true);\r\n\r\n\t\t\t//check and read the cache\r\n\t\t\tWOME::$_page['read_cache'] = WOME::initcache_check_file();\r\n\t\t\tif(WOME::$_page['read_cache'])\r\n\t\t\t\tWOME::initcache_read_file();\r\n\t\t}\r\n\r\n\t\tif(!WOME::$_page['read_cache'])\r\n\t\t{\r\n\t\t//else : exec the page\r\n\t\t\t//include the page\r\n\t\t\t$function = function(){\r\n\t\t\t\tinclude(WOME::$_site['directory'].'pages/'.WOME::$_page['properties']['address']);\r\n\t\t\t};\r\n\t\t\t$function();\r\n\t\t\t\r\n\t\t\tif (WOME::$cache_mode == 'page')\r\n\t\t\t{\r\n\t\t\t\t//save the page buffer\r\n\t\t\t\tWOME::initcache_save_buffer(true);\r\n\t\t\t\tWOME::initcache_save_file();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function show(PageDescription $pageDescription)\n {\n //\n }", "public function nearbyPlatformHelpPageSub($page, $sub) {\n $product = \"Augmented People Platform\";\n $doctype = \"Help\";\n $page_title = \"Documentation - Augmented People Platform - Knowledge Base\";\n $header_img = url('assets/images/backgrounds/triangles05.jpg');\n $color_dark = 'rgba(20,110,255,0.7)';\n $color_light = '#d0e2ff';\n $seg1 = \\Request::segment(1);\n $seg2 = \\Request::segment(2);\n $seg3 = \\Request::segment(3);\n $seg4 = \\Request::segment(4);\n\n\t\t$page_short = $page;\n\t\tforeach (glob(base_path() . \"/resources/views/app/help/*-\" . $page) as $filename) {\n\t\t\t$page = basename($filename);\n $dirname = $filename;\n\t\t}\n\n\t\t$sub_short = $sub;\n\t\tforeach (glob(base_path() . \"/resources/views/app/help/\" . $page . \"/*-\" . $sub . \".md\") as $filename) {\n\t\t\t$sub = basename($filename);\n\t\t\t$sub = str_replace('.blade.php', '', $sub);\n\t\t\t$sub = str_replace('.md', '', $sub);\n\t\t}\n\n $markdown = \\File::get(base_path() . \"/resources/views/app/help/\" . $page . \"/\" . $sub . \".md\");\n $html = \\GrahamCampbell\\Markdown\\Facades\\Markdown::convertToHtml($markdown);\n\n $html = str_replace('<a href', '<a class=\"link\" href', $html);\n $html = str_replace('<pre', '<pre class=\"prettyprint\"', $html);\n $html = str_replace('<blockquote', '<blockquote class=\"alert alert-primary rounded-0\"', $html);\n $html = str_replace('<table', '<table class=\"table table-bordered table-striped\"', $html);\n $html = str_replace('<thead', '<thead class=\"thead-inverse\"', $html);\n\n\t\t// Prev / next\n\t\t$files = array_sort(\\File::files($dirname), function($file) {\n\t\t\treturn $file;\n\t\t});\n\n\t\tforeach ($files as $i => $file) {\n\t\t\t$filename = basename($file);\n\t\t\t$filename = str_replace('.blade.php', '', $filename);\n\t\t\t$filename = str_replace('.md', '', $filename);\n\n\t\t\tif ($filename == $sub) {\n $prev = (isset($files[$i-1]) && basename($files[$i-1]) != 'index.blade.php' && basename($files[$i-1]) != 'page.blade.php') ? explode('-', str_replace('.md', '', basename($files[$i-1])), 2)[1] : '';\n $prev_link = ($prev != '') ? url('dashboard/help/' . explode('-', $page, 2)[1] . '/' . $prev) : '';\n $next = (isset($files[$i+1]) && basename($files[$i+1]) != 'index.blade.php' && basename($files[$i+1]) != 'page.blade.php') ? explode('-', str_replace('.md', '', basename($files[$i+1])), 2)[1] : '';\n $next_link = ($next != '') ? url('dashboard/help/' . explode('-', $page, 2)[1] . '/' . $next) : '';\n\t\t\t}\n\t\t}\n\n $prev = str_replace('-', ' ', ucfirst($prev));\n $next = str_replace('-', ' ', ucfirst($next));\n\n\t\treturn view('app.help.' . $page . '.page', ['page_title' => $page_title, 'next' => $next, 'next_link' => $next_link, 'prev' => $prev, 'prev_link' => $prev_link, 'product' => $product, 'doctype' => $doctype, 'seg1' => $seg1, 'seg2' => $seg2, 'seg3' => $seg3, 'seg4' => $seg4, 'header_img' => $header_img, 'color_dark' => $color_dark, 'color_light' => $color_light, 'html' => $html, 'page' => $page, 'page_short' => $page_short, 'sub' => $sub, 'sub_short' => $sub_short]);\n\t}", "public function view($page = 'home') {\n if (!file_exists(APPPATH . 'views/pages/' . $page . '.php')) {\n // Whoops, we don't have a page for that!\n show_404();\n }\n\n $data['title'] = ucfirst($page); // Capitalize the first letter\n $data['page_item'] = $this->page_model->get_page($page);\n\n $this->load->view('templates/header', $data);\n $this->load->view('pages/' . $page, $data);\n $this->load->view('templates/footer', $data);\n \n }", "public function wiki_page() {\n if (!isset($this->_wiki_page)) {\n $this->_wiki_page = WikiPage::find($this->owner_id);\n }\n return $this->_wiki_page;\n }", "public function showPagePresentation($call_page=null)\n\t{\n\t\t$this->checkSiteSecurity();\n\t\t\n\t\t$this->loadImagineer('presentations');\n\t\t\n\t\t// Deprecate these lines when switch is made.\n\t\t$home_page = wed_getSystemValue('HOME_PAGE');\n\t\t$error_page = wed_getSystemValue('ERROR_404');\n\t\t\n\t\t$call_page = (!is_null($call_page)) ? $call_page : $home_page ;\n\t\n\t\t$pages = $this->getPageCodes();\n\t\t\t\n\t\t$html = null;\n\t\t\n\t\tif ( (SITE_DOMAIN === 'seniorstategames.asffoundation') || (SITE_DOMAIN === 'alagames') )\n\t\t{\n\t\t\tforeach ($pages as $key)\n\t\t\t{\n\t\t\t\t$page_id = $this->wed_imagineers['presentations']->newPresentation(array('TYPE' => 'mainpage', 'PAGE_TEMPLATE_CODE' => $key));\n\t\t\t\t$html = $this->wed_imagineers['presentations']->getHTML(array('ID' => $page_id));\n\t\t\t\t\n\t\t\t\tif ($html)\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$call_page_id = $this->wed_imagineers['presentations']->newPresentation(array('TYPE' => 'page', 'PAGE' => $call_page));\n\t\t\t$html = $this->wed_imagineers['presentations']->getHTML(array('ID' => $call_page_id));\n\t\t}\n\t\t\n\t\t\t\t\n\t\tif ( (!$html) || (is_null($html)) )\n\t\t{\n\t\t\t$donald = (isset($_GET['donald'])) ? $_GET['donald'] : 'Great';\n\t\t\t\n\t\t\tif ($donald!='quacked')\n\t\t\t{\n\t\t\t\t$err_message = wed_getSystemValue('SYSTEM_ERROR_CODE','No HTML');\t\n\t\t\t\ttrigger_error($err_message, E_USER_ERROR);\n\t\t\t\texit();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tvar_dump($this);\n\t\t\t}\t\n\t\t}\n\t\t\n\t\techo $html;\n\t\t\n\t\texit();\n\t}", "public function any_page($page) {\n \n // The path of the page\n $this->page = CMS_ContentStore::findPage($page);\n \n // Output the template\n $this->template($this->page);\n \n }", "function showPage() \n\t{\n\t\t$this->xt->display($this->templatefile);\n\t}", "public function page()\n {\n $title = Page::where('location', 'general_title')->first();\n $favicon = Page::where('location', 'general_favicon')->first();\n $footer = Page::where('location', 'general_footer')->first();\n\n $jumbotron = Page::where('location', 'home_jumbotron')->first();\n $berita = Berita::latest()->paginate(6);\n $runingText = Page::where('location', 'general_runing_text')->first();\n\n return view('public.page', compact('berita', 'title', 'favicon', 'footer', 'jumbotron', 'runingText'));\n }", "public function view($page)\n\t{\t\n\t\t$data['title'] = \"Property Mgt System\";\n\t\t$data['main'] = $page;\n\t\t$data['logo']=$this-> CompanyDetails-> getLogo(); //get company logo\n\t\t$data['main_details']=$this-> CompanyDetails->getMainBranchDetails(); //get main branch details \n\t\t$data['getallcategories'] = $this->Store->getAllCategories();\n\t\t\n\t\tif (isset($_SESSION['user_id']) || isset($_SESSION['user_name'])) {\n\t\t$data['user_data'] = $this-> Member-> getUserInfo($_SESSION['user_id']);//get user informations\n\t\t}\n\t\t$this -> load -> vars($data);\n\t\t$this -> load -> view('page_template');\n\t\n\t}", "public function view($page)\n\t{\t\n\t\t$data['title'] = \"Property Mgt System\";\n\t\t$data['main'] = $page;\n\t\t$data['logo']=$this-> CompanyDetails-> getLogo(); //get company logo\n\t\t$data['main_details']=$this-> CompanyDetails->getMainBranchDetails(); //get main branch details \n\t\t$data['getallcategories'] = $this->Store->getAllCategories();\n\t\t//$data['categories'] = $this->Store->getAllMenCategories();\n\t\t//$data['brands'] = $this->Store->getbrand();\n\t\tif (isset($_SESSION['user_id']) || isset($_SESSION['user_name'])) {\n\t\t$data['user_data'] = $this-> Member-> getUserInfo($_SESSION['user_id']);//get user informations\n\t\t}\n\t\t$this -> load -> vars($data);\n\t\t$this -> load -> view('page_template');\n\t\n\t}", "function page() {\n $data['title'] \t= 'Admin | Post Page';\n $data['main_view'] = '_adm/v_page/index';\n $data['ar'] = $this->it->load_page();\n $this->load->view('_temp/index', $data);\n }", "protected function ShowPage($content,$extra_style='') {\n \n require_once 'SimpleMenu.php';\n\n $mm = new SimpleMenu(APP_PATH);\n\n $extra_style .= $mm->CSS(); // conf. possible, using defaults\n\n $page_view = new View('page_template','views/');\n $head_view = new View('head_template','views/');\n $body_view = new View('body_template','views/');\n \n $main_menu = $mm->menu(array(\n $mm->item('Home',''),\n $mm->item('Views','info/Views'),\n $mm->item('Models','info/Models'),\n $mm->item('Controllers','info/Controllers'),\n $mm->item('Route','info/Route'), # !! RouteS ?\n $mm->item('Utils','info/Utils')));\n \n $sub_menu = '';\n \n if($this->controller == 'info') {\n if($this->action == 'Views')\n $sub_menu = $mm->menu(array(\n $mm->item('View','info/Views/View'),\n $mm->item('InlineView','info/Views/InlineView'),\n $mm->item('StringView','info/Views/StringView'),\n $mm->item('FormatView','info/Views/FormatView')\n ),'submenu');\n elseif($this->action == 'Models')\n $sub_menu = $mm->menu(array(\n $mm->item('Model','info/Models/Model'),\n $mm->item('JSONModel','info/Models/JSONModel'),\n $mm->item('DBModel','info/Models/DBModel'),\n $mm->item('DBStatusModel','info/Models/DBStatusModel'),\n $mm->item('DBTableModel','info/Models/DBTableModel'),\n $mm->item('DBRecordModel','info/Models/DBRecordModel')\n ),'submenu'); \n elseif($this->action == 'Utils')\n $sub_menu = $mm->menu(array(\n $mm->item('FormBuilder','info/Utils/FormBuilder'),\n $mm->item('SimpleMenu','info/Utils/SimpleMenu'),\n $mm->item('SimpleInput','info/Utils/SimpleInput'),\n $mm->item('BootstrapUI','info/Utils/BootstrapUI')\n ),'submenu'); \n }\n \n $body = new Model();\n $body->top = '<h1>'.APP_NAME.'<span style=\"font-size:60%;color:silver\"> v'.APP_VERSION.'</span>'.'</h1>';\n $body->menu = $main_menu.$sub_menu;\n $body->content = $content;\n $body->footer = '&copy; 2015 '.APP_AUTHOR;\n\n $page = new Model();\n $page->title = APP_NAME;\n $page->head = $head_view->render(array('extra_style'=>$extra_style));\n $page->body = $body_view->render($body);\n\n echo $page_view->render($page);\n \n }", "function print_content() {\n //make sure anyone trying to access this page has managewiki capabilities\n require_capability('mod/socialwiki:managewiki', $this->modcontext, NULL, true, 'noviewpagepermission', 'socialwiki');\n\n //update wiki cache if timedout\n $page = $this->page;\n if ($page->timerendered + SOCIALWIKI_REFRESH_CACHE_TIME < time()) {\n $fresh = socialwiki_refresh_cachedcontent($page);\n $page = $fresh['page'];\n }\n\n //dispaly admin menu\n echo $this->wikioutput->menu_admin($this->page->id, $this->view);\n\n //Display appropriate admin view\n switch ($this->view) {\n case 1: //delete page view\n $this->print_delete_content($this->listorphan);\n break;\n case 2: //delete version view\n $this->print_delete_version();\n break;\n default: //default is delete view\n $this->print_delete_content($this->listorphan);\n break;\n }\n }", "public function visit($page)\n {\n $page = $this->getPage($page);\n if ($page instanceof Page) {\n $this->getSession()->setPage($page);\n $page->open();\n } else {\n parent::visit($page);\n }\n }", "function info_page_html()\n {\n }", "public function showAction($slug){\n\t\t$page = $this->PagesModel->findBySlug($slug);\n\t\tif(!$page){\n\t\t\tRouter::redirect('notFound/index');\n\t\t }\n\t\t$page->content = Helpers::decodeContent($page->content);\n\t\t$this->view->page = $page;\n $this->view->render('pages/page');\n\t}", "public function get_page($page = ''){\n\t}", "protected function displayPage() {\n\t\t$html = $this -> displayHeader();\n\t\t$html .= $this -> displayContent();\t// Defined in a sub class\n\t\t$html .= $this -> displayFooter();\n\t\techo $html;\n\t}", "function pageinfo() {\n global $ID;\n global $REV;\n global $RANGE;\n global $lang;\n /* @var Input $INPUT */\n global $INPUT;\n\n $info = basicinfo($ID);\n\n // include ID & REV not redundant, as some parts of DokuWiki may temporarily change $ID, e.g. p_wiki_xhtml\n // FIXME ... perhaps it would be better to ensure the temporary changes weren't necessary\n $info['id'] = $ID;\n $info['rev'] = $REV;\n\n if($INPUT->server->has('REMOTE_USER')) {\n $sub = new Subscription();\n $info['subscribed'] = $sub->user_subscription();\n } else {\n $info['subscribed'] = false;\n }\n\n $info['locked'] = checklock($ID);\n $info['filepath'] = fullpath(wikiFN($ID));\n $info['exists'] = @file_exists($info['filepath']);\n $info['currentrev'] = @filemtime($info['filepath']);\n if($REV) {\n //check if current revision was meant\n if($info['exists'] && ($info['currentrev'] == $REV)) {\n $REV = '';\n } elseif($RANGE) {\n //section editing does not work with old revisions!\n $REV = '';\n $RANGE = '';\n msg($lang['nosecedit'], 0);\n } else {\n //really use old revision\n $info['filepath'] = fullpath(wikiFN($ID, $REV));\n $info['exists'] = @file_exists($info['filepath']);\n }\n }\n $info['rev'] = $REV;\n if($info['exists']) {\n $info['writable'] = (is_writable($info['filepath']) &&\n ($info['perm'] >= AUTH_EDIT));\n } else {\n $info['writable'] = ($info['perm'] >= AUTH_CREATE);\n }\n $info['editable'] = ($info['writable'] && empty($info['locked']));\n $info['lastmod'] = @filemtime($info['filepath']);\n\n //load page meta data\n $info['meta'] = p_get_metadata($ID);\n\n //who's the editor\n $pagelog = new PageChangeLog($ID, 1024);\n if($REV) {\n $revinfo = $pagelog->getRevisionInfo($REV);\n } else {\n if(!empty($info['meta']['last_change']) && is_array($info['meta']['last_change'])) {\n $revinfo = $info['meta']['last_change'];\n } else {\n $revinfo = $pagelog->getRevisionInfo($info['lastmod']);\n // cache most recent changelog line in metadata if missing and still valid\n if($revinfo !== false) {\n $info['meta']['last_change'] = $revinfo;\n p_set_metadata($ID, array('last_change' => $revinfo));\n }\n }\n }\n //and check for an external edit\n if($revinfo !== false && $revinfo['date'] != $info['lastmod']) {\n // cached changelog line no longer valid\n $revinfo = false;\n $info['meta']['last_change'] = $revinfo;\n p_set_metadata($ID, array('last_change' => $revinfo));\n }\n\n $info['ip'] = $revinfo['ip'];\n $info['user'] = $revinfo['user'];\n $info['sum'] = $revinfo['sum'];\n // See also $INFO['meta']['last_change'] which is the most recent log line for page $ID.\n // Use $INFO['meta']['last_change']['type']===DOKU_CHANGE_TYPE_MINOR_EDIT in place of $info['minor'].\n\n if($revinfo['user']) {\n $info['editor'] = $revinfo['user'];\n } else {\n $info['editor'] = $revinfo['ip'];\n }\n\n // draft\n $draft = getCacheName($info['client'].$ID, '.draft');\n if(@file_exists($draft)) {\n if(@filemtime($draft) < @filemtime(wikiFN($ID))) {\n // remove stale draft\n @unlink($draft);\n } else {\n $info['draft'] = $draft;\n }\n }\n\n return $info;\n}", "public function getByPage(SiteTree $page, $showEmbargoed = false);", "public function page()\n\t{\n\t\t$this->index();\n\t}", "function format_page( $page ) {\r\n\t// Clean it up\r\n\t$page['title'] = plain( $page['title'] );\r\n\t$page['info'] = plain( $page['info'] );\r\n\t$page['body'] = plain( $page['body'] );\t\t\r\n\t\t\r\n\t// Check if we have something to highlight\r\n\tif ( $page['info_highlight'] ) {\r\n\t\t// Clean info highlight\r\n\t\t$page['info_highlight'] = plain( $page['info_highlight'] );\r\n\r\n\t\t// Reassign info with highlighted section by strong tag\r\n\t\t$page['info'] = preg_replace(\"/\\p{L}*?\".preg_quote( $page['info_highlight'] ).\"\\p{L}*/ui\", \"<strong>$0</strong>\", $page['info'] );\r\n\t}\r\n\t\r\n\t// Format body\r\n\t$page['body'] = filter_url( $page['body'] );\r\n\t$page['body'] = add_paragraphs( $page['body'] );\r\n\r\n\treturn (object) $page;\r\n}", "function get_page($_page, $data = [])\r\n{\r\n\treturn get_view($_page, $data);\r\n}", "protected function page(){\n\t\t$pagePath = 'app/page/'.ucfirst(Request::instance()->page).'.php';\n\n\t\tif(file_exists($pagePath)){\n\t\t\trequire_once($pagePath);\n\t\t}\n\t}", "function display ($page, $title = '', $topnav = true, $metatags = '', $AdminPage = false) {\r\n\tglobal $link, $game_config, $debug, $user, $planetrow;\r\n\r\n\tif (!$AdminPage) {\r\n\t\t$DisplayPage = StdUserHeader ($title, $metatags);\r\n\t} else {\r\n\t\t$DisplayPage = AdminUserHeader ($title, $metatags);\r\n\t}\r\n\r\n\tif ($topnav) {\r\n\t\t$DisplayPage .= ShowTopNavigationBar( $user, $planetrow );\r\n\t}\r\n\t$DisplayPage .= \"<center>\\n\". $page .\"\\n</center>\\n\";\r\n\t// Affichage du Debug si necessaire\r\n\tif ($user['authlevel'] == 1 || $user['authlevel'] == 3) {\r\n\t\tif ($game_config['debug'] == 1) $debug->echo_log();\r\n\t}\r\n\r\n\t$DisplayPage .= StdFooter();\r\n\tif (isset($link)) {\r\n\t\t@mysql_close($link);\r\n\t}\r\n\r\n\techo $DisplayPage;\r\n\r\n\tdie();\r\n}", "function display_one_page_html ($PageID, $format = 'html', $callback = '')\n{\n\tglobal $config;\n\tglobal $couch;\n\t\n\t$obj = new stdclass;\n\t$obj->html = '';\n\t$obj->page = 'page/' . $PageID;\t\n\t$obj->status = 404;\n\t\n\t// Do we have this page in the database, with XML?\n\t$xml = '';\n\t$couch_id = 'page/' . $PageID;\t\n\t$resp = $couch->send(\"GET\", \"/\" . $config['couchdb_options']['database'] . \"/\" . urlencode($couch_id));\n\n\t$page = json_decode($resp);\n\tif (isset($page->error))\n\t{\n\t\t// we don't have this page\n\t}\n\telse\n\t{\n\t\tif (isset($page->xml))\n\t\t{\n\t\t\t$xml = $page->xml;\n\t\t}\n\t}\n\t\n\tif ($xml != '')\n\t{\n\t\t// Source of image\n\t\tif ($config['image_source'] == 'bhl')\n\t\t{\n\t\t\t$image_url = 'http://www.biodiversitylibrary.org/pagethumb/' . $PageID . ',500,500\"';\t\n\t\t\t\n\t\t\tif ($config['use_cloudimage'])\n\t\t\t{\n\t\t\t\t$image_url = 'http://exeg5le.cloudimg.io/s/width/700/' . $image_url;\n\t\t\t}\n\t\t\t\n\t\t\tif ($config['use_weserv'])\n\t\t\t{\n\t\t\t\t$image_url = 'https://images.weserv.nl/?url=' . str_replace('http://', '', $image_url);\n\t\t\t}\t\t\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$image_url = 'http://direct.biostor.org/bhl_image.php?PageID=' . $PageID;\n\t\t}\t\n\t\n\t\t// Enable text selection\t\n\t\t$xp = new XsltProcessor();\n\t\t$xsl = new DomDocument;\n\t\t$xsl->load(dirname(__FILE__) . '/djvu2html.xsl');\n\t\t$xp->importStylesheet($xsl);\n\n\t\t$doc = new DOMDocument;\n\t\t$doc->loadXML($xml);\n\n\t\t$xp->setParameter('', 'widthpx', '700');\n\t\t$xp->setParameter('', 'imageUrl', $image_url);\n\n\t\t$obj->html = $xp->transformToXML($doc);\n\t\t\n\t\t$obj->status = 200;\n\t}\n\t\n\tapi_output($obj, $callback);\n}", "function set_page($page) {\n global $PAGE;\n\n $this->page = $page;\n $this->title = $page->title.' ID:'.$page->id;\n // set_title calls format_string itself so no probs there\n $PAGE->set_title($this->title);\n }", "public function show(Page $page)\n {\n\n return (new PageController())->show($page->name, $page);\n }", "private function buildPage() {\n\t\tglobal $wgScriptPath;\n\t\t$htmlOut = '';\n\n\t\t// Output beginning of the page\n\t\t$htmlOut .= <<<HTML\n<!DOCTYPE html>\n<html lang=\"en\" dir=\"ltr\" class=\"client-nojs\">\n<head>\n<title>Wikipedia, the free encyclopedia</title>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n<meta http-equiv=\"Content-Style-Type\" content=\"text/css\" />\n<meta name=\"generator\" content=\"MediaWiki 1.18wmf1\" />\n<style type=\"text/css\">\nbody {\n\tcolor: #dedede;\n\tmargin: 2em;\n\tfont-family:Times New Roman;\n\tbackground: black url('//upload.wikimedia.org/wikipedia/commons/9/98/WP_SOPA_Splash_Full.jpg') no-repeat 0 0;\n}\nh3{\n font-size: 1.5em;\n text-align:center;\n margin-bottom: 0.5em;\n color: #ffffff;\n font-weight: bold;\n}\n\nh4 { \n font-weight: bold;\n color: #ffffff;\n}\na:link, a:visited {\n\tcolor: #dedede;\n}\na:hover, a:active {\n\tcolor: #ffffff;\n}\ndiv#everything {\n\twidth: 920px;\n\tmargin: 0 auto;\n}\ndiv#instructions {\n\tposition: absolute;\n\ttop: 67px;\n\tleft: 480px;\n\ttext-align: left;\n\twidth: 500px;\n\tpadding-bottom: 30px;\n}\ndiv#instructions p {\n text-align:justify;\n}\ndiv#contacts {\n\tposition: absolute;\n\ttop: 50px;\n\tleft: 80px;\n\twidth: 320px;\n\tbackground-color: #161616;\n\tpadding: 5px 20px 20px 20px;\n\tfilter:alpha(opacity=90);\n\t-moz-opacity:0.90;\n\t-khtml-opacity: 0.90;\n\topacity: 0.90;\n}\ndiv#contacts form {\n\tmargin-bottom: 1em;\n}\ntable.person {\n\tmargin-bottom: 1em;\n\tmargin-left: 20px;\n\tborder: none;\n}\ntable.person td.name {\n\tfont-weight: bold;\n}\np {\n\tmargin: 1em 0;\n}\np.quote {\n\tfont-family: georgia, serif;\n\tfont-size: 14px;\n\tcolor: #cccccc;\n\tmargin-left: 20px;\n}\np.note {\n\tmargin-top: 0;\n}\nh3 {\n\tfont-weight: normal;\n\tfont-size: 20px;\n}\nh4 {\n\tfont-weight: normal;\n\tfont-size: 17px;\n}\n.sopaBigHeadline {\n font-size: 1.5em;\n margin-bottom: 0.5em;\n}\n.sopaSectionHeadline {\n font-size: 1.2em;\n margin-bottom: 0.2em;\n}\n.sopaSocial {\n float: left;\n text-align: center;\n margin-right: 12px;\n margin-bttom: 3px;\n font-size: small;\n}\n.sopaActionHead {\n font-weight: bold\n}\n</style>\n</head>\n<body>\n<div id=\"everything\">\n<div id=\"instructions\">\n\t<div class=\"sopaBigHeadline\">Call your elected officials.</div>\n\t\n\t<p>\n\tTell them you are their constituent, and you oppose SOPA and PIPA.\n\t</p>\n\t\n\t<div class=\"sopaSectionHeadline\">Why?</div>\n\t<p>\n\tSOPA and PIPA put the burden on website owners to police user-contributed material and call for the unnecessary blocking of entire sites. Small sites won't have sufficient resources to defend themselves. Big media companies may seek to cut off funding sources for their foreign competitors, even if copyright isn't being infringed. Foreign sites will be blacklisted, which means they won't show up in major search engines. SOPA and PIPA build a framework for future restrictions and suppression.\n\t</p>\n\t\n\t<p>\n\tIn a world in which politicians regulate the Internet based on the influence of big money, Wikipedia &mdash; and sites like it &mdash; cannot survive.\n\t</p>\n\t\n\t<p>\n\tCongress says it's trying to protect the rights of copyright owners, but the \"cure\" that SOPA and PIPA represent is worse than the disease. SOPA and PIPA are not the answer: they will fatally damage the free and open Internet.\n\t</p>\n</div>\n<div id=\"contacts\">\n\n\t\nHTML;\n\n\t\tif ( $this->getZip() === false ) {\n\t\t\t$htmlOut .= $this->getZipForm( true );\n\t\t} elseif ( !is_null( $this->getZip() )) {\n\t\t\t$htmlOut .= $this->getCongressTables();\n\t\t} else {\n\t\t\t$htmlOut .= $this->getZipForm();\n\t\t}\n\n\t\t// Output end of the page\n\t\t$htmlOut .= \"\\n</div>\\n</div>\\n</body>\\n</html>\\n\";\n\n\t\techo $htmlOut;\n\n\t\treturn true;\n\t}", "public function show($page)\n {\n if (! $page) {\n abort(404);\n }\n \n\n return view('pages.page', compact('page'));\n }", "public function separatePage();", "function render_page($page)\n{\n if($page instanceof DOMElement) {\n $page = element_to_array($page);\n }\n\n if(!isset($page['template'])) {\n if(file_exists(option('views_dir') . 'page.phtml')) {\n // check for default template in VIEWS_DIR\n $view = option('views_dir') . 'page.phtml';\n } else {\n // use the fizzy template\n $view = option('fizzy_dir') . 'page.phtml';\n }\n } \n else {\n $view = $page['template'];\n }\n \n if(isset($page['layout'])) {\n $layout = $page['layout'];\n } else {\n $layout = null;\n }\n \n return render($view, $layout, array('page' => $page));\n}", "public function pageDetailAction() {\n $id = $this->_request->getParam('id');\n $page = new Object_Page($id);\n $pageId = $page->getId();\n if (empty($pageId)) {\n // No page defined, redirec to list page.\n $this->_redirect('/admin/client/page');\n return false;\n }\n\n // Whenever a page is visited, refresh the thumb.\n $page->refreshThumb();\n\n $form = new Form_Admin_Client_Page(false, array('page' => $page));\n\n // Check for page update\n if ($this->_request->isPost()) {\n\n $params = $this->_request->getPost();\n\n if( $params['form-object-tag-list'] ) {\n Repo_TagEntity::getInstance()->removeEntityTags($id, 'page');\n $tags = Zend_Json::decode($params['form-object-tag-list']);\n if (!empty($tags[0])) {\n Repo_TagEntity::getInstance()->addEntityTags($page->client_id, $tags, 'page', $id);\n $this->view->updateMessage = \"Tags saved\";\n }\n\n } else {\n if ($form->isValid($params)) {\n // Update page if necessary\n $form->updatePage($page);\n $form->updatePageNavigation($page);\n $form->setPage($page);\n $form->updateStaticContent($pageId, true);\n } else {\n $form->populate($params);\n }\n }\n }\n\n $this->view->lang = $page->getPageLanguage();\n $this->view->page = $page;\n $this->view->client = new Object_Client($page->client_id);\n $this->view->form = $form;\n // Survey ad page questions\n $this->view->surveyQuestions = Repo_Survey::getInstance()->getSurveyQuestions();\n $this->view->pageQuestions = Repo_PageQuestion::getInstance()->getPageQuestionGroup($pageId);\n\n // Extra js for file upload\n $this->view->headScript()->prependFile('/js/libraries/jquery/jquery.fileupload.js');\n $this->view->headScript()->prependFile('/js/libraries/jquery/jquery.iframe-transport.js');\n $this->view->headLink()->appendStylesheet('/css/jquery.fileupload.css');\n\n // get tags\n $this->view->tagTree = Repo_Tag::getInstance()->getTagTree( $page->client_id );\n $this->view->assetTags = Manager_Tag_Helper::getInstance()->getTagIds( \"page\", $id );\n $this->view->assetTagNames = $page->getTags();\n\n //Tag management js\n $this->view->headScript()->prependFile('/js/managers/TagManager.js');\n\n // js for list sort and search\n $this->view->headScript()->prependFile('/js/libraries/list/list.min.js');\n\n // Page navigation\n $this->view->headScript()->prependFile('/js/PageNavigationUi.js');\n\n // Page pdf template\n $this->view->pagePdfTemplates = Repo_PagePdfTemplate::getInstance()->getPagePdfTemplates($pageId);\n\n // Page versions\n $this->view->pageVersions = Repo_PageVersion::getInstance()->getPageVersions($pageId);\n }", "public function show(Page $page)\n\t{\n\t\treturn view('pages.show', compact('page'));\n\t}", "public function show(Page $page)\n {\n $dir = base_path() . '/resources/views/pages';\n $files = scandir($dir, 1);\n $stack = [];\n foreach ($files as $key => $value) {\n if ($value != '..' && $value != '.')\n array_push($stack, [\"label\" => $value, \"key\" => $key]);\n }\n\n $page['listPage'] = $stack;\n\n return response(['data' => $page]);\n }", "function page($id = false) {\n $data['page'] = $this->Page_model->get_page($id);\n if (!$data['page']) {\n show_404();\n }\n $this->load->model('Page_model');\n $data['base_url'] = $this->uri->segment_array();\n\n $data['fb_like'] = true;\n\n $data['page_title'] = $data['page']->title;\n\n $data['meta'] = $data['page']->meta;\n $data['seo_title'] = (!empty($data['page']->seo_title)) ? $data['page']->seo_title : $data['page']->title;\n\n $data['gift_cards_enabled'] = $this->gift_cards_enabled;\n\n $this->view('page', $data);\n }", "function ciniki_web_generatePage(&$ciniki, $settings) {\n\n //\n // Check if there is a landing page override\n //\n if( isset($ciniki['tenant']['modules']['ciniki.landingpages']) && $ciniki['request']['page'] == 'landingpage' ) {\n $rc = ciniki_core_loadMethod($ciniki, 'ciniki', 'landingpages', 'web', 'generatePage');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( $rc['stat'] == 'ok' ) {\n return ciniki_landingpages_web_generatePage($ciniki, $settings);\n }\n }\n\n $request_pages = array_merge(array($ciniki['request']['page']), $ciniki['request']['uri_split']);\n\n $breadcrumbs = array();\n\n $prev_parent_id = 0;\n $uri_depth = 0;\n $prev_page = NULL;\n $top_page = NULL;\n $page = NULL;\n $article_title = '';\n ciniki_core_loadMethod($ciniki, 'ciniki', 'web', 'private', 'pageLoad');\n $depth = count($request_pages);\n $base_url = $ciniki['request']['base_url'];\n $sponsors = array();\n $pwdpage = array(\n 'uuid' => '', // Used as unique page key for storing session password, allows different passwords on different pages\n 'permalink' => '', // The permalink of the page with the password, could be intermediate page\n 'password' => '',\n 'page_title' => '',\n );\n for($i=0;$i<$depth;$i++) {\n $uri_depth = $i-1;\n //\n // The end of the URI string for loading pages\n //\n if( $i == ($depth-1) ) {\n // Last Page\n $rc = ciniki_web_pageLoad($ciniki, $settings, $ciniki['request']['tnid'], \n array('permalink'=>$request_pages[$i], 'parent_id'=>$prev_parent_id));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $page = $rc['page'];\n //\n // Check if a members only section\n //\n if( ($page['flags']&0x04) == 0x04 ) {\n if( isset($ciniki['session']['customer']['id']) && (!isset($ciniki['session']['customer']['member_status']) || $ciniki['session']['customer']['member_status'] != 10) ) {\n // Logged in but not member\n return array('stat'=>'404', 'err'=>array('code'=>'ciniki.web.185', 'msg'=>'You must be an active member to view this page'));\n } elseif( !isset($ciniki['session']['customer']['id']) || $ciniki['session']['customer']['id'] <= 0 ) {\n // Redirect to login\n if( isset($_SERVER['HTTPS']) ) {\n $_SESSION['login_referer'] = 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];\n } else {\n $_SESSION['login_referer'] = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];\n }\n header('Location: ' . $ciniki['request']['ssl_domain_base_url'] . '/account');\n return array('stat'=>'exit');\n }\n }\n if( ($page['flags']&0x02) == 0x02 && (!isset($ciniki['session']['customer']['id']) || $ciniki['session']['customer']['id'] < 1) ) {\n return array('stat'=>'404', 'err'=>array('code'=>'ciniki.web.99', 'msg'=>'Page not found'));\n }\n $page['depth'] = $i;\n// $base_url .= '/' . $rc['page']['permalink'];\n if( $top_page == NULL ) { \n $top_page = $rc['page']; \n $top_page['base_url'] = $base_url . '/' . $rc['page']['permalink'];\n }\n $breadcrumbs[] = array('name'=>$rc['page']['title'], 'url'=>$base_url . '/' . $rc['page']['permalink']);\n if( isset($rc['page']['sponsors']) && count($rc['page']['sponsors']) > 0 ) {\n $sponsors = $rc['page']['sponsors'];\n }\n //\n // Check if last page, empty with children and page_menu\n // Only display child page automatically when children\n // are to be displayed as a submenu.\n //\n if( $i == 0 && $page['image_id'] == 0 && $page['content'] == '' && isset($page['children']) && count($page['children']) > 0 && ($page['flags']&0x0C90) == 0 ) {\n $depth++;\n $child = array_shift($page['children']);\n reset($page['children']);\n $uri_split[] = $child['permalink'];\n $request_pages[] = $child['permalink'];\n $prev_parent_id = $page['id'];\n $prev_page = $page;\n $base_url .= '/' . $rc['page']['permalink'];\n }\n } \n //\n // Intermediate page\n //\n else {\n $rc = ciniki_web_pageLoad($ciniki, $settings, $ciniki['request']['tnid'], \n array('intermediate_permalink'=>$request_pages[$i], 'parent_id'=>$prev_parent_id));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( $top_page == NULL ) { \n $top_page = $rc['page']; \n $top_page['base_url'] = $base_url . '/' . $rc['page']['permalink'];\n }\n $breadcrumbs[] = array('name'=>$rc['page']['title'], 'url'=>$base_url . '/' . $rc['page']['permalink']);\n\n if( isset($rc['page']['sponsors']) && count($rc['page']['sponsors']) > 0 ) {\n $sponsors = $rc['page']['sponsors'];\n }\n\n //\n // Check if intermediate page is password protected\n //\n if( ($rc['page']['flags']&0x04) == 0x04 ) {\n if( isset($ciniki['session']['customer']['id']) && (!isset($ciniki['session']['customer']['member_status']) || $ciniki['session']['customer']['member_status'] != 10) ) {\n // Logged in but not member\n return array('stat'=>'404', 'err'=>array('code'=>'ciniki.web.185', 'msg'=>'You must be an active member to view this page'));\n } elseif( !isset($ciniki['session']['customer']['id']) || $ciniki['session']['customer']['id'] <= 0 ) {\n // Redirect to login\n if( isset($_SERVER['HTTPS']) ) {\n $_SESSION['login_referer'] = 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];\n } else {\n $_SESSION['login_referer'] = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];\n }\n header('Location: ' . $ciniki['request']['ssl_domain_base_url'] . '/account');\n return array('stat'=>'exit');\n }\n }\n if( isset($rc['page']['flags']) && ($rc['page']['flags']&0x08) == 0x08 \n && $rc['page']['page_password'] != '' \n ) {\n $pwdpage['password'] = $rc['page']['page_password'];\n $pwdpage['permalink'] = $rc['page']['permalink'];\n $pwdpage['title'] = $rc['page']['title'];\n $pwdpage['uuid'] = $rc['page']['uuid'];\n }\n\n //\n // Check if next item is a child, otherwise this is the parent\n //\n if( !isset($rc['page']['children'])\n || !isset($rc['page']['children'][$request_pages[$i+1]]) ) {\n // Load full page details\n $rc = ciniki_web_pageLoad($ciniki, $settings, $ciniki['request']['tnid'], \n array('permalink'=>$request_pages[$i], 'parent_id'=>$prev_parent_id));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $page = $rc['page'];\n $page['depth'] = $i;\n break;\n } else {\n $prev_parent_id = $rc['page']['id'];\n $prev_page = $rc['page'];\n $base_url .= '/' . $rc['page']['permalink'];\n if( !isset($settings['theme']['header-breadcrumbs']) || $settings['theme']['header-breadcrumbs'] == 'no' ) {\n $article_title .= ($article_title!=''?' - ':'') . \"<a href='$base_url'>\" . $rc['page']['title'] . \"</a>\";\n }\n }\n }\n }\n\n //\n // Check if last page is password protected\n //\n if( isset($page['flags']) && ($page['flags']&0x08) == 0x08 && $page['page_password'] != '' ) {\n $pwdpage['password'] = $page['page_password'];\n $pwdpage['permalink'] = $page['permalink'];\n $pwdpage['title'] = $page['title'];\n $pwdpage['uuid'] = $page['uuid'];\n }\n\n //\n // If a password protected page or a page below, make sure password is entered\n //\n if( $pwdpage['password'] != '' ) {\n $page['password_protected'] = 'yes';\n if( !isset($_SESSION['pwdpages'][$pwdpage['uuid']]['authenticated']) \n || $_SESSION['pwdpages'][$pwdpage['uuid']]['authenticated'] != 'yes' \n ) {\n $err_msg = ''; \n if( isset($_POST['password']) && $_POST['password'] == $pwdpage['password'] ) {\n if( !isset($_SESSION['pwdpages']) ) {\n $_SESSION['pwdpages'] = array();\n }\n $_SESSION['pwdpages'][$pwdpage['uuid']] = array('authenticated' => 'yes');\n header('Location: http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);\n exit;\n } elseif( isset($_POST['password']) ) {\n $err_msg = 'Incorrect password';\n }\n //\n // Display the password form\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'web', 'private', 'generatePageHeader');\n $rc = ciniki_web_generatePageHeader($ciniki, $settings, $page['title'], array());\n if( $rc['stat'] != 'ok' ) { \n return $rc;\n }\n $content = $rc['content'];\n\n $content .= \"<div id='content'><article class='page'>\\n\";\n/* if( isset($settings['page-membersonly-message']) && $settings['page-membersonly-message'] != '' ) {\n ciniki_core_loadMethod($ciniki, 'ciniki', 'web', 'private', 'processContent');\n $rc = ciniki_web_processContent($ciniki, $settings, $settings['page-membersonly-message'], 'wide'); \n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $content .= $rc['content'];\n } else { */\n $content .= \"<p>This page is password protected.</p>\";\n// }\n $content .= \"<form method='POST' action=''>\";\n if( $err_msg != '' ) {\n $content .= \"<p class='formerror'>$err_msg</p>\\n\";\n }\n $content .= \"<input type='hidden' name='action' value='signin'>\\n\"\n . \"<div class='input'><label for='password'>Password</label><input id='password' type='password' class='text' maxlength='100' name='password' value='' /></div>\\n\"\n . \"<div class='submit'><input type='submit' class='submit' value='Continue' /></div>\\n\"\n . \"</form>\"\n . \"<br/>\";\n $content .= \"</form>\";\n $content .= \"<br style='clear: both;' />\\n\";\n $content .= \"</article></div>\\n\";\n\n //\n // Add the footer\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'web', 'private', 'generatePageFooter');\n $rc = ciniki_web_generatePageFooter($ciniki, $settings);\n if( $rc['stat'] != 'ok' ) { \n return $rc;\n }\n $content .= $rc['content'];\n return array('stat'=>'ok', 'content'=>$content);\n }\n }\n\n// print \"Showing page: \\n\";\n// print_r($page);\n// print \"</pre>\";\n\n $page_content = '';\n $submenu = array();\n \n $page_menu = array();\n if( $top_page != null && ($top_page['flags']&0x40) == 0x40 && isset($top_page['children']) && count($top_page['children']) > 0 ) {\n foreach($top_page['children'] as $child) {\n $page_menu[] = array('name'=>$child['name'], 'url'=>$top_page['base_url'] . '/' . $child['permalink']);\n }\n } \n\n //\n // Process a module page\n //\n if( $page['page_type'] == '30' ) {\n $base_url .= '/' . $rc['page']['permalink'];\n $domain_base_url = $ciniki['request']['domain_base_url'] . '/' . $ciniki['request']['page'];\n $ssl_domain_base_url = $ciniki['request']['ssl_domain_base_url'] . '/' . $ciniki['request']['page'];\n $ciniki['request']['page-container-class'] = str_replace('.', '-', $page['page_module']);\n\n// $breadcrumbs[] = array('name'=>$page['title'], 'url'=>$base_url . '/' . $ciniki['request']['page']);\n\n if( ($top_page['flags']&0x20) == 0x20 && isset($top_page['children']) ) {\n foreach($top_page['children'] as $child) {\n $submenu[$child['permalink']] = array('name'=>$child['name'],\n 'url'=>$ciniki['request']['base_url'] . '/' . $top_page['permalink'] . '/' . $child['permalink']);\n }\n if( $top_page['id'] == $page['id'] ) {\n unset($page['children']);\n }\n }\n //\n // Process the module request\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'web', 'private', 'processModuleRequest');\n $uri_split = $ciniki['request']['uri_split'];\n for($i = 0; $i < $page['depth']; $i++) {\n array_shift($uri_split);\n }\n $rc = ciniki_web_processModuleRequest($ciniki, $settings, $ciniki['request']['tnid'], $page['page_module'],\n array(\n 'uri_split'=>$uri_split,\n 'base_url'=>$base_url,\n 'domain_base_url'=>$domain_base_url,\n 'ssl_domain_base_url'=>$ssl_domain_base_url,\n 'page_title'=>$page['title'],\n 'page_menu'=>$page_menu,\n 'breadcrumbs'=>$breadcrumbs,\n 'password_protected' => (isset($page['password_protected']) ? $page['password_protected'] : 'no'),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( isset($rc['content']) ) {\n $page_content .= $rc['content'];\n }\n if( isset($rc['fullscreen-content']) ) {\n $page['fullscreen-content'] = $rc['fullscreen-content'];\n }\n $breadcrumbs = $rc['breadcrumbs'];\n if( isset($rc['page_title']) ) {\n $page_title = $rc['page_title'];\n $article_title = $rc['page_title'];\n }\n if( isset($rc['submenu']) ) {\n $submenu = $rc['submenu'];\n }\n } \n\n //\n // Process a manual page, no processing of content, output raw HTML\n //\n elseif( $page['page_type'] == '11' ) {\n //\n // Set the page class\n //\n $ciniki['request']['page-container-class'] = 'page-' . $ciniki['request']['page'];\n\n $page_content .= \"<article class='page'>\\n\";\n if( isset($page['title']) ) {\n $article_title = $page['title'];\n $page_content .= \"<header class='entry-title'><h1 class='entry-title'>\" . $page['title'] . \"</h1>\";\n if( isset($breadcrumbs) ) {\n ciniki_core_loadMethod($ciniki, 'ciniki', 'web', 'private', 'processBreadcrumbs');\n $rc = ciniki_web_processBreadcrumbs($ciniki, $settings, $ciniki['request']['tnid'], $breadcrumbs);\n if( $rc['stat'] == 'ok' ) {\n $page_content .= $rc['content'];\n }\n }\n if( isset($page_menu) && count($page_menu) > 0 ) {\n $page_content .= \"<div class='page-menu-container'><ul class='page-menu'>\";\n foreach($page_menu as $item) { \n $page_content .= \"<li class='page-menu-item'><a href='\" . $item['url'] . \"'>\" . $item['name'] . \"</a></li>\";\n }\n $page_content .= \"</ul></div>\";\n }\n $page_content .= \"</header>\";\n }\n \n //\n // Process any form submissions\n //\n $result_content = '';\n ciniki_core_loadMethod($ciniki, 'ciniki', 'web', 'private', 'processPageForms');\n $rc = ciniki_web_processPageForms($ciniki, $settings, $ciniki['request']['tnid']);\n if( $rc['stat'] != 'ok' ) {\n $result_content .= \"<div class='form-result-message form-error-message'><div class='form-message-wrapper'><p>Error processing request</p></div></div>\";\n }\n if( isset($rc['error_message']) && $rc['error_message'] != '' ) {\n $result_content .= \"<div class='form-result-message form-error-message'><div class='form-message-wrapper'><p>\" . $rc['error_message'] . \"</p></div></div>\";\n }\n if( isset($rc['success_message']) && $rc['success_message'] != '' ) {\n $result_content .= \"<div class='form-result-message form-success-message'><div class='form-message-wrapper'><p>\" . $rc['success_message'] . \"</p></div></div>\";\n }\n\n if( $result_content != '' ) {\n $page_content .= \"<div class='form-message-content'>\"\n . $result_content\n . \"</div>\";\n }\n\n $page_content .= \"<div class='entry-content'>\";\n $page_content .= $page['content'];\n \n $page_content .= \"</div>\";\n $page_content .= \"</article>\";\n } \n \n //\n // Process a custom page\n //\n else { // $page['page_type'] == '10'\n //\n // Check if children should be submenu\n //\n if( ($top_page['flags']&0x20) == 0x20 && isset($top_page['children']) ) {\n foreach($top_page['children'] as $child) {\n $submenu[$child['permalink']] = array('name'=>$child['name'],\n 'url'=>$ciniki['request']['base_url'] . '/' . $top_page['permalink'] . '/' . $child['permalink']);\n }\n if( $top_page['id'] == $page['id'] ) {\n unset($page['children']);\n }\n }\n\n //\n // Set the page class\n //\n $ciniki['request']['page-container-class'] = 'page-' . $ciniki['request']['page'];\n if( $page['permalink'] != $ciniki['request']['page'] ) {\n $ciniki['request']['page-container-class'] .= ' page-' . $ciniki['request']['page'] . '-' . $page['permalink'];\n }\n\n //\n // Check if a file was specified to be downloaded\n //\n $download_err = '';\n if( isset($ciniki['request']['uri_split'][$uri_depth+1]) \n && $ciniki['request']['uri_split'][$uri_depth+1] == 'download' \n && isset($ciniki['request']['uri_split'][$uri_depth+2]) \n && $ciniki['request']['uri_split'][$uri_depth+2] != '' \n && isset($page['files'])\n ) {\n $file_permalink = $ciniki['request']['uri_split'][$uri_depth+2];\n\n //\n // Get the file details\n //\n $strsql = \"SELECT ciniki_web_page_files.id, \"\n . \"ciniki_web_page_files.uuid, \"\n . \"ciniki_web_page_files.name, \"\n . \"ciniki_web_page_files.permalink, \"\n . \"ciniki_web_page_files.extension, \"\n . \"ciniki_web_page_files.description, \"\n . \"ciniki_web_page_files.binary_content \"\n . \"FROM ciniki_web_pages, ciniki_web_page_files \"\n . \"WHERE ciniki_web_pages.tnid = '\" . ciniki_core_dbQuote($ciniki, $ciniki['request']['tnid']) . \"' \"\n . \"AND ciniki_web_pages.permalink = '\" . ciniki_core_dbQuote($ciniki, $page['permalink']) . \"' \"\n . \"AND ciniki_web_pages.id = ciniki_web_page_files.page_id \"\n . \"AND ciniki_web_page_files.tnid = '\" . ciniki_core_dbQuote($ciniki, $ciniki['request']['tnid']) . \"' \"\n . \"AND CONCAT_WS('.', ciniki_web_page_files.permalink, ciniki_web_page_files.extension) = '\" . ciniki_core_dbQuote($ciniki, $file_permalink) . \"' \"\n . \"\";\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.web', 'file');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( !isset($rc['file']) ) {\n return array('stat'=>'404', 'err'=>array('code'=>'ciniki.web.12', 'msg'=>\"I'm sorry, but the file you requested does not exist.\"));\n }\n $file = $rc['file'];\n $filename = $rc['file']['name'] . '.' . $rc['file']['extension'];\n\n //\n // Load the file contents\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'storageFileLoad');\n $rc = ciniki_core_storageFileLoad($ciniki, $ciniki['request']['tnid'], 'ciniki.web.page_file', array('subdir'=>'pagefiles', 'uuid'=>$file['uuid']));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $binary_content = $rc['binary_content'];\n\n header(\"Expires: Mon, 26 Jul 1997 05:00:00 GMT\");\n header(\"Last-Modified: \" . gmdate(\"D,d M YH:i:s\") . \" GMT\");\n header('Cache-Control: no-cache, must-revalidate');\n header('Pragma: no-cache');\n if( $file['extension'] == 'pdf' ) {\n header('Content-Type: application/pdf');\n } elseif( $file['extension'] == 'zip' ) {\n header('Content-Type: application/zip');\n }\n // header('Content-Disposition: attachment;filename=\"' . $filename . '\"');\n header('Content-Length: ' . strlen($binary_content));\n header('Cache-Control: max-age=0');\n\n print $binary_content;\n exit;\n }\n\n if( isset($ciniki['request']['uri_split'][$uri_depth+1]) \n && $ciniki['request']['uri_split'][$uri_depth+1] == 'gallery' \n && isset($ciniki['request']['uri_split'][$uri_depth+2]) \n && $ciniki['request']['uri_split'][$uri_depth+2] != '' \n && isset($page['images'])\n ) {\n $image_permalink = $ciniki['request']['uri_split'][$uri_depth+2];\n\n $base_url .= '/' . $page['permalink'];\n // $article_title = \"<a href='$base_url'>\" . $page['title'] . \"</a>\";\n $article_title .= ($article_title!=''?' - ':'') . \"<a href='$base_url'>\" . $page['title'] . \"</a>\";\n \n ciniki_core_loadMethod($ciniki, 'ciniki', 'web', 'private', 'processGalleryImage');\n $rc = ciniki_web_processGalleryImage($ciniki, $settings, $ciniki['request']['tnid'], array(\n 'item'=>$page,\n 'gallery_url'=>$base_url . '/gallery',\n 'article_title'=>$article_title,\n 'image_permalink'=>$image_permalink\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $page_content .= $rc['content'];\n\n } else {\n if( isset($sponsors) && is_array($sponsors) && count($sponsors) > 0 ) {\n $page['sponsors'] = $sponsors;\n }\n ciniki_core_loadMethod($ciniki, 'ciniki', 'web', 'private', 'processPage');\n $rc = ciniki_web_processPage($ciniki, $settings, $base_url, $page, array('article_title'=>$article_title, 'page_menu'=>$page_menu));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $page_content .= $rc['content'];\n }\n }\n\n if( isset($page['fullscreen-content']) && $page['fullscreen-content'] == 'yes' ) {\n $ciniki['response']['fullscreen-content'] = 'yes';\n } \n\n //\n // Add the header\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'web', 'private', 'generatePageHeader');\n $rc = ciniki_web_generatePageHeader($ciniki, $settings, $top_page['title'], $submenu);\n if( $rc['stat'] != 'ok' ) { \n return $rc;\n }\n $content = $rc['content'];\n\n if( isset($page['fullscreen-content']) && $page['fullscreen-content'] == 'yes' ) {\n $content .= \"<div id='content' class='fullscreen'>\\n\";\n $content .= $page_content;\n $content .= \"</div>\\n\";\n } else {\n //\n // Check if article title and breadcrumbs should be displayed above content\n //\n if( (isset($settings['theme']['header-article-title']) && $settings['theme']['header-article-title'] == 'yes')\n || (isset($settings['theme']['header-breadcrumbs']) && $settings['theme']['header-breadcrumbs'] == 'yes')\n ) {\n $content .= \"<div class='page-header'>\";\n if( isset($settings['theme']['header-article-title']) && $settings['theme']['header-article-title'] == 'yes' ) {\n $content .= \"<h1 class='page-header-title'>\" . $article_title . \"</h1>\";\n }\n if( isset($settings['theme']['header-breadcrumbs']) && $settings['theme']['header-breadcrumbs'] == 'yes' && isset($breadcrumbs) ) {\n ciniki_core_loadMethod($ciniki, 'ciniki', 'web', 'private', 'processBreadcrumbs');\n $rc = ciniki_web_processBreadcrumbs($ciniki, $settings, $ciniki['request']['tnid'], $breadcrumbs);\n if( $rc['stat'] == 'ok' ) {\n $content .= $rc['content'];\n }\n }\n $content .= \"</div>\";\n }\n\n $content .= \"<div id='content'>\\n\";\n $content .= $page_content;\n $content .= \"<br style='clear: both;' />\\n\";\n $content .= \"</div>\\n\";\n }\n\n //\n // Add the footer\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'web', 'private', 'generatePageFooter');\n $rc = ciniki_web_generatePageFooter($ciniki, $settings);\n if( $rc['stat'] != 'ok' ) { \n return $rc;\n }\n $content .= $rc['content'];\n\n return array('stat'=>'ok', 'content'=>$content);\n}", "function active_menu($page=null,$class='active'){\n\t\tshow_in_page($page,$class);\n\t}", "public function getPage() {\n// html for the web page, the header, the main body, \n// the footer sections and closing body and html tags\n\nreturn $this->pageStart.$this->header.\"\\n\".$this->mainBody.\"</main>\\n\".$this->foot.\"\\n</body>\\n</html>\"; \n}", "public function show_page($page_title_code)\n\t{\n\t\t/*\n\t\t| ------------------------------------------------------------------------------\n\t\t| Get the page content using uri segment 2 a reference\n\t\t*/\n\t\t$get_page = $this->query_page->get_page($page_title_code);\n\t\t$row = $get_page->row();\n\t\t\n\t\t/*\n\t\t| ------------------------------------------------------------------------------\n\t\t| Get meta data from tblmeta \n\t\t*/\n\t\t//$q_meta = $this->db->get_where('tblmeta',array('pagename' => $page_title_code . '.php'));\n\t\t$q_meta = $this->query_page->get_page_meta($page_title_code);\n\t\t$meta_row = $q_meta->row();\n\t\t\n\t\t/*\n\t\t| ------------------------------------------------------------------------------\n\t\t| Set some pertinent scripts for specific pages\n\t\t*/\n\t\t$jscript = '\n\t\t\t<script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js\"></script>\n\t\t\t<script type=\"text/javascript\" src=\"'.base_url().'jscript/fancybox/jquery.fancybox-1.3.1.js\"></script>\n\t\t\t<link rel=\"stylesheet\" type=\"text/css\" href=\"'.base_url().'jscript/fancybox/jquery.fancybox-1.3.1.css\" media=\"screen\" />\n\t\t\t<script type=\"text/javascript\">\n\t\t\t\t$(document).ready(function() {\n\t\t\t\t\t$(\"a.press_group\").fancybox({\n\t\t\t\t\t\t\"padding\"\t\t\t: 20,\n\t\t\t\t\t\t\"cyclic\"\t\t\t: true,\n\t\t\t\t\t\t\"autoScale\"\t\t\t: false,\n\t\t\t\t\t\t\"showCloseButton\"\t: true,\n\t\t\t\t\t\t\"showNavArrows\"\t\t: true,\n\t\t\t\t\t\t\"width\"\t\t\t\t: 750,\n\t\t\t\t\t\t\"height\"\t\t\t: \"auto\",\n\t\t\t\t\t\t\"transitionIn\"\t\t: \"fade\",\n\t\t\t\t\t\t\"transitionOut\"\t\t: \"fade\"\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t</script>\n\t\t';\n\t\t\n\t\t/*\n\t\t| ------------------------------------------------------------------------------\n\t\t| Set the variables to pass to the view files\n\t\t*/\n\t\t// Content for other static pages such as Press, Sitemap, Register, & Contact\n\t\t$get_page->num_rows() != 0 || $this->data['page'] = $page_title_code;\n\t\t$page_title_code !== 'press' || $this->data['jscript'] = $jscript;\n\t\t$page_title_code !== 'sitemap' || $this->load->model('query_category');\n\t\t$page_title_code !== 'contact' || $this->data['view'] = 'contact_form';\n\t\t\n\t\t// Content for pages with editable content\n\t\t! isset($row->text) || $this->data['page_text'] = $row->text;\n\t\t\n\t\t// Common content variables\n\t\t$this->data['file']\t\t\t\t= 'page';\n\t\t$this->data['page_title'] \t\t= isset($row->title) ? $row->title : $meta_row->title;\n\t\t$this->data['site_title']\t\t= $meta_row->title;\n\t\t$this->data['site_keywords']\t= $meta_row->keyword;\n\t\t$this->data['site_description']\t= $meta_row->description;\n\t\t$this->data['footer_text']\t\t= $meta_row->dfooter;\n\t}", "static function includePage($title) {\n global $wgParser, $wgUser;\n $pageTitle = Title::newFromText($title);\n if(!$pageTitle->isKnown()) {\n echo 'The page [[' . $title . ']] was not found.';\n } else {\n $wgParserOptions = new ParserOptions($wgUser);\n $parserOutput = $wgParser->parse(self::getPageRawText($title), $pageTitle, $wgParserOptions);\n echo $parserOutput->getText();\n }\n }", "public function show( $params=NULL ) {\n $page = $this->getPage();\n\n // the $params passed are the URI bits and may contain extensions\n // so, clean the file extension off of the $params,\n // and stretch the keys and values into an array of values\n $path = array();\n foreach( $params as $k => $v ) {\n if( $k ) $path[] = pathinfo($k, PATHINFO_FILENAME);\n if( $v ) $path[] = pathinfo($v, PATHINFO_FILENAME);\n }\n\n // check for home page\n if( empty( $path )) $path = array( 'home' );\n $path = '/' . a::glue( $path, '/' );\n $liriope = new Liriope( $path, c::get( 'root.web' ) . '/content' );\n\n // render the Liriope model using it's __toString function\n // this will store the new $page variables that are in the view and content files\n $page->set( 'content', $liriope->render( $page ));\n }", "function showAboutInfo($getPage_connection2) {\n\t$aboutInfo = getAboutInfo($getPage_connection2, 1);\n\t\n\techo \" <div class=\\\"spacing-from-menu well well-lg standard-text\\\">\\n\";\n\techo \" <div class=\\\"well info_well\\\">\\n\";\n\t\n\techo \" <br />\\n\\n\".$aboutInfo[\"text\"].\"<br />\\n\\n\";\n\n\techo \" </div>\\n\";\n\techo \" </div>\\n\";\n}", "function getPageContents($launchpadID,$page,$subpage,$wurl,$launchpadPN,$properties,$THEME_NAME,$HTDN){\n\t$ip=$_SERVER['REMOTE_ADDR'];\n\tif($_SERVER['HTTP_HOST']==$properties->HTTP_HOST){\n\t\t$logged_session=$_COOKIE[$properties->_COOKIE_INIT_TEMP_LOCAL_SESSION];\n\t} else {\n\t\t$logged_session=$_COOKIE[$properties->_COOKIE_INIT_TEMP_REMOTE_SESSION];\n\t}\n\t$CHECK_LOGIN=mysql_query(\"SELECT * FROM {$properties->DB_PREFIX}users WHERE logged_ip='$ip' AND logged_session='$logged_session'\");\n\tif(mysql_num_rows($CHECK_LOGIN)<1){\n\t\t$logged=0;\n\t} else {\n\t\t$logged=1;\n\t\t$FETCH_LOGIN=mysql_fetch_array($CHECK_LOGIN);\n\t\t$loggedin=$FETCH_LOGIN['loggedin'];\n\t\t$tou_s=$FETCH_LOGIN['tou_status'];\n\t\t$in_site=$FETCH_LOGIN['in_site'];\n\t\t$status=$FETCH_LOGIN['status'];\n\t\t$suspended_reason=$FETCH_LOGIN['suspended_reason'];\n\t\tif($tou_s==\"agree\"){$agreed=1;}else if($tou_s==\"disagree\"){$agreed=0;}\n\t\t$username=$FETCH_LOGIN['uname'];\n\t\t$type=$FETCH_LOGIN['type'];\n\t\t$head_admin=$FETCH_LOGIN['head_admin'];\t\t\n\t\t$user_id=$FETCH_LOGIN['id'];\n\t}\n\t\n\t//$launchpad=@$launchpadNAME;\n\t$pageFile=\"includes/public/page.php\";\n\t\n\t//check to see if file exists in db\n\tinclude 'conf/connect.php';\n\t$CHECK_PAGE=mysql_query(\"SELECT * FROM {$properties->DB_PREFIX}pages WHERE lp='$launchpadPN' AND page='$page'\");\n\t$CHECK_SUBPAGE=mysql_query(\"SELECT * FROM {$properties->DB_PREFIX}pages WHERE lp='$launchpadPN' AND subpage='$subpage'\");\n\tif((mysql_num_rows($CHECK_PAGE)<1) || (mysql_num_rows($CHECK_SUBPAGE)<1)){\n\t\t//page not found\n\t\t@$PAGE_NOT_EXISTS=\"1\";\n\t} else {\n\t\t$PAGE_NOT_EXISTS=\"0\";\n\t}\n\t\n\t//load the contents\n\tif($PAGE_NOT_EXISTS==\"0\"){\n\t\tinclude $pageFile;\n\t} else if($PAGE_NOT_EXISTS==\"1\") {\n\t\t//no page found\n\t\t$code=\"404\";\n\t\t$pageFile=\"includes/public/error.php\";\n\t\tinclude $pageFile;\n\t}\n}", "function title_and_navigation($current_page){\n global $tab;\n /* The menu is generated from $menu variable. A node that contains more menu\n content is represented by an array and a node that is a link is represented\n by an associative array where the key is the name and value is the target */\n $menu = array(array(\"Home\" => \"index.php\"),\n\t\tarray(\"Pyg3t\" => \"pyg3t_home.php\"),\n\t\tarray(array(\"Install\" => \"pyg3t_install.php\")),\n\t\tarray(\"PoProofRead\" => \"ppr_home.php\"),\n\t\tarray(array(\"Install\" => \"ppr_install.php\"),\n\t\t array(\"Documentation\" => \"ppr_documentation/html\"),\n\t\t array(\"Development\" => \"ppr_development.php\"),\n\t\t array(\"FAQ\" => \"ppr_faq.php\")),\n\t\tarray(\"Donate\" => \"donate.php\")\n\t\t);\n\n \n p(2, \"<div id=\\\"container\\\">\\n\");\n p(3, \"<div id=\\\"top\\\">\\n\");\n p(4, \"<h1>Homepage for PyG3T and PoProofRead</h1>\\n\");\n p(3, \"</div>\\n\");\n p(3, \"<div id=\\\"navigation\\\">\\n\");\n p(4, \"<ul>\\n\");\n menu(array($menu), 4, 0, $current_page);\n p(4, \"</ul>\\n\");\n p(3, \"</div>\\n\");\n p(3, \"<!-- HERE BEGINS THE CODE FOR THIS PAGE -->\\n\");\n}", "public function is_own_page();", "function htmlpage_view(&$theme,$area_id,$node_id,$module) {\n $record = db_select_single_record('htmlpages','page_data',array('node_id' => intval($node_id)));\n if ($record === FALSE) {\n $msg = \"Oops. Something went wrong with the htmlpage linked to node '$node_id'\";\n $theme->add_message($msg);\n $theme->add_popup_top($msg);\n $retval = FALSE;\n } else {\n// if ((10 <= $node_id) && ($node_id <= 11)) {\n// $msg = 'STUB to demonstrate the message area and popup-function (only pages 10 and 11): <b>'.\n// __FUNCTION__.\"</b>(\\$theme,$area_id,$node_id,{$module['module_id']})\";\n// $theme->add_message($msg);\n// $theme->add_popup_bottom(strip_tags($msg));\n// }\n $theme->add_content($record['page_data']);\n $retval = TRUE;\n }\n return $retval;\n}", "function pageinfo($info) {\n\t\tglobal $page;\n\t\tif(!empty($info)) {\n\t\t\techo $page[$info];\n\t\t}\n\t}", "protected function __generate_page() {\n\n\t\t$request_type = $this->request_type();\n\n\t\tif ( $request_type == 'standard' ) {\n\t\t\techo file_get_contents($this->root . '/views/layout.mustache');\n\t\t\treturn;\n\t\t}\n\n\t\t$page = $this->wp_model->get('page');\n\t\t$comments = $this->wp_model->get('comments');\n\t\t$commentform = $this->wp_model->get('commentform', $page['ID']);\n\t\t$content = array_merge($page, array(\n\t\t\t'author' => $this->wp_model->get('author', $page['post_author'])\n\t\t));\n\n\t\tif ( $request_type == 'async' ) {\n\n\t\t\theader('Content-type: application/json');\n\t\t\techo json_encode(array(\n\t\t\t\t'type' => 'page',\n\t\t\t\t'content' => $content,\n\t\t\t\t'comments' => $comments,\n\t\t\t\t'commentform' => $commentform\n\t\t\t));\n\t\t\texit;\n\n\t\t}\n\n\t\t$content = array_merge($content, $this->get('frame'), $commentform);\n\t\t$content['comments'] = $comments;\n\n\t\t$layout = $this->mustache->loadTemplate('page');\n\t\techo $layout->render($content);\n\n\t}", "private function _pageDisplayWrapper($page)\n {\n $user = Registry::getUser();\n\n if (!is_array($page)) {\n return false;\n }\n\n $resultpage = array();\n\n for ($i=0; $i<sizeof($page); $i++) {\n // Format Date to userdefined chatdateformat\n $resultpage[$i]['date'] = $page[$i]->date->format($user->settings->chat_dateformat);\n\n // Get Displayname\n $resultpage[$i]['displayname'] = $page[$i]->author->displayname;\n\n // Apply Censorship\n if ($user->settings->chat_censorship) {\n $resultpage[$i]['chatline'] = $this->_chatlineCensorship($page[$i]->chatline);\n } else {\n $resultpage[$i]['chatline'] = $page[$i]->chatline;\n }\n\n // Check for special Commands\n $firstword = substr($resultpage[$i]['chatline'], 0, strpos($resultpage[$i]['chatline'], \" \"));\n $rest = strstr($resultpage[$i]['chatline'], \" \");\n\n if ($firstword == \"/me\" || $firstword == \":\") {\n // Actions\n $resultpage[$i]['specialline'] = \"`b* `b\" . $resultpage[$i]['displayname'] . \" \" . $rest;\n\n unset($resultpage[$i]['displayname']);\n unset($resultpage[$i]['chatline']);\n } elseif ($firstword == \"/mes\") {\n // Actions with \"'s\"\n $resultpage[$i]['specialline'] = \"`b* `b\" . $resultpage[$i]['displayname'] . \"'s \" . $rest;\n\n unset($resultpage[$i]['displayname']);\n unset($resultpage[$i]['chatline']);\n } elseif ($firstword == \"/em\" || $firstword == \"/X\") {\n // Emotes\n $resultpage[$i]['specialline'] = $rest;\n\n unset($resultpage[$i]['displayname']);\n unset($resultpage[$i]['chatline']);\n }\n }\n\n $page = array_reverse($resultpage);\n\n return $page;\n }", "function wiki_block_new_page(){\n\n\t$name = optional_param('dfformname',NULL,PARAM_FILE);\n if (isset($name)){\n \twiki_param('page',$name);\n }\n wiki_main_setup();\n}", "public function setPage($page);", "public function setPage($page);" ]
[ "0.6981565", "0.6888289", "0.6888289", "0.6888289", "0.6888289", "0.6888289", "0.6888289", "0.6888289", "0.67947936", "0.6493459", "0.64798284", "0.64548147", "0.64548147", "0.63627636", "0.6282346", "0.6271041", "0.6228985", "0.6210413", "0.61684114", "0.6159041", "0.61263514", "0.6119573", "0.6118175", "0.6105295", "0.6094383", "0.6081555", "0.6060534", "0.604708", "0.6025636", "0.60128784", "0.5992946", "0.59908897", "0.5983327", "0.59776974", "0.59635526", "0.59512043", "0.59497243", "0.5944564", "0.5938213", "0.59352076", "0.59293187", "0.5926873", "0.59263706", "0.59255445", "0.59193164", "0.59119713", "0.5879949", "0.5871215", "0.58711916", "0.5869693", "0.5861349", "0.5860103", "0.58255386", "0.5821981", "0.5817231", "0.5812367", "0.57946455", "0.5794445", "0.57817304", "0.5781693", "0.5779087", "0.576792", "0.5766895", "0.5764612", "0.5758954", "0.5755912", "0.57542443", "0.5746621", "0.57433295", "0.5741265", "0.57374793", "0.5733724", "0.57322586", "0.5731221", "0.5728411", "0.57248867", "0.569655", "0.5692391", "0.5685188", "0.5685051", "0.56835765", "0.566939", "0.5664522", "0.56585646", "0.5657505", "0.5653436", "0.56532395", "0.56514496", "0.5648837", "0.5639451", "0.5635889", "0.56298727", "0.5629483", "0.5623583", "0.5617684", "0.5615627", "0.5613884", "0.5612072", "0.56108934", "0.56108934" ]
0.71076757
0
Helpers Total comment count
Помощники Общее количество комментариев
public function comment_count() { $this->init(); $folder = $this->fetch_param('folder', $this->comment_folder); // defaults to null if ($folder != $this->comment_folder) { $this->get_comment_path(); $folder = $this->comment_folder; // resolve new folder path } if (!$this->total_items) { $this->total_items = Statamic::get_content_count($this->comment_folder, false, true, null, null, null); } return $this->total_items; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCommentCount();", "function getTotalComments()\r\n {\r\n $this->total_comments;\r\n }", "public function getCommentCount()\n {\n return $this->getData('total');\n }", "public function totalComments()\n\t\t{\n\t\t\treturn count($this->comments->response);\n\t\t}", "public function getTotalOfComments()\n {\n $sql = 'SELECT COUNT(id) as counter FROM comments\n WHERE bin != \"yes\" AND report !=\"yes\"\n ';\n $comments = $this->dbConnect($sql);\n $this->comments_count = $comments->fetch();\n $total_comments_count = $this->comments_count['counter'];\n return $total_comments_count;\n }", "public function comments_count_func() {\n global $post, $structure;\n $post = $this->single;\n setup_postdata($post);\n $num = get_comments_number(0, 1, '%');\n return $num;\n }", "public function getCommentCount()\n\t{\n\t\treturn Yii::createComponent($this->module->commentModelClass)\n\t\t\t\t\t->count($this->getCommentCriteria());\n\t}", "public function getCountComment()\n {\n return $this->countComment;\n }", "public function Count(){\n\t\t\treturn $this->pdh->get('comment', 'count', array($this->page, $this->attach_id));\n\t\t}", "public static function number_of_comments(){\n ?>\n <a href=\"<?php comments_link(); ?>\">\n <?php\n comments_number(\n __( 'No comments', 'pinkbutterflies' ),\n '1 ' . __( 'comment', 'pinkbutterflies' ),\n '% ' . __( 'comments', 'pinkbutterflies' )\n );\n ?>\n </a>\n <?php\n }", "function getCommentCount() {\n\t\tglobal $_zp_current_zenpage_page;\n\t\t$id = $this->get('id');\n\t\tif (is_null($this->commentcount)) {\n\t\t\tif ($this->comments == null) {\n\t\t\t\t$count = query_single_row(\"SELECT COUNT(*) FROM \" . prefix(\"comments\") . \" WHERE `type`='pages' AND `inmoderation`=0 AND `private`=0 AND `ownerid`=\" . $id);\n\t\t\t\t$this->commentcount = array_shift($count);\n\t\t\t} else {\n\t\t\t\t$this->commentcount = count($this->comments);\n\t\t\t}\n\t\t}\n\t\treturn $this->commentcount;\n\t}", "function countComments() {\n\n $db = Connection::getInstance();\n $count = $db->query('SELECT COUNT(*) FROM comments');\n $count2 = $count->fetchColumn();\n return $count2;\n }", "public function getcommentCount() {\n $select = $this->select()\n\t\t\t\t//->setIntegrityCheck(false)\n ->from(array(\"pcmt\" => $this->POST_COMMENT_TBL), Array(\"cnt\" => \"count(*)\"))\n\t\t\t\t//->joinleft(array('usr' => $this->USER_TBL), \"usr.usr_lgn_id = pcmt.cmt_lgn_id\", array('usr_name','usr_id'))\n ->where(\"cmt_status != 2\"); \n $rows = parent::fetchRow($select);\n return($rows->cnt);\n }", "public function getCommentCount()\n {\n return count($this->comments);\n }", "public function getCommentCount()\n {\n return $this->comments->count();\n }", "public function countComments()\n {\n return Comment::count('downloads', $this->id);\n }", "public function countComments()\n {\n $db = DB::conn();\n $count = $db->row(\"SELECT COUNT(*) as count FROM comment\n WHERE thread_id = ?\", array($this->id));\n return $count['count'];\n }", "public function countComments()\r\n {\r\n $sql = 'SELECT COUNT(*) AS nb_comments FROM comment';\r\n $req = $this->getPDO()->query($sql);\r\n $count = $req->fetch(); // Il y a toujours 1 ligne dans le résultat\r\n return $count['nb_comments'];\r\n }", "public function countComments()\n {\n return Comment::count('news', $this->id);\n }", "function ajan_activity_comment_count() {\n\techo ajan_activity_get_comment_count();\n}", "function getCommentCount() {\r\n\t\tif ($this->comment_count == null) {\r\n\t\t\t// Fetch comment count\r\n\t\t\t$this->comment_count = Comment::countComments ( $this->id );\r\n\t\t}\r\n\t\treturn $this->comment_count;\r\n\t}", "public function getNbComment(){\n $query = $this->getEntityManager()\n ->createQuery(\n 'SELECT COUNT(p.id)\n FROM CinheticPublicBundle:Comments p'\n );\n\n\n return (int)array_shift($query->getOneOrNullResult());\n\n }", "function GetCommentCount($comments) {\n\t\t$commentCount=0;\n\t\tforeach($comments AS $k=>$v) {\n\t\t\t$commentCount+=$v;\n\t\t}\n\t\treturn $commentCount;\n\t}", "public function getCommentCount()\n {\n return Comment::find()->where([\n 'model' => self::COMMENT_FOR,\n 'parent_id' => $this->id,\n 'status' => Comment::STATUS_APPROVED,\n ])->count();\n }", "function coaching_pro_comment_count() {\n\tadd_filter( 'genesis_title_comments', '__return_null' );\n\tif ( is_single() ) {\n\t\tif ( have_comments() ) {\n\t\t\techo '<div class=\"comment-count-heading\"><h3>';\n\t\t\tcomments_number( 'No Comments', '(1) Comment', '(%) Comments' );\n\t\t\techo '</h3></div>';\n\t\t}\n\t}\n}", "function pineapple_pings_count(){\n\tglobal $id;\n\t//array containing all comments and pings\n\t$comments = get_approved_comments($id);\n\t$count = 0;\n\tforeach( $comments as $comment ){\n\t\t//if it's not a real comment, increase the count\n\t\tif( $comment->comment_type != '' ){\n\t\t\t$count++;\n\t\t}\n\t}\n\treturn $count;\n}", "public function getNumComments() {\n $sql = 'select count(*) as NumComments from T_COMMENT';\n $result = $this->executeRequest($sql);\n $line = $result->fetch(); // Result always return 1 line\n return $line['NumComments'];\n }", "function getTotalComments() {\r\n $bdd = getBdd();\r\n $sql = 'SELECT c.content, c.created_at, a.username FROM comments as c INNER JOIN accounts as a ON c.actors_id = a.id';\r\n $req = $bdd->query($sql);\r\n $req->execute();\r\n\r\n //$resultat = $req->fetchAll()\r\n return $req->rowcount();\r\n}", "public function getNbComments() {\n \n $nb_com = 0;\n foreach($this->comments as $com) { $nb_com++; }\n \n return $nb_com;\n }", "public function get_comments_count()\n\t{\n\t\treturn $this->comments_count;\n\t}", "public function getCommentCount()\n\t{\n\t\tif(array_key_exists('commentCount', $this->article))\n\t\t{\n\t\t\treturn $this->article['commentCount'];\n\t\t}else\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "function comment_count( $count ) {\r\n\tif ( !is_admin() ) {\r\n\t\tglobal $id;\r\n\t\t$comments_by_type = &separate_comments(get_comments('status=approve&post_id=' . $id));\r\n\t\treturn count($comments_by_type['comment']);\r\n\t} else {\r\n\t\treturn $count;\r\n\t}\r\n}", "public function countAllComments(){\n $comments = count($this->comments);\n $replies = count($this->replies);\n $userComments = $comments + $replies;\n return $userComments;\n }", "function b_f_comment_count( $count ) {\n\tglobal $id;\n\t$comment_count = 0;\n\t$comments = get_approved_comments($id);\n\tforeach ( $comments as $comment ) {\n\t\tif ($comment->comment_type === '') {\n\t\t\t$comment_count++;\n\t\t}\n\t}\n\treturn $comment_count;\n}", "public function loadCommentCount() {\n\t\t$this->taskCommentDA = new TaskCommentDA();\n\t\t$this->taskCommentDA->setDatabase($this->database);\n\t\t$returnValue = $this->taskCommentDA->getCommentCount($this->getId());\n\t\tif($returnValue['success'])\n\t\t{\n\t\t\t$this->article['commentCount'] = $returnValue['data'][0];\n\t\t}else\n\t\t{\n\t\t\t$this->article['commentCount'] = false;\n\t\t}\n\t\tunset($this->taskCommentDA);\n\t}", "function get_comments_number() {\n\t\t// the comment template\n\t\tglobal $user_ID;\n\n\t\t$comment_args = array(\n\t\t\t'order' => 'ASC',\n\t\t\t'orderby' => 'comment_date_gmt',\n\t\t\t'status' => 'approve',\n\t\t\t'post_id' => get_the_ID(),\n\t\t);\n\n\t\t$commenter = wp_get_current_commenter();\n\t\t$comment_author_email = $commenter['comment_author_email'];\n\n\n\t\tif ( $user_ID ) {\n\t\t\t$comment_args['include_unapproved'] = array( $user_ID );\n\t\t} elseif ( ! empty( $comment_author_email ) ) {\n\t\t\t$comment_args['include_unapproved'] = array( $comment_author_email );\n\t\t}\n\n\n\t\t$my_comments = get_comments( $comment_args );\n\t\t$separate_comments = separate_comments( $my_comments );\n\n\t\t$count = count( $separate_comments[\"comment\"] );\n\t\treturn $count;\n\t}", "function get_comments_number() {\n\tglobal $entry;\n\treturn $entry['comment_count'];\n}", "public function getNbCommentAdmin()\n {\n $db = $this->dbConnect();\n $req = $db->query('SELECT posts.title AS title, COUNT(comments.id) AS nb_comments, posts.content AS content, posts.id AS post_id, posts.creation_date AS creation_date_fr \n FROM posts\n LEFT JOIN comments ON comments.post_id = posts.id\n GROUP BY posts.id');\n return $req;\n }", "protected function _getNbrOfComments()\n {\n\n $BlogArticlesComments = TableRegistry::get('BlogArticlesComments');\n $count_validated_comments = $BlogArticlesComments->find('all')->where(['article_id' => $this->id, 'approved' => 1])->count();\n\n return (!empty($count_validated_comments)) ? $count_validated_comments : 0;\n }", "public function getNbCommentsActif(){\n\n $nbCommentsActif = DB::table('comments')\n ->where('state',1)\n ->count();\n return $nbCommentsActif;\n }", "public function getNumberOfComments()\n {\n return $this->numberOfComments;\n }", "function UserCommentCount()\r\n{\r\n $commentcolvalue = isset($_SESSION['useremail']) ? $_SESSION['useremail'] : \"\";\r\n \r\n $commenttable = 'COMMENT';\r\n $commentcolname = 'COMMENT_EMAIL';\r\n $commentcoltype = \"s\";\r\n return GetCount($commenttable,$commentcolname,$commentcolvalue,$commentcoltype);\r\n \r\n}", "public function getNbComments() \n {\n $strSQL = 'select count(*) as nbComments from T_COMMENT';\n $result = $this->executeQuery($strSQL);\n \n $result->setFetchMode(PDO::FETCH_OBJ);\n\n return $result->fetch()->nbComments;\n }", "function get_comment_pages_count($comments = \\null, $per_page = \\null, $threaded = \\null)\n{\n}", "public function getArticleCommentCount()\n {\n return $this->article_comment_count;\n }", "function tech_comment_count( $count ) { \n\tif ( ! is_admin() ) {\n\t\tglobal $id;\n\t\t$comments_by_type = &separate_comments(get_comments('status=approve&post_id=' . $id));\n\t\treturn count($comments_by_type['comment']);\n\t} else {\n\treturn $count;\n\t}\n}", "public function count(){\n\t\treturn $this->db->query('SELECT COUNT(*) FROM commente')->fetchColumn();\n\t}", "public function countComments (){\n\t\t\tglobal $con;\n\t\t\t$type = 1;\n\t\t\t$sql = \"SELECT * FROM comments WHERE status= ?\";\n\t\t\t$stmt = $con->prepare($sql);\n\t\t\t$stmt->bindParam(1,$type);\n\t\t\t$stmt->execute();\n\n\t\t\t$count = $stmt->rowCount();\n\t\t\treturn $count;\n\t\t}", "public function getTotalCount() {}", "public function getTotalCount() {}", "function getCommentsDataCount($post_id) {\n \n global $dbh;\n $stmtComment = $dbh->prepare('SELECT\n comment_id,\n comment_post_id,\n comment_author,\n comment_author_email,\n comment_author_url,\n comment_author_ip,\n comment_date,\n comment_content,\n comment_karma,\n comment_approved,\n comment_type,\n comment_agent,\n user_id\n FROM nc_comments\n WHERE comment_post_id = :comment_post_id AND comment_approved = :comment_approved\n ');\n $arrComment = array(\":comment_post_id\" => $post_id, \":comment_approved\" => 1);\n $stmtComment->execute($arrComment);\n $totalComment = $stmtComment->rowCount();\n return $totalComment ; \n\n }", "public function countPublishComment() {\n $sql = 'SELECT count(*) as nbComments from comments WHERE publish = 1';\n $result = $this->executeRequest($sql) ;\n $line = $result->fetch() ;\n return $line['nbComments'] ; \n }", "function capezzahill_comment_count() {\r\n if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) {\r\n echo '<span class=\"comments-link\"></span>';\r\n echo capezzahill_get_icon_svg( 'comment', 16 );\r\n\r\n /* translators: %s: Name of current post. Only visible to screen readers. */\r\n comments_popup_link( sprintf( __( 'Leave a comment<span class=\"screen-reader-text\"> on %s</span>', 'capezzahill' ), get_the_title() ) );\r\n\r\n echo '</span>';\r\n }\r\n }", "function mdv_comment_word_count() {\r\n global $wpdb;\r\n\r\n\t$words = $wpdb->get_results(\"SELECT comment_content FROM $wpdb->comments WHERE comment_approved = '1'\");\r\n\tif ( $words ) {\r\n\t\t$oldcount = 0;\r\n\t\tforeach ( $words as $word ) {\r\n\t\t\t$comment = strip_tags( $word->comment_content );\r\n\t\t\t$comment = explode( ' ', $comment );\r\n\t\t\t$count = count( $comment );\r\n\t\t\t$totalcount = $count + $oldcount;\r\n\t\t\t$oldcount = $totalcount;\r\n\t\t}\r\n\t} else {\r\n\t\t$totalcount = 0;\r\n\t}\r\n\r\n\techo number_format( $totalcount );\r\n}", "public function getTotalCount();", "public function getTotalCount();", "public function getTotalCount();", "public function getTotalCount();", "function vira_comment_count()\n {\n if (!post_password_required() && (comments_open() || get_comments_number())) {\n echo '<span class=\"comments-link\">';\n echo vira_get_icon_svg('comment', 16);\n\n /* translators: %s: Post title. Only visible to screen readers. */\n comments_popup_link(sprintf(__('Leave a comment<span class=\"screen-reader-text\"> on %s</span>', 'twentynineteen'), get_the_title()));\n\n echo '</span>';\n }\n }", "function get_comment_count($post_id = 0)\n{\n}", "public function getTotalCount(){}", "function count_comments( $post_id ){\n global $db;\n $query = \"SELECT COUNT(*) as total FROM comments WHERE post_id = $post_id\";\n $result = $db->query( $query );\n if ( $result->num_rows == 1 ) {\n $row = $result->fetch_assoc();\n $comments_number = $row['total'];\n //display then number with the correct grammer\n if ( $comments_number == 1 ) {\n echo '1 Comment';\n }elseif ( $comments_number == 0 ) {\n echo '0 Comments';\n }else{\n echo $comments_number . ' comments';\n }\n }\n}", "public function countValidateComment() {\n $sql = 'SELECT count(*) as nbComments from comments WHERE publish = 0';\n $result = $this->executeRequest($sql);\n $line = $result->fetch();\n return $line['nbComments']; \n }", "function wp_count_comments($post_id = 0)\n{\n}", "public function edit()\n {\n $count = 0;\n \n foreach ($this->comments as $Comment) {\n $count += $Comment->edit();\n }\n \n return $count;\n }", "public function getPhotoCommentCount() {\n return $this->photoCommentCount;\n }", "function getNumComments_upto($pCommentId = NULL, $pContentId = NULL) {\n\n\t\t$comment = new LibertyComment($pCommentId, $pContentId);\n\n\t\t#assume flat mode\n\t\t$comment_fields = $comment->mInfo;\n\t\t$created = $comment_fields['created'];\n\t\t$contentId = $comment_fields['root_id'];\n\n\t\t$commentCount = 0;\n\t\tif ($contentId) {\n\t\t\t$sql = \"SELECT count(*)\n\t\t\t\t\tFROM `\".BIT_DB_PREFIX.\"liberty_comments` tc LEFT OUTER JOIN\n\t\t\t\t\t `\".BIT_DB_PREFIX.\"liberty_content` tcn\n\t\t\t\t\t ON (tc.`content_id` = tcn.`content_id`)\n\t\t\t\t where tc.`root_id` =? and `created` < ?\";\n\t\t\t$commentCount = $this->mDb->getOne($sql, array($contentId, $created));\n\t\t}\n\t\treturn $commentCount;\n\t}", "public function getCommentsCount() {\n return CommentCount::getCommentCount($this->id, CommentCount::COMMENTABLE_TRANSFER);\n }", "function count_comments($post_id) {\n\tglobal $db;\n\t$query = \"SELECT COUNT(*) as total\n\t\t\t\t\t\tFROM comments\n\t\t\t\t\t\tWHERE post_id = $post_id\";\n\t$result = $db->query($query);\n\tif($result->num_rows == 1) {\n\t\t$row = $result->fetch_assoc();\n\t\t$comments_number = $row['total'];\n\t\tif($comments_number == 1) {\n\t\t\techo '1 Comment';\n\t\t}elseif($comments_number == 0) {\n\t\t\techo '0 Comments';\n\t\t}else {\n\t\t\techo $comments_number . ' comments';\n\t\t} //end if\n\t} //end if\n}", "function comment_per_post(){\n $args = array(\n 'post_id' => get_the_ID( ), // Use post_id, not post_ID\n 'count' => true // Return only the count\n );\n $comments_count = get_comments( $args );\n return $comments_count;\n}", "function comment_count() { \n global $post;$thePostID = $post->ID; \n global $wpdb;\n $count = \"SELECT COUNT(*) FROM $wpdb->comments WHERE comment_type = ' ' AND comment_post_ID = $thePostID\"; \n $co_number = $wpdb->get_var($count);\n if ($co_number == 10000000) { } \n else {echo $co_number;} \n}", "static public function get_rendered_comments_count(Node $ar)\n\t{\n\t\treturn I18n\\t('comments.count', array(':count' => $ar->comments_count));\n\t}", "public function post_comment_count($id) {\n$post = Post::where('id',$id)->withCount('comment')->get();\nforeach($post as $post_comments){\nreturn $post_comments->comment_count;}\n}", "function getCommentCount() {\n global $connection;\n \n $query = \"SELECT * FROM comments \";\n\n $result = mysqli_query( $connection, $query );\n \n confirmQuery( $result );\n \n $count = mysqli_num_rows($result);\n\n return $count;\n }", "function getNoOfComments($pdo)\n{\n $query = $pdo->prepare(\"SELECT COUNT(*) AS total_c FROM post_comment WHERE post_cmnt_id=:post_id\");\n $query->execute(array(\n ':post_id' => $_REQUEST['post_id'],\n ));\n $res = $query->fetch(PDO::FETCH_ASSOC);\n return $res['total_c'];\n}", "public static function total ($i) {\n\t\treturn DB::shift (\n\t\t\t'select\n\t\t\t\tcount(*)\n\t\t\tfrom\n\t\t\t\tcomments\n\t\t\twhere\n\t\t\t\tcomments.identifier = ? and\n\t\t\t\tcomments.status = 1',\n\t\t\t$i\n\t\t);\n\t}", "public function countNewsCommentResponses() {\n\t\t$objectTypeID = $this->getObjectTypeID('com.woltlab.wcf.comment.commentableContent', 'de.codequake.cms.news.comment');\n\n\t\t$sql = 'SELECT COUNT(*) AS count\n\t\t\tFROM wcf' . $this->dbNo . '_comment_response\n\t\t\tWHERE commentID IN (\n\t\t\t\tSELECT commentID\n\t\t\t\tFROM wcf' . $this->dbNo . '_comment\n\t\t\t\tWHERE\tobjectTypeID = ?\n\t\t\t)';\n\t\t$statement = $this->database->prepareStatement($sql);\n\t\t$statement->execute(array($objectTypeID));\n\t\t$row = $statement->fetchArray();\n\n\t\treturn $row['count'];\n\t}", "public function totalCommentsByUser($uid) {\n\t\t$query = new CDbCriteria();\n\t\t$query->select = array(\"count(*) AS commentscount\");\n\t\t$query->addCondition(\"uid=:uid\");\n\t\t$query->params[\":uid\"] = $uid;\n\t\t$query->addCondition(\"status=:status\");\n\t\t$query->params[\":status\"] = 1;\n\t\t$res = $this->find($query);\n\n\t\treturn $res->commentscount;\n\t}", "function get_total_comment_count($profileid) {\r\n\tif (DEBUG)\r\n\t writelog(\"profile.class.php :: get_total_comment_count() : \", \"Start Here \", false);\r\n\t$query_comment_count = \"SELECT COUNT(*) FROM testimonials WHERE parent_tst_id='$profileid'\";\r\n\t$result_comment_count = execute_query($query_comment_count, false, \"select\");\r\n\r\n\t$result_comment_count['COUNT(*)'] = isset($result_comment_count['COUNT(*)']) ? $result_comment_count['COUNT(*)'] : NULL;\r\n\tif (DEBUG) {\r\n\t writelog(\"profile.class.php :: get_total_comment_count() : \", $query_comment_count, false);\r\n\t writelog(\"profile.class.php :: get_total_comment_count() : \", \"End Here \", false);\r\n\t}\r\n\treturn $result_comment_count['COUNT(*)'];\r\n }", "function pzdc_merchant_comment_count($echo = TRUE, $identifier = FALSE) {\n global $PraizedCommunity;\n $count = intval($PraizedCommunity->tpt_attribute_helper('merchant', 'comment_count', FALSE, $identifier));\n if ( $echo )\n echo $count;\n return $count; \n}", "function printTotalComments(){\n$commentsArray = query_single_row(\"SELECT count(*) FROM \".prefix('comments').\" WHERE inmoderation = 0\"); \n$commentsNumber = array_shift($commentsArray); \necho ($commentsNumber);\n}", "public function count()\n {\n $qb = $this->_em->createQueryBuilder();\n $qb->select('COUNT(c)')\n ->from('ARVBlogBundle:Comment', 'c');\n\n return (int)$qb->getQuery()->getSingleScalarResult();\n }", "public function count()\n {\n return $this->db->query('SELECT COUNT(*) FROM commentaires')->fetchColumn();\n }", "public function countSignalComment() {\n $sql = 'SELECT count(*) as nbComments from comments WHERE signalComment = 1';\n $result = $this->executeRequest($sql) ;\n $line = $result->fetch() ;\n return $line['nbComments'] ; \n }", "public function getLinesOfCommentsCount() {\n\t\treturn $this->getFilteredLinesCount( SourceLineFilter::FILTER_COMMENT );\n\t}", "public function getCommentStats(){\n\n $userId = $this->getUserId();\n\n $conn = Db::getConnection();\n $result = $conn->prepare(\"select COUNT(*) from Comments where userId = :id\");\n $result->bindValue(':id', $userId);\n $result->execute();\n $commentStats = $result->fetch();\n return $commentStats;\n }", "public function getCommentsCount() {\n if ($this->fileName == '')\n throw new Exception('No file name specified');\n //check whether workshett name is set or not\n if ($this->worksheetName == '')\n throw new Exception('Worksheet name not specified');\n $strURI = Product::$baseProductUri . '/cells/' . $this->fileName .\n '/worksheets/' . $this->worksheetName . '/comments';\n $signedURI = Utils::sign($strURI);\n $responseStream = Utils::processCommand($signedURI, 'GET', '', '');\n $json = json_decode($responseStream);\n return count($json->Comments->CommentList);\n\n }", "public function getThreadCount()\n {\n return Comment::find()->select(['thread'])->where([\n 'model' => self::COMMENT_FOR,\n 'parent_id' => $this->id,\n 'status' => Comment::STATUS_APPROVED,\n ])->distinct()->count();\n }", "function fbc_facebook_comment_count($ccount='') {\n\t\tglobal $fbc_options, $wp_query;\n\t $postUrl = get_permalink($wp_query->post->ID);\n echo \"<span class='fb_comments_link_text'>View <span data-href='$postUrl'></span> <span class='fb_comments_text'> comments</span></span>\";\n\t}", "public function getpostcommentCount($where) {\n $select = $this->select()\n\t\t\t\t->setIntegrityCheck(false)\n ->from(array(\"pcmt\" => $this->POST_COMMENT_TBL), Array(\"cnt\" => \"count(*)\"))\n\t\t\t\t->joinleft(array('usr' => $this->USER_TBL), \"usr.usr_lgn_id = pcmt.cmt_lgn_id\", array('usr_name','usr_id'))\n ->where(\"cmt_status != 2\");\n\t\t\t\t//echo $select;exit;\n if ($where != \"\") {\n $select->where($where);\n }\n $rows = parent::fetchRow($select);\n return($rows->cnt);\n }", "function smarty_function_mtblogcommentcount($args, &$ctx) {\n if (!(\n isset($args['include_blogs']) ||\n isset($args['include_websites']) ||\n isset($args['exclude_blogs']) ||\n isset($args['exclude_websites']) ||\n isset($args['blog_ids']) ||\n isset($args['site_ids']) ||\n isset($args['blog_id'])\n )) {\n # If blogid modifier was not found then should use current blogid\n $args['blog_id'] = $ctx->stash('blog_id');\n }\n $count = $ctx->mt->db()->blog_comment_count($args);\n return $ctx->count_format($count, $args);\n}", "function count_comments( $post_id ){\n\tglobal $db;\n\t//count the approved comments on the post\n\t$query = \"SELECT COUNT(*) AS total \n\tFROM comments\n\tWHERE post_id = $post_id\n\tAND is_approved = 1\";\n\t//run it!\n\t$result = $db->query($query);\n\t//check it\n\tif( $result->num_rows >= 1 ){\n\t\t//loop it\n\t\twhile( $row = $result->fetch_assoc() ){\n\t\t\techo '<span class=\"comment-count\">' . $row['total'] . '</span>';\n\t\t} //end while loop\n\t\t\n\t\t//free it\n\t\t$result->free();\n\t} //end if\t\n}", "public function commentCount(string $imageOrAlbumId): int\n {\n return $this->requestGet(\"gallery/{$imageOrAlbumId}/comments/count\");\n }", "function get_total_comment_count_photo($photoId) {\r\n $query_comment_count = \"SELECT COUNT(*) as totalcomment FROM photo_comments WHERE parent_id ='$photoId'\";\r\n $result_comment_count = execute_query($query_comment_count, false, \"select\");\r\n $result_comment_count['totalcomment'] = isset($result_comment_count['totalcomment']) && ($result_comment_count['totalcomment']) ? $result_comment_count['totalcomment'] : 0;\r\n return $result_comment_count['totalcomment'];\r\n }", "public static function get_comment_count($discussion_id){\n $comment_count=DB::table('comment_discussions')->select(DB::raw('count(*) as comments_total'))->where('comment_discussions.discussion_id','=',$discussion_id)->get();\n \n \n\n return $comment_count;\n \n }", "public function getCountCommentsGroupByViewed(){\n\t \t$objComment = $this->loadModel('comment');\n\t\t$arr = $objComment->find('all',array('recursive'=>-1,'conditions'=>array('comment.journal_id'=>$this->getID()),'group'=>'comment.viewed','fields'=>array('count(1) total','viewed')));\n\t\t\n\t\t$arrReturn = array('viewed'=>0,'notviewed'=>0);\n\t\tif(is_array($arr)){\n\t\t\tforeach($arr as $key => $value){\n\t\t\t\tif($value['comment']['viewed'] == 1){\n\t\t\t\t\t$arrReturn['viewed'] = $value[0]['total'];\n\t\t\t\t}else{\n\t\t\t\t\t$arrReturn['notviewed'] = $value[0]['total'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $arrReturn;\n\t }", "function ajan_activity_recurse_comment_count( $comment, $count = 0 ) {\n\n\t\t\tif ( empty( $comment->children ) )\n\t\t\t\treturn $count;\n\n\t\t\tforeach ( (array) $comment->children as $comment ) {\n\t\t\t\t$count++;\n\t\t\t\t$count = ajan_activity_recurse_comment_count( $comment, $count );\n\t\t\t}\n\n\t\t\treturn $count;\n\t\t}", "public function countById()\n {\n\n return $this->db->query('SELECT COUNT(*) FROM commentaires WHERE parentId = :parentId')->fetchColumn();\n\n }", "public function count_comments($modded = '0')\n\t{\n\t\treturn $this->db->where('modded', $modded)->count_all_results('comments');\n\t}", "private function calcCommentsModerate()\n {\n $this->comments = CommentPost::where('moderate', '=', 1)->count();\n $this->comments += CommentAnswer::where('moderate', '=', 1)->count();\n }" ]
[ "0.84882176", "0.8334253", "0.827994", "0.7962099", "0.79590535", "0.79137826", "0.78466773", "0.77872294", "0.7786665", "0.7740429", "0.77338487", "0.76828206", "0.76663667", "0.76649934", "0.76510423", "0.7619612", "0.7609033", "0.7607735", "0.7602193", "0.7567774", "0.7557015", "0.7496013", "0.7481055", "0.7474738", "0.7451353", "0.7385072", "0.734162", "0.7320479", "0.731911", "0.73011017", "0.7259208", "0.72521573", "0.7234249", "0.72237515", "0.7217452", "0.7213103", "0.7210474", "0.7207177", "0.71991587", "0.71969247", "0.71769005", "0.7172985", "0.7168802", "0.71687764", "0.71585286", "0.71554244", "0.71486586", "0.7113531", "0.7099749", "0.7099749", "0.70919204", "0.70868015", "0.7083167", "0.70684683", "0.70580995", "0.70580995", "0.70580995", "0.70580995", "0.70519835", "0.7042734", "0.7024126", "0.70209676", "0.7013659", "0.6987025", "0.69866025", "0.69847685", "0.6972396", "0.6946488", "0.69361645", "0.6931648", "0.69315124", "0.69291526", "0.69212115", "0.6910979", "0.6910414", "0.6896626", "0.68889344", "0.6882495", "0.6870328", "0.6863714", "0.68605924", "0.6859492", "0.6842072", "0.6821898", "0.68005425", "0.67804015", "0.6774151", "0.6752084", "0.6745387", "0.67332083", "0.6725174", "0.6716806", "0.67143416", "0.6708543", "0.6701649", "0.66994804", "0.66987044", "0.66879725", "0.6647389", "0.663738" ]
0.8352132
1
Generate a javascript file that imports plugins.
Создайте файл javascript, который импортирует плагины.
private function generatePluginsJs() { $plugins = array_map( function ($file) { return " require('./plugins/{$file}/index.js')(on, config);"; }, $this->plugins ); array_unshift($plugins, '// Automatically generated by the Cypress module for Drupal.', 'module.exports = (on, config) => {' ); $plugins[] = '};'; return implode("\n", $plugins); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ft_make_scripts() {\n global $ft;\n $scripts = array();\n if (INSTALL != \"SIMPLE\") {\n $scripts[] = 'jquery-1.2.1.pack.js';\n $scripts[] = 'filethingie.js';\n }\n $result = ft_invoke_hook('add_js_file');\n $scripts = array_merge($scripts, $result);\n foreach ($scripts as $c) {\n echo \"<script type='text/javascript' charset='utf-8' src='js/{$c}'></script>\\r\\n\";\n }\n}", "function export_add_js()\n{\n}", "function js_pluginscripts(){\n $list = array();\n $plugins = plugin_list();\n foreach ($plugins as $p){\n $list[] = DOKU_PLUGIN.\"$p/script.js\";\n }\n return $list;\n}", "protected function generateSupportJs() {\n $index = array_map(function ($name) {\n return \"require('./support/$name/index.js');\";\n }, $this->support);\n array_unshift(\n $index,\n '// Automatically generated by the Cypress module for Drupal.'\n );\n return implode(\"\\n\", $index);\n }", "protected function generateJavascript() {}", "protected function generateJavascript() {}", "function js_out(){\n global $conf;\n global $lang;\n global $config_cascade;\n\n // The generated script depends on some dynamic options\n $cache = new cache('scripts'.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'],'.js');\n $cache->_event = 'JS_CACHE_USE';\n\n // load minified version for some files\n $min = $conf['compress'] ? '.min' : '';\n\n // array of core files\n $files = array(\n DOKU_INC.\"lib/scripts/jquery/jquery$min.js\",\n DOKU_INC.'lib/scripts/jquery/jquery.cookie.js',\n DOKU_INC.\"lib/scripts/jquery/jquery-ui$min.js\",\n DOKU_INC.\"lib/scripts/jquery/jquery-migrate$min.js\",\n DOKU_INC.'inc/lang/'.$conf['lang'].'/jquery.ui.datepicker.js',\n DOKU_INC.\"lib/scripts/fileuploader.js\",\n DOKU_INC.\"lib/scripts/fileuploaderextended.js\",\n DOKU_INC.'lib/scripts/helpers.js',\n DOKU_INC.'lib/scripts/delay.js',\n DOKU_INC.'lib/scripts/cookie.js',\n DOKU_INC.'lib/scripts/script.js',\n DOKU_INC.'lib/scripts/tw-sack.js',\n DOKU_INC.'lib/scripts/qsearch.js',\n DOKU_INC.'lib/scripts/tree.js',\n DOKU_INC.'lib/scripts/index.js',\n DOKU_INC.'lib/scripts/drag.js',\n DOKU_INC.'lib/scripts/textselection.js',\n DOKU_INC.'lib/scripts/toolbar.js',\n DOKU_INC.'lib/scripts/edit.js',\n DOKU_INC.'lib/scripts/editor.js',\n DOKU_INC.'lib/scripts/locktimer.js',\n DOKU_INC.'lib/scripts/linkwiz.js',\n DOKU_INC.'lib/scripts/media.js',\n# deprecated DOKU_INC.'lib/scripts/compatibility.js',\n# disabled for FS#1958 DOKU_INC.'lib/scripts/hotkeys.js',\n DOKU_INC.'lib/scripts/behaviour.js',\n DOKU_INC.'lib/scripts/page.js',\n tpl_incdir().'script.js',\n );\n\n // add possible plugin scripts and userscript\n $files = array_merge($files,js_pluginscripts());\n if(isset($config_cascade['userscript']['default'])){\n $files[] = $config_cascade['userscript']['default'];\n }\n\n $cache_files = array_merge($files, getConfigFiles('main'));\n $cache_files[] = __FILE__;\n\n // check cache age & handle conditional request\n // This may exit if a cache can be used\n $cache_ok = $cache->useCache(array('files' => $cache_files));\n http_cached($cache->cache, $cache_ok);\n\n // start output buffering and build the script\n ob_start();\n\n $json = new JSON();\n // add some global variables\n print \"var DOKU_BASE = '\".DOKU_BASE.\"';\";\n print \"var DOKU_TPL = '\".tpl_basedir().\"';\";\n print \"var DOKU_COOKIE_PARAM = \" . $json->encode(\n array(\n 'path' => empty($conf['cookiedir']) ? DOKU_REL : $conf['cookiedir'],\n 'secure' => $conf['securecookie'] && is_ssl()\n )).\";\";\n // FIXME: Move those to JSINFO\n print \"var DOKU_UHN = \".((int) useHeading('navigation')).\";\";\n print \"var DOKU_UHC = \".((int) useHeading('content')).\";\";\n\n // load JS specific translations\n $lang['js']['plugins'] = js_pluginstrings();\n $templatestrings = js_templatestrings();\n if(!empty($templatestrings)) {\n $lang['js']['template'] = $templatestrings;\n }\n echo 'LANG = '.$json->encode($lang['js']).\";\\n\";\n\n // load toolbar\n toolbar_JSdefines('toolbar');\n\n // load files\n foreach($files as $file){\n if(!file_exists($file)) continue;\n $ismin = (substr($file,-7) == '.min.js');\n $debugjs = ($conf['allowdebug'] && strpos($file, DOKU_INC.'lib/scripts/') !== 0);\n\n echo \"\\n\\n/* XXXXXXXXXX begin of \".str_replace(DOKU_INC, '', $file) .\" XXXXXXXXXX */\\n\\n\";\n if($ismin) echo \"\\n/* BEGIN NOCOMPRESS */\\n\";\n if ($debugjs) echo \"\\ntry {\\n\";\n js_load($file);\n if ($debugjs) echo \"\\n} catch (e) {\\n logError(e, '\".str_replace(DOKU_INC, '', $file).\"');\\n}\\n\";\n if($ismin) echo \"\\n/* END NOCOMPRESS */\\n\";\n echo \"\\n\\n/* XXXXXXXXXX end of \" . str_replace(DOKU_INC, '', $file) . \" XXXXXXXXXX */\\n\\n\";\n }\n\n // init stuff\n if($conf['locktime'] != 0){\n js_runonstart(\"dw_locktimer.init(\".($conf['locktime'] - 60).\",\".$conf['usedraft'].\")\");\n }\n // init hotkeys - must have been done after init of toolbar\n# disabled for FS#1958 js_runonstart('initializeHotkeys()');\n\n // end output buffering and get contents\n $js = ob_get_contents();\n ob_end_clean();\n\n // strip any source maps\n stripsourcemaps($js);\n\n // compress whitespace and comments\n if($conf['compress']){\n $js = js_compress($js);\n }\n\n $js .= \"\\n\"; // https://bugzilla.mozilla.org/show_bug.cgi?id=316033\n\n http_cached_finish($cache->cache, $js);\n}", "public function output_js()\n {\n add_action('wp_footer', function () {\n $js = file_get_contents(__DIR__ . '/CM_Test_Element.js');\n\n echo \"<script type='text/javascript'>{$js}</script>\";\n });\n }", "private function includeJavaScripts()\n {\n if ($this->is_js_included) {\n return '';\n }\n $this->is_js_included = true;\n\n return '<script src=\"https://www.google.com/jsapi\"></script>\n<script>\ngoogle.load(\"visualization\", \"1\", {packages: [\"corechart\"]});\n</script>';\n }", "public function injectFiles() {\n if (self::$loadFiles) {\n echo ('<link rel = \"stylesheet\" type = \"text/css\" href = \"' . plugin_file('autocomplete.css') . '\"/>');\n echo ('<script type=\"text/javascript\" src=\"' . plugin_file('autocomplete.js') . '\"></script>');\n }\n }", "function jq_add_plugin($options = array()) {\n\t// tom@punkave.com: with a singular name (jq_add_plugin), this function\n\t// really should accept a non-array argument\n\tif (!is_array($options))\n\t{\n\t\t$options = array($options);\n\t}\n\tforeach ( $options as $o ) {\n $file = sfConfig::get('sf_jquery_web_dir', '/sfJqueryReloadedPlugin') . \"/js/plugins/$o\";\n\t\tsfContext::getInstance ()->getResponse ()->addJavascript ($file);\n\t}\n}", "function js_packer_init() {\n\telgg_register_plugin_hook_handler('simplecache:generate', 'js', 'js_packer_pack');\n}", "public function pluginLoader()\n {\n foreach($this->pluginLoadables as $type => $files)\n {\n foreach($files as $file)\n {\n if($type == 'css')\n echo '<link rel=\"stylesheet\" href=\"'.$file.'\" type=\"text/css\" />'.PHP_EOL;\n else if($type == 'js')\n echo '<script src=\"'.$file.'\"></script>'.PHP_EOL;\n }\n }\n }", "public function add_jsfile()\r\n {\r\n $url = $this->plugin_path . '/js/digg.js';\r\n //register script first\r\n wp_register_script('digg_script', $url, array('jquery'), '1.0', TRUE);\r\n //make script into list\r\n wp_enqueue_script('digg_script');\r\n // or you can direct add script into list\r\n //wp_enqueue_script('digg_script', $url, array('jquery'), '1.0', TRUE);\r\n\r\n wp_localize_script( 'digg_script', 'WPDiggComment', array(\r\n\t \t'cmt_digg_vote_up' => get_option('cmt_digg_vote_up'),\r\n\t \t'cmt_digg_vote_down' => get_option('cmt_digg_vote_down'),\r\n\t 'siteurl' => get_option('siteurl')\r\n\t\t));\r\n }", "protected function registerConfigurationScripts()\n {\n Yii::setPathOfAlias('socialplugins', dirname(__FILE__));\n $url = Yii::app()->getAssetManager()->publish(Yii::getPathOfAlias('ext.socialplugins.assets'),\n false, -1, YII_DEBUG);\n\n $cs = Yii::app()->clientScript\n // Config script.\n ->registerScriptFile($url . '/configure.js')\n ->registerCssFile($url . '/twitter.css')\n // Required depencies.\n ->registerCoreScript('jquery')\n ->registerCoreScript('jquery.ui');\n }", "static function includeJS($plugins = false)\n\t{\n\t\t// Load jQuery\n\t\tself::jQueryLoad();\n\t\tself::jQueryUILoad();\n\t\t\n\t\t// Repeat after me: \"Joomla! 1.6.2 and later is a piece of utter crap because it requires me\n\t\t// to MANUALLY add this line to make its STANDARD toolbar buttons work\". Yes, the PLT is a\n\t\t// bunch of morons.\n\t\tJHTML::_('behavior.mootools');\n\n\t\t$document =& JFactory::getDocument();\n\n\t\t// In Joomla! 1.6 we have to load jQuery and jQuery UI without the hackish onAfterRender method :(\n\t\tjimport('joomla.filesystem.file');\n\t\tif(AKEEBA_JVERSION == '16')\n\t\t{\n\t\t\tforeach(self::$scriptURLs as $url)\n\t\t\t{\n\t\t\t\t$document->addScript($url);\n\t\t\t}\n\t\t\tforeach(self::$scriptDefs as $script)\n\t\t\t{\n\t\t\t\t$document->addScriptDeclaration($script);\n\t\t\t}\n\t\t}\n\n\t\t// Joomla! 1.5 method\n\t\tself::$usePlugins = $plugins;\n\t\t$scriptDefs = self::getScriptDefs();\n\t\tforeach($scriptDefs as $scriptURI)\n\t\t{\n\t\t\t$document->addScript($scriptURI);\n\t\t}\n\t}", "protected function getPluginImports(): string\n {\n $output = [];\n $index = [];\n\n foreach ($this->controller->config->getPlugins() as $name) {\n $plugin = Zest::getPlugin($name);\n $imports = $plugin->getImports();\n\n foreach ($imports as $package => $targets) {\n if (!isset($index[$package])) {\n $index[$package] = [];\n }\n\n $index[$package] = array_unique(array_merge(\n $index[$package],\n $targets\n ));\n }\n }\n\n foreach ($index as $package => $targets) {\n $str = 'import ';\n\n if (count($targets) === 1) {\n $str .= current($targets) . ' ';\n } else {\n $str .=\n '{' . \"\\n\" .\n ' ' . implode(\",\\n\", $targets) . \"\\n\" .\n '} ';\n }\n\n $str .= 'from \\'' . $package . '\\'';\n $output[] = $str;\n }\n\n return implode(\"\\n\", $output);\n }", "public function injectJS()\n\t\t{\n\t\t\t$_module = $this->getControllerName();\n\t\t\t$_location = ON_ADMIN ? '/admin/' : '';\n\t\t\tif (file_exists(\"{$_module}/js/{$_module}.js\")) {\n\t\t\t\techo \"<script src='$_location/$_module/js/$_module.js' type='text/javascript' charset='utf-8' async defer></script>\";\n\t\t\t}\n\t\t}", "public function generate_script() {\n\n\t\t$config = apply_filters( 'kirki/config', array() );\n\t\t$script = '';\n\t\tif ( ( isset( $config['logo_image'] ) && '' != $config['logo_image'] ) || ( isset( $config['description'] ) && '' != $config['description'] ) ) {\n\t\t\tif ( isset( $config['logo_image'] ) && '' != $config['logo_image'] ) {\n\t\t\t\t$config['logo_image'] = esc_url_raw( $config['logo_image'] );\n\t\t\t\t$script .= '$( \\'div#customize-info .preview-notice\\' ).replaceWith( \\'<img src=\"'.$config['logo_image'].'\">\\' );';\n\t\t\t}\n\t\t\tif ( isset( $config['description'] ) && '' != $config['description'] ) {\n\t\t\t\t$config['description'] = esc_textarea( $config['description'] );\n\t\t\t\t$script .= '$( \\'div#customize-info .accordion-section-content\\' ).replaceWith( \\'<div class=\"accordion-section-content\"><div class=\"theme-description\">'.$config['description'].'</div></div>\\' );';\n\t\t\t}\n\t\t}\n\n\t\treturn $script;\n\n\t}", "function generatePluginListing() {\n\n $html = $this->generateHeader('Plugins');\n\n $html .= \"<section><h1>Plugins</h1>\";\n $html .= \"<table class=\\\"propTable\\\">\";\n foreach ($this->server->getPlugins() as $plugin) {\n $info = $plugin->getPluginInfo();\n $html .= '<tr><th>' . $info['name'] . '</th>';\n $html .= '<td>' . $info['description'] . '</td>';\n $html .= '<td>';\n if (isset($info['link']) && $info['link']) {\n $html .= '<a href=\"' . $this->escapeHTML($info['link']) . '\"><span class=\"oi\" data-glyph=\"book\"></span></a>';\n }\n $html .= '</td></tr>';\n }\n $html .= \"</table>\";\n $html .= \"</section>\";\n\n /* Start of generating actions */\n\n $html .= $this->generateFooter();\n\n return $html;\n\n }", "protected function setup_assets() {\n\t\t$base_url = $this->context->url( 'dist/assets/' );\n\n\t\treturn array(\n\t\t\tnew Script(\n\t\t\t\t'googlesitekit-modules-analytics-4',\n\t\t\t\tarray(\n\t\t\t\t\t'src' => $base_url . 'js/googlesitekit-modules-analytics-4.js',\n\t\t\t\t\t'dependencies' => array(\n\t\t\t\t\t\t'googlesitekit-vendor',\n\t\t\t\t\t\t'googlesitekit-api',\n\t\t\t\t\t\t'googlesitekit-data',\n\t\t\t\t\t\t'googlesitekit-modules',\n\t\t\t\t\t\t'googlesitekit-datastore-site',\n\t\t\t\t\t\t'googlesitekit-datastore-user',\n\t\t\t\t\t\t'googlesitekit-datastore-forms',\n\t\t\t\t\t\t'googlesitekit-components',\n\t\t\t\t\t\t'googlesitekit-modules-data',\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t),\n\t\t);\n\t}", "public function createComponentJs() {\n\t\t$files = new \\WebLoader\\FileCollection(WWW_DIR . '/js');\n\t\t$files->addFiles(array(\n\t\t\t'slimbox2.js'\n\t\t));\n\t\t$compiler = \\WebLoader\\Compiler::createJsCompiler($files, WWW_DIR . '/cache/js');\n\t\t$compiler->addFilter(function ($code) {\n\t\t\t$packer = new \\JavaScriptPacker($code, \"None\");\n\t\t\treturn $packer->pack();\n\t\t});\n\t\treturn new \\WebLoader\\Nette\\JavaScriptLoader($compiler, $this->template->basePath . '/cache/js');\n\t}", "public function widget_scripts() {\n\n wp_register_script( 'touroperatorpro', plugins_url( 'assets/js/hello-world.js', __FILE__ ), array('jquery' ), false, true );\n }", "function on_add_admin_js_files() {\n wp_print_scripts( array( 'sack' ));\n add_action('admin_head', array(&$this, 'head_print_js_css' ), 1); // Write inline scripts and CSS at HEAD\n }", "function add_gmap_script($plugins) {\r\n\t\t$dir_name = '/wp-content/plugins/'.GPX_GM_PLUGIN;\r\n\t\t$url = get_bloginfo('wpurl');\r\n\t\t$pluginURL = $url.$dir_name.'/tinymce/editor_plugin.js';\r\n\t\t$plugins['GmapGpx'] = $pluginURL;\r\n\t\treturn $plugins;\r\n\t}", "public static function registerScripts()\n {\n $uri = static::$pluginUri . \"/js\";\n $path = static::$pluginPath . \"/js\";\n\n $handle = static::$handle;\n\n wp_register_script(\n \"$handle-script\",\n \"$uri/$handle.js\",\n [],\n filemtime(\"$path/$handle.js\"),\n true\n );\n }", "public function includeScripts() {\n foreach ($this->js as $script) {\n echo \"<script src='\" . $script . \"' type='text/javascript'></script>\";\n }\n }", "function plugins() \n\t{\n\t\t$rs = safe_column(\"code\", \"txp_plugin\", \"status=1\");\n\t\tif ($rs) {\n\t\t\tforeach($rs as $a) { \n\t\t\t\t$plugins[] = $a; \n\t\t\t}\n\n\t\t\t$out = chr(60).'?php'.n.join(n.n,$plugins).n.'?'.chr(62);\n\t\t\t$tmpf = tempnam ('/tmp','plugins');\n\t\t\t$fp = fopen($tmpf, \"w\");\n\t\t\tfwrite($fp, $out);\n\t\t\tfclose($fp);\n\t\t\tinclude($tmpf);\n\t\t\tunlink($tmpf);\n\t\t}\n\t}", "public function registerClientScript()\n {\n $js = '';\n $view = $this->getView();\n $this->hashPluginOptions($view);\n $id = $this->options['id'];\n $js .= '$(\"#' . $id . '\").' . self::PLUGIN_NAME . \"(\" . $this->_hashVar . \");\\n\";\n TagsinputAsset::register($view);\n $view->registerJs($js);\n }", "function include_js() {\n global $CFG, $PAGE;\n\n echo html_writer::tag('style', '@import url(\"'.$CFG->wwwroot.'/lib/yuilib/2in3/2.9.0/build/assets/skins/sam/datatable.css\");');\n\n // $PAGE->requires->yui2_lib(array('dom', 'event', 'dragdrop', 'element', 'datasource', 'datatable')); // TBD\n\n // Monkey patch - not required with YUI 2.6.0 apparently\n // require_js('js/yui_2527707_patch.js');\n\n echo html_writer::tag('script', '', array('type' => 'text/javascript', 'src' => \"{$CFG->wwwroot}/local/elisprogram/js/util.js\"));\n }", "function largo_enqueue_js() {}", "public function getJS()\n {\n $this->addJSInclude('js/elix_block_report.js');\n }", "function wptuts_scripts_register()\n{\n wp_register_script( 'ego-custom-js', plugins_url( '/ego-custom.js', __FILE__ ), array('jquery') );\n wp_enqueue_script( 'ego-custom-js' );\n}", "public function produceAjaxScript() {\n // update $this->packaged\n $this->resolveResources();\n $result = array();\n $res = array(\n 'resourceMap' => array(\n 'js' => array(),\n 'css' => array()\n )\n );\n\n $this->buildAllRes($res);\n $result[] = 'require.setResourceMap(' .\n json_encode($res['resourceMap']) . ');';\n\n foreach ($this->inlined as $source_name => $inlineScripts) {\n if (!empty($inlineScripts['js'])) {\n $scripts = $inlineScripts['js'];\n foreach ($scripts as $script) {\n $result[] = '(function(){' . $script . '}());';\n }\n }\n }\n return $result;\n }", "public function getClientScript()\n\t{\n\t\t// Get the config and plugins scripts\n\t\t$sScript = $this->getOptionScript() . $this->getPluginScript();\n\t\tif($this->canMergeJavascript())\n\t\t{\n\t\t\t// The plugins scripts are written into the javascript app dir\n\t\t\t$sHash = $this->generateHash();\n\t\t\tif(($this->getOption('core.js.minify')))\n\t\t\t{\n\t\t\t\t$sOutFile = $sHash . '.min.js';\n\t\t\t\t$sScript = $this->minify($sScript);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$sOutFile = $sHash . '.js';\n\t\t\t}\n\n\t\t\t$sJsAppURI = rtrim($this->getOption('core.js.uri'), '/') . '/';\n\t\t\t$sJsAppDir = rtrim($this->getOption('core.js.dir'), '/') . '/';\n\t\t\tif(!is_file($sJsAppDir . $sOutFile))\n\t\t\t{\n\t\t\t\tfile_put_contents($sJsAppDir . $sOutFile, $sScript);\n\t\t\t}\n\t\t\t// The returned code loads the generated javascript file\n\t\t\t$sScript = $this->render('plugins/include.js.tpl', array(\n\t\t\t\t'sJsOptions' => $this->getOption('core.js.options'),\n\t\t\t\t'sUrl' => $sJsAppURI . $sOutFile,\n\t\t\t));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// The plugins scripts are wrapped with javascript tags\n\t\t\t$sScript = $this->render('plugins/wrapper.js.tpl', array(\n\t\t\t\t'sJsOptions' => $this->getOption('core.js.options'),\n\t\t\t\t'sScript' => $sScript,\n\t\t\t));\n\t\t}\n\t\t\n\t\treturn $sScript;\n\t}", "public function jsIncludes() {\n $files = array_merge(Config::get($this->package_prefix.'bones.js_urls'), $this->js_urls);\n\n $html = '';\n foreach ($files as $file)\n $html .= '<script src=\"'.$file.'\"></script>'.PHP_EOL;\n\n return $html;\n }", "static function libJs(){\n $js = Html::js('/modules/devpro/libs/jquery_jpicker/jpicker-1.1.6.min.js');\n echo $js;\n }", "public function insertJs() {\r\n wp_register_script('jquery-tools-min', $this->_pluginUrl . '/js/jquery.tools.min.js', array('jquery'));\r\n wp_register_script('json-ie7', $this->_pluginUrl . '/js/json2.js');\r\n wp_enqueue_script('jquery-tools-min');\r\n wp_enqueue_script('json-ie7');\r\n wp_enqueue_script('thickbox');\r\n }", "public function insertJsFiles()\n\t{\n\t\t$code = '';\n\t\tif (!empty($this->js))\n\t\t{\n\t\t\tforeach ($this->js as $js => $params)\n\t\t\t{\n\t\t\t\tif ($params['loaded'] === false)\n\t\t\t\t{\n\t\t\t\t\t$code .= '<script type=\"text/javascript\" src=\"' . $js . '\"></script>';\n\t\t\t\t\t$this->js[$js]['loaded'] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $code;\n\t}", "private function register_scripts_and_styles() {\n\t\tif(is_admin()) {\n \t\t$this->load_file(PLUGIN_NAME, '/' . self::slug . '/js/admin.js', true);\n\t\t\t$this->load_file(PLUGIN_NAME, '/' . self::slug . '/css/admin.css');\n\t\t} else { \n \t\t$this->load_file(PLUGIN_NAME, '/' . self::slug . '/js/admin.css', true);\n\t\t\t$this->load_file(PLUGIN_NAME, '/' . self::slug . '/css/widget.css');\n\t\t} // end if/else\n\t}", "public function insertAdminJs() {\r\n\r\n wp_enqueue_script('media-upload');\r\n wp_enqueue_script('thickbox');\r\n wp_register_script('jquery-tools-min', $this->_pluginUrl . '/js/jquery.tools.min.js', array('jquery'));\r\n wp_register_script('jquery-color-picker', $this->_pluginUrl . '/js/colorpicker.js', array('jquery'));\r\n wp_enqueue_script('jquery-tools-min');\r\n wp_enqueue_script('jquery-color-picker');\r\n\r\n return;\r\n }", "public function getCustomCSSAndJS(){\n $custom = \"\";\n foreach ($this->_extensionsUsed as $plugin => $type) {\n $custom = $custom.$this->getCustomCSS($plugin,$type).$this->getCustomJS($plugin,$type);\n }\n echo $custom;\n }", "function rel_enqueue_plugin_js() {\r\n wp_register_script(\r\n 'rel-plugin-frontend',\r\n REL_APP_URL . 'build/index.js',\r\n ['wp-element'],\r\n time(), // Change this to null for production\r\n true\r\n );\r\n wp_register_style(\r\n 'rel-plugin-style',\r\n REL_APP_URL . 'build/index.css',\r\n [],\r\n time() // Change this to null for production\r\n );\r\n}", "function add_js2header()\r\n{\r\n\t$dir=get_option('siteurl').'/wp-content/plugins/'.dirname(plugin_basename(__FILE__));\r\n\t//on récupère les 2 variables de textes d'ouverture/fermeture du module starpress qui vont s'afficher dans les listes.\r\n\t$on=stripslashes(get_option('texte_on'));\r\n\t$off=stripslashes(get_option('texte_off'));\r\n\t$js=\"\\n<script type=\\\"text/javascript\\\"> var texte1 = \\\"\".$on.\"\\\"; var texte2 = \\\"\".$off.\"\\\"; </script>\\n\";\r\n\t$js.=\"\\n<script type=\\\"text/javascript\\\" src=\\\"\".$dir.\"/jquery.js\\\"></script>\\n\";\r\n\t$js.=\"<script type=\\\"text/javascript\\\" src=\\\"\".$dir.\"/starpress.js\\\"></script>\\n\";\r\n\r\n\tprint($js);\r\n}", "public function registerScripts() {\n\t\tif(file_exists($this->getAssetsPath().DIRECTORY_SEPARATOR.'js'.DIRECTORY_SEPARATOR.'module.js') === true) {\n\t\t\t\\Yii::app()->getClientScript()->registerScriptFile($this->getAssetsUrl().'/js/module.js');\n\t\t}\n\t}", "function page_output()\n\t\t{\n\t\t\t$this->requires[\"javascript\"][]\t= \"external/prototype.js\";\n\t\t\t$this->requires[\"javascript\"][]\t= \"external/raphael.js\";\n\t\t\t$this->requires[\"javascript\"][]\t= \"external/grafico.base.js\";\n\t\t\t$this->requires[\"javascript\"][]\t= \"external/grafico.line.js\";\n\t\t\t$this->requires[\"javascript\"][]\t= \"external/grafico.bar.js\";\n\t\t\t$this->requires[\"javascript\"][]\t= \"external/grafico.spark.js\";\n\t\t}", "function include_js ($includes) {\n $config = get_config();\n $files = explode(',', preg_replace('/\\s+/', '', $includes));\n foreach($files as $file){\n $uri = $config['static_resource_url'].'js/'.auto_version($file, 'js/').'/'.$file;\n echo '<script type=\"text/javascript\" src=\"'.$uri.'\"></script>';\n }\n}", "public static function register_scripts(){\n\t\twp_register_script( 'lay-opentype', LG_PLUGIN_URL.\"/formatsmanager/assets/js/vendor/opentype.js\", array(), LG_VER );\n\t\twp_register_script( 'lay-variablefont', LG_PLUGIN_URL.\"/formatsmanager/assets/js/vendor/variablefont.js\", array(), LG_VER );\n\t}", "function k_js_package($src, $dest, array $includes = array (), array $options = array ()) {\n k_log_indent(\"Packaging JS from $src to $dest\");\n \n $src = k_absolute_path($src);\n $abs_dest = k_absolute_path($dest);\n \n // create the target path\n k_setup_dir($dest);\n \n $args = array ();\n foreach ($includes as $path) {\n $args[] = '-I';\n $args[] = escapeshellarg(k_absolute_path($path));\n }\n \n if (!empty ($options['asset_root'])) {\n $args[] = '--asset-root=' . escapeshellarg(k_absolute_path($options['asset_root']));\n }\n \n foreach (glob(\"{$src}/*.js\") as $package) {\n // package the file\n $package_name = basename($package);\n k_log_indent(\"Packaging {$package_name}\");\n $combined_path = \"{$abs_dest}/{$package_name}\";\n $temp_path = $combined_path . '.TEMP';\n $package_args = array_merge($args, array ($package, '>', $temp_path));\n k_shell_cmd('sprocketize ' . implode(' ', $package_args));\n \n // update it only if necessary\n if (!file_exists($combined_path) || md5_file($temp_path) != md5_file($combined_path)) {\n rename($temp_path, $combined_path);\n k_log(\"Package {$package_name} updated\");\n } else {\n unlink($temp_path);\n }\n \n // store metadata\n k_metadata_add('js', $package_name, array (\n 'path' => \"{$dest}/{$package_name}\",\n 'timestamp' => filemtime($combined_path),\n ));\n \n k_log_unindent();\n }\n k_log_unindent();\n}", "public function generateScript() {\n\n $script = NL;\n $script .= '$(function() {' .NL;\n\n // some pre-show doings\n $script .= TB . '$(\\'#fancy-add-form\\').hide();' .NL;\n // ----\n\n $script .= TB . '$(\\'.' . $this->editableClass . '\\').editable(\\'' . Configuration::getHttpHost() . '/ajax/' . $this->handler . '\\', {' .NL;\n $script .= TB.TB . 'submit : \\'' . $this->conf->getLabel('edit_save') . '\\',' .NL;\n $script .= TB.TB . 'cancel : \\'' . $this->conf->getLabel('edit_cancel') . '\\',' .NL;\n $script .= TB.TB . 'tooltip : \\'' . $this->conf->getLabel('edit_tooltip') . '\\',' .NL;\n $script .= TB.TB . 'submitdata: { action: \\'edit\\', table : \\'' . $this->table . '\\', pk : \\'' . $this->pk . '\\'}' .NL;\n $script .= TB . '});' .NL;\n\n // delete action\n $script .= TB . '$(\\'.' . 'fancy-delete' . '\\').click(function() {' .NL;\n $script .= TB.TB . 'if (confirm(\\'' . $this->conf->getLabel('delete_question') . '\\')) {' .NL;\n $script .= TB.TB.TB . 'var id = this.id;' .NL;\n $script .= TB.TB.TB . 'var data = \\'action=del&table=' . $this->table . '&pk=' . $this->pk . '&id=\\' + this.id;' .NL;\n $script .= TB.TB.TB . '$.post(\\'' . Configuration::getHttpHost() . '/ajax/' . $this->handler . '\\', data, function(response) {' .NL;\n $script .= TB.TB.TB.TB . '$(\\'#postresponse\\').html(response);' .NL;\n $script .= TB.TB.TB . '});' .NL;\n $script .= TB.TB.TB . '$(this).parent().parent().fadeOut();' .NL;\n $script .= TB.TB . '}' .NL;\n $script .= TB . '});' .NL;\n\n // add action\n $script .= TB . '$(\\'#' . 'fancy-add-button' . '\\').click(function() {' .NL;\n $script .= TB.TB . '$(\\'#fancy-add-form\\').slideDown();' .NL;\n $script .= TB . '});' .NL;\n\n $script .= '});' .NL;\n $script .= NL;\n return $script;\n }", "public function plugin_scripts() {\n\t\twp_enqueue_script('bf-events', self::$pluginDir . 'dist/js/main.js', array('jquery','jquery-ui-datepicker' ), false);\n\t}", "function phorum_mod_wysibb_editor_tools_tpl_javascript_includes () {\n\techo <<<HEREDOC\n<!-- WysiBB editor tools plugin, load from CDN -->\n<script src=\"//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js\"></script>\n<script src=\"http://cdn.wysibb.com/js/jquery.wysibb.min.js\"></script>\n<link rel=\"stylesheet\" href=\"http://cdn.wysibb.com/css/default/wbbtheme.css\" type=\"text/css\" />\nHEREDOC;\n}", "function importJS (&$body) { //importa librerie\r\n addSimpleJS($body, dir_lib . \"/jquery-2.2.1/jquery-2.2.1.min.js\"); \r\n addSimpleJS($body, dir_lib . \"/bootstrap-3.3.6-dist/js/bootstrap.min.js\"); \r\n addSimpleJS($body, dir_lib . \"/smooth-scroll/smooth-scroll.js\"); \r\n addSimpleJS($body, dir_lib . \"/jquery-scrollTo/jquery.scrollTo.js\"); \r\n addSimpleJS($body, dir_lib . \"/jquery-easing/jquery.easing.1.3.js\"); \r\n addSimpleJS($body, dir_lib . \"/bootstrap3-dialog/js/bootstrap-dialog.js\"); \r\n addSimpleJS($body, dir_lib . \"/custom/js/template.js\");\r\n addSimpleJS($body, dir_lib . \"/custom/js/custom.js\");\r\n }", "function wp_register_script($handle, $src, $deps = array(), $ver = \\false, $in_footer = \\false)\n{\n}", "protected function createScriptJs(){\n $file = fopen($this->baseComponentScriptJsFolder.DIRECTORY_SEPARATOR.$this->componentName.'.js', 'w+');\n if(!fputs($file,$this->renderScriptJs()))\n throw new \\Exception(BladeComponentsConstants::SCRIPT_CREATION_ERROR);\n }", "public static function inclureJS() {\r\n foreach (self::$_instance->scripts as $fichierScript) {\r\n ?><script type=\"text/javascript\" src=\"<?php echo $fichierScript ?>\"></script> \r\n <?php\r\n }\r\n }", "public function register_plugin_scripts() {\n\n\t\t// TODO:\tChange 'plugin-name' to the name of your plugin\n//\t\twp_enqueue_script( 'plugin-name-plugin-script', plugins_url( 'plugin-name/js/display.js' ), array('jquery') );\n\n\t}", "function js_pluginstrings() {\n global $conf;\n $pluginstrings = array();\n $plugins = plugin_list();\n foreach ($plugins as $p){\n if (isset($lang)) unset($lang);\n if (@file_exists(DOKU_PLUGIN.\"$p/lang/en/lang.php\")) {\n include DOKU_PLUGIN.\"$p/lang/en/lang.php\";\n }\n if (isset($conf['lang']) && $conf['lang']!='en' && @file_exists(DOKU_PLUGIN.\"$p/lang/\".$conf['lang'].\"/lang.php\")) {\n include DOKU_PLUGIN.\"$p/lang/\".$conf['lang'].\"/lang.php\";\n }\n if (isset($lang['js'])) {\n $pluginstrings[$p] = $lang['js'];\n }\n }\n return $pluginstrings;\n}", "function script(){\n\n return new Flexe\\Plugins\\ScripitJS\\Render();\n\n }", "function class_scriptsLibrary(){\n\t$results = '<script src=\"assets/js/jquery-1.12.2.min.js\"></script>';\n\t$results .= '<script src=\"assets/js/bootstrap.min.js\"></script>';\n\t$results .= '<script src=\"assets/js/propeller.min.js\"></script>';\n\n\techo $results;\n}", "private function affiche_javascript() {\r\n\t\tforeach ( $this->js as $s ) {\r\n\t\t\techo \"<script src='js/\" . $s . \".js'></script>\\n\";\r\n\t\t}\r\n\t}", "static function custom_pugin_assets(){\n wp_enqueue_style(\n \"MYCSS\",\n SIGNAGE_PLUGIN_URL. \"/Testing4/assets/mystyle.css\",\n ' ',\n SIGNAGE_PLUGIN_VERSION,\n true\n );\n\n wp_enqueue_script(\n \"MYJS\",\n SIGNAGE_PLUGIN_URL. \"/Testing4/assets/myscript.js\",\n ' ',\n SIGNAGE_PLUGIN_VERSION,\n true\n );\n\t}", "function phorum_mod_smileys_javascript_register($data)\n{\n // We only need javascript for Editor Tools support.\n $PHORUM = $GLOBALS['PHORUM'];\n if (empty($PHORUM['mod_smileys']['smileys_tool_enabled']) &&\n empty($PHORUM['mod_smileys']['subjectsmileys_tool_enabled']))\n return $data;\n\n // The generated javascript depends on the settings, so we use\n // a specific cache_key for this module.\n $cache_key = (isset($GLOBALS['PHORUM']['mod_smileys']['cache_key'])\n ? $GLOBALS['PHORUM']['mod_smileys']['cache_key'] : 0) .\n '-' . @filemtime(\"mods/smileys/smileys_editor_tools.js.php\");\n\n $data[] = array(\n \"module\" => \"smileys\",\n \"source\" => \"file(mods/smileys/smileys_editor_tools.js.php)\",\n \"cache_key\" => $cache_key\n );\n return $data;\n}", "function hook_javascript() {\n\t?>\n\t\t<script async type=\"module\" src=\"https://unpkg.com/@manifoldco/web-components@latest/dist/manifold/manifold.esm.js\"></script>\n\t\t<script nomodule src=\"https://unpkg.com/@manifoldco/web-components@latest/dist/manifold/manifold.js\"></script>\n\t<?php\n}", "public function loadPlugins();", "public function InlineJavascript(){\n\t\t$html = \"<script type=\\\"text/javascript\\\">\";\n\t\t$html .= \"/* GENERATED by MAGRATHEA at \".now().\" */\";\n\t\t$array_files = array_unique($this->javascript_files);\n\t\tforeach ($array_files as $file) {\n\t\t\t$html .= file_get_contents($file);\n\t\t}\n\t\t$html .= \"</script>\";\n\t\treturn $html;\n\t}", "private function installation($js=null){\n $ins=$this->getPluginsPath().'/plugins.json';\n if($js){\n file_put_contents($ins,json_encode($js));\n }else{\n if(file_exists($ins)){\n return json_decode(file_get_contents($ins));//TODO: instead of accessing the disk all the time, it might be better to do this onece and return the content from a quick access memory at subsequent calls\n }else{\n $js=new stdClass;\n $js->installed=[];\n return $js;\n }\n \n }\n \n }", "function perfex_office_theme_footer_js__component()\n{\n echo '<script src=\"' . module_dir_url(PERFEX_OFFICE_THEME, 'assets/js/main.js') . '\"></script>';\n}", "public function register_admin_scripts_and_styles() {\n\t\t$path = WP_PLUGIN_URL . '/f1-multi-section-reports';\n\n\t\twp_register_script( 'f1-multi-section-admin-js', $path . '/f1-multi-section-admin.js', 'jquery-ui-sortable', $this->version, true );\n\t\twp_register_style( 'f1-multi-section-admin-css', $path . '/f1-multi-section-admin.css', array(), $this->version, 'all' );\n\t}", "protected function addJS() {\n\t\t$jsFiles = $this->utilityFuncs->parseResourceFiles($this->settings, 'jsFile');\n\t\tforeach ($jsFiles as $idx => $fileOptions) {\n\t\t\t$file = $fileOptions['file'];\n\t\t\tif(strlen(trim($file)) > 0) {\n\t\t\t\t$file = $this->utilityFuncs->resolveRelPathFromSiteRoot($file);\n\t\t\t\t$pageRenderer = $GLOBALS['TSFE']->getPageRenderer();\n\t\t\t\t$pageRenderer->addJsFile(\n\t\t\t\t\t$file,\n\t\t\t\t\t$fileOptions['type'] ? $fileOptions['type'] : 'text/javascript',\n\t\t\t\t\tempty($fileOptions['disableCompression']),\n\t\t\t\t\t$fileOptions['forceOnTop'] ? TRUE : FALSE,\n\t\t\t\t\t$fileOptions['allWrap'],\n\t\t\t\t\t$fileOptions['excludeFromConcatenation'] ? TRUE : FALSE\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}", "private static function register_scripts()\n {\n }", "public static function js() \n\t{\n\t\treturn '<script type=\"text/javascript\" src=\"https://www.google.com/jsapi\"></script>';\n\t}", "function add_scripts_basic(){\n\twp_register_script( 'river5', plugins_url( 'assets/river5.js', __FILE__ ), array( 'json2','jquery' ),false,true );\t\n\twp_register_style ( 'river5', plugins_url( 'assets/river5.css', __FILE__ ) );\n}", "private function register_scripts_and_styles() {\n\t\tif ( is_admin() ) {\n\t\t\t$this->load_file( self::slug . '-admin-script', '/assets/backend/js/functions.js', true );\n\t\t\t$this->load_file( self::slug . '-admin-style', '/assets/backend/css/style.css' );\n\t\t} else {\n\t\t\t$this->load_file( self::slug . '-bootstrap-js', '/assets/frontend/js/bootstrap.js', true );\n\t\t\t$this->load_file( self::slug . '-touchspin-js', '/assets/frontend/js/bootstrap.touchspin.js', true );\n\t\t\t$this->load_file( self::slug . '-card-js', '/assets/frontend/js/card.js', true );\n\t\t\t$this->load_file( self::slug . '-smoothproducts-js', '/assets/frontend/js/smoothproducts.min.js', true );\n\t\t\t$this->load_file( self::slug . '-script', '/assets/frontend/js/functions.js', true );\n\n\t\t\t$this->load_file( self::slug . '-style', '/assets/frontend/css/style.css' );\n\t\t\t$this->load_file( self::slug . '-card-css', '/assets/frontend/css/card.css' );\n\t\t\t\n\t\t}\n\t}", "public function registerScripts()\n {\n // Generate script URI\n $path = 'js/api/'. (WP_ENV == 'development' ? 'upload.js' : 'upload.min.js');\n $src = $this->container->getUri($path);\n\n wp_register_script('wistia_uploads', $src, ['jquery'], Base\\PluginCore::VERSION);\n }", "private static function _registerScriptFiles($view, $plugin)\n {\n foreach(self::$_scripts[$plugin]['js'] as $script) {\n $view->registerJsFile($script);\n }\n\n foreach(self::$_scripts[$plugin]['css'] as $style) {\n $view->registerCssFile($style);\n }\n\n return;\n }", "public function registerClientScripts()\r\n\t{\r\n\t\t$dir = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets';\r\n\t\t$baseUrl = Yii::app()->getAssetManager()->publish($dir);\r\n\t\t\r\n\t\t$js = $baseUrl . '/js/jquery.tokeninput' . (YII_DEBUG ? '' : '.min') . '.js';\r\n\t\t\r\n\t\t$theme = isset($this->options['theme']) ? '-' . $this->options['theme'] : '';\r\n\t\t$css = empty($this->cssFile) ? $baseUrl . '/css/token-input' . $theme . '.css' : $this->cssFile;\r\n\t\t\r\n\t\t$cs = Yii::app()->getClientScript();\r\n\t\t$cs->registerScriptFile($js);\r\n\t\t$cs->registerCssFile($css);\r\n\t}", "private function getCustomJS(String $plugin, String $type):String {\n $js_path = \"plugins/\".$plugin.\"/admin/\".$type.\".js\";\n if (file_exists($js_path)) {\n return '<script src=\"'.$js_path.'\"></script>';\n } else {\n return \"\";\n }\n }", "function load_plugin_scripts() {\n foreach($this->plugin_css as $css) {\n wp_enqueue_style($css, $this->css_path.$css.'.css');\n }\n foreach($this->plugin_js as $js) {\n wp_enqueue_script($js, $this->js_path.$js.'.js');\n }\n }", "public function addJs () {\n }", "function micro_register_js_file( $file, bool $inFooter = false )\n{\n global $app;\n return $app->registerJSFile($file, $inFooter);\n}", "public function registerClientScript()\n {\n $js = '';\n $view = $this->getView();\n $this->initClientOptions();\n if (!empty($this->mask)) {\n $this->clientOptions['mask'] = $this->mask;\n }\n $this->hashPluginOptions($view);\n if (!empty($this->definitions) && is_array($this->definitions)) {\n $js .= ucfirst(self::PLUGIN_NAME) . '.extendDefinitions(' . Json::htmlEncode($this->definitions) . ');';\n }\n if (!empty($this->aliases) && is_array($this->aliases)) {\n $js .= ucfirst(self::PLUGIN_NAME) . '.extendAliases(' . Json::htmlEncode($this->aliases) . ');';\n }\n $id = $this->options['id'];\n $js .= 'jQuery(\"#' . $id . '\").' . self::PLUGIN_NAME . '(' . $this->_hashVar . ');';\n MaskedInputAsset::register($view);\n $view->registerJs($js);\n }", "protected function getScripts()\n {\n return implode( \"\\n\", array(\n '<script type=\"text/javascript\" src=\"lib/plugins/emoticons.js\"></script>',\n ) );\n }", "protected function registerClientScript()\n {\n $view = $this->getView();\n\n\n /*\n * Language fix\n * @author <https://github.com/sim2github>\n */\n if (!isset($this->options['lang']) || empty($this->options['lang'])) {\n $this->options['lang'] = str_replace(\"-\", \"_\", strtolower(Yii::$app->language));\n }\n\n // Insert plugins in options\n if (!empty($this->plugins)) {\n $this->options['plugins'] = $this->plugins;\n\n foreach ($this->options['plugins'] as $plugin) {\n $this->registerPlugin($plugin);\n }\n }\n\n $options = empty($this->options) ? '' : Json::encode($this->options);\n $js = \"jQuery('\" . $this->selector . \"').redactor($options);\";\n $view->registerJs($js);\n }", "private static function buildJs()\n\t{\n\t\trequire_once 'HTML/Template/IT.php';\n\t\t$tpl = new \\HTML_Template_IT(ROOT_FOLDER);\n\t\t$tpl->loadTemplatefile('students-template.js');\n\t\tif (\\students\\Pupil::binarySearch() === true) {\n\t\t\tif (isset($parameters['guess'])) {\n\t\t\t\t$tpl->setCurrentBlock('guess');\n\t\t\t\t$tpl->setVariable(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'GUESS' => $parameters['guess']\n\t\t\t\t\t\t));\n\t\t\t\t$tpl->parse('guess');\n\t\t\t}\n\t\t}\n\t\t$tpl->setCurrentBlock('js');\n\t\t$tpl->parse('js');\n\t\treturn $tpl->get('js');\n\t}", "private function outputJs() {\n $images = \"\";\n foreach( $this->imageSources AS $src ) {\n $images .= $src . \",\";\n }\n $images = substr( $images, 0, -1 );\n \n echo '\n <script type=\"text/javascript\">\n var preloader = function() {\n var images = \"' . $images . '\".split(\",\");\n var tempImg = []\n\n for( var i = 0; i < images.length; i++ ) {\n tempImg[ i ] = new Image();\n tempImg[ i ].src = images[ i ];\n }\n }\n window.onload=preloader;\n </script>\n ';\n }", "public function includePluginsFiles()\n {\n // Auto-loads\n foreach ($this->includes as $plugin) {\n // Load file: trailingslashed by core\n # Tested: calling plugin_dir_path() directly saves 1/2 time\n # instead of saving the plugin_dir_path() in a $var and recalling here\n require_once plugin_dir_path(__FILE__) . \"plugins/{$plugin['path']}\";\n if (!$plugin['init'])\n continue;\n // Build class name\n $class = \"CocoPalm_\" . ucwords($plugin['name']);\n class_exists($class) AND add_action('plugins_loaded', array($class, 'instance'));\n }\n\n // Register\n $this->registerPluginsDirectories();\n }", "public function print_admin_scripts()\n {\n wp_enqueue_script('jquery-infield-label');\n }", "function vincentragosta_autoloader() {\n\treturn VINCENTRAGOSTA_PLUGIN_DIR . '/vendor/autoload.php';\n}", "public function addFooterScript() {\n // ***********************************\n $lib = $this->App->DOC->get('js.lib.header'); // array_unique, merge, ...\n\n if (is_array($lib)) {\n foreach ($lib as $s) {\n\t\t\t\t$jsurl = (substr($s, 0, 7)=='http://' || substr($s, 0, 8)=='https://' ) ? $s : $s;\n echo \"<script src='{$jsurl}' type='text/javascript'></script>\\n\";\n }\n }\n\n $src = $this->App->DOC->get('js.src');\n\t\tif (is_array($src)) {\n echo '<script>'. implode(\"\\n\", $src) . '</script>';\n }\n\n\t\t$lib = $this->App->DOC->get('js.lib.footer'); // array_unique, merge, ...\n if (is_array($lib)) {\n foreach ($lib as $s) {\n\t\t\t\t$jsurl = (substr($s, 0, 7)=='http://' || substr($s, 0, 8)=='https://' ) ? $cdn_url.$s : $s;\n\t\t\t\techo \"<script src='{$url}' type='text/javascript'></script>\\n\";\n }\n }\n\n $lastSrc = $this->App->DOC->get('js.srcLast');\n\t\tif (is_array($lastSrc)) {\n echo '<script>'. implode(\"\\n\", $lastSrc) . '</script>';\n }\n\n\t\tif ( defined( 'GOOGLE_ANALYTICS' ) ){\n\t\t\techo \"\n\t\t\t\t<script>\n\t\t\t\t (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n\t\t\t\t (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\n\t\t\t\t m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n\t\t\t\t })(window,document,'script','//www.google-analytics.com/analytics.js','ga');\n\n\t\t\t\t ga('create', '\" . GOOGLE_ANALYTICS . \"', 'auto');\n\t\t\t\t ga('send', 'pageview');\n\n\t\t\t\t</script>\n\t\t\t\";\n\t\t}\n }", "protected function makeFiles()\n {\n $list = $this->getBuffer()->getScriptFiles();\n\n $html = \"\";\n\n foreach ($list as $path) {\n if($path[LibsFinder::L_MAIN] === true ){\n $html .= sprintf($this->templateScriptFile, $path[BufferCache::PATH_ABS]);\n }\n }\n\n $this->replace('js_links', $html);\n }", "function graphexplorer_component_js_include($cbtype = '', $args = null)\n{\n // Add graphexplorer dependancy\n echo '<script type=\"text/javascript\" src=\"' . get_base_url() . 'includes/components/graphexplorer/includes/graphexplorerinclude.js\"></script>';\n\n // If highcharts hasn't been added then let's add it\n if (!file_exists(get_base_dir() . \"/includes/js/highcharts/highcharts.js\")) {\n echo '<script type=\"text/javascript\" src=\"' . get_base_url() . '/includes/components/highcharts/js/highcharts.js\"></script>\n <script type=\"text/javascript\" src=\"' . get_base_url() . '/includes/components/highcharts/js/modules/exporting.js\"></script>';\n\n if (get_option(\"default_highcharts_theme\") == 'gray') {\n echo '<script type=\"text/javascript\" src=\"' . get_base_url() . '/includes/components/highcharts/js/themes/gray.js\"></script>';\n }\n }\n}", "public function enqueue_scripts() {\n\t\twp_enqueue_script( 'bsme-bootstrap-js-add', WP_JELLY_JS. '/bootstrap.min.js', array( 'jquery' ), $this->version, false );\n\t\twp_enqueue_script('wpjelly-export-admin', WP_JELLY_JS.'/export-admin.js',array('jquery'), $this->version, false);\n\t\t$bsmarg = array(\n\t\t 'post_type' => 'elementor_library',\n\t\t);\n\t\t$getallmetaquery = get_posts($bsmarg);\n\t\t$metaData = array();\n\t\tforeach($getallmetaquery as $key => $value){\n\t\t $metaData[] = get_post_meta($value->ID,'_bsm_mainelement', true);\n\t\t}\n\t\t$metaDataEncoded=json_encode($metaData);\n\t\t$siteUrl=get_site_url();\n\t\twp_localize_script('wpjelly-export-admin', 'wpjellyTemplateControl', array(\n\t\t 'meta' => $metaDataEncoded,\n\t\t 'ajaxurl' => admin_url('admin-ajax.php'),\n\t\t 'backurl' => admin_url('admin.php?page=wpjelly-template-importer-menu'),\n\t\t 'siteUrl' => $siteUrl,\n\t\t 'imageUrl' => WP_JELLY_IMG\n\t\t));\n\t}", "function footerJS(){\n return '<script src=\"js/libs/jquery-1.7.2.min.js\"></script>\n <script src=\"js/setup.js\"></script>\n\n <!-- Template functions -->\n <script src=\"js/developr.input.js\"></script>\n <script src=\"js/developr.message.js\"></script>\n <script src=\"js/developr.notify.js\"></script>\n <script src=\"js/developr.tooltip.js\"></script>\n <script src=\"js/developr.navigable.js\"></script>\n <script src=\"js/developr.calendar.js\"></script>\n <script src=\"js/developr.agenda.js\"></script>\n <script src=\"js/developr.table.js\"></script>\n <script src=\"js/libs/glDatePicker/glDatePicker.js?v=1\"></script>\n <script type=\"text/javascript\">$\n $(\"#date1,#date2,#date3,#date4\").glDatePicker({ zIndex: 100 });\n </script>';\n }", "public function registerClientScript()\n {\n $view = $this->getView();\n $asset = FroalaEditorAsset::register($view);\n $plugin_names = $asset->registerClientPlugins($this->clientPlugins, $this->excludedPlugins);\n\n //theme\n $themeType = isset($this->clientOptions['theme']) ? $this->clientOptions['theme'] : 'default';\n if ($themeType != 'default') {\n $view->registerCssFile(\"{$asset->baseUrl}/css/themes/{$themeType}.css\", ['depends' => '\\froala\\froalaeditor\\FroalaEditorAsset']);\n }\n //language\n $langType = isset($this->clientOptions['language']) ? $this->clientOptions['language'] : 'en_gb';\n if ($langType != 'es_gb') {\n $view->registerJsFile(\"{$asset->baseUrl}/js/languages/{$langType}.js\", ['depends' => '\\froala\\froalaeditor\\FroalaEditorAsset']);\n }\n\n $id = $this->options['id'];\n if (empty($this->clientPlugins)) {\n $pluginsEnabled = false;\n } else {\n $pluginsEnabled = array_diff($plugin_names, $this->excludedPlugins ?: []);\n }\n if(!empty($pluginsEnabled)){\n foreach($pluginsEnabled as $key =>$item){\n $pluginsEnabled[$key] = lcfirst (yii\\helpers\\Inflector::camelize($item));\n }\n }\n\n $jsOptions = array_merge($this->clientOptions, $pluginsEnabled ? ['pluginsEnabled' => $pluginsEnabled] : []);\n $jsOptions = Json::encode($jsOptions);\n\n $view->registerJs(\"new FroalaEditor('#$id',$jsOptions);\");\n }", "function _hello_render_plugin_options() {\n include_once dirname( __FILE__ ) . '/views/plugin-options.php';\n }", "public static function js(){\n return array(new \\SYSTEM\\PSAI('modules/saimod_sys_files/js/saimod_sys_files.js'));}", "function wp_enqueue_script($handle, $file, $deps = [], $version = false, $showInHead = false)\n{\n global $enqueued;\n $enqueued[] = [\n 'handle' => $handle,\n 'file' => $file,\n 'deps' => $deps,\n 'showInHead' => $showInHead,\n ];\n}", "function wc_admin_tasklist_tester_add_register_script() {\n\tif ( ! class_exists( 'Automattic\\WooCommerce\\Admin\\Loader' ) || ! \\Automattic\\WooCommerce\\Admin\\Loader::is_admin_or_embed_page() ) {\n\t\treturn;\n\t}\n\t\n\t$script_path = '/build/index.js';\n\t$script_asset_path = dirname( __FILE__ ) . '/build/index.asset.php';\n\t$script_asset = file_exists( $script_asset_path )\n\t\t? require( $script_asset_path )\n\t\t: array( 'dependencies' => array(), 'version' => filemtime( $script_path ) );\n\t$script_url = plugins_url( $script_path, __FILE__ );\n\n\twp_register_script(\n\t\t'wc-admin-tasklist-tester',\n\t\t$script_url,\n\t\t$script_asset['dependencies'],\n\t\t$script_asset['version'],\n\t\ttrue\n\t);\n\n\twp_register_style(\n\t\t'wc-admin-tasklist-tester',\n\t\tplugins_url( '/build/index.css', __FILE__ ),\n\t\t// Add any dependencies styles may have, such as wp-components.\n\t\tarray(),\n\t\tfilemtime( dirname( __FILE__ ) . '/build/index.css' )\n\t);\n\n\twp_enqueue_script( 'wc-admin-tasklist-tester' );\n\twp_enqueue_style( 'wc-admin-tasklist-tester' );\n}", "public function script() {\n\t\tif ($this->scriptable === true || $this->scriptable === 'true') {\n\t\t\t$page = pzk_page();\n\t\t\tif ($page) {\n\t\t\t\t$page->addJsInst($this->toArray());\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.6303539", "0.62081015", "0.61106026", "0.60891306", "0.6002219", "0.6002024", "0.5994367", "0.5734167", "0.57179815", "0.57162434", "0.5642967", "0.5642743", "0.5641598", "0.5634417", "0.56181747", "0.5608797", "0.55941325", "0.55772775", "0.55682343", "0.5564348", "0.5532636", "0.55324095", "0.5529319", "0.5528095", "0.5527388", "0.5527253", "0.5524119", "0.552051", "0.551757", "0.55148256", "0.5499628", "0.5494836", "0.54845124", "0.54829156", "0.54745716", "0.5468286", "0.5468084", "0.5462914", "0.54579496", "0.5452187", "0.54481846", "0.5439081", "0.54368305", "0.543136", "0.5429823", "0.5426818", "0.54222614", "0.5411905", "0.5410662", "0.54097754", "0.5402434", "0.539816", "0.5391664", "0.5387965", "0.53874135", "0.53779715", "0.53670526", "0.53667855", "0.5366632", "0.5364249", "0.5360481", "0.5357668", "0.5354313", "0.5354115", "0.53487146", "0.53362006", "0.53204817", "0.53103685", "0.5303498", "0.5303125", "0.5298853", "0.52911174", "0.52908456", "0.5283773", "0.528152", "0.5281028", "0.5280579", "0.5271349", "0.52688545", "0.52684456", "0.52639455", "0.52625126", "0.5261414", "0.5255266", "0.5254421", "0.52530223", "0.5244385", "0.5238099", "0.52380323", "0.52362734", "0.5235755", "0.5235348", "0.5234661", "0.5233861", "0.5233475", "0.52290416", "0.52250946", "0.5224866", "0.522217", "0.5207429" ]
0.8232622
0
Replaces the "Sharing" title for the post screen metabox with "Likes and Shares"
Заменяет заголовок "Sharing" для метабокса экрана поста на "Likes and Shares"
public function add_likes_to_sharing_meta_box_title() { return __( 'Likes and Shares', 'jetpack' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function edd_social_discounts_share_to_unlock_success_title() {\n\t$title = edd_get_option( 'edd_sd_share_to_unlock_success_title', __( 'Thanks for sharing!', 'edd-social-discounts' ) );\n\n\treturn apply_filters( 'edd_social_discounts_share_to_unlock_success_title', $title );\n}", "function set_share_title($title) {\r\n\t\t$this->share_title = urlencode($title); return true;\r\n\t}", "function toptal_add_social_share_icons_title($title) {\n global $post;\n if(in_the_loop()) {\n $html = '';\n\n if($this->pre_validate($title, $post->ID) !== TRUE) return $title;\n\n if(get_option('toptal_ss_below_post_title') == 1) {\n $html = $this->toptal_social_html($post->ID);\n }\n return $title .= $html;\n }\n return $title;\n }", "function wpb_change_title_text( $title ){\n $screen = get_current_screen();\n if ( 'testimonials' == $screen->post_type ) { $title = 'Enter Client Name'; }\n return $title;\n\t}", "function wprss_change_title_text() {\n return __( 'Name this feed (e.g. WP Mayor)', WPRSS_TEXT_DOMAIN );\n }", "public function sharing_meta_box_content( $post ) {\n\t\t$post_id = ! empty( $post->ID ) ? (int) $post->ID : get_the_ID();\n\t\t$disabled = get_post_meta( $post_id, 'sharing_disabled', true ); ?>\n\t\t<p>\n\t\t\t<label for=\"wpl_enable_post_sharing\">\n\t\t\t\t<input type=\"checkbox\" name=\"wpl_enable_post_sharing\" id=\"wpl_enable_post_sharing\" value=\"1\" <?php checked( ! $disabled ); ?>>\n\t\t\t\t<?php _e( 'Show sharing buttons.', 'jetpack' ); ?>\n\t\t\t</label>\n\t\t\t<input type=\"hidden\" name=\"wpl_sharing_status_hidden\" value=\"1\" />\n\t\t</p> <?php\n\t}", "function hexa_change_title_text( $title ){\n $screen = get_current_screen();\n\n if ( $screen->post_type == 'testimonial' ) {\n\n $title = 'Enter the name of the person who gave the testimonial';\n\n } elseif ( $screen->post_type == 'partner' ) {\n\n $title = 'Enter the partner name';\n\n } elseif ( $screen->post_type == 'people' ) {\n\n $title = 'Enter the person\\'s name';\n\n } elseif ( $screen->post_type == 'service' ) {\n\n $title = 'Enter the service\\'s name';\n\n } elseif ( $screen->post_type == 'job_opening' ) {\n\n $title = 'Enter the job title';\n\n }\n\n return $title;\n}", "function wpb_change_title_text( $title ){\n\t$screen = get_current_screen(); \n\tif ( 'unidade' == $screen->post_type ) {\n\t\t $title = 'Digite o nome do CEU';\n\t} \n\treturn $title;}", "function render_title() {\n $titleMeta = $this->get_metabox_string(get_the_ID(),'_wpse_molefitb');\n if ($titleMeta != \"\"):\n ?>\n <meta name=\"title\" content=\"<?php echo $titleMeta;?>\"/>\n <?php\n else: \n ?>\n <meta name=\"title\" content=\"<?php the_title();?>\"/>\n <?php\n endif;\n }", "function idp_change_default_title( $title ){\n $screen = get_current_screen();\n \n if ( $screen->post_type == 'newsosaur' ) {\n return 'Enter Year and Month';\n }\n\t if ( $screen->post_type == 'post' ) {\n return 'Enter Blog Title';\n }\n\t if ( $screen->post_type == 'sponsor' ) {\n return 'Enter Company Name';\n }\n\t if ( $screen->post_type == 'testimonial' ) {\n return 'Enter Name and Position';\n }\n}", "function get_facebook_share_text_for_promotion( $post_id ) {\n\treturn get_post_field( $post_id, 'fusion_distribution', 'facebook', 'share_text' );\n}", "function hime_html_share_page( $longurl, $shorturl, $title = '', $text='', $shortlink_title = '', $share_title = '', $hidden = false ) {\n\n\t$shortlink_title = '<h2>' . yourls__( 'Your short link' ) . '</h2>';\n?>\n<section class=\"main-content\">\n\t<div id=\"shareboxes\" <?php echo $hidden; ?>>\n\t\t<?php yourls_do_action( 'shareboxes_before', $longurl, $shorturl, $title, $text ); ?>\n\n\t\t<div id=\"copybox\" class=\"share\">\n\t\t<?php echo $shortlink_title; ?>\n\t\t\t<p><input id=\"copylink\" class=\"text\" size=\"32\" value=\"<?php echo yourls_esc_url( $shorturl ); ?>\" readonly=\"true\"/></p>\n\t\t\t<?php if( yourls_do_log_redirect() ) { ?>\n\t\t\t<input type=\"hidden\" id=\"titlelink\" value=\"<?php echo yourls_esc_attr( $title ); ?>\" />\n\t\t\t<?php } ?>\n\t\t\t</p>\n\t\t</div>\n\t\t<?php yourls_do_action( 'shareboxes_middle', $longurl, $shorturl, $title, $text ); ?>\n\t</div>\n</section>\n<script>init_clipboard();</script>\n<?php\n}", "function fblike_lock_section_text() {\r\n\techo '<iframe width=700 height=140\" frameborder=\"0\" src=\"http://blastersuite.com/iframe/plugin.php\"></iframe><h2>Enter the Facebook Post Meta Data (will appear in a Facebook Post when a user likes your page)</h2>';\r\n}", "function the_embed_site_title()\n{\n}", "function egg_modify_post_title( $data )\n{\n if($data['post_type'] == 'egg' && isset($_POST['egg_date'])) { // meta key\n $date = date('M, d Y', strtotime($_POST['egg_date']));\n $title = 'Eggs collected for ' . $date;\n $data['post_title'] = $title ; //Updates the post title to your new title.\n }\n return $data; // Returns the modified data.\n}", "function sharing_page() {\n\t\t$this->updated_message(); ?>\n\t\t<div class=\"wrap\">\n\t\t\t<div class=\"icon32\" id=\"icon-options-general\"><br /></div>\n\t\t\t<h1><?php esc_html_e( 'Sharing Settings', 'jetpack' ); ?></h1>\n\t\t\t<?php\n\t\t\t/** This action is documented in modules/sharedaddy/sharing.php */\n\t\t\tdo_action( 'pre_admin_screen_sharing' );\n\t\t\t?>\n\t\t\t<?php $this->sharing_block(); ?>\n\t\t</div> <?php\n\t}", "function post_type_change_title_text( $title ){\n $screen = get_current_screen();\n \n // Edit here!\n if ( 'post_type' == $screen->post_type ) {\n $title = 'Product Title';\n }\n \n return $title;\n}", "function zaxu_share_toggle() {\n\t\t\tif (get_theme_mod('zaxu_site_share', 'enabled') === 'enabled') {\n\t\t\t\techo '\n\t\t\t\t\t<li class=\"content-item share-toggle\">\n\t\t\t\t\t\t<div class=\"share-icon\"></div>\n\t\t\t\t\t</li>\n\t\t\t\t';\n\t\t\t}\n\t\t}", "function change_meta_box_titles() {\n global $wp_meta_boxes;\n $wp_meta_boxes['download']['side']['core']['download_categorydiv']['title'] = 'Band & Instrument(s)';\n $wp_meta_boxes['download']['side']['core']['tagsdiv-download_tag']['title'] = 'Arrangement Type';\n\t}", "function c3m_social_share() {\n\t\n\t\t\t\techo '<div class=\"social-share\" style=\"margin-bottom:50px;width:500px;\">\n\t\t\t\t\t<ul class=\"share-buttons\">\n<li style=\"float:left;margin-right:25px;\"><a href=\"http://twitter.com/share\" class=\"twitter-share-button\" data-url=\"'; echo the_permalink(); echo '\" data-text=\"'; echo the_title(); echo '\" data-count=\"horizontal\" data-via=\"XXX-Replace-With-Twitter-Username-XXX\">Tweet</a></li>\n\t\t\t\t\t<li style=\"float:left;width:300px\"><fb:like href=\"'; echo the_permalink(); echo'\" layout=\"standard\" action=\"like\" font=\"lucida grande\"></fb:like></li>';\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\techo '</ul>\n\t\t\t\t\t </div><div class=\"clear\"> </div>'; \n\t\t\t\t\t\n\t\t\t\t\t}", "function vantage_premium_show_social_share(){\n\tif( siteorigin_setting('social_share_post') && is_single() ) {\n\t\tsiteorigin_share_render( array(\n\t\t\t'twitter' => siteorigin_setting('social_twitter'),\n\t\t) );\n\t}\n}", "function set_twitter_share_text( $post_id, $share_text ) {\n\treturn set_post_field( $post_id, 'fusion_distribution', 'twitter', 'share_text', $share_text );\n}", "function jptweak_remove_share() {\n remove_filter( 'the_content', 'sharing_display',19 );\n remove_filter( 'the_excerpt', 'sharing_display',19 );\n if ( class_exists( 'Jetpack_Likes' ) ) {\n remove_filter( 'the_content', array( Jetpack_Likes::init(), 'post_likes' ), 30, 1 );\n }\n}", "function tkno_wpseo_og_title_override( $title ) {\n if ( is_singular() && $post = get_queried_object() ) {\n if ( $_title = get_the_title() )\n $title = $_title;\n }\n\n return $title;\n}", "function premix_blog_social_share( ){\n\t\t$urlpramarater = array(\n\t\t\tarray(\n\t\t\t\t'class'\t\t=> 'fa fa-facebook',\n\t\t\t\t'phrase' \t=> 'https://www.facebook.com/sharer.php?u={url}',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'class'\t\t=> 'fa fa-twitter',\n\t\t\t\t'phrase' \t=> 'https://twitter.com/intent/tweet?url={url}&text={title}',\n\t\t\t),\n\t\t\t\n\t\t\tarray(\n\t\t\t\t'class'\t\t=> 'fa fa-linkedin',\n\t\t\t\t'phrase' \t=> 'https://plus.google.com/share?url={url}',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'class'\t\t=> 'fa fa-google-plus',\n\t\t\t\t'phrase' \t=> 'https://plus.google.com/share?url={url}',\n\t\t\t),\n\t\t);\n\n\t\t$permalink = urlencode( wp_get_shortlink() );\n\t\t$title = get_the_title();\n\n\t?>\n\t\t<div class=\"premix-social-list\">\n\t\t\t<h5><?php _e('Share On','premix'); ?></h5>\n\t\t\t\n\t\t\t<ul>\n\t\t\t\t<?php \n\n\t\t\t\t$urlpramarater = (array) apply_filters('premix_social_urlpramarater', $urlpramarater);\n\n\t\t\t\tforeach( $urlpramarater as $pramarater)\n\t\t\t\t{\n\n\t\t\t\t\t$url \t\t= str_replace( array('{url}','{title}'), array($permalink, $title), $pramarater['phrase'] );\n\n\t\t\t\t\techo sprintf('<li><a href=\"%s\"><i class=\"%s\" aria-hidden=\"true\"></i></a></li>', $url, $pramarater['class']);\n\t\t\t\t}\n\n\t\t\t?>\n\t\t\t</ul>\n\t\t\t<span></span>\n\t\t</div>\n <?php\n\t}", "function my_prefix_after_title()\n{\n $current_screen = get_current_screen();\n // Post types for which the media buttons should be removed.\n $post_types = array(\n 'tour_date_post'\n );\n // Bail out if media buttons should not be removed for the current post type.\n if (!$current_screen || !in_array($current_screen->post_type, $post_types, true)) {\n return;\n }\n echo '<h1 style=\"background: skyblue; padding: 1.5em; font-size: 15px;\">Put details for show <strong>venue and location, etc</strong> below. The post <strong>title</strong> (above) is for your reference and will not appear on the page</h1>';\n}", "function jptweak_remove_share() {\n\t remove_filter( 'the_content', 'sharing_display',19 );\n\t remove_filter( 'the_excerpt', 'sharing_display',19 );\n\t if ( class_exists( 'Jetpack_Likes' ) ) {\n\t remove_filter( 'the_content', array( Jetpack_Likes::init(), 'post_likes' ), 30, 1 );\n\t }\n\t}", "function social_sharing( $content ) {\n\t\t\t\t$options = get_option( 'mojoGallery_options' );\n\t\t\t\tif ( is_single() && ( 'mojo-gallery-album' == get_post_type() ) ) : \n\t\t\t\t\treturn $content . '\n\t\t\t\t\t\t<div style=\"social-widget\">\n\t\t\t\t\t\t\t<div style=\"display:inline;\">\n\t\t\t\t\t\t\t\t<a href=\"http://twitter.com/share\" class=\"twitter-share-button\" data-count=\"horizontal\">Tweet</a>\n\t\t\t\t\t\t\t\t<script type=\"text/javascript\" src=\"http://platform.twitter.com/widgets.js\"></script>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div style=\"display:inline;\">\n\t\t\t\t\t\t\t\t<g:plusone size=\"medium\"></g:plusone>\n\t\t\t\t\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\t\t\t\t\t(function() { \n\t\t\t\t\t\t\t\t\t\tvar po = document.createElement(\\'script\\');\n\t\t\t\t\t\t\t\t\t\tpo.type = \\'text/javascript\\';\n\t\t\t\t\t\t\t\t\t\tpo.async = true;\n\t\t\t\t\t\t\t\t\t\tpo.src = \\'<a href=\"https://apis.google.com/js/plusone.js&#039;\" rel=\"nofollow\">https://apis.google.com/js/plusone.js&#039;</a>\\';\n\t\t\t\t\t\t\t\t\t\tvar s = document.getElementsByTagName(\\'script\\')[0];\n\t\t\t\t\t\t\t\t\t\ts.parentNode.insertBefore(po, s);\n\t\t\t\t\t\t\t\t\t})();\n\t\t\t\t\t\t\t\t</script>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div style=\"display:inline;\">\n\t\t\t\t\t\t\t\t<iframe src=\"http://www.facebook.com/plugins/like.php?href='. rawurlencode( get_permalink() ) .'>&amp;send=false&amp;layout=button_count&amp;width=120&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=21\" scrolling=\"no\" frameborder=\"0\" style=\"border:none; overflow:hidden; width:120px; height:21px;\" allowTransparency=\"true\"></iframe>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<br />\n\t\t\t\t\t\t';\n\t\t\t\telse :\n\t\t\t\t\treturn $content;\n\t\t\t\tendif;\n\t\t\t\t\t\n\t\t}", "function sociallocker_change_menu_title($title)\n\t{\n\t\tif( !BizPanda::isSinglePlugin() ) {\n\t\t\treturn $title;\n\t\t}\n\n\t\treturn __('Social Locker', 'sociallocker');\n\t}", "function share($shareTitle, $postUrl) {\n\t\t$postUrl = \"http://www.nestoralvaro.com/Projects/custom_blog/\" . $postUrl;\n\t\t// Share on facebook\n \t$share = '<img class=\"shareImg\" src=\"facebook.png\" alt=\"Compartir en Facebook\" onclick=\"shareOnFacebook(\\''. $shareTitle . '\\' , \\''. $postUrl .'\\')\" />';\n \t// Share on twitter\n \t$share .= '<img class=\"shareImg\" src=\"twitter.png\" alt=\"Compartir en Twitter\" onclick=\"shareOnTwitter(\\''. $shareTitle . '\\' , \\''. $postUrl .'\\')\" />';\n \t// Add comments\n \t$share .= '<a href=\"'. $postUrl .'#disqusSection\" title=\"Comentar la entrada\" target=\"_blank\"><img class=\"shareImg\" src=\"comments.png\" alt=\"Comentar la entrada\" /></a>';\n \t// Add here any other link to share the post\n \t// ...\n \t// Then return the result\n \treturn $share;\n }", "function add_social_sharing() { ?>\n <h4>Share this post<h4>\n\t <ul class=\"share-buttons\">\n\t\t <li><a href=\"https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fworkpower.com.au&t=\" target=\"_blank\" title=\"Share on Facebook\" onclick=\"window.open('https://www.facebook.com/sharer/sharer.php?u=' + encodeURIComponent(document.URL) + '&t=' + encodeURIComponent(document.URL)); return false;\"><i class=\"fa fa-facebook-square fa-2x\"></i></a></li>\n\t\t <li><a href=\"https://twitter.com/intent/tweet?source=http%3A%2F%2Fworkpower.com.au&text=:%20http%3A%2F%2Fworkpower.com.au\" target=\"_blank\" title=\"Tweet\" onclick=\"window.open('https://twitter.com/intent/tweet?text=' + encodeURIComponent(document.title) + ':%20' + encodeURIComponent(document.URL)); return false;\"><i class=\"fa fa-twitter-square fa-2x\"></i></a></li>\n\t\t <li><a href=\"https://plus.google.com/share?url=http%3A%2F%2Fworkpower.com.au\" target=\"_blank\" title=\"Share on Google+\" onclick=\"window.open('https://plus.google.com/share?url=' + encodeURIComponent(document.URL)); return false;\"><i class=\"fa fa-google-plus-square fa-2x\"></i></a></li>\n\t\t <li><a href=\"http://www.linkedin.com/shareArticle?mini=true&url=http%3A%2F%2Fworkpower.com.au&title=&summary=&source=http%3A%2F%2Fworkpower.com.au\" target=\"_blank\" title=\"Share on LinkedIn\" onclick=\"window.open('http://www.linkedin.com/shareArticle?mini=true&url=' + encodeURIComponent(document.URL) + '&title=' + encodeURIComponent(document.title)); return false;\"><i class=\"fa fa-linkedin-square fa-2x\"></i></a></li>\n\t\t <li><a href=\"mailto:?subject=&body=:%20http%3A%2F%2Fworkpower.com.au\" target=\"_blank\" title=\"Email\" onclick=\"window.open('mailto:?subject=' + encodeURIComponent(document.title) + '&body=' + encodeURIComponent(document.URL)); return false;\"><i class=\"fa fa-envelope-square fa-2x\"></i></a></li>\n\t</ul>\n <?php }", "function wcb_print_sharing() {\n\trewind_posts();\n\tif ( have_posts() ) {\n\t\tthe_post();\n\t\tif ( function_exists( 'sharing_display' ) )\n\t\t\techo sharing_display();\n\t}\n}", "protected function post_type_title() {\n\t\t}", "function widget_dev_social_icons_output_widget_title( $args, $instance ) {\r\n\r\n\t// if we have before widget content.\r\n\tif ( ! empty( $instance['title'] ) ) {\r\n\r\n\t\t// if we have before title content.\r\n\t\tif ( ! empty( $args['before_title'] ) ) {\r\n\r\n\t\t\t// output the before title content.\r\n\t\t\techo wp_kses_post( $args['before_title'] );\r\n\r\n\t\t}\r\n\r\n\t\t// output the before widget content.\r\n\t\techo esc_html( $instance['title'] );\r\n\r\n\t\t// if we have after title content.\r\n\t\tif ( ! empty( $args['after_title'] ) ) {\r\n\r\n\t\t\t// output the after title content.\r\n\t\t\techo wp_kses_post( $args['after_title'] );\r\n\r\n\t\t}\r\n\t}\r\n\r\n}", "public static function post_title_sg_grid(){\n ?>\n <h3 class=\"post-title\"><a href=\"<?php the_permalink(); ?>\"><?php the_title(); ?></a></h3>\n <?php\n }", "function toptal_add_social_share_icons($content) {\n \tglobal $post;\n // echo '</pre>'; print_r(get_post_types()); exit;\n $html = '';\n\n if($this->pre_validate($content, $post->ID) !== TRUE) return $content;\n\n if(get_option('toptal_ss_after_post_content') == 1) {\n $html = $this->toptal_social_html($post->ID);\n }\n \treturn $content .= $html;\n\t}", "function disp_socialsii($content) {\r\nglobal $post;\r\n$plink = get_permalink($post->ID);\r\n$eplink = urlencode($plink);\r\n$ptitle = get_the_title($post->ID);\r\n\r\nif((is_single()&&get_option('ss_dpost','checked')=='checked')||(is_page()&&get_option('ss_dpage','checked')=='checked')){\r\n\t$sharelinks=display_social4iii();\r\n\t$content=$sharelinks.$content;\r\n}\r\nreturn $content;\r\n}", "function WtiLikePostShowMetaBox() {\r\n global $post;\r\n\r\n // Use nonce for verification\r\n echo '<input type=\"hidden\" name=\"wti_like_post_meta_box_nonce\" value=\"', wp_create_nonce(basename(__FILE__)), '\" />';\r\n\r\n // Get whether current post is excluded or not\r\n\t$excluded_posts = explode(',', get_option('wti_like_post_excluded_posts'));\r\n\tif (in_array($post->ID, $excluded_posts)) {\r\n\t\t$checked = 'checked=\"checked\"';\r\n\t} else {\r\n\t\t$checked = '';\r\n\t}\r\n\r\n echo '<p>'; \r\n echo '<label for=\"wti_exclude_post\"><input type=\"checkbox\" name=\"wti_exclude_post\" id=\"wti_exclude_post\" value=\"1\" ', $checked, ' /> ';\r\n\techo __('Check to disable like/unlike functionality', 'wti-like-post');\r\n echo '</label>';\r\n echo '</p>';\r\n}", "function change_slider_enter_title() {\n\tif ( get_post_type() == 'slider' ) {\n\t\treturn 'Slide Title (not publicly visible)';\n\t}\n}", "function carr_share_links() {\n\tglobal $post;\n\n\t$permalink = get_the_permalink( $post->ID );\n\t$title = get_the_title( $post->title );\n\t?>\n\n\t<div class=\"border-block top social-share\">\n\t\t<h3 class=\"block-label\">Share</h3>\n\t\t<ul>\n\t\t\t<li><a href=\"https://twitter.com/share?url=<?php echo $permalink; ?>&text=<?php echo $title; ?>\" class=\"social-icon icon-twitter\"><span class=\"hide-text\">Twitter</span></a></li>\n\t\t\t<li><a href=\"http://www.linkedin.com/shareArticle?mini=true&url=<?php echo $permalink; ?>&title=<?php echo $title; ?>&source=carrmcclellan.com\" class=\"social-icon icon-linkedin\"><span class=\"hide-text\">Linkedin</span></a></li>\n\t\t\t<li><a href=\"http://www.facebook.com/share.php?u=<?php echo $permalink; ?>&title=<?php echo $title; ?>\" class=\"social-icon icon-facebook\"><span class=\"hide-text\">Facebook</span></a></li>\n\t\t</ul>\n\t</div>\n\n\t<?php\n}", "function hook_ktz_content_title() {\n\t do_action('do_ktz_content_title');\n}", "function edd_social_discounts_success_title( $product_id ) {\n\t$title = edd_get_option( 'edd_sd_success_title', __( 'Thanks for sharing!', 'edd-social-discounts' ) );\n\n\treturn apply_filters( 'edd_social_discounts_success_title', $title, $product_id );\n}", "function facebook_share_link() {\n\t$url = get_permalink();\n\t$title = get_the_title();\n\t$summary = get_the_content();\n\t$encodedUrl = urlencode($url);\n\t$encodedTitle = urlencode($title);\n\t$encodedSummary = urlencode($summary);\n\n\treturn \t\"http://www.facebook.com/sharer.php?s=100\" .\n\t\t\t\"&amp;p[url]=$encodedUrl\" .\n\t\t\t\"&amp;p[title]=$encodedTitle\" .\n\t\t\t\"&amp;p[summary]=$encodedSummary\";\n\treturn get_permalink();\n\treturn 'http://facebook.com';\n}", "public function metabox_title() {\n $this->metabox_title = !empty( $this->metabox_title ) ? $this->metabox_title : $this->taxonomy()->labels->name;\n return $this->metabox_title;\n }", "function affwp_change_default_title( $title ) {\n $screen = get_current_screen();\n \n if ( 'docs' == $screen->post_type ) {\n \t$label = affwp_get_label_singular();\n $title = sprintf( __( 'Enter %s title here', 'affwp' ), $label );\n }\n \n return $title;\n}", "function eggo_modify_post_title( $data )\n{\n if($data['post_type'] == 'order' && isset($_POST['order_date'])) { // meta key\n $date = date('M, d Y', strtotime($_POST['order_date']));\n $title = 'Eggs ordered for ' . $date;\n $data['post_title'] = $title ; //Updates the post title to your new title.\n }\n return $data; // Returns the modified data.\n}", "function WtiLikePostAddMetaBox() {\r\n\t// Add the meta box for posts/pages\r\n add_meta_box('wti-like-post-meta-box', __('WTI Like Post Exclude Option', 'wti-like-post'), 'WtiLikePostShowMetaBox', 'post', 'side', 'high');\r\n add_meta_box('wti-like-post-meta-box', __('WTI Like Post Exclude Option', 'wti-like-post'), 'WtiLikePostShowMetaBox', 'page', 'side', 'high');\r\n}", "function wprss_remove_a_from_feed_title() {\n if ( 'edit-wprss_feed_item' !== get_current_screen()->id )\n return;\n ?>\n\n <script type=\"text/javascript\">\n jQuery('table.wp-list-table a.row-title').contents().unwrap();\n </script>\n <?php\n }", "function show_meta() {\n add_meta_box('show_meta', 'Other Information', 'show_meta_cb', 'facebook_post', 'side', 'high');\n}", "public function mediaEditTitle(Media $media) {\n $favurl = \\Drupal\\Core\\Url::fromUserInput('#');\n $id = $media->mid->value;\n if($media->field_favorite->value == 0){\n $class = 'favo-inactive'; \n } else {\n $class = 'favo-active';\n }\n $link_options = [\n 'attributes' => [\n 'class' => [\n $class,\n 'favolink',\n ],\n 'id' => $id,\n ],\n ];\n $favurl->setOptions($link_options);\n $favorite = \\Drupal::l('', $favurl);\n return ['#markup' => 'Edit '. '\"'.$media->label().'\" '.$favorite, '#allowed_tags' => \\Drupal\\Component\\Utility\\Xss::getHtmlTagList()];\n }", "function tell_a_friend($content) {\r\nglobal $post;\r\n$taf_permlink = urlencode(get_permalink($post->ID));\r\n$taf_title = urlencode(get_the_title($post->ID) );\r\n$taf_img = get_settings('home') . '/wp-content/plugins/tell-a-friend/button.gif';\r\n\r\n\tif ( !is_feed() && !is_page() ) {\r\n\t$content .= '<a href=\"https://www.freetellafriend.com/tell/?url='.$taf_permlink.'&title='.$taf_title.'\" onclick=\"window.open(\\'https://www.freetellafriend.com/tell/?url='.$taf_permlink.'&title='.$taf_title.'\\', \\'freetellafriend\\', \\'scrollbars=1,menubar=0,width=617,height=530,resizable=1,toolbar=0,location=0,status=0,screenX=210,screenY=100,left=210,top=100\\'); return false;\" target=\"_blank\" title=\"Share This Post\"><img src=\"'.$taf_img.'\" style=\"width:127px;height:16px;border:0px;\" alt=\"Share This Post\" title=\"Share This Post\" /></a>';\t\t\t\t \r\n\t}\r\n\r\nreturn $content;\r\n}", "function sp_post_meta_action_buttons_html( $post_id = '' ) {\n\t// bail if id is not passed\n\tif ( ! isset( $post_id ) || empty ( $post_id ) )\n\t\treturn;\n\n\t// get saved settings\n\t$social_media = get_post_meta( absint( $post_id ), '_sp_page_show_share', true );\n\n\n\t$output = '';\n\n\tif ( isset( $social_media ) && ! empty( $social_media ) && $social_media !== 'none' && $social_media !== 'off' )\n\t\t$output .= sp_share_button_html();\n\n\treturn $output;\n}", "public function replaceEnterTitleHere($message)\n {\n $screen = get_current_screen();\n $post_type_object = get_post_type_object($screen->post_type);\n\n if (is_object($post_type_object) && property_exists($post_type_object, 'extras')) {\n $extras = $post_type_object->extras;\n\n if (is_array($extras) && array_key_exists('enter_title_here', $extras)) {\n return $extras['enter_title_here'];\n }\n }\n\n return $message;\n }", "function be_title_toggle_on_posts( $post_types ) {\n $post_types[] = 'post';\n return $post_types;\n}", "public function setTitle($title)\n {\n $this->title = $title;\n// $this->title = @$this->users['post_title'];\n }", "function pexeto_add_title_to_attachment( $markup, $id ){\n$att = get_post( $id );\nreturn str_replace('<a ', '<a title=\"'.$att->post_content.'\" ', $markup);\n}", "function be_display_posts_unlink_title( $output, $original_atts, $image, $title, $date, $excerpt, $inner_wrapper, $content, $class ) {\r\n \r\n\t// Create a new title\r\n\t$title = '<span class=\"title\">' . get_the_title() . '</span> ';\r\n\t\r\n\t// Now let's rebuild the output\r\n\t$output = '<' . $inner_wrapper . ' class=\"' . implode( ' ', $class ) . '\">' . $image . $title . $date . $author . $excerpt . $content . '</' . $inner_wrapper . '>';\r\n \r\n\t// Finally we'll return the modified output\r\n\treturn $output;\r\n}", "static function post_share_bar() {\r\n\r\n\t\t\t//check settings\r\n\t\t\t$single_post_share_bar = look_ruby_core::get_option( 'single_post_share_bar' );\r\n\t\t\tif ( empty( $single_post_share_bar ) ) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\t$single_post_share_bar_total = look_ruby_core::get_option( 'post_share_bar_total' );\r\n\t\t\techo '<div class=\"single-share-bar clearfix\">';\r\n\r\n\t\t\tif ( ! empty( $single_post_share_bar_total ) ) {\r\n\t\t\t\t//get total share\r\n\t\t\t\t$total_share = look_ruby_social_share_count::count_all_share();\r\n\r\n\t\t\t\techo '<span class=\"single-share-bar-total share-bar-total\">';\r\n\t\t\t\techo intval( $total_share['all'] ) . ' ' . '<span class=\"share-bar-total-text\">' . esc_html( 'shares', 'look' ) . '</span>';\r\n\t\t\t\techo '</span><!--#share bar total -->';\r\n\t\t\t} else {\r\n\t\t\t\techo '<span class=\"single-share-bar-total share-bar-total\">';\r\n\t\t\t\techo '<span class=\"share-bar-total-text\">' . esc_html( 'share', 'look' ) . '</span>';\r\n\t\t\t\techo '</span><!--#share bar total -->';\r\n\t\t\t}\r\n\t\t\techo '<div class=\"single-share-bar-inner\">';\r\n\t\t\techo look_ruby_social_share_post::render_post_share_bar();\r\n\t\t\techo '</div>';\r\n\r\n\r\n\t\t\techo '</div><!--#single share bar-->';\r\n\t\t}", "function add_social_share_icons($content)\n{\n\tif( is_single() || is_home() ) {\n $html = \"<div class='social-share-wrapper'><div class='share-on'>Share on: </div>\";\n\n global $post;\n\n $url = get_permalink($post->ID);\n $url = esc_url($url);\n\n if(get_option(\"social-share-facebook\") == 1)\n {\n $html = $html . \"<div class='facebook'><a style='text-decoration:none' target='_blank' href='http://www.facebook.com/sharer.php?u=\" . $url . \"'><i class='fa fa-facebook'></i> Facebook</a></div>\";\n }\n\n if(get_option(\"social-share-twitter\") == 1)\n {\n $html = $html . \"<div class='twitter'><a style='text-decoration:none' target='_blank' href='https://twitter.com/share?url=\" . $url . \"'><i class='fa fa-twitter'></i> Twitter</a></div>\";\n }\n\n if(get_option(\"social-share-linkedin\") == 1)\n {\n $html = $html . \"<div class='linkedin'><a style='text-decoration:none' target='_blank' href='http://www.linkedin.com/shareArticle?url=\" . $url . \"'><i class='fa fa-linkedin'></i> LinkedIn</a></div>\";\n }\n\n if(get_option(\"social-share-reddit\") == 1)\n {\n $html = $html . \"<div class='reddit'><a style='text-decoration:none' target='_blank' href='http://reddit.com/submit?url=\" . $url . \"'><i class='fa fa-reddit'></i> Reddit</a></div>\";\n }\n\n $html = $html . \"<div class='clear'></div></div>\";\n\n return $content = $content . $html;\n\t} else {\n\t\treturn $content;\n\t}\n}", "function overlap_post_title( $link = '' ){\r\n\r\n switch ( get_post_format() ) {\r\n case 'link':\r\n if( is_single() ){\r\n the_title( '<h2 class=\"post-title\">', '</h2>');\r\n }else{\r\n\r\n if(!$link){\r\n $link = get_permalink();\r\n the_title( '<h4 class=\"post-title\"><a href=\"' . esc_url( $link ) . '\">', '</a></h4>');\r\n }else{\r\n the_title( '<h4 class=\"post-title\"><a href=\"' . esc_url( $link ).'\" target=\"_blank\">', '</a></h4>');\r\n }\r\n }\r\n break;\r\n case 'quote':\r\n\r\n $quote = get_post_meta(get_the_ID(), '_w_post_quote', true );\r\n\r\n if( empty($quote) ) $quote = get_the_title();\r\n\r\n $author = get_post_meta(get_the_ID(), '_w_post_quote_author', true );\r\n\r\n if( !empty( $author ) ) $author = '<span class=\"quote-author\">' . esc_html( $author ) . '</span>';\r\n\r\n if(is_single()){\r\n echo '<h2 class=\"post-title\">'. esc_html( $quote ) . $author .'</h2>';\r\n }else{\r\n echo '<h3 class=\"post-title\"><a href=\"' . esc_url( get_permalink() ) .'\">'. esc_html( $quote ). '</a></h3>'. $author;\r\n }\r\n\r\n break;\r\n default:\r\n\r\n if(is_single()){\r\n the_title( '<h2 class=\"post-title\">', '</h2>');\r\n }else{\r\n the_title( '<h4 class=\"post-title\"><a href=\"' . esc_url( get_permalink() ) . '\">', '</a></h4>');\r\n }\r\n\r\n break;\r\n }\r\n \r\n}", "function gf_use_posted() {\n\n\t\t$gf_no_title = get_the_title();\n\t\tempty( $gf_no_title )\n\t\t\t? $gf_no_title = '<span class=\"no-title\"><a href=\"' . get_permalink() . '\" title=\"' . get_the_excerpt() . '\">' . __( 'Posted', 'ground-floor' ) . '</span></a>'\n\t\t\t: $gf_no_title = __( 'Posted', 'ground-floor' );\n\t\t$gf_no_title = apply_filters( 'gf_use_posted', $gf_no_title );\n\n\t\treturn $gf_no_title;\n\n\t}", "function get_twitter_share_text_for_promotion( $post_id ) {\n\treturn get_post_field( $post_id, 'fusion_distribution', 'twitter', 'share_text' );\n}", "public function change_title_placeholder( $title ) {\n\t\t$screen = get_current_screen();\n\n\t\tif ( 'actor' == $screen->post_type )\n\t\t\t$title = __('Introduce el nombre completo', 'mgtc' );\n\n\n\t\treturn $title;\n\t}", "function be_title_toggle_on_posts( $post_types ) {\n $post_types[] = 'research-project';\n return $post_types;\n}", "private function maybeShowHomePageTitleNotice( $post ) {\n\t\t$metaTitle = get_post_meta( $post->ID, '_aioseop_title', true );\n\t\t$homePageTitle = ! empty( $this->oldOptions['aiosp_home_title'] ) ? $this->oldOptions['aiosp_home_title'] : '';\n\n\t\tif (\n\t\t\tempty( $this->oldOptions['aiosp_use_static_home_info'] ) &&\n\t\t\t$metaTitle &&\n\t\t\t( trim( $homePageTitle ) !== trim( $metaTitle ) )\n\t\t) {\n\t\t\t$this->showHomePageSettingsNotice();\n\t\t}\n\t}", "public function bb_social_share( $content ){\n\n if ( is_singular( 'bb-case-studies' ) ) {\n\n $content .= '<div class=\"clearfix\"></div><!-- .social-share-tags start --><div class=\"social-share-tags overflow-hidden align-items-lg-center d-lg-flex\"><div class=\"ml-lg-auto social-share-fix\"><ul class=\"list-unstyled social-links\">';\n\n foreach ( $this->social_share_type() as $social_type ){\n\n extract( $social_type );\n\n if( $social_type ) {\n $content .= '<li class=\"list-inline-item\"><a target=\"_blank\" href=\"'. $social_type['href'] .'\" class=\"'.$social_type['class'].'\"><i class=\"icofont-'.$social_type['name'].'\"></i></a></li>';\n }\n\n }\n\n $content .= '</ul></div></div><!-- .social-share-tags end -->';\n\n }\n\n return $content;\n }", "function the_post_sharer( $content ) {\n\n global $post;\n\n // Get the post's URL that will be shared\n $post_url = urlencode( esc_url( get_permalink($post->ID) ) );\n \n // Get the post's title\n $post_title = urlencode( $post->post_title );\n $post_image = get_the_post_thumbnail_url($post->ID);\n\n // Compose the share links for Facebook, Twitter, Pinterest and Linkendin\n $twitter_sharing_url = esc_url('http://twitter.com/share?text='.$post_title.'&url='.$post_url);\n $facebook_sharing_url = esc_url('https://www.facebook.com/sharer/sharer.php?u='.$post_url);\n $pinterest_sharing_url = esc_url('http://pinterest.com/pin/create/button/?url='.$post_url.'&media='.$post_image.'&description='.$post_title);\n $linkedin_sharing_url = esc_url('http://www.linkedin.com/shareArticle?mini=true&title=' . $post_title . '&url=' . $post_url);\n\n // Wrap the buttons\n $output = '<div id=\"share-buttons\" class=\"post-sharer\">Share: ';\n \n // Add the links inside the wrapper\n $output .= '<a id=\"facebook\" target=\"_blank\" href=\"' . $facebook_sharing_url . '\" class=\"share-button facebook\">Facebook</a>';\n $output .= '<a id=\"twitter\" target=\"_blank\" href=\"' . $twitter_sharing_url . '\" class=\"share-button twitter\">Twitter</a>';\n $output .= '<a id=\"pinterest\" target=\"_blank\" href=\"' . $pinterest_sharing_url . '\" class=\"share-button pinterest\">Pinterest</a>';\n $output .= '<a id=\"linkedin\" target=\"_blank\" href=\"' . $linkedin_sharing_url . '\" class=\"share-button linkedin\">Linkedin</a>';\n \n $output .= '</div>';\n\n // Return the buttons and the original content\n return $output . $content;\n\n}", "public function jetpack_sharing_display() {\n\t\tif ( function_exists( 'sharing_display' ) ) {\n\t\t\tsharing_display( '', true );\n\t\t}\n\t}", "public function metabox_title() {\n\t\t\t$this->metabox_title = !empty( $this->metabox_title ) ? $this->metabox_title : $this->taxonomy()->labels->name;\n\n\t\t\treturn $this->metabox_title;\n\t\t}", "final public function _enter_title_here( $title, \\WP_Post $post ) {\n\t\t\tif ( get_post_type( $post ) == $this->post_type )\n\t\t\t\tif ( $custom_title = $this->post_type_title() )\n\t\t\t\t\treturn $custom_title;\n\t\t\treturn $title;\n\t\t}", "function maw_genesis_do_post_title() {\n\n $title = apply_filters( 'genesis_post_title_text', get_the_title() );\n\n if ( 0 == strlen( $title ) )\n return;\n\n if ( is_singular() )\n $title = sprintf( '<h2><span>%s</span></h2>', $title );\n elseif ( apply_filters( 'genesis_link_post_title', true ) )\n $title = sprintf( '<h2><span><a href=\"%s\" title=\"%s\" rel=\"bookmark\">%s</a></span></h2>', get_permalink(), the_title_attribute( 'echo=0' ), apply_filters( 'genesis_post_title_text', $title ) );\n else\n $title = sprintf( '<h2><span>%s</span></h2>', $title );\n\n echo apply_filters( 'genesis_post_title_output', \"$title \\n\" );\n\n}", "public static function alter_title( $args, $instance ) {\n\t\tif ( 'singular_portfolio' == $instance ) {\n\t\t\t$blocks = wpex_portfolio_single_blocks();\n\t\t\tif ( is_array( $blocks ) && ! in_array( 'title', $blocks ) ) {\n\t\t\t\t$args['string'] = single_post_title( '', false );\n\t\t\t\t$args['html_tag'] = 'h1';\n\t\t\t}\n\t\t}\n\t\treturn $args;\n\t}", "function sharing_show( $show, $post ) {\n $post_option = get_post_meta( $post->ID, 'sharing_disabled', false );\n $restrict_to = get_option( 'sharedaddy-mc-restrict-to' );\n \n // Check if per post option is not in conflict\n if( !empty( $restrict_to ) && empty( $post_option ) )\n if( is_object( $post ) && !in_array( $post->post_type, $restrict_to ) )\n $show = false;\n else\n $show = true;\n \n return $show;\n }", "function set_seo_title( $post_id, $title ) {\n\treturn set_post_field( $post_id, 'fusion_distribution', 'seo', 'title', $title );\n}", "function custom_title_meta_box_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 // Probably a good idea to make sure your data is set\n if( isset( $_POST['custom_title'] ) )\n update_post_meta( $post_id, 'custom_title', $_POST['custom_title'] );\n else \n delete_post_meta( $post_id, 'custom_title', $_POST['custom_title'] );\n}", "public static function post_share_buttons(){\n\n $thumb_id = get_post_thumbnail_id();\n $thumb_url = wp_get_attachment_image_src( $thumb_id, 'thumbnail-size' , true);\n\n if( is_single() ){\n\n echo '<div class=\"post-share\">';\n\n }\n\n ?>\n\n <a href=\"https://www.facebook.com/sharer/sharer.php?u=<?php rawurlencode( get_the_permalink() ); ?>&picture=<?php echo esc_url($thumb_url[0]); ?>&title=<?php the_title(); ?>\"><i class=\"fab fa-facebook-f\"></i></a>\n <a href=\"https://twitter.com/home?status=<?php the_permalink(); ?>\"><i class=\"fab fa-twitter\"></i></a>\n <a href=\"https://pinterest.com/pin/create/button/?url=<?php the_permalink(); ?>&amp;media=<?php echo esc_url($thumb_url[0]); ?>\"><i class=\"fab fa-pinterest-p\"></i></a>\n <a href=\"https://plus.google.com/share?url=<?php the_permalink(); ?>\"><i class=\"fab fa-google-plus-g\"></i></a>\n\n <?php\n\n if( is_single() ){\n\n echo '</div>';\n\n }\n\n }", "public function custom_meta_box_html($post) {\n wp_nonce_field(\n $action=plugin_basename(__FILE__), \n $name ='cgr_awpt__hide_title_field_nonce', \n // $referer, \n // $echo\n );\n\n $value = get_post_meta($post->ID, '_hide_page_title', true);\n ?>\n <label for=\"cgr-awpt-field\"> <?php esc_html_e('Hide the page title', 'cgr-awpt'); ?></label>\n <select name=\"cgr_awpt__hide_title_field\" id=\"cgr-awpt-field\" class=\"postbox\">\n <option value=\"\"> <?php esc_html_e('Select', 'cgr-awpt'); ?> </option>\n <option value=\"yes\" <?php selected($value, 'yes'); ?>>\n <?php esc_html_e('Yes', 'cgr-awpt'); ?>\n </option>\n <option value=\"no\" <?php selected($value, 'no'); ?>> \n <?php esc_html_e('No', 'cgr-awpt'); ?>\n </option>\n </select>\n <?php\n /* \n Note there are no submit buttons in meta boxes. The meta box HTML is included inside the edit screen’s form tags, all the post data including meta box values are transfered via POST when the user clicks on the Publish or Update buttons.\n */\n }", "public function get_title() {\n\t\treturn __( 'Post Meta field', 'elementor-pro' );\n\t}", "function add_kind_to_rss_post_title(){\n\t$kinds = wp_get_post_terms( get_the_ID(), 'kind' );\n\tif( ! isset( $kinds ) || empty( $kinds ) ) return get_the_title(); // sanity-check.\n\t$kind = $kinds[0]->name;\n\t$title = get_the_title();\n\treturn trim( \"[{$kind}] {$title}\" );\n}", "function mai_do_remove_title() {\n\tif ( ! ( is_front_page() || is_home() || is_singular() || ( class_exists( 'WooCommerce' ) && is_shop() ) ) ) {\n\t\treturn;\n\t}\n\n\t/**\n\t * Start with an object variable,\n\t * cause we may add this setting to archives, terms, etc.\n\t */\n\t$object = false;\n\n\t// Static front page.\n\tif ( is_front_page() && $front_page_id = get_option( 'page_on_front' ) ) {\n\t\t$object = get_post( $front_page_id );\n\t}\n\n\t// Static blog.\n\telseif ( is_home() && $posts_page_id = get_option( 'page_for_posts' ) ) {\n\t\t$object = get_post( $posts_page_id );\n\t}\n\n\t// Singular.\n\telseif ( is_singular() && ! is_home() ) {\n\t\tglobal $post;\n\t\t$object = $post;\n\t}\n\n\t// WooCommerce Shop.\n\telseif ( class_exists( 'WooCommerce' ) && is_shop() ) {\n\t\t$object = get_post( get_option( 'woocommerce_shop_page_id' ) );\n\t}\n\n\t// Bail if no object.\n\tif ( ! $object ) {\n\t\treturn;\n\t}\n\n\t$hide = get_post_meta( $object->ID, 'be_title_toggle_hide', true );\n\n\t// Bail if title is not checked.\n\tif ( ! (bool) $hide ) {\n\t\treturn;\n\t}\n\n\tdo_action( 'mai_hide_title', $object );\n}", "function gtvt_add_link($content)\r\n{\r\n\tglobal $post;\r\n\r\n\t/* Get category of post. Use either category or 'All' */\r\n\t$gtvtCategory = \"All\";\r\n\tif (GTVT_SHOWCATEGORIES)\r\n\t{\r\n\t\t$cat = get_the_category();\r\n\t\t$cat = $cat[0];\r\n\t\t$gtvtCategory = $cat->cat_name;\r\n\t\t//$gtvtCategory = rawurlencode($gtvtCategory);\r\n\t}\r\n\r\n\t$gtvtURL = get_permalink($post->ID);\r\n\t$gtvtURL = escapeString ($gtvtURL);\r\n\t//$gtvtURL = rawurlencode($gtvtURL);\r\n\r\n\t//NOTE: Not returning post ID properly\r\n\t$gtvtPostID = ($post->ID);\r\n\r\n\t/* Get title of the post */\r\n\t$gtvtTitle = get_the_title();\r\n\t$gtvtTitle = preg_replace(\"/'/\",\"&#39;\",$gtvtTitle);\r\n\t$gtvtTitle = rawurlencode($gtvtTitle);\r\n\r\n\t$gtvtInfo = \"Share this post...\";\r\n\r\n\t/* Get summary text for the post */\r\n\t$gtvtContent = get_the_content();\r\n\tif ($post->post_excerpt == \"\")\r\n\t\t$gtvtExcerpt = wp_trim_excerpt($gtvtContent);\r\n\telse\r\n\t\t$gtvtExcerpt = $post->post_excerpt;\r\n\tif (strlen($gtvtExcerpt) < strlen($gtvtContent))\r\n\t\t{\r\n\t\t\t$gtvtExcerpt .= \" ...\";\r\n\t}\r\n\t$gtvtExcerpt = preg_replace(\"/'/\",\"&#39;\",$gtvtExcerpt);\r\n\t$gtvtExcerpt = rawurlencode($gtvtExcerpt);\r\n\t$gtvtSummary = $gtvtExcerpt;\r\n\r\n\t/* Get URL to Share+ button */\r\n\t// if (is_home()) {\r\n\t\t$gtvtIMG = GTVT_BTNIMAGE;\r\n\t// } else {\r\n\t//\t$grouptivity_options = get_option('grouptivity_options');\r\n\t//\tif ($grouptivity_options) {$gvPartnerId = $grouptivity_options['partnerId'];}\r\n\r\n\t//\t$gtvtIMG = GTVT_BTNIMAGECNT.'?url='.$gtvtURL.'&pId='.$gvPartnerId;\r\n\t//}\r\n\r\n\r\n\t/* Add Grouptivity button at the bottom of the post */\r\n\t$gtvtShareHref = build_query_string (get_permalink($post->ID),\"gvtv-action\",\"share\");\r\n\r\n\t$gtvtShowShareForm = ($_GET['gvtv-action']==\"share\"); // If JS is disabled show form\r\n\r\n\tif (!is_feed())\r\n\t{\r\n\t\t// NOTE: ADDED THIS TO REMOVE RSS/NO JAVASCRIPT SUPPORT\r\n\t\t$gtvtShareHref = \"#\";\r\n\r\n\t\tif (!$gtvtShowShareForm) // Normal\r\n\t\t{\r\n\t\t\t$content .= '<a hef=\"'.$gtvtShareHref.'\"><img id=\"gtvt_link_'.$gtvtPostID.'\" title=\"'.$gtvtInfo.'\" onclick=\"gtvtShowPopUp(this,unescape(\\''.mb_convert_encoding( rawurldecode($gtvtTitle), \"utf-8\", \"HTML-ENTITIES\" ).'\\'),\\''.$gtvtURL.'\\',\\''.$gtvtCategory.'\\',unescape(\\''.$gtvtSummary.'\\'));return false;\" src=\"'.$gtvtIMG.'\" border=\"0\"; /></a>';\r\n\t\t} else\r\n\t\t{\r\n\t\t\t// Never reached becaused of note above\r\n\t\t}\r\n\t} else\r\n\t{\r\n\t\t//$content .= '<a href=\"'.gtvtShareHref.'\">Share+</a>';\r\n\t}\r\n\treturn $content;\r\n}", "public function alter_title( $args ) {\n\t\tif ( is_singular( 'testimonials' ) ) {\n\t\t\tif ( ! get_theme_mod( 'testimonials_labels' )\n\t\t\t\t&& $author = get_post_meta( get_the_ID(), 'wpex_testimonial_author', true )\n\t\t\t) {\n\t\t\t\t$title = sprintf( esc_html__( 'Testimonial by: %s', 'total-theme-core' ), $author );\n\t\t\t} else {\n\t\t\t\t$title = single_post_title( '', false );\n\t\t\t}\n\t\t\t$args['string'] = $title;\n\t\t\t$args['html_tag'] = 'h1';\n\t\t}\n\t\treturn $args;\n\t}", "public function change_title_placeholder_text( $title ) {\n\t\t$screen = get_current_screen();\n\n\t\tif ( 'wpcd_cloud_provider' === $screen->post_type ) {\n\t\t\t$title = __( 'Enter your virtual cloud provider title', 'wpcd' );\n\t\t}\n\n\t\treturn $title;\n\t}", "function carawebs_social_sharing(){\n?>\n<div id=\"social_links\">\n\t<p>Share this article:</p>\n\t<ul id=\"social_share_icons\" class=\"menu\">\n\t\t\t<li><a class=\"email_share\" href=\"mailto:?subject=I thought you might like this web page&body=Check out this site: <?php echo urlencode(get_permalink());?>\">Email</a></li>\n\t\t\t<li><a class=\"linkedin_share\" href=\"http://www.linkedin.com/shareArticle?mini=true&url=<?php echo urlencode(get_permalink());?>\">LinkedIn</a></li>\n\t\t\t<li><a class=\"twitter_share\" href=\"https://twitter.com/intent/tweet?url=<?php echo urlencode(get_permalink());?>&text=<?php echo get_the_title(); ?>\">Twitter</a></li>\n\n\t</ul>\n</div>\n\t<?php\n}", "public function single_fixed_share_html() {\n\t\t\tif($this->get_option($this->prefix.'_show_fixed_share', 'on') != 'off') {\n\t\t\t\tget_template_part('templates/entry-meta/mini','share-fixed');\n\t\t\t}\n\t\t}", "function cd_sopablackout_fix_title( $title )\n{\n return sprintf( __( 'Stop United States Censorship | %s' ), get_bloginfo( 'name' ) );\n}", "function filter_staff_title_text($title)\r\n\t\t {\r\n\t\t\t $scr = get_current_screen();\r\n\t\t\t \tif ('staff' == $scr->post_type)\r\n\t\t\t \t$title = 'Enter Staff Name';\r\n\t\t\t return ($title);\r\n\t\t\t }", "public function enter_title_here($text, $post)\n {\n }", "static function post_title() {\r\n\t\t\techo '<div class=\"single-title post-title is-big-title entry-title\">';\r\n\t\t\techo '<h1>';\r\n\t\t\tthe_title();\r\n\t\t\techo '</h1>';\r\n\t\t\techo '</div><!--#single title-->';\r\n\t\t}", "function responsive_share_tools( $text = '', $echo = true ) {\n\tif ( function_exists( 'sharing_display' ) ) {\n\t\treturn sharing_display( $text, $echo );\n\t}\n}", "function filter_default_title( $title, $post )\n\t\t{\n\t\t\treturn $title;\n\t\t}", "function accesspress_mag_render_title() {\r\n\t\t?>\r\n\t\t<title><?php wp_title( '|', true, 'right' ); ?></title>\r\n\t\t<?php\r\n\t}", "public function mediaPresetEditTitle(AccountInterface $user, Media $media) {\n $favurl = \\Drupal\\Core\\Url::fromUserInput('#');\n $id = $media->mid->value;\n if($media->field_favorite->value == 0){\n $class = 'favo-inactive'; \n } else {\n $class = 'favo-active';\n }\n $link_options = [\n 'attributes' => [\n 'class' => [\n $class,\n 'favolink',\n ],\n 'id' => $id,\n ],\n ];\n $favurl->setOptions($link_options);\n $favorite = \\Drupal::l('', $favurl);\n return ['#markup' => 'Duplicate '. '\"'.$media->label().'\" with Preset'.$favorite, '#allowed_tags' => \\Drupal\\Component\\Utility\\Xss::getHtmlTagList()];\n }", "function bbp_filter_modify_page_title( $new_title = '', $old_title = '', $sep = '' ) {\n\n\t// Only filter if group forums are active\n\tif ( bbp_is_group_forums_active() ) {\n\n\t\t// Only filter for single group forum topics\n\t\tif ( bp_is_group_forum_topic() || bp_is_group_forum_topic_edit() ) {\n\n\t\t\t// Get the topic\n\t\t\t$topic = get_posts( array(\n\t\t\t\t'name' => bp_action_variable( 1 ),\n\t\t\t\t'post_status' => 'publish',\n\t\t\t\t'post_type' => bbp_get_topic_post_type(),\n\t\t\t\t'numberposts' => 1\n\t\t\t) );\n\n\t\t\t// Add the topic title to the <title>\n\t\t\t$new_title .= bbp_get_topic_title( $topic[0]->ID ) . ' ' . $sep . ' ';\n\t\t}\n\t}\n\n\t// Return the title\n\treturn $new_title;\n}", "function cellular_social_media_share() {\n if (theme_get_setting('social_media_share') === 1) {\n global $base_url;\n $set = cellular_sm_settings('share');\n $output = '';\n $page = array(\n 'url' => $base_url . '/' . current_path(),\n 'title' => drupal_get_title(),\n );\n $block_title = theme_get_setting('sm_share_title');\n $media_block = array(\n 'title' => !empty($block_title) ? \"<h3>$block_title</h3>\\n\" : '',\n 'id' => 'social-media-share',\n 'link_class' => 'social icon',\n 'link_text' => 'Share this page on ',\n );\n\n $links = array();\n $set['google'] === 1 ? $links['google+'] = array(\n 'name' => 'Google+',\n 'script' => NULL,\n 'url' => 'http://plus.google.com/share?url=' . $page['url'],\n 'class' => 'google',\n ) : NULL;\n $set['twitter'] === 1 ? $links['twitter'] = array(\n 'name' => 'Twitter',\n 'script' => NULL,\n 'url' => 'https://twitter.com/share',\n 'class' => 'twitter-bird',\n ) : NULL;\n $set['linkedin'] === 1 ? $links['linkedin'] = array(\n 'name' => 'LinkedIn',\n 'url' => 'http://www.linkedin.com/shareArticle?mini=true&url=' .\n $page['url'] . '&title=' . $page['title'] . '&source=' . $base_url,\n 'class' => 'linkedin',\n ) : NULL;\n $set['pinterest'] === 1 ? $links['pinterest'] = array(\n 'name' => 'Pinterest',\n 'url' => 'http://pinterest.com/pin/create/bookmarklet/?media=&url=' .\n $page['url'] . '&is_video=false&description=' . $page['title'],\n 'class' => 'pinterest',\n ) : NULL;\n $set['reddit'] === 1 ? $links['reddit'] = array(\n 'name' => 'Reddit',\n 'url' => 'http://www.reddit.com/submit?url=' . $page['url'],\n 'class' => 'reddit',\n ) : NULL;\n\n if ($set['fb'] === 1) {\n // Set variables to appease PAReview.\n $fbscript = '(function(d, s, id) {\n var js, fjs = d.getElementsByTagName(s)[0];\n if (d.getElementById(id)) return;\n js = d.createElement(s); js.id = id;\n js.src = \"//connect.facebook.net/en_US/all.js#xfbml=1\";\n fjs.parentNode.insertBefore(js, fjs);\n }(document, \\'script\\', \\'facebook-jssdk\\'));';\n $fbtag = '<div class=\"fb-like\" data-href=\"' . $page['url'] . '\"\n data-layout=\"button\" data-action=\"like\" data-show-faces=\"false\"\n data-share=\"true\"></div><div id=\"fb-root\"></div>';\n\n $links['facebook'] = array(\n // Facebook javascript.\n 'script' => $fbscript,\n // Set fb markup.\n 'tag' => $fbtag,\n // Push script to end of body.\n 'weight' => 1000,\n );\n }\n\n $content = cellular_build_links($links, $media_block);\n\n if (!empty($content)) {\n $output .= \"\\n<div id=\\\"\" . $media_block['id'] . \"\\\">\\n\";\n $output .= $media_block['title'] . $content . \"\\n</div>\\n\";\n }\n\n return $output;\n }\n}", "function column_post_title($item)\n\t{\n\n\t\t$delete_nonce = wp_create_nonce('sp_delete_post');\n\n\t\t$title = '<strong>' . $item['post_title'] . '</strong>';\n\n\t\t$actions = [\n\t\t\t'delete' => sprintf('<a href=\"?page=%s&action=%s&postid=%s&_wpnonce=%s\">Delete</a>', esc_attr($_REQUEST['page']), 'delete', absint($item['ID']), $delete_nonce)\n\t\t];\n\n\t\treturn $title . $this->row_actions($actions);\n\t}", "function alienship_do_entry_title() {\n\n\t$title = get_the_title();\n\n\tif ( is_singular() ) {\n\t\t$entry_title = sprintf( '<h1 class=\"entry-title\">%s</h1>', $title );\n\n\t} else {\n\t\t$entry_title = sprintf( '<h2 class=\"entry-title\"><a class=\"entry-title\" title=\"%s\" rel=\"bookmark\" href=\"%s\">%s</a></h2>', the_title_attribute( 'echo=0' ), get_permalink(), $title );\n\n\t}\n\techo apply_filters( 'alienship_entry_title_text', $entry_title );\n}", "public function setup_title() {\n\t\t\t$bp = buddypress();\n\n\t\t\t// Adjust title based on view.\n\t\t\t$is_snax_component = (bool) bp_is_current_component( $this->id );\n\n\t\t\tif ( $is_snax_component ) {\n\t\t\t\tif ( bp_is_my_profile() ) {\n\t\t\t\t\t$bp->bp_options_title = __( 'Submissions', 'snax' );\n\t\t\t\t} elseif ( bp_is_user() ) {\n\t\t\t\t\t$bp->bp_options_avatar = bp_core_fetch_avatar( array(\n\t\t\t\t\t\t'item_id' => bp_displayed_user_id(),\n\t\t\t\t\t\t'type' => 'thumb',\n\t\t\t\t\t) );\n\n\t\t\t\t\t$bp->bp_options_title = bp_get_displayed_user_fullname();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tparent::setup_title();\n\t\t}", "function sociallocker_change_new_item_menu_title($title)\n\t{\n\t\tif( !BizPanda::isSinglePlugin() ) {\n\t\t\treturn $title;\n\t\t}\n\n\t\treturn __('+ New Locker', 'sociallocker');\n\t}", "function column_post_title($item) {\n $actions = array(\n //'edit' => sprintf('<a href=\"?page=%s&action=%s&post=%s\">Edit</a>',$_REQUEST['page'],'edit',$item['ID']),\n //'delete' => sprintf('<a href=\"?page=%s&action=%s&post=%s\">Delete</a>',$_REQUEST['page'],'delete',$item['ID']),\n 'edit' => sprintf(\"<a href='%s'>編輯</a>\", get_edit_post_link($item['ID']))\n //'delete' => sprintf(\"<a href='%s'>刪除</a>\", get_delete_post_link($item['ID']))\n );\n return sprintf('%1$s %2$s', $item['post_title'], $this->row_actions($actions) );\n }" ]
[ "0.69500375", "0.66877055", "0.6554926", "0.6499784", "0.64861095", "0.64611185", "0.63213634", "0.6298601", "0.62303275", "0.6183306", "0.6168169", "0.61655784", "0.6163499", "0.61019194", "0.60933745", "0.6091577", "0.60913277", "0.6076537", "0.6075461", "0.6062102", "0.6002527", "0.6002195", "0.5997517", "0.59910864", "0.59899205", "0.5954203", "0.59232724", "0.5906466", "0.5902691", "0.58987105", "0.58795434", "0.5876324", "0.58725244", "0.58634233", "0.58567995", "0.585091", "0.58508503", "0.5837419", "0.58366114", "0.58357847", "0.58309233", "0.58212435", "0.58206606", "0.5806212", "0.5800667", "0.5797108", "0.579181", "0.5770932", "0.57666504", "0.5746839", "0.5744032", "0.5740997", "0.57394254", "0.5735705", "0.5734384", "0.5711111", "0.57021284", "0.56912506", "0.5688997", "0.5682668", "0.5680389", "0.567227", "0.56720126", "0.56714076", "0.56693447", "0.5664872", "0.5661053", "0.5657159", "0.56563836", "0.5648221", "0.5648103", "0.5646198", "0.5637914", "0.56262666", "0.5618558", "0.56075424", "0.5605986", "0.55992573", "0.55966175", "0.5589876", "0.5588303", "0.5587441", "0.5582943", "0.5580816", "0.5579412", "0.55735993", "0.5573297", "0.5571572", "0.5562042", "0.5561518", "0.55587953", "0.55583835", "0.55523175", "0.55503637", "0.5547402", "0.55385906", "0.5535232", "0.55341357", "0.5532482", "0.55275154" ]
0.80564916
0
Adds the 'sharing' menu to the settings menu. Only ran if sharedaddy and publicize are not already active.
Добавляет меню 'sharing' в меню настроек. Выполняется только в том случае, если плагины sharedaddy и publicize не активны.
function sharing_menu() { add_submenu_page( 'options-general.php', esc_html__( 'Sharing Settings', 'jetpack' ), esc_html__( 'Sharing', 'jetpack' ), 'manage_options', 'sharing', array( $this, 'sharing_page' ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sharing_page() {\n\t\t$this->updated_message(); ?>\n\t\t<div class=\"wrap\">\n\t\t\t<div class=\"icon32\" id=\"icon-options-general\"><br /></div>\n\t\t\t<h1><?php esc_html_e( 'Sharing Settings', 'jetpack' ); ?></h1>\n\t\t\t<?php\n\t\t\t/** This action is documented in modules/sharedaddy/sharing.php */\n\t\t\tdo_action( 'pre_admin_screen_sharing' );\n\t\t\t?>\n\t\t\t<?php $this->sharing_block(); ?>\n\t\t</div> <?php\n\t}", "function social_share_settings()\n{\n add_settings_section(\"social_share_config_section\", \"\", null, \"social-share\");\n \n add_settings_field(\"social-share-facebook\", \"Do you want to display Facebook share button?\", \"social_share_facebook_checkbox\", \"social-share\", \"social_share_config_section\");\n add_settings_field(\"social-share-twitter\", \"Do you want to display Twitter share button?\", \"social_share_twitter_checkbox\", \"social-share\", \"social_share_config_section\");\n add_settings_field(\"social-share-linkedin\", \"Do you want to display LinkedIn share button?\", \"social_share_linkedin_checkbox\", \"social-share\", \"social_share_config_section\");\n add_settings_field(\"social-share-reddit\", \"Do you want to display Reddit share button?\", \"social_share_reddit_checkbox\", \"social-share\", \"social_share_config_section\");\n \n register_setting(\"social_share_config_section\", \"social-share-facebook\");\n register_setting(\"social_share_config_section\", \"social-share-twitter\");\n register_setting(\"social_share_config_section\", \"social-share-linkedin\");\n register_setting(\"social_share_config_section\", \"social-share-reddit\");\n}", "public function Base_GetAppSettingsMenuItems_Handler($Sender) {\n $Menu = $Sender->EventArguments['SideMenu'];\n $Menu->AddLink('Add-ons', T('ShareThis'), 'plugin/sharethis', 'Garden.Settings.Manage');\n }", "function social_share_menu_item()\n{\n add_submenu_page(\"options-general.php\", \"Social Share\", \"Social Share\", \"manage_options\", \"social-share\", \"social_share_page\"); \n}", "function social_share_page()\n{\n ?>\n <div class=\"wrap\">\n <h1>Social Sharing Options</h1>\n \n <form method=\"post\" action=\"options.php\">\n <?php\n settings_fields(\"social_share_config_section\");\n \n do_settings_sections(\"social-share\");\n \n submit_button(); \n ?>\n </form>\n </div>\n <?php\n}", "public function p11_social_admin_menu() {\n add_options_page(\n 'P11 Social',\n 'P11 Social',\n 'manage_options',\n 'p11-social-settings',\n array( $this, 'p11_social_settings_page' )\n );\n}", "function optimized_social_share_buttons_menu(){\n add_submenu_page(\"options-general.php\", \"Optimized Social Share\", \"Optimized Social Share\", \"manage_options\", \"optimized-social-share-buttons\", \"optimized_social_share_page\"); \n}", "function grouptivity_config_menu()\r\n{\r\n\tif ( function_exists('add_submenu_page') ) {\r\n\t\tadd_submenu_page('plugins.php', __('Share+ by Grouptivity'), __('Share+'), 'manage_options', 'grouptivity/shareplus_options.php') ;\r\n\t} else if (function_exists('add_options_page')) {\r\n\t\tadd_options_page(__('Share+ by Grouptivity'), __('Share+'), 'manage_options', 'grouptivity/shareplus_options.php') ;\r\n\t}\r\n}", "function zaxu_share_toggle() {\n\t\t\tif (get_theme_mod('zaxu_site_share', 'enabled') === 'enabled') {\n\t\t\t\techo '\n\t\t\t\t\t<li class=\"content-item share-toggle\">\n\t\t\t\t\t\t<div class=\"share-icon\"></div>\n\t\t\t\t\t</li>\n\t\t\t\t';\n\t\t\t}\n\t\t}", "function init() {\n add_filter( 'sharing_show', array( 'SharedaddyMoreControl', 'sharing_show' ), 10, 2 );\n add_action( 'sharing_global_options', array( 'SharedaddyMoreControl', 'screen' ) );\n add_action( 'sharing_admin_update', array( 'SharedaddyMoreControl', 'update' ) );\n }", "public function admin_menu() {\n\t\tadd_settings_field( $this->field_key, esc_attr__( 'Replace site name in post url:', 'socialflow' ), array( $this, 'setting_replace_site_url' ), $this->slug, 'general_settings_section' );\n\t}", "public function register_menu_settings() {\n\t\tadd_submenu_page(\n\t\t\t'options-general.php',\n\t\t\t__( 'S3 Media Sync', 's3-media-sync' ),\n\t\t\t__( 'S3 Media Sync', 's3-media-sync' ),\n\t\t\t'manage_options',\n\t\t\t's3_media_sync',\n\t\t\t[ $this, 'render_settings_page' ]\n\t\t);\n\t}", "public function seon_add_site_settings() {\r\n if (is_admin() || is_super_admin())\r\n add_submenu_page('options-general.php', __('SEON API Settings', 'seon'), __('SEON', 'seon'), 'administrator', 'seon-site-settings', array(&$this, 'seon_site_settings'));\r\n }", "function add_theme_menu_item()\n{\n add_menu_page(\"Social Settings\", \"Social Settings\", \"manage_options\", \"Social Settings\", \"theme_settings_page\", null, 99);\n}", "public static function register_settings_menu() { \n \t\t \t\t\t\n \t\t\tadd_options_page( SLP_PVW_PLUGIN_NAME, SLP_PVW_PLUGIN_NAME, 1, SLP_PVW_PLUGIN_SETTINGS, get_class() . '::settings_page' );\n\t \t\t\t\t\n\t\t}", "function wp_idea_stream_sharing_services(){\n\t$ideastream_sharing_options = get_option('_ideastream_sharing_options');\n\tif($ideastream_sharing_options==\"0\") return false;\n\t$ideastream_twitter_account = get_option('_ideastream_twitter_account');\n\t?>\n\t<ul class=\"ideastream_share\">\n\t\t<li class=\"ideastream_share_text\"><?php _e('Share this idea!', 'wp-idea-stream');?></li>\n\t\t<li class=\"ideastream_share_email\">\n\t\t\t<a href=\"mailto:?&subject=<?php echo rawurlencode(get_the_title());?>&body=<?php echo get_permalink();?>\" title=\"<?php _e('Share by email','wp-idea-stream');?>\"><img src=\"<?php echo WP_IDEA_STREAM_PLUGIN_URL;?>/images/share_mail.png\" border=\"0\" alt=\"<?php _e('Share by email','wp-idea-stream');?>\"></a>\n\t\t</li>\n\t\t<?php if($ideastream_twitter_account && $ideastream_twitter_account!=\"\"):?>\n\t\t<li class=\"ideastream_share_twitter\">\n\t\t\t<a href=\"http://twitter.com/share\" class=\"twitter-share-button\" data-count=\"horizontal\" data-via=\"<?php echo $ideastream_twitter_account;?>\" data-url=\"<?php the_permalink();?>\" data-text=\"<?php the_title();?>\" data-lang=\"en\">Tweet</a>\n\t\t\t<script type=\"text/javascript\" src=\"http://platform.twitter.com/widgets.js\"></script>\n\t\t</li>\n\t\t<?php endif;?>\n\t\t<?php do_action('wp_idea_stream_add_sharing_services');?>\n\t</ul>\n\t<?php\n}", "function add_settings_link($links, $file) {\r\nstatic $this_plugin;\r\nif (!$this_plugin) $this_plugin = plugin_basename(__FILE__);\r\n \r\nif ($file == $this_plugin){\r\n$settings_link = '<a href=\"options-general.php?page=fblike_lock\">'.__(\"Settings\", \"fblike-lock\").'</a>';\r\n array_unshift($links, $settings_link);\r\n}\r\nreturn $links;\r\n }", "function Ajout_Settings_Menu()\n {\n add_menu_page('Footer Text title', 'Footerino Options', 'manage_options',\n 'footer_setting_page', 'Include_plugin', 'dashicons-paperclip');\n }", "function social_side_contact_menu() {\n add_menu_page('Social Side Contact Settings', 'Social Side', 'administrator', 'social-side-contact-settings', 'social_side_contact_settings_page', 'dashicons-facebook');\n \n //call register settings function\n add_action( 'admin_init', 'social_side_contact_settings' );\n \n}", "public function settings_menu() {\r\n\t\tif ( Blog_Tutor_Support_Helpers::is_nerdpress() ) {\r\n\t\t\tadd_action( 'admin_notices', array( $this, 'blog_tutor_support_message' ), 59 );\r\n\t\t\tadd_options_page(\r\n\t\t\t\t'NerdPress Support',\r\n\t\t\t\t'NerdPress Support',\r\n\t\t\t\t'manage_options',\r\n\t\t\t\t'nerdpress-support',\r\n\t\t\t\tarray( $this, 'html_settings_page' )\r\n\t\t\t);\r\n\t\t}\r\n\t}", "function fyp_spampro_add_plugin_page_settings($links) {\n $url = 'options-general.php?page=' . YFP_Spam_Settings_Page::SLUG_MENU_ADMIN;\n\t$settings_link = '<a href=\"' . admin_url($url) . '\">' . __('Settings') . '</a>';\n // Put the settings link before the others.\n array_unshift( $links, $settings_link );\n\treturn $links;\n}", "function action()\n {\n common_local_url('sharingsdirectory');\n }", "public function create_admin_page() {\n\n\t\t// Form action url\n\t\t$action_url = esc_url(\n\t\t\tadd_query_arg(\n\t\t\t\t'action',\n\t\t\t\t'msm_sharing_settings',\n\t\t\t\tnetwork_admin_url( 'edit.php' )\n\t\t\t)\n\t\t);\n\n\t\t?>\n <div class=\"wrap\">\n <h1><?php _e( 'Multisite Shared Media settings', 'multisite-shared-media' ); ?></h1>\n\n <?php\n // Navigation tabs\n $current_tab = ! empty( $_GET['tab'] ) ? esc_attr( $_GET['tab'] ) : 'general';\n $this->output_page_tabs( $current_tab );\n ?>\n\n <form method=\"post\" action=\"<?php echo $action_url; ?>\">\n <input type=\"hidden\" name=\"tab\" value=\"<?php echo $current_tab; ?>\" />\n\n <?php\n\n if( 'general' === $current_tab ){\n ?>\n <h2><?php _e('General Settings', 'multisite-shared-media'); ?></h2>\n <p>\n <?php _e( 'Choose how the plugin is supposed to act upon media uploads and deletion', 'multisite-shared-media' ); ?>\n </p>\n\n <p>\n <?php $this->field_share_media_cb(); ?>\n </p>\n <p>\n <?php $this->field_delete_media_cb(); ?>\n </p>\n <?php\n submit_button( null, 'primary', 'submit', false );\n\n } elseif ( 'relationships' === $current_tab ) {\n ?>\n\n <h2><?php echo __( 'Site Relationships', 'multisite-shared-media' ); ?></h2>\n <p>\n <?php _e( 'Choose which sites should share media between each other (both ways).', 'multisite-shared-media' ); ?>\n <br/>\n <?php _e( 'Only original media items will be shared to the other, which means that Media Item replicated from Site A to Site B won\\'t appear to Site C if you decide to link sites B and C.', 'multisite-shared-media' ); ?>\n <br/>\n <?php _e( 'To get the Media Item from Site A to Site C, they must be linked with each other.', 'multisite-shared-media' ); ?>\n <br/>\n </p>\n <br/>\n\n <?php $this->site_relationship_matrix(); ?>\n <br/>\n <?php\n submit_button( null, 'primary', 'submit', false );\n\n\n } elseif( 'replication' === $current_tab ){\n ?>\n <h2><?php _e( 'Replicate existing media', 'multisite-shared-media' ); ?></h2>\n\n <p>\n <?php _e( 'With this tool you can replicate media from one site to another. Select source site and target site, and click Replicate.', 'multisite-shared-media' ); ?>\n <br/>\n <?php _e( 'Only media which is not replicated yet, will be replicated. Also, only media which is originally uploaded to the source site will be replicated.', 'multisite-shared-media' ); ?>\n </p>\n\n <p>\n <label for=\"msm-select-replication-source\"><?php _e( 'Select Source', 'multisite-shared-media'); ?></label>\n <select name=\"msm-replication-source\" id=\"msm-select-replication-source\">\n <option>----</option>\n <?php\n foreach( (array) $this->network->get_sites() as $site ) {\n echo '<option value=\"' . $site->blog_id . '\">' . $site->blog_id . ': ' . $site->blogname . '</option>';\n }\n ?>\n </select>\n\n <label for=\"msm-select-replication-target\"><?php _e( 'Select Target', 'multisite-shared-media' ); ?></label>\n <select name=\"msm-replication-target\" id=\"msm-select-replication-target\">\n <option>----</option>\n <?php\n foreach ( (array) $this->network->get_sites() as $site ) {\n echo '<option value=\"' . $site->blog_id . '\">' . $site->blog_id . ': ' . $site->blogname . '</option>';\n }\n ?>\n </select>\n </p>\n <button type=\"button\" name=\"replicate-all-existing\" id=\"replicate-all-existing\"\n class=\"button button-primary\" value=\"yes\">\n <?php echo __( 'Start replication process', 'multisite-shared-media' ); ?>\n </button>\n <p><em>\n <?php _e( 'The process can take some time if you have lots of media. You can pause, resume and terminate the process at any time.', 'multisite-shared-media' ); ?>\n <br/>\n <?php _e( 'Next time the process will continue from where it left off.', 'multisite-shared-media' ); ?>\n </em></p>\n <?php\n }\n ?>\n </form>\n </div>\n\t\t<?php\n\n // The localized strings for Javascript use.\n\t\t$this->output_js_strings();\n\t}", "function facebook_like_admin_menu () {\r\n\t$plugin_page = add_options_page(__('Facebook like settings', 'facebook_like_button_by_kms'), __('Facebook like', 'facebook_like_button_by_kms'), 'administrator',\r\n\t\t'facebook-like-share-button', 'facebook_like_admin_page');\r\n\tadd_action( \"admin_print_scripts-$plugin_page\", 'facebook_like_admin_head' );\r\n}", "function rt_anti_spam() {\n if( function_exists( 'is_multisite' ) && is_multisite() ) {\n add_action( 'network_admin_menu', array( &$this, 'admin_menu' ) );\n }\n else {\n add_action( 'admin_init', array( &$this, 'register_settings' ), 10, 2 );\n add_action( 'admin_menu', array( &$this, 'admin_menu' ) );\n }\n add_filter( 'plugin_action_links', array(&$this, 'settings_link' ), 10, 2 );\n\t}", "function bbstarter_plugin_add_settings_link( $links ) {\n $settings_link = '<a href=\"options-general.php?page=bb-starter-plugin\">' . __( 'Settings' ) . '</a>';\n array_push( $links, $settings_link );\n \treturn $links;\n}", "public function addSettingsSubMenuPage() {\r\n $this->addSettingsSubMenuPageToPluginsMenu();\r\n //$this->addSettingsSubMenuPageToSettingsMenu();\r\n }", "function settings_link( $links ) {\n\t\t\t$settings_link = '<a href=\"options-general.php?page='.CB_Analytics_Settings::PLUGIN_NAME.'\">Settings</a>';\n\t\t\tarray_push( $links, $settings_link );\n\t\t\treturn $links;\n\t\t}", "public function settings_menu() {\n\n\t\tadd_submenu_page(\n\t\t\t'edit.php?post_type=wpsm_sermon',\n\t\t\t__( 'Sermon Manager Settings', 'wpsm' ),\n\t\t\t__( 'Settings', 'wpsm' ),\n\t\t\t'manage_wpsm_settings',\n\t\t\t'wpsm-settings',\n\t\t\tarray( $this, 'settings_page' )\n\t\t);\n\t}", "function add_options_menu() {\n if (is_admin()) {\n add_options_page(__('THM Overlay Settings', '--'), __('THM Overlay Settings', '--2'), 'manage_options', 'THM_Overlay_Settings', array($this, 'options_page'));\n }\n }", "function setup_theme_plugin_menus() {\n add_options_page(\n 'Smart App Banners',\n 'Smart App Banners',\n 'manage_options', \n 'Smart-App-Banners',\n 'sab_page_settings'); \n}", "static function share_enabled() {\n\t\t\t$enabled = self::get_option( self::$name . '_ui_share_enabled' );\n\t\t\tif ($enabled == '0') {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn self::get_option( self::$name . '_rpx_share_providers' );\n\t\t}", "function nksc_add_menu_links() {\n\n\tadd_options_page( __( 'NK-Connect', NKSC_TD ), __( 'NK-Connect', NKSC_TD ), 'administrator', 'nksc', 'nksc_menu_settings' );\n}", "public function jetpack_sharing_display() {\n\t\tif ( function_exists( 'sharing_display' ) ) {\n\t\t\tsharing_display( '', true );\n\t\t}\n\t}", "function reme_plugin_settings_link( $links ) { \r\n\t$title = __( 'Settings', 'reach-me' );\r\n\t$settings_link = '<a href=\"admin.php?page=reach-me/reach-me.php\">' . $title . '</a>'; \r\n\tarray_unshift( $links, $settings_link ); \r\n\r\n\treturn $links; \r\n}", "public static function menu() {\n\t\tFrmAppHelper::force_capability( 'frm_change_settings' );\n\n\t\tadd_submenu_page( 'formidable', 'Formidable | ' . __( 'Global Settings', 'formidable' ), __( 'Global Settings', 'formidable' ), 'frm_change_settings', 'formidable-settings', 'FrmSettingsController::route' );\n\t}", "function settings_hook() {\n\treturn is_multisite() ? 'network_admin_menu' : 'admin_menu';\n}", "public function page_init() {\n\t\tregister_setting(\n\t\t\t'msm_option_group', // Option group\n\t\t\t'msm_sharing_settings', // Option name\n\t\t\tarray( $this, 'sanitize' ) // Sanitize\n\t\t);\n\n\t\tadd_settings_section(\n\t\t\t'msm_general_settings_section', // ID\n\t\t\t__( 'Network-wide settings', 'multisite-shared-media' ), // Title\n\t\t\tarray( $this, 'print_section_info' ), // Callback\n\t\t\t'msm-setting-admin' // Page\n\t\t);\n\n\t\tadd_settings_field(\n\t\t\t'msm_do_share_media', // ID\n\t\t\t__( 'Share media across network', 'multisite-shared-media' ), // Title\n\t\t\tarray( $this, 'field_share_media_cb' ), // Callback\n\t\t\t'msm-setting-admin', // Page\n\t\t\t'msm_general_settings_section' // Section\n\t\t);\n\n\t\tadd_settings_field(\n\t\t\t'msm_do_delete_shared_media',\n\t\t\t__( 'Remove media from all sites upon media removal', 'multisite-shared-media' ),\n\t\t\tarray( $this, 'msm_do_delete_shared_media_callback' ),\n\t\t\t'msm-setting-admin',\n\t\t\t'msm_general_settings_section'\n\t\t);\n\t}", "public static function add_settings_page() {\n $page_title = 'Client Access Settings';\n $menu_item_title = 'Client Access';\n $capability = 'manage_options';\n $page_slug = 'client-access';\n $content_callback = array( __CLASS__, 'render_settings_page' );\n\n add_options_page(\n $page_title,\n $menu_item_title,\n $capability,\n $page_slug,\n $content_callback\n );\n }", "function wp_linkmove_menu() {\r\n /** Add a page to the options section of the website **/\r\n if (current_user_can('manage_options')) \t\t\t\t\r\n \t\tadd_options_page(\"链接平移设置\",\"链接平移设置\", 8, __FILE__, 'wp_linkmove_optionpage');\r\n}", "function LB_admin_add() {\n\t add_menu_page( 'Link Bar Settings', 'Link Bar', 1, 'link-bar-settings', 'LB_admin_create', 'dashicons-share-alt2');\n}", "function menu() {\n\tadd_submenu_page(\n\t\t'sugar-calendar',\n\t\tesc_html__( 'Settings', 'sugar-calendar' ),\n\t\tappend_submenu_bubble( esc_html__( 'Settings', 'sugar-calendar' ) ),\n\t\t'manage_options',\n\t\t'sc-settings',\n\t\t'Sugar_Calendar\\\\Admin\\\\Settings\\\\page'\n\t);\n}", "public function addSettingsPage(){\n add_submenu_page(\n 'options-general.php',\n 'Site Version Control',\n 'Site Version Control',\n 'administrator',\n 'svc-index',\n [$this, 'addFrontendPage']\n );\n }", "function geissinger_setup_hpl_admin_menu() {\n\t\t$page = add_submenu_page( 'options-general.php', __( 'Hide Post Locker', 'geissinger-hpl' ), __( 'Hide Post Locker', 'geissinger-hpl' ), 'manage_options', 'hpl-options', 'geissinger_hpl_options', 99 );\n\t}", "function plugin_settings_link($links) {\n\t\t\t$settings_link = '<a href=\"options-general.php?page=' . BLIP_SLIDESHOW_DOMAIN . '\">' . __ ( \"Settings\", BLIP_SLIDESHOW_DOMAIN ) . \"</a>\";\n\t\t\t$links [] = $settings_link;\n\t\t\treturn $links;\n\t\t}", "public function settings_link($links) { \n\t\t$settings_link = \n\t\t\t'<a href=\"admin.php?page=wc-settings&tab=checkout&section=wc_gateway_svea_card\">'.\n\t\t\t\t__( 'Settings', self::PLUGIN_SLUG ).\n\t\t\t'</a>'; \n\t\tarray_unshift( $links, $settings_link ); \n\t\treturn $links;\n\t}", "function all_settings_link() {\n\tadd_options_page(__('All Settings'), __('All Settings'), 'administrator', 'options.php');\n}", "function plugin_settings_link($links)\n\t\t{\n\t\t\t$settings_link = '<a href=\"options-general.php?page=wp_plugin_template\">Settings</a>';\n\t\t\tarray_unshift($links, $settings_link);\n\t\t\treturn $links;\n\t\t}", "function plugin_settings_link($links)\n\t\t{\n\t\t\t$settings_link = '<a href=\"options-general.php?page=wp_plugin_template\">Settings</a>';\n\t\t\tarray_unshift($links, $settings_link);\n\t\t\treturn $links;\n\t\t}", "function csevom_menus() {\n\n add_options_page('Check/Set Domain Visibility', 'Check/Set Domain Visibility', 8, 'csevomoptions', 'csevom_options');\n\n}", "function wpo_plugin_settings_link($links) { \n $settings_link = '<a href=\"admin.php?page=WP-Optimize\">Settings</a>'; \n array_unshift($links, $settings_link); \n return $links; \n}", "public function settings()\n\t{\n\t\tif(!$this->client->can_edit($this->site_id))\n\t\t\tdie('Please login');\n\t\t\t\n\t\t$site = ORM::factory('site', $this->site_id);\n\t\tif(!$site->loaded)\n\t\t\tdie('site not found');\n\t\t\t\n\t\tif($_POST)\n\t\t{\n\t\t\t$homepage = explode(':', $_POST['homepage']);\n\t\t\t\n\t\t\t$site->custom_domain = $_POST['custom_domain'];\n\t\t\t$site->homepage\t\t = $homepage[0];\n\t\t\t$site->save();\n\n\t\t\t# should we publish the entire site?\n\t\t\tif(isset($_POST['publish']) AND 'yes' == $_POST['publish'])\n\t\t\t{\n\t\t\t\t$cache_dir = DATAPATH .\"$this->site_name/cache\";\n\t\t\t\tif(is_dir($cache_dir))\n\t\t\t\t\tJdirectory::remove($cache_dir);\n\t\t\t\t\t\n\t\t\t\tmkdir($cache_dir);\n\t\t\t}\n\n\t\t\t\n\t\t\t# update site_config.yml if new homepage\n\t\t\t# and force page to be enabled.\n\t\t\tif($this->homepage != $homepage[0])\n\t\t\t{\n\t\t\t\tyaml::edit_site_value($this->site_name, 'site_config', 'homepage', $_POST['homepage']);\n\t\t\t\t$page = ORM::factory('page', $homepage[1]);\n\t\t\t\t$page->enable = 'yes';\n\t\t\t\t$page->save();\n\t\t\t}\n\t\t\tdie('Sitewide settings saved.');\n\t\t}\n\t\t\n\t\t$pages = ORM::factory('page')\n\t\t\t->where('fk_site', $this->site_id)\n\t\t\t->orderby('page_name')\n\t\t\t->find_all();\n\t\t\n\t\t$primary = new View('admin/settings');\n\t\t$primary->pages = $pages;\n\t\t$primary->custom_domain = $site->custom_domain;\n\t\t$primary->js_rel_command = 'close-base';\n\t\tdie($primary);\n\t}", "public function referenceSettingsMenu()\n {\n add_options_page(\n esc_html__(\n 'Reference Settings',\n 'reference'\n ),\n esc_html__(\n 'Reference',\n 'reference'\n ),\n 'manage_options',\n 'reference_settings',\n array(\n $this,\n 'referenceSettingsPage'\n )\n );\n return;\n }", "public function settingsPageMenu() {\n\t\t//Add knowledge base settings\n\t\tadd_submenu_page(\n\t\t\t'edit.php',\n\t\t\t'Post Settings',\n\t\t\t'Settings',\n\t\t\t'edit_posts',\n\t\t\t'post-settings',\n\t\t\t[\n\t\t\t\t$this,\n\t\t\t\t'postSettingsPage'\n\t\t\t]\n\t\t);\n\t}", "function dos_create_menu (){\n\n add_options_page(\n 'DigitalOcean Spaces Sync',\n 'DigitalOcean Spaces Sync',\n 'manage_options',\n __FILE__,\n 'dos_settings_page'\n );\n\n}", "function ss_settings_link($links) { \r\n\t$settings_link = '<a href=\"options-general.php?page=section-subnav\">Settings</a>'; \r\n\tarray_unshift($links, $settings_link);\r\n\treturn $links;\r\n}", "function blogworthy_settings_link($links) { \n $settings_link = '<a href=\"options-general.php?page=blogworthy-popular-posts\">Settings</a>'; \n array_unshift($links, $settings_link); \n return $links; \n }", "function admin_menu() {\n\t\tadd_options_page( esc_html__( 'LivePress Settings', 'livepress' ), esc_html__( 'LivePress', 'livepress' ), 'manage_options', 'livepress-settings', array( $this, 'render_settings_page' ) );\n\t}", "function nm_copypaste_plugin_admin_menu() {\n \n osc_add_admin_submenu_divider('plugins', 'Nomore Copy/Paste', 'nm_copypaste_plugin', 'administrator');\n osc_add_admin_submenu_page('plugins', __('Settings', 'nm_copypaste_plugin'), osc_route_admin_url('nm-copypaste-plugin-admin-conf'), 'nm_copypaste_plugin_settings', 'administrator');\n}", "function all_settings_link() {\n add_options_page(__('All Settings'), __('All Settings'), 'administrator', 'options.php');\n}", "function add_cc_settings_link($links, $file) {\r\n static $this_plugin;\r\n if (!$this_plugin) $this_plugin = plugin_basename(__FILE__);\r\n\r\n if ($file == $this_plugin){\r\n $settings_link = '<a href=\"admin.php?page=cc_privacy\">'.__(\"Settings\", \"cc-privacy\").'</a>';\r\n array_unshift($links, $settings_link);\r\n }\r\n return $links;\r\n}", "public function network_settings_page() {\n\t\tadd_submenu_page( 'settings.php', __( 'Upload Scanner Options', 'upload-scanner' ), __( 'Upload Scanner', 'upload-scanner' ), 'administrator', basename(__FILE__), array(&$this,'plugin_options'));\n\t}", "public function admin_menu() {\n\t\tadd_submenu_page( 'edit.php?post_type=' . $this->publications_post_type, 'Publications Library Settings', 'Settings', 'manage_options', 'publications_settings', array( $this, 'publications_settings_page' ) );\n\t}", "function all_settings_link() {\nadd_options_page(__('All Settings'), __('All Settings'), 'administrator', 'options.php');\n}", "function sharing_block() { ?>\n\t\t<h2><?php esc_html_e( 'Sharing Buttons', 'jetpack' ); ?></h2>\n\t\t<form method=\"post\" action=\"\">\n\t\t\t<table class=\"form-table\">\n\t\t\t\t<tbody>\n\t\t\t\t<?php\n\t\t\t\t/** This action is documented in modules/sharedaddy/sharing.php */\n\t\t\t\tdo_action( 'sharing_global_options' );\n\t\t\t\t?>\n\t\t\t\t</tbody>\n\t\t\t</table>\n\n\t\t\t<p class=\"submit\">\n\t\t\t\t<input type=\"submit\" name=\"submit\" class=\"button-primary\" value=\"<?php esc_attr_e( 'Save Changes', 'jetpack' ); ?>\" />\n\t\t\t</p>\n\n\t\t\t<input type=\"hidden\" name=\"_wpnonce\" value=\"<?php echo wp_create_nonce( 'sharing-options' );?>\" />\n\t\t</form> <?php\n\t}", "function settings_link( $links )\n\t{\n\t\t$settings_link = '<a href=\"options-general.php?page=' . POPBOUNCE_OPTION_KEY . '.php\">Settings</a>';\n\t\tarray_unshift( $links, $settings_link );\n\n\t\treturn $links;\n\t}", "function eael_add_settings_link( $links ) {\n $settings_link = sprintf( '<a href=\"admin.php?page=eael-settings\">' . __( 'Settings' ) . '</a>' );\n array_push( $links, $settings_link );\n return $links;\n}", "public function registerSettings(){\n add_filter('plugin_action_links', array($this, 'pluginSettingsLink'), 10, 2);\n }", "function pagebar_addConfigureLink( $links ) { // add Settings link to plugin page\n $settings_link = '<a href=\"options-general.php?page=pagebar_options.php\">'. __('Settings').'</a>';\n array_unshift( $links, $settings_link );\n return $links;\n}", "function hys_settings_page() {\n\t\tglobal $hys;\n\t\tif (!current_user_can('manage_options')) \n\t\t\twp_die( __('You cannot access this page. (mention error hys function error 244).') );\n\t\thys_settings_page_output(); //print form from options.php\n\t}", "public function base_getAppSettingsMenuItems_handler($sender) {\n $menu = &$sender->EventArguments['SideMenu'];\n $menu->addLink('Users', t('Profile Fields'), 'settings/profileextender', 'Garden.Settings.Manage');\n }", "function network_tools_admin_menu() {\n\t\tadd_management_page(\n\t\t\t$this->plugin_manager_base->get_plugin_title(),\n\t\t\t$this->plugin_manager_base->get_plugin_title(),\n\t\t\t'manage_network_options',\n\t\t\t$this->properties->core_slug,\n\t\t\tarray(\n\t\t\t\t$this->template,\n\t\t\t\t'subsite_tools_options_page',\n\t\t\t)\n\t\t);\n\t}", "public static function activation_hook() {\n\t\t\t$defaults = array(\n\t\t\t\t'default-services' => array(\n\t\t\t\t\t'facebook' => 'facebook',\n\t\t\t\t\t'twitter' => 'twitter',\n\t\t\t\t\t'google' => 'google',\n\t\t\t\t),\n\t\t\t\t'share-text' => 'Share On',\n\t\t\t);\n\t\t\tadd_option( static::$slug_ . '_options', $defaults );\n\t\t}", "function ipm_admin_menu_settings() {\r\n\tif (function_exists('add_options_page')) {\r\n\t\tadd_options_page('IPM Settings', 'IPManager Connector Settings', 8, basename(__FILE__) . '_settings', 'ipm_subpanel_settings');\r\n\t}\r\n}", "function settings_link( $links ) {\n\t\treturn array_merge( \n\t\t\tarray( 'settings' => sprintf( \n\t\t\t\t'<a href=\"%1$s\">%2$s</a>',\n\t\t\t\tesc_url( admin_url( 'options-general.php?page=dashboard-access' ) ),\n\t\t\t\tesc_attr( __( 'Settings', 'remove_dashboard_access' ) )\n\t\t\t) ), $links\n\t\t);\n\t}", "public function seon_add_network_settings() {\r\n if (is_super_admin())\r\n add_submenu_page('settings.php', __('SEON API Settings', 'seon'), __('SEON', 'seon'), 'administrator', 'seon-network-settings', array(&$this, 'seon_admin_settings'));\r\n }", "function common_admin_setup_page( $is_network = false ) {\n\tif ( $is_network ) {\n\t\t$site_ids = get_sites( 'fields=ids' );\n\t\t$roles = get_editable_roles();\n\t\tforeach( $site_ids as $site_id ) {\n\t\t\tswitch_to_blog( $site_id );\n\t\t\t$roles = array_merge( $roles, get_editable_roles() );\n\t\t\trestore_current_blog();\n\t\t}\n\t\t$edit_enabled = true;\n\t} else {\n\t\t$roles = get_editable_roles();\n\t\t$edit_enabled = is_multisite() ? boolval( get_site_option( 'googleauthenticator_network_only') ) : true;\n\t}\n\t$is_updated = $this->save_submitted_admin_setup_page( $is_network );\n\t?>\n\t<div class=\"wrap\">\n\t\t<h1><?php esc_html_e( 'Google Authenticator Settings', 'google-authenticator' ); ?></h1>\n\t\t<?php if ( $is_updated ): ?>\n\t\t\t<?php if ( $is_network ): ?>\n\t\t\t\t<div class=\"notice notice-success is-dismissible\"><p><?php esc_html_e( 'Successfullly saved your settings for the network', 'google-authenticator' ); ?></p></div>\n\t\t\t<?php else: ?>\n\t\t\t\t<div class=\"notice notice-success is-dismissible\"><p><?php esc_html_e( 'Successfullly saved your settings for the site', 'google-authenticator' ); ?></p></div>\n\t\t\t<?php endif; ?>\n\t\t<?php endif; ?>\n\t\t<form method=\"post\">\n\t\t\t<?php if ( $is_network ): ?>\n\t\t\t\t<h2><?php esc_html_e( 'Network Settings', 'google-authenticator' ); ?></h2>\n\t\t\t\t<p>\n\t\t\t\t\t<label>\n\t\t\t\t\t\t<input name=\"network_settings_only\" type=\"checkbox\" value=\"true\" <?php checked( get_site_option( 'googleauthenticator_network_only' ) ); ?>>\n\t\t\t\t\t\t<?php esc_html_e( 'Only use network-wide settings, ignoring site settings.', 'google-authenticator' ); ?>\n\t\t\t\t\t</label>\n\t\t\t\t</p>\n\t\t\t<?php endif; ?>\n\t\t\t<?php if ( is_multisite() && $is_network || ! is_multisite() ): ?>\n\t\t\t\t<?php $two_screen_mfa = is_multisite() ? get_site_option( 'googleauthenticator_two_screen_signin' ) : get_option( 'googleauthenticator_two_screen_signin' ); ?>\n\t\t\t <h2><?php esc_html_e( 'Two Screen Signin', 'google-authenticator' ); ?></h2>\n\t\t\t\t<p>\n\t\t\t\t\t<label>\n\t\t\t\t\t\t<input name=\"two_screen_approach\" type=\"checkbox\" value=\"true\" <?php checked( $two_screen_mfa ); ?>>\n\t\t\t\t\t\t<?php esc_html_e( 'Ask for authenticator code on secondary login screen', 'google-authenticator' ); ?>\n\t\t\t\t\t</label>\n\t\t\t\t</p>\n\t\t\t<?php endif; ?>\n\t\t\t<h2><?php esc_html_e( 'Roles requiring Google Authenticator Enabled', 'google-authenticator' ); ?></h2>\n\t\t\t<?php foreach ($roles as $role_key => $role) {\n\t\t\t\t$this->show_role_checkbox( $role_key, $role, $is_network );\n\t\t\t}\n\t\t\tif ( $edit_enabled ) {\n\t\t\t\twp_nonce_field( 'googleauthenticator', 'googleauthenticator' );\n\t\t\t\tsubmit_button();\n\t\t\t} else {\n\t\t\t\tesc_html_e( 'Network-wide settings in effect, only a super admin can modify them.', 'google-authenticator' );\n\t\t\t\tif ( current_user_can( 'manage_network' ) ) :?>\n\t\t\t\t\t<a href=\"<?php echo network_admin_url( 'settings.php?page=google_authenticator' ) ?>\"><?php esc_html_e( 'Change network wide Google Authenticator settings', 'google-authenticator' ); ?></a>\n\t\t\t\t<?php endif;\n\t\t\t}\n\t\t\t?>\n\n\t\t</form>\n\t</div>\n\t<?php\n}", "function EWD_FEUP_plugin_settings_link($links) { \r\n\t$settings_link = '<a href=\"admin.php?page=EWD-FEUP-options\">Settings</a>'; \r\n\tarray_unshift($links, $settings_link); \r\n\treturn $links; \r\n}", "function anywhere_plugin_actions( $links, $file ) {\r\n \tif( $file == 'anywhere/anywhere.php' && function_exists( \"admin_url\" ) ) {\r\n\t\t$settings_link = '<a href=\"' . admin_url( 'options-general.php?page=anywhere.php' ) . '\">' . __('Settings') . '</a>';\r\n\t\tarray_unshift( $links, $settings_link ); // before other links\r\n\t}\r\n\treturn $links;\r\n}", "function facebookpopup_settings_menu() {\n add_submenu_page( \n null \n , 'Facebook Popup settings' \n , 'Facebook Popup settings' \n , 'administrator' \n , 'facebookpopup_settings' \n , 'facebookpopup_display_settings' \n );\n add_action('admin_init', 'facebookpopup_set_up_options');\n \n}", "public function administration_menu() {\n // Settings > DigiShop\n add_options_page(__($this->plugin_name, \"WebWeb_WP_NotesRemover\"), __($this->plugin_name, \"WebWeb_WP_NotesRemover\"),\n 'manage_options', $this->plugin_dir_name . '/menu.settings.php');\n\n // when plugins are show add a settings link near my plugin for a quick access to the settings page.\n add_filter('plugin_action_links', array($this, 'add_plugin_settings_link'), 10, 2);\n }", "function od_mobile_menu_settings_link($links) { \n\t\t $settings_link = '<a href=\"options-general.php?page=od-mobile-menu\">Settings</a>'; \n\t\t array_unshift($links, $settings_link); \n\t\t return $links; \n\t\t}", "public function addToAdminMenu() {\n\t\t\t// Don't bother doing this stuff if the current user lacks permissions\n\t\t\tif ( is_admin() ){\n\t\t\t\tif ( function_exists('add_options_page') ){\n\t\t\t\t\tadd_options_page(__('WP_GMaps2 options page', WP_GMaps_text_domain), __('WP_GMaps2 Configurarion', WP_GMaps_text_domain), 'manage_options', 'WP_GMaps_pluginOptionsPage', array(WP_GMaps, 'pluginOptionsPage'));\n\t\t\t\t}\n\t\t\t\tif ( function_exists('add_submenu_page') ){\n\t\t\t\t\tadd_submenu_page('plugins.php', __('WP_GMaps2 options page', WP_GMaps_text_domain), __('WP_GMaps2 Configurarion', WP_GMaps_text_domain), 'manage_options', 'WP_GMaps_pluginOptionsPage', array(WP_GMaps, 'pluginOptionsPage'));\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function islp_options_menu_link(){\n add_options_page('Social Footer Links', 'social footer links', 'manage_options', 'islp-options', 'islp_options_content');\n \n}", "public function plugin_settings_page()\n {\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\n \t// Render the settings template\n \tinclude(sprintf(\"%s/templates/settings.php\", dirname(__FILE__)));\n }", "function adminPanel() {\t\r\n\t?>\r\n\t\r\n\t\t<?php if( isset($_GET['settings-updated']) ) { ?>\r\n\t\t\t<div id=\"message\" class=\"updated\">\r\n\t\t\t\t<p><strong><?php _e('Settings saved.'); ?></strong></p>\r\n\t\t\t</div>\t\t\t\r\n\t\t<?php } ?>\r\n\t\t<div class=\"wrap\">\r\n\t\t\t<?php screen_icon(); ?>\r\n\t\t\t<h2>Show Hide Author - Settings</h2>\r\n\t\t\t<p>On this page you configure where and if to show the aurhor name/link.</p>\r\n\t\t\t<form method=\"post\" action=\"options.php\" id=\"show_author_form\">\r\n\t\t\t\t<?php settings_fields('admin_panel_group') ?>\r\n\t\t\t\t<?php $options = get_option('show_author_options'); ?>\r\n\t\t\t\t<fieldset>\r\n\t\t\t\t\t<h2>Show author name in:</h2>\r\n\t\t\t\t\t<p> </p>\r\n\t\t\t\t\t<h3>Post Types</h3>\r\n\t\t\t\t\t<?php\r\n\t\t\t\t\t\t$all_post_type_names = get_post_types();\r\n\t\t\t\t\t\tif(isset($all_post_type_names)) : ?>\r\n\t\t\t\t\t\t\t<?php foreach($all_post_type_names as $post_type_name) : ?>\r\n\t\t\t\t\t\t\t\t<div>\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"show_author_<?php echo $post_type_name; ?>\" name=\"show_author_options[option_<?php echo $post_type_name; ?>]\"\r\n\t\t\t\t\t\t\t\t\t\tvalue=\"<?php echo $post_type_name;?>\" <?php if(isset($options['option_' . $post_type_name])) checked($post_type_name, $options['option_' . $post_type_name]); ?>>\r\n\t\t\t\t\t\t\t\t\t<label for=\"show_author_options[option_<?php echo $post_type_name; ?>]\"><?php echo ucfirst($post_type_name) . 's'; ?></label>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<?php endforeach; ?>\r\n\t\t\t\t\t<?php endif; ?>\r\n\t\t\t\t\t<p> </p>\r\n\t\t\t\t\t<h3>Individual Pages</h3>\r\n\t\t\t\t\t<p>Choose to show the author name in individual pages, from inside the editor while you compose a new post.</p>\r\n\t\t\t\t\t<div>\r\n\t\t\t\t\t\t<input type=\"checkbox\" id=\"show_author_individual\" name=\"show_author_options[option_individual]\"\r\n\t\t\t\t\t\t\tvalue=\"individual\" <?php if(isset($options['option_individual'])) checked('individual', $options['option_individual']); ?>>\r\n\t\t\t\t\t\t<label for=\"show_author_options[option_individual]\">Individual Pages **</label>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<p> </p>\r\n\t\t\t\t\t<h3>Custom URLs to Show Author Name</h3>\r\n\t\t\t\t\t<div>\r\n\t\t\t\t\t\t<p><label for=\"show_author_options[option_url_show]\">Enter Custom Urls in seperate lines</label></p>\r\n\t\t\t\t\t\t<textarea id=\"show_author_url_show\" name=\"show_author_options[option_url_show]\" rows=\"10\" cols=\"50\"><?php\r\n\t\t\t\t\t\tif(isset($options['option_url_show']) && $options['option_url_show'] != '') echo $options['option_url_show']; ?></textarea>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<h3>Custom URLs to Hide Author Name</h3>\r\n\t\t\t\t\t<div>\r\n\t\t\t\t\t\t<p><label for=\"show_author_options[option_url_hide]\">Enter Custom Urls in seperate lines</label></p>\r\n\t\t\t\t\t\t<textarea id=\"show_author_url_hide\" name=\"show_author_options[option_url_hide]\" rows=\"10\" cols=\"50\"><?php\r\n\t\t\t\t\t\tif(isset($options['option_url_hide']) && $options['option_url_hide'] != '') echo $options['option_url_hide']; ?></textarea>\r\n\t\t\t\t\t\t<p>\r\n\t\t\t\t\t\t\t<i>\r\n\t\t\t\t\t\t\t\tFor example:<br />\r\n\t\t\t\t\t\t\t\thttp://mydomain.com/<br />\r\n\t\t\t\t\t\t\t\thttp://mydomain.com/category\r\n\t\t\t\t\t\t\t</i>\r\n\t\t\t\t\t\t</p>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<h3>Advanced: Hide the \"by\" word</h3>\r\n\t\t\t\t\t<p>If when removed the author name you're left with a \"by\" word, remove it by adding the class of the its parent element and/or a regex.</p>\r\n\t\t\t\t\t<div>\r\n\t\t\t\t\t\t<p><label for=\"show_author_options[option_by_class]\">The parent classes<br /><i><?php echo 'e.g. entry-meta;author-meta'; ?></i></label></p>\r\n\t\t\t\t\t\t<input type=\"text\" id=\"show_author_by_class\" name=\"show_author_options[option_by_class]\" value=\"<?php\r\n\t\t\t\t\t\tif(isset($options['option_by_class']) && $options['option_by_class'] != '') echo htmlspecialchars ($options['option_by_class']); ?>\">\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div>\r\n\t\t\t\t\t\t<p><label for=\"show_author_options[option_by_regex]\">The regular expressions<br /><i><?php echo htmlspecialchars ('e.g. by <a(.*?)/a>;<span class=\"sep\"> by </span>'); ?></i></label></p>\r\n\t\t\t\t\t\t<input type=\"text\" id=\"show_author_by_regex\" name=\"show_author_options[option_by_regex]\" value=\"<?php\r\n\t\t\t\t\t\tif(isset($options['option_by_regex']) && $options['option_by_regex'] != '') echo htmlspecialchars ($options['option_by_regex']); ?>\">\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<p>\r\n\t\t\t\t\t\t<i>Use multiple values by seperating them with a semicolon (;).<br />\r\n\t\t\t\t\t\tThe Default regex value is: <?php echo htmlspecialchars ('by <a(.*?)/a>'); ?>, which means select the word \"by\", followed by a link \"a\" tag.</i>\r\n\t\t\t\t\t</p>\r\n\t\t\t\t</fieldset>\r\n\t\t\t\t<p><input name=\"Submit\" type=\"submit\" class=\"button button-primary button-large\" value=\"<?php esc_attr_e('Save Changes'); ?>\" /></p>\r\n\t\t\t\t<p> </p>\r\n\t\t\t\t<p><i><u>Notes</u>:<br />\r\n\t\t\t\tIf nothing submitted, author name will be hidden everywhere.<br />\r\n\t\t\t\tIf a post type (from above) doesn't support the display of author name, then even if you check it, it will not show up.<br />\r\n\t\t\t\t</i></p>\r\n\t\t\t</form>\r\n\t\t</div> <!-- End of \"wrap\" -->\r\n\t<?php\r\n}", "public function add_settings_page() {\n\t\tadd_submenu_page( 'edit.php?post_type='. self::$post_type, 'Groupthink Settings', 'Settings', 'manage_options', 'groupthink-settings', array( $this, 'render_settings_page'));\n\t}", "function wpreso_vfb_settings_link($links) {\r\n $settings_link = '<a href=\"' . admin_url( 'options-general.php?page=wpreso_vfb_options' ) . '\">' . __('Settings', 'wpreso-video-featurebox') . '</a>';\r\n array_unshift($links, $settings_link);\r\n return $links;\r\n}", "function sa_plugin_menu_setup(){\n //page name, menu text, permission required,permalink (unique),method that will generate the content\n\tadd_plugins_page(\"SermonAudio Plugin\",\"SermonAudio Plugin\",\"manage_options\",\"SermonAudioPluginOptions\",\"sa_plugin_main_page\");\n}", "function add_settings_link( $links ) {\n return array_merge( $links, array( '<a href=\"' . admin_url( 'options-general.php?page=404pagesettings' ) . '\">' . __( 'Settings' ) . '</a>') );\n }", "function pwaplusphp_settings_link($links) { \r\n $settings_link = '<a href=\"upload.php?page=pwaplusphp\">Settings</a>'; \r\n array_unshift($links, $settings_link); \r\n return $links; \r\n}", "function baw_create_menu() {\n\tadd_menu_page('Theme Plugin Settings', 'Gift Ideas Settings', 'administrator', __FILE__, 'baw_settings_page');\n\n\t//call register settings function\n\tadd_action( 'admin_init', 'register_mysettings' );\n}", "public function action_admin_menu() {\n\t\tadd_options_page( __( 'Pantheon Page Cache', 'pantheon-cache' ), __( 'Pantheon Page Cache', 'pantheon-cache' ), $this->options_capability, self::SLUG, array( self::$instance, 'view_settings_page' ) );\n\t}", "function cf7b_global_settings () {\r\n add_menu_page( 'Contact Form7 Backup Settings','CF7 Backup','manage_options','cf7b-backup-global-options', array($this,'cf7b_backup_global_options_callback') );\r\n }", "function myprefix_instagram_menu() {\n add_options_page('Instagram Feed', 'Instagram Feed', 'manage_options', 'myprefix_instagram_settings', 'myprefix_instagram_settings_output');\n}", "function settingslink($links)\n {\n $settings_link = '<a href=\"options-general.php?page=' . esc_attr( $this->settings_slug ) . '\">' . esc_html__('Settings', 'embed-any-document-plus') . '</a>';\n array_unshift( $links, $settings_link );\n return $links;\n }", "function hime_html_share_page( $longurl, $shorturl, $title = '', $text='', $shortlink_title = '', $share_title = '', $hidden = false ) {\n\n\t$shortlink_title = '<h2>' . yourls__( 'Your short link' ) . '</h2>';\n?>\n<section class=\"main-content\">\n\t<div id=\"shareboxes\" <?php echo $hidden; ?>>\n\t\t<?php yourls_do_action( 'shareboxes_before', $longurl, $shorturl, $title, $text ); ?>\n\n\t\t<div id=\"copybox\" class=\"share\">\n\t\t<?php echo $shortlink_title; ?>\n\t\t\t<p><input id=\"copylink\" class=\"text\" size=\"32\" value=\"<?php echo yourls_esc_url( $shorturl ); ?>\" readonly=\"true\"/></p>\n\t\t\t<?php if( yourls_do_log_redirect() ) { ?>\n\t\t\t<input type=\"hidden\" id=\"titlelink\" value=\"<?php echo yourls_esc_attr( $title ); ?>\" />\n\t\t\t<?php } ?>\n\t\t\t</p>\n\t\t</div>\n\t\t<?php yourls_do_action( 'shareboxes_middle', $longurl, $shorturl, $title, $text ); ?>\n\t</div>\n</section>\n<script>init_clipboard();</script>\n<?php\n}", "public function do_settings(){\n $this->options = get_option( 'radatom_wordpress_security_option' );\n if($this->options){\n //at this point it didnt return false so we know that the settings exist, but we have to check what they actually are.\n if($this->options['show_admin_bar'] == 0){\n RadAtomWordpressSecurity::remove_admin_bar();\n }else if($this->options['show_admin_bar'] == 1){\n RadAtomWordpressSecurity::add_admin_bar();\n }\n\n if($this->options['show_generator_tag'] == 0){\n RadAtomWordpressSecurity::remove_generator_tag();\n }else if($this->options['show_generator_tag'] == 1){\n RadAtomWordpressSecurity::add_generator_tag();\n }\n }\n }", "public function addSettingsPage() {\n\t\t\tadd_options_page(\n\t\t\t\tSGMM_NAME . ' Settings',\n\t\t\t\tSGMM_NAME, 'manage_options',\n\t\t\t\tSkylabapps_GoogleMapMarker_Core::PREFIX . 'settings',\n\t\t\t\tarray( $this, 'markupSettingsPage' )\n\t\t\t);\n\n \t}", "function action_network_admin_menu(){\n add_submenu_page('settings.php', 'Media Uploader', 'Media Uploader', 'manage_options', 'mediaupload_setting', array($this, 'media_uploader_admin'));\n }" ]
[ "0.7365143", "0.71319926", "0.70019364", "0.694386", "0.678391", "0.67802805", "0.6677692", "0.66697794", "0.6653982", "0.66286075", "0.6621273", "0.6545581", "0.65072376", "0.64276063", "0.6360609", "0.63539916", "0.63453776", "0.63430035", "0.6339333", "0.6328098", "0.6318447", "0.6278184", "0.6262144", "0.6237079", "0.62208605", "0.6194851", "0.61930794", "0.6175748", "0.6169409", "0.61624783", "0.61599773", "0.6159583", "0.61509854", "0.6150802", "0.61309963", "0.6124819", "0.612255", "0.6120424", "0.6113922", "0.61046594", "0.6100236", "0.6075726", "0.60721475", "0.60698146", "0.60499775", "0.60458326", "0.60428774", "0.60423243", "0.60423243", "0.6029985", "0.60175836", "0.60138667", "0.600868", "0.6005226", "0.6005054", "0.60009414", "0.5996297", "0.59962326", "0.599439", "0.5984232", "0.59809345", "0.5978599", "0.5976417", "0.59725815", "0.59690225", "0.5966145", "0.59657174", "0.59624416", "0.5960953", "0.5958194", "0.5954065", "0.59516096", "0.5950709", "0.5950039", "0.59389454", "0.59386903", "0.59373456", "0.5935509", "0.5933054", "0.5929407", "0.59292746", "0.5926943", "0.5921797", "0.5919284", "0.5918952", "0.59158516", "0.59146523", "0.5913394", "0.59132564", "0.5910918", "0.5906969", "0.5906116", "0.5904294", "0.59016573", "0.59011656", "0.5900314", "0.58960956", "0.5894918", "0.5887122", "0.5886345" ]
0.814753
0
Provides a sharing page with the sharing_global_options hook so we can display the setting. Only ran if sharedaddy and publicize are not already active.
Предоставляет страницу с дележем, используя хук sharing_global_options, чтобы мы могли отобразить настройки. Запускается только в том случае, если sharedaddy и publicize не активированы.
function sharing_page() { $this->updated_message(); ?> <div class="wrap"> <div class="icon32" id="icon-options-general"><br /></div> <h1><?php esc_html_e( 'Sharing Settings', 'jetpack' ); ?></h1> <?php /** This action is documented in modules/sharedaddy/sharing.php */ do_action( 'pre_admin_screen_sharing' ); ?> <?php $this->sharing_block(); ?> </div> <?php }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function social_share_page()\n{\n ?>\n <div class=\"wrap\">\n <h1>Social Sharing Options</h1>\n \n <form method=\"post\" action=\"options.php\">\n <?php\n settings_fields(\"social_share_config_section\");\n \n do_settings_sections(\"social-share\");\n \n submit_button(); \n ?>\n </form>\n </div>\n <?php\n}", "function sharing_menu() {\n\t\tadd_submenu_page( 'options-general.php', esc_html__( 'Sharing Settings', 'jetpack' ), esc_html__( 'Sharing', 'jetpack' ), 'manage_options', 'sharing', array( $this, 'sharing_page' ) );\n\t}", "public function jetpack_sharing_display() {\n\t\tif ( function_exists( 'sharing_display' ) ) {\n\t\t\tsharing_display( '', true );\n\t\t}\n\t}", "function social_share_settings()\n{\n add_settings_section(\"social_share_config_section\", \"\", null, \"social-share\");\n \n add_settings_field(\"social-share-facebook\", \"Do you want to display Facebook share button?\", \"social_share_facebook_checkbox\", \"social-share\", \"social_share_config_section\");\n add_settings_field(\"social-share-twitter\", \"Do you want to display Twitter share button?\", \"social_share_twitter_checkbox\", \"social-share\", \"social_share_config_section\");\n add_settings_field(\"social-share-linkedin\", \"Do you want to display LinkedIn share button?\", \"social_share_linkedin_checkbox\", \"social-share\", \"social_share_config_section\");\n add_settings_field(\"social-share-reddit\", \"Do you want to display Reddit share button?\", \"social_share_reddit_checkbox\", \"social-share\", \"social_share_config_section\");\n \n register_setting(\"social_share_config_section\", \"social-share-facebook\");\n register_setting(\"social_share_config_section\", \"social-share-twitter\");\n register_setting(\"social_share_config_section\", \"social-share-linkedin\");\n register_setting(\"social_share_config_section\", \"social-share-reddit\");\n}", "function vantage_premium_show_social_share(){\n\tif( siteorigin_setting('social_share_post') && is_single() ) {\n\t\tsiteorigin_share_render( array(\n\t\t\t'twitter' => siteorigin_setting('social_twitter'),\n\t\t) );\n\t}\n}", "function sharing_show( $show, $post ) {\n $post_option = get_post_meta( $post->ID, 'sharing_disabled', false );\n $restrict_to = get_option( 'sharedaddy-mc-restrict-to' );\n \n // Check if per post option is not in conflict\n if( !empty( $restrict_to ) && empty( $post_option ) )\n if( is_object( $post ) && !in_array( $post->post_type, $restrict_to ) )\n $show = false;\n else\n $show = true;\n \n return $show;\n }", "function hime_html_share_page( $longurl, $shorturl, $title = '', $text='', $shortlink_title = '', $share_title = '', $hidden = false ) {\n\n\t$shortlink_title = '<h2>' . yourls__( 'Your short link' ) . '</h2>';\n?>\n<section class=\"main-content\">\n\t<div id=\"shareboxes\" <?php echo $hidden; ?>>\n\t\t<?php yourls_do_action( 'shareboxes_before', $longurl, $shorturl, $title, $text ); ?>\n\n\t\t<div id=\"copybox\" class=\"share\">\n\t\t<?php echo $shortlink_title; ?>\n\t\t\t<p><input id=\"copylink\" class=\"text\" size=\"32\" value=\"<?php echo yourls_esc_url( $shorturl ); ?>\" readonly=\"true\"/></p>\n\t\t\t<?php if( yourls_do_log_redirect() ) { ?>\n\t\t\t<input type=\"hidden\" id=\"titlelink\" value=\"<?php echo yourls_esc_attr( $title ); ?>\" />\n\t\t\t<?php } ?>\n\t\t\t</p>\n\t\t</div>\n\t\t<?php yourls_do_action( 'shareboxes_middle', $longurl, $shorturl, $title, $text ); ?>\n\t</div>\n</section>\n<script>init_clipboard();</script>\n<?php\n}", "function wcb_print_sharing() {\n\trewind_posts();\n\tif ( have_posts() ) {\n\t\tthe_post();\n\t\tif ( function_exists( 'sharing_display' ) )\n\t\t\techo sharing_display();\n\t}\n}", "function admin_settings_showbuttonon_callback() {\n\t\t$options = get_option( 'sharing-options' );\n\t\tif ( !is_array( $options ) )\n\t\t\t$options = array();\n\n\t\t$shows = array_values( get_post_types( array( 'public' => true ) ) );\n\t\t$shows[] = 'index';\n\t\t$data = $_POST;\n\n\t\tif ( isset( $data['show'] ) ) {\n\t\t\tif ( is_scalar( $data['show'] ) ) {\n\t\t\t\tswitch ( $data['show'] ) {\n\t\t\t\t\tcase 'posts' :\n\t\t\t\t\t\t$data['show'] = array( 'post', 'page' );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'index' :\n\t\t\t\t\t\t$data['show'] = array( 'index' );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'posts-index' :\n\t\t\t\t\t\t$data['show'] = array( 'post', 'page', 'index' );\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( $data['show'] = array_intersect( $data['show'], $shows ) ) {\n\t\t\t\t$options['global']['show'] = $data['show'];\n\t\t\t}\n\t\t} else {\n\t\t\t$options['global']['show'] = array();\n\t\t}\n\n\t\tupdate_option( 'sharing-options', $options );\n\t}", "function sharei_wp_options_page()\n { ?>\n <div>\n <?php screen_icon(); ?>\n <h2>تنظیمات افزونه Share it Wordpress</h2>\n <form method=\"post\" action=\"options.php\">\n <?php settings_fields( 'sharei_wp_options_group' ); ?>\n <p>شما در اینجا میتونید تنظیمات توکن تلگرام و فلان و این چیزا را انجام دهید</p>\n <table>\n <tr valign=\"top\">\n <th scope=\"row\"><label for=\"sharei_wp_option_token\">توکن</label></th>\n <td><input type=\"text\" id=\"sharei_wp_option_token\" name=\"sharei_wp_option_token\" value=\"<?php echo get_option('sharei_wp_option_token'); ?>\" /></td>\n </tr>\n <tr valign=\"top\">\n <th scope=\"row\"><label for=\"sharei_wp_option_username\">یوزرنیم</label></th>\n <td><input type=\"text\" id=\"sharei_wp_option_username\" name=\"sharei_wp_option_username\" value=\"<?php echo get_option('sharei_wp_option_username'); ?>\" /></td>\n </tr>\n </table>\n <?php submit_button(); ?>\n </form>\n </div>\n <?php }", "function responsive_share_tools( $text = '', $echo = true ) {\n\tif ( function_exists( 'sharing_display' ) ) {\n\t\treturn sharing_display( $text, $echo );\n\t}\n}", "function action()\n {\n common_local_url('sharingsdirectory');\n }", "function jb_social_previews_settings_page()\n {\n if (!current_user_can('manage_options')) {\n wp_die(esc_html__('You do not have sufficient permissions to access this page.', 'jb_social_previews'));\n }\n\n // Enqueue jQuery.\n wp_enqueue_script('jquery');\n\n // This will enqueue the Media Uploader script.\n wp_enqueue_media();\n\n $plugin_url = plugin_dir_url(__FILE__);\n wp_enqueue_style('jb-social-previews', $plugin_url . 'style.css');\n\n // Get current settings\n $twitter_on = get_option('jb_social_previews_twitter_on', '');\n $twitter_use_large_image = get_option('jb_social_previews_twitter_use_large', '');\n $twitter_username = get_option('jb_social_previews_twitter_username', '');\n $facebook_on = get_option('jb_social_previews_facebook_on', '');\n $title_site_name = get_option('jb_social_previews_title_site_name', '');\n $img_url = get_option('jb_social_previews_image_url', '');\n ?>\n <div class=\"jb-social-previews-settings-container\"> <!-- container -->\n <div class=\"jb-social-previews-content-container\"> <!-- content -->\n\n <h1>\n <?php esc_html_e('Simple Social Previews', 'jb_social_previews'); ?>\n </h1>\n\n <p>\n The Simple Social Previews adds the appropriate meta data fields to your site header to enable\n Facebook previews when sharing a link on Facebook. It also enables Twitter cards on any tweets\n that include a link to your website. You can read more about Twitter cards\n <a href=\"https://dev.twitter.com/cards/overview\" target=\"_blank\">here</a>.\n </p>\n\n <p>\n As a bonus, you can override the default settings and turn Twitter cards on/off, select Twitter card\n size, turn Facebook preview on/off, add/remove site title, and create custom titles.\n </p>\n\n <div class=\"jb-social-previews-info-alert\">\n <strong>Please Note</strong><br/>\n A new field has been added on the user profile page. It is labeled \"Twitter Username (for Twitter\n Cards).\" When a page or post is loaded, the plugin will look to see if the Twitter username is\n filled in for the author of that page. If so, that user's username will be listed as the 'creator'\n of the post. If a Twitter username is not provided for that user, the default site username is used.\n </div>\n\n <hr/>\n\n <form name=\"jb_social_previews_form\" method=\"post\" action=\"options.php\">\n <?php settings_fields('jb_social_previews_settings'); ?>\n\n <h3><?php esc_html_e('Turn on Twitter Cards', 'jb_social_previews'); ?></h3>\n <div>\n <label>\n <input type=\"checkbox\" name=\"jb_social_previews_twitter_on\"\n value=\"on\" <?php checked($twitter_on, 'on'); ?>>\n <?php esc_html_e(' Use Twitter cards on your site?', 'jb_social_previews'); ?>\n </label>\n </div>\n <div>\n <label>\n <input type=\"checkbox\" name=\"jb_social_previews_twitter_use_large\"\n value=\"on\" <?php checked($twitter_use_large_image, 'on'); ?>>\n <?php esc_html_e(' Use large cards? By default, small cards are used.', 'jb_social_previews'); ?>\n </label>\n </div>\n <hr/>\n\n <h3><?php esc_html_e('Site Twitter username', 'jb_social_previews'); ?></h3>\n <p>\n @ <input type=\"text\" name=\"jb_social_previews_twitter_username\"\n value=\"<?php echo esc_attr($twitter_username); ?>\" size=\"20\">\n <br/><small><?php esc_html_e(' Do not include the @ sign', 'jb_social_previews'); ?></small>\n </p>\n <hr/>\n\n <h3><?php esc_html_e('Turn on Facebook Previews', 'jb_social_previews'); ?></h3>\n <p>\n <label>\n <input type=\"checkbox\" name=\"jb_social_previews_facebook_on\"\n value=\"on\" <?php checked($facebook_on, 'on'); ?>>\n <?php esc_html_e(' Use Facebook previews on your site?', 'jb_social_previews'); ?>\n </label>\n </p>\n <hr/>\n\n <h3><?php esc_html_e('Default options', 'jb_social_previews'); ?></h3>\n <p>\n <label>\n <input type=\"checkbox\" name=\"jb_social_previews_title_site_name\"\n value=\"on\" <?php checked($title_site_name, 'on'); ?>>\n <?php esc_html_e(' Use site title in shared link title? eg: ', 'jb_social_previews'); ?>\n <i><?php esc_html_e('Post Title - ', 'jb_social_previews'); ?><?php echo get_bloginfo('title') ?></i>\n </label>\n </p>\n\n <div class=\"image-preview\">\n <div class=\"image\" id=\"share_image_preview\">\n <?php if (!filter_var($img_url, FILTER_VALIDATE_URL) === false) : ?>\n <img src=\"<?php echo esc_url($img_url); ?>\" style=\"width: 100%;\"/>\n <?php endif; ?>\n </div>\n <div>\n <label for=\"image_url\">Default Share Image</label><br/>\n <input type=\"text\" name=\"jb_social_previews_image_url\" id=\"image_url\" class=\"regular-text\"\n value=\"<?php echo esc_url($img_url); ?>\" size=\"20\">\n <?php submit_button(__('Upload Image', 'jb_social_previews'), 'secondary', 'upload-btn', false); ?>\n <br/>\n <small>\n This is the image that will be used if your homepage is shared or if a post/page is\n shared\n that does not have a featured image.\n </small>\n </div>\n </div>\n\n <script type=\"text/javascript\">\n jQuery(document).ready(function ($) {\n $('#upload-btn').click(function (e) {\n e.preventDefault();\n var image = wp.media({\n title: 'Upload Image',\n // mutiple: true if you want to upload multiple files at once\n multiple: false\n }).open()\n .on('select', function (e) {\n // This will return the selected image from the Media Uploader, the result is an object\n var uploaded_image = image.state().get('selection').first();\n // We convert uploaded_image to a JSON object to make accessing it easier\n // Output to the console uploaded_image\n console.log(uploaded_image);\n var image_url = uploaded_image.toJSON().url;\n // Let's assign the url value to the input field\n $('#image_url').val(image_url);\n $('#share_image_preview').html('<img src=\"' + image_url + '\" style=\"width: 100%;\" />');\n });\n });\n });\n </script>\n <?php submit_button(__('Update Options', 'jb_social_previews')); ?>\n </form>\n\n </div><!-- end content -->\n </div> <!-- end container -->\n <?php\n }", "static function share_enabled() {\n\t\t\t$enabled = self::get_option( self::$name . '_ui_share_enabled' );\n\t\t\tif ($enabled == '0') {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn self::get_option( self::$name . '_rpx_share_providers' );\n\t\t}", "function athen_social_share() {\n\tget_template_part( 'partials/social-share' );\n}", "function wp_idea_stream_sharing_services(){\n\t$ideastream_sharing_options = get_option('_ideastream_sharing_options');\n\tif($ideastream_sharing_options==\"0\") return false;\n\t$ideastream_twitter_account = get_option('_ideastream_twitter_account');\n\t?>\n\t<ul class=\"ideastream_share\">\n\t\t<li class=\"ideastream_share_text\"><?php _e('Share this idea!', 'wp-idea-stream');?></li>\n\t\t<li class=\"ideastream_share_email\">\n\t\t\t<a href=\"mailto:?&subject=<?php echo rawurlencode(get_the_title());?>&body=<?php echo get_permalink();?>\" title=\"<?php _e('Share by email','wp-idea-stream');?>\"><img src=\"<?php echo WP_IDEA_STREAM_PLUGIN_URL;?>/images/share_mail.png\" border=\"0\" alt=\"<?php _e('Share by email','wp-idea-stream');?>\"></a>\n\t\t</li>\n\t\t<?php if($ideastream_twitter_account && $ideastream_twitter_account!=\"\"):?>\n\t\t<li class=\"ideastream_share_twitter\">\n\t\t\t<a href=\"http://twitter.com/share\" class=\"twitter-share-button\" data-count=\"horizontal\" data-via=\"<?php echo $ideastream_twitter_account;?>\" data-url=\"<?php the_permalink();?>\" data-text=\"<?php the_title();?>\" data-lang=\"en\">Tweet</a>\n\t\t\t<script type=\"text/javascript\" src=\"http://platform.twitter.com/widgets.js\"></script>\n\t\t</li>\n\t\t<?php endif;?>\n\t\t<?php do_action('wp_idea_stream_add_sharing_services');?>\n\t</ul>\n\t<?php\n}", "function cellular_social_media_share() {\n if (theme_get_setting('social_media_share') === 1) {\n global $base_url;\n $set = cellular_sm_settings('share');\n $output = '';\n $page = array(\n 'url' => $base_url . '/' . current_path(),\n 'title' => drupal_get_title(),\n );\n $block_title = theme_get_setting('sm_share_title');\n $media_block = array(\n 'title' => !empty($block_title) ? \"<h3>$block_title</h3>\\n\" : '',\n 'id' => 'social-media-share',\n 'link_class' => 'social icon',\n 'link_text' => 'Share this page on ',\n );\n\n $links = array();\n $set['google'] === 1 ? $links['google+'] = array(\n 'name' => 'Google+',\n 'script' => NULL,\n 'url' => 'http://plus.google.com/share?url=' . $page['url'],\n 'class' => 'google',\n ) : NULL;\n $set['twitter'] === 1 ? $links['twitter'] = array(\n 'name' => 'Twitter',\n 'script' => NULL,\n 'url' => 'https://twitter.com/share',\n 'class' => 'twitter-bird',\n ) : NULL;\n $set['linkedin'] === 1 ? $links['linkedin'] = array(\n 'name' => 'LinkedIn',\n 'url' => 'http://www.linkedin.com/shareArticle?mini=true&url=' .\n $page['url'] . '&title=' . $page['title'] . '&source=' . $base_url,\n 'class' => 'linkedin',\n ) : NULL;\n $set['pinterest'] === 1 ? $links['pinterest'] = array(\n 'name' => 'Pinterest',\n 'url' => 'http://pinterest.com/pin/create/bookmarklet/?media=&url=' .\n $page['url'] . '&is_video=false&description=' . $page['title'],\n 'class' => 'pinterest',\n ) : NULL;\n $set['reddit'] === 1 ? $links['reddit'] = array(\n 'name' => 'Reddit',\n 'url' => 'http://www.reddit.com/submit?url=' . $page['url'],\n 'class' => 'reddit',\n ) : NULL;\n\n if ($set['fb'] === 1) {\n // Set variables to appease PAReview.\n $fbscript = '(function(d, s, id) {\n var js, fjs = d.getElementsByTagName(s)[0];\n if (d.getElementById(id)) return;\n js = d.createElement(s); js.id = id;\n js.src = \"//connect.facebook.net/en_US/all.js#xfbml=1\";\n fjs.parentNode.insertBefore(js, fjs);\n }(document, \\'script\\', \\'facebook-jssdk\\'));';\n $fbtag = '<div class=\"fb-like\" data-href=\"' . $page['url'] . '\"\n data-layout=\"button\" data-action=\"like\" data-show-faces=\"false\"\n data-share=\"true\"></div><div id=\"fb-root\"></div>';\n\n $links['facebook'] = array(\n // Facebook javascript.\n 'script' => $fbscript,\n // Set fb markup.\n 'tag' => $fbtag,\n // Push script to end of body.\n 'weight' => 1000,\n );\n }\n\n $content = cellular_build_links($links, $media_block);\n\n if (!empty($content)) {\n $output .= \"\\n<div id=\\\"\" . $media_block['id'] . \"\\\">\\n\";\n $output .= $media_block['title'] . $content . \"\\n</div>\\n\";\n }\n\n return $output;\n }\n}", "public function single_fixed_share_html() {\n\t\t\tif($this->get_option($this->prefix.'_show_fixed_share', 'on') != 'off') {\n\t\t\t\tget_template_part('templates/entry-meta/mini','share-fixed');\n\t\t\t}\n\t\t}", "public function wp_swift_google_analytics_settings_page() {\n\t\t$options = get_option( 'wp_swift_google_analytics' );\n\t\tif ($options): ?>\n\t\t\t<div id=\"ch2pho-general\" class=\"wrap\">\n\t\t\t\t<?php if (isset( $_GET['message'] )&& $_GET['message'] == '1'): ?>\n\t\t\t\t\t<div id='message' class='updated fade'><p><strong>Settings Saved</strong></p></div>\n\t\t\t\t<?php endif ?>\n\n\t\t\t\t<h2>My Google Analytics</h2>\n\n\t\t\t\t<img src=\"<?php echo plugins_url( '/logo.png', __FILE__ ) ?>\" alt=\"\">\n\n\t\t\t\t<p>Google Analytics is a free Web analytics service that provides statistics and basic analytical tools for search engine optimization (SEO) and marketing purposes.</p>\n\t\t\t\t<hr>\n\t\t\t\t<form method=\"post\" action=\"admin-post.php\">\n\t\t\t\t\t<input type=\"hidden\" name=\"action\" value=\"save_ch2pho_options\" />\n\t\t\t\t\t<!-- Adding security through hidden referrer field -->\n\t\t\t\t\t<?php wp_nonce_field( 'wp_swift_google_analytics_nonce' ); ?>\n\t\t\t\t\t<table class=\"form-table\">\n\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th scope=\"row\"><label for=\"ga_account_name\">Account Name:</label></th>\n\t\t\t\t\t\t\t\t<td><input type=\"text\" name=\"ga_account_name\" value=\"<?php echo esc_html( $options['ga_account_name'] ); ?>\"/>\n\t\t\t\t\t\t\t\t<p class=\"description\" id=\"tagline-description\">Tracking Code</p></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th scope=\"row\"><label for=\"track_outgoing_links\">Track Outgoing Links</label></th>\n\t\t\t\t\t\t\t\t<td><input type=\"checkbox\" name=\"track_outgoing_links\" <?php \n\t\t\t\t\t\t\t\tif ($options['track_outgoing_links'] ) {\n\t\t\t\t\t\t\t\t\techo ' checked=\"checked\" ';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t?>/></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</tbody>\n\t\t\t\t\t</table>\t\n\t\t\t\t\t<input type=\"submit\" value=\"Save Changes\" class=\"button button-primary\"/>\n\t\t\t\t</form>\n\t\t\t</div>\t\n\t\t<?php \n\t\tendif;\n\t}", "function security_example_nonces_display_settings_page() {\n\n\t// check if user is allowed access\n\tif ( ! current_user_can( 'manage_options' ) ) return;\n\n\t?>\n\n\t<div class=\"wrap\">\n\n\t\t<h1><?php echo esc_html( get_admin_page_title() ); ?></h1>\n\n\t\t<?php myplugin_form_favorite_music(); ?>\n\t\t<?php myplugin_process_favorite_music(); ?>\n\n\t</div>\n\n<?php\n\n}", "function share_mkdev_page_shortcode($atts = []){\n\trequire(\"mkdev-globals.php\");\n\n\t// normalize attribute keys, lowercase\n $atts = array_change_key_case((array)$atts, CASE_LOWER);\n\n\t//get setting of buttons\n\t$all_settings = get_option(MKDEV_OPTIONS);\n\n\t$share_id = isset($atts['id']) ? $atts['id'] : false;\n\n\t$share_btn_url = isset($atts['url']) ? $atts['url'] : $all_settings['share_btn_page_link'];\n\n\tif ($share_btn_url && strpos($share_btn_url, 'http') === false) {\n\t\t$share_btn_url = \"http://\" . $share_btn_url;\n\t}\n\n\t//wp_enqueue_style( 'fb-bootstrap-css',MKDEV_PLUGIN_PATH.'css/fb-buttons-bootstrap.css' );\n\twp_enqueue_style( 'in-bootstrap-css',MKDEV_PLUGIN_PATH.'css/in-buttons.css' );\n\n\tif ( $share_btn_url ) {\n\n\t\t$content = \"<div class='row'><div \" . ($share_id ? \"id='ef-share-wrapper-$share_id'\" : \"\") . \" class='col-md-12 mkdev-share-wrapper' style='text-align:center'>\";\n\n\t\t//fb share button\n\t\tif(isset($share_btn_url)) {\n\t\t\t$share_fb_btn_layout = isset($atts['fb_layout']) && in_array($atts['fb_layout'], $fb_layouts) ? $atts['fb_layout'] : $all_settings['share_fb_btn_layout'];\n\t\t\t$share_fb_btn_mobile_frame = $all_settings['share_fb_btn_mobile_frame'] ? $all_settings['share_fb_btn_mobile_frame'] : true;\n\t\t\t$share_fb_link_text\t\t = $all_settings['share_fb_link_text'] ? $all_settings['share_fb_link_text'] : \"Facebook Share\";\n\t\t\t$share_in_btn_layout = isset($atts['in_layout']) && in_array($atts['in_layout'], $in_layouts) ? $atts['in_layout'] : $all_settings['share_in_btn_layout'];\n\t\t\t$share_in_link_text\t\t = $all_settings['share_in_link_text'] ? $all_settings['share_in_link_text'] : \"LinkedIn Share\";\n\n\t\t\t$share_color \t = isset($atts['color']) && $atts['color'] ? $atts['color'] : ($all_settings['share_color'] ? $all_settings['share_color'] : \"#000000\");\n\n\t\t\tif ($share_fb_btn_layout === \"icon\" || $share_in_btn_layout === \"icon\" || $share_fb_btn_layout === \"link\" || $share_in_btn_layout === \"link\") {\n\t\t\t\t$content .= \"<style>.fusion-social-network-icon::before, .fusion-social-network-icon, .mkdev-share-link:before { color: $share_color; } .mkdev-share-link:link, .mkdev-share-link:visited, .mkdev-share-link:hover, .mkdev-share-link:active { color: $share_color; } </style>\";\n\t\t\t}\n\n\t\t\t$content .= '<div ' . ($share_id ? \"id='ef-fb-share-wrapper-$share_id'\" : \"\") . 'class=\"mkdev-fb-share-wrapper\" style=\"display: inline-block; margin-right: 25px\">';\n\n\t\t\t/* Link only */\n\t\t\tif ($share_fb_btn_layout == 'link') {\n\t\t\t \t$content .= '<a '. ($share_id ? \"id='ef-fb-share-link-$share_id'\" : \"\") . ' class=\"mkdev-share-link mkdev-fb-share-link\" href=\"https://www.facebook.com/sharer/sharer.php?kid_directed_site=0&u=' . $share_btn_url . '&display=popup&ref=plugin&src=share_button\" rel=\"noopener noreferrer\" onclick=\"javascript:window.open(this.href, \\'\\', \\'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=800,width=500,left=0,top=0\\');return false;\">' . $share_fb_link_text . '</a>';\n\t\t\t} else if ($share_fb_btn_layout == 'icon') {\n\t\t\t\t$content .= '<a '. ($share_id ? \"id='ef-fb-share-icon-$share_id'\" : \"\") . ' class=\"fusion-social-network-icon fusion-facebook fusion-icon-facebook\" href=\"https://www.facebook.com/sharer.php?u=' . $share_btn_url . '\" target=\"_blank\" onclick=\"javascript:window.open(this.href, \\'\\', \\'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=800,width=500,left=0,top=0\\');return false;\"><span class=\"screen-reader-text\">Facebook</span></a>';\n\t\t\t} else {\n\t\t\t\t/* Build button */\n\t\t \t\t$content .= '<div ' . ($share_id ? \"id='ef-fb-share-button-$share_id'\" : \"\") . ' class=\"fb-share-button\" data-href=\"' . $share_btn_url . '\" data-size=\"' . 'small' . '\" data-layout=\"' . $share_fb_btn_layout . '\" data-mobile-iframe=\"' . $share_fb_btn_mobile_frame . '\"><a target=\"_blank\" href=\"https://www.facebook.com/sharer/sharer.php?u=$share_btn_url\" class=\"fb-xfbml-parse-ignore\">Share</a></div>';\n\t\t\t}\n\n\t\t\t$content .= \"</div>\";\n\n\t\t\t$content .= '<div ' . ($share_id ? \"id='ef-in-share-wrapper-$share_id'\" : \"\") . ' class=\"mkdev-in-share-wrapper\" style=\"display: inline-block; margin-left: 25px\">';\n\n\t\t\t/* Link only */\n\t\t\tif ($share_in_btn_layout == 'link') {\n\t\t\t\t$content .= \"<a \" . ($share_id ? \"id='ef-in-share-link-$share_id'\" : \"\") . \" class='mkdev-share-link mkdev-in-share-link' href='https://www.linkedin.com/shareArticle?mini=true&amp;url=$share_btn_url' rel='noopener noreferrer' onclick=\\\"javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=500,left=0,top=0'); return false;\\\">$share_in_link_text</a>\";\n\t\t\t} else if ($share_in_btn_layout == 'icon') {\n\t\t\t\t$content .= \"<a \" . ($share_id ? \"id='ef-in-share-icon-$share_id'\" : \"\") . \" class='fusion-social-network-icon fusion-tooltip fusion-linkedin fusion-icon-linkedin fusion-last-social-icon' href='https://www.linkedin.com/shareArticle?mini=true&amp;url=$share_btn_url' target='_blank' rel='noopener noreferrer' onclick=\\\"javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=500,left=0,top=0'); return false;\\\"><span class='screen-reader-text'>Linkedin</span></a>\";\n\t\t\t} else {\n\t\t\t\t$content .= '<span ' . ($share_id ? \"id='ef-in-share-button-$share_id'\" : \"\") . ' class=\"IN-widget\" style=\"display: inline-block; line-height: 1; vertical-align: bottom; padding: 0px; margin: 0px; text-indent: 0px; text-align: center;\"><span style=\"padding: 0px !important; margin: 0px !important; text-indent: 0px !important; display: inline-block !important; vertical-align: bottom !important; font-size: 1px !important;\"><button class=\"IN-2bc0215c-7188-4274-b598-1969e06d4d7c-1G9ISYhSF8XoOmdcl0yKDu\" onclick=\\'window.open(\"https://www.linkedin.com/shareArticle?mini=true&url=' . $share_btn_url . '\", \"mywin\",\n\"left=20,top=20,width=500,height=600,toolbar=1,resizable=0,left=0,top=0\"); return false;\\'><xdoor-icon aria-hidden=\"true\"><svg viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\" x=\"0\" y=\"0\" preserveAspectRatio=\"xMinYMin meet\">\n\t\t\t <g style=\"fill: currentColor\">\n\t\t\t <rect x=\"-0.003\" style=\"fill:none;\" width=\"24\" height=\"24\"></rect>\n\t\t\t <path style=\"\" d=\"M20,2h-16c-1.1,0-2,0.9-2,2v16c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V4C22,2.9,21.1,2,20,2zM8,19h-3v-9h3V19zM6.5,8.8C5.5,8.8,4.7,8,4.7,7s0.8-1.8,1.8-1.8S8.3,6,8.3,7S7.5,8.8,6.5,8.8zM19,19h-3v-4c0-1.4-0.6-2-1.5-2c-1.1,0-1.5,0.8-1.5,2.2V19h-3v-9h2.9v1.1c0.5-0.7,1.4-1.3,2.6-1.3c2.3,0,3.5,1.1,3.5,3.7V19z\"></path>\n\t\t\t </g>\n\t\t\t </svg></xdoor-icon>Share</button></span></span>';\n\t\t\t}\n\n\t\t\t$content .= \"</div>\";\n\t\t}\n\n\t\t$content .= \"</div></div>\";\n\t}\n\treturn $content;\n}", "function soc_share_show( $att ){\n\tglobal $post;\n\t\n\treturn render_soc_share_html( @$att['networks'], @$att['size'], 'default', $post->ID );\n}", "public function page_settings() {\n add_option('datadwell_domain', '', null, true);\n\t\tadd_option('datadwell_apikey', '', null, true);\n\t\tinclude $this->dir . '/views/settings.php';\n\t\tinclude $this->dir . '/views/demo.php';\n\t}", "public function p11_social_admin_menu() {\n add_options_page(\n 'P11 Social',\n 'P11 Social',\n 'manage_options',\n 'p11-social-settings',\n array( $this, 'p11_social_settings_page' )\n );\n}", "public function plugin_settings_page()\n {\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\n \t// Render the settings template\n \tinclude(sprintf(\"%s/templates/settings.php\", dirname(__FILE__)));\n }", "function hys_settings_page() {\n\t\tglobal $hys;\n\t\tif (!current_user_can('manage_options')) \n\t\t\twp_die( __('You cannot access this page. (mention error hys function error 244).') );\n\t\thys_settings_page_output(); //print form from options.php\n\t}", "function adforest_social_share() {\r\n\t\tif ( in_array( 'add-to-any/add-to-any.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) )\r\n\t\t{\r\n\t\t\treturn do_shortcode('[addtoany]');\r\n\t\t}\r\n\t\t\r\n\t\r\n\t\t// Get current page URL \r\n\t\t$sbURL = esc_url( get_permalink() );\r\n \r\n\t\t// Get current page title\r\n\t\t$sbTitle = str_replace( ' ', '%20', esc_html( get_the_title() ));\r\n\r\n\t\t// Get Post Thumbnail for pinterest\r\n\t\t$sbThumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( esc_html( get_the_ID() ) ), 'sb-single-blog-featured' );\r\n \r\n\t\t// Construct sharing URL without using any script\r\n\t\t$twitterURL = 'https://twitter.com/intent/tweet?text='.$sbTitle.'&amp;url='.$sbURL;\r\n\t\t$facebookURL = 'https://www.facebook.com/sharer/sharer.php?u='.$sbURL;\r\n\t\t$googleURL = 'https://plus.google.com/share?url='.$sbURL;\r\n\t\t$bufferURL = 'https://bufferapp.com/add?url='.$sbURL.'&amp;text='.$sbTitle;\r\n\t\t\r\n\t\t// Based on popular demand added Pinterest too\r\n\t\t$pinterestURL = 'https://pinterest.com/pin/create/button/?url='.$sbURL.'&amp;media='.$sbThumbnail[0].'&amp;description='.$sbTitle;\r\n \r\n\t\t// Add sharing button at the end of page/page content\r\n\t\t\r\n return '<a href=\"'.esc_url( $facebookURL ).'\" class=\"btn btn-fb btn-md\" target=\"_blank\"><i class=\"fa fa-facebook\"></i></a>\r\n\t\t\t\t<a href=\"'.esc_url( $twitterURL ).'\" class=\"btn btn-twitter btn-md\" target=\"_blank\"><i class=\"fa fa-twitter\"></i></a>\r\n\t\t\t\t<a href=\"'.esc_url( $googleURL ).'\" class=\"btn btn-gplus btn-md\" target=\"_blank\"><i class=\"fa fa-google-plus\"></i></a>\r\n\t\t\t\t';\r\n\r\n}", "function plugin_options_page() {\n\n $ngsb_img_path =plugins_url(basename(dirname(__FILE__)) ) . '/img/';\n\n?>\n <div>\n <h2>Mouseover Share-Buttons Settings</h2>\n Options relating to the Mouseover Share-Buttons Plugin.\n <form action=\"options.php\" method=\"post\">\n <?php settings_fields('ngsb_options'); ?>\n <?php do_settings_sections('ngsb_plugin'); ?>\n\n <input name=\"Submit\" type=\"submit\" value=\"<?php esc_attr_e('Save Changes'); ?>\" />\n </form>\n </div>\n\n <table>\n <tr>\n <td><a href=\"http://www.newsgrape.com/p/connect-with-wordpress/\"><img width=\"100%\" style=\"max-width:100%;border:none\" src=\"<?php echo $ngsb_img_path; ?>check-newsgrape.jpg\"></a></td>\n <td><a href=\"http://www.wpbeginner.com/\"><img width=\"100%\" style=\"max-width:100%;border:none\" src=\"<?php echo $ngsb_img_path; ?>check-wp-beginner.jpg\"></a></td>\n </tr>\n </table>\n<?php\n}", "public function p11_social_settings_page() {\n ?>\n\n <div class=\"wrap\">\n <h2>P11 Social API Settings</h2>\n\n <form method=\"post\" action=\"options.php\">\n <?php settings_fields( 'p11-social-settings-group' ); ?>\n <?php do_settings_sections( 'p11-social-settings-group' ); ?>\n <table class=\"form-table\">\n <h1>Twitter API</h1>\n <tr valign=\"top\">\n <th scope=\"row\">Twitter OAuth Access Token</th>\n <td><input type=\"text\" name=\"twitter_oauth_access_token\" value=\"<?php echo esc_attr( get_option('twitter_oauth_access_token') ); ?>\" /></td>\n </tr>\n\n <tr valign=\"top\">\n <th scope=\"row\">Twitter Ouath Access Token Secret</th>\n <td><input type=\"text\" name=\"twitter_oauth_access_token_secret\" value=\"<?php echo esc_attr( get_option('twitter_oauth_access_token_secret') ); ?>\" /></td>\n </tr>\n\n <tr valign=\"top\">\n <th scope=\"row\">Twitter Consumer Key</th>\n <td><input type=\"text\" name=\"twitter_consumer_key\" value=\"<?php echo esc_attr( get_option('twitter_consumer_key') ); ?>\" /></td>\n </tr>\n\n <tr valign=\"top\">\n <th scope=\"row\">Twitter Consumer Secret</th>\n <td><input type=\"text\" name=\"twitter_consumer_secret\" value=\"<?php echo esc_attr( get_option('twitter_consumer_secret') ); ?>\" /></td>\n </tr>\n </table>\n\n <hr>\n\n <table class=\"form-table\">\n <h1>Facebook API</h1>\n <?php var_dump($_SESSION); ?>\n <?php $this->checkForValidAccessToken(); ?>\n\n <tr valign=\"top\">\n <th scope=\"row\">Facebook App ID</th>\n <td><input type=\"text\" name=\"facebook_app_id\" id=\"facebookID\" value=\"<?php echo esc_attr( get_option('facebook_app_id') ); ?>\" /></td>\n </tr>\n\n <tr valign=\"top\">\n <th scope=\"row\">Facebook App Secret</th>\n <td><input type=\"text\" name=\"facebook_app_secret\" id=\"facebookSecret\" value=\"<?php echo esc_attr( get_option('facebook_app_secret') ); ?>\" /></td>\n </tr>\n\n <tr valign=\"top\">\n <th scope=\"row\">Facebook Page ID</th>\n <td><input type=\"text\" name=\"facebook_page_id\" id=\"facebookPageID\" value=\"<?php echo esc_attr( get_option('facebook_page_id') ); ?>\" /></td>\n </tr>\n\n </table>\n\n <?php submit_button(); ?>\n\n </form>\n\n </div>\n\n <?php\n }", "function social_share_menu_item()\n{\n add_submenu_page(\"options-general.php\", \"Social Share\", \"Social Share\", \"manage_options\", \"social-share\", \"social_share_page\"); \n}", "function get_options() {\n\t\t$setting = array();\n\t\t$setting['disabled'] = get_option( 'disabled_likes' );\n\t\t$sharing = get_option( 'sharing-options' );\n\n\t\t// Default visibility settings\n\t\tif ( ! isset( $sharing['global']['show'] ) ) {\n\t\t\t$sharing['global']['show'] = array( 'post', 'page' );\n\n\t\t\t// Scalar check\n\t\t} elseif ( is_scalar( $sharing['global']['show'] ) ) {\n\t\t\tswitch ( $sharing['global']['show'] ) {\n\t\t\t\tcase 'posts' :\n\t\t\t\t\t$sharing['global']['show'] = array( 'post', 'page' );\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'index' :\n\t\t\t\t\t$sharing['global']['show'] = array( 'index' );\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'posts-index' :\n\t\t\t\t\t$sharing['global']['show'] = array( 'post', 'page', 'index' );\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// Ensure it's always an array (even if not previously empty or scalar)\n\t\t$setting['show'] = ! empty( $sharing['global']['show'] ) ? (array) $sharing['global']['show'] : array();\n\n\t\t/**\n\t\t * Filters where the Likes are displayed.\n\t\t *\n\t\t * @module likes\n\t\t *\n\t\t * @since 2.2.0\n\t\t *\n\t\t * @param array $setting Array of Likes display settings.\n\t\t */\n\t\treturn apply_filters( 'wpl_get_options', $setting );\n\t}", "function sharethis()\n{ $CI =& get_instance();\n // sharethis public key\n //$sharethis_pub_key = $CI->preference->item('sharethis_pub_key'); // I pull it from DB settings\n // for demo\n $sharethis_pub_key ='Add your key here';\n // sharethis direction\n //$direction = $CI->preference->item('sharethis_direction'); // I pull it from DB settings\n // for demo\n $direction ='vertical';\n if($direction=='vertical'){\n $br = '<br />';\n } else {\n $br ='';\n }\n // sharethis services\n //$services = $CI->preference->item('sharethis_services'); // Again I pull this from DB\n // for demo\n $services = \"facebook, twitter, email, sharethis, gbuzz\";\n $services_array = explode(',', $services);\n // sharethis size\n //$size = $CI->preference->item('sharethis_size');\n $size = 'large';\n if($size=='large'){\n $size = '_large';\n } else {\n $size ='';\n }\n $sharethis ='<div id=\"sthoverbuttons-background\" class=\"sthoverbuttons-background-l\">\n<div id=\"sthoverbuttons-top\" class=\"sthoverbuttons-top-l\">&nbsp;</div>\n<div id=\"sthoverbuttons-shade\" class=\"sthoverbuttons-shade-l\">&nbsp;</div>\n<div id=\"sthoverbuttons-bottom\" class=\"sthoverbuttons-bottom-l\">&nbsp;</div>\n</div><div id=\"sthoverbuttonsMain\" class=\"sthoverbuttonsMain-l\">\n<div class=\"sthoverbuttons-label\">\n<span>Share</span>\n</div><div class=\"sthoverbuttons-chicklets\">';\n foreach($services_array as $service){\n $service = trim($service);\n $sharethis .=\"\\n<span class='st_\".$service.$size.\"' ></span>\".$br ;\n }\n $sharethis .= '<script type=\"text/javascript\">var switchTo5x=true;</script>\n<script type=\"text/javascript\" src=\"http://w.sharethis.com/button/buttons.js\"></script>\n<script type=\"text/javascript\">stLight.options({publisher:\\''.$sharethis_pub_key.'\\'});</script></div></div>';\n\t\n\n\treturn $sharethis;\n}", "function woocommerce_template_single_sharing()\n {\n }", "public function displaySettingPage()\n\t{\n\t\t$settings['socialNetwork'][] = [\n\t\t\t'id' => 'FM_facebook',\n\t\t\t'type' => 'checkbox',\n\t\t\t'value' => $this->settings->getSetting( 'SocialNetwork', 'facebook', 'enabled' ) ? 'checked' : '',\n\t\t\t'class' => 'setting',\n\t\t\t'label' => 'Auto-publier sur Facebook'\n\t\t];\n\t\t$settings['socialNetwork'][] = [\n\t\t\t'id' => 'FM_fb_appid',\n\t\t\t'type' => 'input',\n\t\t\t'value' => htmlspecialchars( $this->settings->getSetting( 'SocialNetwork', 'facebook', 'appId' ) ),\n\t\t\t'class' => 'setting',\n\t\t\t'label' => 'Facebook App ID'\n\t\t];\n\t\t$settings['socialNetwork'][] = [\n\t\t\t'id' => 'FM_fb_appsecret',\n\t\t\t'type' => 'input',\n\t\t\t'value' => htmlspecialchars( $this->settings->getSetting( 'SocialNetwork', 'facebook', 'appSecret' ) ),\n\t\t\t'class' => 'setting',\n\t\t\t'label' => 'Facebook App Secret'\n\t\t];\n\t\t$settings['main'][] = [\n\t\t\t'id' => 'FM_logger',\n\t\t\t'type' => 'checkbox',\n\t\t\t'value' => $this->settings->getSetting( 'Logger', 'enabled' ) ? 'checked' : '',\n\t\t\t'class' => 'setting',\n\t\t\t'label' => 'Activer les logs'\n\t\t];\n\n\t\t$vehicleInfo = (new Vehicle(0))->getArrayInfos();\n\n\t\tforeach( $vehicleInfo as $info )\n\t\t\t$settings['vehicle'][] = [\n\t\t\t\t'id' => $info['id'],\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'value' => $this->settings->getSetting( 'VehiclePostType', 'display', $info['id'] ) !== false ? 'checked' : '',\n\t\t\t\t'class' => 'setting',\n\t\t\t\t'label' => $info['label']\n\t\t\t];\n\n\t\tinclude FleetManager::$PLUGIN_PATH . 'ressources/views/settingsPage.php';\n\t}", "function sharing_block() { ?>\n\t\t<h2><?php esc_html_e( 'Sharing Buttons', 'jetpack' ); ?></h2>\n\t\t<form method=\"post\" action=\"\">\n\t\t\t<table class=\"form-table\">\n\t\t\t\t<tbody>\n\t\t\t\t<?php\n\t\t\t\t/** This action is documented in modules/sharedaddy/sharing.php */\n\t\t\t\tdo_action( 'sharing_global_options' );\n\t\t\t\t?>\n\t\t\t\t</tbody>\n\t\t\t</table>\n\n\t\t\t<p class=\"submit\">\n\t\t\t\t<input type=\"submit\" name=\"submit\" class=\"button-primary\" value=\"<?php esc_attr_e( 'Save Changes', 'jetpack' ); ?>\" />\n\t\t\t</p>\n\n\t\t\t<input type=\"hidden\" name=\"_wpnonce\" value=\"<?php echo wp_create_nonce( 'sharing-options' );?>\" />\n\t\t</form> <?php\n\t}", "public function page_init() {\n\t\tregister_setting(\n\t\t\t'msm_option_group', // Option group\n\t\t\t'msm_sharing_settings', // Option name\n\t\t\tarray( $this, 'sanitize' ) // Sanitize\n\t\t);\n\n\t\tadd_settings_section(\n\t\t\t'msm_general_settings_section', // ID\n\t\t\t__( 'Network-wide settings', 'multisite-shared-media' ), // Title\n\t\t\tarray( $this, 'print_section_info' ), // Callback\n\t\t\t'msm-setting-admin' // Page\n\t\t);\n\n\t\tadd_settings_field(\n\t\t\t'msm_do_share_media', // ID\n\t\t\t__( 'Share media across network', 'multisite-shared-media' ), // Title\n\t\t\tarray( $this, 'field_share_media_cb' ), // Callback\n\t\t\t'msm-setting-admin', // Page\n\t\t\t'msm_general_settings_section' // Section\n\t\t);\n\n\t\tadd_settings_field(\n\t\t\t'msm_do_delete_shared_media',\n\t\t\t__( 'Remove media from all sites upon media removal', 'multisite-shared-media' ),\n\t\t\tarray( $this, 'msm_do_delete_shared_media_callback' ),\n\t\t\t'msm-setting-admin',\n\t\t\t'msm_general_settings_section'\n\t\t);\n\t}", "public function do_section_site_wide() {\n\t\techo 'These options are site-wide and will apply to every page.';\n\t}", "public function do_section_site_wide() {\n\t\techo 'These options are site-wide and will apply to every page.';\n\t}", "public function create_admin_page() {\n\n\t\t// Form action url\n\t\t$action_url = esc_url(\n\t\t\tadd_query_arg(\n\t\t\t\t'action',\n\t\t\t\t'msm_sharing_settings',\n\t\t\t\tnetwork_admin_url( 'edit.php' )\n\t\t\t)\n\t\t);\n\n\t\t?>\n <div class=\"wrap\">\n <h1><?php _e( 'Multisite Shared Media settings', 'multisite-shared-media' ); ?></h1>\n\n <?php\n // Navigation tabs\n $current_tab = ! empty( $_GET['tab'] ) ? esc_attr( $_GET['tab'] ) : 'general';\n $this->output_page_tabs( $current_tab );\n ?>\n\n <form method=\"post\" action=\"<?php echo $action_url; ?>\">\n <input type=\"hidden\" name=\"tab\" value=\"<?php echo $current_tab; ?>\" />\n\n <?php\n\n if( 'general' === $current_tab ){\n ?>\n <h2><?php _e('General Settings', 'multisite-shared-media'); ?></h2>\n <p>\n <?php _e( 'Choose how the plugin is supposed to act upon media uploads and deletion', 'multisite-shared-media' ); ?>\n </p>\n\n <p>\n <?php $this->field_share_media_cb(); ?>\n </p>\n <p>\n <?php $this->field_delete_media_cb(); ?>\n </p>\n <?php\n submit_button( null, 'primary', 'submit', false );\n\n } elseif ( 'relationships' === $current_tab ) {\n ?>\n\n <h2><?php echo __( 'Site Relationships', 'multisite-shared-media' ); ?></h2>\n <p>\n <?php _e( 'Choose which sites should share media between each other (both ways).', 'multisite-shared-media' ); ?>\n <br/>\n <?php _e( 'Only original media items will be shared to the other, which means that Media Item replicated from Site A to Site B won\\'t appear to Site C if you decide to link sites B and C.', 'multisite-shared-media' ); ?>\n <br/>\n <?php _e( 'To get the Media Item from Site A to Site C, they must be linked with each other.', 'multisite-shared-media' ); ?>\n <br/>\n </p>\n <br/>\n\n <?php $this->site_relationship_matrix(); ?>\n <br/>\n <?php\n submit_button( null, 'primary', 'submit', false );\n\n\n } elseif( 'replication' === $current_tab ){\n ?>\n <h2><?php _e( 'Replicate existing media', 'multisite-shared-media' ); ?></h2>\n\n <p>\n <?php _e( 'With this tool you can replicate media from one site to another. Select source site and target site, and click Replicate.', 'multisite-shared-media' ); ?>\n <br/>\n <?php _e( 'Only media which is not replicated yet, will be replicated. Also, only media which is originally uploaded to the source site will be replicated.', 'multisite-shared-media' ); ?>\n </p>\n\n <p>\n <label for=\"msm-select-replication-source\"><?php _e( 'Select Source', 'multisite-shared-media'); ?></label>\n <select name=\"msm-replication-source\" id=\"msm-select-replication-source\">\n <option>----</option>\n <?php\n foreach( (array) $this->network->get_sites() as $site ) {\n echo '<option value=\"' . $site->blog_id . '\">' . $site->blog_id . ': ' . $site->blogname . '</option>';\n }\n ?>\n </select>\n\n <label for=\"msm-select-replication-target\"><?php _e( 'Select Target', 'multisite-shared-media' ); ?></label>\n <select name=\"msm-replication-target\" id=\"msm-select-replication-target\">\n <option>----</option>\n <?php\n foreach ( (array) $this->network->get_sites() as $site ) {\n echo '<option value=\"' . $site->blog_id . '\">' . $site->blog_id . ': ' . $site->blogname . '</option>';\n }\n ?>\n </select>\n </p>\n <button type=\"button\" name=\"replicate-all-existing\" id=\"replicate-all-existing\"\n class=\"button button-primary\" value=\"yes\">\n <?php echo __( 'Start replication process', 'multisite-shared-media' ); ?>\n </button>\n <p><em>\n <?php _e( 'The process can take some time if you have lots of media. You can pause, resume and terminate the process at any time.', 'multisite-shared-media' ); ?>\n <br/>\n <?php _e( 'Next time the process will continue from where it left off.', 'multisite-shared-media' ); ?>\n </em></p>\n <?php\n }\n ?>\n </form>\n </div>\n\t\t<?php\n\n // The localized strings for Javascript use.\n\t\t$this->output_js_strings();\n\t}", "function mysocialbuddy_settings_page() {\n?>\n\t<div class=\"wrap\">\n\t\t<h1>MySocialBuddy Settings</h1>\n\t\t<p>Welcome to MySocialBuddy! This plugin allows you to add social network accounts to your WordPress site. Enter your account information below to get started.</p>\n\t\t<form method=\"post\" action=\"options.php\">\n\t\t\t<?php settings_fields( 'mysocialbuddy-settings-group' ); ?>\n\t\t\t<?php do_settings_sections( 'mysocialbuddy-settings-group' ); ?>\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\">Twitter</th>\n\t\t\t\t\t<td><input type=\"text\" name=\"mysocialbuddy_twitter\" value=\"<?php echo esc_attr( get_option('mysocialbuddy_twitter') ); ?>\" /></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\">LinkedIn</th>\n\t\t\t\t\t<td><input type=\"text\" name=\"mysocialbuddy_linkedin\" value=\"<?php echo esc_attr( get_option('mysocialbuddy_linkedin') ); ?>\" /></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\">Facebook</th>\n\t\t\t\t\t<td><input type=\"text\" name=\"mysocialbuddy_facebook\" value=\"<?php echo esc_attr( get_option('mysocialbuddy_facebook') ); ?>\" /></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\">Instagram</th>\n\t\t\t\t\t<td><input type=\"text\" name=\"mysocialbuddy_instagram\" value=\"<?php echo esc_attr( get_option('mysocialbuddy_instagram') ); ?>\" /></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\">Vkontakte</th>\n\t\t\t\t\t<td><input type=\"text\" name=\"mysocialbuddy_vkontakte\" value=\"<?php echo esc_attr( get_option('mysocialbuddy_vkontakte') ); ?>\" /></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t<th scope=\"row\">Weibo</th>\n\t\t\t\t\t<td><input type=\"text\" name=\"mysocialbuddy_weibo\" value=\"<?php echo esc_attr( get_option('mysocialbuddy_weibo') ); ?>\" /></td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t\t<?php submit_button(); ?>\n\t\t</form>\n\t</div>\n<?php\n}", "function facebook_like_admin_menu () {\r\n\t$plugin_page = add_options_page(__('Facebook like settings', 'facebook_like_button_by_kms'), __('Facebook like', 'facebook_like_button_by_kms'), 'administrator',\r\n\t\t'facebook-like-share-button', 'facebook_like_admin_page');\r\n\tadd_action( \"admin_print_scripts-$plugin_page\", 'facebook_like_admin_head' );\r\n}", "public function view_settings_page() {\n\t?><div class=\"wrap\">\n\t\t<h2><?php _e( 'Twitter API for WordPress', self::HANDLE ); ?></h2>\n\t\t<p><?php _e( 'Enter your consumer key and secret from <a href=\"https://dev.twitter.com/apps\" target=\"_blank\">https://dev.twitter.com/apps</a> (be sure to set a callback URL when adding your app):', self::HANDLE ); ?></p>\n\t\t<form action=\"options.php\" method=\"post\">\n\t\t\t<?php settings_fields( self::HANDLE ); ?>\n\t\t\t<?php do_settings_sections( self::HANDLE ); ?>\n\t\t\t<?php submit_button(); ?>\n\t\t</form>\n\n\t\t<?php if ( $this->options['consumer_key'] && $this->options['consumer_secret'] ) : ?>\n\n\t\t\t<?php if ( !$this->authorized_to ) : ?>\n\n\t\t\t\t<h2><?php _e( 'Authentication Necessary', self::HANDLE ); ?></h2>\n\t\t\t\t<p><?php _e( \"To complete the Twitter setup, you'll need to authenticate this application to use your Twitter account to make API requests\", self::HANDLE ); ?></p>\n\t\t\t\t<form method=\"post\">\n\t\t\t\t\t<input type=\"submit\" name=\"tafwp_authenticate\" value=\"Authenticate with Twitter\" class=\"button-secondary\" />\n\t\t\t\t</form>\n\n\t\t\t<?php else : ?>\n\n\t\t\t\t<p><?php printf( __( \"Looks like you're good to go! You're authorized as %s\", self::HANDLE ), '<strong><a href=\"https://twitter.com/' . esc_attr( $this->authorized_to ) . '\" target=\"_blank\">@' . esc_html( $this->authorized_to ) . '</a></strong>' ) ?></p>\n\n\t\t\t<?php endif ?>\n\n\t\t<?php endif ?>\n\t</div>\n\t<?php\n\t}", "function monsterinsights_settings_page() {\n\techo monsterinsights_ublock_notice();\n\tmonsterinsights_settings_error_page( 'monsterinsights-vue-site-settings' );\n\tmonsterinsights_settings_inline_js();\n}", "public function markupSettingsPage() {\n\t\t\t$rasrMetaBoxID = Skylabapps_GoogleMapMarker_Core::PREFIX . 'rasr-plug';\n\t\t\t$rasrMetaBoxPage = Skylabapps_GoogleMapMarker_Core::PREFIX . 'settings'; // @todo better var name\n\t\t\t$hidden = get_hidden_meta_boxes( $rasrMetaBoxPage );\n\t\t\t$hidden_class = in_array( $rasrMetaBoxPage, $hidden ) ? ' hide-if-js' : '';\n\t\t\t//$show_api_key_notice = empty( $this->mapApiKey ) || empty( $this->geocodingApiKey );\n\t\t\t$show_api_key_notice = empty( $this->mapApiKey );\n\n\t\t\t// @todo some of above may not be needed\n\n\t\t\tif ( current_user_can( 'manage_options' ) ) {\n\t\t\t\trequire_once( dirname( __FILE__ ) . '/views/settings.php' );\n\t\t\t} else {\n\t\t\t\twp_die( 'Access denied.' );\n\t\t\t}\n\t\t}", "function settings_page() {\n include( eboywp_DIR . '/templates/page-settings.php' );\n }", "function zaxu_share_toggle() {\n\t\t\tif (get_theme_mod('zaxu_site_share', 'enabled') === 'enabled') {\n\t\t\t\techo '\n\t\t\t\t\t<li class=\"content-item share-toggle\">\n\t\t\t\t\t\t<div class=\"share-icon\"></div>\n\t\t\t\t\t</li>\n\t\t\t\t';\n\t\t\t}\n\t\t}", "function edd_social_discounts_display_share_buttons() {\n\t$display = edd_get_option( 'edd_sd_display_services', 'after' );\n\n\t// don't automatically output the sharing services\n\tif ( 'none' != $display ) {\n\t\t// load sharing box by default after download content \n\t\tif ( 'after' == $display ) {\n\t\t\tadd_action( 'edd_after_download_content', 'edd_social_discounts_load_share_box' );\n\t\t}\n\t\t// load before content\n\t\telseif ( 'before' == $display ) {\n\t\t\tadd_action( 'edd_before_download_content', 'edd_social_discounts_load_share_box' );\n\t\t}\n\t}\n}", "function options_page() {\n\t\t\tinclude(\"settings.php\");\n }", "function optimized_social_share_buttons_menu(){\n add_submenu_page(\"options-general.php\", \"Optimized Social Share\", \"Optimized Social Share\", \"manage_options\", \"optimized-social-share-buttons\", \"optimized_social_share_page\"); \n}", "function display_settings_page()\n {\n ?>\n <div class=\"section panel\">\n <h1><?php _e('Plugin Boilerplate Options', PLUGIN_BOILERPLATE_PLUGIN_SLUG); ?></h1>\n \n <?php settings_errors(); ?>\n <form method=\"post\" enctype=\"multipart/form-data\" action=\"options.php\">\n <?php \n settings_fields(PLUGIN_BOILERPLATE_PLUGIN_SLUG . '_options');\n do_settings_sections(PLUGIN_BOILERPLATE_PLUGIN_SLUG . '_options_section');\n\n $this->submit_button();\n ?>\n </form>\n </div>\n <?php\n }", "function disp_socialsii($content) {\r\nglobal $post;\r\n$plink = get_permalink($post->ID);\r\n$eplink = urlencode($plink);\r\n$ptitle = get_the_title($post->ID);\r\n\r\nif((is_single()&&get_option('ss_dpost','checked')=='checked')||(is_page()&&get_option('ss_dpage','checked')=='checked')){\r\n\t$sharelinks=display_social4iii();\r\n\t$content=$sharelinks.$content;\r\n}\r\nreturn $content;\r\n}", "function dt_woocommerce_hide_share_on_plugin_pages( $hide_share = false ) {\n\t\tif ( is_cart() || is_checkout() ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn $hide_share;\n\t}", "function settings_page() {\n\t\t?>\n\t\t<div class=\"wrap\">\n\n\t\t\t<h1><?php _e( 'Is Varnish Working?', 'varnish-http-purge' ); ?></h1>\n\t\t\t\t\n\t\t\t<?php settings_errors(); ?>\n\n\t\t\t<form action=\"options.php\" method=\"POST\" ><?php\n\t\t\t\tsettings_fields( 'varnish-http-purge-url' );\n\t\t\t\tdo_settings_sections( 'varnish-url-settings' );\n\t\t\t\tsubmit_button( 'Check URL', 'primary');\n\t\t\t?></form>\n\n\t\t\t<form action=\"options.php\" method=\"POST\" ><?php\n\t\t\t\t// Only available if _not_ multisite\n\t\t\t\tif ( !is_multisite() ) {\n\t\t\t\t\tsettings_fields( 'varnish-http-purge-ip' );\n\t\t\t\t\tdo_settings_sections( 'varnish-ip-settings' );\n\t\t\t\t\tsubmit_button( 'Save IP', 'secondary');\n\t\t\t\t}\n\t\t\t?></form>\n\n\t\t</div>\n\t\t<?php\n\t}", "function wpex_social_share() {\n get_template_part( 'partials/social-share' );\n}", "public function render_settings_page() {\n\t\t?>\n\t\t<div class=\"wrap\">\n\t\t\t<h2>S3 Media Sync</h2>\n\t\t\t\t<form action='options.php' method='post'>\n\t\t\t\t\t<?php settings_fields( 's3_media_sync_settings_page' ); ?>\n\t\t\t\t\t<?php do_settings_sections( 's3_media_sync_settings_page' ); ?>\n\t\t\t\t\t<?php submit_button(); ?>\n\t\t\t\t</form>\n\t\t</div>\n\t\t<?php\n\t}", "function rp_gpo_home_share () {\r\n $output = rp_social_share(network_site_url());\r\n echo $output;\r\n}", "function Options_Page(){ global $WPTS_OPTIONS; ?>\n\n <div class=\"wrap\">\n\n <h2 style=\"clear:both;\"><?php _e( 'WP Top Slider Options' ); ?></h2>\n\n <form method=\"post\" action=\"options.php\">\n\n <?php settings_fields( 'WPTS_OPTIONS_group' ); ?>\n \n <?php do_settings_sections( 'WPTS_OPTIONS_page' ); ?>\n\n <p class=\"submit\">\n <input type=\"submit\" class=\"button-primary\" value=\"<?php _e('Save Changes') ?>\" />\n </p>\n\n </form>\n\n </div>\n \n <?php }", "public static function externalLinkSettings()\n {\n $settings = get_option('nel_settings');\n ?>\n <fieldset>\n <legend class=\"screen-reader-text\">\n <span>External link settings</span>\n </legend>\n <label for=\"nel_settings[new_window]\">\n <input type='checkbox' id='nel_settings[new_window]' name='nel_settings[new_window]' <?php checked( isset($settings['new_window']), 1 ); ?> value='1'>\n Open all external links in a new window\n </label>\n <br>\n <p class=\"description\">Add 'samewindow' class to prevent external link opening in a new window.</p>\n <br>\n <label for=\"nel_settings[unsafe_target]\">\n <input type='checkbox' id='nel_settings[unsafe_target]' name='nel_settings[unsafe_target]' <?php checked( isset($settings['unsafe_target']), 1 ); ?> value='1'>\n Allow unsafe link target\n </label>\n <br>\n <p class=\"description\">Prevent Wordpress from adding rel=\"noreferrer\" and rel=\"noopener\" to new external links.</p>\n </fieldset>\n <?php\n }", "public static function optionsPage()\n {\n $active_tab = '';\n if (isset($_GET['tab'])) {\n $active_tab = $_GET['tab'];\n }\n ?>\n <div class=\"wrap\">\n <h1>No Follow All External Links Settings</h1>\n <h2 class=\"nav-tab-wrapper wp-clearfix\">\n <a href=\"?page=no_follow_all_external_links\" class=\"nav-tab <?php echo $active_tab == '' ? 'nav-tab-active' : ''; ?>\">Settings</a>\n <a href=\"?page=no_follow_all_external_links&tab=advanced-settings\" class=\"nav-tab <?php echo $active_tab == 'advanced-settings' ? 'nav-tab-active' : ''; ?>\">Advanced Settings</a>\n </h2>\n <form action='options.php' method='post'>\n <?php\n if ($active_tab == 'advanced-settings') {\n settings_fields('advancedSettings');\n do_settings_sections('advancedSettings');\n submit_button();\n } else {\n settings_fields('pluginPage');\n do_settings_sections('pluginPage');\n submit_button();\n }\n ?>\n </form>\n </div>\n <?php\n }", "function display_listing_general_settings()\n {\n $this->ad_configuration_home($this->db);\n $this->display_page();\n }", "function fsmw_options_page_view() {\n\t//on form post\n\tif(isset($_POST['Submit'])) {\n\t\t$postLinks = array(\n\t\t\t'facebook' => esc_attr( $_POST['fsmw_facebook' ]),\n\t\t\t'twitter' => esc_attr( $_POST['fsmw_twitter' ]),\n\t\t\t'linkedin' => esc_attr($_POST['fsmw_linkedin']),\n\t\t\t'youtube' => esc_attr($_POST['fsmw_youtube']),\n\t\t\t'googleplus' => esc_attr($_POST['fsmw_googleplus']),\n\t\t\t'instagram' => esc_attr($_POST['fsmw_instagram'])\n\t\t\t);\n\n\t\t$postSettings = array(\n\t\t\t'theme' => esc_attr( $_POST['fsmw_theme'] )\n\t\t\t);\n\n\t\t$postValues = array(\n\t\t\t'socialLinks' => $postLinks,\n\t\t\t'settings' => $postSettings\n\t\t\t);\n\n\t\tfsmw_update_data($postValues);\n\n\t\t?>\n \t\t<div class=\"notice notice-success is-dismissible\">\n \t\t <p><?php _e( 'Settings saved!', 'fsmw-message' ); ?></p>\n \t\t</div>\n \t<?php\n\t}\n\n\n\t$fsmwData = get_option('fsmw_options');\n\n\tinclude( plugin_dir_path( __FILE__ ) . 'panosmz-floating-social-media-widget-settings.php');\n}", "function go_wp_display_settings_page() {\n\t\n\t// check if user is allowed access\n\tif ( ! current_user_can( 'manage_options' ) ) return;\n\t\n\t?>\n\t\n\t<div class=\"wrap\">\n\t\t<h1><?php echo esc_html( get_admin_page_title() ); ?></h1>\n\t\t\n\t\t\n\t\t<form action=\"options.php\" method=\"post\">\n\t\t\t\n\t\t\t<?php\n\t\t\t\n\t\t\t// output security fields\n\t\t\tsettings_fields( $option_group = 'go_wp_options' );\n\t\t\t\n\t\t\t// output setting sections\n\t\t\tdo_settings_sections( $page = 'go_wp' );\n\t\t\t\n\t\t\t// submit button\n\t\t\tsubmit_button();\n\t\t\t\n\t\t\t?>\n\t\t\t\n\t\t</form>\n\t</div>\n\t\n\t<?php\n\t\n}", "public function plugin_settings_page(){\r\n\t\r\n\t\techo \"<style> \r\n\t\t.form-table{ clear:left; } \r\n\t\t.nav-tab-wrapper{ margin-bottom:0px; }\r\n\t\t</style>\";\r\n\t\t\r\n\t\techo $this->display_social_media(); \r\n\t\t\r\n echo '<div class=\"wrap\" >';\r\n\t\t\r\n\t\t\techo '<div id=\"icon-'.$this->page_icon.'\" class=\"icon32\"><br /></div>';\r\n\t\t\t\r\n\t\t\techo \"<h2>\".self::$plugin_title.\" Plugin Settings</h2>\";\r\n\t\t\t\r\n\t\t\t//$this->show_backup_manager_link();\r\n\t\t\t$this->show_do_backup_button();\r\n\t\t\t\r\n\t\t\t$this->settings_page->show_tab_nav();\r\n\t\t\t\r\n\t\t\techo '<div id=\"poststuff\" class=\"metabox-holder has-right-sidebar\">';\r\n\t\t\t\r\n\t\t\t\techo '<div class=\"inner-sidebar\">';\r\n\t\t\t\t\techo '<div id=\"side-sortables\" class=\"meta-box-sortabless ui-sortable\" style=\"position:relative;\">';\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t$this->settings_page->show_sidebar();\r\n\t\t\t\t\t\r\n\t\t\t\t\techo '</div>';\r\n\t\t\t\techo '</div>';\r\n\t\t\t\r\n\t\t\t\techo '<div class=\"has-sidebar\" >';\t\t\t\r\n\t\t\t\t\techo '<div id=\"post-body-content\" class=\"has-sidebar-content\">';\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$this->settings_page->show_settings_forms();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//$this->show_do_backup_button();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$this->show_ftp_tools();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\techo '</div>';\r\n\t\t\t\techo '</div>';\r\n\t\t\t\t\r\n\t\t\techo '</div>';\r\n\t\t\t\r\n echo '</div>';\r\n\t\t\r\n }", "public static function render_settings_page() {\n ?>\n <div class=\"wrap\">\n <h1>Client Access Settings</h1>\n <form action='options.php' method='post'>\n\n <?php\n settings_fields( 'client-access' );\n do_settings_sections( 'client-access' );\n submit_button();\n ?>\n\n </form>\n </div>\n <?php\n }", "private static function shared() {\n\t\treturn array(\n\t\t\tarray(\n\t\t\t\t'url' => AM_BASE_INDEX . AM_PAGE_DASHBOARD . '?view=Shared',\n\t\t\t\t'value' => Text::get('shared_title') . ' shared',\n\t\t\t\t'title' => Text::get('shared_title'),\n\t\t\t\t'subtitle' => '',\n\t\t\t\t'icon' => 'files-o'\n\t\t\t)\n\t\t);\n\t}", "function init() {\n add_filter( 'sharing_show', array( 'SharedaddyMoreControl', 'sharing_show' ), 10, 2 );\n add_action( 'sharing_global_options', array( 'SharedaddyMoreControl', 'screen' ) );\n add_action( 'sharing_admin_update', array( 'SharedaddyMoreControl', 'update' ) );\n }", "function drpat_settings_page() {\n\tglobal $page_slug;\n\t$page_slug = get_option('drpat_page_slug');\n\t$plugin_url = WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),\"\",plugin_basename(__FILE__)); \n?>\n<div class=\"wrap\">\n<h2>Display Random Post As Tweet</h2>\n<h3><?php if ( get_option('drpat_page_slug') ) { echo '<a href=\"'.get_permalink( get_option('drpat_page_slug') ).'\" target=\"_blank\">View page</a></h3>'; } ?>\n<form method=\"post\" action=\"options.php\">\n <?php settings_fields( 'drpat-settings-group' ); ?>\n <table class=\"form-table\">\n <tr valign=\"top\">\n <th scope=\"row\"><strong>Content Types</strong><br /><small>Choose a post type</small></th>\n <td>\n <select name=\"drpat_content_type\" id=\"drpat_content_type\">\n <option value=\"any\" <?php if (get_option('drpat_content_type') == 'any'){echo 'selected=\"selected\"';}?>>All Content</option>\n\t\t\t<?php foreach ( get_post_types( array( 'public' => true, 'can_export' => true ), 'objects' ) as $post_type_obj ) { ?>\n <option value=\"<?php echo $post_type_obj->name; ?>\" <?php if (get_option('drpat_content_type') == $post_type_obj->name){echo 'selected=\"selected\"';}?>><?php echo $post_type_obj->labels->name; ?></option>\n <?php } ?>\n </select> \n </td>\n </tr>\n <tr valign=\"top\">\n <th scope=\"row\"><strong>Page</strong><br /><small>Choose a page for the slideshow display</small></th>\n <td><?php wp_dropdown_pages('name=drpat_page_slug&selected='.get_option('drpat_page_slug')); ?></td>\n </tr>\n <tr valign=\"top\">\n <th scope=\"row\"><strong>Template</strong><br /><small>Choose a template for the slideshow</small></th>\n <td>\n \t<select name=\"drpat_template\"/>\n\t\t\t\t<?php \n //$values = array( '/templates/template-normal.php' => 'Normal', '/templates/template-title.php' => 'Title Only', '/templates/template-bpl.php' => 'BPL');\n $values = array( '/templates/template-normal.php' => 'Normal');\n $val = get_option( 'drpat_template' );\n foreach($values as $v => $n) {\n $s = ($val == $v) ? \" selected='selected'\" : null;\n echo \"<option value='$v'$s>$n</option>\\n\";\n }\n ?>\n </select>\n </td>\n </tr>\n\t</table>\n <input type=\"hidden\" name=\"drpat_plugin_url\" value=\"<?php echo $plugin_url; ?>\" />\n <p class=\"submit\">\n <input type=\"submit\" class=\"button-primary\" value=\"<?php _e('Save Settings') ?>\" />\n </p>\n</form>\n<p><a href=\"http://www.skyrocketonlinemarketing.com/2011/03/15/display-random-post-as-tweet-1-0/\">Click here </a> to report bugs or request features...</p>\n<p>And if you feel like donating to support free software, <a href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=WSVM264W5YDNS\">click here...</a></p>\n</div>\n<?php \n}", "function islp_options_content(){\n \n// init global variable for options\n\nglobal $islp_options;\n\n ob_start();?>\n\n <div class=\"wrap\">\n <h2><?php _e('Social Footer Links', 'islp_domain') ;?></h2>\n <p>\n <?php _e('Settings For the Social Footer Links Plugin', 'islp_domain') ;?>\n </p>\n <form action=\"options.php\" method=\"post\">\n\n <?php settings_fields('islp_settings_gruop') ;?>\n <table class=\"form-table\">\n <tbody>\n <tr>\n <th scope=\"row\">\n <label for=\"islp_settings[enable]\">\n <?php _e('Enable Social Links', 'islp_domain') ;?>\n </label>\n </th>\n <td>\n <input type=\"checkbox\" name=\"islp_settings[enable]\" value=\"1\" <?php checked( '1', $islp_options[ 'enable']) ;?> id=\"islp_settings[enable]\"></td>\n </tr>\n \n <th><i class=\"dashicons dashicons-facebook\"></i>\n <?php echo _e('Facebook Settings', 'islp_domain');?>\n </th>\n \n <tr>\n <th scope=\"row\">\n\n <label for=\"islp_settings[facebook_url]\">\n <?php _e('Facebook Page URL', 'islp_domain') ;?>\n </label>\n </th>\n <td>\n <input type=\"text\" name=\"islp_settings[facebook_url]\" value=\"<?php echo $islp_options['facebook_url'] ;?>\" id=\"islp_settings[facebook_url]\" class=\"regular-text\" />\n <p class=\"description\">\n <?php _e('Enter facebook page URL', 'islp_domain');?>\n </p>\n </td>\n </tr>\n \n <!--/ Facebook link settings-->\n <tr>\n <th><i class=\"dashicons dashicons-googleplus\"></i>\n <?php echo _e('Google Plus Settings', 'islp_domain');?>\n </th>\n <td>\n <tr>\n <th scope=\"row\">\n\n <label for=\"islp_settings[google_plus_url]\">\n <?php _e('Google Business Page URL', 'islp_domain') ;?>\n </label>\n </th>\n <td>\n <input type=\"text\" name=\"islp_settings[google_plus_url]\" value=\"<?php echo $islp_options['google_plus_url'] ;?>\" id=\"islp_settings[google_plus_url]\" class=\"regular-text\" />\n <p class=\"description\">\n <?php _e('Google Business Page URL', 'islp_domain');?>\n </p>\n </td>\n </tr>\n <tr>\n <th scope=\"row\">\n\n <label for=\"islp_settings[google_plus_link_color]\">\n <?php _e('Google Business Page Link Color', 'islp_domain') ;?>\n </label>\n </th>\n <td>\n <input type=\"text\" name=\"islp_settings[google_plus_link_color]\" value=\"<?php echo $islp_options['google_plus_link_color'] ;?>\" id=\"islp_settings[google_plus_link_color]\" class=\"regular-text\" />\n <p class=\"description\">\n <?php _e('Enter google_plus page Link Color or HEX value with #', 'islp_domain');?>\n </p>\n </td>\n </tr>\n <tr>\n <th scope=\"row\">\n <label for=\"islp_settings[show_in_feed]\">\n <?php _e('Show in Posts Feed', 'islp_domain') ;?>\n </label>\n </th>\n <td>\n <input type=\"checkbox\" name=\"islp_settings[show_in_feed]\" value=\"1\" <?php checked( '1', $islp_options[ 'show_in_feed']) ;?> id=\"islp_settings[show_in_feed]\"></td>\n </tr>\n </td>\n </tr>\n <!--/ Google + link settings-->\n <tr>\n <th><i class=\"dashicons dashicons-twitter\"></i>\n <?php echo _e('Twitter Settings', 'islp_domain') ;?>\n </th>\n <td>\n <tr>\n <th scope=\"row\">\n\n <label for=\"islp_settings[twitter_url]\">\n <?php _e('Twitter Profile URL', 'islp_domain') ;?>\n </label>\n </th>\n <td>\n <input type=\"text\" name=\"islp_settings[twitter_url]\" value=\"<?php echo $islp_options['twitter_url'] ;?>\" id=\"islp_settings[twitter_url]\" class=\"regular-text\" />\n <p class=\"description\">\n <?php _e('Twitter Profile URL', 'islp_domain');?>\n </p>\n </td>\n </tr>\n <tr>\n <th scope=\"row\">\n\n <label for=\"islp_settings[twitter_plus_link_color]\">\n <?php _e('Twitter Page Link Color', 'islp_domain') ;?>\n </label>\n </th>\n <td>\n <input type=\"text\" name=\"islp_settings[twitter_link_color]\" value=\"<?php echo $islp_options['twitter_link_color'] ;?>\" id=\"islp_settings[twitter_link_color]\" class=\"regular-text\" />\n <p class=\"description\">\n <?php _e('Enter Twitter page Link Color or HEX value with #', 'islp_domain');?>\n </p>\n </td>\n </tr>\n <tr>\n <th scope=\"row\">\n <label for=\"islp_settings[show_in_feed]\">\n <?php _e('Show in Posts Feed', 'islp_domain') ;?>\n </label>\n </th>\n <td>\n <input type=\"checkbox\" name=\"islp_settings[show_in_feed]\" value=\"1\" <?php checked( '1', $islp_options[ 'show_in_feed']) ;?> id=\"islp_settings[show_in_feed]\"></td>\n </tr>\n </td>\n </tr>\n <!--/ Twitter link settings-->\n\n </tbody>\n\n </table>\n <p class=\"submit\">\n <input type=\"submit\" name=\"submit\" id=\"submit\" class=\"button button-primary\" value=\"<?php _e('Save Changes', 'islp_domain') ;?>\">\n </p>\n </form>\n </div>\n\n <?php\n\necho ob_get_clean();\n\n}", "function print_embed_sharing_dialog()\n{\n}", "public function render_social_options()\n {\n ?>\n <form method=\"post\">\n <?php settings_fields('geo_social_admin'); ?>\n <?php\n do_settings_sections('geo_social_admin');\n ?>\n <input id=\"geo-social-admin-submit\" class=\"bump-top add-api-button\" type=\"submit\" action=\"\" value=\"Save Changes\"/>\n </form>\n <?php\n }", "function share_js() {\n\t\tif ( $this->ui_type == 'Capture Legacy' ) {\n\t\t\t$realm = JanrainCapture::get_option( JanrainCapture::$name . '_widget_engage_url' );\n\t\t\t$realm = str_ireplace( 'https://', '', $realm );\n\t\t\t$realm \t = str_ireplace( 'http://', '', $realm );\n\t\t\t$realm = str_ireplace( '.rpxnow.com', '', $realm );\n\t\t\t$legacy_share = <<<LSHARE\n\n\tfunction isReady() { janrain.ready = true; };\n\tif (document.addEventListener) { document.addEventListener(\"DOMContentLoaded\", isReady, false);\n\t} else {\n\t\twindow.attachEvent('onload', isReady);\n\t}\n\n\tvar e = document.createElement('script');\n\te.type = 'text/javascript';\n\te.id = 'janrainWidgets';\n\n\tif (document.location.protocol === 'https:') {\n\t\te.src = 'https://rpxnow.com/load/$realm';\n\t} else {\n\t\te.src = 'http://widget-cdn.rpxnow.com/load/$realm';\n\t}\n\n\tvar s = document.getElementsByTagName('script')[0];\n\ts.parentNode.insertBefore(e, s);\nLSHARE;\n\t\t} else {\n\t\t\t$legacy_share = '';\n\t\t}\n\n\t\t$providers = JanrainCapture::get_option( JanrainCapture::$name . '_rpx_share_providers' );\n\t\t$providers = implode( \"', '\", $providers );\n\t\techo <<<SHARE\n<style>#janrain-share { z-index: 99999 !important; }</style>\n<script type=\"text/javascript\">\n(function() {\n\tif (typeof window.janrain !== 'object') window.janrain = {};\n\tif (typeof window.janrain.settings !== 'object') window.janrain.settings = {};\n\tif (typeof window.janrain.settings.share !== 'object') window.janrain.settings.share = {};\n\tif (typeof window.janrain.settings.packages !== 'object') janrain.settings.packages = ['share'];\n\telse janrain.settings.packages.push('share');\n\n\tjanrain.settings.share.message = '';\n\tjanrain.settings.share.providers = ['$providers'];\n$legacy_share\n})();\nfunction setShare(url, title, desc, img, provider) {\n\tjanrain.engage.share.setUrl(url);\n\tjanrain.engage.share.setTitle(title);\n\tjanrain.engage.share.setMessage(title);\n\tjanrain.engage.share.setDescription(desc);\n\tjanrain.engage.share.setImage(img);\n\tjanrain.engage.share.showProvider(provider);\n\tjanrain.engage.share.show();\n}\n</script>\nSHARE;\n\t}", "function mnp_settings_page() {\n\n\techo '<div class=\"wrap\"><h1>MNP Settings</h1></div>';\n\n\t// externalize the shortcode generator\n\n\tinclude_once MN_PLUGIN_DIR . '/includes/mn_shortcode_generator.php';\n\n\t// we need JS to generate the shortcode\n\t// best to externalize it and place it only on this page\n\n\techo '<script type=\"text/javascript\" src=\"' . MN_PLUGIN_URL . 'assets/js/mn_shortcode_generator.js\"></script>';\n\n}", "function screen() {\n $vars['show_more'] = get_option( 'sharedaddy-mc-restrict-to' );\n $vars['options'] = get_post_types( array( 'public' => true ), 'objects' );\n self::template_render( 'options', $vars );\n }", "function jr_share_form() {\n\tif ( function_exists('selfserv_sexy') ): ?>\n\t\t<div id=\"share_form\" class=\"section_content\">\n\t\t\t<?php selfserv_sexy(); ?>\n\t\t\t<div class=\"clear\"></div>\n\t\t</div>\n\t<?php endif;\n}", "public function hookHome($params) {\n\tglobal $smarty;\n\t$sharingpretext=(Configuration::get('chooseshare')==4 || Configuration::get('chooseshare')==5) ? '' : Configuration::get('social_share_pretext');\n\t$counterpretext=(Configuration::get('choosecounter')==2 || Configuration::get('choosecounter')==3) ? '' : Configuration::get('social_counter_pretext');\n\tif( Configuration::get ('social_share_home')=='1') {\n\t if( Configuration::get('enable_social_sharing')=='1') {\n\t $sharing='<b>'.$sharingpretext.'</b><br/><div class=\"lrsharecontainer\"></div>';\n\t $smarty->assign( 'sharing', $sharing ); \n\t }\n\t}\n\tif( Configuration::get ('social_counter_home')=='1') {\n\t if( Configuration::get('enable_social_counter')=='1') {\n\t $counter='<b>'.$counterpretext.'</b><br/><div class=\"lrcounter_simplebox\"></div>';\n\t $smarty->assign( 'counter', $counter ); \n\t }\n\t}\n\tif( Configuration::get('enable_social_sharing')=='1' || Configuration::get('enable_social_counter')=='1') {\n\t return $this->display( __FILE__, 'sharing.tpl' );\n\t}\n }", "public function share_get() {\n\t\tlog_message('debug', 'share_get');\n\t\t$this->_plugin->save_share(\n\t\t\t$this->get('pluginButtonId'),\n\t\t\t$this->get('shareAction'),\n\t\t\t$this->get('fields'),\n\t\t\t$this->get('browser'),\n\t\t\t$this->get('ipAddress'),\n\t\t\t$this->get('userId')\n\t\t\t);\n\t}", "function getSharebutton($domain_id)\r\n\t\t{\r\n\t\t\tglobal $CFG,$objSmarty;\r\n\t\t\t$sqlsel = \"SELECT * FROM \".$CFG['table']['blogsettings']. \" WHERE domain_id = '\".$this->filterInput($domain_id).\"' \";\r\n\t\t\t$sqlres = $this->ExecuteQuery($sqlsel,'select');\r\n\t\t\t$objSmarty->assign(\"blogsettings\", $sqlres);\r\n\t\t}", "function add_optimized_social_share_buttons($content) {\n\t\t$strikableURL = get_permalink();\n \n\t\t// Get current page title\n\t\t$strikableTitle = str_replace( ' ', '%20', get_the_title());\n\t\t\n\t\t// Get Post Thumbnail for pinterest\n\t\t$strikableThumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' );\n \n\t\t// Construct sharing URL without using any script\n $twitterUserName = get_option(\"optimized-social-share-twitter-name\");\n\t\t$twitterURL = 'https://twitter.com/intent/tweet?text='.$strikableTitle.'&amp;url='.$strikableURL.'&amp;via='.$twitterUserName;\n\n\t\t$facebookURL = 'https://www.facebook.com/sharer/sharer.php?u='.$strikableURL;\n\t\t$googleURL = 'https://plus.google.com/share?url='.$strikableURL;\n\t\t$bufferURL = 'https://bufferapp.com/add?url='.$strikableURL.'&amp;text='.$strikableTitle;\n\t\t\n\t\t// Based on popular demand added Pinterest too\n\t\t$pinterestURL = 'https://pinterest.com/pin/create/button/?url='.$strikableURL.'&amp;media='.$strikableThumbnail[0].'&amp;description='.$strikableTitle;\n \t\t$emailURL = 'mailto:?subject=' . $strikableTitle . '&amp;body=Check out this site: '. $strikableURL .'\" title=\"Share by Email';\n \n \t\tif(get_option(\"optimized-social-share-strikable-rel-nofollow\") == 1){\n \t\t\t$rel_nofollow = 'rel=\"nofollow\"';\n \t\t}else{\n \t\t\t$rel_nofollow = '';\n \t\t}\n \n\t\t// Add sharing button at the end of page/page content\n\t\t$content .= '<div class=\"strikable-social\">';\n\t\t$content .= '<!-- Social Sharing Buttons (Optimized) Plugin without any Java Script Loading by Strikable.com - START-->';\n\t\t$content .= '<h5>'.get_option(\"optimized-social-share-strikable-custom-label\").'</h5>';\n\t\t\n if(get_option(\"optimized-social-share-facebook\") == 1){\n\t\t\t$content .= '<a class=\"strikable-link strikable-facebook\" href=\"'.$facebookURL.'\" target=\"_blank\" '. $rel_nofollow .'>Facebook</a>';\n }\n if(get_option(\"optimized-social-share-twitter\") == 1){\n\t\t\t$content .= '<a class=\"strikable-link strikable-twitter\" href=\"'. $twitterURL .'\" target=\"_blank\" '. $rel_nofollow .'>Twitter</a>';\n }\n if(get_option(\"optimized-social-share-googleplus\") == 1){\n\t\t\t$content .= '<a class=\"strikable-link strikable-googleplus\" href=\"'.$googleURL.'\" target=\"_blank\" '. $rel_nofollow .'>Google+</a>';\n }\n if(get_option(\"optimized-social-share-buffer\") == 1){\n\t\t\t$content .= '<a class=\"strikable-link strikable-buffer\" href=\"'.$bufferURL.'\" target=\"_blank\" '. $rel_nofollow .'>Buffer</a>';\n }\n if(get_option(\"optimized-social-share-pinterest\") == 1){\n\t\t\t$content .= '<a class=\"strikable-link strikable-pinterest\" href=\"'.$pinterestURL.'\" target=\"_blank\" '. $rel_nofollow .'>Pin It</a>';\n }\n if(get_option(\"optimized-social-share-email\") == 1){\n\t\t\t$content .= '<a class=\"strikable-link strikable-email\" href=\"'.$emailURL.'\" target=\"_blank\" '. $rel_nofollow .'>Email</a>'; \n }\n $content .= '<!-- Social Sharing Buttons (Optimized) - END-->';\n\n\t\t$content .= '</div>';\n\t\treturn $content;\n}", "public function create_settings_page() {\n\t\tadd_options_page( 'Content Stream Settings', 'Content Stream', 'manage_options', 'content-stream', array( $this, 'render_settings_form' ) );\n\t}", "public static function settings_page() {\n\t\t\t\t\t\n\t\t\tslp_pvw_plugin_framework::pvw_plugin_settings();\n\t\t\n\t\t}", "static function post_share_bar() {\r\n\r\n\t\t\t//check settings\r\n\t\t\t$single_post_share_bar = look_ruby_core::get_option( 'single_post_share_bar' );\r\n\t\t\tif ( empty( $single_post_share_bar ) ) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\t$single_post_share_bar_total = look_ruby_core::get_option( 'post_share_bar_total' );\r\n\t\t\techo '<div class=\"single-share-bar clearfix\">';\r\n\r\n\t\t\tif ( ! empty( $single_post_share_bar_total ) ) {\r\n\t\t\t\t//get total share\r\n\t\t\t\t$total_share = look_ruby_social_share_count::count_all_share();\r\n\r\n\t\t\t\techo '<span class=\"single-share-bar-total share-bar-total\">';\r\n\t\t\t\techo intval( $total_share['all'] ) . ' ' . '<span class=\"share-bar-total-text\">' . esc_html( 'shares', 'look' ) . '</span>';\r\n\t\t\t\techo '</span><!--#share bar total -->';\r\n\t\t\t} else {\r\n\t\t\t\techo '<span class=\"single-share-bar-total share-bar-total\">';\r\n\t\t\t\techo '<span class=\"share-bar-total-text\">' . esc_html( 'share', 'look' ) . '</span>';\r\n\t\t\t\techo '</span><!--#share bar total -->';\r\n\t\t\t}\r\n\t\t\techo '<div class=\"single-share-bar-inner\">';\r\n\t\t\techo look_ruby_social_share_post::render_post_share_bar();\r\n\t\t\techo '</div>';\r\n\r\n\r\n\t\t\techo '</div><!--#single share bar-->';\r\n\t\t}", "function project_display_settings_page() {\n\tif (!current_user_can('manage_options')) return;\n\t?>\n\t<div class=\"wrap\">\n\t\t<h1><?php echo esc_html(get_admin_page_title()); ?></h1>\n\t\t<form action=\"options.php\" method=\"post\">\n\t\t\t<?php\n\t\t\tsettings_fields('project_options');\n\t\t\tdo_settings_sections('project');\n\t\t\tsubmit_button();\n\t\t\t?>\n\t\t</form>\n\t</div>\n\t<?php\n}", "static function settings_page() {\n\t\t// This function is delegated to the Options class.\n\t\tOptions::settings_page();\n\t}", "function linkconnector_uts_page() {\n\t?>\n <h1>LinkConnector Universal Tracking Solution (UTS)</h1>\n <p>Do not change the Campaign Group ID or Event ID values unless specified by your LinkConnector Merchant Representative.</p>\n <p>If you need help, please contact Merchant Relations - 9194685150 ext. 1</p>\n <form method=\"post\" action=\"options.php\">\n <?php settings_fields( 'linkconnector-uts-settings' ); ?>\n <?php do_settings_sections( 'linkconnector-uts-settings' ); ?>\n <table class=\"form-table\">\n <tr valign=\"top\">\n <th scope=\"row\">Event ID:</th>\n <td><input type=\"text\" name=\"linkconnector_uts_eid\" value=\"<?php echo get_option( 'linkconnector_uts_eid' ); ?>\"/></td>\n </tr>\n <tr valign=\"top\">\n <th scope=\"row\">Campaign Group ID:</th>\n <td><input type=\"text\" name=\"linkconnector_uts_cgid\" value=\"<?php echo get_option( 'linkconnector_uts_cgid' ); ?>\"/></td>\n </tr>\n </table>\n <?php submit_button(); ?>\n </form> \n<?php\n\n}", "protected function replicate_analytics_sharing_settings( $sharing_settings ) {\n\t\tif ( ! isset( $sharing_settings[ self::MODULE_SLUG ] ) && isset( $sharing_settings[ Analytics::MODULE_SLUG ] ) ) {\n\t\t\t$sharing_settings[ self::MODULE_SLUG ] = $sharing_settings[ Analytics::MODULE_SLUG ];\n\t\t}\n\n\t\treturn $sharing_settings;\n\t}", "public function social_settings_box()\n {\n ?>\n <p>Twitter Handle: ( No @symbol, just the actual handle, @nik_nik would just be nik_nik )<br />\n <input type=\"text\" name=\"<?php echo GENESIS_SETTINGS_FIELD; ?>[twitter_handle]\" value=\"<?php echo esc_attr(genesis_get_option('twitter_handle')); ?>\" size=\"50\" />\n </p>\n\n <p>Facebook URL:<br />\n <input type=\"text\" name=\"<?php echo GENESIS_SETTINGS_FIELD; ?>[facebook_url]\" value=\"<?php echo esc_attr(genesis_get_option('facebook_url')); ?>\" size=\"50\" />\n </p>\n\n <p>GooglePlus URL:<br />\n <input type=\"text\" name=\"<?php echo GENESIS_SETTINGS_FIELD; ?>[googleplus_url]\" value=\"<?php echo esc_attr(genesis_get_option('googleplus_url')); ?>\" size=\"50\" />\n </p>\n\n <p>Pinterest URL:<br />\n <input type=\"text\" name=\"<?php echo GENESIS_SETTINGS_FIELD; ?>[pinterest_url]\" value=\"<?php echo esc_attr(genesis_get_option('pinterest_url')); ?>\" size=\"50\" />\n </p>\n\n <p>LinkedIn URL:<br />\n <input type=\"text\" name=\"<?php echo GENESIS_SETTINGS_FIELD; ?>[linkedin_url]\" value=\"<?php echo esc_attr(genesis_get_option('linkedin_url')); ?>\" size=\"50\" />\n </p>\n\n <p>YouTube Channel URL:<br />\n <input type=\"text\" name=\"<?php echo GENESIS_SETTINGS_FIELD; ?>[youtube_url]\" value=\"<?php echo esc_attr(genesis_get_option('youtube_url')); ?>\" size=\"50\" />\n </p>\n\n <p>Address:<br />\n <input type=\"text\" name=\"<?php echo GENESIS_SETTINGS_FIELD; ?>[agent_address]\" value=\"<?php echo esc_attr(genesis_get_option('agent_address')); ?>\" size=\"50\" />\n </p>\n\n <p>Phone:<br />\n <input type=\"text\" name=\"<?php echo GENESIS_SETTINGS_FIELD; ?>[agent_phone]\" value=\"<?php echo esc_attr(genesis_get_option('agent_phone')); ?>\" size=\"50\" />\n </p>\n\n <p>Email:<br />\n <input type=\"text\" name=\"<?php echo GENESIS_SETTINGS_FIELD; ?>[agent_email]\" value=\"<?php echo esc_attr(genesis_get_option('agent_email')); ?>\" size=\"50\" />\n </p>\n <?php\n }", "function all_settings_link() {\nadd_options_page(__('All Settings'), __('All Settings'), 'administrator', 'options.php');\n}", "public function getShareOptions()\n {\n return $this->shareOptions;\n }", "public function getShareOptions()\n {\n return $this->shareOptions;\n }", "public function wptsv2_social_front() {\n $wpts_social_fb = esc_url( genesis_get_option('wpts-fb', 'wpts-theme-settings') );\n $wpts_social_tw = esc_url( genesis_get_option('wpts-tw', 'wpts-theme-settings') );\n $wpts_social_li = esc_url( genesis_get_option('wpts-li', 'wpts-theme-settings') );\n $wpts_social_yt = esc_url( genesis_get_option('wpts-yt', 'wpts-theme-settings') );\n $wpts_social_gp = esc_url( genesis_get_option('wpts-gp', 'wpts-theme-settings') );\n\n if ( !empty($wpts_social_fb) || !empty($wpts_social_tw) || !empty($wpts_social_li) || !empty($wpts_social_yt) || !empty($wpts_social_gp) ) {\n echo '<div class=\"wpts-social-content\"><ul>';\n\n if ( !empty($wpts_social_fb) ) :\n echo '<li><a href=\"'.$wpts_social_fb.'\" title=\"Facebook\" target=\"_blank\"><span class=\"icon-facebook\"></span></a></li>';\n endif;\n\n if ( !empty($wpts_social_tw) ) :\n echo '<li><a href=\"'.$wpts_social_tw.'\" title=\"Twitter\" target=\"_blank\"><span class=\"icon-twitter\"></span></a></li>';\n endif;\n\n if ( !empty($wpts_social_li) ) :\n echo '<li><a href=\"'.$wpts_social_li.'\" title=\"Linkedin\" target=\"_blank\"><span class=\"icon-linkedin\"></span></a></li>';\n endif;\n\n if ( !empty($wpts_social_yt) ) :\n echo '<li><a href=\"'.$wpts_social_yt.'\" title=\"Youtube\" target=\"_blank\"><span class=\"icon-youtube\"></span></a></li>';\n endif;\n\n if ( !empty($wpts_social_gp) ) :\n echo '<li><a href=\"'.$wpts_social_gp.'\" title=\"Google+\" target=\"_blank\"><span class=\"icon-gplus\"></span></a></li>';\n endif;\n\n echo '</ul></div>';\n }\n else {\n printf('<div class=\"wpts-social-content\"><p><em>No data to display. Make sure you added your social media url on <a href=\"%s\">Genesis > WPTS Theme Setting</a> page.</em></p></div>', esc_url( home_url( '/wp-admin/admin.php?page=wpts_theme_settings' ) ) );\n }\n }", "function get_wpa_share_option( $key, $default ){\n global $wpa_share;\n return $wpa_share->get_setting( $key, $default );\n }", "function all_settings_link() {\n\tadd_options_page(__('All Settings'), __('All Settings'), 'administrator', 'options.php');\n}", "private function get_url()\n {\n switch (get_option('hb_sharegroop_mode')) {\n case 'test':\n return 'https://widget.sandbox.sharegroop.com/widget.js';\n case 'live':\n return 'https://widget.sharegroop.com/widget.js';\n }\n }", "function sharethefacts_oembed_provider() {\n\nwp_oembed_add_provider( 'https://*.sharethefacts.co/*', 'http://www.sharethefacts.co/services/oembed', false );\n\n}", "function carr_share_links() {\n\tglobal $post;\n\n\t$permalink = get_the_permalink( $post->ID );\n\t$title = get_the_title( $post->title );\n\t?>\n\n\t<div class=\"border-block top social-share\">\n\t\t<h3 class=\"block-label\">Share</h3>\n\t\t<ul>\n\t\t\t<li><a href=\"https://twitter.com/share?url=<?php echo $permalink; ?>&text=<?php echo $title; ?>\" class=\"social-icon icon-twitter\"><span class=\"hide-text\">Twitter</span></a></li>\n\t\t\t<li><a href=\"http://www.linkedin.com/shareArticle?mini=true&url=<?php echo $permalink; ?>&title=<?php echo $title; ?>&source=carrmcclellan.com\" class=\"social-icon icon-linkedin\"><span class=\"hide-text\">Linkedin</span></a></li>\n\t\t\t<li><a href=\"http://www.facebook.com/share.php?u=<?php echo $permalink; ?>&title=<?php echo $title; ?>\" class=\"social-icon icon-facebook\"><span class=\"hide-text\">Facebook</span></a></li>\n\t\t</ul>\n\t</div>\n\n\t<?php\n}", "function carawebs_social_sharing(){\n?>\n<div id=\"social_links\">\n\t<p>Share this article:</p>\n\t<ul id=\"social_share_icons\" class=\"menu\">\n\t\t\t<li><a class=\"email_share\" href=\"mailto:?subject=I thought you might like this web page&body=Check out this site: <?php echo urlencode(get_permalink());?>\">Email</a></li>\n\t\t\t<li><a class=\"linkedin_share\" href=\"http://www.linkedin.com/shareArticle?mini=true&url=<?php echo urlencode(get_permalink());?>\">LinkedIn</a></li>\n\t\t\t<li><a class=\"twitter_share\" href=\"https://twitter.com/intent/tweet?url=<?php echo urlencode(get_permalink());?>&text=<?php echo get_the_title(); ?>\">Twitter</a></li>\n\n\t</ul>\n</div>\n\t<?php\n}", "public function show_general_settings_page() {\n\t\t$opts = mc4wp_get_options('general');\n\n\t\t$connected = mc4wp_get_api()->is_connected();\n\t\t$lists = $this->get_mailchimp_lists();\n\n\t\tif ( ! $connected ) {\n\t\t\tadd_settings_error( \"mc4wp\", \"invalid-api-key\", printf( __( 'Please make sure the plugin is connected to MailChimp. <a href=\"%s\">Provide a valid API key.</a>', 'mailchimp-for-wp' ), admin_url( '?page=mc4wp-pro' ) ), 'updated' );\n\t\t}\n\n\t\trequire MC4WP_PLUGIN_DIR . 'includes/views/pages/admin-general-settings.php';\n\t}", "public function field_share_media_cb() {\n\t\t$value = $this->options['msm_do_share_media'];\n\t\tprintf(\n\t\t\t'<input type=\"checkbox\" id=\"msm_do_share_media\" name=\"msm_sharing_settings[msm_do_share_media]\" value=\"yes\" %s />',\n\t\t\tnull !== $value && $value === 'yes' ? 'checked' : ''\n\t\t);\n\t\techo '<label for=\"msm_do_share_media\">' . __( 'Share media across network', 'multisite-shared-media' ) . '</label>';\n\t}", "public function Base_GetAppSettingsMenuItems_Handler($Sender) {\n $Menu = $Sender->EventArguments['SideMenu'];\n $Menu->AddLink('Add-ons', T('ShareThis'), 'plugin/sharethis', 'Garden.Settings.Manage');\n }", "public function share($options = [])\n {\n $title = (isset($options['title'])) ? '<div class=\"share_options_title\">' . $options['title'] . '</div>' : '';\n $content = '';\n foreach ($options['share'] as $share) {\n switch ($share) {\n default:\n $content .= $share;\n break;\n case 'facebook':\n $link = 'http://www.facebook.com/sharer/sharer.php?u=' . urlencode($this->object->url());\n $content .= '<a href=\"' . $link . '\" target=\"_blank\" class=\"share_option share_option_facebook\">\n <i class=\"fa fa-facebook-f\"></i>\n <span>Facebook</span>\n </a>';\n break;\n case 'twitter':\n $link = 'http://www.twitter.com/share?text=' . urlencode($this->object->getBasicInfo()) . '&url=' . urlencode($this->object->url());\n $content .= '<a href=\"' . $link . '\" target=\"_blank\" class=\"share_option share_option_twitter\">\n <i class=\"fa fa-twitter\"></i>\n <span>Twitter</span>\n </a>';\n break;\n case 'linkedin':\n $link = 'https://www.linkedin.com/cws/share?url=' . urlencode($this->object->url());\n $content .= '<a href=\"' . $link . '\" target=\"_blank\" class=\"share_option share_option_linkedin\">\n <i class=\"fa fa-linked-in\"></i>\n <span>LinkedIn</span>\n </a>';\n break;\n case 'print':\n $link = 'javascript:window.print()';\n $content .= '<a href=\"' . $link . '\" class=\"share_option share_option_print\">\n <i class=\"fa fa-print\"></i>\n <span>' . __('print') . '</span>\n </a>';\n break;\n }\n }\n return '<div class=\"share_options\">\n ' . $title . '\n <div class=\"share_options_buttons\">\n ' . $content . '\n </div>\n </div>';\n }" ]
[ "0.73561037", "0.7078744", "0.70711905", "0.7031029", "0.68519884", "0.67144704", "0.65719825", "0.65119606", "0.6500065", "0.6494328", "0.64246744", "0.64135724", "0.63669544", "0.636409", "0.63626355", "0.63561594", "0.6308274", "0.63009757", "0.62957835", "0.6264174", "0.6263807", "0.62465787", "0.6242643", "0.62387", "0.6236917", "0.623045", "0.6228498", "0.621851", "0.6214275", "0.620185", "0.6198925", "0.6198924", "0.6174924", "0.61622715", "0.61335814", "0.6131952", "0.61233467", "0.61233467", "0.6116551", "0.6109292", "0.609747", "0.60791206", "0.6078889", "0.60688096", "0.60678965", "0.60611016", "0.60414517", "0.60333514", "0.6018517", "0.6014196", "0.6013265", "0.600357", "0.600096", "0.5994217", "0.5993885", "0.59819573", "0.5978312", "0.59709847", "0.5970188", "0.596791", "0.5962157", "0.59531957", "0.59430194", "0.5934328", "0.59302604", "0.59260046", "0.5912887", "0.59120494", "0.59115463", "0.59060866", "0.5904493", "0.5902555", "0.5892328", "0.58879393", "0.5880572", "0.58785206", "0.5867993", "0.5866243", "0.5862393", "0.58545965", "0.585157", "0.5849673", "0.58468163", "0.58366627", "0.5836379", "0.58358645", "0.5833687", "0.5822687", "0.5822687", "0.5820347", "0.58194137", "0.5817392", "0.5816996", "0.5816584", "0.581433", "0.5813995", "0.581005", "0.58045095", "0.58036894", "0.5802432" ]
0.78387135
0
Are likes visible in this context? Some of this code was taken and modified from sharing_display() to ensure similar logic and filters apply here, too.
Видны ли лайки в этом контексте? Часть этого кода была взята и изменена из функции sharing_display(), чтобы обеспечить здесь аналогичную логику и фильтры.
function is_likes_visible() { if ( Settings::is_syncing() ) { return false; } global $wp_current_filter; // Used to apply 'sharing_show' filter $post = get_post(); // Never show on feeds or previews if ( is_feed() || is_preview() ) { $enabled = false; // Not a feed or preview, so what is it? } else { if ( in_the_loop() ) { // If in the loop, check if the current post is likeable $enabled = $this->is_post_likeable(); } else { // Otherwise, check and see if likes are enabled sitewide $enabled = $this->is_enabled_sitewide(); } if ( post_password_required() ) $enabled = false; if ( in_array( 'get_the_excerpt', (array) $wp_current_filter ) ) { $enabled = false; } // Sharing Setting Overrides **************************************** // Single post including custom post types if ( is_single() ) { if ( ! $this->is_single_post_enabled( $post->post_type ) ) { $enabled = false; } // Single page } elseif ( is_page() && ! is_front_page() ) { if ( ! $this->is_single_page_enabled() ) { $enabled = false; } // Attachment } elseif ( is_attachment() ) { if ( ! $this->is_attachment_enabled() ) { $enabled = false; } // All other loops } elseif ( ! $this->is_index_enabled() ) { $enabled = false; } } if ( $post instanceof WP_Post ) { // Check that the post is a public, published post. if ( 'attachment' == $post->post_type ) { $post_status = get_post_status( $post->post_parent ); } else { $post_status = $post->post_status; } if ( 'publish' != $post_status ) { $enabled = false; } } // Run through the sharing filters /** This filter is documented in modules/sharedaddy/sharing-service.php */ $enabled = apply_filters( 'sharing_show', $enabled, $post ); /** * Filters whether the Likes should be visible or not. * Allows overwriting the options set in Settings > Sharing. * * @module likes * * @since 2.2.0 * * @param bool $enabled Should the Likes be visible? */ return (bool) apply_filters( 'wpl_is_likes_visible', $enabled ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function canLike()\n\t{\n\t\tglobal $registry;\n\t\t\n\t\t$result = true;\n\t\t\n\t\tif($this->type == self::TYPE_FOLLOW_ADD || $this->type == self::TYPE_GROUP_JOIN || $this->type == self::TYPE_PROFILE_EDIT)\n\t\t{\n\t\t\t$result = false;\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "public function isLiked()\n {\n return !!$this->likes->where('user_id', auth()->id())->count();\n }", "public function isLiked()\n {\n if (isset($this->pageData['liked']) && $this->pageData['liked'] == 'true') {\n return true;\n }\n return false;\n }", "function likes()\n {\n $sqlLikeList = \"select activity.id as activity_id, film_id, user_id, title, avatar from \" . DEFAULT_SCHEMA . \".activity activity \n inner join \" . DEFAULT_SCHEMA . \".films films on activity.film_id = films.id\n inner join \" . DEFAULT_SCHEMA . \".users users on activity.user_id = users.id\n where users.id = \" . $this->getUserId() . \" and activity.name = 'like'\n order by activity.updated_at\";\n $likeList = $this->Profile->custom($sqlLikeList);\n $this->set('likelist', $likeList);\n }", "public function isLiked()\n\t{\n\t\treturn !! $this->likes()\n\t\t\t->where('user_id', Auth::id())\n\t\t\t->count();\n\t}", "public function get_myLikes() {\r\n try {\r\n $me = $this->facebook->api('/me/likes?access_token=' . $this->facebook->getAccessToken());\r\n return $me;\r\n } catch (FacebookApiException $e) {\r\n $e;\r\n return false;\r\n }\r\n }", "function wpsc_show_fb_like(){\n\tif('on' == get_option('wpsc_facebook_like'))\n\t\treturn true;\n\telse\n\t\treturn false;\n}", "public function isLikedBy(){\n $user = auth()->user();\n return (bool) $user->likes\n ->where('recipe_id', $this->id)\n ->where('liked', true)\n ->count();\n }", "function isLiked(int $podcastId, int $userId) {\n if(\\App\\Like::where('podcast_id', $podcastId)->where('user_id', $userId)->count() > 0) {\n return true;\n } else {\n return false;\n }\n}", "function checks_if_connected_user_liked_a_post($micropost_id){\n\t\tglobal $bdd;\n\t\t$q = $bdd->prepare(\"SELECT id FROM micropost_likes WHERE micropost_id =? AND user_id=?\");\n\t\t$q->execute([\n\t\t\t$micropost_id,\n\t\t\tget_session('id')\n\t\t]);\n\t\t$countr = $q->rowCount();\n\t\t$q->closeCursor();\n\t\treturn (bool) $countr;\n\t}", "public function viewlikeAction() {\n // Collect params\n $action_id = $this->_getParam('action_id');\n $isShare = $this->_getParam('isShare');\n $viewer = Engine_Api::_()->user()->getViewer();\n $action = Engine_Api::_()->getDbtable('actions', 'advancedactivity')->getActionById($action_id);\n\n\n // Redirect if not json context\n if (null === $this->_getParam('format', null)) {\n $this->_helper->redirector->gotoRoute(array(), 'default', true);\n } else if ('json' === $this->_getParam('format', null)) {\n $helper = 'advancedActivity';\n if (!empty($isShare)) {\n $helper = 'advancedActivityShare';\n }\n $this->view->body = $this->view->$helper($action, array('viewAllLikes' => true, 'noList' => $this->_getParam('nolist', false), 'feedSettings' => $this->_getParam('feedSettings', array())));\n }\n }", "public function likes()\n {\n return $this->likesAndDislikes()->where('type_id', LikeType::LIKE);\n }", "public function likes(){\n }", "public function like()\n\t{\n\t}", "function just_liked_by_user($micropost_id){\n\t\tglobal $bdd;\n\t\t$q = $bdd->prepare('SELECT id FROM micropost_likes \n\t\t\t\t\t\tWHERE user_id =:user_id AND micropost_id=:micropost_id'\n\t\t);\n\n\t\t$q->execute([\n\t\t'user_id' => get_session('id'),\n\t\t'micropost_id' => $micropost_id\n\n\t\t]);\n\t\treturn (bool) $q->rowCount();\n\t}", "function like( SocialUser $oUser, SocialPost $oSocialPost );", "public function show(Like $like)\n {\n //\n }", "public function show(Like $like)\n {\n //\n }", "public function show(Like $like)\n {\n //\n }", "public function show(Like $like)\n {\n //\n }", "public function show(Like $like)\n {\n //\n }", "public function getSocialLikes()\n {\n return $this->social_likes;\n }", "function isLike($postID, $memberEmail, $client)\n{\n\t\n\t$colPL = $client->FacebookMongo->PostLikes;\n\t$isLiked = $colPL->count(['postID' => (string)$postID, 'memberEmail'=> (string)$memberEmail ]);\n\treturn $isLiked ;\n}", "function is_liked(mysqli $link, int $post_id, int $current_user_id)\n{\n $sql = \"SELECT likes.*\n FROM likes\n WHERE likes.post_id = ? AND likes.user_id = ?\";\n $stmt = db_get_prepare_stmt($link, $sql, [$post_id, $current_user_id]);\n mysqli_stmt_execute($stmt);\n $result = mysqli_stmt_get_result($stmt);\n if (!$result) {\n exit ('error'.mysqli_error($link));\n }\n\n return mysqli_fetch_all($result) ? true : false;\n}", "public function facebookAddLike()\n {\n $facebook = $this->_getFacebookObject();\n if ($facebook->streams->addLike($this->vars->post_id)) {\n $fql = 'SELECT post_id, likes FROM stream WHERE post_id=\"' . $this->vars->post_id . '\"';\n try {\n $post = $facebook->fql->run($fql);\n } catch (Horde_Service_Facebook_Exception $e) {\n // Already set the like by the time we are here, so just indicate\n // that.\n return _(\"You like this\");\n }\n\n $post = current($post);\n $likes = $post['likes'];\n if ($likes['count'] > 1) {\n $html = sprintf(ngettext(\"You and %d other person likes this\", \"You and %d other people like this\", $likes['count'] - 1), $likes['count'] - 1);\n } else {\n $html = _(\"You like this\");\n }\n return $html;\n }\n\n return _(\"Unable to set like.\");\n }", "static function show_likes($id_post){\n if(!is_int($id_post))\n return false;\n return self::$PDO->query(\"SELECT t1.*,concat(t2.fname,' ',t2.name) as liker_name FROM \".self::$prefix.\"liked_post t1,\".self::$prefix.\"users t2 WHERE t1.ID_USER=t2.ID AND ID_POST=\".$id_post)->fetchAll();\n }", "public function getIsVisible();", "public function getLikes()\n\t{\n\t\treturn $this->likes;\n\t}", "function AlreadyLiked( $post_id ) {\n\tif ( is_user_logged_in() ) {\n\t\t$user_id \t = get_current_user_id();\n\t\t$meta_USERS = get_post_meta( $post_id, \"_user_liked\" );\n\t\t$liked_USERS = \"\";\n\t\t\n\t\tif ( count( $meta_USERS ) != 0 ) {\n\t\t\t$liked_USERS = $meta_USERS[0];\n\t\t}\n\t\t\n\t\tif( ! is_array( $liked_USERS ) ){\n\t\t\t$liked_USERS = array();\n\t\t}\n\t\t\t\n\t\tif ( in_array( get_current_user_id(), $liked_USERS ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t\t\n\t} else {\n\t\n\t\t$meta_IPS = get_post_meta( $post_id, \"_user_IP\" );\n\t\t$ip \t = $_SERVER[\"REMOTE_ADDR\"];\n\t\t$liked_IPS = \"\";\n\t\t\n\t\tif ( count( $meta_IPS ) != 0 ) {\n\t\t\t$liked_IPS = $meta_IPS[0];\n\t\t}\n\t\t\n\t\tif ( ! is_array( $liked_IPS ) ) {\n\t\t\t$liked_IPS = array();\n\t\t}\n\t\t\n\t\tif ( in_array( $ip, $liked_IPS ) ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\t\n}", "function socialwiki_liked($uid, $pid) {\n global $DB;\n $sql = 'SELECT *\n FROM {socialwiki_likes}\n WHERE userid=? AND pageid=?';\n return $DB->record_exists_sql($sql, array($uid, $pid));\n}", "function isViewable()\n {\n \n if (sfContext::getInstance()->getUser()->hasCredential(\"viewallcontent\"))\n { \r\n \tsfContext::getInstance()->getLogger()->info(\"You have the fu, you can see me.\");\n \treturn true;\n } \n\n // Access to approved artork is for anyone\n if ($this->isApproved()) \n {\n sfContext::getInstance()->getLogger()->info(\"This artwork is approved, so it is viewable\");\n \treturn true;\n }\n\n // Access to removed artwork is only for admin (returned true above)\n if ($this->isRemoved())\n {\n sfContext::getInstance()->getLogger()->info(\"This artwork is removed, and cannot be seen\");\n \treturn false;\n }\n \n // also allow access to owner of artwork - unless they have removed it\n if (sfContext::getInstance()->getUser()->isAuthenticated()\n && $this->getUserId() == sfContext::getInstance()->getUser()->getGuardUser()->getId())\n {\n sfContext::getInstance()->getLogger()->info(\"You can see this artwork since you are the owner\");\n \treturn true;\n }\n\n sfContext::getInstance()->getLogger()->info(\"This artwork is not approved, and cannot be seen\");\n return false;\n }", "public function getIsVisibleInAdvancedSearch();", "public function likesitereviewAction() {\r\n\r\n //GET SETTINGS\r\n $like_user_str = 0;\r\n $this->view->resource_type = $resource_type = $this->_getParam('resource_type');\r\n $this->view->resource_id = $resource_id = $this->_getParam('resource_id');\r\n $this->view->call_status = $call_status = $this->_getParam('call_status');\r\n $this->view->page = $page = $this->_getParam('page', 1);\r\n $search = $this->_getParam('search', '');\r\n $this->view->is_ajax = $is_ajax = $this->_getParam('is_ajax', 0);\r\n $viewer_id = Engine_Api::_()->user()->getViewer()->getIdentity();\r\n\r\n $this->view->search = $search;\r\n if (empty($search)) {\r\n $this->view->search = $this->view->translate('Search Members');\r\n }\r\n\r\n if ($call_status == 'friend') {\r\n\r\n //GET CORE LIKE TABLE\r\n $sub_status_table = Engine_Api::_()->getItemTable('core_like');\r\n $sub_status_name = $sub_status_table->info('name');\r\n\r\n //GET MEMBERSHIP TABLE\r\n $membership_table = Engine_Api::_()->getDbtable('membership', 'user');\r\n $member_name = $membership_table->info('name');\r\n\r\n //GET USER TABLE\r\n $user_table = Engine_Api::_()->getItemTable('user');\r\n $user_Name = $user_table->info('name');\r\n\r\n //MAKE QUERY\r\n $sub_status_select = $user_table->select()\r\n ->setIntegrityCheck(false)\r\n ->from($sub_status_name, array('poster_id'))\r\n ->joinInner($member_name, \"$member_name . user_id = $sub_status_name . poster_id\", NULL)\r\n ->joinInner($user_Name, \"$user_Name . user_id = $member_name . user_id\")\r\n ->where($member_name . '.resource_id = ?', $viewer_id)\r\n ->where($member_name . '.active = ?', 1)\r\n ->where($sub_status_name . '.resource_type = ?', $resource_type)\r\n ->where($sub_status_name . '.resource_id = ?', $resource_id)\r\n ->where($sub_status_name . '.poster_id != ?', $viewer_id)\r\n ->where($sub_status_name . '.poster_id != ?', 0)\r\n ->where($user_Name . '.displayname LIKE ?', '%' . $search . '%')\r\n ->order('\tlike_id DESC');\r\n } else if ($call_status == 'public') {\r\n\r\n //GET CORE LIKE TABLE\r\n $sub_status_table = Engine_Api::_()->getItemTable('core_like');\r\n $sub_status_name = $sub_status_table->info('name');\r\n\r\n //GET USER TABLE\r\n $user_table = Engine_Api::_()->getItemTable('user');\r\n $user_Name = $user_table->info('name');\r\n\r\n //MAKE QUERY\r\n $sub_status_select = $user_table->select()\r\n ->setIntegrityCheck(false)\r\n ->from($sub_status_name, array('poster_id'))\r\n ->joinInner($user_Name, \"$user_Name . user_id = $sub_status_name . poster_id\")\r\n ->where($sub_status_name . '.resource_type = ?', $resource_type)\r\n ->where($sub_status_name . '.resource_id = ?', $resource_id)\r\n ->where($sub_status_name . '.poster_id != ?', 0)\r\n ->where($user_Name . '.displayname LIKE ?', '%' . $search . '%')\r\n ->order($sub_status_name . '.like_id DESC');\r\n }\r\n\r\n $fetch_sub = Zend_Paginator::factory($sub_status_select);\r\n $fetch_sub->setCurrentPageNumber($page);\r\n $fetch_sub->setItemCountPerPage(10);\r\n $check_object_result = $fetch_sub->getTotalItemCount();\r\n\r\n $this->view->user_obj = array();\r\n if (!empty($check_object_result)) {\r\n $this->view->user_obj = $fetch_sub;\r\n } else {\r\n $this->view->no_result_msg = $this->view->translate('No results were found.');\r\n }\r\n\r\n //TOTAL LIKE FOR THIS CONTENT\r\n $this->view->public_count = Engine_Api::_()->sitereview()->number_of_like('sitereview_listing', $resource_id);\r\n\r\n //NUMBER OF FRIENDS LIKE THIS CONTENT\r\n $this->view->friend_count = Engine_Api::_()->sitereview()->friend_number_of_like($resource_type, $resource_id);\r\n\r\n //GET LIKE TITLE\r\n if ($resource_type == 'member') {\r\n $this->view->like_title = Engine_Api::_()->getItem('user', $resource_id)->displayname;\r\n } else {\r\n $this->view->like_title = Engine_Api::_()->getItem($resource_type, $resource_id)->title;\r\n }\r\n }", "public function getLikes()\n {\n return $this->likes;\n }", "public function getLikes()\n {\n return $this->likes;\n }", "protected function setLikes()\n {\n $this->likes = $this->db()->query(\"SELECT id FROM likes WHERE contentId = ?\", array($this->id))->getRowCount();\n }", "function ShareLike()\n {\n SeanceHelper::ShareLike($this->Core, Request::GetPost(\"seanceId\"));\n }", "function userLiked($post_id)\r\n{\r\n global $conn;\r\n global $user_id;\r\n //$sql = \"SELECT * FROM rating_info WHERE UserID=$user_id AND PostIdx = $post_id AND rating_action='like'\";\r\n $result = mysqli_query($conn, \"SELECT * FROM rating_info WHERE UserID='$user_id' AND PostIdx = $post_id AND rating_action='like'\");\r\n if (mysqli_num_rows($result) > 0) {\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n}", "function socialwiki_is_user_favourite($uid, $pid, $swid) {\n global $DB;\n $page = socialwiki_get_page($pid);\n $sql = 'SELECT pageid\n FROM {socialwiki_likes} l\n INNER JOIN {socialwiki_pages} p\n ON l.pageid=p.id\n WHERE l.userid=? and p.title=? and l.subwikiid=?\n ORDER BY p.timecreated DESC';\n $out = $DB->get_record_sql($sql, array($uid, $page->title, $swid), IGNORE_MULTIPLE);\n if (isset($out->pageid)) {\n return ($out->pageid == $pid);\n }\n return false;\n}", "public function checkProductLike()\n {\n if(auth()->user()) $userId = auth()->id();\n else $userId = User::setMemberCookies();\n $redis = Redis::connection();\n return $redis->sismember(\"product:{$this->id}:likes\", $userId);\n }", "public function globallikesAction() {\r\n\r\n //CHECK USER VALIDATION\r\n if (!$this->_helper->requireUser()->isValid())\r\n return;\r\n\r\n //GET VIEWER\r\n $viewer = Engine_Api::_()->user()->getViewer();\r\n $viewer_id = $viewer->getIdentity();\r\n\r\n //GET THE VALUE OF RESOURCE ID AND TYPE \r\n $resource_id = $this->_getParam('resource_id');\r\n $resource_type = $this->_getParam('resource_type');\r\n $like_id = $this->_getParam('like_id');\r\n $status = $this->_getParam('smoothbox', 1);\r\n $this->view->status = true;\r\n\r\n //GET LIKE TABLE\r\n $likeTable = Engine_Api::_()->getDbTable('likes', 'core');\r\n $like_name = $likeTable->info('name');\r\n\r\n //GET OBJECT\r\n $resource = Engine_Api::_()->getItem($resource_type, $resource_id);\r\n if (empty($like_id)) {\r\n\r\n //CHECKING IF USER HAS MAKING DUPLICATE ENTRY OF LIKING AN APPLICATION.\r\n $like_id_temp = Engine_Api::_()->sitereview()->check_availability($resource_type, $resource_id);\r\n if (empty($like_id_temp)) {\r\n\r\n if (!empty($resource)) {\r\n $like_id = $likeTable->addLike($resource, $viewer);\r\n if (Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitelike'))\r\n Engine_Api::_()->sitelike()->setLikeFeed($viewer, $resource);\r\n }\r\n\r\n $notify_table = Engine_Api::_()->getDbtable('notifications', 'activity');\r\n $db = $likeTable->getAdapter();\r\n $db->beginTransaction();\r\n try {\r\n\r\n //CREATE THE NEW ROW IN TABLE\r\n if ($resource->owner_id != $viewer_id) {\r\n $notifyData = $notify_table->createRow();\r\n $notifyData->user_id = $resource->owner_id;\r\n $notifyData->subject_type = $viewer->getType();\r\n $notifyData->subject_id = $viewer->getIdentity();\r\n $notifyData->object_type = $resource_type;\r\n $notifyData->object_id = $resource_id;\r\n $notifyData->type = 'liked';\r\n $notifyData->params = $resource->getShortType();\r\n $notifyData->date = date('Y-m-d h:i:s', time());\r\n $notifyData->save();\r\n }\r\n $this->view->like_id = $like_id;\r\n $db->commit();\r\n } catch (Exception $e) {\r\n $db->rollBack();\r\n throw $e;\r\n }\r\n $like_msg = $this->view->translate('Successfully Liked.');\r\n }\r\n } else {\r\n if (!empty($resource)) {\r\n $likeTable->removeLike($resource, $viewer);\r\n if (Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitelike'))\r\n Engine_Api::_()->sitelike()->removeLikeFeed($viewer, $resource);\r\n }\r\n $like_msg = $this->view->translate('Successfully Unliked.');\r\n }\r\n\r\n if (empty($status)) {\r\n $this->_forwardCustom('success', 'utility', 'core', array(\r\n 'smoothboxClose' => true,\r\n 'parentRefresh' => true,\r\n 'messages' => array($like_msg))\r\n );\r\n }\r\n }", "function socialwiki_page_likes($pid) {\n global $DB;\n $sql = 'SELECT *\n FROM {socialwiki_likes}\n WHERE pageid=?';\n return $DB->record_exists_sql($sql, array($pid));\n}", "public function likedByUser()\n {\n return $this->likes()->where('username', request('username'))->where('like',1);\n }", "function isLiked($status_id, $prof_id)\n {\n $query = \"SELECT * FROM likes WHERE (prof_id = $prof_id AND status_id = $status_id)\";\n $result = mysqli_query($this->link, $query);\n $numResults = mysqli_num_rows($result);\n return ($numResults == 2);\n }", "function userLiked($post_id)\n{\n global $conn;\n global $username;\n $sql = \"SELECT * FROM rating_info WHERE username= '$username' \n \t\t AND post_id=$post_id AND rating_action='like'\";\n $result = mysqli_query($conn, $sql);\n if (mysqli_num_rows($result) > 0) {\n return true;\n }else{\n return false;\n }\n}", "public function getLikes()\n {\n $model = new Like();\n\n $likes = $model->findBy(['comment_id' => $this->id]);\n\n return count($likes);\n\n }", "public function likeAction() {\n // Validate request methods\n $this->validateRequestMethod();\n\n $viewer = Engine_Api::_()->user()->getViewer();\n\n if (Engine_Api::_()->core()->hasSubject('sitepagevideo_video')) {\n $subject = $video = Engine_Api::_()->core()->getSubject('sitepagevideo_video');\n $sitepage = $video->getParent();\n }\n\n if (!$video || !$sitepage)\n $this->respondWithError(\"no_record\");\n\n if (!$this->_helper->requireUser()->isValid()) {\n $this->respondWithError('unauthorized');\n }\n\n if (!$this->_helper->requireAuth()->setAuthParams(null, null, 'comment')->isValid()) {\n $this->respondWithError('unauthorized');\n }\n\n $commentedItem = $subject;\n $likeTable = Engine_Api::_()->getDbtable('likes', 'core');\n if ($likeTable->isLike($subject, $viewer))\n $this->successResponseNoContent('no_content', true);\n\n // Process\n $db = $commentedItem->likes()->getAdapter();\n $db->beginTransaction();\n try {\n $commentedItem->likes()->addLike($viewer);\n // Add notification\n $owner = $commentedItem->getOwner();\n $this->view->owner = $owner->getGuid();\n if ($owner->getType() == 'user' && $owner->getIdentity() != $viewer->getIdentity()) {\n $notifyApi = Engine_Api::_()->getDbtable('notifications', 'activity');\n $notifyApi->addNotification($owner, $viewer, $commentedItem, 'liked', array(\n 'label' => $commentedItem->getShortType()\n ));\n }\n\n $sitepageVersion = Engine_Api::_()->getDbtable('modules', 'core')->getModule('sitepage')->version;\n if ($sitepageVersion >= '4.2.9p3') {\n if (Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitepagemember'))\n Engine_Api::_()->sitepagemember()->joinLeave($subject, 'Join');\n Engine_Api::_()->sitepage()->itemCommentLike($subject, 'sitepage_contentlike', '');\n }\n $db->commit();\n $this->successResponseNoContent('no_content', true);\n } catch (Exception $ex) {\n $db->rollBack();\n $this->respondWithValidationError('internal_server_error', $ex->getMessage());\n }\n }", "public function isVisible();", "public function isVisible();", "public function isVisible();", "public function get_likes($network);", "function plugin_like() {\n\t\t\t/*\n\t\t\t$content = '<p>'.__('Why not do any or all of the following:','schemaplugin').'</p>';\n\t\t\t$content .= '<ul>';\n\t\t\t$content .= '<li><a href=\"'.$this->homepage.'\">'.__('Link to it so other folks can find out about it.','schemaplugin').'</a></li>';\n\t\t\t$content .= '<li><a href=\"http://wordpress.org/extend/plugins/'.$this->hook.'/\">'.__('Give it a good rating on WordPress.org.','schemaplugin').'</a></li>';\n\t\t\t$content .= '<li><a href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=2017947\">'.__('Donate a token of your appreciation.','schemaplugin').'</a></li>';\n\t\t\t$content .= '</ul>';\n\t\t\t$this->postbox($this->hook.'like', 'Like this plugin?', $content);\n\t\t\t*/\n\t\t}", "public function is_visible()\n {\n }", "public function is_visible()\n {\n }", "function userLikedThisPost($post_id=''){\n $result = query(\"SELECT * FROM likes WHERE user_id = \".loggedInUserId().\" AND post_id = {$post_id}\");\n return mysqli_num_rows($result) >= 1 ? true : false;\n}", "public function isVisible()\n {\n return Session::get_user_id() != 0;\n }", "private static function alreadyLiked ($post_id)\n {\n\n if (is_user_logged_in()) { // user is logged in\n $user_id = get_current_user_id(); // current user\n $meta_USERS = get_post_meta($post_id, \"_user_liked\"); // user ids from post meta\n $liked_USERS = \"\"; // set up array variable\n\n if (count($meta_USERS) != 0) // meta exists, set up values\n $liked_USERS = $meta_USERS[0];\n\n if (!is_array($liked_USERS)) // make array just in case\n $liked_USERS = array();\n\n if (in_array($user_id, $liked_USERS)) // True if User ID in array\n return true;\n\n return false;\n } else { // user is anonymous, use IP address for voting\n $meta_IPS = get_post_meta($post_id, \"_user_IP\"); // get previously voted IP address\n $ip = $_SERVER[\"REMOTE_ADDR\"]; // Retrieve current user IP\n $liked_IPS = \"\"; // set up array variable\n\n if (count($meta_IPS) != 0) // meta exists, set up values\n $liked_IPS = $meta_IPS[0];\n\n if (!is_array($liked_IPS)) // make array just in case\n $liked_IPS = array();\n\n if (in_array($ip, $liked_IPS)) // True is IP in array\n return true;\n\n return false;\n }\n }", "public function isLikedBy(User $user)\n {\n return (bool) $user->likes->where('tweet_id', $this->id)->where('liked', true)->count(); //must switch to redis for high volume\n }", "public function actionLike()\n {\n $cmtId = Yii::app()->request->getParam('id');\n $userId = Yii::app()->user->idUser;\n $isLiked = Likes::model()->checkLiked($userId, $cmtId);\n $content = '';\n $arrayUserInvited = [];\n $notifyId = null;\n $idSession = 0;\n if (!$isLiked) {\n try {\n\n // Like\n $model = new Likes;\n $model->idUserLike = $userId;\n $model->idComment = $cmtId;\n $count = Likes::model()->count();\n\n while (Likes::model()->findByPk((int)$count) !== null) {\n $count++;\n };\n $model->idLike = $count;\n $model->save();\n\n // Get Comment data\n $comment = Comments::model()->findByPk($cmtId);\n $idSession = $comment->idSession;\n if ($comment->contentMediaType == 'TEXT') {\n $content = ' liked a comment: ' . $comment->content;\n }\n if ($comment->contentMediaType == 'PICTURE') {\n $content = ' liked a picture comment';\n }\n if ($comment->contentMediaType == 'VIDEO') {\n $content = ' liked a video comment';\n }\n\n //Add Notify\n $notify = new Notify();\n $notify->createUserId = $userId;\n $notify->dateCreate = date(\"Y-m-d H:i:s\");\n $notify->typeNotify = 'LIKE';\n $notify->content = $content;\n $notify->link = (int)$cmtId;\n $notify->seconds = time();\n $notify->save();\n $notifyId = $notify->notifyId;\n //End add notify\n\n // Add Notify User\n $dataIdUser = InvitedSession::model()->getIdUserCreateAndInvitedUser($idSession);\n $arrayUserInvited = $this->arrayColumn($dataIdUser, 'idUser');\n foreach ($dataIdUser as $rowInvited) {\n if ($rowInvited['idUser'] != $userId) {\n $notifyUser = new NotifyUser();\n $notifyUser->userId = (int)$rowInvited['idUser'];\n $notifyUser->notifyId = (int)$notify->notifyId;\n $notifyUser->dateRead = date(\"Y-m-d H:i:s\");\n $notifyUser->idLink = 'LIKE' . (int)$comment->idComment;\n $notifyUser->save();\n }\n }\n // # Add Notify User\n\n } catch (Exception $e) {\n echo $e->getMessage();\n exit;\n }\n } else {\n Likes::model()->deleteAllByAttributes(array(\"idUserLike\" => $userId, \"idComment\" => $cmtId));\n }\n\n $result = array(\n 'avaPath' => Yii::app()->user->avatarPath,\n 'content' => $content,\n 'invitedUser' => $arrayUserInvited,\n 'fullNameOfCreator' => Yii::app()->user->firstName . ' ' . Yii::app()->user->lastName,\n 'ownerId' => Yii::app()->user->idUser,\n 'gender' => (Yii::app()->user->gender == 1) ? \"his\" : \"her\",\n 'time' => time(),\n 'type' => 'like',\n 'notifyId' => $notifyId,\n\n 'countLike' => Likes::model()->countByAttributes(array(\"idComment\" => $cmtId)),\n 'likeText' => $isLiked ? \"Like\" : \"Unlike\",\n 'idSession' => $idSession,\n 'idComment' => $cmtId,\n 'redirect' => 'observation/detail/id/' . $idSession . \"#commentRow\" . $cmtId\n );\n echo json_encode((object)$result);\n }", "protected function isVisible()\n {\n return true;\n }", "public function isDislikedBy(){\n $user = auth()->user();\n return (bool) $user->likes\n ->where('recipe_id', $this->id)\n ->where('liked', false)\n ->count();\n }", "public function can_see() {\n\t\tglobal $I2_USER;\n\n\t\tif ($I2_USER->is_group_member('admin_polls'))\n\t\t\treturn TRUE;\n\t\tif (!$this->visibility)\n\t\t\treturn FALSE;\n\n\t\t$ugroups = Group::get_user_groups($I2_USER);\n\t\tforeach ($ugroups as $g) {\n\t\t\tif (isset($this->gs[$g->gid]))\n\t\t\t\treturn TRUE;\n\t\t}\n\t\treturn FALSE;\n\t}", "public function likedBy(User $user)\n {\n // return $this->likes()->where('user_id', auth()->id())->exists();\n return $this->likes->contains('user_id', $user->id);\n }", "public function isLiked($user_id = null)\n {\n return $this->likes()->where('user_id', $this->getUserId($user_id))->exists();\n }", "public function add_likes_to_sharing_meta_box_title() {\n\t\treturn __( 'Likes and Shares', 'jetpack' );\n\t}", "function ajan_activity_can_favorite() {\n\t$can_favorite = true;\n\n\treturn apply_filters( 'ajan_activity_can_favorite', $can_favorite );\n}", "function userHasLiked($article_id, $user_id) {\n\t\t$response = $this->_connection->selectAllFromWhere ( \"likes\", \"`article_id`=:article_id and `user_id`=:user_id\", array (\n\t\t\t\t\":article_id\" => $article_id,\n\t\t\t\t\":user_id\" => $user_id \n\t\t) );\n\t\tif ($this->_connection->responseIsEmpty ( $response )) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\t$row = $response->fetch ();\n\t\t\tif ($row ['is_like'] == '0') {\n\t\t\t\treturn \"dislike\";\n\t\t\t} elseif ($row ['is_like'] == '1') {\n\t\t\t\treturn 'like';\n\t\t\t}\n\t\t}\n\t}", "public function likeingOp(){\r\n\t\t$model = Model();\r\n\t\t$like_array = $model->table('circle_like')->field('circle_id,theme_id')->where(array('member_id'=>$this->m_id))->order('theme_id desc')->page(10)->select();\r\n\t\tif(!empty($like_array)){\r\n\t\t\t$theme_list = array_under_reset($like_array, 'theme_id');\r\n\t\t\t$themeid_array = array(); $circleid_array = array();\r\n\t\t\tforeach ($theme_list as $val){\r\n\t\t\t\t$themeid_array[]\t= $val['theme_id'];\r\n\t\t\t\t$circleid_array[]\t= $val['circle_id'];\r\n\t\t\t}\r\n\t\t\t$themeid_array = array_unique($themeid_array);\r\n\t\t\t$circleid_array = array_unique($circleid_array);\r\n\t\t\t// theme\r\n\t\t\t$theme_list = $model->table('circle_theme')->where(array('theme_id'=>array('in', $themeid_array)))->select();\r\n\t\t\t// affix\r\n\t\t\t$affix_list = $model->table('circle_affix')->where(array('affix_type'=>1, 'theme_id'=>array('in', $themeid_array)))->select();\r\n\t\t\t$affix_list = array_under_reset($affix_list, 'theme_id', 2);\r\n\r\n\t\t\tTpl::output('theme_list', $theme_list);\r\n\t\t\tTpl::output('affix_list', $affix_list);\r\n\t\t}\r\n\r\n\t\t$this->profile_menu('theme', 'likeing');\r\n\t\tTpl::showpage('p_center.likeing');\r\n\t}", "public function getUserLikes($fbid, $pageid, $resetCache=false)\n {\n $fql = \"SELECT uid FROM page_fan WHERE page_id=\\\"$pageid\\\" and uid=\\\"$fbid\\\"\";\n $data = $this->_doFQLQuery($fql, $resetCache);\n if ( !is_array($data) )\n {\n return false;\n }\n return true;\n }", "public function fanwirelikesAction() {\r\n $fanwireid = $_REQUEST['fanwireid'];\r\n $like = $_REQUEST['like'];\r\n $dislike = $_REQUEST['dislike'];\r\n $type = $_REQUEST['type'];\r\n $obj = new Users();\r\n\r\n echo $obj->fanwireLikes($fanwireid, $_SESSION['id'], $like, $dislike, $type);\r\n }", "function already_liked($dbh, $me, $pID) {\n\t$me = pg_escape_string($me);\n $pID = pg_escape_string($pID);\n\t$str = \" select * from like_record\n\t\t where name = '$me' AND postid = '$pID'\";\n\t$result = pg_query($dbh, $str);\n\tif( !$result ){\n\t\treturn false;\n\t}\n\t$row = pg_fetch_row($result);\n\t$count = $row[0];\n\tif( !$count ){\n\t\treturn false;\n\t}\t\n\treturn true;\n}", "public function isLikedBy($userId = null): bool\n {\n return app(LikeableServiceContract::class)->isLiked($this, LikeType::LIKE, $userId);\n }", "public function it_can_get_likes_relation()\n {\n $entity = factory(Entity::class)->create();\n\n $entity->likeBy(1);\n\n $this->assertInstanceOf(LikeContract::class, $entity->likes->first());\n $this->assertCount(1, $entity->likes);\n }", "public function hasLikedThisPost($postId = 0, $userId = 0)\n\t {\n\n\t if (isset($this->_post['like_users']) && $this->_post['like_users'] == true)\n\t return true;\n\t else\n\t return false;\n\t }", "public function testUserCanToggleLikeStatusForPost()\n {\n $this->post->toggleLike();\n $this->assertTrue($this->post->isLiked());\n\n $this->post->toggleLike();\n $this->assertFalse($this->post->isLiked());\n }", "public function canLike(IdentityInterface $user, Activity $activity)\n {\n return true;\n }", "function socialwiki_page_like($uid, $pid, $swid) {\n if (socialwiki_liked($uid, $pid)) {\n socialwiki_delete_like($uid, $pid);\n } else {\n socialwiki_add_like($uid, $pid, $swid);\n // TODO: could optimize which peers we recompute: only those who have likes in common.\n }\n socialwiki_peer::socialwiki_update_peers(true, false, $swid, $uid); // Update like similarity to other peers.\n return socialwiki_numlikes($pid);\n}", "public static function isLiked( $ns = '' )\n\t{\n\t\treturn ( isset( self::$likes[$ns] ) );\n\t}", "function userLiked($comment_id)\n {\n global $conn;\n global $user_id;\n $sql = \"SELECT * FROM like_dislike WHERE user_id=$user_id \n AND comment_id=$comment_id AND rating_action='like'\";\n $result = mysqli_query($conn, $sql);\n if (mysqli_num_rows($result) > 0) {\n return true;\n }else{\n return false;\n }\n }", "function userLiked($movie_id){\n global $connect; \n global $userid; \n \n $sql = \"SELECT * FROM rating_info WHERE userid=$userid \n AND movie_id=$movie_id AND rating_action='like'\"; \n \n $result = mysqli_query($connect, $sql); \n \n if(mysqli_num_rows($result) > 0){\n return true; \n }else{\n return false; \n }\n}", "protected function isVisible()\n {\n return parent::isVisible()\n && $this->getAttributesList(true);\n }", "public function makeLike(){\n if(Auth::check())\n if(Auth::user()->role_id == 1 || Auth::user()->role_id == 2)\n return $this->makeALike();\n }", "private function getFacebookLikes()\n {\n $json_string = file_get_contents('http://graph.facebook.com/?ids=' . $this->$url);\n $json = json_decode($json_string, true);\n return intval($json[$this->$url]['shares']);\n }", "function all_business_get_project_likes($template_type = 'page', $show = true) {\r\n\tif ($template_type == 'page') {\r\n\t\t$out = cmsmastersLike(false);\r\n\t} elseif ($template_type == 'post') {\r\n\t\t$cmsmasters_option = all_business_get_global_options();\r\n\t\t\r\n\t\tif ($cmsmasters_option[CMSMASTERS_SHORTNAME . '_portfolio_project_like']) {\r\n\t\t\t$out = '<div class=\"project_details_item\">' . \r\n\t\t\t\t'<div class=\"project_details_item_title\">' . esc_html__('Likes', 'all-business') . ':' . '</div>' . \r\n\t\t\t\t'<div class=\"project_details_item_desc details_item_desc_like\">' . \r\n\t\t\t\t\tcmsmastersLike(false) . \r\n\t\t\t\t'</div>' . \r\n\t\t\t'</div>';\r\n\t\t}\r\n\t}\r\n\t\r\n\t\r\n\tif ($show) {\r\n\t\techo $out;\r\n\t} else {\r\n\t\treturn $out;\r\n\t}\r\n}", "public function getLike()\n{\nreturn $this->like;\n}", "static function discover($post_id) {\n if (logged_in()) {\n $check = new self(array(\"post_id\" => $post_id,\n \"user_id\" => Visitor::current()->id));\n\n if (!$check->no_results)\n $_SESSION[\"likes\"][$post_id] = $check->id;\n }\n\n return isset($_SESSION[\"likes\"][$post_id]);\n }", "function show_likers($micropost_id){\n\t\t$count_likes = get_nbr_likes($micropost_id);\n\t\t$likers = get_likers($micropost_id);\n\t\t$result = '';\n\n\t\tif($count_likes > 0){\n\t\t\t$remaining_likers_count = $count_likes - 3;\n\t\t\t$connected_user_liked = checks_if_connected_user_liked_a_post($micropost_id);\n\t\t\tforeach ($likers as $like){\n\t\t\t\tif(get_session('id') !== $like->id){\n\t\t\t\t\t$result .= '<a style=\"color:black;\" href=\"profile.php?id='.$like->id.'\">'. e($like->pseudo).'</a>, ';\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t$result = $connected_user_liked ? 'Vous, '.$result : $result;\n\t\t\t$result = trim($result, ', ');\n\t\t\tif(($count_likes == 2 || $count_likes == 3) && $result != \"\"){\n\t\t\t\t$tabl = explode(',' , $result);\n\t\t\t\t$last_Item = array_pop($tabl);\n\t\t\t\t$result = implode(',', $tabl);\n\t\t\t\t$result .= ' et ' . $last_Item;\n\t\t\t}\n\t\t\t$result = trim($result, ',');\n\t\t\tswitch ($count_likes) {\n\t\t\t\tcase 1:\n\t\t\t\t\t$result .= $connected_user_liked ?' aimez ce poste.' : ' aime ce poste';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\tcase 3:\n\t\t\t\t\t$result .= $connected_user_liked ? ' aimez ce poste' : 'aiment ce poste';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\t$result .= $connected_user_liked ? \n\t\t\t\t\t' et une autre personne aimez ce poste'\n\t\t\t\t\t: ' et une autre personne aiment ce poste';\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$result .= $connected_user_liked ?\n\t\t\t\t\t' et '.$remaining_likers_count. 'autres personnes aimez ce poste'\n\t\t\t\t\t: ' et '.$remaining_likers_count. 'autres personnes aiment ce poste';\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\n\t\t}\n\t\treturn $result;\n\t}", "public function isLikedByUser(User $user)\n {\n foreach ($this->likes as $like) {\n if ($like->getUser()->getApiKey() == $user->getApiKey()) {\n return true;\n }\n }\n return false;\n }", "public function getLikeQueryPartDataProvider() {}", "public function isVisible(): bool;", "function isTweetShown($user_id, $userId)\n\t\t{\n\t\t\t//settinng tweets visible if profile belongs to logged in user\n\t\t\t\tif( $userId == $user_id)\n\t\t\t\t\treturn 1;\n\t\t\t\t\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//Checking if profile user's tweet is private\n\t\t\t\t\t$this->loadModel('User');\n\t\t\t\t\t$conditions_first = array('User.user_id' => $user_id\n \t\t\t\t\t);\n\t\t\t \n\t\t\t\t\t $query = $this->User->find(\"first\",array('conditions' => \n\t\t\t\t\t \t\t $conditions_first,\n\t\t \t\t\t\t'fields' => 'User.tweet_private'));\n\n\t\t\t\t\t if(!empty($query))\n\t\t\t\t\t return ( 1 - $query['User']['tweet_private']);\n\t\t\t\t\t else\n\t\t\t\t\t \t return 0;\n\n\t\t\t\t}\n\t\t}", "public function isFavorited()\n {\n return $this->favorites()->where('user_id', auth()->id())->count() > 0;\n }", "function theclick_post_count_like($args=[]){\n $args = wp_parse_args($args, [\n 'show_like' => '1',\n 'class' => '',\n 'before' => '',\n 'after' => '',\n 'icon' => '',\n 'echo' => true,\n 'show_text' => true\n ]);\n if($args['show_like'] !== '1') return;\n\n $classes = trim(implode(' ', ['ef5-like', $args['class']] ));\n $args['icon'] = !empty($args['icon']) ? '<span class=\"meta-icon '.$args['icon'].'\">&nbsp;&nbsp;</span>' : '';\n ob_start();\n $like_number = 100;\n echo '<div class=\"'.esc_attr($classes).'\">';\n printf ('%s' , $args['before']);\n printf(\n _nx(\n '%1$s %2$s',\n '%1$s %3$s',\n $like_number,\n 'view title',\n 'theclick'\n ),\n number_format_i18n( $like_number ),\n $args['show_text'] ? esc_html__('Like','theclick') : '',\n $args['show_text'] ? esc_html__('Likes','theclick') : ''\n );\n printf ('%s' , $args['after']);\n echo '</div>';\n \n if($args['echo'] === true)\n echo ob_get_clean();\n else \n return ob_get_clean();\n}", "function access_if_property_flagged_as_favorite_summary($conf, $context) {\n return t('Allows access if a property is flagged as Favorite.');\n}", "public function canFetchFavorites()\n {\n return $this->imgurToken && $this->dropboxToken;\n }", "public function getActivityWhoLikes($limit = 15,$uid = null)\n\t{\t\n\t\tif(empty($uid))\n\t\t{\t//user is not logged in so, show every one's Photo likes randomly\n\t\t\t$query = \"SELECT p.photos_id,p.album_id,p.photos_name,pl.log_photos_hearts_date as hdate,pl.user_id as userid,\n\t\t\tu.user_details_firstname as username,u.user_details_avatar as useravatar,pl.owner_id,CONCAT(ow.user_details_firstname,' ',ow.user_details_lastname) as ownername, p.user_id as photouserid,p.photos_name as photoname \n\t\t\tFROM log_photos_hearts pl JOIN photos p ON pl.photos_id=p.photos_id JOIN users_details u ON pl.user_id=u.user_id\n\t\t\tJOIN users_details ow ON pl.owner_id=ow.user_id ORDER BY pl.log_photos_hearts_date DESC LIMIT 0,\".$limit;\n\t\t} else{\n\t\t\t//user is Logged in so show only hi/her friends like's and photo likes\t\t\t\n\t\t\t$query=\"SELECT * FROM \n\t\t\t(\";\n\t\t\t\t//get list of users who had like your photos\n\t\t\t\t$query.= \"SELECT p.photos_id,p.album_id,p.photos_name,pl.log_photos_hearts_date as hdate,pl.user_id as userid,\n\t\t\t\tu.user_details_firstname as username,u.user_details_avatar as useravatar,pl.owner_id,'your' as ownername,\n\t\t\t\tp.user_id as photouserid,p.photos_name as photoname \n\t\t\t\tFROM log_photos_hearts pl JOIN photos p ON pl.photos_id=p.photos_id JOIN users_details u ON pl.user_id=u.user_id\n\t\t\t\tWHERE pl.owner_id=\".$uid;\n\t\t\t\t$query.=\" UNION \";\n\t\t\t\t//get list of users who Followed You likes some photos of others\n\t\t\t\t$query.= \"SELECT p.photos_id,p.album_id,p.photos_name,pl.log_photos_hearts_date as hdate,pl.user_id as userid,\n\t\t\t\tu.user_details_firstname as username,u.user_details_avatar as useravatar,pl.owner_id,CONCAT(ow.user_details_firstname,' ',ow.user_details_lastname) as ownername, p.user_id as photouserid,p.photos_name as photoname \n\t\t\t\tFROM log_photos_hearts pl JOIN photos p ON pl.photos_id=p.photos_id JOIN users_details u ON pl.user_id=u.user_id\n\t\t\t\tJOIN users_details ow ON pl.owner_id=ow.user_id JOIN users_follow fw ON pl.user_id=fw.follow_id \n\t\t\t\tWHERE pl.owner_id<>\".$uid.\" AND fw.user_id=\".$uid;\n\t\t\t\t$query.=\" UNION \";\n\t\t\t\t//get list of users who You Followed likes some photos of others\n\t\t\t\t$query.= \"SELECT p.photos_id,p.album_id,p.photos_name,pl.log_photos_hearts_date as hdate,pl.user_id as userid,\n\t\t\t\tu.user_details_firstname as username,u.user_details_avatar as useravatar,pl.owner_id,\n\t\t\t\tCONCAT(ow.user_details_firstname,' ',ow.user_details_lastname) as ownername, p.user_id as photouserid,p.photos_name as photoname \n\t\t\t\tFROM log_photos_hearts pl JOIN photos p ON pl.photos_id=p.photos_id JOIN users_details u ON pl.user_id=u.user_id\n\t\t\t\tJOIN users_details ow ON pl.owner_id=ow.user_id JOIN users_follow fw ON pl.user_id=fw.user_id \n\t\t\t\tWHERE pl.owner_id<>\".$uid.\" AND fw.follow_id=\".$uid;\n\t\t\t\t$query.=\" UNION \";\n\t\t\t\t//get list When You Like someone Else's Photo\n\t\t\t\t$query.= \"SELECT p.photos_id,p.album_id,p.photos_name,pl.log_photos_hearts_date as hdate,pl.user_id as userid,\n\t\t\t\tu.user_details_firstname as username,u.user_details_avatar as useravatar,pl.owner_id,u.user_details_firstname as ownername,\n\t\t\t\tp.user_id as photouserid,p.photos_name as photoname \n\t\t\t\tFROM log_photos_hearts pl JOIN photos p ON pl.photos_id=p.photos_id JOIN users_details u ON pl.owner_id=u.user_id\n\t\t\t\tWHERE pl.user_id=\".$uid;\n\t\t\t$query.=\") as a ORDER BY hdate DESC LIMIT 0,\".$limit; \n\t\t}\n\t\t//Execute The Query\n\t\t$command= Yii::app()->db->createCommand($query);\t\t\n\t\t$rawData = $command->queryAll();\t\t\n\t\treturn $rawData;\n\t}", "public function isLiked($id = null)\n {\n $id = $id ?? auth()->id();\n return !! $this->likes->where('user_id', $id)->count();\n }", "public function testUserCanLikeAPost()\n {\n // when that user 'likes' a Post\n $this->post->like();\n\n // then I should see evidence in the database that the Post has been 'Liked'\n $this->assertEquals(count(Post::find($this->post->id)->likes), 1);\n $this->assertTrue($this->post->isLiked());\n $this->assertDatabaseHas('likes', [\n 'user_id' => $this->user->id,\n 'likeable_id' => $this->post->id,\n 'likeable_type' => get_class($this->post)\n ]);\n }", "public function isFavorited()\n {\n return !! $this->favorites->where('user_id', auth()->id())->count();\n }", "public function canShowInfo() {}" ]
[ "0.6906996", "0.68690634", "0.6824196", "0.6788795", "0.676625", "0.65864646", "0.65402156", "0.6424903", "0.64053637", "0.63884526", "0.6365686", "0.6348123", "0.62917536", "0.6274369", "0.6197992", "0.61626554", "0.61544156", "0.61544156", "0.61544156", "0.61544156", "0.61544156", "0.61541116", "0.6126878", "0.61100024", "0.60995376", "0.6090417", "0.60789156", "0.6060497", "0.60338664", "0.6026938", "0.601616", "0.60069203", "0.59826463", "0.5979293", "0.5979293", "0.5962671", "0.59455985", "0.5943768", "0.59367234", "0.593435", "0.59091175", "0.59088725", "0.5907633", "0.58975244", "0.588686", "0.5873134", "0.58714306", "0.5865631", "0.5865631", "0.5865631", "0.585956", "0.58424056", "0.5826906", "0.5826226", "0.58217674", "0.58212405", "0.58183783", "0.5811487", "0.58113545", "0.58079785", "0.58054113", "0.57908124", "0.57846683", "0.57823354", "0.5776847", "0.5769071", "0.57532775", "0.5752324", "0.5743528", "0.57416505", "0.5733592", "0.5723921", "0.5718881", "0.5716261", "0.5715015", "0.57139504", "0.5713594", "0.5709292", "0.57024175", "0.56883067", "0.5685604", "0.5681615", "0.5680254", "0.5678731", "0.5674612", "0.5666699", "0.56593144", "0.5639307", "0.56360847", "0.5636014", "0.5635718", "0.5629977", "0.5622602", "0.5619274", "0.56188", "0.5608019", "0.560591", "0.5602789", "0.5600788", "0.56007135" ]
0.7686967
0
Are Post Likes enabled on archive/front/search pages?
Включены ли лайки постов на страницах архива/главной/поиска?
function is_index_enabled() { $options = $this->get_options(); /** * Filters whether Likes should be enabled on archive/front/search pages. * * @module likes * * @since 2.2.0 * * @param bool $enabled Are Post Likes enabled on archive/front/search pages? */ return (bool) apply_filters( 'wpl_is_index_disabled', (bool) in_array( 'index', $options['show'] ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function is_likes_visible() {\n\t\tif ( Settings::is_syncing() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tglobal $wp_current_filter; // Used to apply 'sharing_show' filter\n\n\t\t$post = get_post();\n\n\t\t// Never show on feeds or previews\n\t\tif ( is_feed() || is_preview() ) {\n\t\t\t$enabled = false;\n\n\t\t\t// Not a feed or preview, so what is it?\n\t\t} else {\n\n\t\t\tif ( in_the_loop() ) {\n\t\t\t\t// If in the loop, check if the current post is likeable\n\t\t\t\t$enabled = $this->is_post_likeable();\n\t\t\t} else {\n\t\t\t\t// Otherwise, check and see if likes are enabled sitewide\n\t\t\t\t$enabled = $this->is_enabled_sitewide();\n\t\t\t}\n\n\t\t\tif ( post_password_required() )\n\t\t\t\t$enabled = false;\n\n\t\t\tif ( in_array( 'get_the_excerpt', (array) $wp_current_filter ) ) {\n\t\t\t\t$enabled = false;\n\t\t\t}\n\n\t\t\t// Sharing Setting Overrides ****************************************\n\n\t\t\t// Single post including custom post types\n\t\t\tif ( is_single() ) {\n\t\t\t\tif ( ! $this->is_single_post_enabled( $post->post_type ) ) {\n\t\t\t\t\t$enabled = false;\n\t\t\t\t}\n\n\t\t\t\t// Single page\n\t\t\t} elseif ( is_page() && ! is_front_page() ) {\n\t\t\t\tif ( ! $this->is_single_page_enabled() ) {\n\t\t\t\t\t$enabled = false;\n\t\t\t\t}\n\n\t\t\t\t// Attachment\n\t\t\t} elseif ( is_attachment() ) {\n\t\t\t\tif ( ! $this->is_attachment_enabled() ) {\n\t\t\t\t\t$enabled = false;\n\t\t\t\t}\n\n\t\t\t\t// All other loops\n\t\t\t} elseif ( ! $this->is_index_enabled() ) {\n\t\t\t\t$enabled = false;\n\t\t\t}\n\t\t}\n\n\t\tif ( $post instanceof WP_Post ) {\n\t\t\t// Check that the post is a public, published post.\n\t\t\tif ( 'attachment' == $post->post_type ) {\n\t\t\t\t$post_status = get_post_status( $post->post_parent );\n\t\t\t} else {\n\t\t\t\t$post_status = $post->post_status;\n\t\t\t}\n\t\t\tif ( 'publish' != $post_status ) {\n\t\t\t\t$enabled = false;\n\t\t\t}\n\t\t}\n\n\t\t// Run through the sharing filters\n\t\t/** This filter is documented in modules/sharedaddy/sharing-service.php */\n\t\t$enabled = apply_filters( 'sharing_show', $enabled, $post );\n\n\t\t/**\n\t\t * Filters whether the Likes should be visible or not.\n\t\t * Allows overwriting the options set in Settings > Sharing.\n\t\t *\n\t\t * @module likes\n\t\t *\n\t\t * @since 2.2.0\n\t\t *\n\t\t * @param bool $enabled Should the Likes be visible?\n\t\t */\n\t\treturn (bool) apply_filters( 'wpl_is_likes_visible', $enabled );\n\t}", "function is_single_page_enabled() {\n\t\t$options = $this->get_options();\n\t\t/**\n\t\t * Filters whether Likes should be enabled on single pages.\n\t\t *\n\t\t * @module likes\n\t\t *\n\t\t * @since 2.2.0\n\t\t *\n\t\t * @param bool $enabled Are Post Likes enabled on single pages?\n\t\t */\n\t\treturn (bool) apply_filters( 'wpl_is_single_page_disabled', (bool) in_array( 'page', $options['show'] ) );\n\t}", "function have_posts() {}", "public function isLiked()\n {\n if (isset($this->pageData['liked']) && $this->pageData['liked'] == 'true') {\n return true;\n }\n return false;\n }", "function like( SocialUser $oUser, SocialPost $oSocialPost );", "function wpsc_show_fb_like(){\n\tif('on' == get_option('wpsc_facebook_like'))\n\t\treturn true;\n\telse\n\t\treturn false;\n}", "public function userWantsToViewPost() : bool {\n return $this->hasQueryString($this->forumLayout->getPostLink()) && $this->getRequestPostId() !== \"\";\n }", "function is_post_likeable( $post_id = 0 ) {\n\t\t$post = get_post( $post_id );\n\t\tif ( ! $post || is_wp_error( $post ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$sitewide_likes_enabled = (bool) $this->is_enabled_sitewide();\n\t\t$post_likes_switched = get_post_meta( $post->ID, 'switch_like_status', true );\n\n\t\t// on WPCOM, we need to look at post edit date so we don't break old posts\n\t\t// if post edit date predates this code, stick with the former (buggy) behavior\n\t\t// see: p7DVsv-64H-p2\n\t\t$last_modified_time = strtotime( $post->post_modified_gmt );\n\n\t\t$behavior_was_changed_at = strtotime( \"2019-02-22 00:40:42\" );\n\n\t\tif ( $this->in_jetpack || $last_modified_time > $behavior_was_changed_at ) {\n\t\t\t// the new and improved behavior on Jetpack and recent WPCOM posts:\n\t\t\t// $post_likes_switched is empty to follow site setting,\n\t\t\t// 0 if we want likes disabled, 1 if we want likes enabled\n\t\t\treturn $post_likes_switched || ( $sitewide_likes_enabled && $post_likes_switched !== '0' );\n\t\t}\n\n\t\t// implicit else (old behavior): $post_likes_switched simply inverts the global setting\n\t\treturn ( (bool) $post_likes_switched ) xor $sitewide_likes_enabled;\n\t}", "function isLike($postID, $memberEmail, $client)\n{\n\t\n\t$colPL = $client->FacebookMongo->PostLikes;\n\t$isLiked = $colPL->count(['postID' => (string)$postID, 'memberEmail'=> (string)$memberEmail ]);\n\treturn $isLiked ;\n}", "private function checkPostsPage() {\r\r\n return is_home() && get_option('show_on_front') == 'page' && isset($this->post->ID) && $this->post->ID == get_option('page_for_posts');\r\r\n }", "function AlreadyLiked( $post_id ) {\n\tif ( is_user_logged_in() ) {\n\t\t$user_id \t = get_current_user_id();\n\t\t$meta_USERS = get_post_meta( $post_id, \"_user_liked\" );\n\t\t$liked_USERS = \"\";\n\t\t\n\t\tif ( count( $meta_USERS ) != 0 ) {\n\t\t\t$liked_USERS = $meta_USERS[0];\n\t\t}\n\t\t\n\t\tif( ! is_array( $liked_USERS ) ){\n\t\t\t$liked_USERS = array();\n\t\t}\n\t\t\t\n\t\tif ( in_array( get_current_user_id(), $liked_USERS ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t\t\n\t} else {\n\t\n\t\t$meta_IPS = get_post_meta( $post_id, \"_user_IP\" );\n\t\t$ip \t = $_SERVER[\"REMOTE_ADDR\"];\n\t\t$liked_IPS = \"\";\n\t\t\n\t\tif ( count( $meta_IPS ) != 0 ) {\n\t\t\t$liked_IPS = $meta_IPS[0];\n\t\t}\n\t\t\n\t\tif ( ! is_array( $liked_IPS ) ) {\n\t\t\t$liked_IPS = array();\n\t\t}\n\t\t\n\t\tif ( in_array( $ip, $liked_IPS ) ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\t\n}", "public function is_enabled_sitewide() {\n\t\t/**\n\t\t * Filters whether Likes are enabled by default on all posts.\n\t\t * true if enabled sitewide, false if not.\n\t\t *\n\t\t * @module likes\n\t\t *\n\t\t * @since 2.2.0\n\t\t *\n\t\t * @param bool $option Are Likes enabled sitewide.\n\t\t */\n\t\treturn (bool) apply_filters( 'wpl_is_enabled_sitewide', ! Jetpack_Options::get_option_and_ensure_autoload( 'disabled_likes', 0 ) );\n\t}", "public function isLiked()\n {\n return !!$this->likes->where('user_id', auth()->id())->count();\n }", "function have_posts()\n{\n}", "function is_single_post_enabled( $post_type = 'post' ) {\n\t\t$options = $this->get_options();\n\t\treturn (bool) apply_filters(\n\t\t/**\n\t\t * Filters whether Likes should be enabled on single posts.\n\t\t *\n\t\t * The dynamic part of the filter, {$post_type}, allows you to specific the post type where Likes should be enabled.\n\t\t *\n\t\t * @module likes\n\t\t *\n\t\t * @since 2.2.0\n\t\t *\n\t\t * @param bool $enabled Are Post Likes enabled on single posts?\n\t\t */\n\t\t\t\"wpl_is_single_{$post_type}_disabled\",\n\t\t\t(bool) in_array( $post_type, $options['show'] )\n\t\t);\n\t}", "public function canLike()\n\t{\n\t\tglobal $registry;\n\t\t\n\t\t$result = true;\n\t\t\n\t\tif($this->type == self::TYPE_FOLLOW_ADD || $this->type == self::TYPE_GROUP_JOIN || $this->type == self::TYPE_PROFILE_EDIT)\n\t\t{\n\t\t\t$result = false;\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "function plugin_like() {\n\t\t\t/*\n\t\t\t$content = '<p>'.__('Why not do any or all of the following:','schemaplugin').'</p>';\n\t\t\t$content .= '<ul>';\n\t\t\t$content .= '<li><a href=\"'.$this->homepage.'\">'.__('Link to it so other folks can find out about it.','schemaplugin').'</a></li>';\n\t\t\t$content .= '<li><a href=\"http://wordpress.org/extend/plugins/'.$this->hook.'/\">'.__('Give it a good rating on WordPress.org.','schemaplugin').'</a></li>';\n\t\t\t$content .= '<li><a href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=2017947\">'.__('Donate a token of your appreciation.','schemaplugin').'</a></li>';\n\t\t\t$content .= '</ul>';\n\t\t\t$this->postbox($this->hook.'like', 'Like this plugin?', $content);\n\t\t\t*/\n\t\t}", "public function isLiked()\n\t{\n\t\treturn !! $this->likes()\n\t\t\t->where('user_id', Auth::id())\n\t\t\t->count();\n\t}", "function book_has_post() {\r\n global $book;\r\n\r\n return ( $book->post > 0 );\r\n}", "public static function is_posts_page() {\n\t\treturn ( \\is_home() && 'page' === get_option( 'show_on_front' ) );\n\t}", "function userLikedThisPost($post_id=''){\n $result = query(\"SELECT * FROM likes WHERE user_id = \".loggedInUserId().\" AND post_id = {$post_id}\");\n return mysqli_num_rows($result) >= 1 ? true : false;\n}", "function rank_math_is_blog_public() {\n\treturn '1' === (string) get_option( 'blog_public' );\n}", "private static function alreadyLiked ($post_id)\n {\n\n if (is_user_logged_in()) { // user is logged in\n $user_id = get_current_user_id(); // current user\n $meta_USERS = get_post_meta($post_id, \"_user_liked\"); // user ids from post meta\n $liked_USERS = \"\"; // set up array variable\n\n if (count($meta_USERS) != 0) // meta exists, set up values\n $liked_USERS = $meta_USERS[0];\n\n if (!is_array($liked_USERS)) // make array just in case\n $liked_USERS = array();\n\n if (in_array($user_id, $liked_USERS)) // True if User ID in array\n return true;\n\n return false;\n } else { // user is anonymous, use IP address for voting\n $meta_IPS = get_post_meta($post_id, \"_user_IP\"); // get previously voted IP address\n $ip = $_SERVER[\"REMOTE_ADDR\"]; // Retrieve current user IP\n $liked_IPS = \"\"; // set up array variable\n\n if (count($meta_IPS) != 0) // meta exists, set up values\n $liked_IPS = $meta_IPS[0];\n\n if (!is_array($liked_IPS)) // make array just in case\n $liked_IPS = array();\n\n if (in_array($ip, $liked_IPS)) // True is IP in array\n return true;\n\n return false;\n }\n }", "function publisher_have_posts() {\n\n\t\t// Add default query to better_template query if its not added or default query is used.\n\t\tif ( ! publisher_get_query() instanceof WP_Query ) {\n\t\t\tglobal $wp_query;\n\n\t\t\tpublisher_set_query( $wp_query );\n\t\t}\n\n\t\t// If count customized\n\t\tif ( publisher_get_prop( 'posts-count', null ) != null ) {\n\t\t\tif ( publisher_get_prop( 'posts-counter', 1 ) > publisher_get_prop( 'posts-count' ) ) {\n\t\t\t\t$have_posts = false;\n\t\t\t} else {\n\t\t\t\tif ( publisher_get_query()->current_post + 1 < publisher_get_query()->post_count ) {\n\t\t\t\t\t$have_posts = true;\n\t\t\t\t} else {\n\t\t\t\t\t$have_posts = false;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$have_posts = publisher_get_query()->current_post + 1 < publisher_get_query()->post_count;\n\t\t}\n\n\t\tif ( $have_posts === false ) {\n\t\t\tpublisher_clear_post_cache();\n\t\t}\n\n\t\treturn $have_posts;\n\t}", "public static function is_home_posts_page() {\n\t\treturn ( \\is_home() && 'posts' === get_option( 'show_on_front' ) );\n\t}", "function socialwiki_page_likes($pid) {\n global $DB;\n $sql = 'SELECT *\n FROM {socialwiki_likes}\n WHERE pageid=?';\n return $DB->record_exists_sql($sql, array($pid));\n}", "function get_likes($set = false){\n global $post;\n $views = get_post_meta($post->ID, \"umbrella_post_likes\", true);\n if($set){\n $views = intval($views) + 1;\n if($views){\n update_post_meta($post->ID, \"umbrella_post_likes\" , $views );\n }else{\n add_post_meta($post->ID, \"umbrella_post_likes\" , 1 );\n }\n }\n return $views ? number_format($views, 0, ' ', ' ') : 0;\n}", "function is_post_public( $post ) {\n\t\tif ( !is_array( $post ) ) {\n\t\t\t$post = (array) $post;\n\t\t}\n\n\t\tif ( 0 < strlen( $post['post_password'] ) )\n\t\t\treturn false;\n\t\tif ( ! in_array( $post['post_type'], get_post_types( array( 'public' => true ) ) ) )\n\t\t\treturn false;\n\t\t$post_status = get_post_status( $post['ID'] ); // Inherited status is resolved here.\n\t\tif ( ! in_array( $post_status, get_post_stati( array( 'public' => true ) ) ) )\n\t\t\treturn false;\n\t\treturn true;\n\t}", "public function testLikeCountCanBeRetrievedFromPost()\n {\n $this->post->like();\n\n $this->assertEquals($this->post->likesCount, 1);\n }", "function reblogs_enabled_sitewide() {\n\t\t/**\n\t\t * Filters whether Reblogs are enabled by default on all posts.\n\t\t * true if enabled sitewide, false if not.\n\t\t *\n\t\t * @module likes\n\t\t *\n\t\t * @since 3.0.0\n\t\t *\n\t\t * @param bool $option Are Reblogs enabled sitewide.\n\t\t */\n\t\treturn (bool) apply_filters( 'wpl_reblogging_enabled_sitewide', ! get_option( 'disabled_reblogs' ) );\n\t}", "public function facebookAddLike()\n {\n $facebook = $this->_getFacebookObject();\n if ($facebook->streams->addLike($this->vars->post_id)) {\n $fql = 'SELECT post_id, likes FROM stream WHERE post_id=\"' . $this->vars->post_id . '\"';\n try {\n $post = $facebook->fql->run($fql);\n } catch (Horde_Service_Facebook_Exception $e) {\n // Already set the like by the time we are here, so just indicate\n // that.\n return _(\"You like this\");\n }\n\n $post = current($post);\n $likes = $post['likes'];\n if ($likes['count'] > 1) {\n $html = sprintf(ngettext(\"You and %d other person likes this\", \"You and %d other people like this\", $likes['count'] - 1), $likes['count'] - 1);\n } else {\n $html = _(\"You like this\");\n }\n return $html;\n }\n\n return _(\"Unable to set like.\");\n }", "public function user_can_like_post()\n {\n $this->withoutExceptionHandling();\n $token = auth()->attempt(['email' => 'user@mail.com', 'password' => 'password']);\n $header = [\n 'Accept' => 'application/json',\n 'Authorization' => \"Bearer $token\"\n ];\n $this->post('/api/posts/1/like', $header)->assertStatus(200);\n }", "function userLiked($post_id)\n{\n global $conn;\n global $username;\n $sql = \"SELECT * FROM rating_info WHERE username= '$username' \n \t\t AND post_id=$post_id AND rating_action='like'\";\n $result = mysqli_query($conn, $sql);\n if (mysqli_num_rows($result) > 0) {\n return true;\n }else{\n return false;\n }\n}", "public function countPostLike()\n\t{\n\t\treturn PostLike::find()->innerJoinWith('post', false)->where(['PostLike.createdById' => $this->id, 'Post.isActive' => 1])->count();\n\t}", "function all_business_get_project_likes($template_type = 'page', $show = true) {\r\n\tif ($template_type == 'page') {\r\n\t\t$out = cmsmastersLike(false);\r\n\t} elseif ($template_type == 'post') {\r\n\t\t$cmsmasters_option = all_business_get_global_options();\r\n\t\t\r\n\t\tif ($cmsmasters_option[CMSMASTERS_SHORTNAME . '_portfolio_project_like']) {\r\n\t\t\t$out = '<div class=\"project_details_item\">' . \r\n\t\t\t\t'<div class=\"project_details_item_title\">' . esc_html__('Likes', 'all-business') . ':' . '</div>' . \r\n\t\t\t\t'<div class=\"project_details_item_desc details_item_desc_like\">' . \r\n\t\t\t\t\tcmsmastersLike(false) . \r\n\t\t\t\t'</div>' . \r\n\t\t\t'</div>';\r\n\t\t}\r\n\t}\r\n\t\r\n\t\r\n\tif ($show) {\r\n\t\techo $out;\r\n\t} else {\r\n\t\treturn $out;\r\n\t}\r\n}", "function likePost(int $postId): bool\n {\n if (!$this->hasLiked($postId)) {\n $this->db->query(\"INSERT INTO likes (`post`, `user`, `time`) VALUES (?, ?, ?)\", $postId, $this->userObject['id'], $this->db->currentTime)->numRows();\n return true;\n } else {\n return false;\n }\n }", "public function get_myLikes() {\r\n try {\r\n $me = $this->facebook->api('/me/likes?access_token=' . $this->facebook->getAccessToken());\r\n return $me;\r\n } catch (FacebookApiException $e) {\r\n $e;\r\n return false;\r\n }\r\n }", "function reviews_attached_to_enabled_published_posts($where) {\n\t\tglobal $wpdb;\n\n\t\t/*\n\t\tRemoved below INNER JOIN for 3.2.2 to allow in-text shortcode (and do_shortcode) to display correct review count even when WPCR-enabled checkbox is not checked on the page. (loc 2/2)\n\t\t... pm2 ON pm2.meta_key ...\n\t\t> INNER JOIN {$wpdb->prefix}postmeta pm3 ON pm3.meta_key = 'wpcr3_enable' AND pm3.meta_value = '1'\n\t\t... p3 ON p3.id = pm2.meta_value ...\n\t\t*/\n\n\t\t$where .= \"\n\t\t\tAND {$wpdb->prefix}posts.id IN (\n\t\t\t\tSELECT DISTINCT p2.id FROM {$wpdb->prefix}posts p2\n\t\t\t\tINNER JOIN {$wpdb->prefix}postmeta pm2 ON pm2.meta_key = 'wpcr3_review_post' AND pm2.post_id = p2.id\n\t\t\t\tINNER JOIN {$wpdb->prefix}posts p3 ON p3.id = pm2.meta_value AND p3.post_status = 'publish'\n\t\t\t\tWHERE p2.post_type = 'wpcr3_review'\n\t\t\t)\n\t\t\";\n\t\treturn $where;\n\t}", "static function discover($post_id) {\n if (logged_in()) {\n $check = new self(array(\"post_id\" => $post_id,\n \"user_id\" => Visitor::current()->id));\n\n if (!$check->no_results)\n $_SESSION[\"likes\"][$post_id] = $check->id;\n }\n\n return isset($_SESSION[\"likes\"][$post_id]);\n }", "public static function fbLike($post) {\n ob_start();\n echo '<script src=\"http://connect.facebook.net/en_US/all.js#xfbml=1\"></script>';\n echo '<span class=\"meta-link\">';\n echo '<fb:like href=\"' . __BASE_URL . '/blog/viewpost/' . $post->BlogpostId . '\" layout=\"button_count\" show_faces=\"false\" width=\"20\" font=\"verdana\"></fb:like>';\n echo '</span>';\n return ob_get_clean();\n }", "function has_posts() {\n\tif(($posts = IoC::resolve('posts')) === false) {\n\t\t$params = array(\n\t\t\t'status' => 'published', \n\t\t\t'sortby' => 'id', \n\t\t\t'sortmode' => 'desc', \n\t\t\t'limit' => Config::get('metadata.posts_per_page', 10), \n\t\t\t'offset' => Input::get('offset', 0)\n\t\t);\n\t\t$posts = Posts::list_all($params);\n\t\tIoC::instance('posts', $posts, true);\n\n\t\t$total_posts = Posts::count(array('status' => 'published'));\n\t\tIoC::instance('total_posts', $total_posts, true);\n\t}\n\t\n\treturn $posts->length() > 0;\n}", "public function testUserCanLikeAPost()\n {\n // when that user 'likes' a Post\n $this->post->like();\n\n // then I should see evidence in the database that the Post has been 'Liked'\n $this->assertEquals(count(Post::find($this->post->id)->likes), 1);\n $this->assertTrue($this->post->isLiked());\n $this->assertDatabaseHas('likes', [\n 'user_id' => $this->user->id,\n 'likeable_id' => $this->post->id,\n 'likeable_type' => get_class($this->post)\n ]);\n }", "public function is_posts(){\n\t\t$source = $this->get_param('sourcetype', 'gallery');\n\n\t\treturn (in_array($source, array('post', 'posts', 'specific_posts', 'specific_post', 'current_post', 'woocommerce', 'woo'), true)) ? true : false;\n\t}", "public function likePost($post_id, $action = 'get', $type = '') {\n if(!is_numeric($post_id)) {\n return;\n }\n\n switch($action) {\n\n case 'get':\n $like_count = get_post_meta($post_id, '_qode-like', true);\n if(!$like_count) {\n $like_count = 0;\n add_post_meta($post_id, '_qode-like', $like_count, true);\n }\n\n if($type == 'icon') {\n return;\n }\n\n $return_value = $like_count;\n\n if($like_count != 1) {\n $return_value .= \"<span> \" . esc_html__(' Likes', 'bridge-core') . \"</span>\";\n } else {\n $return_value .= \"<span> \" . esc_html__(' Like', 'bridge-core') . \"</span>\";\n }\n\n return $return_value;\n break;\n\n case 'update':\n $like_count = get_post_meta($post_id, '_qode-like', true);\n if(isset($_COOKIE['qode-like_' . $post_id])) {\n return $like_count;\n }\n\n $like_count++;\n update_post_meta($post_id, '_qode-like', $like_count);\n setcookie('qode-like_' . $post_id, $post_id, time() * 20, '/');\n\n if($type == 'icon') {\n return;\n }\n\n $return_value = $like_count;\n if($like_count != 1) {\n $return_value .= \"<span> \" . esc_html__(' Likes', 'bridge-core') . \"</span>\";\n } else {\n $return_value .= \"<span> \" . esc_html__(' Like', 'bridge-core') . \"</span>\";\n }\n\n return $return_value;\n break;\n }\n }", "function rank_math_has_postname_in_permalink() {\n\treturn ( false !== strpos( get_option( 'permalink_structure' ), '%postname%' ) );\n}", "function show_posts_nav() {\n \tglobal $wp_query;\n \treturn ($wp_query->max_num_pages > 1);\n }", "function bubulla_has_featured_posts() {\n\t\n\treturn ! is_paged() && (bool) bubulla_get_featured_posts();\n}", "public function add_likes_to_sharing_meta_box_title() {\n\t\treturn __( 'Likes and Shares', 'jetpack' );\n\t}", "public function is_specific_posts(){\n\t\treturn (in_array($this->get_param('source_type', 'gallery'), array('specific_posts', 'specific_post'), true)) ? true : false;\n\t}", "public function hasLikedThisPost($postId = 0, $userId = 0)\n\t {\n\n\t if (isset($this->_post['like_users']) && $this->_post['like_users'] == true)\n\t return true;\n\t else\n\t return false;\n\t }", "static function exists($post_id): bool {\n static $results;\n fallback($_SESSION['likes'], array());\n\n if (logged_in() and !isset($results)) {\n $results = SQL::current()->select(\n tables:\"likes\",\n fields:array(\"id\", \"post_id\"),\n conds:array(\"user_id\" => Visitor::current()->id),\n order:\"post_id ASC\"\n )->fetchAll();\n\n foreach ($results as $result) {\n $this_id = $result[\"id\"];\n $this_post_id = $result[\"post_id\"];\n $_SESSION['likes'][$this_post_id] = $this_id;\n }\n }\n\n return isset($_SESSION['likes'][$post_id]);\n }", "function share_count(Model_Blog_Post $post);", "function s7n_post_like()\n{\n if (!wp_verify_nonce($_POST['nonce'], 's7n_post_like_nonce') || !isset($_POST['nonce'])) {\n wp_send_json(array('status' => 0, 'message' => __('مشکلی پیش آمده دوباره امتحان کنید.')));\n }\n $like_cookie = null;\n $type = $_POST['type'];\n $post_id = $_POST['postid'];\n $ip = s7n_get_ip();\n if (isset($_COOKIE[$type . '_' . $post_id])) {\n $like_cookie = $_COOKIE[$type . '_' . $post_id];\n }\n $likes = get_post_meta($post_id, 's7n_post_' . $type, true);\n $likes_ip = get_post_meta($post_id, 's7n_post_' . $type . '_ips', true);\n $likes_ip = !$likes_ip ? array() : $likes_ip;\n $likes = !$likes ? 0 : $likes;\n if (!in_array($ip, $likes_ip) || $like_cookie != 1) {\n setcookie($type . '_' . $post_id, 1, time() + (86400 * 1825), \"/\"); // 86400 = 1 day\n array_push($likes_ip, $ip);\n $likes += 1;\n } else {\n setcookie($type . '_' . $post_id, 0, time() + (86400 * 1825), \"/\"); // 86400 = 1 day\n if (($key = array_search($ip, $likes_ip)) !== false) {\n unset($likes_ip[$key]);\n }\n $likes -= 1;\n }\n update_post_meta($post_id, 's7n_post_' . $type . '_ips', $likes_ip);\n update_post_meta($post_id, 's7n_post_' . $type, $likes);\n $likes = get_post_meta($post_id, 's7n_post_' . $type, true);\n wp_send_json(array('status' => 1, 'message' => __('با موفقیت بروزرسانی شد.'), 'info' => array('count' => $likes)));\n}", "function theclick_post_count_like($args=[]){\n $args = wp_parse_args($args, [\n 'show_like' => '1',\n 'class' => '',\n 'before' => '',\n 'after' => '',\n 'icon' => '',\n 'echo' => true,\n 'show_text' => true\n ]);\n if($args['show_like'] !== '1') return;\n\n $classes = trim(implode(' ', ['ef5-like', $args['class']] ));\n $args['icon'] = !empty($args['icon']) ? '<span class=\"meta-icon '.$args['icon'].'\">&nbsp;&nbsp;</span>' : '';\n ob_start();\n $like_number = 100;\n echo '<div class=\"'.esc_attr($classes).'\">';\n printf ('%s' , $args['before']);\n printf(\n _nx(\n '%1$s %2$s',\n '%1$s %3$s',\n $like_number,\n 'view title',\n 'theclick'\n ),\n number_format_i18n( $like_number ),\n $args['show_text'] ? esc_html__('Like','theclick') : '',\n $args['show_text'] ? esc_html__('Likes','theclick') : ''\n );\n printf ('%s' , $args['after']);\n echo '</div>';\n \n if($args['echo'] === true)\n echo ob_get_clean();\n else \n return ob_get_clean();\n}", "private function is_static_posts_page() {\n\t\tif ( is_home() && 0 !== (int) get_option( 'page_for_posts' ) ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "function userLiked($post_id)\r\n{\r\n global $conn;\r\n global $user_id;\r\n //$sql = \"SELECT * FROM rating_info WHERE UserID=$user_id AND PostIdx = $post_id AND rating_action='like'\";\r\n $result = mysqli_query($conn, \"SELECT * FROM rating_info WHERE UserID='$user_id' AND PostIdx = $post_id AND rating_action='like'\");\r\n if (mysqli_num_rows($result) > 0) {\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n}", "function isLiked(int $podcastId, int $userId) {\n if(\\App\\Like::where('podcast_id', $podcastId)->where('user_id', $userId)->count() > 0) {\n return true;\n } else {\n return false;\n }\n}", "function wp_revisions_enabled($post)\n{\n}", "public function canBeViewed()\n\t{\n\t\treturn $this->isPublished()\n\t\t\t|| ($this->getPostStatus() === 'private' && Mage::getSingleton('customer/session')->isLoggedIn());\n\t}", "function is_attachment_enabled() {\n\t\t$options = $this->get_options();\n\t\t/**\n\t\t * Filters whether Likes should be enabled on attachment pages.\n\t\t *\n\t\t * @module likes\n\t\t *\n\t\t * @since 2.2.0\n\t\t *\n\t\t * @param bool $enabled Are Post Likes enabled on attachment pages?\n\t\t */\n\t\treturn (bool) apply_filters( 'wpl_is_attachment_disabled', (bool) in_array( 'attachment', $options['show'] ) );\n\t}", "function show_posts_nav() \n\t{\n\t global $wp_query;\n\t return ($wp_query->max_num_pages > 1);\n\t}", "function socialwiki_liked($uid, $pid) {\n global $DB;\n $sql = 'SELECT *\n FROM {socialwiki_likes}\n WHERE userid=? AND pageid=?';\n return $DB->record_exists_sql($sql, array($uid, $pid));\n}", "public function testLikeWithPost(): void\n {\n Passport::actingAs($this->user);\n $response = $this->post(route('post_like_for_Post', [\n 'user' => $this->user,\n 'post' => $this->post->id,\n ]));\n $response->assertStatus(Response::HTTP_CREATED);\n $response->assertJsonStructure((new Like)->getFillable());\n $this->assertDatabaseHas('likes', $response->decodeResponseJson());\n }", "public function isLikedBy(){\n $user = auth()->user();\n return (bool) $user->likes\n ->where('recipe_id', $this->id)\n ->where('liked', true)\n ->count();\n }", "function yz_is_user_have_posts() {\n\n // Get User Post Count.\n $user_post_count = yz_get_user_posts_nbr();\n\n if ( 0 == $user_post_count ) {\n return false;\n }\n\n return true;\n}", "public function has_published_pages()\n {\n }", "function show_posts_nav() {\n\tglobal $wp_query;\n\treturn ($wp_query->max_num_pages > 1);\n}", "public function onPostLike($event) {\n $post = Post::findOrFail($event->post_id);\n // inkrementuj popularitu clanku lajknutim\n $this->incrPopularity($event->post_id, 'like');\n }", "public function testUserCanToggleLikeStatusForPost()\n {\n $this->post->toggleLike();\n $this->assertTrue($this->post->isLiked());\n\n $this->post->toggleLike();\n $this->assertFalse($this->post->isLiked());\n }", "function power_posts_show_on_front() {\n\treturn 'posts' === get_option( 'show_on_front' );\n}", "protected function actionShowSimilarPosts() {\n\t\tif (!is_array($this->postData) || empty($this->postData)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$tags = explode(\",\", $this->postData['post_tags']);\n\n\t\tif ($tags[0]) {\n\t\t\t$searchTag = trim($tags[0]);\n\t\t}\n\n\t\tif ($searchTag) {\n\t\t\t$similarListContent = '';\n\t\t\t\n\t\t\t$similarPosts = $this->posts->getSimilarPostsByTags(array(\n\t\t\t\t'searchTag' => $searchTag,\n\t\t\t\t'currentArticleId'=>$this->postId,\n\t\t\t\t\"limit\" => $this->similarPostsLimit,\n\t\t\t\t\t));\n\t\t\t\n\t\t\tif(empty($similarPosts)){\n\t\t\t\t$similarPosts = $this->initRecentCategoryPosts($this->postData['id']);\n\t\t\t}\n\t\t\t\n\t\t\tforeach ($similarPosts as $post) {\n\t\t\t\t$this->parser->setMultipleParserVars($post);\n\t\t\t\t$this->parser->setParserVar('linkTitle', $this->cmt->makeNameWebsave($post['post_title']));\n\t\t\t\t$similarListContent .= $this->parser->parseTemplate($this->templatePath . 'similar_posts_row.tpl');\n\t\t\t}\n\n\t\t\tif ($similarListContent) {\n\t\t\t\t$this->parser->setParserVar('similarListContent', $similarListContent);\n\t\t\t\t$this->content = $this->parser->parseTemplate($this->templatePath . 'similar_posts_frame.tpl');\n\t\t\t}\n\t\t}\n\n\t}", "function is_post_type_viewable($post_type)\n{\n}", "function checks_if_connected_user_liked_a_post($micropost_id){\n\t\tglobal $bdd;\n\t\t$q = $bdd->prepare(\"SELECT id FROM micropost_likes WHERE micropost_id =? AND user_id=?\");\n\t\t$q->execute([\n\t\t\t$micropost_id,\n\t\t\tget_session('id')\n\t\t]);\n\t\t$countr = $q->rowCount();\n\t\t$q->closeCursor();\n\t\treturn (bool) $countr;\n\t}", "public function isSlidesFromPosts(){\n\t\treturn $this->is_posts();\n\t}", "function ShareLike()\n {\n SeanceHelper::ShareLike($this->Core, Request::GetPost(\"seanceId\"));\n }", "public function like_post() {\n $user_id = strip_tags($this->post('user_id'));\n $post_id = strip_tags($this->post('post_id'));\n\n // Insert user data\n $userData = array(\n 'l_p_id' => $post_id,\n 'l_u_id' => $user_id\n );\n $insert = $this->likes->insert($userData);\n \n // Check if the user data is inserted\n if($insert){\n // Set the response and exit\n $this->response([\n 'status' => TRUE,\n 'message' => 'Liked',\n 'data' => $insert\n ], REST_Controller::HTTP_OK);\n }else{\n // Set the response and exit\n $this->response(\"Some problems occurred, please try again.\", REST_Controller::HTTP_BAD_REQUEST);\n }\n }", "public static function isCompatiblePost() {\r\n return\r\n TpsOptions::get('enable_on_pages') ?\r\n (is_single() || is_page()) :\r\n is_single();\r\n }", "public function actionLikePost() {\n\n $userId = Users::checkLogged();\n \n if (isset($_POST['data'])) {\n $result = Pictures::addLike($_POST['data']);\n Pictures::addUniqueLike($_POST['data'], $userId);\n }\n if (isset($_POST['data1'])) {\n $result = Pictures::removeLike($_POST['data1']);\n Pictures::removeUniqueLike($_POST['data1'], $userId);\n }\n return true;\n }", "public function isLike($subject) {\n $viewer = Engine_Api::_()->user()->getViewer();\n\n if (empty($subject) || empty($viewer))\n return;\n\n if ($viewer->getIdentity())\n $isLike = Engine_Api::_()->getDbTable(\"likes\", \"core\")->isLike($subject, $viewer);\n\n $isLike = !empty($isLike) ? true : false;\n\n return $isLike;\n }", "function hasLiked(int $postId): bool\n {\n if ($this->db->query('SELECT user FROM likes WHERE post = ? AND user = ?', $postId, $this->userObject['id'])->numRows() == 1) {\n return true;\n } else {\n return false;\n }\n }", "public function likes(){\n }", "public function canSearch()\r\n {\r\n return $this->isPublished();\r\n }", "public function post_is_under_review() {\n return 'on' === get_post_meta( get_the_ID(), '_rns_under_review', true );\n }", "function already_liked($dbh, $me, $pID) {\n\t$me = pg_escape_string($me);\n $pID = pg_escape_string($pID);\n\t$str = \" select * from like_record\n\t\t where name = '$me' AND postid = '$pID'\";\n\t$result = pg_query($dbh, $str);\n\tif( !$result ){\n\t\treturn false;\n\t}\n\t$row = pg_fetch_row($result);\n\t$count = $row[0];\n\tif( !$count ){\n\t\treturn false;\n\t}\t\n\treturn true;\n}", "static function show_likes($id_post){\n if(!is_int($id_post))\n return false;\n return self::$PDO->query(\"SELECT t1.*,concat(t2.fname,' ',t2.name) as liker_name FROM \".self::$prefix.\"liked_post t1,\".self::$prefix.\"users t2 WHERE t1.ID_USER=t2.ID AND ID_POST=\".$id_post)->fetchAll();\n }", "public static function isLiked( $ns = '' )\n\t{\n\t\treturn ( isset( self::$likes[$ns] ) );\n\t}", "function countOfPostLike($postID, $client)\n{\n\t$colPL = $client->FacebookMongo->PostLikes;\n\t$cntLikes = $colPL->count(['postID' => (string) $postID]);\n\n\treturn $cntLikes;\n}", "public function isAllowedPosting()\r\n {\r\n return Mage::getStoreConfig('productrewiewspicture_options/review_pictures/enable_pictures');\r\n }", "public function getLikes()\n\t{\n\t\treturn $this->likes;\n\t}", "public function posts_found() {\n\t\tglobal $terra;\n\t\t$terra->posts_found();\n\t}", "public function can_get_more_posts() {\r\n\t\t$one_type_and_term_has_more_ages = $this->next_pages !== false;\r\n\t\t$max_concurrent_api_calls_not_met = $this->num_api_calls < $this->max_api_calls;\r\n\t\t$max_concurrent_api_calls_not_met ? $this->add_report( 'max conccurrent requests not met' ) : $this->add_report( 'max concurrent met' );\r\n\t\t$one_type_and_term_has_more_ages ? $this->add_report( 'more pages available' ) : $this->add_report( 'no next page' );\r\n\r\n\t\treturn ($one_type_and_term_has_more_ages && $max_concurrent_api_calls_not_met);\r\n\t}", "function GetTotalLikes($post_id, $sesh) {\n\t$response_likes = (new FacebookRequest( $sesh,'GET','/'.$post_id.'/likes', array('summary'=>true)))->execute();\n\t$object_likes = $response_likes->getGraphObject();\n\t$total_likes = $object_likes->getProperty('summary');\n\t$total_likes = $total_likes->getProperty('total_count');\n\treturn $total_likes;\n}", "public function likedPosts()\n {\n return $this->morphedByMany('VoiceBook\\Post', 'likeable');\n }", "function is_liked(mysqli $link, int $post_id, int $current_user_id)\n{\n $sql = \"SELECT likes.*\n FROM likes\n WHERE likes.post_id = ? AND likes.user_id = ?\";\n $stmt = db_get_prepare_stmt($link, $sql, [$post_id, $current_user_id]);\n mysqli_stmt_execute($stmt);\n $result = mysqli_stmt_get_result($stmt);\n if (!$result) {\n exit ('error'.mysqli_error($link));\n }\n\n return mysqli_fetch_all($result) ? true : false;\n}", "public function getSocialLikes()\n {\n return $this->social_likes;\n }", "public function like()\n\t{\n\t}", "function socialwiki_page_like($uid, $pid, $swid) {\n if (socialwiki_liked($uid, $pid)) {\n socialwiki_delete_like($uid, $pid);\n } else {\n socialwiki_add_like($uid, $pid, $swid);\n // TODO: could optimize which peers we recompute: only those who have likes in common.\n }\n socialwiki_peer::socialwiki_update_peers(true, false, $swid, $uid); // Update like similarity to other peers.\n return socialwiki_numlikes($pid);\n}", "function is_listing() {\r\n\t\treturn is_singular( array( 'listing' ) );\r\n\t}", "function userHasLiked($article_id, $user_id) {\n\t\t$response = $this->_connection->selectAllFromWhere ( \"likes\", \"`article_id`=:article_id and `user_id`=:user_id\", array (\n\t\t\t\t\":article_id\" => $article_id,\n\t\t\t\t\":user_id\" => $user_id \n\t\t) );\n\t\tif ($this->_connection->responseIsEmpty ( $response )) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\t$row = $response->fetch ();\n\t\t\tif ($row ['is_like'] == '0') {\n\t\t\t\treturn \"dislike\";\n\t\t\t} elseif ($row ['is_like'] == '1') {\n\t\t\t\treturn 'like';\n\t\t\t}\n\t\t}\n\t}", "public function likeAction()\r\n {\r\n $post = $this->request->input('post');\r\n\r\n if($this->request->all())\r\n {\r\n if(Forum::userAlreadylikePost($post, Auth::returnUserId()))\r\n {\r\n echo Json::encode(array('status' => 'error'));\r\n }\r\n else\r\n {\r\n Forum::insertLike($post, Auth::returnUserId());\r\n echo Json::encode(array('status' => 'success', 'data' => Forum::likesByPost($post)));\r\n }\r\n }\r\n else\r\n {\r\n $this->redirect('/forum'); \r\n }\r\n }" ]
[ "0.7348984", "0.6751685", "0.65254503", "0.65245783", "0.6509716", "0.64790195", "0.63863987", "0.6321373", "0.62885857", "0.6275971", "0.624949", "0.62161046", "0.6201171", "0.6201142", "0.617599", "0.616608", "0.609408", "0.6086202", "0.6079146", "0.6075063", "0.6038382", "0.60078645", "0.6002807", "0.59857726", "0.5979556", "0.59636587", "0.5953687", "0.59444267", "0.59383905", "0.5927811", "0.5925481", "0.5914551", "0.5911621", "0.59114265", "0.59077865", "0.5893167", "0.5892459", "0.5883003", "0.5881696", "0.58720213", "0.58711845", "0.586282", "0.58553946", "0.58496267", "0.58398527", "0.583939", "0.58365726", "0.58273846", "0.5826651", "0.58157074", "0.58138496", "0.5810464", "0.5807915", "0.58041626", "0.580106", "0.5789516", "0.57881254", "0.57828104", "0.57697105", "0.5764161", "0.57581514", "0.57501876", "0.57491267", "0.5746645", "0.57340467", "0.5730667", "0.57274723", "0.57266", "0.5726049", "0.57224536", "0.57208663", "0.5715452", "0.57017434", "0.56996244", "0.5697462", "0.5696168", "0.5682461", "0.56817704", "0.56791365", "0.56750286", "0.56741625", "0.5670196", "0.56640446", "0.5660788", "0.5643265", "0.5637482", "0.56297904", "0.56280816", "0.56152487", "0.5613671", "0.56105614", "0.5597238", "0.5591245", "0.55861676", "0.55852824", "0.5581281", "0.55782104", "0.557752", "0.55756855", "0.5573482" ]
0.70435196
1
Are Post Likes enabled on single pages?
Включены ли посты «Лайки» на отдельных страницах?
function is_single_page_enabled() { $options = $this->get_options(); /** * Filters whether Likes should be enabled on single pages. * * @module likes * * @since 2.2.0 * * @param bool $enabled Are Post Likes enabled on single pages? */ return (bool) apply_filters( 'wpl_is_single_page_disabled', (bool) in_array( 'page', $options['show'] ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function is_likes_visible() {\n\t\tif ( Settings::is_syncing() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tglobal $wp_current_filter; // Used to apply 'sharing_show' filter\n\n\t\t$post = get_post();\n\n\t\t// Never show on feeds or previews\n\t\tif ( is_feed() || is_preview() ) {\n\t\t\t$enabled = false;\n\n\t\t\t// Not a feed or preview, so what is it?\n\t\t} else {\n\n\t\t\tif ( in_the_loop() ) {\n\t\t\t\t// If in the loop, check if the current post is likeable\n\t\t\t\t$enabled = $this->is_post_likeable();\n\t\t\t} else {\n\t\t\t\t// Otherwise, check and see if likes are enabled sitewide\n\t\t\t\t$enabled = $this->is_enabled_sitewide();\n\t\t\t}\n\n\t\t\tif ( post_password_required() )\n\t\t\t\t$enabled = false;\n\n\t\t\tif ( in_array( 'get_the_excerpt', (array) $wp_current_filter ) ) {\n\t\t\t\t$enabled = false;\n\t\t\t}\n\n\t\t\t// Sharing Setting Overrides ****************************************\n\n\t\t\t// Single post including custom post types\n\t\t\tif ( is_single() ) {\n\t\t\t\tif ( ! $this->is_single_post_enabled( $post->post_type ) ) {\n\t\t\t\t\t$enabled = false;\n\t\t\t\t}\n\n\t\t\t\t// Single page\n\t\t\t} elseif ( is_page() && ! is_front_page() ) {\n\t\t\t\tif ( ! $this->is_single_page_enabled() ) {\n\t\t\t\t\t$enabled = false;\n\t\t\t\t}\n\n\t\t\t\t// Attachment\n\t\t\t} elseif ( is_attachment() ) {\n\t\t\t\tif ( ! $this->is_attachment_enabled() ) {\n\t\t\t\t\t$enabled = false;\n\t\t\t\t}\n\n\t\t\t\t// All other loops\n\t\t\t} elseif ( ! $this->is_index_enabled() ) {\n\t\t\t\t$enabled = false;\n\t\t\t}\n\t\t}\n\n\t\tif ( $post instanceof WP_Post ) {\n\t\t\t// Check that the post is a public, published post.\n\t\t\tif ( 'attachment' == $post->post_type ) {\n\t\t\t\t$post_status = get_post_status( $post->post_parent );\n\t\t\t} else {\n\t\t\t\t$post_status = $post->post_status;\n\t\t\t}\n\t\t\tif ( 'publish' != $post_status ) {\n\t\t\t\t$enabled = false;\n\t\t\t}\n\t\t}\n\n\t\t// Run through the sharing filters\n\t\t/** This filter is documented in modules/sharedaddy/sharing-service.php */\n\t\t$enabled = apply_filters( 'sharing_show', $enabled, $post );\n\n\t\t/**\n\t\t * Filters whether the Likes should be visible or not.\n\t\t * Allows overwriting the options set in Settings > Sharing.\n\t\t *\n\t\t * @module likes\n\t\t *\n\t\t * @since 2.2.0\n\t\t *\n\t\t * @param bool $enabled Should the Likes be visible?\n\t\t */\n\t\treturn (bool) apply_filters( 'wpl_is_likes_visible', $enabled );\n\t}", "public function isLiked()\n {\n if (isset($this->pageData['liked']) && $this->pageData['liked'] == 'true') {\n return true;\n }\n return false;\n }", "function like( SocialUser $oUser, SocialPost $oSocialPost );", "public function isLiked()\n {\n return !!$this->likes->where('user_id', auth()->id())->count();\n }", "function userLikedThisPost($post_id=''){\n $result = query(\"SELECT * FROM likes WHERE user_id = \".loggedInUserId().\" AND post_id = {$post_id}\");\n return mysqli_num_rows($result) >= 1 ? true : false;\n}", "function AlreadyLiked( $post_id ) {\n\tif ( is_user_logged_in() ) {\n\t\t$user_id \t = get_current_user_id();\n\t\t$meta_USERS = get_post_meta( $post_id, \"_user_liked\" );\n\t\t$liked_USERS = \"\";\n\t\t\n\t\tif ( count( $meta_USERS ) != 0 ) {\n\t\t\t$liked_USERS = $meta_USERS[0];\n\t\t}\n\t\t\n\t\tif( ! is_array( $liked_USERS ) ){\n\t\t\t$liked_USERS = array();\n\t\t}\n\t\t\t\n\t\tif ( in_array( get_current_user_id(), $liked_USERS ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t\t\n\t} else {\n\t\n\t\t$meta_IPS = get_post_meta( $post_id, \"_user_IP\" );\n\t\t$ip \t = $_SERVER[\"REMOTE_ADDR\"];\n\t\t$liked_IPS = \"\";\n\t\t\n\t\tif ( count( $meta_IPS ) != 0 ) {\n\t\t\t$liked_IPS = $meta_IPS[0];\n\t\t}\n\t\t\n\t\tif ( ! is_array( $liked_IPS ) ) {\n\t\t\t$liked_IPS = array();\n\t\t}\n\t\t\n\t\tif ( in_array( $ip, $liked_IPS ) ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\t\n}", "function isLike($postID, $memberEmail, $client)\n{\n\t\n\t$colPL = $client->FacebookMongo->PostLikes;\n\t$isLiked = $colPL->count(['postID' => (string)$postID, 'memberEmail'=> (string)$memberEmail ]);\n\treturn $isLiked ;\n}", "public function isLiked()\n\t{\n\t\treturn !! $this->likes()\n\t\t\t->where('user_id', Auth::id())\n\t\t\t->count();\n\t}", "public function canLike()\n\t{\n\t\tglobal $registry;\n\t\t\n\t\t$result = true;\n\t\t\n\t\tif($this->type == self::TYPE_FOLLOW_ADD || $this->type == self::TYPE_GROUP_JOIN || $this->type == self::TYPE_PROFILE_EDIT)\n\t\t{\n\t\t\t$result = false;\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "public function testLikeCountCanBeRetrievedFromPost()\n {\n $this->post->like();\n\n $this->assertEquals($this->post->likesCount, 1);\n }", "public function userWantsToViewPost() : bool {\n return $this->hasQueryString($this->forumLayout->getPostLink()) && $this->getRequestPostId() !== \"\";\n }", "private static function alreadyLiked ($post_id)\n {\n\n if (is_user_logged_in()) { // user is logged in\n $user_id = get_current_user_id(); // current user\n $meta_USERS = get_post_meta($post_id, \"_user_liked\"); // user ids from post meta\n $liked_USERS = \"\"; // set up array variable\n\n if (count($meta_USERS) != 0) // meta exists, set up values\n $liked_USERS = $meta_USERS[0];\n\n if (!is_array($liked_USERS)) // make array just in case\n $liked_USERS = array();\n\n if (in_array($user_id, $liked_USERS)) // True if User ID in array\n return true;\n\n return false;\n } else { // user is anonymous, use IP address for voting\n $meta_IPS = get_post_meta($post_id, \"_user_IP\"); // get previously voted IP address\n $ip = $_SERVER[\"REMOTE_ADDR\"]; // Retrieve current user IP\n $liked_IPS = \"\"; // set up array variable\n\n if (count($meta_IPS) != 0) // meta exists, set up values\n $liked_IPS = $meta_IPS[0];\n\n if (!is_array($liked_IPS)) // make array just in case\n $liked_IPS = array();\n\n if (in_array($ip, $liked_IPS)) // True is IP in array\n return true;\n\n return false;\n }\n }", "function is_post_likeable( $post_id = 0 ) {\n\t\t$post = get_post( $post_id );\n\t\tif ( ! $post || is_wp_error( $post ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$sitewide_likes_enabled = (bool) $this->is_enabled_sitewide();\n\t\t$post_likes_switched = get_post_meta( $post->ID, 'switch_like_status', true );\n\n\t\t// on WPCOM, we need to look at post edit date so we don't break old posts\n\t\t// if post edit date predates this code, stick with the former (buggy) behavior\n\t\t// see: p7DVsv-64H-p2\n\t\t$last_modified_time = strtotime( $post->post_modified_gmt );\n\n\t\t$behavior_was_changed_at = strtotime( \"2019-02-22 00:40:42\" );\n\n\t\tif ( $this->in_jetpack || $last_modified_time > $behavior_was_changed_at ) {\n\t\t\t// the new and improved behavior on Jetpack and recent WPCOM posts:\n\t\t\t// $post_likes_switched is empty to follow site setting,\n\t\t\t// 0 if we want likes disabled, 1 if we want likes enabled\n\t\t\treturn $post_likes_switched || ( $sitewide_likes_enabled && $post_likes_switched !== '0' );\n\t\t}\n\n\t\t// implicit else (old behavior): $post_likes_switched simply inverts the global setting\n\t\treturn ( (bool) $post_likes_switched ) xor $sitewide_likes_enabled;\n\t}", "public function testUserCanToggleLikeStatusForPost()\n {\n $this->post->toggleLike();\n $this->assertTrue($this->post->isLiked());\n\n $this->post->toggleLike();\n $this->assertFalse($this->post->isLiked());\n }", "public function testUserCanLikeAPost()\n {\n // when that user 'likes' a Post\n $this->post->like();\n\n // then I should see evidence in the database that the Post has been 'Liked'\n $this->assertEquals(count(Post::find($this->post->id)->likes), 1);\n $this->assertTrue($this->post->isLiked());\n $this->assertDatabaseHas('likes', [\n 'user_id' => $this->user->id,\n 'likeable_id' => $this->post->id,\n 'likeable_type' => get_class($this->post)\n ]);\n }", "function wpsc_show_fb_like(){\n\tif('on' == get_option('wpsc_facebook_like'))\n\t\treturn true;\n\telse\n\t\treturn false;\n}", "public function user_can_like_post()\n {\n $this->withoutExceptionHandling();\n $token = auth()->attempt(['email' => 'user@mail.com', 'password' => 'password']);\n $header = [\n 'Accept' => 'application/json',\n 'Authorization' => \"Bearer $token\"\n ];\n $this->post('/api/posts/1/like', $header)->assertStatus(200);\n }", "public function like_post() {\n $user_id = strip_tags($this->post('user_id'));\n $post_id = strip_tags($this->post('post_id'));\n\n // Insert user data\n $userData = array(\n 'l_p_id' => $post_id,\n 'l_u_id' => $user_id\n );\n $insert = $this->likes->insert($userData);\n \n // Check if the user data is inserted\n if($insert){\n // Set the response and exit\n $this->response([\n 'status' => TRUE,\n 'message' => 'Liked',\n 'data' => $insert\n ], REST_Controller::HTTP_OK);\n }else{\n // Set the response and exit\n $this->response(\"Some problems occurred, please try again.\", REST_Controller::HTTP_BAD_REQUEST);\n }\n }", "function userLiked($post_id)\n{\n global $conn;\n global $username;\n $sql = \"SELECT * FROM rating_info WHERE username= '$username' \n \t\t AND post_id=$post_id AND rating_action='like'\";\n $result = mysqli_query($conn, $sql);\n if (mysqli_num_rows($result) > 0) {\n return true;\n }else{\n return false;\n }\n}", "public function hasLikedThisPost($postId = 0, $userId = 0)\n\t {\n\n\t if (isset($this->_post['like_users']) && $this->_post['like_users'] == true)\n\t return true;\n\t else\n\t return false;\n\t }", "function hasLiked(int $postId): bool\n {\n if ($this->db->query('SELECT user FROM likes WHERE post = ? AND user = ?', $postId, $this->userObject['id'])->numRows() == 1) {\n return true;\n } else {\n return false;\n }\n }", "function likePost(int $postId): bool\n {\n if (!$this->hasLiked($postId)) {\n $this->db->query(\"INSERT INTO likes (`post`, `user`, `time`) VALUES (?, ?, ?)\", $postId, $this->userObject['id'], $this->db->currentTime)->numRows();\n return true;\n } else {\n return false;\n }\n }", "public function countPostLike()\n\t{\n\t\treturn PostLike::find()->innerJoinWith('post', false)->where(['PostLike.createdById' => $this->id, 'Post.isActive' => 1])->count();\n\t}", "function userLiked($post_id)\r\n{\r\n global $conn;\r\n global $user_id;\r\n //$sql = \"SELECT * FROM rating_info WHERE UserID=$user_id AND PostIdx = $post_id AND rating_action='like'\";\r\n $result = mysqli_query($conn, \"SELECT * FROM rating_info WHERE UserID='$user_id' AND PostIdx = $post_id AND rating_action='like'\");\r\n if (mysqli_num_rows($result) > 0) {\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n}", "function socialwiki_page_likes($pid) {\n global $DB;\n $sql = 'SELECT *\n FROM {socialwiki_likes}\n WHERE pageid=?';\n return $DB->record_exists_sql($sql, array($pid));\n}", "public function testLikeWithPost(): void\n {\n Passport::actingAs($this->user);\n $response = $this->post(route('post_like_for_Post', [\n 'user' => $this->user,\n 'post' => $this->post->id,\n ]));\n $response->assertStatus(Response::HTTP_CREATED);\n $response->assertJsonStructure((new Like)->getFillable());\n $this->assertDatabaseHas('likes', $response->decodeResponseJson());\n }", "function checks_if_connected_user_liked_a_post($micropost_id){\n\t\tglobal $bdd;\n\t\t$q = $bdd->prepare(\"SELECT id FROM micropost_likes WHERE micropost_id =? AND user_id=?\");\n\t\t$q->execute([\n\t\t\t$micropost_id,\n\t\t\tget_session('id')\n\t\t]);\n\t\t$countr = $q->rowCount();\n\t\t$q->closeCursor();\n\t\treturn (bool) $countr;\n\t}", "function is_single_post_enabled( $post_type = 'post' ) {\n\t\t$options = $this->get_options();\n\t\treturn (bool) apply_filters(\n\t\t/**\n\t\t * Filters whether Likes should be enabled on single posts.\n\t\t *\n\t\t * The dynamic part of the filter, {$post_type}, allows you to specific the post type where Likes should be enabled.\n\t\t *\n\t\t * @module likes\n\t\t *\n\t\t * @since 2.2.0\n\t\t *\n\t\t * @param bool $enabled Are Post Likes enabled on single posts?\n\t\t */\n\t\t\t\"wpl_is_single_{$post_type}_disabled\",\n\t\t\t(bool) in_array( $post_type, $options['show'] )\n\t\t);\n\t}", "public function facebookAddLike()\n {\n $facebook = $this->_getFacebookObject();\n if ($facebook->streams->addLike($this->vars->post_id)) {\n $fql = 'SELECT post_id, likes FROM stream WHERE post_id=\"' . $this->vars->post_id . '\"';\n try {\n $post = $facebook->fql->run($fql);\n } catch (Horde_Service_Facebook_Exception $e) {\n // Already set the like by the time we are here, so just indicate\n // that.\n return _(\"You like this\");\n }\n\n $post = current($post);\n $likes = $post['likes'];\n if ($likes['count'] > 1) {\n $html = sprintf(ngettext(\"You and %d other person likes this\", \"You and %d other people like this\", $likes['count'] - 1), $likes['count'] - 1);\n } else {\n $html = _(\"You like this\");\n }\n return $html;\n }\n\n return _(\"Unable to set like.\");\n }", "function is_index_enabled() {\n\t\t$options = $this->get_options();\n\t\t/**\n\t\t * Filters whether Likes should be enabled on archive/front/search pages.\n\t\t *\n\t\t * @module likes\n\t\t *\n\t\t * @since 2.2.0\n\t\t *\n\t\t * @param bool $enabled Are Post Likes enabled on archive/front/search pages?\n\t\t */\n\t\treturn (bool) apply_filters( 'wpl_is_index_disabled', (bool) in_array( 'index', $options['show'] ) );\n\t}", "public function get_myLikes() {\r\n try {\r\n $me = $this->facebook->api('/me/likes?access_token=' . $this->facebook->getAccessToken());\r\n return $me;\r\n } catch (FacebookApiException $e) {\r\n $e;\r\n return false;\r\n }\r\n }", "function have_posts() {}", "function isLiked(int $podcastId, int $userId) {\n if(\\App\\Like::where('podcast_id', $podcastId)->where('user_id', $userId)->count() > 0) {\n return true;\n } else {\n return false;\n }\n}", "function socialwiki_liked($uid, $pid) {\n global $DB;\n $sql = 'SELECT *\n FROM {socialwiki_likes}\n WHERE userid=? AND pageid=?';\n return $DB->record_exists_sql($sql, array($uid, $pid));\n}", "function get_likes($set = false){\n global $post;\n $views = get_post_meta($post->ID, \"umbrella_post_likes\", true);\n if($set){\n $views = intval($views) + 1;\n if($views){\n update_post_meta($post->ID, \"umbrella_post_likes\" , $views );\n }else{\n add_post_meta($post->ID, \"umbrella_post_likes\" , 1 );\n }\n }\n return $views ? number_format($views, 0, ' ', ' ') : 0;\n}", "public function isLikedBy(){\n $user = auth()->user();\n return (bool) $user->likes\n ->where('recipe_id', $this->id)\n ->where('liked', true)\n ->count();\n }", "public function is_enabled_sitewide() {\n\t\t/**\n\t\t * Filters whether Likes are enabled by default on all posts.\n\t\t * true if enabled sitewide, false if not.\n\t\t *\n\t\t * @module likes\n\t\t *\n\t\t * @since 2.2.0\n\t\t *\n\t\t * @param bool $option Are Likes enabled sitewide.\n\t\t */\n\t\treturn (bool) apply_filters( 'wpl_is_enabled_sitewide', ! Jetpack_Options::get_option_and_ensure_autoload( 'disabled_likes', 0 ) );\n\t}", "static function discover($post_id) {\n if (logged_in()) {\n $check = new self(array(\"post_id\" => $post_id,\n \"user_id\" => Visitor::current()->id));\n\n if (!$check->no_results)\n $_SESSION[\"likes\"][$post_id] = $check->id;\n }\n\n return isset($_SESSION[\"likes\"][$post_id]);\n }", "static function show_likes($id_post){\n if(!is_int($id_post))\n return false;\n return self::$PDO->query(\"SELECT t1.*,concat(t2.fname,' ',t2.name) as liker_name FROM \".self::$prefix.\"liked_post t1,\".self::$prefix.\"users t2 WHERE t1.ID_USER=t2.ID AND ID_POST=\".$id_post)->fetchAll();\n }", "public function actionLikePost() {\n\n $userId = Users::checkLogged();\n \n if (isset($_POST['data'])) {\n $result = Pictures::addLike($_POST['data']);\n Pictures::addUniqueLike($_POST['data'], $userId);\n }\n if (isset($_POST['data1'])) {\n $result = Pictures::removeLike($_POST['data1']);\n Pictures::removeUniqueLike($_POST['data1'], $userId);\n }\n return true;\n }", "function book_has_post() {\r\n global $book;\r\n\r\n return ( $book->post > 0 );\r\n}", "function ShareLike()\n {\n SeanceHelper::ShareLike($this->Core, Request::GetPost(\"seanceId\"));\n }", "static function exists($post_id): bool {\n static $results;\n fallback($_SESSION['likes'], array());\n\n if (logged_in() and !isset($results)) {\n $results = SQL::current()->select(\n tables:\"likes\",\n fields:array(\"id\", \"post_id\"),\n conds:array(\"user_id\" => Visitor::current()->id),\n order:\"post_id ASC\"\n )->fetchAll();\n\n foreach ($results as $result) {\n $this_id = $result[\"id\"];\n $this_post_id = $result[\"post_id\"];\n $_SESSION['likes'][$this_post_id] = $this_id;\n }\n }\n\n return isset($_SESSION['likes'][$post_id]);\n }", "public static function fbLike($post) {\n ob_start();\n echo '<script src=\"http://connect.facebook.net/en_US/all.js#xfbml=1\"></script>';\n echo '<span class=\"meta-link\">';\n echo '<fb:like href=\"' . __BASE_URL . '/blog/viewpost/' . $post->BlogpostId . '\" layout=\"button_count\" show_faces=\"false\" width=\"20\" font=\"verdana\"></fb:like>';\n echo '</span>';\n return ob_get_clean();\n }", "private function checkPostsPage() {\r\r\n return is_home() && get_option('show_on_front') == 'page' && isset($this->post->ID) && $this->post->ID == get_option('page_for_posts');\r\r\n }", "public function onPostLike($event) {\n $post = Post::findOrFail($event->post_id);\n // inkrementuj popularitu clanku lajknutim\n $this->incrPopularity($event->post_id, 'like');\n }", "public function getSocialLikes()\n {\n return $this->social_likes;\n }", "function is_liked(mysqli $link, int $post_id, int $current_user_id)\n{\n $sql = \"SELECT likes.*\n FROM likes\n WHERE likes.post_id = ? AND likes.user_id = ?\";\n $stmt = db_get_prepare_stmt($link, $sql, [$post_id, $current_user_id]);\n mysqli_stmt_execute($stmt);\n $result = mysqli_stmt_get_result($stmt);\n if (!$result) {\n exit ('error'.mysqli_error($link));\n }\n\n return mysqli_fetch_all($result) ? true : false;\n}", "public function likeAction()\r\n {\r\n $post = $this->request->input('post');\r\n\r\n if($this->request->all())\r\n {\r\n if(Forum::userAlreadylikePost($post, Auth::returnUserId()))\r\n {\r\n echo Json::encode(array('status' => 'error'));\r\n }\r\n else\r\n {\r\n Forum::insertLike($post, Auth::returnUserId());\r\n echo Json::encode(array('status' => 'success', 'data' => Forum::likesByPost($post)));\r\n }\r\n }\r\n else\r\n {\r\n $this->redirect('/forum'); \r\n }\r\n }", "function plugin_like() {\n\t\t\t/*\n\t\t\t$content = '<p>'.__('Why not do any or all of the following:','schemaplugin').'</p>';\n\t\t\t$content .= '<ul>';\n\t\t\t$content .= '<li><a href=\"'.$this->homepage.'\">'.__('Link to it so other folks can find out about it.','schemaplugin').'</a></li>';\n\t\t\t$content .= '<li><a href=\"http://wordpress.org/extend/plugins/'.$this->hook.'/\">'.__('Give it a good rating on WordPress.org.','schemaplugin').'</a></li>';\n\t\t\t$content .= '<li><a href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=2017947\">'.__('Donate a token of your appreciation.','schemaplugin').'</a></li>';\n\t\t\t$content .= '</ul>';\n\t\t\t$this->postbox($this->hook.'like', 'Like this plugin?', $content);\n\t\t\t*/\n\t\t}", "public function likePost($post_id, $action = 'get', $type = '') {\n if(!is_numeric($post_id)) {\n return;\n }\n\n switch($action) {\n\n case 'get':\n $like_count = get_post_meta($post_id, '_qode-like', true);\n if(!$like_count) {\n $like_count = 0;\n add_post_meta($post_id, '_qode-like', $like_count, true);\n }\n\n if($type == 'icon') {\n return;\n }\n\n $return_value = $like_count;\n\n if($like_count != 1) {\n $return_value .= \"<span> \" . esc_html__(' Likes', 'bridge-core') . \"</span>\";\n } else {\n $return_value .= \"<span> \" . esc_html__(' Like', 'bridge-core') . \"</span>\";\n }\n\n return $return_value;\n break;\n\n case 'update':\n $like_count = get_post_meta($post_id, '_qode-like', true);\n if(isset($_COOKIE['qode-like_' . $post_id])) {\n return $like_count;\n }\n\n $like_count++;\n update_post_meta($post_id, '_qode-like', $like_count);\n setcookie('qode-like_' . $post_id, $post_id, time() * 20, '/');\n\n if($type == 'icon') {\n return;\n }\n\n $return_value = $like_count;\n if($like_count != 1) {\n $return_value .= \"<span> \" . esc_html__(' Likes', 'bridge-core') . \"</span>\";\n } else {\n $return_value .= \"<span> \" . esc_html__(' Like', 'bridge-core') . \"</span>\";\n }\n\n return $return_value;\n break;\n }\n }", "function just_liked_by_user($micropost_id){\n\t\tglobal $bdd;\n\t\t$q = $bdd->prepare('SELECT id FROM micropost_likes \n\t\t\t\t\t\tWHERE user_id =:user_id AND micropost_id=:micropost_id'\n\t\t);\n\n\t\t$q->execute([\n\t\t'user_id' => get_session('id'),\n\t\t'micropost_id' => $micropost_id\n\n\t\t]);\n\t\treturn (bool) $q->rowCount();\n\t}", "function already_liked($dbh, $me, $pID) {\n\t$me = pg_escape_string($me);\n $pID = pg_escape_string($pID);\n\t$str = \" select * from like_record\n\t\t where name = '$me' AND postid = '$pID'\";\n\t$result = pg_query($dbh, $str);\n\tif( !$result ){\n\t\treturn false;\n\t}\n\t$row = pg_fetch_row($result);\n\t$count = $row[0];\n\tif( !$count ){\n\t\treturn false;\n\t}\t\n\treturn true;\n}", "function userHasLiked($article_id, $user_id) {\n\t\t$response = $this->_connection->selectAllFromWhere ( \"likes\", \"`article_id`=:article_id and `user_id`=:user_id\", array (\n\t\t\t\t\":article_id\" => $article_id,\n\t\t\t\t\":user_id\" => $user_id \n\t\t) );\n\t\tif ($this->_connection->responseIsEmpty ( $response )) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\t$row = $response->fetch ();\n\t\t\tif ($row ['is_like'] == '0') {\n\t\t\t\treturn \"dislike\";\n\t\t\t} elseif ($row ['is_like'] == '1') {\n\t\t\t\treturn 'like';\n\t\t\t}\n\t\t}\n\t}", "public function hasliked($post_id)\n {\n return (bool)$this->likes()->where('post_id', $post_id)->first(['id']);\n }", "public function likes(){\n }", "public function toggleLike(Post $post)\n {\n // to the like variable.\n // If we found a like delete it, if we didn't create one\n if ($this->like) {\n $this->like->delete();\n $this->like = false;\n } else {\n $this->like = $this->post->likes()->create(['user_id' => auth()->id(), 'liked' => 0]);\n }\n $this->emitSelf('refresh');\n\n }", "function have_posts()\n{\n}", "public function a_user_can_like_a_post()\n {\n // given I have a post\n $post = factory(\\App\\Post::class)->create();\n \n // and a user\n\n $user = factory(\\App\\User::class)->create();\n\n // and that user is logged in \n\n $this->actingAs($user);\n\n // when they like a post\n\n $post->like();\n\n //then we should see evidence in the database and the post should be liked\n\n $this->assertDatabaseHas('likes', [\n 'user_id' => $user->id,\n 'likeable_id' => $post->id,\n 'likeable_type' => get_class($post)\n ]);\n\n $this->assertTrue($post->isLiked());\n \n }", "function s7n_post_like()\n{\n if (!wp_verify_nonce($_POST['nonce'], 's7n_post_like_nonce') || !isset($_POST['nonce'])) {\n wp_send_json(array('status' => 0, 'message' => __('مشکلی پیش آمده دوباره امتحان کنید.')));\n }\n $like_cookie = null;\n $type = $_POST['type'];\n $post_id = $_POST['postid'];\n $ip = s7n_get_ip();\n if (isset($_COOKIE[$type . '_' . $post_id])) {\n $like_cookie = $_COOKIE[$type . '_' . $post_id];\n }\n $likes = get_post_meta($post_id, 's7n_post_' . $type, true);\n $likes_ip = get_post_meta($post_id, 's7n_post_' . $type . '_ips', true);\n $likes_ip = !$likes_ip ? array() : $likes_ip;\n $likes = !$likes ? 0 : $likes;\n if (!in_array($ip, $likes_ip) || $like_cookie != 1) {\n setcookie($type . '_' . $post_id, 1, time() + (86400 * 1825), \"/\"); // 86400 = 1 day\n array_push($likes_ip, $ip);\n $likes += 1;\n } else {\n setcookie($type . '_' . $post_id, 0, time() + (86400 * 1825), \"/\"); // 86400 = 1 day\n if (($key = array_search($ip, $likes_ip)) !== false) {\n unset($likes_ip[$key]);\n }\n $likes -= 1;\n }\n update_post_meta($post_id, 's7n_post_' . $type . '_ips', $likes_ip);\n update_post_meta($post_id, 's7n_post_' . $type, $likes);\n $likes = get_post_meta($post_id, 's7n_post_' . $type, true);\n wp_send_json(array('status' => 1, 'message' => __('با موفقیت بروزرسانی شد.'), 'info' => array('count' => $likes)));\n}", "public function getLikes()\n\t{\n\t\treturn $this->likes;\n\t}", "function share_count(Model_Blog_Post $post);", "function socialwiki_page_like($uid, $pid, $swid) {\n if (socialwiki_liked($uid, $pid)) {\n socialwiki_delete_like($uid, $pid);\n } else {\n socialwiki_add_like($uid, $pid, $swid);\n // TODO: could optimize which peers we recompute: only those who have likes in common.\n }\n socialwiki_peer::socialwiki_update_peers(true, false, $swid, $uid); // Update like similarity to other peers.\n return socialwiki_numlikes($pid);\n}", "function countOfPostLike($postID, $client)\n{\n\t$colPL = $client->FacebookMongo->PostLikes;\n\t$cntLikes = $colPL->count(['postID' => (string) $postID]);\n\n\treturn $cntLikes;\n}", "protected function setLikes()\n {\n $this->likes = $this->db()->query(\"SELECT id FROM likes WHERE contentId = ?\", array($this->id))->getRowCount();\n }", "function userDisliked($post_id)\n{\n global $conn;\n global $username;\n $sql = \"SELECT * FROM rating_info WHERE username='$username' \n \t\t AND post_id=$post_id AND rating_action='dislike'\";\n $result = mysqli_query($conn, $sql);\n if (mysqli_num_rows($result) > 0) {\n return true;\n }else{\n return false;\n }\n}", "function theclick_post_count_like($args=[]){\n $args = wp_parse_args($args, [\n 'show_like' => '1',\n 'class' => '',\n 'before' => '',\n 'after' => '',\n 'icon' => '',\n 'echo' => true,\n 'show_text' => true\n ]);\n if($args['show_like'] !== '1') return;\n\n $classes = trim(implode(' ', ['ef5-like', $args['class']] ));\n $args['icon'] = !empty($args['icon']) ? '<span class=\"meta-icon '.$args['icon'].'\">&nbsp;&nbsp;</span>' : '';\n ob_start();\n $like_number = 100;\n echo '<div class=\"'.esc_attr($classes).'\">';\n printf ('%s' , $args['before']);\n printf(\n _nx(\n '%1$s %2$s',\n '%1$s %3$s',\n $like_number,\n 'view title',\n 'theclick'\n ),\n number_format_i18n( $like_number ),\n $args['show_text'] ? esc_html__('Like','theclick') : '',\n $args['show_text'] ? esc_html__('Likes','theclick') : ''\n );\n printf ('%s' , $args['after']);\n echo '</div>';\n \n if($args['echo'] === true)\n echo ob_get_clean();\n else \n return ob_get_clean();\n}", "public function getLikes()\n {\n return $this->likes;\n }", "public function getLikes()\n {\n return $this->likes;\n }", "public static function isCompatiblePost() {\r\n return\r\n TpsOptions::get('enable_on_pages') ?\r\n (is_single() || is_page()) :\r\n is_single();\r\n }", "public function numberOfLikes()\n {\n //\n }", "function is_post_public( $post ) {\n\t\tif ( !is_array( $post ) ) {\n\t\t\t$post = (array) $post;\n\t\t}\n\n\t\tif ( 0 < strlen( $post['post_password'] ) )\n\t\t\treturn false;\n\t\tif ( ! in_array( $post['post_type'], get_post_types( array( 'public' => true ) ) ) )\n\t\t\treturn false;\n\t\t$post_status = get_post_status( $post['ID'] ); // Inherited status is resolved here.\n\t\tif ( ! in_array( $post_status, get_post_stati( array( 'public' => true ) ) ) )\n\t\t\treturn false;\n\t\treturn true;\n\t}", "function userDisliked($post_id)\r\n{\r\n global $conn;\r\n global $user_id;\r\n //$sql = \"SELECT * FROM rating_info WHERE UserID=$user_id AND PostIdx = $post_id AND rating_action='dislike'\";\r\n $result = mysqli_query($conn, \"SELECT * FROM rating_info WHERE UserID='$user_id' AND PostIdx = $post_id AND rating_action='dislike'\");\r\n if (mysqli_num_rows($result) > 0) {\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n}", "function all_business_get_project_likes($template_type = 'page', $show = true) {\r\n\tif ($template_type == 'page') {\r\n\t\t$out = cmsmastersLike(false);\r\n\t} elseif ($template_type == 'post') {\r\n\t\t$cmsmasters_option = all_business_get_global_options();\r\n\t\t\r\n\t\tif ($cmsmasters_option[CMSMASTERS_SHORTNAME . '_portfolio_project_like']) {\r\n\t\t\t$out = '<div class=\"project_details_item\">' . \r\n\t\t\t\t'<div class=\"project_details_item_title\">' . esc_html__('Likes', 'all-business') . ':' . '</div>' . \r\n\t\t\t\t'<div class=\"project_details_item_desc details_item_desc_like\">' . \r\n\t\t\t\t\tcmsmastersLike(false) . \r\n\t\t\t\t'</div>' . \r\n\t\t\t'</div>';\r\n\t\t}\r\n\t}\r\n\t\r\n\t\r\n\tif ($show) {\r\n\t\techo $out;\r\n\t} else {\r\n\t\treturn $out;\r\n\t}\r\n}", "function you_like($user_id=0, $post_id=0){\n\tglobal $db;\n\t$query=\"SELECT like_id\n\t\t\tFROM likes\n\t\t\tWHERE user_id = $user_id\n\t\t\tAND post_id = $post_id\n\t\t\tLIMIT 1\";\n\t$result = $db->query($query);\n\tif($result->num_rows == 1){\n\t\t//this user liked this picture\n\t\treturn 'liked';\n\t}else{\n\t\treturn 'like';\n\t}\n\n\n}", "function pronamic_post_like_can_vote( $post_id = null, $comment_type = 'pronamic_like' ) {\n\tglobal $pronamic_post_like_plugin;\n\n\treturn $pronamic_post_like_plugin->can_vote( $post_id, $comment_type );\n}", "public function getUserLikes($fbid, $pageid, $resetCache=false)\n {\n $fql = \"SELECT uid FROM page_fan WHERE page_id=\\\"$pageid\\\" and uid=\\\"$fbid\\\"\";\n $data = $this->_doFQLQuery($fql, $resetCache);\n if ( !is_array($data) )\n {\n return false;\n }\n return true;\n }", "public function getPost($user_id,$post_id){\n // 1-get number of likes in this post\n $like=Like::where('post_id',$post_id)->count();\n // 2-get number of commints in this post\n $numb_commint=Commint::where('post_id',$post_id)->count();\n // 3-get all commints in this post\n $commints=Commint::where('post_id',$post_id)->orderBy('created_at', 'asc')->get();\n // 4-check if this user added like?\n $checklikes=DB::table('likes')->where([['post_id',$post_id],['user_id',$user_id]] )->value('like');\n // 6-get this post\n $post=Post::find($post_id);\n \n if($checklikes==1){\n $checklikes='found';\n }else\n {\n $checklikes='notfound';\n }\n\n return view('pages.post',compact('post','commints','like','numb_commint','checklikes'));\n }", "function getPostLikes($post_id){\n $result = query(\"SELECT * FROM likes WHERE post_id = {$post_id}\");\n return mysqli_num_rows($result);\n}", "function nb_get_post_registered_user_liked( $object, $field_name, $request ) {\n // could test $object['id'] != 0\n $nb_post_liked_user_ids_meta = null;\n\n // In first release need to be logged in to like a post\n $user_id = get_current_user_id();\n $nb_post_liked_user_ids_meta = get_post_meta( $object['id'], 'nb_post_liked_user_ids', true );\n\n// if ( count( $nb_post_liked_user_ids_meta ) != 0 ) {\n//\t\t$nb_post_liked_user_ids = $nb_post_liked_user_ids_meta[0];\n// }\n\tif ( !is_array( $nb_post_liked_user_ids_meta ) ) {\n\t\t$nb_post_liked_user_ids_meta = array();\n\t}\n\n // check is $user_id is already in array to return 1, or 0 otherwise\n if ( in_array( $user_id, $nb_post_liked_user_ids_meta ) ) {\n return 1;\n\t} else {\n\t\treturn 0;\n\t};\n}", "function likes()\n {\n $sqlLikeList = \"select activity.id as activity_id, film_id, user_id, title, avatar from \" . DEFAULT_SCHEMA . \".activity activity \n inner join \" . DEFAULT_SCHEMA . \".films films on activity.film_id = films.id\n inner join \" . DEFAULT_SCHEMA . \".users users on activity.user_id = users.id\n where users.id = \" . $this->getUserId() . \" and activity.name = 'like'\n order by activity.updated_at\";\n $likeList = $this->Profile->custom($sqlLikeList);\n $this->set('likelist', $likeList);\n }", "public function isAllowedPosting()\r\n {\r\n return Mage::getStoreConfig('productrewiewspicture_options/review_pictures/enable_pictures');\r\n }", "function yz_is_user_have_posts() {\n\n // Get User Post Count.\n $user_post_count = yz_get_user_posts_nbr();\n\n if ( 0 == $user_post_count ) {\n return false;\n }\n\n return true;\n}", "public function isSlidesFromPosts(){\n\t\treturn $this->is_posts();\n\t}", "public function isLikedBy(User $user)\n {\n return (bool) $user->likes->where('tweet_id', $this->id)->where('liked', true)->count(); //must switch to redis for high volume\n }", "public function like()\n\t{\n\t}", "public function is_single($post = '')\n {\n }", "public static function isLiked( $ns = '' )\n\t{\n\t\treturn ( isset( self::$likes[$ns] ) );\n\t}", "public function likeAction() {\n // Validate request methods\n $this->validateRequestMethod();\n\n $viewer = Engine_Api::_()->user()->getViewer();\n\n if (Engine_Api::_()->core()->hasSubject('sitepagevideo_video')) {\n $subject = $video = Engine_Api::_()->core()->getSubject('sitepagevideo_video');\n $sitepage = $video->getParent();\n }\n\n if (!$video || !$sitepage)\n $this->respondWithError(\"no_record\");\n\n if (!$this->_helper->requireUser()->isValid()) {\n $this->respondWithError('unauthorized');\n }\n\n if (!$this->_helper->requireAuth()->setAuthParams(null, null, 'comment')->isValid()) {\n $this->respondWithError('unauthorized');\n }\n\n $commentedItem = $subject;\n $likeTable = Engine_Api::_()->getDbtable('likes', 'core');\n if ($likeTable->isLike($subject, $viewer))\n $this->successResponseNoContent('no_content', true);\n\n // Process\n $db = $commentedItem->likes()->getAdapter();\n $db->beginTransaction();\n try {\n $commentedItem->likes()->addLike($viewer);\n // Add notification\n $owner = $commentedItem->getOwner();\n $this->view->owner = $owner->getGuid();\n if ($owner->getType() == 'user' && $owner->getIdentity() != $viewer->getIdentity()) {\n $notifyApi = Engine_Api::_()->getDbtable('notifications', 'activity');\n $notifyApi->addNotification($owner, $viewer, $commentedItem, 'liked', array(\n 'label' => $commentedItem->getShortType()\n ));\n }\n\n $sitepageVersion = Engine_Api::_()->getDbtable('modules', 'core')->getModule('sitepage')->version;\n if ($sitepageVersion >= '4.2.9p3') {\n if (Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitepagemember'))\n Engine_Api::_()->sitepagemember()->joinLeave($subject, 'Join');\n Engine_Api::_()->sitepage()->itemCommentLike($subject, 'sitepage_contentlike', '');\n }\n $db->commit();\n $this->successResponseNoContent('no_content', true);\n } catch (Exception $ex) {\n $db->rollBack();\n $this->respondWithValidationError('internal_server_error', $ex->getMessage());\n }\n }", "public function getLikes()\n {\n $model = new Like();\n\n $likes = $model->findBy(['comment_id' => $this->id]);\n\n return count($likes);\n\n }", "function socialwiki_is_user_favourite($uid, $pid, $swid) {\n global $DB;\n $page = socialwiki_get_page($pid);\n $sql = 'SELECT pageid\n FROM {socialwiki_likes} l\n INNER JOIN {socialwiki_pages} p\n ON l.pageid=p.id\n WHERE l.userid=? and p.title=? and l.subwikiid=?\n ORDER BY p.timecreated DESC';\n $out = $DB->get_record_sql($sql, array($uid, $page->title, $swid), IGNORE_MULTIPLE);\n if (isset($out->pageid)) {\n return ($out->pageid == $pid);\n }\n return false;\n}", "public function user_can_post() {\n\t\treturn rcp_is_active();\n\t}", "public function isLiked($user_id = null)\n {\n return $this->likes()->where('user_id', $this->getUserId($user_id))->exists();\n }", "function reblogs_enabled_sitewide() {\n\t\t/**\n\t\t * Filters whether Reblogs are enabled by default on all posts.\n\t\t * true if enabled sitewide, false if not.\n\t\t *\n\t\t * @module likes\n\t\t *\n\t\t * @since 3.0.0\n\t\t *\n\t\t * @param bool $option Are Reblogs enabled sitewide.\n\t\t */\n\t\treturn (bool) apply_filters( 'wpl_reblogging_enabled_sitewide', ! get_option( 'disabled_reblogs' ) );\n\t}", "function wp_revisions_enabled($post)\n{\n}", "function rank_math_is_blog_public() {\n\treturn '1' === (string) get_option( 'blog_public' );\n}", "public function likePost(Post $post, Request $request){\n\n // dd($post->likeBy($request->user()));\n //the $request->user()->id gets the id of the currently login user\n $post->likes()->create([\n 'user_id' => $request->user()->id\n ]);\n\n //this will check if the user already liked the post\n //then send email if not. \n if(!$post->likes()->onlyTrashed()->where('user_id', $request->user()->id)->count()){\n //send mail\n //the mail accetps 2 argument\n //first the authenticated user\n //second the post that was liked\n //the $post->user was the users who owned the post\n Mail::to($post->user)->send(new PostLiked(auth()->user(), $post));\n }\n\n return back();\n }", "public function isLiked($id = null)\n {\n $id = $id ?? auth()->id();\n return !! $this->likes->where('user_id', $id)->count();\n }", "public function like()\n {\n // we have nobody to load into the user_id field\n if(! auth()->check()) return;\n \n // check if the current user has already liked the model; isLikedByUser() is defined in\n if($this->isLikedByUser(auth()->id())){\n return;\n };\n \n $this->likes()->create(['user_id' => auth()->id()]);\n }", "public function hasPost($name){ }" ]
[ "0.74070346", "0.7117247", "0.68594897", "0.6850733", "0.6826812", "0.67655396", "0.6728284", "0.6715279", "0.66862136", "0.667889", "0.66650575", "0.66537213", "0.6625385", "0.6608146", "0.65920305", "0.65773284", "0.6537653", "0.6528363", "0.6519979", "0.6516494", "0.6491546", "0.64768064", "0.6469827", "0.64631724", "0.6453526", "0.6447856", "0.64200747", "0.6414804", "0.6388659", "0.6376082", "0.63700396", "0.63471776", "0.63377243", "0.6313731", "0.6271637", "0.62683856", "0.62678134", "0.62606597", "0.6254851", "0.6245424", "0.6226695", "0.62220293", "0.62169296", "0.6214092", "0.61747503", "0.6172919", "0.61656773", "0.6162446", "0.61593574", "0.61492807", "0.6136797", "0.61225116", "0.611682", "0.611367", "0.6111974", "0.61056656", "0.6102633", "0.6100616", "0.6088793", "0.6076349", "0.6074222", "0.6068185", "0.6054067", "0.6025786", "0.6025135", "0.60002804", "0.59945863", "0.5993666", "0.5993666", "0.59921044", "0.5989799", "0.598931", "0.5984836", "0.59843916", "0.5947995", "0.5933915", "0.5931442", "0.5924312", "0.5922904", "0.5920452", "0.59190226", "0.59075016", "0.59010035", "0.5900564", "0.5895318", "0.58857787", "0.5882117", "0.58797395", "0.58763504", "0.5874212", "0.58635455", "0.58620006", "0.58607787", "0.5858541", "0.58526796", "0.58367604", "0.58335775", "0.58333755", "0.58302355", "0.5823153" ]
0.7134668
1
Used for WPCOM ONLY. Comment likes are in their own module in Jetpack. Returns if comment likes are enabled. Defaults to 'off'
Используется только для WPCOM. Лайки комментариев находятся в своем собственном модуле в Jetpack. Возвращает значение, указывающее, включены ли лайки комментариев. По умолчанию: 'off'
function is_comments_enabled() { /** * Filters whether Comment Likes are enabled. * true if enabled, false if not. * * @module comment-likes * * @since 2.2.0 * * @param bool $option Are Comment Likes enabled sitewide. */ return (bool) apply_filters( 'jetpack_comment_likes_enabled', get_option( 'jetpack_comment_likes_enabled', false ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function is_likes_visible() {\n\t\tif ( Settings::is_syncing() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tglobal $wp_current_filter; // Used to apply 'sharing_show' filter\n\n\t\t$post = get_post();\n\n\t\t// Never show on feeds or previews\n\t\tif ( is_feed() || is_preview() ) {\n\t\t\t$enabled = false;\n\n\t\t\t// Not a feed or preview, so what is it?\n\t\t} else {\n\n\t\t\tif ( in_the_loop() ) {\n\t\t\t\t// If in the loop, check if the current post is likeable\n\t\t\t\t$enabled = $this->is_post_likeable();\n\t\t\t} else {\n\t\t\t\t// Otherwise, check and see if likes are enabled sitewide\n\t\t\t\t$enabled = $this->is_enabled_sitewide();\n\t\t\t}\n\n\t\t\tif ( post_password_required() )\n\t\t\t\t$enabled = false;\n\n\t\t\tif ( in_array( 'get_the_excerpt', (array) $wp_current_filter ) ) {\n\t\t\t\t$enabled = false;\n\t\t\t}\n\n\t\t\t// Sharing Setting Overrides ****************************************\n\n\t\t\t// Single post including custom post types\n\t\t\tif ( is_single() ) {\n\t\t\t\tif ( ! $this->is_single_post_enabled( $post->post_type ) ) {\n\t\t\t\t\t$enabled = false;\n\t\t\t\t}\n\n\t\t\t\t// Single page\n\t\t\t} elseif ( is_page() && ! is_front_page() ) {\n\t\t\t\tif ( ! $this->is_single_page_enabled() ) {\n\t\t\t\t\t$enabled = false;\n\t\t\t\t}\n\n\t\t\t\t// Attachment\n\t\t\t} elseif ( is_attachment() ) {\n\t\t\t\tif ( ! $this->is_attachment_enabled() ) {\n\t\t\t\t\t$enabled = false;\n\t\t\t\t}\n\n\t\t\t\t// All other loops\n\t\t\t} elseif ( ! $this->is_index_enabled() ) {\n\t\t\t\t$enabled = false;\n\t\t\t}\n\t\t}\n\n\t\tif ( $post instanceof WP_Post ) {\n\t\t\t// Check that the post is a public, published post.\n\t\t\tif ( 'attachment' == $post->post_type ) {\n\t\t\t\t$post_status = get_post_status( $post->post_parent );\n\t\t\t} else {\n\t\t\t\t$post_status = $post->post_status;\n\t\t\t}\n\t\t\tif ( 'publish' != $post_status ) {\n\t\t\t\t$enabled = false;\n\t\t\t}\n\t\t}\n\n\t\t// Run through the sharing filters\n\t\t/** This filter is documented in modules/sharedaddy/sharing-service.php */\n\t\t$enabled = apply_filters( 'sharing_show', $enabled, $post );\n\n\t\t/**\n\t\t * Filters whether the Likes should be visible or not.\n\t\t * Allows overwriting the options set in Settings > Sharing.\n\t\t *\n\t\t * @module likes\n\t\t *\n\t\t * @since 2.2.0\n\t\t *\n\t\t * @param bool $enabled Should the Likes be visible?\n\t\t */\n\t\treturn (bool) apply_filters( 'wpl_is_likes_visible', $enabled );\n\t}", "public function is_enabled_sitewide() {\n\t\t/**\n\t\t * Filters whether Likes are enabled by default on all posts.\n\t\t * true if enabled sitewide, false if not.\n\t\t *\n\t\t * @module likes\n\t\t *\n\t\t * @since 2.2.0\n\t\t *\n\t\t * @param bool $option Are Likes enabled sitewide.\n\t\t */\n\t\treturn (bool) apply_filters( 'wpl_is_enabled_sitewide', ! Jetpack_Options::get_option_and_ensure_autoload( 'disabled_likes', 0 ) );\n\t}", "function wpsc_show_fb_like(){\n\tif('on' == get_option('wpsc_facebook_like'))\n\t\treturn true;\n\telse\n\t\treturn false;\n}", "function allow_comment(){\r\n global $post;\r\n\t$comment_status = $post->comment_status;\r\n\tif ($comment_status == 'open')\r\n \treturn true;\r\n\telse\r\n\t\treturn false;\r\n}", "public static function spindogs_disable_comments_status() {\n return false;\n }", "public function isCommentEnable(): bool\n {\n return $this->commentEnable;\n }", "public function is_commenting_enabled() {\n\t\treturn (bool) get_option( self::COMMENT_OPTION, '' );\n\t}", "public function disableComments()\n {\n if($this->postID == 0)\n {\n return false;\n }\n\n $stmt = $this->cnx->prepare(\"UPDATE posts SET post_allow_comments = 0 WHERE post_id = :postID\");\n $stmt->execute([\":postID\" => $this->postID]);\n\n $this->postDatas['post_allow_comments'] = 0;\n\n\t\treturn $this->postDatas['post_allow_comments'];\n }", "public function getAllowComments()\n {\n if ($this->getData('allow_comment') == Medvslav_News2_Model_Adminhtml_Source_Yesnodefault::NO) {\n return false;\n }\n if ($this->getData('allow_comment') == Medvslav_News2_Model_Adminhtml_Source_Yesnodefault::YES) {\n return true;\n }\n return Mage::getStoreConfigFlag('medvslav_news2/article/allow_comment');\n }", "public function isCommentEnabled()\n\t{\n\t\t$enabled = false;\n\t\t$moduleName = $this->getName();\n\t\t$commentsModuleModel = self::getInstance('ModComments');\n\t\tif ($commentsModuleModel && $commentsModuleModel->isActive()) {\n\t\t\tif (\\App\\Cache::has('isModuleCommentEnabled', $moduleName)) {\n\t\t\t\treturn \\App\\Cache::get('isModuleCommentEnabled', $moduleName);\n\t\t\t}\n\t\t\t$query = new \\App\\Db\\Query();\n\t\t\t$fieldId = $query->select(['fieldid'])\n\t\t\t\t->from('vtiger_field')\n\t\t\t\t->where(['fieldname' => 'related_to', 'tabid' => $commentsModuleModel->getId()])\n\t\t\t\t->scalar();\n\t\t\tif (!empty($fieldId)) {\n\t\t\t\t$enabled = $query->from('vtiger_fieldmodulerel')\n\t\t\t\t\t->where(['fieldid' => $fieldId, 'relmodule' => $moduleName])\n\t\t\t\t\t->exists();\n\t\t\t}\n\t\t\t\\App\\Cache::save('isModuleCommentEnabled', $moduleName, $enabled);\n\t\t} else {\n\t\t\t$enabled = false;\n\t\t}\n\t\treturn $enabled;\n\t}", "public function AllowComments()\n {\n return (SiteConfig::current_site_config()->Comments && $this->Commenting);\n }", "function is_post_likeable( $post_id = 0 ) {\n\t\t$post = get_post( $post_id );\n\t\tif ( ! $post || is_wp_error( $post ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$sitewide_likes_enabled = (bool) $this->is_enabled_sitewide();\n\t\t$post_likes_switched = get_post_meta( $post->ID, 'switch_like_status', true );\n\n\t\t// on WPCOM, we need to look at post edit date so we don't break old posts\n\t\t// if post edit date predates this code, stick with the former (buggy) behavior\n\t\t// see: p7DVsv-64H-p2\n\t\t$last_modified_time = strtotime( $post->post_modified_gmt );\n\n\t\t$behavior_was_changed_at = strtotime( \"2019-02-22 00:40:42\" );\n\n\t\tif ( $this->in_jetpack || $last_modified_time > $behavior_was_changed_at ) {\n\t\t\t// the new and improved behavior on Jetpack and recent WPCOM posts:\n\t\t\t// $post_likes_switched is empty to follow site setting,\n\t\t\t// 0 if we want likes disabled, 1 if we want likes enabled\n\t\t\treturn $post_likes_switched || ( $sitewide_likes_enabled && $post_likes_switched !== '0' );\n\t\t}\n\n\t\t// implicit else (old behavior): $post_likes_switched simply inverts the global setting\n\t\treturn ( (bool) $post_likes_switched ) xor $sitewide_likes_enabled;\n\t}", "function wptips_disable_comments_status() {\n return false;\n}", "public function getPhotoCommentsEnabled() {\n return $this->photoCommentsEnabled;\n }", "public function is_enabled() {\n global $CFG;\n\n return (!empty($CFG->usecomments));\n }", "public function hasComments()\n {\n return $GLOBALS['conf']['comments']['allow'];\n }", "function mdc2020_disable_comments_status() {\n\treturn false;\n}", "public function comments_are_hidden() {\n return 'on' === get_post_meta( get_the_ID(), '_rns_comments_hidden', true );\n }", "function df_disable_comments_status() {\n return false;\n}", "function flei_disable_comments_status()\n{\n return false;\n}", "public function isDislikedBy(){\n $user = auth()->user();\n return (bool) $user->likes\n ->where('recipe_id', $this->id)\n ->where('liked', false)\n ->count();\n }", "public function isAllowComments()\n {\n return ((int) $this->get('AllowComments')) === 1;\n }", "public function isLiked()\n {\n if (isset($this->pageData['liked']) && $this->pageData['liked'] == 'true') {\n return true;\n }\n return false;\n }", "function df_disable_comments_status() {\n\treturn false;\n}", "public function getSocialDislikes()\n {\n return $this->social_dislikes;\n }", "protected function can_comment() {\n\t\treturn true;\n\t}", "public function isLiked()\n {\n return !!$this->likes->where('user_id', auth()->id())->count();\n }", "function sandbox_comments(){\r\n\tglobal $settings;\r\n\r\n\tif( is_single() ){\r\n\t\t$comments = $settings['comments_posts'];\r\n\t\tif($comments == 1)\r\n\t\t\treturn true;\r\n\t\telse\r\n\t\t\treturn false;\r\n\t}\r\n\telseif ( is_page() ){\r\n\t\t$comments = $settings['comments_pages'];\r\n\t\tif($comments == 1)\r\n\t\t\treturn true;\r\n\t\telse\r\n\t\t\treturn false;\r\n\t}\r\n\telse {\r\n\t\treturn false;\r\n\t}\r\n}", "function trss_disable_comments($open) {\n\t$opt_allow_comments = get_option(META_COMMENTS);\n\tif (true == $opt_allow_comments) {\n\t\treturn $open;\n\t} else {\n\t\t$opt_meta_words = get_option(META_KEYWORDS);\n\t\tif (true == empty ($opt_meta_words)) { // exception\n\t\t\tThrow new Exception(\"RSS Truncation values are not set in the 'Settings' menu on the admin screen.\");\n\t\t}\n\t\t$is_syndication_post = (get_post_meta(get_the_ID(), $opt_meta_words, true)) ? true : false;\n\t\tif ($is_syndication_post) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn $open;\n\t\t}\n\t}\n}", "public function allowComments()\n {\n if($this->postID == 0)\n {\n return false;\n }\n\n $stmt = $this->cnx->prepare(\"UPDATE posts SET post_allow_comments = 1 WHERE post_id = :postID\");\n $stmt->execute([\":postID\" => $this->postID]);\n\n $this->postDatas['post_allow_comments'] = 1;\n\n\t\treturn $this->postDatas['post_allow_comments'];\n }", "function userDisliked($comment_id)\n {\n global $conn;\n global $user_id;\n $sql = \"SELECT * FROM like_dislike WHERE user_id=$user_id \n AND comment_id=$comment_id AND rating_action='dislike'\";\n $result = mysqli_query($conn, $sql);\n if (mysqli_num_rows($result) > 0) {\n return true;\n }else{\n return false;\n }\n }", "function ey_disable_comments_status() {\n\treturn false;\n}", "public function isLiked()\n\t{\n\t\treturn !! $this->likes()\n\t\t\t->where('user_id', Auth::id())\n\t\t\t->count();\n\t}", "public function showComments(){\n if($this->module->enableComments && $this->show_comments){\n return true;\n }\n return false;\n }", "public function getAllowComments()\n {\n if($this->postID == 0)\n {\n return 0;\n }\n\n return $this->postDatas['post_allow_comments'];\n }", "function is_comment_feed()\n{\n}", "public function is_comment_feed()\n {\n }", "public function isOpen() {\n return SettingsApi::getSetting(SettingsApi::SHOW_GENERAL_COMMENTS, 'bool');\n }", "public function canLike()\n\t{\n\t\tglobal $registry;\n\t\t\n\t\t$result = true;\n\t\t\n\t\tif($this->type == self::TYPE_FOLLOW_ADD || $this->type == self::TYPE_GROUP_JOIN || $this->type == self::TYPE_PROFILE_EDIT)\n\t\t{\n\t\t\t$result = false;\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "function affinity_mikado_show_comments() {\n\n\t\t$comments = false;\n\t\t$id = affinity_mikado_get_page_id();\n\t\tif (get_post_meta($id, 'mkd_page_comments_meta', true) == 'yes') {\n\t\t\t$comments = true;\n\t\t} elseif (get_post_meta($id, 'mkd_page_comments_meta', true) == 'no') {\n\t\t\t$comments = false;\n\t\t} else {\n\t\t\tif (is_page() && affinity_mikado_options()->getOptionValue('page_show_comments') == 'yes') {\n\t\t\t\t$comments = true;\n\t\t\t} elseif (is_singular('post') && affinity_mikado_options()->getOptionValue('blog_single_comments') == 'yes') {\n\t\t\t\t$comments = true;\n\t\t\t} elseif (is_singular('portfolio-item') && affinity_mikado_options()->getOptionValue('portfolio_single_comments') == 'yes') {\n\t\t\t\t$comments = true;\n\t\t\t}\n\t\t}\n\n\t\treturn $comments;\n\n\t}", "function have_comments()\n{\n}", "function getCommentsAllowed() { return $this->get('commentson'); }", "function reblogs_enabled_sitewide() {\n\t\t/**\n\t\t * Filters whether Reblogs are enabled by default on all posts.\n\t\t * true if enabled sitewide, false if not.\n\t\t *\n\t\t * @module likes\n\t\t *\n\t\t * @since 3.0.0\n\t\t *\n\t\t * @param bool $option Are Reblogs enabled sitewide.\n\t\t */\n\t\treturn (bool) apply_filters( 'wpl_reblogging_enabled_sitewide', ! get_option( 'disabled_reblogs' ) );\n\t}", "public function isCommentsAllowed(): bool;", "function userLiked($comment_id)\n {\n global $conn;\n global $user_id;\n $sql = \"SELECT * FROM like_dislike WHERE user_id=$user_id \n AND comment_id=$comment_id AND rating_action='like'\";\n $result = mysqli_query($conn, $sql);\n if (mysqli_num_rows($result) > 0) {\n return true;\n }else{\n return false;\n }\n }", "function gg10_enable_threaded_comments() {\n\n\tif ( is_singular() && comments_open() && 1 == get_option( 'thread_comments' ) ) :\n\t\twp_enqueue_script( 'comment-reply' );\n\tendif;\n\n}", "function custom_pings($comment, $args, $depth) {\r\n $GLOBALS['comment'] = $comment;\r\n ?>\r\n\t<stop class=\"ping\"></stop>\r\n <li id=\"comment-<?php comment_ID() ?>\" <?php comment_class() ?>>\r\n <div class=\"comment-author\"><?php printf(__('By %1$s on %2$s at %3$s'),\r\n get_comment_author_link(),\r\n get_comment_date(),\r\n get_comment_time() );\r\n edit_comment_link(__('Edit'), ' <span class=\"meta-sep\">|</span> <span class=\"edit-link\">', '</span>'); ?></div>\r\n <?php if ($comment->comment_approved == '0') _e('\\t\\t\\t\\t\\t<span class=\"unapproved\">Your trackback is awaiting moderation.</span>\\n') ?>\r\n <div class=\"comment-content\">\r\n <?php comment_text() ?>\r\n </div>\r\n<?php\r\n}", "public function have_comments()\n {\n }", "public function hasComment() : bool;", "public function likeComment () {\n $id = request('id');\n $ok = Comment::addLike($id);\n if ($ok) {\n return ['status' => 'ok'];\n } else {\n return ['status' => 'error', 'msg' => 'you have already liked this comment'];\n }\n }", "public function is_enabled() {\r\n \r\n global $post;\r\n \r\n $pid = $post->ID;\r\n \r\n if( $pid ) {\r\n \r\n $disable_woothumbs = get_post_meta( $pid, 'disable_woothumbs', true );\r\n \r\n return ( $disable_woothumbs && $disable_woothumbs == \"yes\" ) ? false : true;\r\n \r\n }\r\n \r\n return false;\r\n \r\n }", "function yz_is_user_have_comments() {\n // Get Comments Number\n $comments_number = yz_get_comments_number( bp_displayed_user_id() );\n if ( 0 == $comments_number ) {\n return false;\n }\n return true;\n}", "public function is_comments_popup()\n {\n }", "function fluid_edge_show_comments() {\n\t\t$comments = false;\n\t\t$id = fluid_edge_get_page_id();\n\t\t\n\t\t$page_comments_meta = get_post_meta($id, 'edgtf_page_comments_meta', true);\n\t\t\n\t\tif(!empty($page_comments_meta)) {\n\t\t\t$comments = $page_comments_meta == 'no' ? false : true;\n\t\t} else {\n\t\t\tif(is_page() && fluid_edge_options()->getOptionValue('page_show_comments') == 'yes') {\n\t\t\t\t$comments = true;\n\t\t\t} elseif(is_singular('post') && fluid_edge_options()->getOptionValue('blog_single_comments') == 'yes') {\n\t\t\t\t$comments = true;\n\t\t\t} elseif(is_singular('portfolio-item') && fluid_edge_options()->getOptionValue('portfolio_single_comments') == 'yes') {\n\t\t\t\t$comments = true;\n\t\t\t}\n\t\t}\n\n\t\treturn $comments;\n\t}", "public function canComment()\n\t{\n\t\tglobal $registry;\n\t\t\n\t\t$result = true;\n\t\t\n\t\tif($this->type == self::TYPE_FOLLOW_ADD || $this->type == self::TYPE_GROUP_JOIN || $this->type == self::TYPE_PROFILE_EDIT)\n\t\t{\n\t\t\t$result = false;\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "function tfuse_action_comments() {\r\r\n global $post;\r\r\n if (!tfuse_page_options('disable_comments'))\r\r\n comments_template( '', true );\r\r\n }", "function wpfolio_enable_threaded_comments(){\n\tif (!is_admin()) {\n\t\tif (is_singular() AND comments_open() AND (get_option('thread_comments') == 1))\n\t\t\twp_enqueue_script('comment-reply');\n\t\t}\n}", "public function testUserCanToggleLikeStatusForPost()\n {\n $this->post->toggleLike();\n $this->assertTrue($this->post->isLiked());\n\n $this->post->toggleLike();\n $this->assertFalse($this->post->isLiked());\n }", "public function canComment()\n {\n return $this->getPost() && $this->getPost()->getCommentStatus() === 'open';\n }", "function func__verify_comment_request($comment) {\n \n if( $this->util__is_jetpack_comments() ) {\n return $comment;\n }\n\n $request_url = @$_SERVER['REQUEST_URI'];\n $request_ip = @$_SERVER['REMOTE_ADDR'];\n if (empty($request_url) || empty($request_ip)) {\n return $this->func__flag_comment_request($comment);\n }\n $comment_type = @$comment['comment_type'];\n \n $comment_url = @$comment['comment_author_url'];\n $comment_body = @$comment['comment_content'];\n $comment_email = @$comment['comment_author_email'];\n $ping_types = array('pingback', 'trackback', 'pings');\n /// Global WP setting for closing ping overrides individual post setting in old WP\n if ($this->util__is_min_wp('2.7')) {\n }\n else if( in_array($comment_type, $ping_types) && get_option( 'default_ping_status' ) == 'closed' ) {\n die( '<response><error>1</error><message>Sorry, trackbacks are closed for this item.</message></response>' );\n }\n ///\n $ping_allowed = !$this->func__get_plugin_option('ignore_pings');\n if (!empty($comment_url)) {\n $comment_parse = @parse_url($comment_url);\n $comment_host = @$comment_parse['host'];\n }\n if (strpos($request_url, 'wp-comments-post.php') !== false && !empty($_POST)) {\n if ($this->func__get_plugin_option('already_commented') && 1<0 ) { /// if comment author has an approved comment, turned OFF\n if ($GLOBALS['wpdb']->get_var(\"SELECT COUNT(comment_ID) FROM `\" .$GLOBALS['wpdb']->comments. \"` WHERE `comment_author_email` = '\" .$comment_email. \"' AND `comment_approved` = '1' LIMIT 1\")) {\n return $comment;\n }\n }\n if (!empty($_POST['bee_spam'])) { // check the fake field\n return $this->func__flag_comment_request($comment);\n } else {\n \t//$comment = $this->func__check_math( $comment );\n }\n\n } else if (!empty($comment_type) && in_array($comment_type, $ping_types) && $ping_allowed) {\n if (empty($comment_url) || empty($comment_body)) {\n return $this->func__flag_comment_request($comment, true);\n } else if (!empty($comment_host) && gethostbyname($comment_host) != $request_ip) { // check pingback sender site vs. IP\n return $this->func__flag_comment_request($comment, true);\n }\n }\n return $comment;\n }", "function is_commenting() {\n\treturn(isset($_POST['comment']) || isset($_POST['comment_x']));\n}", "function AlreadyLiked( $post_id ) {\n\tif ( is_user_logged_in() ) {\n\t\t$user_id \t = get_current_user_id();\n\t\t$meta_USERS = get_post_meta( $post_id, \"_user_liked\" );\n\t\t$liked_USERS = \"\";\n\t\t\n\t\tif ( count( $meta_USERS ) != 0 ) {\n\t\t\t$liked_USERS = $meta_USERS[0];\n\t\t}\n\t\t\n\t\tif( ! is_array( $liked_USERS ) ){\n\t\t\t$liked_USERS = array();\n\t\t}\n\t\t\t\n\t\tif ( in_array( get_current_user_id(), $liked_USERS ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t\t\n\t} else {\n\t\n\t\t$meta_IPS = get_post_meta( $post_id, \"_user_IP\" );\n\t\t$ip \t = $_SERVER[\"REMOTE_ADDR\"];\n\t\t$liked_IPS = \"\";\n\t\t\n\t\tif ( count( $meta_IPS ) != 0 ) {\n\t\t\t$liked_IPS = $meta_IPS[0];\n\t\t}\n\t\t\n\t\tif ( ! is_array( $liked_IPS ) ) {\n\t\t\t$liked_IPS = array();\n\t\t}\n\t\t\n\t\tif ( in_array( $ip, $liked_IPS ) ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\t\n}", "function tfuse_action_comments() {\n global $post;\n if (tfuse_page_options('disable_comments'))\n comments_template( '' );\n }", "public function hasCustomMark() {\n return $this->getComment() !== '' || $this->getScore() != 0.0;\n }", "public function hasComment(){\n return $this->_has(2);\n }", "function checks_if_connected_user_liked_a_post($micropost_id){\n\t\tglobal $bdd;\n\t\t$q = $bdd->prepare(\"SELECT id FROM micropost_likes WHERE micropost_id =? AND user_id=?\");\n\t\t$q->execute([\n\t\t\t$micropost_id,\n\t\t\tget_session('id')\n\t\t]);\n\t\t$countr = $q->rowCount();\n\t\t$q->closeCursor();\n\t\treturn (bool) $countr;\n\t}", "function enable_threaded_comments(){\n\tif (!is_admin()) {\n\t\tif (is_singular() AND comments_open() AND (get_option('thread_comments') == 1))\n\t\t\twp_enqueue_script('comment-reply');\n\t\t}\n}", "function isLikeComment($commentID,$memberEmail ,$client)\n{\t\n\t$colCL = $client->FacebookMongo->CommentLikes;\n\t$isLiked = $colCL->count(['commentID' => (string)$commentID, 'memberEmail'=> (string)$memberEmail ]);\n\treturn $isLiked ;\n}", "public function post_is_under_review() {\n return 'on' === get_post_meta( get_the_ID(), '_rns_under_review', true );\n }", "function sandbox_trackbacks(){\r\n\tglobal $settings;\r\n\r\n\tif( is_single() ){\r\n\t\t$comments = $settings['trackbacks_posts'];\r\n\t\tif($comments == 1)\r\n\t\t\treturn true;\r\n\t\telse\r\n\t\t\treturn false;\r\n\t}\r\n\telseif ( is_page() ){\r\n\t\t$comments = $settings['trackbacks_pages'];\r\n\t\tif($comments == 1)\r\n\t\t\treturn true;\r\n\t\telse\r\n\t\t\treturn false;\r\n\t}\r\n\telse {\r\n\t\treturn false;\r\n\t}\r\n}", "private function checkEnabled() {\n\t\t$this->enabled = @function_exists('wp_using_ext_object_cache')? (bool) @wp_using_ext_object_cache() : false;\n\t}", "function is_index_enabled() {\n\t\t$options = $this->get_options();\n\t\t/**\n\t\t * Filters whether Likes should be enabled on archive/front/search pages.\n\t\t *\n\t\t * @module likes\n\t\t *\n\t\t * @since 2.2.0\n\t\t *\n\t\t * @param bool $enabled Are Post Likes enabled on archive/front/search pages?\n\t\t */\n\t\treturn (bool) apply_filters( 'wpl_is_index_disabled', (bool) in_array( 'index', $options['show'] ) );\n\t}", "function wc_review_ratings_enabled()\n {\n }", "function default_comments_on( $data ) {\n if( $data['post_type'] == 'valpa_obituario_pt' ) {\n $data['comment_status'] = 'open';\n }\n\n return $data;\n}", "function pzdc_has_comments($query = FALSE) {\n global $PraizedCommunity;\n return $PraizedCommunity->tpt_has_comments($query);\n}", "function wc_reviews_enabled()\n {\n }", "function custom_pings($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment;\n ?>\n <li id=\"comment-<?php comment_ID() ?>\" <?php comment_class() ?>>\n <div class=\"comment-author\"><?php printf(__('By %1$s on %2$s at %3$s', 'your-theme'),\n get_comment_author_link(),\n get_comment_date(),\n get_comment_time() );\n edit_comment_link(__('Edit', 'your-theme'), ' <span class=\"meta-sep\">|</span> <span class=\"edit-link\">', '</span>'); ?></div>\n <?php if ($comment->comment_approved == '0') _e('\\t\\t\\t\\t\\t<span class=\"unapproved\">Your trackback is awaiting moderation.</span>\\n', 'your-theme') ?>\n <div class=\"comment-content\">\n <?php comment_text() ?>\n </div>\n<?php }", "public function content_magic_url_enabled()\n\t{\n\t\treturn ($this->data['block_content_bbcode_options'] & OPTION_FLAG_LINKS);\n\t}", "function cache_enabled(){\n if ( defined('XMLRPC_REQUEST') && XMLRPC_REQUEST){\n return false;\n }\n\n // Never cache when POST data is present.\n if ( ! empty( $HTTP_RAW_POST_DATA ) || ! empty( $_POST ) ){\n return false;\n }\n\n // Never cache when cookies indicate a cache-exempt visitor.\n if ( ! empty( $_COOKIE ) && is_array($_COOKIE)) {\n foreach ( array_keys( $_COOKIE ) as $cookie ) {\n if ( (substr( $cookie, 0, 19 ) == 'wordpress_logged_in' || substr( $cookie, 0, 14 ) == 'comment_author' ) ) {\n return false;\n }\n }\n } \n\n if(is_admin()){\n return false;\n } \n\n return true;\n\n}", "function userDisliked($post_id)\n{\n global $conn;\n global $username;\n $sql = \"SELECT * FROM rating_info WHERE username='$username' \n \t\t AND post_id=$post_id AND rating_action='dislike'\";\n $result = mysqli_query($conn, $sql);\n if (mysqli_num_rows($result) > 0) {\n return true;\n }else{\n return false;\n }\n}", "function plugin_like() {\n\t\t\t/*\n\t\t\t$content = '<p>'.__('Why not do any or all of the following:','schemaplugin').'</p>';\n\t\t\t$content .= '<ul>';\n\t\t\t$content .= '<li><a href=\"'.$this->homepage.'\">'.__('Link to it so other folks can find out about it.','schemaplugin').'</a></li>';\n\t\t\t$content .= '<li><a href=\"http://wordpress.org/extend/plugins/'.$this->hook.'/\">'.__('Give it a good rating on WordPress.org.','schemaplugin').'</a></li>';\n\t\t\t$content .= '<li><a href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=2017947\">'.__('Donate a token of your appreciation.','schemaplugin').'</a></li>';\n\t\t\t$content .= '</ul>';\n\t\t\t$this->postbox($this->hook.'like', 'Like this plugin?', $content);\n\t\t\t*/\n\t\t}", "function custom_pings($comment, $args, $depth) {\r\n $GLOBALS['comment'] = $comment;\r\n ?>\r\n <li id=\"comment-<?php comment_ID() ?>\" <?php comment_class() ?>>\r\n <div class=\"comment-author\"><?php printf(__('By %1$s on %2$s at %3$s', 'seu-template'),\r\n get_comment_author_link(),\r\n get_comment_date(),\r\n get_comment_time() );\r\n edit_comment_link(__('Edit', 'seu-template'), ' <span class=\"meta-sep\">|</span> <span class=\"edit-link\">', '</span>'); ?></div>\r\n <?php if ($comment->comment_approved == '0') _e('\\t\\t\\t\\t\\t<span class=\"unapproved\">Your trackback is awaiting moderation.</span>\\n', 'seu-template') ?>\r\n <div class=\"comment-content\">\r\n <?php comment_text() ?>\r\n </div>\r\n<?php }", "function zuhaus_mikado_show_comments() {\n\t\t$comments = false;\n\t\t$id = zuhaus_mikado_get_page_id();\n\t\t\n\t\t$page_comments_meta = get_post_meta( $id, 'mkdf_page_comments_meta', true );\n\t\t\n\t\tif ( ! empty( $page_comments_meta ) ) {\n\t\t\t$comments = $page_comments_meta == 'no' ? false : true;\n\t\t} else {\n\t\t\tif ( is_page() && zuhaus_mikado_options()->getOptionValue( 'page_show_comments' ) == 'yes' ) {\n\t\t\t\t$comments = true;\n\t\t\t} elseif ( is_singular( 'post' ) && zuhaus_mikado_options()->getOptionValue( 'blog_single_comments' ) == 'yes' ) {\n\t\t\t\t$comments = true;\n\t\t\t} else {\n\t\t\t\t$comments = apply_filters( 'zuhaus_mikado_post_type_comments', $comments );\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $comments;\n\t}", "public static function removeLikesOnDelete()\n {\n return isset(static::$removeLikesOnDelete)\n ? static::$removeLikesOnDelete\n : true;\n }", "public function isOnline() {\n\t\treturn ThingPlugin::instance()->isDeviceOnline($this->post->post_title);\n\t}", "public function isComment()\n {\n }", "function userDisliked($post_id)\r\n{\r\n global $conn;\r\n global $user_id;\r\n //$sql = \"SELECT * FROM rating_info WHERE UserID=$user_id AND PostIdx = $post_id AND rating_action='dislike'\";\r\n $result = mysqli_query($conn, \"SELECT * FROM rating_info WHERE UserID='$user_id' AND PostIdx = $post_id AND rating_action='dislike'\");\r\n if (mysqli_num_rows($result) > 0) {\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n}", "public function getCommentPending(): bool\n {\n return $this->commentPending;\n }", "function snax_display_comments_on_lists() {\n\treturn 'standard' === apply_filters( 'snax_display_comments_on_lists', get_option( 'snax_display_comments_on_lists', 'standard' ) );\n}", "function isCommentLiked(int $commentId, int $userId = null) {\n if (!\\Illuminate\\Support\\Facades\\Auth::check()) {\n return false;\n } else {\n if (!$userId) {\n $userId = \\Illuminate\\Support\\Facades\\Auth::user()->id;\n\n $liked = \\App\\CommentLike::where('comment_id', $commentId)->where('user_id', $userId)->count();\n if ($liked == 0) {\n return false;\n } else {\n return true;\n }\n }\n }\n}", "public function hasComments(){\n return $this->_has(1);\n }", "public function get_myLikes() {\r\n try {\r\n $me = $this->facebook->api('/me/likes?access_token=' . $this->facebook->getAccessToken());\r\n return $me;\r\n } catch (FacebookApiException $e) {\r\n $e;\r\n return false;\r\n }\r\n }", "function salvia_disable_comments()\n{\n\tadd_filter('comments_open', '__return_false', 20, 2);\n\tadd_filter('pings_open', '__return_false', 20, 2);\n\n\t// Hide existing comments\n\tadd_filter('comments_array', '__return_empty_array', 10, 2);\n\n\t// Remove comments links from admin bar\n\tif (is_admin_bar_showing()) {\n\t\tremove_action('admin_bar_menu', 'wp_admin_bar_comments_menu', 60);\n\t}\n}", "public function isLikedBy(){\n $user = auth()->user();\n return (bool) $user->likes\n ->where('recipe_id', $this->id)\n ->where('liked', true)\n ->count();\n }", "public function isComment()\n {\n return $this->isComment;\n }", "protected function is_enabled()\n {\n }", "function wp_notify_moderator($comment_id) {\n \tglobal $wpdb;\n \n \tif( get_option( \"moderation_notify\" ) == 0 ) {\n \t\treturn true;\n }\n \n $comment = $wpdb->get_row(\"SELECT * FROM $wpdb->comments WHERE comment_ID='$comment_id' LIMIT 1\");\n \t\t\n \tif( $comment->comment_type == 'pingback' || $comment->comment_type == 'trackback' ) {\n \t if( $GLOBALS['FV_Antispam']->func__get_plugin_option('disable_pingback_notify') ) {\n\t\t return true;\n\t\t }\n \t}\n\n \t$post = $wpdb->get_row(\"SELECT * FROM $wpdb->posts WHERE ID='$comment->comment_post_ID' LIMIT 1\");\n \n \t$comment_author_domain = @gethostbyaddr($comment->comment_author_IP);\n \t$comments_waiting = $wpdb->get_var(\"SELECT count(comment_ID) FROM $wpdb->comments WHERE comment_approved = '0'\");\n \n \t$notify_message = sprintf( __('A new comment on the post #%1$s \"%2$s\" is waiting for your approval'), $post->ID, $post->post_title ) . \"\\r\\n\";\n \t$notify_message .= get_permalink($comment->comment_post_ID) . \"\\r\\n\\r\\n\";\n \t$notify_message .= sprintf( __('Author : %1$s (IP: %2$s , %3$s)'), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . \"\\r\\n\";\n \t$notify_message .= sprintf( __('E-mail : %s'), $comment->comment_author_email ) . \"\\r\\n\";\n \t$notify_message .= sprintf( __('URL : %s'), $comment->comment_author_url ) . \"\\r\\n\";\n \t$notify_message .= sprintf( __('Whois : http://ws.arin.net/cgi-bin/whois.pl?queryinput=%s'), $comment->comment_author_IP ) . \"\\r\\n\";\n \t$notify_message .= __('Comment: ') . \"\\r\\n\" . $comment->comment_content . \"\\r\\n\\r\\n\";\n \t$notify_message .= sprintf( __('Approve it: %s'), get_option('siteurl').\"/wp-admin/comment.php?action=mac&c=$comment_id\" ) . \"\\r\\n\";\n \t$notify_message .= sprintf( __('Delete it: %s'), get_option('siteurl').\"/wp-admin/comment.php?action=cdc&c=$comment_id\" ) . \"\\r\\n\";\n \t$notify_message .= sprintf( __('Spam it: %s'), get_option('siteurl').\"/wp-admin/comment.php?action=cdc&dt=spam&c=$comment_id\" ) . \"\\r\\n\";\n \t$notify_message .= sprintf( __('Currently %s comments are waiting for approval. Please visit the moderation panel:'), $comments_waiting ) . \"\\r\\n\";\n \t$notify_message .= get_option('siteurl') . \"/wp-admin/moderation.php\\r\\n\";\n \n \t$subject = sprintf( __('[%1$s] Please moderate: \"%2$s\"'), get_option('blogname'), $post->post_title );\n \t$admin_email = get_option('admin_email');\n \t\n \tif( $GLOBALS['FV_Antispam']->func__get_plugin_option('pingback_notify_email') && ( $comment->comment_type == 'trackback' || $comment->comment_type == 'pingback' ) ) {\n \t $admin_email = $GLOBALS['FV_Antispam']->func__get_plugin_option('pingback_notify_email');\n }\n \n \t$notify_message = apply_filters('comment_moderation_text', $notify_message, $comment_id);\n \t$subject = apply_filters('comment_moderation_subject', $subject, $comment_id);\n \n \t@wp_mail($admin_email, $subject, $notify_message);\n \n \treturn true;\n }", "function have_comments() {\n\t\tif ( 0 == $this->get_comments_number() ) {\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\treturn true;\n\t\t}\n\t}", "public function getArticleCommentFlag()\n {\n return $this->article_comment_flag;\n }", "function get_comment_like_count($comment_id)\n {\n $ci =& get_instance();\n return $ci->comment_model->comment_like_count($comment_id);\n }" ]
[ "0.7068334", "0.6663805", "0.66088885", "0.6579223", "0.6530652", "0.65161884", "0.6435363", "0.636607", "0.6364427", "0.63349855", "0.6328966", "0.62819356", "0.62758285", "0.62688994", "0.6229477", "0.6217213", "0.6205622", "0.61393553", "0.61334085", "0.61202914", "0.6097125", "0.6061757", "0.6029345", "0.60289025", "0.6022549", "0.59836847", "0.597304", "0.5966486", "0.5950962", "0.59485966", "0.5947237", "0.5925997", "0.5920972", "0.59174645", "0.58361244", "0.58333766", "0.58202046", "0.581519", "0.5803745", "0.5787586", "0.5778387", "0.5769579", "0.5768678", "0.5768222", "0.5764086", "0.57614404", "0.5759829", "0.575391", "0.5753363", "0.57473856", "0.5737886", "0.5733738", "0.5731697", "0.5705091", "0.56941694", "0.5683187", "0.5657911", "0.56549907", "0.5651006", "0.5650033", "0.56445044", "0.5639721", "0.5638108", "0.56364495", "0.5634274", "0.5630132", "0.56297565", "0.5626829", "0.5622031", "0.56175154", "0.56149447", "0.5606763", "0.5598094", "0.5597715", "0.5583181", "0.5583138", "0.5581471", "0.55778927", "0.55776066", "0.55684257", "0.5567739", "0.55535007", "0.5552663", "0.5551257", "0.5550686", "0.55448925", "0.5533964", "0.55090666", "0.5502151", "0.549468", "0.5491134", "0.5486282", "0.5485863", "0.5469649", "0.5467548", "0.5462272", "0.5456835", "0.5456224", "0.5454311", "0.54533523" ]
0.7708995
0
Test Uuid conversion to string and from string
Тестирование преобразования Uuid в строку и обратно из строки
public function testUuidConversion() { $uuid1 = Uuid::uuid1(); $str1 = $uuid1->toString(); $uuid2 = Uuid::fromString($str1); $str2 = $uuid2->toString(); $this->assertEquals($str1, $str2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function fromString(string $str) : Uuid;", "public function testUuidFormat()\n {\n $uuid = Uuid::uuid1();\n $str = $uuid->toString();\n\n $this->assertRegExp('/^\\{?[0-9a-f]{8}\\-?[0-9a-f]{4}\\-?[0-9a-f]{4}\\-?[0-9a-f]{4}\\-?[0-9a-f]{12}\\}?$/i', $str);\n }", "function uid_decode($value)\n{\n $service = new UidGenerator;\n\n return $service->decode($value);\n}", "public function testUuidGeneration()\n {\n $uuid1 = Uuid::uuid1();\n $uuid2 = Uuid::uuid1();\n\n $str1 = $uuid1->toString();\n $str2 = $uuid2->toString();\n\n $this->assertInternalType('string', $str1);\n $this->assertInternalType('string', $str2);\n $this->assertNotEquals($str1, $str2);\n }", "public function testDeconvertUUID()\n {\n $serializer = new Gson3;\n\n $deconverted = $serializer->deconvertUUID(\"41d2e28a-20a4-4ab0-b379-d810dede3786\");\n $this->assertEquals(\"41d2e28a-20a4-4ab0-b379-d810dede3786\", $deconverted, \"Incorrect deconversion for UUID\");\n }", "function conv_to_udaaanId($userId){\r\n $max_length = 11;\r\n $required_zeros = $max_length-2-strlen($userId);\r\n $zeros = str_repeat('0', $required_zeros);\r\n $udaaan_id = 'UD'.$zeros.$userId;\r\n return $udaaan_id;\r\n}", "function uid_encode($value)\n{\n $service = new UidGenerator;\n\n return $service->encode($value);\n}", "function uid2n($u, $mix = 3, $length = 8) {\r\n $r = strtolower($u);\r\n $r = str_replace('y', '0', $r);\r\n $r = base_convert($r, 34, 10);\r\n $r = substr($r, 1);\r\n $r = substr($r, $mix, $length - $mix + 1) . substr($r, 0, $mix);\r\n return (int)$r;\r\n }", "function toUserID($id) {\n if (preg_match('/^STEAM_/', $id)) {\n $split = explode(':', $id);\n return $split[2] * 2 + $split[1];\n } elseif (preg_match('/^765/', $id) && strlen($id) > 15) {\n return bcsub($id, '76561197960265728');\n } else {\n return $id; // We have no idea what this is, so just return it.\n }\n}", "function newUID () {\n\t$chars = array('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','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\n\t$m_str = $chars; \n\t$rnd=0;\n\t$r = '';\n\t$uid = array();\n\tfor ($i=0; $i<36; $i++) {\n\t\tif ($i==8 || $i==13 || $i==18 || $i==23) {\n\t\t\t$uid[$i] = '-';\n\t\t} elseif ($i==14) {\n\t\t\t$uid[$i] = '4';\n\t\t} else {\n\t\t\tif ($rnd <= 0x02) {\n\t\t\t\t$rnd = 0x2000000 + ((mt_rand(100000,9999999)*.0000001*0x1000000)|0);\n\t\t\t}\n\t\t\t$r = $rnd & 0xf;\n\t\t\t$rnd = $rnd >> 4;\n\t\t\t$uid[$i] = $m_str[($i == 19) ? ($r & 0x3) | 0x8 : $r];\n\t\t}\n\t}\n\treturn implode(\"\",$uid);\n}", "public function testUuidPassesPythonTests()\n {\n // This array is taken directly from the Python tests, more or less\n $tests = array(\n array(\n 'string' => '00000000-0000-0000-0000-000000000000',\n 'curly' => '{00000000-0000-0000-0000-000000000000}',\n 'hex' => '00000000000000000000000000000000',\n 'bytes' => 'AAAAAAAAAAAAAAAAAAAAAA==',\n 'int' => '0',\n 'fields' => array(\n 'time_low' => '0',\n 'time_mid' => '0',\n 'time_hi_and_version' => '0',\n 'clock_seq_hi_and_reserved' => '0',\n 'clock_seq_low' => '0',\n 'node' => '0',\n ),\n 'urn' => 'urn:uuid:00000000-0000-0000-0000-000000000000',\n 'time' => '0',\n 'clock_seq' => '0000',\n 'variant' => Uuid::RESERVED_NCS,\n 'version' => null,\n ),\n array(\n 'string' => '00010203-0405-0607-0809-0a0b0c0d0e0f',\n 'curly' => '{00010203-0405-0607-0809-0a0b0c0d0e0f}',\n 'hex' => '000102030405060708090a0b0c0d0e0f',\n 'bytes' => 'AAECAwQFBgcICQoLDA0ODw==',\n 'int' => '5233100606242806050955395731361295',\n 'fields' => array(\n 'time_low' => '10203',\n 'time_mid' => '405',\n 'time_hi_and_version' => '607',\n 'clock_seq_hi_and_reserved' => '8',\n 'clock_seq_low' => '9',\n 'node' => '0a0b0c0d0e0f',\n ),\n 'urn' => 'urn:uuid:00010203-0405-0607-0809-0a0b0c0d0e0f',\n 'time' => '607040500010203',\n 'clock_seq' => '0809',\n 'variant' => Uuid::RESERVED_NCS,\n 'version' => null,\n ),\n array(\n 'string' => '02d9e6d5-9467-382e-8f9b-9300a64ac3cd',\n 'curly' => '{02d9e6d5-9467-382e-8f9b-9300a64ac3cd}',\n 'hex' => '02d9e6d59467382e8f9b9300a64ac3cd',\n 'bytes' => 'Atnm1ZRnOC6Pm5MApkrDzQ==',\n 'int' => '3789866285607910888100818383505376205',\n 'fields' => array(\n 'time_low' => '02d9e6d5',\n 'time_mid' => '9467',\n 'time_hi_and_version' => '382e',\n 'clock_seq_hi_and_reserved' => '8f',\n 'clock_seq_low' => '9b',\n 'node' => '9300a64ac3cd',\n ),\n 'urn' => 'urn:uuid:02d9e6d5-9467-382e-8f9b-9300a64ac3cd',\n 'time' => '82e946702d9e6d5',\n 'clock_seq' => '0f9b',\n 'variant' => Uuid::RFC_4122,\n 'version' => 3,\n ),\n array(\n 'string' => '12345678-1234-5678-1234-567812345678',\n 'curly' => '{12345678-1234-5678-1234-567812345678}',\n 'hex' => '12345678123456781234567812345678',\n 'bytes' => 'EjRWeBI0VngSNFZ4EjRWeA==',\n 'int' => '24197857161011715162171839636988778104',\n 'fields' => array(\n 'time_low' => '12345678',\n 'time_mid' => '1234',\n 'time_hi_and_version' => '5678',\n 'clock_seq_hi_and_reserved' => '12',\n 'clock_seq_low' => '34',\n 'node' => '567812345678',\n ),\n 'urn' => 'urn:uuid:12345678-1234-5678-1234-567812345678',\n 'time' => '678123412345678',\n 'clock_seq' => '1234',\n 'variant' => Uuid::RESERVED_NCS,\n 'version' => null,\n ),\n array(\n 'string' => '6ba7b810-9dad-11d1-80b4-00c04fd430c8',\n 'curly' => '{6ba7b810-9dad-11d1-80b4-00c04fd430c8}',\n 'hex' => '6ba7b8109dad11d180b400c04fd430c8',\n 'bytes' => 'a6e4EJ2tEdGAtADAT9QwyA==',\n 'int' => '143098242404177361603877621312831893704',\n 'fields' => array(\n 'time_low' => '6ba7b810',\n 'time_mid' => '9dad',\n 'time_hi_and_version' => '11d1',\n 'clock_seq_hi_and_reserved' => '80',\n 'clock_seq_low' => 'b4',\n 'node' => '00c04fd430c8',\n ),\n 'urn' => 'urn:uuid:6ba7b810-9dad-11d1-80b4-00c04fd430c8',\n 'time' => '1d19dad6ba7b810',\n 'clock_seq' => '00b4',\n 'variant' => Uuid::RFC_4122,\n 'version' => 1,\n ),\n array(\n 'string' => '6ba7b811-9dad-11d1-80b4-00c04fd430c8',\n 'curly' => '{6ba7b811-9dad-11d1-80b4-00c04fd430c8}',\n 'hex' => '6ba7b8119dad11d180b400c04fd430c8',\n 'bytes' => 'a6e4EZ2tEdGAtADAT9QwyA==',\n 'int' => '143098242483405524118141958906375844040',\n 'fields' => array(\n 'time_low' => '6ba7b811',\n 'time_mid' => '9dad',\n 'time_hi_and_version' => '11d1',\n 'clock_seq_hi_and_reserved' => '80',\n 'clock_seq_low' => 'b4',\n 'node' => '00c04fd430c8',\n ),\n 'urn' => 'urn:uuid:6ba7b811-9dad-11d1-80b4-00c04fd430c8',\n 'time' => '1d19dad6ba7b811',\n 'clock_seq' => '00b4',\n 'variant' => Uuid::RFC_4122,\n 'version' => 1,\n ),\n array(\n 'string' => '6ba7b812-9dad-11d1-80b4-00c04fd430c8',\n 'curly' => '{6ba7b812-9dad-11d1-80b4-00c04fd430c8}',\n 'hex' => '6ba7b8129dad11d180b400c04fd430c8',\n 'bytes' => 'a6e4Ep2tEdGAtADAT9QwyA==',\n 'int' => '143098242562633686632406296499919794376',\n 'fields' => array(\n 'time_low' => '6ba7b812',\n 'time_mid' => '9dad',\n 'time_hi_and_version' => '11d1',\n 'clock_seq_hi_and_reserved' => '80',\n 'clock_seq_low' => 'b4',\n 'node' => '00c04fd430c8',\n ),\n 'urn' => 'urn:uuid:6ba7b812-9dad-11d1-80b4-00c04fd430c8',\n 'time' => '1d19dad6ba7b812',\n 'clock_seq' => '00b4',\n 'variant' => Uuid::RFC_4122,\n 'version' => 1,\n ),\n array(\n 'string' => '6ba7b814-9dad-11d1-80b4-00c04fd430c8',\n 'curly' => '{6ba7b814-9dad-11d1-80b4-00c04fd430c8}',\n 'hex' => '6ba7b8149dad11d180b400c04fd430c8',\n 'bytes' => 'a6e4FJ2tEdGAtADAT9QwyA==',\n 'int' => '143098242721090011660934971687007695048',\n 'fields' => array(\n 'time_low' => '6ba7b814',\n 'time_mid' => '9dad',\n 'time_hi_and_version' => '11d1',\n 'clock_seq_hi_and_reserved' => '80',\n 'clock_seq_low' => 'b4',\n 'node' => '00c04fd430c8',\n ),\n 'urn' => 'urn:uuid:6ba7b814-9dad-11d1-80b4-00c04fd430c8',\n 'time' => '1d19dad6ba7b814',\n 'clock_seq' => '00b4',\n 'variant' => Uuid::RFC_4122,\n 'version' => 1,\n ),\n array(\n 'string' => '7d444840-9dc0-11d1-b245-5ffdce74fad2',\n 'curly' => '{7d444840-9dc0-11d1-b245-5ffdce74fad2}',\n 'hex' => '7d4448409dc011d1b2455ffdce74fad2',\n 'bytes' => 'fURIQJ3AEdGyRV/9znT60g==',\n 'int' => '166508041112410060672666770310773930706',\n 'fields' => array(\n 'time_low' => '7d444840',\n 'time_mid' => '9dc0',\n 'time_hi_and_version' => '11d1',\n 'clock_seq_hi_and_reserved' => 'b2',\n 'clock_seq_low' => '45',\n 'node' => '5ffdce74fad2',\n ),\n 'urn' => 'urn:uuid:7d444840-9dc0-11d1-b245-5ffdce74fad2',\n 'time' => '1d19dc07d444840',\n 'clock_seq' => '3245',\n 'variant' => Uuid::RFC_4122,\n 'version' => 1,\n ),\n array(\n 'string' => 'e902893a-9d22-3c7e-a7b8-d6e313b71d9f',\n 'curly' => '{e902893a-9d22-3c7e-a7b8-d6e313b71d9f}',\n 'hex' => 'e902893a9d223c7ea7b8d6e313b71d9f',\n 'bytes' => '6QKJOp0iPH6nuNbjE7cdnw==',\n 'int' => '309723290945582129846206211755626405279',\n 'fields' => array(\n 'time_low' => 'e902893a',\n 'time_mid' => '9d22',\n 'time_hi_and_version' => '3c7e',\n 'clock_seq_hi_and_reserved' => 'a7',\n 'clock_seq_low' => 'b8',\n 'node' => 'd6e313b71d9f',\n ),\n 'urn' => 'urn:uuid:e902893a-9d22-3c7e-a7b8-d6e313b71d9f',\n 'time' => 'c7e9d22e902893a',\n 'clock_seq' => '27b8',\n 'variant' => Uuid::RFC_4122,\n 'version' => 3,\n ),\n array(\n 'string' => 'eb424026-6f54-4ef8-a4d0-bb658a1fc6cf',\n 'curly' => '{eb424026-6f54-4ef8-a4d0-bb658a1fc6cf}',\n 'hex' => 'eb4240266f544ef8a4d0bb658a1fc6cf',\n 'bytes' => '60JAJm9UTvik0Ltlih/Gzw==',\n 'int' => '312712571721458096795100956955942831823',\n 'fields' => array(\n 'time_low' => 'eb424026',\n 'time_mid' => '6f54',\n 'time_hi_and_version' => '4ef8',\n 'clock_seq_hi_and_reserved' => 'a4',\n 'clock_seq_low' => 'd0',\n 'node' => 'bb658a1fc6cf',\n ),\n 'urn' => 'urn:uuid:eb424026-6f54-4ef8-a4d0-bb658a1fc6cf',\n 'time' => 'ef86f54eb424026',\n 'clock_seq' => '24d0',\n 'variant' => Uuid::RFC_4122,\n 'version' => 4,\n ),\n array(\n 'string' => 'f81d4fae-7dec-11d0-a765-00a0c91e6bf6',\n 'curly' => '{f81d4fae-7dec-11d0-a765-00a0c91e6bf6}',\n 'hex' => 'f81d4fae7dec11d0a76500a0c91e6bf6',\n 'bytes' => '+B1Prn3sEdCnZQCgyR5r9g==',\n 'int' => '329800735698586629295641978511506172918',\n 'fields' => array(\n 'time_low' => 'f81d4fae',\n 'time_mid' => '7dec',\n 'time_hi_and_version' => '11d0',\n 'clock_seq_hi_and_reserved' => 'a7',\n 'clock_seq_low' => '65',\n 'node' => '00a0c91e6bf6',\n ),\n 'urn' => 'urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6',\n 'time' => '1d07decf81d4fae',\n 'clock_seq' => '2765',\n 'variant' => Uuid::RFC_4122,\n 'version' => 1,\n ),\n array(\n 'string' => 'fffefdfc-fffe-fffe-fffe-fffefdfcfbfa',\n 'curly' => '{fffefdfc-fffe-fffe-fffe-fffefdfcfbfa}',\n 'hex' => 'fffefdfcfffefffefffefffefdfcfbfa',\n 'bytes' => '//79/P/+//7//v/+/fz7+g==',\n 'int' => '340277133821575024845345576078114880506',\n 'fields' => array(\n 'time_low' => 'fffefdfc',\n 'time_mid' => 'fffe',\n 'time_hi_and_version' => 'fffe',\n 'clock_seq_hi_and_reserved' => 'ff',\n 'clock_seq_low' => 'fe',\n 'node' => 'fffefdfcfbfa',\n ),\n 'urn' => 'urn:uuid:fffefdfc-fffe-fffe-fffe-fffefdfcfbfa',\n 'time' => 'ffefffefffefdfc',\n 'clock_seq' => '3ffe',\n 'variant' => Uuid::RESERVED_FUTURE,\n 'version' => null,\n ),\n array(\n 'string' => 'ffffffff-ffff-ffff-ffff-ffffffffffff',\n 'curly' => '{ffffffff-ffff-ffff-ffff-ffffffffffff}',\n 'hex' => 'ffffffffffffffffffffffffffffffff',\n 'bytes' => '/////////////////////w==',\n 'int' => '340282366920938463463374607431768211455',\n 'fields' => array(\n 'time_low' => 'ffffffff',\n 'time_mid' => 'ffff',\n 'time_hi_and_version' => 'ffff',\n 'clock_seq_hi_and_reserved' => 'ff',\n 'clock_seq_low' => 'ff',\n 'node' => 'ffffffffffff',\n ),\n 'urn' => 'urn:uuid:ffffffff-ffff-ffff-ffff-ffffffffffff',\n 'time' => 'fffffffffffffff',\n 'clock_seq' => '3fff',\n 'variant' => Uuid::RESERVED_FUTURE,\n 'version' => null,\n ),\n );\n\n foreach ($tests as $test) {\n $uuids = array(\n Uuid::fromString($test['string']),\n Uuid::fromString($test['curly']),\n Uuid::fromString($test['hex']),\n Uuid::fromBytes(base64_decode($test['bytes'])),\n Uuid::fromString($test['urn']),\n );\n foreach ($uuids as $uuid) {\n $this->assertEquals($test['string'], (string) $uuid);\n $this->assertEquals($test['hex'], $uuid->getHex());\n $this->assertEquals(base64_decode($test['bytes']), $uuid->getBytes());\n if ($this->hasMoontoastMath()) {\n $this->assertEquals($test['int'], (string) $uuid->getInteger());\n }\n $this->assertEquals($test['fields'], $uuid->getFieldsHex());\n $this->assertEquals($test['fields']['time_low'], $uuid->getTimeLowHex());\n $this->assertEquals($test['fields']['time_mid'], $uuid->getTimeMidHex());\n $this->assertEquals($test['fields']['time_hi_and_version'], $uuid->getTimeHiAndVersionHex());\n $this->assertEquals($test['fields']['clock_seq_hi_and_reserved'], $uuid->getClockSeqHiAndReservedHex());\n $this->assertEquals($test['fields']['clock_seq_low'], $uuid->getClockSeqLowHex());\n $this->assertEquals($test['fields']['node'], $uuid->getNodeHex());\n $this->assertEquals($test['urn'], $uuid->getUrn());\n if ($uuid->getVersion() == 1) {\n $this->assertEquals($test['time'], $uuid->getTimestampHex());\n }\n $this->assertEquals($test['clock_seq'], $uuid->getClockSequenceHex());\n $this->assertEquals($test['variant'], $uuid->getVariant());\n $this->assertEquals($test['version'], $uuid->getVersion());\n }\n }\n }", "function nicknameToUid($string_nick_name)\n {\n printf(\"nicknameToUid: This function is not implemented yet.\\n\");\n }", "abstract protected function get_uuid();", "function checkuid($uid) {\n \n}", "function get_user_id_from_string($string)\n{\n}", "public function assertUid($value)\n {\n return $this->assertString(\n $value,\n 36,\n 36,\n '/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/'\n );\n }", "public function testUuid5WithNamespaceAsUuidString()\n {\n $uuid = Uuid::uuid5(Uuid::NAMESPACE_DNS, 'python.org');\n $this->assertEquals('886313e1-3b8a-5372-9b90-0c9aee199e5d', $uuid->toString());\n $this->assertEquals(2, $uuid->getVariant());\n $this->assertEquals(5, $uuid->getVersion());\n }", "public function getUuid($data);", "public function testUuidStringFormatter() {\n $entity = EntityTest::create([]);\n $entity->save();\n\n $uuid_field = $entity->get('uuid');\n\n // Verify default render.\n $render_array = $uuid_field->view([]);\n $this->assertSame($entity->uuid(), $render_array[0]['#context']['value'], 'The rendered UUID matches the entity UUID.');\n $this->assertStringContainsString($entity->uuid(), $this->render($render_array), 'The rendered UUID found.');\n\n // Verify customized render.\n $render_array = $uuid_field->view(['settings' => ['link_to_entity' => TRUE]]);\n $this->assertSame('link', $render_array[0]['#type']);\n $this->assertSame($entity->uuid(), $render_array[0]['#title']['#context']['value']);\n $this->assertSame($entity->toUrl()->toString(), $render_array[0]['#url']->toString());\n $rendered = $this->render($render_array);\n $this->assertStringContainsString($entity->uuid(), $rendered, 'The rendered UUID found.');\n $this->assertStringContainsString($entity->toUrl()->toString(), $rendered, 'The rendered entity URL found.');\n }", "public static function createUuidsNormally()\n {\n }", "public function NewUid()\n {\n $uuid = (string) Str::uuid();\n $uuid = str_replace(\"-\", \"\", $uuid);\n return $uuid;\n }", "public function getUid() {}", "public function getUid() {}", "public function getUid() {}", "public function getUid() {}", "public function getUid() {}", "public function getUid() {}", "public function testCreationStringUuid()\n {\n $creation = EloquentUserModel::create([\n 'username' => 'username',\n 'password' => 'secret',\n ]);\n\n static::assertEquals(36, strlen($creation->id));\n\n $model = EloquentUserModel::first();\n\n static::assertEquals(36, strlen($model->id));\n static::assertRegExp('/^[0-9a-f-]{36}$/', $model->id);\n static::assertRegExp('/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/', $model->id);\n\n static::assertEquals($creation->id, $model->id);\n }", "public static function fromString(string $text): Uuid\n {\n return new self($text);\n }", "public function resolveUuid()\n {\n if (($version = $this->resolveUuidVersion()) == 'ordered') {\n return Str::orderedUuid();\n }\n\n return call_user_func([Uuid::class, $version]);\n }", "abstract protected function getUuidFromStore();", "function getGUID($str){\r\n $sha = sha1($str);\r\n $charid = strtoupper($sha);\r\n $hyphen = chr(45);// \"-\"\r\n $uuid = substr($charid, 0, 8).$hyphen\r\n .substr($charid, 8, 4).$hyphen\r\n .substr($charid,12, 4).$hyphen\r\n .substr($charid,16, 4).$hyphen\r\n .substr($charid,20,12);\r\n return $uuid; \r\n}", "abstract public function get_uid( $data=false );", "public function getUuid(): string;", "public function testUuid3WithNamespaceAsUuidString()\n {\n $uuid = Uuid::uuid3(Uuid::NAMESPACE_DNS, 'python.org');\n $this->assertEquals('6fa459ea-ee8a-3ca4-894e-db77e160355e', $uuid->toString());\n $this->assertEquals(2, $uuid->getVariant());\n $this->assertEquals(3, $uuid->getVersion());\n }", "private function convert_id($id){\n if (strlen($id) === 17){\n $converted = substr($id, 3) - 61197960265728;\n }\n else{\n $converted = '765'.($id + 61197960265728);\n }\n return (string) $converted;\n}", "static function uuid();", "function n2uid($n, $mix = 3, $length = 8) {\r\n $r = self::padl_length($n, $length + 1, '0');\r\n $r = substr($r, -$mix) . substr($r, 0, $length - $mix + 1);\r\n $r = '9' . $r;\r\n $r = base_convert($r, 10, 34);\r\n $r = str_replace('0', 'y', $r);\r\n return strtoupper($r);\r\n }", "public function testUuid5WithNamespaceAsUuidObject()\n {\n $nsUuid = Uuid::fromString(Uuid::NAMESPACE_DNS);\n $uuid = Uuid::uuid5($nsUuid, 'python.org');\n $this->assertEquals('886313e1-3b8a-5372-9b90-0c9aee199e5d', $uuid->toString());\n $this->assertEquals(2, $uuid->getVariant());\n $this->assertEquals(5, $uuid->getVersion());\n }", "public static function create() : Uuid;", "function make_uuid()\n{\n\t\n/*\n2D015183- (8)\nFC70-\n4BBC-\n8471-\n09242E2AABBF (12)\n*/\n\n\t$uuid1arr = str_split(uniqid('', true));\n\t$uuid2arr = str_split(uniqid('', true));\n\t\n\t$uuid = \"\";\n\t\n\tfor ($i = 0; $i < 8; $i++)\n\t{\n\t\t$uuid = $uuid.$uuid1arr[$i];\n\t}\n\t\n\t$uuid = $uuid.\"-\";\n\t\n\tfor ($i = 7; $i < 11; $i++)\n\t{\n\t\t$uuid = $uuid.$uuid1arr[$i];\n\t}\n\t\n\t$uuid = $uuid.\"-\";\n\t\n\tfor ($i = 11; $i < 14; $i++)\n\t{\n\t\t$uuid = $uuid.$uuid1arr[$i];\n\t}\n\t\n\t$uuid = $uuid . $uuid1arr[15] . \"-\";\n\t\n\tfor ($i = 16; $i < 20; $i++)\n\t{\n\t\t$uuid = $uuid. $uuid1arr[$i];\n\t}\n\t\n\t$uuid = $uuid.\"-\";\n\t\n\tfor ($i = 15; $i < 23; $i++)\n\t{\n\t\t$uuid = $uuid.$uuid2arr[$i];\n\t}\n\t\n\tfor ($i = 10; $i < 14; $i++)\n\t{\n\t\t$uuid = $uuid.$uuid2arr[$i];\n\t}\n\t\n\treturn strtoupper($uuid);\n}", "public static function isUuid($input){\n $regex = '/^\\{?[A-Z0-9]{8}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{12}\\}?$/';\n $compare = strtoupper($input);\n return preg_match($regex, $compare);\n // regex copied from https://stackoverflow.com/questions/1253373/php-check-for-valid-guid\n }", "function uidToNickname($uid)\n {\n printf(\"nicknameToUid: This function is not implemented yet.\\n\");\n }", "private static function getUuid()\n\t{\n\t\t$uuid = Uuid::generate(4);\n\t\treturn $uuid->string;\n\t}", "public function verifyUID() {\n\t$ids = new uids(); // make sure UID is unique\n\t$uid = $this->getUID();\n\t$chk = $this->getUID($uid); if ($uid == $chk) return;\n\n\t$this->set(\"props.uid\", $chk);\n\t$this->save();\n}", "static function uuid(string $str)\n\t{\n\t\tif(preg_match('/^(\\w+\\-){4}\\w+$/', $str) != 1)\n\t\t{\n\t\t\tthrow new Exception(\"ERR_UUID\", 400);\n\t\t}\n\t\treturn $str;\n\t}", "public function testGeneratingUuidV4()\n {\n $uuid1 = $this->strings->generateUuidV4();\n $uuid2 = $this->strings->generateUuidV4();\n $this->assertNotEquals($uuid1, $uuid2);\n $this->assertEquals(36, strlen($uuid1));\n $this->assertEquals(36, strlen($uuid2));\n }", "static function timeuuid();", "public function testUuid3WithNamespaceAsUuidObject()\n {\n $nsUuid = Uuid::fromString(Uuid::NAMESPACE_DNS);\n $uuid = Uuid::uuid3($nsUuid, 'python.org');\n $this->assertEquals('6fa459ea-ee8a-3ca4-894e-db77e160355e', $uuid->toString());\n $this->assertEquals(2, $uuid->getVariant());\n $this->assertEquals(3, $uuid->getVersion());\n }", "public function createUuid();", "public function testUserIdIsString()\n {\n $this->assertInternalType('string',$this->userClass->getId());\n }", "function kis_uuid($hyphen='',$prefix = '') {\n\t//Using without prefix.\n\t//echo uuid(); //Returns like ‘1225c695-cfb8-4ebb-aaaa-80da344e8352′ \n\t//Using with prefix\n\t//echo uuid('-','urn:uuid:');//Returns like ‘urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344e8352′\n\n\t// base on function uuid() ,mod for sorted\n\t//53d1be2f7b9392.93290838#53d1be2f-7b93-92$fe-7022-6a0493521f1c\n\t//53d1bdd7b0b6b#53d1bdd7-b0b6-b$db-bc4c-69b2cf0334ce\n\t$kk = uniqid('',true); //53d1bc74439ba0.80927708\n\t$kk = explode('.', $kk);\n\t$kk= $kk[0];\n\t// $kk = uniqid(); //53d1bdd7b0b6b\n\t$jj=1;\n\tif(strlen($kk)>13){\n\t$jj=strlen($kk)-12; //-13+1\n\t}\n\t$chars = md5(uniqid(mt_rand(), true));\n\t$uuid = substr($kk, 0, 8).$hyphen\n\t.substr($kk, 8, 4).$hyphen;\n\t$uuid .= substr($kk, 12, $jj).substr($chars, 12,(4-$jj)).$hyphen\n\t.substr($chars, 16, 4).$hyphen\n\t.substr($chars, 20, 12);\n\treturn $prefix.$uuid;\n}", "public function getUuid();", "function formatuuid($uuidstring) {\n $uuidpattern = \"/(\\w{2})(\\w{8})(\\w{4})(\\w{4})(\\w{4})(\\w{12})/i\";\n $uuidreplace = \"$2-$3-$4-$5-$6\";\n $formatteduuid = strtolower(preg_replace($uuidpattern, $uuidreplace, $uuidstring));\n echo $formatteduuid;\n \n}", "function adjustURN_UUIDs($ebxml_string)\n{\n\t$NEW_ebxml_string=\"\";\n\t$search = \"urn:uuid:\";\n\t$replace = \"urn-uuid-\";\n\t$NEW_ebxml_string = str_replace($search,$replace,$ebxml_string);\n\n\treturn $NEW_ebxml_string;\n\n}", "public function resolveUuid(): UuidInterface\n {\n return call_user_func([Uuid::class, $this->resolveUuidVersion()]);\n }", "function upnp_uuid() {\n\t\t$uuid = md5(get_interface_mac(get_real_interface(\"wan\")));\n\t\t/* put uuid in correct format 8-4-4-4-12 */\n\t\treturn substr($uuid, 0, 8) . '-' . substr($uuid, 9, 4) . '-' . substr($uuid, 13, 4) . '-' . substr($uuid, 17, 4) . '-' . substr($uuid, 21, 12);\n\t}", "private function createUID()\n {\n $this->connection = new Connect(SERVER,USER,PASSWORD);\n $link = $this->connection;\n $link->setDatabase(DATABASE);\n $query = \"SELECT LAST(UID) AS LastUID FROM USERS\";\n $last_known_UID = $link->getQuery(DATABASE,$query);\n $generator = $last_known_UID['LastUID'];\n $split = explode(\"-\",$generator);\n //generating user ID\n $new_suffix = is_int($split[1])? $split[1] + 1: die(\"fatal error occurred\");\n $pref = substr($this->fname,0,3);\n $comp = compact($pref,$new_suffix);\n $uid = implode(\"-\",$comp);\n return $uid;\n\n }", "function uidToUserinfo($int_uid)\n {\n printf(\"uidToUserinfo: This function is not implemented yet.\\n\");\n }", "public function getUid(): ?string;", "public static function makeUid( $unique_id ) {\n static $FMT = '%s-%s@%s';\n static $TMDTHIS = 'Ymd\\THisT';\n return [self::$LCvalue => sprintf( $FMT, date( $TMDTHIS ),\n substr( microtime(), 2, 4) . self::getRandChars( 6 ),\n $unique_id ),\n self::$LCparams => null];\n }", "public function uuidToBytes(string $string) : string;", "function invalidUid($username){\n $result;\n if (!preg_match(\"/^[a-zA-z0-9]*$/\", $username)) {\n $reult = true;\n }\n else {\n $result = false;\n }\n\n return $result;\n}", "function nicknameToUid($string_nick_name)\n {\n if (!is_string($string_nick_name) || $string_nick_name == '') {\n return -1;\n }\n\n $this->http_client->get(\"{$this->plurk_paths['http_base']}\" .\n \"/user/{$string_nick_name}\");\n $array_profile = $this->http_client->currentResponse();\n\n if (!preg_match('/var GLOBAL = \\{.*\"uid\": ([\\d]+),.*\\}/imU', \n $array_profile['body'], $matches)) {\n return -1;\n }\n\n return (int )$matches[1];\n }", "function cleanId($id){\n $arr = explode(\"@\", $id);\n $arr = $arr[0];\n $arr = explode(\"_\", $arr);\n $arr = substr($arr[1],2);\n return \"0\".$arr;\n }", "function v3UUID($uid) {\n // Get hexadecimal components of namespace\n $nhex = str_replace(array('-','{','}'), '', uniqid());\n\n // Binary Value\n $nstr = '';\n\n // Convert Namespace UUID to bits\n for($i = 0; $i < strlen($nhex); $i+=2) {\n $nstr .= chr(hexdec($nhex[$i].$nhex[$i+1]));\n }\n\n // Calculate hash value\n $hash = md5($nstr . $uid);\n\n return sprintf('%08s-%04s-%04x-%04x-%12s',\n // 32 bits for \"time_low\"\n substr($hash, 0, 8),\n // 16 bits for \"time_mid\"\n substr($hash, 8, 4),\n // 16 bits for \"time_hi_and_version\",\n // four most significant bits holds version number 3\n (hexdec(substr($hash, 12, 4)) & 0x0fff) | 0x3000,\n // 16 bits, 8 bits for \"clk_seq_hi_res\",\n // 8 bits for \"clk_seq_low\",\n // two most significant bits holds zero and one for variant DCE1.1\n (hexdec(substr($hash, 16, 4)) & 0x3fff) | 0x8000,\n // 48 bits for \"node\"\n substr($hash, 20, 12)\n );\n }", "function getUUID(){\n $data = random_bytes(16);\n $data[6] = chr(ord($data[6]) & 0x0f | 0x40);\n $data[8] = chr(ord($data[8]) & 0x3f | 0x80);\n return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4));\n}", "function getmyuid()\n{\n\treturn 0;\n}", "static public function cnvUUID2TextId($aUUID) {\n\t\t$theResult = str_replace('-','',trim($aUUID,'{} '));\n\t\t$sLen = strlen($theResult);\n\t\treturn ($sLen==32) ? $theResult : '';\n\t}", "public function testUuid5WithKnownUuids()\n {\n $uuids = array(\n '886313e1-3b8a-5372-9b90-0c9aee199e5d' => Uuid::uuid5(Uuid::NAMESPACE_DNS, 'python.org'),\n '4c565f0d-3f5a-5890-b41b-20cf47701c5e' => Uuid::uuid5(Uuid::NAMESPACE_URL, 'http://python.org/'),\n '1447fa61-5277-5fef-a9b3-fbc6e44f4af3' => Uuid::uuid5(Uuid::NAMESPACE_OID, '1.3.6.1'),\n 'cc957dd1-a972-5349-98cd-874190002798' => Uuid::uuid5(Uuid::NAMESPACE_X500, 'c=ca'),\n );\n\n foreach ($uuids as $ustr => $uobj) {\n $this->assertEquals(Uuid::RFC_4122, $uobj->getVariant());\n $this->assertEquals(5, $uobj->getVersion());\n $this->assertEquals(Uuid::fromString($ustr), $uobj);\n $this->assertEquals((string) $uobj, $ustr);\n }\n }", "protected function getUuidString()\n {\n return $this->uuidString ?: '';\n }", "public function uuid(): string;", "function ju_is_guid(string $s):bool {return 36 === strlen($s) && preg_match(\n\t'#^\\{?[A-Z0-9]{8}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{12}\\}?$#', $s\n);}", "public function asString(): string\n {\n return $this->uuid;\n }", "private function parseId($userData)\n\t{\n\t\t$arr = array();\n\t\tpreg_match(\"/\\d+/\", $userData, $arr);\n\n\t\treturn $arr[0];\n\t}", "public static function is_uuid(/* scalar */ $id) : bool\n {\n //TODO - improve\n return is_string($id) && strlen($id) === 36 && preg_match('/[0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12}/', $id);\n }", "public function getUuid() : ?string ;", "public function getUuid($_userId) {\n $db = new MySqlTranslator();\n try {\n $db->query(\"SELECT user_uuid FROM `user` WHERE id = '{$_userId}'\");\n $results = $db->single();\n return $results->user_uuid;\n } catch (PDOException $_e) {\n echo $_e->getMessage();\n return false;\n }\n }", "function _health_gen_uid($length = 10) {\n $str = \"\";\n for ($x = 0; $x < $length; $x++) {\n $str .= substr(str_shuffle(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"), 0, 1);\n }\n return $str;\n}", "public function uuid3(): string;", "function uuid()\n{\n $orderedTimeFactory = new UuidFactory;\n $orderedTimeFactory->setCodec(new OrderedTimeCodec($orderedTimeFactory->getUuidBuilder()));\n $orderedTimeUuid = $orderedTimeFactory->uuid1();\n return (string) $orderedTimeUuid;\n}", "public function testLayoutUrn()\n {\n $uuid = $this->_generateRandomUuid(UUID_Rfc4122Uuid::VERSION_RANDOM);\n $regexp = self::RFC4122_LAYOUT_REGEXP;\n $scheme = self::UUID_SCHEME;\n \n $this->assertRegExp(\"#^urn:{$scheme}:{$regexp}$#\", $uuid->toURN());\n }", "public function testUuid3WithKnownUuids()\n {\n $uuids = array(\n '6fa459ea-ee8a-3ca4-894e-db77e160355e' => Uuid::uuid3(Uuid::NAMESPACE_DNS, 'python.org'),\n '9fe8e8c4-aaa8-32a9-a55c-4535a88b748d' => Uuid::uuid3(Uuid::NAMESPACE_URL, 'http://python.org/'),\n 'dd1a1cef-13d5-368a-ad82-eca71acd4cd1' => Uuid::uuid3(Uuid::NAMESPACE_OID, '1.3.6.1'),\n '658d3002-db6b-3040-a1d1-8ddd7d189a4d' => Uuid::uuid3(Uuid::NAMESPACE_X500, 'c=ca'),\n );\n\n foreach ($uuids as $ustr => $uobj) {\n $this->assertEquals(Uuid::RFC_4122, $uobj->getVariant());\n $this->assertEquals(3, $uobj->getVersion());\n $this->assertEquals(Uuid::fromString($ustr), $uobj);\n $this->assertEquals((string) $uobj, $ustr);\n }\n }", "static private function getUUID() {\n\n\t\t$data = random_bytes(16);\n\t $data[6] = chr(ord($data[6]) & 0x0f | 0x40); // set version to 0100\n\t $data[8] = chr(ord($data[8]) & 0x3f | 0x80); // set bits 6-7 to 10\n\t return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4));\n }", "function uid_to_name($uid)\n{\n\tglobal $mysqlMainDb;\n\n\tif ($r = mysql_fetch_row(db_query(\"SELECT CONCAT(nom, ' ', prenom)\n\t\tFROM user WHERE user_id = '\".mysql_real_escape_string($uid).\"'\", $mysqlMainDb))) {\n\t\treturn $r[0];\n\t} else {\n\t\treturn FALSE;\n\t}\n}", "function ivalid_usnum($str){\n return preg_match('/^[2-9]\\d{2}-\\d{3}-\\d{4}$/', $str);\n}", "function uuid_resolver_resolve_user($uuid) {\n $uid = db_result(db_query(\"SELECT uid FROM {uuid_users} WHERE uuid = '%s'\", $uuid));\n if ($uid) {\n $path = 'user/' . $uid;\n if (variable_get('uuid_resolver_user_use_alias', UUID_RESOLVER_USER_USE_ALIAS)) {\n return drupal_get_path_alias($path);\n }\n else {\n return $path;\n }\n }\n else {\n return FALSE;\n }\n}", "public function hasUuid() : bool;", "function convert_uudecode($data)\r\n{\r\n return \\convert_uudecode($data);\r\n}", "public function getKnownUuid(): string\n {\n return $this->knownUuid;\n }", "function generateUID(){\n\t\treturn rand(pow(10, 3), pow(10, 4)-1); //random 4 digit number\n\t}", "public function uuid();", "public function uuid();", "protected function normalizeUid($string)\n {\n $parts = explode('|', $string);\n return $parts[0];\n }", "public static function convertUidToCtype(int $uid): ?string\n {\n if (0 === $uid) {\n return null;\n }\n\n return 'dce_dceuid' . $uid;\n }", "public static function get_uuid() {\n\t\t$data = openssl_random_pseudo_bytes( 16 );\n\t\t$data[6] = chr( ord( $data[6] ) & 0x0f | 0x40 ); // set version to 0100.\n\t\t$data[8] = chr( ord( $data[8] ) & 0x3f | 0x80 ); // set bits 6-7 to 10.\n\n\t\treturn vsprintf( '%s%s-%s-%s-%s-%s%s%s', str_split( bin2hex( $data ), 4 ) );\n\t}", "function checkID($id)\n{\n\t$uid_pos = (int)substr($id, -6, 2);\n\t$uid = (int)substr($id, $uid_pos, 3);\n\t$recovery = \\dal\\lostPassword\\getRecoveryRequest($uid);\n\n\tif (strcasecmp($id, $recovery['mailid']) == 0)\n\t\treturn $uid;\n\telse\n\t\treturn 0;\n}", "public function getUid(): string\n {\n return $this->uid;\n }", "public function getUid(): string\n {\n return $this->uid;\n }", "function wp_is_uuid($uuid, $version = \\null)\n{\n}" ]
[ "0.7261931", "0.7241009", "0.70817137", "0.69060326", "0.6747428", "0.6471552", "0.64191455", "0.6396851", "0.6289656", "0.6274122", "0.6232582", "0.6220957", "0.6196473", "0.61548495", "0.6088645", "0.60865676", "0.5971346", "0.59700394", "0.5951919", "0.594946", "0.59360695", "0.5935181", "0.5934701", "0.59342337", "0.59342337", "0.59342337", "0.59342337", "0.5917564", "0.59160125", "0.5842888", "0.5808816", "0.5805006", "0.5803899", "0.5789487", "0.5776649", "0.5758216", "0.575737", "0.57481176", "0.57472324", "0.57409203", "0.57335407", "0.57195795", "0.5701147", "0.5666323", "0.5664713", "0.56423736", "0.56331253", "0.5632919", "0.56270343", "0.56268436", "0.5610875", "0.5597321", "0.55697954", "0.5565799", "0.55648255", "0.5563996", "0.5559661", "0.55564976", "0.5531135", "0.5521626", "0.5513276", "0.55104995", "0.550235", "0.5488969", "0.5471064", "0.54661494", "0.544773", "0.54416966", "0.5419666", "0.54041904", "0.53936017", "0.53881747", "0.53850543", "0.5365522", "0.53618747", "0.5355214", "0.53449416", "0.53419214", "0.532725", "0.5318814", "0.53049886", "0.530492", "0.53030235", "0.53028125", "0.5292755", "0.5291398", "0.52874196", "0.52831036", "0.5275761", "0.52722675", "0.526334", "0.5261399", "0.5261399", "0.5260032", "0.5255606", "0.52554655", "0.52489096", "0.5244764", "0.5244764", "0.5242919" ]
0.8151377
0
Test Uuid format after converting to a string
Тестирование формата Uuid после преобразования в строку
public function testUuidFormat() { $uuid = Uuid::uuid1(); $str = $uuid->toString(); $this->assertRegExp('/^\{?[0-9a-f]{8}\-?[0-9a-f]{4}\-?[0-9a-f]{4}\-?[0-9a-f]{4}\-?[0-9a-f]{12}\}?$/i', $str); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testUuidConversion()\n {\n $uuid1 = Uuid::uuid1();\n $str1 = $uuid1->toString();\n\n $uuid2 = Uuid::fromString($str1);\n $str2 = $uuid2->toString();\n\n $this->assertEquals($str1, $str2);\n }", "function conv_to_udaaanId($userId){\r\n $max_length = 11;\r\n $required_zeros = $max_length-2-strlen($userId);\r\n $zeros = str_repeat('0', $required_zeros);\r\n $udaaan_id = 'UD'.$zeros.$userId;\r\n return $udaaan_id;\r\n}", "function uid_decode($value)\n{\n $service = new UidGenerator;\n\n return $service->decode($value);\n}", "function uid2n($u, $mix = 3, $length = 8) {\r\n $r = strtolower($u);\r\n $r = str_replace('y', '0', $r);\r\n $r = base_convert($r, 34, 10);\r\n $r = substr($r, 1);\r\n $r = substr($r, $mix, $length - $mix + 1) . substr($r, 0, $mix);\r\n return (int)$r;\r\n }", "public static function fromString(string $str) : Uuid;", "function toUserID($id) {\n if (preg_match('/^STEAM_/', $id)) {\n $split = explode(':', $id);\n return $split[2] * 2 + $split[1];\n } elseif (preg_match('/^765/', $id) && strlen($id) > 15) {\n return bcsub($id, '76561197960265728');\n } else {\n return $id; // We have no idea what this is, so just return it.\n }\n}", "function newUID () {\n\t$chars = array('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','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\n\t$m_str = $chars; \n\t$rnd=0;\n\t$r = '';\n\t$uid = array();\n\tfor ($i=0; $i<36; $i++) {\n\t\tif ($i==8 || $i==13 || $i==18 || $i==23) {\n\t\t\t$uid[$i] = '-';\n\t\t} elseif ($i==14) {\n\t\t\t$uid[$i] = '4';\n\t\t} else {\n\t\t\tif ($rnd <= 0x02) {\n\t\t\t\t$rnd = 0x2000000 + ((mt_rand(100000,9999999)*.0000001*0x1000000)|0);\n\t\t\t}\n\t\t\t$r = $rnd & 0xf;\n\t\t\t$rnd = $rnd >> 4;\n\t\t\t$uid[$i] = $m_str[($i == 19) ? ($r & 0x3) | 0x8 : $r];\n\t\t}\n\t}\n\treturn implode(\"\",$uid);\n}", "function uid_encode($value)\n{\n $service = new UidGenerator;\n\n return $service->encode($value);\n}", "function nicknameToUid($string_nick_name)\n {\n printf(\"nicknameToUid: This function is not implemented yet.\\n\");\n }", "public function assertUid($value)\n {\n return $this->assertString(\n $value,\n 36,\n 36,\n '/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/'\n );\n }", "function formatuuid($uuidstring) {\n $uuidpattern = \"/(\\w{2})(\\w{8})(\\w{4})(\\w{4})(\\w{4})(\\w{12})/i\";\n $uuidreplace = \"$2-$3-$4-$5-$6\";\n $formatteduuid = strtolower(preg_replace($uuidpattern, $uuidreplace, $uuidstring));\n echo $formatteduuid;\n \n}", "function checkuid($uid) {\n \n}", "public function testDeconvertUUID()\n {\n $serializer = new Gson3;\n\n $deconverted = $serializer->deconvertUUID(\"41d2e28a-20a4-4ab0-b379-d810dede3786\");\n $this->assertEquals(\"41d2e28a-20a4-4ab0-b379-d810dede3786\", $deconverted, \"Incorrect deconversion for UUID\");\n }", "public function testUuidGeneration()\n {\n $uuid1 = Uuid::uuid1();\n $uuid2 = Uuid::uuid1();\n\n $str1 = $uuid1->toString();\n $str2 = $uuid2->toString();\n\n $this->assertInternalType('string', $str1);\n $this->assertInternalType('string', $str2);\n $this->assertNotEquals($str1, $str2);\n }", "function n2uid($n, $mix = 3, $length = 8) {\r\n $r = self::padl_length($n, $length + 1, '0');\r\n $r = substr($r, -$mix) . substr($r, 0, $length - $mix + 1);\r\n $r = '9' . $r;\r\n $r = base_convert($r, 10, 34);\r\n $r = str_replace('0', 'y', $r);\r\n return strtoupper($r);\r\n }", "function uidToNickname($uid)\n {\n printf(\"nicknameToUid: This function is not implemented yet.\\n\");\n }", "public function getUid() {}", "public function getUid() {}", "public function getUid() {}", "public function getUid() {}", "public function getUid() {}", "public function getUid() {}", "public function testUuidStringFormatter() {\n $entity = EntityTest::create([]);\n $entity->save();\n\n $uuid_field = $entity->get('uuid');\n\n // Verify default render.\n $render_array = $uuid_field->view([]);\n $this->assertSame($entity->uuid(), $render_array[0]['#context']['value'], 'The rendered UUID matches the entity UUID.');\n $this->assertStringContainsString($entity->uuid(), $this->render($render_array), 'The rendered UUID found.');\n\n // Verify customized render.\n $render_array = $uuid_field->view(['settings' => ['link_to_entity' => TRUE]]);\n $this->assertSame('link', $render_array[0]['#type']);\n $this->assertSame($entity->uuid(), $render_array[0]['#title']['#context']['value']);\n $this->assertSame($entity->toUrl()->toString(), $render_array[0]['#url']->toString());\n $rendered = $this->render($render_array);\n $this->assertStringContainsString($entity->uuid(), $rendered, 'The rendered UUID found.');\n $this->assertStringContainsString($entity->toUrl()->toString(), $rendered, 'The rendered entity URL found.');\n }", "abstract protected function get_uuid();", "public function NewUid()\n {\n $uuid = (string) Str::uuid();\n $uuid = str_replace(\"-\", \"\", $uuid);\n return $uuid;\n }", "public function testUuidPassesPythonTests()\n {\n // This array is taken directly from the Python tests, more or less\n $tests = array(\n array(\n 'string' => '00000000-0000-0000-0000-000000000000',\n 'curly' => '{00000000-0000-0000-0000-000000000000}',\n 'hex' => '00000000000000000000000000000000',\n 'bytes' => 'AAAAAAAAAAAAAAAAAAAAAA==',\n 'int' => '0',\n 'fields' => array(\n 'time_low' => '0',\n 'time_mid' => '0',\n 'time_hi_and_version' => '0',\n 'clock_seq_hi_and_reserved' => '0',\n 'clock_seq_low' => '0',\n 'node' => '0',\n ),\n 'urn' => 'urn:uuid:00000000-0000-0000-0000-000000000000',\n 'time' => '0',\n 'clock_seq' => '0000',\n 'variant' => Uuid::RESERVED_NCS,\n 'version' => null,\n ),\n array(\n 'string' => '00010203-0405-0607-0809-0a0b0c0d0e0f',\n 'curly' => '{00010203-0405-0607-0809-0a0b0c0d0e0f}',\n 'hex' => '000102030405060708090a0b0c0d0e0f',\n 'bytes' => 'AAECAwQFBgcICQoLDA0ODw==',\n 'int' => '5233100606242806050955395731361295',\n 'fields' => array(\n 'time_low' => '10203',\n 'time_mid' => '405',\n 'time_hi_and_version' => '607',\n 'clock_seq_hi_and_reserved' => '8',\n 'clock_seq_low' => '9',\n 'node' => '0a0b0c0d0e0f',\n ),\n 'urn' => 'urn:uuid:00010203-0405-0607-0809-0a0b0c0d0e0f',\n 'time' => '607040500010203',\n 'clock_seq' => '0809',\n 'variant' => Uuid::RESERVED_NCS,\n 'version' => null,\n ),\n array(\n 'string' => '02d9e6d5-9467-382e-8f9b-9300a64ac3cd',\n 'curly' => '{02d9e6d5-9467-382e-8f9b-9300a64ac3cd}',\n 'hex' => '02d9e6d59467382e8f9b9300a64ac3cd',\n 'bytes' => 'Atnm1ZRnOC6Pm5MApkrDzQ==',\n 'int' => '3789866285607910888100818383505376205',\n 'fields' => array(\n 'time_low' => '02d9e6d5',\n 'time_mid' => '9467',\n 'time_hi_and_version' => '382e',\n 'clock_seq_hi_and_reserved' => '8f',\n 'clock_seq_low' => '9b',\n 'node' => '9300a64ac3cd',\n ),\n 'urn' => 'urn:uuid:02d9e6d5-9467-382e-8f9b-9300a64ac3cd',\n 'time' => '82e946702d9e6d5',\n 'clock_seq' => '0f9b',\n 'variant' => Uuid::RFC_4122,\n 'version' => 3,\n ),\n array(\n 'string' => '12345678-1234-5678-1234-567812345678',\n 'curly' => '{12345678-1234-5678-1234-567812345678}',\n 'hex' => '12345678123456781234567812345678',\n 'bytes' => 'EjRWeBI0VngSNFZ4EjRWeA==',\n 'int' => '24197857161011715162171839636988778104',\n 'fields' => array(\n 'time_low' => '12345678',\n 'time_mid' => '1234',\n 'time_hi_and_version' => '5678',\n 'clock_seq_hi_and_reserved' => '12',\n 'clock_seq_low' => '34',\n 'node' => '567812345678',\n ),\n 'urn' => 'urn:uuid:12345678-1234-5678-1234-567812345678',\n 'time' => '678123412345678',\n 'clock_seq' => '1234',\n 'variant' => Uuid::RESERVED_NCS,\n 'version' => null,\n ),\n array(\n 'string' => '6ba7b810-9dad-11d1-80b4-00c04fd430c8',\n 'curly' => '{6ba7b810-9dad-11d1-80b4-00c04fd430c8}',\n 'hex' => '6ba7b8109dad11d180b400c04fd430c8',\n 'bytes' => 'a6e4EJ2tEdGAtADAT9QwyA==',\n 'int' => '143098242404177361603877621312831893704',\n 'fields' => array(\n 'time_low' => '6ba7b810',\n 'time_mid' => '9dad',\n 'time_hi_and_version' => '11d1',\n 'clock_seq_hi_and_reserved' => '80',\n 'clock_seq_low' => 'b4',\n 'node' => '00c04fd430c8',\n ),\n 'urn' => 'urn:uuid:6ba7b810-9dad-11d1-80b4-00c04fd430c8',\n 'time' => '1d19dad6ba7b810',\n 'clock_seq' => '00b4',\n 'variant' => Uuid::RFC_4122,\n 'version' => 1,\n ),\n array(\n 'string' => '6ba7b811-9dad-11d1-80b4-00c04fd430c8',\n 'curly' => '{6ba7b811-9dad-11d1-80b4-00c04fd430c8}',\n 'hex' => '6ba7b8119dad11d180b400c04fd430c8',\n 'bytes' => 'a6e4EZ2tEdGAtADAT9QwyA==',\n 'int' => '143098242483405524118141958906375844040',\n 'fields' => array(\n 'time_low' => '6ba7b811',\n 'time_mid' => '9dad',\n 'time_hi_and_version' => '11d1',\n 'clock_seq_hi_and_reserved' => '80',\n 'clock_seq_low' => 'b4',\n 'node' => '00c04fd430c8',\n ),\n 'urn' => 'urn:uuid:6ba7b811-9dad-11d1-80b4-00c04fd430c8',\n 'time' => '1d19dad6ba7b811',\n 'clock_seq' => '00b4',\n 'variant' => Uuid::RFC_4122,\n 'version' => 1,\n ),\n array(\n 'string' => '6ba7b812-9dad-11d1-80b4-00c04fd430c8',\n 'curly' => '{6ba7b812-9dad-11d1-80b4-00c04fd430c8}',\n 'hex' => '6ba7b8129dad11d180b400c04fd430c8',\n 'bytes' => 'a6e4Ep2tEdGAtADAT9QwyA==',\n 'int' => '143098242562633686632406296499919794376',\n 'fields' => array(\n 'time_low' => '6ba7b812',\n 'time_mid' => '9dad',\n 'time_hi_and_version' => '11d1',\n 'clock_seq_hi_and_reserved' => '80',\n 'clock_seq_low' => 'b4',\n 'node' => '00c04fd430c8',\n ),\n 'urn' => 'urn:uuid:6ba7b812-9dad-11d1-80b4-00c04fd430c8',\n 'time' => '1d19dad6ba7b812',\n 'clock_seq' => '00b4',\n 'variant' => Uuid::RFC_4122,\n 'version' => 1,\n ),\n array(\n 'string' => '6ba7b814-9dad-11d1-80b4-00c04fd430c8',\n 'curly' => '{6ba7b814-9dad-11d1-80b4-00c04fd430c8}',\n 'hex' => '6ba7b8149dad11d180b400c04fd430c8',\n 'bytes' => 'a6e4FJ2tEdGAtADAT9QwyA==',\n 'int' => '143098242721090011660934971687007695048',\n 'fields' => array(\n 'time_low' => '6ba7b814',\n 'time_mid' => '9dad',\n 'time_hi_and_version' => '11d1',\n 'clock_seq_hi_and_reserved' => '80',\n 'clock_seq_low' => 'b4',\n 'node' => '00c04fd430c8',\n ),\n 'urn' => 'urn:uuid:6ba7b814-9dad-11d1-80b4-00c04fd430c8',\n 'time' => '1d19dad6ba7b814',\n 'clock_seq' => '00b4',\n 'variant' => Uuid::RFC_4122,\n 'version' => 1,\n ),\n array(\n 'string' => '7d444840-9dc0-11d1-b245-5ffdce74fad2',\n 'curly' => '{7d444840-9dc0-11d1-b245-5ffdce74fad2}',\n 'hex' => '7d4448409dc011d1b2455ffdce74fad2',\n 'bytes' => 'fURIQJ3AEdGyRV/9znT60g==',\n 'int' => '166508041112410060672666770310773930706',\n 'fields' => array(\n 'time_low' => '7d444840',\n 'time_mid' => '9dc0',\n 'time_hi_and_version' => '11d1',\n 'clock_seq_hi_and_reserved' => 'b2',\n 'clock_seq_low' => '45',\n 'node' => '5ffdce74fad2',\n ),\n 'urn' => 'urn:uuid:7d444840-9dc0-11d1-b245-5ffdce74fad2',\n 'time' => '1d19dc07d444840',\n 'clock_seq' => '3245',\n 'variant' => Uuid::RFC_4122,\n 'version' => 1,\n ),\n array(\n 'string' => 'e902893a-9d22-3c7e-a7b8-d6e313b71d9f',\n 'curly' => '{e902893a-9d22-3c7e-a7b8-d6e313b71d9f}',\n 'hex' => 'e902893a9d223c7ea7b8d6e313b71d9f',\n 'bytes' => '6QKJOp0iPH6nuNbjE7cdnw==',\n 'int' => '309723290945582129846206211755626405279',\n 'fields' => array(\n 'time_low' => 'e902893a',\n 'time_mid' => '9d22',\n 'time_hi_and_version' => '3c7e',\n 'clock_seq_hi_and_reserved' => 'a7',\n 'clock_seq_low' => 'b8',\n 'node' => 'd6e313b71d9f',\n ),\n 'urn' => 'urn:uuid:e902893a-9d22-3c7e-a7b8-d6e313b71d9f',\n 'time' => 'c7e9d22e902893a',\n 'clock_seq' => '27b8',\n 'variant' => Uuid::RFC_4122,\n 'version' => 3,\n ),\n array(\n 'string' => 'eb424026-6f54-4ef8-a4d0-bb658a1fc6cf',\n 'curly' => '{eb424026-6f54-4ef8-a4d0-bb658a1fc6cf}',\n 'hex' => 'eb4240266f544ef8a4d0bb658a1fc6cf',\n 'bytes' => '60JAJm9UTvik0Ltlih/Gzw==',\n 'int' => '312712571721458096795100956955942831823',\n 'fields' => array(\n 'time_low' => 'eb424026',\n 'time_mid' => '6f54',\n 'time_hi_and_version' => '4ef8',\n 'clock_seq_hi_and_reserved' => 'a4',\n 'clock_seq_low' => 'd0',\n 'node' => 'bb658a1fc6cf',\n ),\n 'urn' => 'urn:uuid:eb424026-6f54-4ef8-a4d0-bb658a1fc6cf',\n 'time' => 'ef86f54eb424026',\n 'clock_seq' => '24d0',\n 'variant' => Uuid::RFC_4122,\n 'version' => 4,\n ),\n array(\n 'string' => 'f81d4fae-7dec-11d0-a765-00a0c91e6bf6',\n 'curly' => '{f81d4fae-7dec-11d0-a765-00a0c91e6bf6}',\n 'hex' => 'f81d4fae7dec11d0a76500a0c91e6bf6',\n 'bytes' => '+B1Prn3sEdCnZQCgyR5r9g==',\n 'int' => '329800735698586629295641978511506172918',\n 'fields' => array(\n 'time_low' => 'f81d4fae',\n 'time_mid' => '7dec',\n 'time_hi_and_version' => '11d0',\n 'clock_seq_hi_and_reserved' => 'a7',\n 'clock_seq_low' => '65',\n 'node' => '00a0c91e6bf6',\n ),\n 'urn' => 'urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6',\n 'time' => '1d07decf81d4fae',\n 'clock_seq' => '2765',\n 'variant' => Uuid::RFC_4122,\n 'version' => 1,\n ),\n array(\n 'string' => 'fffefdfc-fffe-fffe-fffe-fffefdfcfbfa',\n 'curly' => '{fffefdfc-fffe-fffe-fffe-fffefdfcfbfa}',\n 'hex' => 'fffefdfcfffefffefffefffefdfcfbfa',\n 'bytes' => '//79/P/+//7//v/+/fz7+g==',\n 'int' => '340277133821575024845345576078114880506',\n 'fields' => array(\n 'time_low' => 'fffefdfc',\n 'time_mid' => 'fffe',\n 'time_hi_and_version' => 'fffe',\n 'clock_seq_hi_and_reserved' => 'ff',\n 'clock_seq_low' => 'fe',\n 'node' => 'fffefdfcfbfa',\n ),\n 'urn' => 'urn:uuid:fffefdfc-fffe-fffe-fffe-fffefdfcfbfa',\n 'time' => 'ffefffefffefdfc',\n 'clock_seq' => '3ffe',\n 'variant' => Uuid::RESERVED_FUTURE,\n 'version' => null,\n ),\n array(\n 'string' => 'ffffffff-ffff-ffff-ffff-ffffffffffff',\n 'curly' => '{ffffffff-ffff-ffff-ffff-ffffffffffff}',\n 'hex' => 'ffffffffffffffffffffffffffffffff',\n 'bytes' => '/////////////////////w==',\n 'int' => '340282366920938463463374607431768211455',\n 'fields' => array(\n 'time_low' => 'ffffffff',\n 'time_mid' => 'ffff',\n 'time_hi_and_version' => 'ffff',\n 'clock_seq_hi_and_reserved' => 'ff',\n 'clock_seq_low' => 'ff',\n 'node' => 'ffffffffffff',\n ),\n 'urn' => 'urn:uuid:ffffffff-ffff-ffff-ffff-ffffffffffff',\n 'time' => 'fffffffffffffff',\n 'clock_seq' => '3fff',\n 'variant' => Uuid::RESERVED_FUTURE,\n 'version' => null,\n ),\n );\n\n foreach ($tests as $test) {\n $uuids = array(\n Uuid::fromString($test['string']),\n Uuid::fromString($test['curly']),\n Uuid::fromString($test['hex']),\n Uuid::fromBytes(base64_decode($test['bytes'])),\n Uuid::fromString($test['urn']),\n );\n foreach ($uuids as $uuid) {\n $this->assertEquals($test['string'], (string) $uuid);\n $this->assertEquals($test['hex'], $uuid->getHex());\n $this->assertEquals(base64_decode($test['bytes']), $uuid->getBytes());\n if ($this->hasMoontoastMath()) {\n $this->assertEquals($test['int'], (string) $uuid->getInteger());\n }\n $this->assertEquals($test['fields'], $uuid->getFieldsHex());\n $this->assertEquals($test['fields']['time_low'], $uuid->getTimeLowHex());\n $this->assertEquals($test['fields']['time_mid'], $uuid->getTimeMidHex());\n $this->assertEquals($test['fields']['time_hi_and_version'], $uuid->getTimeHiAndVersionHex());\n $this->assertEquals($test['fields']['clock_seq_hi_and_reserved'], $uuid->getClockSeqHiAndReservedHex());\n $this->assertEquals($test['fields']['clock_seq_low'], $uuid->getClockSeqLowHex());\n $this->assertEquals($test['fields']['node'], $uuid->getNodeHex());\n $this->assertEquals($test['urn'], $uuid->getUrn());\n if ($uuid->getVersion() == 1) {\n $this->assertEquals($test['time'], $uuid->getTimestampHex());\n }\n $this->assertEquals($test['clock_seq'], $uuid->getClockSequenceHex());\n $this->assertEquals($test['variant'], $uuid->getVariant());\n $this->assertEquals($test['version'], $uuid->getVersion());\n }\n }\n }", "private function convert_id($id){\n if (strlen($id) === 17){\n $converted = substr($id, 3) - 61197960265728;\n }\n else{\n $converted = '765'.($id + 61197960265728);\n }\n return (string) $converted;\n}", "public static function isUuid($input){\n $regex = '/^\\{?[A-Z0-9]{8}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{12}\\}?$/';\n $compare = strtoupper($input);\n return preg_match($regex, $compare);\n // regex copied from https://stackoverflow.com/questions/1253373/php-check-for-valid-guid\n }", "function cleanId($id){\n $arr = explode(\"@\", $id);\n $arr = $arr[0];\n $arr = explode(\"_\", $arr);\n $arr = substr($arr[1],2);\n return \"0\".$arr;\n }", "private static function getUuid()\n\t{\n\t\t$uuid = Uuid::generate(4);\n\t\treturn $uuid->string;\n\t}", "public function resolveUuid()\n {\n if (($version = $this->resolveUuidVersion()) == 'ordered') {\n return Str::orderedUuid();\n }\n\n return call_user_func([Uuid::class, $version]);\n }", "protected function getUuidString()\n {\n return $this->uuidString ?: '';\n }", "function uidToUserinfo($int_uid)\n {\n printf(\"uidToUserinfo: This function is not implemented yet.\\n\");\n }", "function get_user_id_from_string($string)\n{\n}", "public function getUuid($data);", "function upnp_uuid() {\n\t\t$uuid = md5(get_interface_mac(get_real_interface(\"wan\")));\n\t\t/* put uuid in correct format 8-4-4-4-12 */\n\t\treturn substr($uuid, 0, 8) . '-' . substr($uuid, 9, 4) . '-' . substr($uuid, 13, 4) . '-' . substr($uuid, 17, 4) . '-' . substr($uuid, 21, 12);\n\t}", "public function testUuid5WithNamespaceAsUuidString()\n {\n $uuid = Uuid::uuid5(Uuid::NAMESPACE_DNS, 'python.org');\n $this->assertEquals('886313e1-3b8a-5372-9b90-0c9aee199e5d', $uuid->toString());\n $this->assertEquals(2, $uuid->getVariant());\n $this->assertEquals(5, $uuid->getVersion());\n }", "static public function cnvUUID2TextId($aUUID) {\n\t\t$theResult = str_replace('-','',trim($aUUID,'{} '));\n\t\t$sLen = strlen($theResult);\n\t\treturn ($sLen==32) ? $theResult : '';\n\t}", "public function getUuid(): string;", "function make_uuid()\n{\n\t\n/*\n2D015183- (8)\nFC70-\n4BBC-\n8471-\n09242E2AABBF (12)\n*/\n\n\t$uuid1arr = str_split(uniqid('', true));\n\t$uuid2arr = str_split(uniqid('', true));\n\t\n\t$uuid = \"\";\n\t\n\tfor ($i = 0; $i < 8; $i++)\n\t{\n\t\t$uuid = $uuid.$uuid1arr[$i];\n\t}\n\t\n\t$uuid = $uuid.\"-\";\n\t\n\tfor ($i = 7; $i < 11; $i++)\n\t{\n\t\t$uuid = $uuid.$uuid1arr[$i];\n\t}\n\t\n\t$uuid = $uuid.\"-\";\n\t\n\tfor ($i = 11; $i < 14; $i++)\n\t{\n\t\t$uuid = $uuid.$uuid1arr[$i];\n\t}\n\t\n\t$uuid = $uuid . $uuid1arr[15] . \"-\";\n\t\n\tfor ($i = 16; $i < 20; $i++)\n\t{\n\t\t$uuid = $uuid. $uuid1arr[$i];\n\t}\n\t\n\t$uuid = $uuid.\"-\";\n\t\n\tfor ($i = 15; $i < 23; $i++)\n\t{\n\t\t$uuid = $uuid.$uuid2arr[$i];\n\t}\n\t\n\tfor ($i = 10; $i < 14; $i++)\n\t{\n\t\t$uuid = $uuid.$uuid2arr[$i];\n\t}\n\t\n\treturn strtoupper($uuid);\n}", "function v3UUID($uid) {\n // Get hexadecimal components of namespace\n $nhex = str_replace(array('-','{','}'), '', uniqid());\n\n // Binary Value\n $nstr = '';\n\n // Convert Namespace UUID to bits\n for($i = 0; $i < strlen($nhex); $i+=2) {\n $nstr .= chr(hexdec($nhex[$i].$nhex[$i+1]));\n }\n\n // Calculate hash value\n $hash = md5($nstr . $uid);\n\n return sprintf('%08s-%04s-%04x-%04x-%12s',\n // 32 bits for \"time_low\"\n substr($hash, 0, 8),\n // 16 bits for \"time_mid\"\n substr($hash, 8, 4),\n // 16 bits for \"time_hi_and_version\",\n // four most significant bits holds version number 3\n (hexdec(substr($hash, 12, 4)) & 0x0fff) | 0x3000,\n // 16 bits, 8 bits for \"clk_seq_hi_res\",\n // 8 bits for \"clk_seq_low\",\n // two most significant bits holds zero and one for variant DCE1.1\n (hexdec(substr($hash, 16, 4)) & 0x3fff) | 0x8000,\n // 48 bits for \"node\"\n substr($hash, 20, 12)\n );\n }", "public function asString(): string\n {\n return $this->uuid;\n }", "function invalidUid($username){\n $result;\n if (!preg_match(\"/^[a-zA-z0-9]*$/\", $username)) {\n $reult = true;\n }\n else {\n $result = false;\n }\n\n return $result;\n}", "function getGUID($str){\r\n $sha = sha1($str);\r\n $charid = strtoupper($sha);\r\n $hyphen = chr(45);// \"-\"\r\n $uuid = substr($charid, 0, 8).$hyphen\r\n .substr($charid, 8, 4).$hyphen\r\n .substr($charid,12, 4).$hyphen\r\n .substr($charid,16, 4).$hyphen\r\n .substr($charid,20,12);\r\n return $uuid; \r\n}", "public static function createUuidsNormally()\n {\n }", "public function id_user()\n {\n $q = $this->db->query(\"select MAX(RIGHT(id_user,4)) as id_max from tbl_user\");\n $id = \"\";\n if ($q->num_rows() > 0) {\n foreach ($q->result() as $k) {\n $tmp = ((int) $k->id_max) + 1;\n $id = sprintf(\"%04s\", $tmp);\n }\n } else {\n $id = \"0001\";\n }\n return \"US-\" . $id;\n }", "function ju_is_guid(string $s):bool {return 36 === strlen($s) && preg_match(\n\t'#^\\{?[A-Z0-9]{8}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{12}\\}?$#', $s\n);}", "public function getUid(): ?string;", "static function timeuuid();", "private function createUID()\n {\n $this->connection = new Connect(SERVER,USER,PASSWORD);\n $link = $this->connection;\n $link->setDatabase(DATABASE);\n $query = \"SELECT LAST(UID) AS LastUID FROM USERS\";\n $last_known_UID = $link->getQuery(DATABASE,$query);\n $generator = $last_known_UID['LastUID'];\n $split = explode(\"-\",$generator);\n //generating user ID\n $new_suffix = is_int($split[1])? $split[1] + 1: die(\"fatal error occurred\");\n $pref = substr($this->fname,0,3);\n $comp = compact($pref,$new_suffix);\n $uid = implode(\"-\",$comp);\n return $uid;\n\n }", "public static function makeUid( $unique_id ) {\n static $FMT = '%s-%s@%s';\n static $TMDTHIS = 'Ymd\\THisT';\n return [self::$LCvalue => sprintf( $FMT, date( $TMDTHIS ),\n substr( microtime(), 2, 4) . self::getRandChars( 6 ),\n $unique_id ),\n self::$LCparams => null];\n }", "function uid_to_name($uid)\n{\n\tglobal $mysqlMainDb;\n\n\tif ($r = mysql_fetch_row(db_query(\"SELECT CONCAT(nom, ' ', prenom)\n\t\tFROM user WHERE user_id = '\".mysql_real_escape_string($uid).\"'\", $mysqlMainDb))) {\n\t\treturn $r[0];\n\t} else {\n\t\treturn FALSE;\n\t}\n}", "function kis_uuid($hyphen='',$prefix = '') {\n\t//Using without prefix.\n\t//echo uuid(); //Returns like ‘1225c695-cfb8-4ebb-aaaa-80da344e8352′ \n\t//Using with prefix\n\t//echo uuid('-','urn:uuid:');//Returns like ‘urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344e8352′\n\n\t// base on function uuid() ,mod for sorted\n\t//53d1be2f7b9392.93290838#53d1be2f-7b93-92$fe-7022-6a0493521f1c\n\t//53d1bdd7b0b6b#53d1bdd7-b0b6-b$db-bc4c-69b2cf0334ce\n\t$kk = uniqid('',true); //53d1bc74439ba0.80927708\n\t$kk = explode('.', $kk);\n\t$kk= $kk[0];\n\t// $kk = uniqid(); //53d1bdd7b0b6b\n\t$jj=1;\n\tif(strlen($kk)>13){\n\t$jj=strlen($kk)-12; //-13+1\n\t}\n\t$chars = md5(uniqid(mt_rand(), true));\n\t$uuid = substr($kk, 0, 8).$hyphen\n\t.substr($kk, 8, 4).$hyphen;\n\t$uuid .= substr($kk, 12, $jj).substr($chars, 12,(4-$jj)).$hyphen\n\t.substr($chars, 16, 4).$hyphen\n\t.substr($chars, 20, 12);\n\treturn $prefix.$uuid;\n}", "public function getKnownUuid(): string\n {\n return $this->knownUuid;\n }", "public static function getUUID($format = false)\n {\n $uuid = wp_generate_uuid4();\n if ( $format ) {\n return Stringify::replace('-','',$uuid);\n }\n return $uuid;\n }", "abstract public function get_uid( $data=false );", "function ivalid_usnum($str){\n return preg_match('/^[2-9]\\d{2}-\\d{3}-\\d{4}$/', $str);\n}", "public function getUid(): string\n {\n return $this->uid;\n }", "public function getUid(): string\n {\n return $this->uid;\n }", "function uuid()\n{\n $orderedTimeFactory = new UuidFactory;\n $orderedTimeFactory->setCodec(new OrderedTimeCodec($orderedTimeFactory->getUuidBuilder()));\n $orderedTimeUuid = $orderedTimeFactory->uuid1();\n return (string) $orderedTimeUuid;\n}", "public function verifyUID() {\n\t$ids = new uids(); // make sure UID is unique\n\t$uid = $this->getUID();\n\t$chk = $this->getUID($uid); if ($uid == $chk) return;\n\n\t$this->set(\"props.uid\", $chk);\n\t$this->save();\n}", "public static function uuid($check) {\n $regex = '/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5][a-fA-F0-9]{3}-[89aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$/';\n return self::_check($check, $regex);\n }", "static function uuid(string $str)\n\t{\n\t\tif(preg_match('/^(\\w+\\-){4}\\w+$/', $str) != 1)\n\t\t{\n\t\t\tthrow new Exception(\"ERR_UUID\", 400);\n\t\t}\n\t\treturn $str;\n\t}", "public function getUuid($_userId) {\n $db = new MySqlTranslator();\n try {\n $db->query(\"SELECT user_uuid FROM `user` WHERE id = '{$_userId}'\");\n $results = $db->single();\n return $results->user_uuid;\n } catch (PDOException $_e) {\n echo $_e->getMessage();\n return false;\n }\n }", "public function buildU2MsgId($userId)\n {\n $timeMillis = $this->ctx->ZalyHelper->getMsectime();\n $msgId = \"U2-\" . substr($userId, 0, 8) . \"-\" . $timeMillis;\n return $msgId;\n }", "private function parseId($userData)\n\t{\n\t\t$arr = array();\n\t\tpreg_match(\"/\\d+/\", $userData, $arr);\n\n\t\treturn $arr[0];\n\t}", "public function testUuid3WithNamespaceAsUuidString()\n {\n $uuid = Uuid::uuid3(Uuid::NAMESPACE_DNS, 'python.org');\n $this->assertEquals('6fa459ea-ee8a-3ca4-894e-db77e160355e', $uuid->toString());\n $this->assertEquals(2, $uuid->getVariant());\n $this->assertEquals(3, $uuid->getVersion());\n }", "function getmyuid()\n{\n\treturn 0;\n}", "function nicknameToUid($string_nick_name)\n {\n if (!is_string($string_nick_name) || $string_nick_name == '') {\n return -1;\n }\n\n $this->http_client->get(\"{$this->plurk_paths['http_base']}\" .\n \"/user/{$string_nick_name}\");\n $array_profile = $this->http_client->currentResponse();\n\n if (!preg_match('/var GLOBAL = \\{.*\"uid\": ([\\d]+),.*\\}/imU', \n $array_profile['body'], $matches)) {\n return -1;\n }\n\n return (int )$matches[1];\n }", "function generateUID(){\n\t\treturn rand(pow(10, 3), pow(10, 4)-1); //random 4 digit number\n\t}", "function adjustURN_UUIDs($ebxml_string)\n{\n\t$NEW_ebxml_string=\"\";\n\t$search = \"urn:uuid:\";\n\t$replace = \"urn-uuid-\";\n\t$NEW_ebxml_string = str_replace($search,$replace,$ebxml_string);\n\n\treturn $NEW_ebxml_string;\n\n}", "private function getUserNormalizedGroup($userId): int\n {\n $groupNum = (int) substr($userId, 0, 1);\n $groupNum += (int) ($userId >= 10? substr($userId, 0, 1) : $groupNum);\n\n return $groupNum;\n }", "function uidToNickname($uid)\n {\n if (!is_int($uid)) {\n return false;\n }\n\n if ($uid == $this->uid) {\n return (string) $this->nick_name;\n }\n\n foreach ($this->friends as $friend) {\n if ($friend['uid'] == $uid) {\n return (string) $friend['nick_name'];\n }\n }\n\n /*\n * We don't know who this is, just return the string \"User $uid\"\n */\n return 'User ' . $uid;\n\n }", "function _health_gen_uid($length = 10) {\n $str = \"\";\n for ($x = 0; $x < $length; $x++) {\n $str .= substr(str_shuffle(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"), 0, 1);\n }\n return $str;\n}", "public static function get_uuid() {\n\t\t$data = openssl_random_pseudo_bytes( 16 );\n\t\t$data[6] = chr( ord( $data[6] ) & 0x0f | 0x40 ); // set version to 0100.\n\t\t$data[8] = chr( ord( $data[8] ) & 0x3f | 0x80 ); // set bits 6-7 to 10.\n\n\t\treturn vsprintf( '%s%s-%s-%s-%s-%s%s%s', str_split( bin2hex( $data ), 4 ) );\n\t}", "public function testLayoutUrn()\n {\n $uuid = $this->_generateRandomUuid(UUID_Rfc4122Uuid::VERSION_RANDOM);\n $regexp = self::RFC4122_LAYOUT_REGEXP;\n $scheme = self::UUID_SCHEME;\n \n $this->assertRegExp(\"#^urn:{$scheme}:{$regexp}$#\", $uuid->toURN());\n }", "abstract protected function getUuidFromStore();", "public function getUuid();", "public function testCreationStringUuid()\n {\n $creation = EloquentUserModel::create([\n 'username' => 'username',\n 'password' => 'secret',\n ]);\n\n static::assertEquals(36, strlen($creation->id));\n\n $model = EloquentUserModel::first();\n\n static::assertEquals(36, strlen($model->id));\n static::assertRegExp('/^[0-9a-f-]{36}$/', $model->id);\n static::assertRegExp('/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/', $model->id);\n\n static::assertEquals($creation->id, $model->id);\n }", "static private function getUUID() {\n\n\t\t$data = random_bytes(16);\n\t $data[6] = chr(ord($data[6]) & 0x0f | 0x40); // set version to 0100\n\t $data[8] = chr(ord($data[8]) & 0x3f | 0x80); // set bits 6-7 to 10\n\t return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4));\n }", "function uid_generate($db,$ustate,$udistrict,$umandal,$uvillage)\n{\n\t$uid = $ustate;\n\t\n\t//append district code to uid\n\t$rows = mysql_query(\"SELECT DISTINCT dcode FROM locations_list WHERE dname= '\".$udistrict.\"'\",$db);\n\t\t\n\tif(mysql_num_rows($rows)>0)\n\t\t$result = mysql_fetch_array($rows,MYSQL_ASSOC);\n\t\t\n\t$uid .= $result['dcode'];\n\t\n\t//append mandal code to uid\n\t$rows = mysql_query(\"SELECT DISTINCT mcode FROM locations_list WHERE mname= '\".$umandal.\"'\",$db);\n\t\n\tif(mysql_num_rows($rows)>0)\n\t\t$result = mysql_fetch_array($rows,MYSQL_ASSOC);\n\t\t\n\t$uid .= $result['mcode'];\n\t\n\t//append village code to uid\n\t$rows = mysql_query(\"SELECT vcode FROM locations_list WHERE vname= '\".$uvillage.\"'\",$db);\n\t\n\tif(mysql_num_rows($rows)>0)\n\t\t$result = mysql_fetch_array($rows,MYSQL_ASSOC);\n\t\t\n\t$temp = converttobase36($result['vcode']);\n\t\n\t$uid .= $temp;\n\t\n\t//append serial number to uid\t\n\t$rows = mysql_query(\"SELECT fid FROM farmers_personal_det WHERE fid LIKE '\".$uid.__.\"' \",$db);\n\t\n\tif($rows != NULL)\t\t\n\t\t$sno = (mysql_num_rows($rows)+1);\n\telse\n\t\t$sno = 1;\n\t\n\t$temp = converttobase36($sno);\t\n\t$uid .= $temp;\n\t\n\treturn $uid;\n\n}", "static function uuid();", "public function getNameIdFormat();", "function getUserId($maxid,$name)\n {\n //$finalString = substr($name,0,2).$mobileNo[8].$firstPart.$mobileNo[0] ;\n $day = date(\"d\"); \n $month = date(\"m\"); \n $finalString = \"HM\".substr($name,0,2).$day.\"\".$month.\"\".$maxid;\n return $finalString; \n }", "protected function normalizeUid($string)\n {\n $parts = explode('|', $string);\n return $parts[0];\n }", "protected function generateUuid(): string\n {\n $strategy = $this->uuidOptions->strategy;\n\n if (in_array($strategy, ['uuid3', 'uuid5'])) {\n return Uuid::{$strategy}(\n $this->uuidOptions->namespace,\n $this->uuidOptions->name\n );\n }\n\n return Uuid::{$strategy}();\n }", "function getUUID(){\n $data = random_bytes(16);\n $data[6] = chr(ord($data[6]) & 0x0f | 0x40);\n $data[8] = chr(ord($data[8]) & 0x3f | 0x80);\n return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4));\n}", "public function resolveUuidVersion(): string\n {\n if (($uuidVersion = $this->uuidVersion()) === 'ordered') {\n $uuidVersion = 'uuid6';\n }\n\n if (in_array($uuidVersion, $this->uuidVersions)) {\n return $uuidVersion;\n }\n\n return 'uuid4';\n }", "public static function isUuid(string $candidate): bool\n {\n return 1 === \\preg_match(self::TEXTUAL_FORMAT, $candidate);\n }", "public function uuid3(): string;", "public function provideUlid()\n {\n return (string) Ulid::generate();\n }", "public function getUid(): string\n {\n return $this->getId();\n }", "public function getUuid() : ?string ;", "public function resolveUuid(): UuidInterface\n {\n return call_user_func([Uuid::class, $this->resolveUuidVersion()]);\n }", "private function uniqid2str()\n {\n return str_replace(\".\", \"\", uniqid(\"\", true));\n }", "function idFriendly( $string )\n{\n $string = str_replace( \" \", \"\", $string );\n $newString = \"\";\n for ( $i = 0; $i < strlen( $string ); $i++ ) {\n if ( is_numeric( $string[ $i ] ) ) {\n $newString .= convertDigit( $string[ $i ] );\n } //is_numeric( $string[ $i ] )\n else {\n $newString .= $string[ $i ];\n }\n \n } //$i = 0; $i < strlen( $string ); $i++\n $newString = preg_replace( '/[^A-Za-z0-9\\-]/', '', $newString );\n \n return $newString;\n}", "function getCheckString($uid) {\r\n\t\treturn $uid . '_' . join('', $this->libs->Config->get('Session', 'use'));\r\n\t}", "function checkID($id)\n{\n\t$uid_pos = (int)substr($id, -6, 2);\n\t$uid = (int)substr($id, $uid_pos, 3);\n\t$recovery = \\dal\\lostPassword\\getRecoveryRequest($uid);\n\n\tif (strcasecmp($id, $recovery['mailid']) == 0)\n\t\treturn $uid;\n\telse\n\t\treturn 0;\n}", "public static function create() : Uuid;", "public function testGeneratingUuidV4()\n {\n $uuid1 = $this->strings->generateUuidV4();\n $uuid2 = $this->strings->generateUuidV4();\n $this->assertNotEquals($uuid1, $uuid2);\n $this->assertEquals(36, strlen($uuid1));\n $this->assertEquals(36, strlen($uuid2));\n }" ]
[ "0.7380141", "0.6806763", "0.6695721", "0.66023767", "0.6516829", "0.650627", "0.64659727", "0.63714087", "0.63474756", "0.6284347", "0.6254948", "0.61958694", "0.61665016", "0.61595625", "0.60763705", "0.60366553", "0.6014404", "0.6013737", "0.6013361", "0.6013361", "0.6013361", "0.6013361", "0.6002248", "0.58890295", "0.58831525", "0.58686537", "0.5867972", "0.5862186", "0.584324", "0.5833888", "0.58134305", "0.57836187", "0.57631886", "0.57570976", "0.57537514", "0.57526505", "0.5748476", "0.57372224", "0.5729081", "0.5719953", "0.5703154", "0.5678767", "0.56759405", "0.5670977", "0.56678104", "0.56657517", "0.565426", "0.5652764", "0.56437516", "0.5638751", "0.563714", "0.5635088", "0.5626005", "0.5622571", "0.5618168", "0.5611546", "0.5605298", "0.5596576", "0.5596576", "0.55879533", "0.5582687", "0.5582571", "0.5580367", "0.557903", "0.55358195", "0.553331", "0.55318016", "0.5526375", "0.5523345", "0.5520274", "0.55171335", "0.5516043", "0.5512568", "0.5509134", "0.54963255", "0.54962814", "0.5496188", "0.54937124", "0.5479747", "0.5451537", "0.54511684", "0.54470515", "0.54467076", "0.5445219", "0.5442799", "0.5426993", "0.54217434", "0.54150426", "0.5407944", "0.53879875", "0.53848124", "0.53802484", "0.5377101", "0.5375566", "0.5369345", "0.5365863", "0.53596336", "0.53518605", "0.53453827", "0.53450644" ]
0.7553242
0
Return a list of time punches related to a user :param $id: The Id of the User :return Array of TimePunchClass: A list of time punches related to the given user.
Вернуть список времени ударов, связанных с пользователем :param $id: Идентификатор пользователя :return Массив TimePunchClass: Список времени ударов, связанных с указанным пользователем.
function GetPunchesFromUserId($id) { global $time_punches; $qt = count($time_punches); $punches = array(); for ($i = 0; $i < $qt; $i++) { if ($time_punches[$i]->user_id == $id) { $punches[] = $time_punches[$i]; } } return $punches; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get( $id )\n { \n \n $result = $this->db->fetchAll( 'SELECT * FROM time WHERE `id`=?', array( $id ) ); \n \n if( $result )\n {\n return $result[0];\n }\n \n return array(\n 'id' => 0,\n 'date' => date('Y-m-d'),\n 'start' => '00:00:00',\n 'end' => '00:00:00',\n 'hours' => 0,\n 'account' => '',\n 'task' => '',\n 'notes' => '',\n 'billable' => 1\n ); \n }", "public function getHoursById($id) {\n $minutes = Cico::where('volunteer_id', $id)->sum('minutes_volunteered');\n\n if($minutes != null) {\n\n return ['id' => $id, 'hours' => Helpers::minutesToHours($minutes), 'minutes' => intval($minutes)];\n\n } else {\n return \"0:00\";\n }\n }", "public function findAllAppointmentByUser($id)\r\n {\r\n //SQL statement\r\n $stmt = $this->conn->prepare(\"SELECT * FROM \" . $this->table . \" WHERE UserID=? AND Checked_IN = ?\");\r\n //Query excuted\r\n $stmt->execute([$id, 0]);\r\n $Appointments = [];\r\n while ($row = $stmt->fetch()) {\r\n //While loop to collect all results and store them in a Appointment Object\r\n $Appointment = new Appointment($row[\"AppointmentID\"], $row[\"UserID\"], $row[\"Date\"], $row[\"Time\"], $row[\"Reason\"], $row[\"Checked_IN\"]);\r\n $Appointments[] = $Appointment;\r\n }\r\n return $Appointments;\r\n }", "function get_event_times( $id ) {\n\t\tif (!is_numeric($id)) return false;\n\n\t\t$sql = \"SELECT * from events_times where events_id = '$id'\n\t\t\t\tORDER BY start_time\";\n\t\t$result = $this->db->query($sql)->result();\n\n\t\treturn $result;\n\t}", "public function users_get($id) {\n\t\tself::validate_access($id);\n\t\t$options['conditions'] = array('project_id = ?', $id);\n\t\t$options['include'] = array('user');\n\t\t$options['select'] = 'user_id';\n\t\t$result = ProjectUser::find('all', $options);\n\t\t$users = array();\n\t\tforeach ($result as $value) {\n\t\t\tarray_push($users, $value->user);\n\t\t}\n\t\treturn $users;\n\t}", "public function userPosts($id = null){\n\t\t$user = new User();\n\t\tif($id){\n\t\t\treturn $this->db->QueryGet(\"SELECT * FROM scheduledposts WHERE id = ? AND userid = ? \",array($id,$user->data()->id))->first();\n\t\t}else{\n\t\t\treturn $this->db->QueryGet(\"SELECT * FROM scheduledposts WHERE userid = ? ORDER BY id DESC\",array($user->data()->id))->results();\n\t\t}\n\t}", "public function getInterestedUsers( $id )\n {\n $query = $this->getEntityManager()->createQueryBuilder();\n $query\n ->add('select', 'u.id as id, u.name as name, u.handle as handle, p.location as location, p.aboutMe as aboutMe')\n ->add('from', 'ClassCentralSiteBundle:User u')\n ->join('u.userCourses','uc')\n ->leftJoin('u.profile','p')\n ->andWhere('uc.course = :id')\n ->andWhere('u.isPrivate = 0')\n ->orderBy('p.score','DESC')\n ->setParameter('id', $id)\n ;\n return $query->getQuery()->getResult( Query::HYDRATE_ARRAY );\n }", "public static function getClippedFromUSer($id)\n {\n $datas = User::find($id)->userclipped;\n return $datas;\n }", "public function getAllPegawai($user_id) {\n $stmt = $this->conn->prepare(\"SELECT t.* FROM pegawai t\");\n $stmt->execute();\n $tasks = $stmt->get_result();\n $stmt->close();\n return $tasks;\n }", "public function mySchedule($user_id){\n $db = \\Config\\Database::connect();\n $query = $db->query('SELECT * FROM user_classes uc, classes c WHERE uc.class_id = c.class_id AND uc.user_id='.$user_id);\n $results = $query->getResult();\n \n foreach ($results as $result){\n if ($result->recurring == '1'){\n $data[] = array(\n 'id'=>$result->class_id,\n 'title'=>$result->class_name,\n 'start'=>date('Y-m-d',strtotime($result->start_date)).' '.date('H:i:s', strtotime($result->start_time)),\n 'end'=>date('Y-m-d',strtotime($result->end_date)).' '.date('H:i:s', strtotime($result->end_time)),\n 'allDay'=>False,\n 'color'=>$result->color,\n );\n } else {\n $data[] = array(\n 'id'=>$result->class_id,\n 'title'=>$result->class_name,\n 'startTime'=>$result->start_time,\n 'endTime'=>$result->end_time,\n 'startRecur'=>$result->start_date,\n 'endRecur'=>$result->end_date,\n 'daysOfWeek'=> str_split($result->dow),\n 'allDay'=>False,\n 'backgroundColor'=>$result->color,\n );\n }\n }\n return $data;\n }", "public function get($id)\n {\n return User::where('id', $id)\n ->orderBy('name', 'desc')\n ->with('tasks')\n ->get();\n }", "public function getRKHPegawai($user_id) {\n $stmt = $this->conn->prepare(\"SELECT t.* FROM rkh_pegawai t\");\n $stmt->execute();\n $tasks = $stmt->get_result();\n $stmt->close();\n return $tasks;\n }", "public function getUsers($id)\n {\n $this->db->where('id_user !=', $id);\n return $this->db->get('user')->result_array();\n }", "public function show($id)\n {\n return Time::find($id);\n }", "public function getTaskListById($id)\n {\n $oneTaskList = TaskListModel::getInstance()->selectById($id);\n if (!empty($oneTaskList)) {\n // On initialise un tableau associatif, on a besoin de mettre les données renvoyer par l'API dans un tableau, parce que elles seront cacheable et on va l'envoyer en json\n $tableauProduits = [];\n $tableauProduits['taskList'] = [];\n\n // On parcourt les produits\n foreach ($oneTaskList as $elt) {\n $prod = [\n \"id\" => $elt->getId(),\n \"title\" => $elt->getTitle(),\n ];\n // on push le produit fetcher dans notre tableau $tableauProduits\n $tableauProduits['taskList'][] = $prod;\n }\n http_response_code(200);\n echo json_encode($tableauProduits);\n }\n }", "public function getUser($id): array\n {\n $user = DB::table('users')\n ->leftJoin('positions', 'users.position_id', '=', 'positions.id')\n ->select('users.*', 'positions.id as position_id', 'positions.name as position_name')\n ->where('users.id', $id)\n ->first();\n $user_array = null;\n if ($user != null) {\n $departments = DB::table('user_departments')\n ->leftJoin('departments', 'user_departments.department_id', '=', 'departments.id')\n ->select('departments.id as department_id', 'departments.name as department_name')\n ->where('user_id', $id)\n ->get();\n $user_array = ([\n 'id' => $user->id,\n 'name' => $user->name,\n 'email' => $user->email,\n 'profile_photo' => $user->profile_photo,\n 'position_id' => $user->position_id,\n 'position_name' => $user->position_name,\n 'department_id' => $departments,\n 'updated_at' => $user->updated_at,\n ]);\n }\n return $user_array;\n }", "function get_my_forecasted_timeperiods($the_user_id) {\n\t\t$my_forecasted_timeperiods = array();\n\n\t\t$query = \"SELECT distinct timeperiods.id, timeperiods.name, timeperiods.start_date\";\n\t\t$query .= \" FROM timeperiods, forecasts\";\n\t\t$query .= \" WHERE timeperiods.id = forecasts.timeperiod_id\";\n\t\t$query .= \" AND forecasts.user_id = '$the_user_id'\";\n\t\t$query .= \" ORDER BY start_date desc\" ;\n\n\t\t$result = $this->db->query($query,false,\" Error filling in list of timeperiods to be forecasted: \");\n\n\t\twhile (($row = $this->db->fetchByAssoc($result)) != null) {\n \t\t\t$my_forecasted_timeperiods[$row['id']]=$row['name'];\n\t\t}\n\n\t\treturn $my_forecasted_timeperiods;\n\t}", "public function getPlayerByUserId($id)\n {\n $qb = $this->entityManager->getRepository(Player::class)->createQueryBuilder('p');\n $qb->join('p.user','u');\n $qb->where('u.id = ' . $id);\n $query = $qb->getQuery();\n $result = $query->getResult();\n\n return $result;\n }", "function get_film_times( $id ) {\n\t\tif (!is_numeric($id)) return false;\n\n\t\t$sql = \"SELECT * from events_times where films_id = '$id'\n\t\t\t\tORDER BY start_time\";\n\t\t$result = $this->db->query($sql)->result();\n\n\t\treturn $result;\n\n\t}", "public function getHoursBetween($id, $start, $end) {\n //Get objects between the given dates\n $resultSet = Cico::where('volunteer_id', $id)\n ->where('check_in_date', '>=', $start)\n ->where('check_out_date', '<=', $end)\n ->sum('minutes_volunteered');\n\n return ['id' => $id, 'hours' => Helpers::minutesToHours($resultSet), 'minutes' => intval($resultSet)];\n }", "public function getPresentations($id)\n {\n \t$presentations = Presentation::where('ticker_id', '=', $id)->get();\n \treturn $presentations;\n }", "public function getUserDetails($id)\n {\n return $this->where(['user_id' => $id])\n ->get()->getRowArray();\n }", "public function getEntriesById($id)\r\n {\r\n $getEntriesById = $this->db->prepare(\r\n \"SELECT entries.title, entries.content, entries.createdBy\r\n FROM entries\r\n INNER JOIN users ON users.userID = entries.createdBy\r\n WHERE entries.createdBy = :createdBy\");\r\n $getEntriesById->execute([\r\n \":createdBy\" => $id\r\n ]);\r\n $allEntriesFromUser = $getEntriesById->fetchAll();\r\n return $allEntriesFromUser;\r\n }", "public function getHoursForVolunteerBetween($id, $start, $end) {\n\n $ranges = Helpers::generateDateRange(Carbon::createFromFormat('Y-m-d', Carbon::now()->subHour(5)->subDays(5)->format('Y-m-d')),\n Carbon::createFromFormat('Y-m-d', Carbon::now()->subHour(5)->format('Y-m-d')));\n\n $data = [];\n\n foreach($ranges as $range) {\n $value = Cico::where('volunteer_id', $id)\n ->where('check_in_date', '>=', $range)\n ->where('check_out_date', '<=', $range)\n ->sum('minutes_volunteered');\n\n array_push($data, intval($value));\n }\n\n return [$data, $ranges];\n\n }", "public function getPlayer($id){\n if(is_null($this->pdo)){\n $this->msg = 'Connection did not work out!';\n return [];\n } else {\n $sql = 'SELECT p.cli_id, \n p.pnt_name, \n p.pnt_notes, \n p.pnt_address, \n p.pnt_number, \n p.pnt_neighbor, \n p.pnt_city, \n p.pnt_state, \n p.pnt_zip, \n p.pnt_active, \n p.usr_id, \n p.pnt_creation_date,\n c.cli_name\n FROM hlp_ponto p, hlp_client c\n WHERE p.cli_id = c.cli_id \n AND p.pnt_id = ?';\n $pdo = $this->pdo;\n $stmt = $pdo->prepare($sql);\n $stmt->execute([$id]);\n $result = $stmt->fetch(); \n return $result;\n }\n }", "public function findAllByUser(int $id)\n {\n return $this->createQueryBuilder('c')\n ->andWhere(':id MEMBER OF c.users')\n ->setParameter(':id', $id)\n ->join('c.users', 'u')\n ->orderBy('c.created_at', 'DESC')\n ->addSelect('u')\n ->getQuery()\n ->getResult();\n }", "public static function findUserListings($user_id)\n {\n self::dbConnect();\n\n //Create select statement using prepared statements\n $query = 'SELECT * FROM ' . static::$table . ' WHERE user_id = :user_id';\n\n $stmt = self::$dbc->prepare($query);\n $stmt->bindValue(':user_id', $user_id, PDO::PARAM_INT);\n $stmt->execute();\n\n //Store the resultset in a variable named $result\n $results = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\n \n\n\n // return either the found instance or null\n return array_map(function($result) {\n $instance = new static;\n $instance->attributes = $result;\n return $instance;\n }, $results);\n }", "public function selectBookingByUserId(int $id) : array\n {\n $statement = $this->pdo->prepare(\"select booking.id, begin_date, end_date, nb_person, options, total_price, name from $this->table join room on room.id=room_id where user_id=:id and begin_date >= NOW() ORDER BY begin_date ASC\");\n $statement->bindValue('id', $id, \\PDO::PARAM_INT);\n $statement->execute();\n $bookings = $statement->fetchall();\n return $bookings;\n }", "function teachingHoursSummary($id = null) {\n $id = $id === null ? null : intval($id);\n $subject = $this->findById($id, array('Subject.id', 'Course.initial_date', 'Course.final_date'));\n $groups = Set::extract('/Group/id', $subject);\n $activities = Set::extract('/Activity/id', $subject);\n\n $this->Group->bindModel(array('hasMany' => array('AttendanceRegister')));\n $events = $this->Group->AttendanceRegister->Event->find('all', array(\n 'conditions' => array(\n 'Event.group_id' => $groups,\n 'Event.activity_id' => $activities,\n 'Event.initial_hour >= ' => date('Y-m-d 00:00:00', strtotime($subject['Course']['initial_date'])),\n 'Event.final_hour <= ' => date('Y-m-d 23:59:59', strtotime($subject['Course']['final_date'])),\n ),\n 'fields' => array(\n 'Event.id', 'Event.initial_hour', 'Event.duration',\n 'AttendanceRegister.id', 'AttendanceRegister.initial_hour', 'AttendanceRegister.duration',\n 'Activity.id', 'Activity.name',\n 'Group.id', 'Group.name',\n 'Teacher.first_name', 'Teacher.last_name',\n 'Teacher_2.first_name', 'Teacher_2.last_name',\n ),\n 'order' => array('Event.initial_hour'),\n 'recursive' => 0,\n ));\n\n $registers = array();\n foreach ($events as $event) {\n $this->Group->bindModel(array('hasMany' => array('AttendanceRegister')));\n $teachers = $this->Group->AttendanceRegister->find('first', array(\n 'conditions' => array('AttendanceRegister.id' => $event['AttendanceRegister']['id']),\n 'fields' => array(\n 'AttendanceRegister.id',\n 'Teacher.first_name', 'Teacher.last_name', 'Teacher_2.first_name', 'Teacher_2.last_name',\n ),\n 'recursive' => 0,\n ));\n\n $event['OriginalTeacher'] = $event['Teacher'];\n $event['OriginalTeacher_2'] = $event['Teacher_2'];\n $event['Teacher'] = $teachers['Teacher'];\n $event['Teacher_2'] = $teachers['Teacher_2'];\n $registers[] = $event;\n }\n return $registers;\n }", "public function getClassMoves($id = null) {\n // if ($id) {\n // $user = User::load($id); // possible user loading method\n // } else {\n // $user = $_SESSION['user'];\n // }\n\n return array(\"id\" => $id, \"name\" => null); // serializes object into JSON\n\n\n // select class.name, move.name as move, move_type.NAME as type from class\n // inner join class_move\n // on class.id = class_move.CLASS_ID\n // inner join move\n // on move.id = class_move.MOVE_ID\n // inner join move_type\n // on move.TYPE_ID = move_type.ID\n }", "public static function GetUser($id)\n {\n $db = Database::getInstance()->getConnection();\n $query = \"SELECT * FROM users WHERE UsersId='$id'\";\n\n $result = mysqli_query($db, $query);\n if ($result) {\n $userData = [];\n while ($row = mysqli_fetch_assoc($result)) {\n $userData[] = $row;\n }\n return $userData;\n } else {\n return [];\n }\n }", "public function getPosts($id = null) {\n if ($id == null) die (\"he, userid muss ma schon angeben!\");\n $q = sprintf(\"SELECT * FROM money WHERE user_id='%s' ORDER by date desc\", $id);\n $result = mysql_query($q);\n $ret = array();\n while ($row = mysql_fetch_assoc($result)) {\n if($row['user_id'] != $_SESSION['user_id']) {\n $row['user_id'] = '';\n }\n $ret[] = $row;\n }\n \n\n return $ret;\n }", "private function getHours($start, $end, $id){\n $totalHours = 0;\n $Att = Attendance::select('io_time')->whereRaw('io_time BETWEEN \"'.$start.'\" AND \"'.$end.'\" AND user_id =\"'.$id.'\"' )->orderBy('io_time')->get();\n $ret = date('Y-m-d H:i:s');\n $perday = [];\n for($at =0; $at < count($Att)-1; $at++){\n $current = Carbon::create($Att[$at]['io_time']);\n $next = Carbon::create($Att[$at+1]['io_time']);\n \n if(($current->format('Y M d'))==($next->format('Y M d'))){\n \n $at+=1;\n }else{ \n $next = Carbon::create($Att[$at]['io_time'])->setTime(18, 0, 0);\n }\n $dif = $next->diffInHours($current);\n array_push($perday,[$current->format('Y-m-d'),$dif]);\n $totalHours += $dif;\n }\n $perDay = [];\n for($i=0; $i<count($perday); $i++){\n $brk = false;\n foreach($perDay as $item){\n if($perday[$i][0]==$item[0]){\n $brk = true;\n break;\n }\n }\n if($brk){\n continue;\n }\n $count = 0;\n for($j=$i; $j<count($perday); $j++){\n if($perday[$i][0]==$perday[$j][0]){\n $count+=$perday[$j][1];\n }\n }\n array_push($perDay,[$perday[$i][0],$count]);\n }\n return [$totalHours, $perDay];\n }", "public function\tuserList($id=\"\") {\n\t\t\n\t\t$userCounter = 0;\n\n\t\t$conn=$this->makeConnection();\n\n\t\tif($id!=\"\"){\n\t\t\t\n\t\t\t$stmt = $conn->prepare('SELECT NAME, LASTNAME, TIMESTAMP FROM USERS WHERE ID=? ORDER BY TIMESTAMP DESC');\n\t\t\t$stmt->bind_param(\"i\", $id);\t\n\t\t}\n\t\telse{\n\n\t\t\t$stmt = $conn->prepare('SELECT NAME, LASTNAME, TIMESTAMP FROM USERS WHERE 1=1 ORDER BY TIMESTAMP DESC');\n\t\t}\n\t\t\n\t\t$stmt->execute();\n\n\t\t$result=$stmt->get_result();\n\t\t\n\t\t$result=$result->fetch_all(MYSQLI_ASSOC);\n\n\t\treturn $result;\n\n\t}", "public function getAllUserTasks($user_id) {\r\n $stmt = $this->conn->prepare(\"SELECT t.* FROM tasks t, user_tasks ut WHERE t.id = ut.task_id AND ut.user_id = ?\");\r\n $stmt->bind_param(\"i\", $user_id);\r\n $stmt->execute();\r\n $tasks = $stmt->get_result();\r\n $stmt->close();\r\n return $tasks;\r\n }", "public function findByUser($id)\n {\n $tasks = Task::where('usu_destino', $id)->orderBy('updated_at')->get();\n return response()->json(['data' => $tasks, 'success' => true, 'state' => 200]);\n }", "public static function getRelatedProjects($id) {\n\t\t$result = array();\n\t\t$info = self::getEmpInfoById($id);\n\t\tif(!is_null($info)) {\n\t\t\tif($info->is_specialist) {\n\t\t\t\t$result = \\DB::table('projects')\n\t\t\t\t\t\t->join('employees','employees.id','=','projects.specialist_id')\n\t\t\t\t\t\t->where('projects.specialist_id', $id)\n\t\t\t\t\t\t->where('projects.status', 1)\n\t\t\t\t\t\t->get();\n\t\t\t} else {\n\t\t\t\t$result = \\DB::table('projects')\n\t\t\t\t\t\t->join('employees','employees.id','=','projects.specialist_id')\n\t\t\t\t\t\t->join('project_team','project_team.project_id','=','projects.project_id')\n\t\t\t\t\t\t->where('project_team.employee_id', $id)\n\t\t\t\t\t\t->where('projects.status', 1)\n\t\t\t\t\t\t->get();\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}", "function get_list_slot_time_by_id($params) {\n $sql = \"SELECT a.* FROM izin_slot_time a\n INNER JOIN izin_registrasi b ON a.registrasi_id = b.registrasi_id\n WHERE a.registrasi_id = ? AND airlines_id = ?\";\n $query = $this->db->query($sql, $params);\n if ($query->num_rows() > 0) {\n $result = $query->result_array();\n $query->free_result();\n return $result;\n } else {\n return array();\n }\n }", "public function checkUserClassement($id=null)\n {\n $particpants = array();\n $found = 0;\n $idUser = $this->container->get('session')->get('user');\n if(empty($idUser)) {\n throw new \\LogicException('Veuillez se reconnecter pour accéder à cette page');\n }\n $users = $this->get('adidas.repository.challenge.member')\n ->getBestByClub($id);\n foreach ($users as $key=>$user) {\n if($key <9) {\n if($user['id'] == $idUser) \n $found = 1;\n $particpants[] = $user;\n }\n elseif($key == 9 && $found == 1) {\n $particpants[] = $user;\n return $particpants;\n }\n elseif($key>=9 && $found ==0) {\n if($user['id'] == $idUser) \n {\n $user['count'] = $key;\n $particpants[] = $user;\n $found=1;\n }\n elseif($user['id'] != $idUser && $key==9) {\n $last = $user;\n }\n }\n } \n if(!empty($last) && count($particpants) == 9) $particpants[] = $last;\n return $particpants;\n }", "public function show($id)\n {\n $project = Project::find($id);\n $times = Time::where('project_id',$project->id)->get();\n $timeLog = [];\n $i=0;\n foreach ($times as $time){\n $time['name'] = Developer::find($time->developer_id)->name;\n $timeLog[$i] = $time;\n $i++;\n }\n return response($timeLog,200);\n }", "public function get_tasks_submitted_by_employee_id($id) {\r\n\t\t\r\n\t\t\tglobal $db;\r\n\t\t\t\r\n\t\t\t// set the default time zone and get current time in $date variable\r\n\t\t\tdate_default_timezone_set('America/Thunder Bay');\r\n\t\t\t\r\n\t\t\t$now = date(\"Y-m-d\");\r\n\t\t\t\r\n\t\t\t$connection_string = 'SELECT * FROM tasks WHERE submitted_by = ' . $db->quote($id, 'integer') . ' AND complete = 0 ORDER BY due_date';\r\n\t\t\t$result = $db->query($connection_string);\r\n\t\t\t\r\n\t\t\tif(PEAR::isError($result)) {\r\n\t\t\r\n\t\t\t\treturn FALSE;\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\r\n\t\t\t\t$numRows = $result->numRows();\r\n\t\t\t\t\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif($numRows > 0) {\r\n\t\t\t\r\n\t\t\t\t// initialize a counter to increment for adding objects to the task_row array below\r\n\t\t\t\t$counter = 0;\r\n\t\t\t\t// initialize an array to the number of rows returned\r\n\t\t\t\t$task_array = array();\r\n\t\t\t\r\n\t\t\t\twhile($row = $result->fetchRow()) {\r\n\t\t\t\r\n\t\t\t\t\t$task_row = new Task;\r\n\t\t\t\t\t$task_row->set_id($row[0]);\r\n\t\t\t\t\t$task_row->set_task_name($row[1]);\r\n\t\t\t\t\t$task_row->set_notes($row[2]);\r\n\t\t\t\t\t$task_row->set_due_date($row[3]);\r\n\t\t\t\t\t$task_row->set_category($row[4]);\r\n\t\t\t\t\t$task_row->set_priority($row[5]);\r\n\t\t\t\t\t$task_row->set_customer_id($row[6]);\r\n\t\t\t\t\t$task_row->set_employee_id($row[7]);\r\n\t\t\t\t\t$task_row->set_complete($row[8]);\r\n\t\t\t\t\t$task_row->set_submitted_by($row[9]);\r\n\t\t\t\t\t$task_row->set_submitted($row[10]);\r\n\t\t\t\t\t\r\n\t\t\t\t\t// add the current employee object to its respective index in the array\r\n\t\t\t\t\t$task_array[$counter] = $task_row;\r\n\t\t\t\t\t\r\n\t\t\t\t\t// increment the counter\r\n\t\t\t\t\t$counter++;\r\n\t\t\t\t\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\t// return the array of Employees\r\n\t\t\treturn $task_array;\r\n\t\t\r\n\t\t}", "public function getAllUserPosts($user_id) {\r\n $stmt = $this->conn->prepare(\"SELECT id, bigimage,age,gender,location FROM incidents WHERE username = ? order by id desc\");\r\n \r\n mysqli_stmt_bind_param($stmt,\"s\", $user_id);\r\n \r\n $stmt->execute();\r\n \r\n $stmt->bind_result($id, $bigimage,$age,$gender,$location);\r\n //echo ($user_id); \r\n $tasks = array();\r\n while($stmt->fetch()) {\r\n \r\n $tmp = array();\r\n $tmp[\"id\"] = $id;\r\n //echo ($id); \r\n \r\n $tmp[\"bigimage\"] = $bigimage;\r\n $tmp[\"age\"] = $age;\r\n $tmp[\"gender\"] = $gender;\r\n $tmp[\"location\"] = $location;\r\n array_push($tasks, $tmp);\r\n }\r\n \r\n $stmt->close();\r\n return $tasks;\r\n }", "public static function get_trips($user_id, $ended = FALSE)\n\t{\n\t\t$db = Database::getInstance();\n\n\t\t$where = '';\n\t\tif ($ended === FALSE) {\n\t\t\t$where .= 'AND `ending` = 0 ';\n\t\t}\n\n\t\t$result = $db->query(\"SELECT \" . DB_PREFIX . \"_trip.id,\" .\n\t\t\tDB_PREFIX . \"_trip.avail_seats,\" .\n\t\t\tDB_PREFIX . \"_trip.destination,\" .\n\t\t\t\"UNIX_TIMESTAMP(\" . DB_PREFIX . \"_trip.creation)*1000 AS creation,\" .\n\t\t\t\"UNIX_TIMESTAMP(\" . DB_PREFIX . \"_trip.ending)*1000 AS ending,\" .\n\t\t\tDB_PREFIX . \"_trip.started \" .\n\t\t\t\"FROM `\" . DB_PREFIX . \"_trip` \" .\n\t\t\t\"WHERE `driver` = $user_id \" . $where .\n\t\t\t\"ORDER BY \" . DB_PREFIX . \"_trip.started DESC, \" . DB_PREFIX . \"_trip.creation ASC\");\n\n\t\tif ($db->getNumRows($result) > 0) {\n\t\t\t$res = array();\n\t\t\twhile (($row = $db->fetch($result)) != NULL) {\n\t\t\t\tsettype($row['id'], 'integer');\n\t\t\t\tsettype($row['driver'], 'integer');\n\t\t\t\tsettype($row['avail_seats'], 'integer');\n\t\t\t\tsettype($row['creation'], 'integer');\n\t\t\t\tsettype($row['ending'], 'integer');\n\t\t\t\tsettype($row['started'], 'integer');\n\t\t\t\t$res[] = $row;\n\t\t\t}\n\t\t\treturn $res;\n\t\t} else {\n\t\t\treturn NULL;\n\t\t}\n\t}", "public function getAllUserTasks($user_id) {\n $stmt = $this->conn->prepare(\"SELECT t.* FROM tasks t, user_tasks ut WHERE t.id = ut.task_id AND ut.user_id = ?\");\n $stmt->bind_param(\"i\", $user_id);\n $stmt->execute();\n $tasks = $stmt->get_result();\n $stmt->close();\n return $tasks;\n }", "public function list($id){\n try{\n $sql = 'select * from user u inner join role r on u.id_role = r.id_role where u.id_user = ? limit 1';\n $stm = $this->pdo->prepare($sql);\n $stm->execute([$id]);\n $result = $stm->fetch();\n\n } catch (Exception $e){\n $this->log->insert($e->getMessage(), get_class($this).'|'.__FUNCTION__);\n $result = [];\n }\n return $result;\n }", "public function show($id)\n {\n\n $tutor = Pensionista::find($id)->tutors;\n return $tutor->toArray();\n }", "public function getLastHourObservations($id)\n {\n $observations = Observation::where('service_id', $id)->orderby('id', 'desc')->take(60)->get();\n return new ObservationCollection($observations);\n }", "public function getUsersTimes()\n {\n $userTime = UserTime::all();\n $responseArr = [];\n\n foreach ($userTime as $time)\n {\n\n $next = UserTime::where('created_at', '>', $time->created_at)\n ->where('user_id', $time->user_id)\n ->first();\n\n $userColor = User::findOrFail( $time->user_id )->color;\n\n $responseArr[] = [\n 'id' => $time->id,\n 'group' => $time->user_id,\n 'content' => 'Row id: '.$time->id,\n 'start' => $time->created_at->toW3cString(),\n 'end' => ( $next && $next->action != $time->action ) ? $next->created_at->toW3cString() : Carbon::now()->toW3cString(),\n 'style' => 'background-color: '.$userColor.';'\n ];\n\n }\n\n return response()->json( $responseArr );\n }", "public function get_my_tasks(){\n if($this->ID != NULL){\n $sql = \"SELECT ID FROM task WHERE Project=\".$this->ID.\";\";\n $myTaskIDs = $this->get_by_query($sql);\n $myTaskList = array();\n foreach ($myTaskIDs as &$tID) {\n $myTask = new Task();\n $myTask = $myTask->get_by_ID($tID['ID']);\n array_push($myTaskList, $myTask);\n }\n return $myTaskList;\n }\n }", "public static function getTasks($id)\n {\n $sql = 'SELECT * FROM tasks\n WHERE todo_list_id = :id';\n \n $db = static::getDB(); \n \n $stmt = $db->prepare($sql);\n $stmt->bindValue(':id', $id, PDO::PARAM_INT);\n $stmt->execute();\n\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }", "public function findById( $id )\n {\n return \\R::findOne( 'time', ' id = ? ', [ $id ] );\n }", "public function get ($id)\n\t{\n\t\t\n\t\t//print($this->user);\n\n\t\t$user = $this->find(\n\t\t\t'users',\n\t\t\tarray(\n\t\t\t\t'_id'=>new MongoId($id),\n\t\t\t\t'owner_id'=>new MongoId($this->user_id)\n\t\t\t)\n\t\t);\n\t\t\t\n\t\tif (!$user)\n\t\t{\n\t\t\treturn new PacoError('No such user with supplied ID', '101');\n\t\t}\n\t\t\n\t\t$foo = PacoUtils::transform($user);\n\t\t\n\t\treturn array('user'=>$foo);\n\t}", "public function winners($id)\n {\n $usuarios = array();\n $usuarios_db = usuarios::all()->where('idDisfraz',$id);\n foreach ($usuarios_db as $user) {\n $user = usuarios::find($user->id);\n $partidas = partidas::where(\"idJugador\", \"=\", $user->id)->get();\n $scores = array();\n $max_score = 0;\n foreach ($partidas as $partida) {\n array_push($scores,array(\n \"score\" => $partida->puntos\n ));\n usort($scores, function ($scoreA, $scoreB) {\n return $scoreB['score'] <=> $scoreA['score'];\n });\n $max_score = $scores[0]['score'];\n }\n array_push($usuarios,array(\n \"user\"=>$user,\n \"max_score\"=> $max_score\n ));\n usort($usuarios, function ($jugadorA, $jugadorB) {\n return $jugadorB['max_score'] <=> $jugadorA['max_score'];\n });\n $usuarios = array_slice($usuarios,0,10);\n }\n return $usuarios;\n }", "public function getAllUserEvents($user_id) {\n $stmt = $this->conn->prepare(\"SELECT e.*, COUNT(ue.user_id) AS participants FROM events e LEFT JOIN users_events ue ON e.event_id = ue.event_id WHERE ue.user_id = ? GROUP BY e.event_id\");\n $stmt->bind_param(\"i\", $user_id);\n $stmt->execute();\n $tasks = $stmt->get_result();\n $stmt->close();\n return $tasks;\n }", "function getUserDprs($user_id) {\n\n $recursive = -1;\n $conditions = array('Dpr.user_id' => $user_id); // where user_id in dpr table is = to current logged in user (id we have passed)\n return $this->find('all', array('conditions' => $conditions, \"recursive\" => $recursive)); //fetching tasks from tasks table with where clause \n }", "public function getChatsByUserId(int $id) : array {\n $query = \"SELECT c.id, c.subject, c.date_created FROM chats c\n JOIN chat_members cm \n ON c.id = cm.chat_id \n WHERE cm.user_id = :userid\";\n $pdostm = $this->db->prepare($query);\n $pdostm->bindValue(\":userid\",$id, PDO::PARAM_INT);\n $pdostm->execute();\n\n $chatDB = $pdostm->fetchAll(PDO::FETCH_OBJ);\n //var_dump($chatDB);\n $chats = array();\n\n foreach ($chatDB as $c) {\n $chat = new Chat();\n $sender = new User();\n\n $chat->setId($c->id); // getting the chat Id\n $chat->setSubject($c->subject);\n $chat->setDateCreated($c->date_created);\n // $sender->setUsername($c->username); // passing the username retrieved from database\n // $chat->setUser($sender); // from the User object in Chat class\n\n array_push($chats, $chat);\n }\n\n return $chats;\n\n }", "public function getById($id)\n {\n $users = $this->files->getRequire($this->path);\n $result = [];\n\n foreach ($users as $user)\n {\n if ($user['id'] == $id)\n {\n $result = $user;\n break;\n }\n }\n\n return $this->normalizer->normalize($result);\n }", "public function getRoute($id){\n if(is_null($this->pdo)){\n $this->msg = 'Connection did not work out!';\n return [];\n } else {\n $sql = 'SELECT\n reg_id, \n usr_id,\n DATE(reg_data) as dia,\n pnt_id_de,\n pnt_id_para,\n reg_order,\n reg_km, \n reg_obs,\n sta_id\n FROM hlp_reg_route \n WHERE reg_id = ?';\n $pdo = $this->pdo;\n $stmt = $pdo->prepare($sql);\n $stmt->execute([$id]);\n $result = $stmt->fetch(); \n return $result;\n }\n }", "public function getUserById($id)\n {\n $stmt = $this->db->prepare(\"SELECT * FROM User WHERE ID = :id\");\n $stmt->bindParam(':id', $id, \\PDO::PARAM_INT);\n $stmt->execute();\n return $stmt->fetchAll();\n }", "public function getUserLastTasks($id){\r\n return $this->tasksService->getUserLastTasks($id);\r\n }", "public static function getAllUsers($id)\n {\n $conn = Db::getConnection();\n $statement = $conn->prepare('select * from users where (id != :id or :id is null)');\n $statement->bindParam(\":id\", $id);\n $statement->execute();\n $users = $statement->fetchAll(PDO::FETCH_ASSOC);\n // var_dump($users);\n return $users;\n }", "public function show($id)\n {\n if ($this->admin || $this->backend) {\n $array = Attendance::find($id)->toArray();\n } elseif ($this->manager) {\n $belongsemp = Base::getEmpBelongsUser($this->emp_id);\n\n $array = Attendance::whereIn('user_id', $belongsemp)->find($id)->toArray();\n } else {\n $array = Attendance::where('user_id', $this->emp_id)->find($id)->toArray();\n }\n\n\n return Base::touser($array, true);\n }", "public function getUserBySkill($id)\n {\n $skill = Skills::find($id);\n\n $users = $skill->users()->get();\n\n return $users->toArray();\n }", "public function getEventsWithPoolsByID($user_id){\n $dbcon = Database::getDB();\n $sql = \"SELECT * from events INNER JOIN events_users on events.id = events_users.event_id\n WHERE events_users.user_id = :user_id\";\n $pst = $dbcon->prepare($sql);\n $pst->bindParam(':user_id', $user_id);\n $pst->execute();\n $events = $pst->fetchAll(PDO::FETCH_OBJ);\n $pst->closeCursor();\n return $events;\n }", "public function getRKHAktivitas($user_id) {\n $stmt = $this->conn->prepare(\"SELECT t.* FROM rkh_aktivitas t\");\n $stmt->execute();\n $tasks = $stmt->get_result();\n $stmt->close();\n return $tasks;\n }", "public function getAllUserCreatedEvents($user_id) {\n $stmt = $this->conn->prepare(\"SELECT e.*, COUNT(ue.user_id) AS participants FROM events e LEFT JOIN users_events ue ON e.event_id = ue.event_id WHERE e.creator_id = ? GROUP BY e.event_id\");\n $stmt->bind_param(\"i\", $user_id);\n $stmt->execute();\n $tasks = $stmt->get_result();\n $stmt->close();\n return $tasks;\n }", "public function findTsgsListForUserHash($id)\n\t{\t\n\t\treturn $this->findTsgsListForUser($id, 'hash');\n\t}", "public function getCirclesByUserId($id){\r\n\t\t$ucs = $this->query(\"SELECT circle_id as id FROM user_circles as UserCircle WHERE UserCircle.user_id = $id;\");\r\n\t\t$circlesId = array();\r\n\t\tforeach ($ucs as $key => $uc) {\r\n\t\t\tarray_push($circlesId, $uc['UserCircle']['id']);\r\n\t\t}\r\n\t\t$circles = $this->find('all', array(\r\n\t\t\t'conditions' => array(\r\n\t\t\t\t'Circle.id' => $circlesId,\r\n\t\t\t\t'Circle.active' => 1\r\n\t\t\t\t)\r\n\t\t\t)\r\n\t\t);\r\n\t\treturn $circles;\r\n\t}", "public function getShedules()\n {\n return $this->hasMany(Shedule::className(), ['user_add' => 'id']);\n }", "public function getPlayers($id)\n {\n $players = [];\n $teamDetails = [];\n $response = $this->getData('/api/team/'.$id, 'GET', []);\n\n if(!empty($response['data'])) {\n $players = $response['data']['players'];\n $teamDetails = $response['data']['teamDetails'];\n }\n\n return view('home.team_players')->with(compact('players', 'teamDetails'));\n }", "public static function get($id)\n {\n $db = static::getDB();\n $stmt = $db->query('SELECT * FROM review,user where review.id_user= user.id_user and id_pro='.$id);\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }", "public function getRelatedUsers($task_id)\n\t{\n\t\t$related_users = DB::table('task as T')\n\t\t\t// Join related users\n\t\t\t->join('user_to_task as UTT', 'UTT.task_id', '=', 'T.id')\n\n\t\t\t// Join user info\n\t\t\t->join('users as U', 'U.id', '=', 'UTT.user_id')\n\n\t\t\t// Join user role info\n\t\t\t->join(\n\t\t\t\t'user_role as UR',\n\t\t\t\t'UR.id',\n\t\t\t\t'=',\n\t\t\t\t'UTT.user_role_id'\n\t\t\t)\n\n\t\t\t->select(\n\t\t\t\t'UTT.user_id',\n\t\t\t\t'UTT.user_role_id',\n\t\t\t\tDB::raw('TRUNCATE(UTT.payed_hours, 2) as payed_hours'),\n\t\t\t\t'U.email AS user_email',\n\t\t\t\t'UR.name as role_name'\n\t\t\t)\n\t\t\t->where('T.id', '=', $task_id)\n\n\t\t\t->get();\n\n\t\t// Get users information\n\t\t$users = array();\n\n\t\tforeach ($related_users as & $user)\n\t\t{\n\t\t\t$redmineUser = RedmineUser::getRedmineUser($user->user_email);\n\n\t\t\t$user->firstname = $redmineUser->firstname;\n\t\t\t$user->lastname = $redmineUser->lastname;\n\t\t}\n\t\t\n\t\treturn $related_users;\n\t}", "function getById($id)\n {\n $this->db->where('gebruikerCoachId', $id);\n $query = $this->db->get('coachMinderMobiele');\n $naam = $query->result();\n\n $this->load->model('rit_model');\n $this->load->model('gebruiker_model');\n $ritten = array();\n foreach ($naam as $mm) {\n\t\t\tif($mm->eindDatum == NULL){\n\t\t\t\t$temp = $this->rit_model->getByMMCId($mm->gebruikerMinderMobieleId);\n\t\t\t\t\tif (!empty($temp)) {\n\t\t\t\t\t\tforeach ($temp as $rit) {\n\t\t\t\t\t\t\t$rit->persoon = $this->gebruiker_model->get($mm->gebruikerMinderMobieleId);\n\t\t\t\t\t\t\tarray_push($ritten, $rit);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n }\n return $ritten;\n }", "public static function getTasksDTOByProjectId(int $id) : array {\n $ret = array();\n //$projects = ProjectQuery::create()->joinWithTeamProject()->findById($id);\n $tasks = TaskQuery::create()->findByProjectId($id);\n //findByProjectId($id)\n foreach( $tasks as $task){\n $t = TaskDTO::create($task);\n array_push($ret, $t);\n }\n\n return $ret;\n }", "private function gameMembers($id): Collection\n {\n return GameUserEntry::where('game_user_entries.game_id', $id)\n ->join('users', 'users.user_id', '=', 'game_user_entries.user_id')\n ->leftJoin('venues', 'venues.venue_id', '=', 'users.default_venue')\n ->get(['game_user_entries.created_at', 'users.user_first_name', 'users.user_family_name', 'users.user_mobile', 'users.email', 'venues.venue_name']);\n }", "public function reservations($id) {\n $data = $this->db->select(\"SELECT name_massage, date_reservation, time_reservation FROM `reservation` JOIN `massage` ON reservation.id_massage = massage.id_massage WHERE reservation.id_user = :id_user ORDER BY date_reservation ASC, time_reservation ASC\", array(\n \":id_user\" => $id\n ));\n return $data;\n }", "public function get_user_meeting($user_id)\n\t{\n\t\t$this->db->where('user_id = '.$user_id);\n\t\t$this->db->order_by('created', 'DESC');\n\t\t$query = $this->db->get('meeting');\n\t\t\n\t\treturn $query;\n\t}", "private function buildUser($id) {\n $result = array();\n $a = 0;\n $data = MailinglistUserTable::instance()->getAllUserBySlotId($id);\n foreach($data as $user) {\n $result[$a]['id'] = $user->getId();\n $result[$a]['user_id'] = $user->getUserId();\n $result[$a++]['name'] = $user->getUserId() == -2 ? $this->context->getI18N()->__('Sender of circulation' ,null,'mailinglist') : $user->getName();\n }\n return $result;\n }", "public function getRunnersById($id){\n $country = MeetingModel::find($id);\n if($country){\n return response()->json(MeetingModel::find($id), 200);\n }\n else{\n return response()->json('message', 404);\n }\n }", "public static function getPublicProfile($user_id)\n {\n $userType = self::getType($user_id);\n $user = array();\n\n switch ($userType) {\n case 0:\n $sql = \"SELECT user.name, user.profilePicture, user.createTime,\n user.biography, student.school, student.schoolYear,\n student.program\n FROM user\n INNER JOIN student\n ON user.user_id = student.user_id\n WHERE user.user_id = $user_id\";\n\n $user[] = DB::returnValue(DB::select($sql));\n break;\n case 1:\n $sql = \"SELECT user.name, user.profilePicture, user.createTime,\n user.biography, student.school,\n student.schoolYear, student.program\n FROM user\n INNER JOIN student\n ON user.user_id = student.user_id\n WHERE user.user_id = $user_id\";\n\n $user[] = DB::returnValue(DB::select($sql));\n break;\n case 2:\n $sql = \"SELECT user.name, user.profilePicture, user.createTime,\n user.biography\n FROM user\n WHERE user_id = $user_id\";\n\n $user[] = DB::returnValue(DB::select($sql));\n break;\n }\n\n\n\n $user[] = self::getFiles($user_id);\n\n $user[0][\"userType\"] = $userType;\n\n return $user;\n }", "public function getAllUserTasks($user_id) {\n $stmt = $this->conn->prepare(\"SELECT t.* FROM tasks t, user_tasks ut WHERE t.id = ut.task_id AND ut.user_id = ?\");\n $stmt->bind_param(\"s\", $user_id);\n $stmt->execute();\n if ($stmt->execute()) {\n $items = $res = array();\n \n $stmt->bind_result($id, $task, $status, $created_at);\n\n // fetch values\n while ($stmt->fetch()) {\n $res[\"id\"] = $id;\n $res[\"task\"] = $task;\n $res[\"status\"] = $status;\n $res[\"created_at\"] = $created_at;\n\n $items[] = $res;\n }\n\n $stmt->close();\n\n return $items;\n} else {\n return NULL;\n}\n }", "public function getUserById($id)\n {\n $this->db->where('id =', $id);\n return $this->db->get('user')->row_array();\n // return $this->db->get_where('user_menu', ['id =', $id])->row_array();\n }", "public function GetById($id)\n {\n\n $pokemon = new Pokemon();\n\n $stmt = $this->context->db->prepare('SELECT * FROM pokemons WHERE id = ?');\n $stmt->bind_param('i', $id);\n $stmt->execute();\n\n $result = $stmt->get_result();\n\n if ($result->num_rows === 0) {\n return null;\n } else {\n\n while ($row = $result->fetch_object()) {\n\n $pokemon->InitializeData($row->id, $row->nombre, $row->imagen, $row->region, $row->tipos, $row->ataques);\n\n }\n\n }\n\n $stmt->close();\n\n return $pokemon;\n\n }", "public function getFriendsPosts($id)\n {\n $userInfo = User::find($id);\n return $userInfo;\n }", "public function getFriendsPosts($id)\n {\n $userInfo = User::find($id);\n return $userInfo;\n }", "public function show($id)\n {\n return Team::find($id)->with('users')->get()->toArray();\n }", "public function getUserProjects($id)\n {\n \n return Laporan_Instalasi::where('user_id', $id)->get();\n }", "public function getIdUsersFromCircleId($id){\r\n\t\tif($id == 0){\r\n\t\t\t\r\n\t\t\t$userId = $_SESSION['UserAuth']['User']['id'];\r\n\t\t\t$ucs = $this->query(\"SELECT user_id as id FROM user_circles as UserCircle WHERE UserCircle.user_id = $userId;\");\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$ucs = $this->query(\"SELECT user_id as id FROM user_circles as UserCircle WHERE UserCircle.circle_id = $id;\");\r\n\t\t}\r\n\t\t\r\n\t\t$circlesId = array();\r\n\t\tforeach ($ucs as $key => $uc) {\r\n\t\t\tarray_push($circlesId, $uc['UserCircle']['id']);\r\n\t\t}\r\n\t\treturn $circlesId;\r\n\t}", "public function find($id=null)\n\t{\n\t\t$userObj = new User();\n\t\t$results = $userObj->find_owners($id);\n\t\tif (!$results) {\n\t\t\treturn array();\n\t\t}\n\t\t$users = array();\n\t\tforeach ($results as $result) {\n\t\t\t$user = array (\n\t\t\t\t'id' => $result['id'],\n\t\t\t\t'owner_name' => $result['owner_name'],\n\t\t\t\t'image' => $result['image'],\n\t\t\t\t'email' => $result['email'],\n\t\t\t\t'created' => $result['created'],\n\t\t\t\t'modified' => $result['modified'],\n\t\t\t\t);\n\t\t\t$users[] = $user;\n\t\t}\n\t\treturn $users;\n\t}", "public function tasksForUser(int $user_id, string $date = null) : array;", "function getAllTaskTimeRecorded ($idTaskk)\n{\n $db = connect();\n\n $query = $db->prepare('SELECT * FROM task_timerecorded WHERE id_task = ?');\n $query->execute(array($idTaskk));\n $data = $query->fetchAll(PDO::FETCH_OBJ);\n return $data;\n $query->closeCursor();\n}", "public static function gamesFromMemberId($id)\n {\n return DB::select('SELECT g.*\n FROM game g\n INNER JOIN game_to_member m\n ON m.gid = g.id\n WHERE m.uid = ?', [$id]);\n }", "public function getAllEmploymentsForTm($id)\n {\n return $this->get(['transportManager' => $id], $this->dataBundle);\n }", "public function get_patients($id) {\n\t\t$query = $this->_StepRite->db->select('*')->from('users')->join('patients', 'users.id = patients.user_id', 'left')->where('patients.provider_id', $id)->where('active',1)->get();\n\t\tif($query->num_rows() > 0) {\n\t\t\treturn $query->result_array();\n\t\t}\n\t\treturn false;\t\t\t\n\t}", "public function getProductsByUser($id) {\r\n $query = sprintf(\" SELECT id FROM %s WHERE creator_id={$id} ORDER BY id DESC \",\r\n self::DB_TABLE);\r\n $db = Db::instance();\r\n $result = $db->lookup($query);\r\n if(!mysql_num_rows($result))\r\n return null;\r\n else {\r\n $objects = array();\r\n while($row = mysql_fetch_assoc($result)) {\r\n $objects[] = self::loadById($row['id']);\r\n }\r\n return ($objects);\r\n }\r\n }", "public function timeEntries()\n {\n return $this->hasMany(TimeEntry::class);\n }", "public function getById($id)\n\t{\n\t\t$this->getStatuses();\n\t\t$projects = $this->getProject($id);\n\t\t$title = '';\n\t\tif (!empty((int) $id)) {\n\t\t\tforeach ($projects as $project) {\n\t\t\t\tif ($project['id'] === $id) {\n\t\t\t\t\t$title = $project['label'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$projectIds = array_column($projects, 'id');\n\t\t$milestones = $this->getGanttMilestones($projectIds);\n\t\t$projectIds = array_merge($projectIds, array_column($milestones, 'id'));\n\t\t$ganttTasks = $this->getGanttTasks($projectIds);\n\t\t$this->tasks = array_merge($projects, $milestones, $ganttTasks);\n\t\t$this->prepareRecords();\n\t\t$response = [\n\t\t\t'statusColors' => $this->statusColors,\n\t\t\t'canWrite' => false,\n\t\t\t'canDelete' => false,\n\t\t\t'cantWriteOnParent' => false,\n\t\t\t'canAdd' => false,\n\t\t\t'statuses' => $this->statuses,\n\t\t\t'activeStatuses' => $this->activeStatuses,\n\t\t\t'title' => $title\n\t\t];\n\t\tif (!empty($this->tree) && !empty($this->tree['children'])) {\n\t\t\t$response['tasks'] = $this->cleanup($this->flattenRecordTasks($this->tree['children']));\n\t\t}\n\t\tunset($projects, $projectIds, $milestones, $ganttTasks);\n\t\treturn $response;\n\t}", "public function getAllProfiles($id)\n {\n AchieveLogger::info(\"Entering ProfileService.getAllProfiles()\");\n // create a new database connection\n $servername = config(\"database.connections.mysql.host\");\n $port = config(\"database.connections.mysql.port\");\n $username = config(\"database.connections.mysql.username\");\n $password = config(\"database.connections.mysql.password\");\n $dbname = config(\"database.connections.mysql.database\");\n // Make a new PDO connection\n $db = new PDO(\"mysql:host=$servername;port=$port;dbname=$dbname\", $username, $password);\n // PDO set attribute for error exceptions\n $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n // Create a new profile data access layer\n $profile = new ProfileDAO($db);\n $profiles = $profile->findProfiles($id);\n AchieveLogger::info(\"Exiting ProfileService.getAllProfiles()\");\n return $profiles;\n \n }", "public function getObject($id)\n {\n if (!($class = Loader::loadClassFromModule('TimeIt', 'calendar'))) {\n pn_exit(__f('Unable to load array class of the object type %s.', 'calendar', ZLanguage::getModuleDomain('TimeIt')));\n }\n\n // instantiate the object type\n $object = new $class();\n\n return $object->get($id);\n }", "public function getDataUser($id)\n {\n // return $this->db->query($query)->row_array();\n $this->db->where('id', $id);\n return $this->db->get('user')->row_array();\n }" ]
[ "0.61698365", "0.61178195", "0.60753065", "0.5955895", "0.59206575", "0.57836086", "0.57802576", "0.56901515", "0.5668291", "0.5666734", "0.5662819", "0.55844474", "0.55820036", "0.5576079", "0.55746967", "0.55425483", "0.5534063", "0.5533288", "0.55241716", "0.5483308", "0.5483202", "0.54632044", "0.5460446", "0.5447725", "0.5431985", "0.5430387", "0.54046947", "0.5373206", "0.53661436", "0.5364605", "0.536022", "0.5358251", "0.53515357", "0.53283644", "0.5320979", "0.53160846", "0.5314642", "0.53060204", "0.52961344", "0.52931094", "0.5292545", "0.528643", "0.52858657", "0.5266115", "0.52641016", "0.525033", "0.5245233", "0.52451664", "0.5238023", "0.523406", "0.52315885", "0.522254", "0.52208555", "0.5211429", "0.5207143", "0.5202295", "0.5193388", "0.5191099", "0.51888585", "0.5188087", "0.51821697", "0.5179789", "0.5177844", "0.51735914", "0.51718444", "0.51704794", "0.51653755", "0.51646847", "0.5160577", "0.51588696", "0.51545656", "0.5153046", "0.51521266", "0.514418", "0.51412827", "0.5139704", "0.51391566", "0.513498", "0.51341444", "0.51338124", "0.5133317", "0.51319313", "0.512957", "0.5110788", "0.5110788", "0.51084995", "0.5104706", "0.5104023", "0.51001155", "0.5091447", "0.5085333", "0.508373", "0.5083294", "0.50780463", "0.5072865", "0.50662893", "0.50648874", "0.5062968", "0.50598156", "0.50572306" ]
0.76553476
0
delete Old Cart and custom From table...
Удалить старый корзину и custom из таблицы...
public function deleteCartOld(){ $date = date('Y-m-d',strtotime("-30 days")); $sql = "DELETE FROM p_custom_submit WHERE dateTime <= '$date' AND id in (SELECT customId FROM cart WHERE dateTime <= '$date')"; $this->dbF->setRow($sql); $sql = "DELETE FROM cart WHERE dateTime <= '$date'"; $this->dbF->setRow($sql); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteCart(){\n try{\n $stmt = $this->dbh->prepare(\"TRUNCATE TABLE Cart\");\n $stmt->execute();\n }catch(PDOEXCEPTION $e){\n echo $e->getMessage();\n die();\n }\n }", "public function deleteCart()\n {\n $this->updateCart([]);\n }", "function deletecart(){\n $del = date('Y-m-d', mktime(0,0,0, date('m'), date('d') - 1, date('Y')));\n mysql_query(\"DELETE FROM os_keranjang WHERE tanggal_belanja < '$del'\");\n }", "function deleteFromCart() {\n\t\tforeach($this->prd as $key => $prd){\n\t\t\tunset($this->prd[$key]);\n\t\t}\n\t\techo \"<p>Products Deleted From Cart!</p>\";\n\t}", "public function deleteCart($cartID){\n \n $params = array(\n \"cardID\" => $cartID,\n );\n\n $delete = \"DELETE FROM 'cart' WHERE 'cartID' = :\".$cardID.\";\";\n $exporter = Database::getDbConnection();\n $exporter->executeQuery($delete, $params);\n\n}", "function deleteAbandonedCart(){\r\t$kemarin = date('Y-m-d', mktime(0,0,0, date('m'), date('d') - 1, date('Y')));\r\tmysql_query(\"DELETE FROM orders_temp \r\t WHERE tgl_order_temp < '$kemarin'\");\r}", "function delete_from_cart()\n\t{\n\t\t$row_id = ($this->_fetch_param('row_id') !== FALSE) ? $this->_fetch_param('row_id') : $this->_fetch_param('index');\n\n\t\t$this->_delete_from_cart($this->_fetch_param('entry_id'), $this->_bool_string($this->_fetch_param('delete_all'), TRUE), $row_id);\n\n\t\t$this->_redirect($this->_get_redirect_url());\n\t}", "public static function remove_from_cart()\n {\n }", "public function delProductByCart($delProdCart){\n $delProdCart = $this->fm->validation($delProdCart);\n $delProdCart = mysqli_real_escape_string( $this->db->link, $delProdCart);\n\n $query = \"DELETE FROM tbl_cart WHERE cartId = '$delProdCart'\";\n $deldata = $this->db->delete($query);\n if ($deldata) {\n echo \"<script>window.location = 'cart.php';</script>\";\n \n } else {\n $msg = \"<span class='error'>Product Not Deleted !</span>\";\n return $msg;\n }\n }", "public function removeToCart($idCliente, $codDisco){\r\n\r\n $query = \"DELETE FROM `Carrello` WHERE `idCompratore` ='\". $idCliente . \"' AND `codDisco` = '\" . $codDisco .\"'\";\r\n $mysqli=Database::avviaDatabase();\r\n Database::lanciaQuery($query, $mysqli);\r\n Database::chiudiDatabase($mysqli);\r\n \r\n}", "function deletcsrt()\n{\n if(isset($_POST['update']))\n\t\t\t\t\t {\n\t \n\t\t\t\t\t\t foreach($_POST['remove'] as $remove_id)\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t $delete=\"DELETE FROM `cart` WHERE p_id='$remove_id'\";\n\t\t\t\t\t\t\t $rundelete=mysqli_query($con,$delete);\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t }\n\t\t\t\t\t }\n}", "function DeleteAllItem()\r\n\t{\r\n\t\tglobal $dbh;\r\n\t\t$sql = \"DELETE FROM cart WHERE customer_id=?\";\r\n\t\t$sth = $dbh->prepare($sql);\r\n\t\t$sth->execute([$this->customer_id]);\r\n\t}", "public function delete_cart()\n {\n //fetch product_id from url\n $rowid=$this->uri->segment(3);\n //if quantity is zero product deleted from cart\n $this->cart->update(array('rowid' => $rowid,'qty' => 0));\n redirect('home/user_cart');\n }", "public function _delete() {\n\n $cartProduct_id = $this->cartproduct_id;\n $db = Engine_Db_Table::getDefaultAdapter();\n\n $db->beginTransaction();\n try {\n\n Engine_Api::_()->getDbtable('cartProductFieldSearch', 'sitestoreproduct')->delete(array('item_id = ?' => $cartProduct_id));\n Engine_Api::_()->getDbtable('cartProductFieldValues', 'sitestoreproduct')->delete(array('item_id = ?' => $cartProduct_id));\n\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n\n //DELETE PRODUCT\n parent::_delete();\n }", "public function nixCart()\r\n {\r\n $cartId = $this->getCartId();\r\n\r\n $this->db->delete('aca_cart_product', array('cart_id' => $cartId));\r\n\r\n $this->db->delete('aca_cart', array('id' => $cartId));\r\n }", "function deleteAbandonedCart(){\n\t$kemarin = date('Y-m-d', mktime(0,0,0, date('m'), date('d') - 1, date('Y')));\n\tmysql_query(\"DELETE FROM transaksi_temp \n\t WHERE tgl_order_temp < '$kemarin'\");\n}", "public function persistent_cart_destroy()\n {\n }", "function delete_old_carts() {\n $old_carts = select_collection(\"users\")->find([\"last_visit\" => ['$lt' => (time() - (1000*60*60*24*10))]]);\n\n foreach ($old_carts as $old) {\n // add products back to offer\n foreach ($old[\"cart\"] as $item) {\n select_collection(\"products\")->updateOne(\n [\"_id\" => $item[\"_id\"]],\n ['$inc' => [\"quantity\" => $item[\"quantity\"], \"ordered_quantity\" => (0-$item[\"quantity\"])]]\n );\n }\n\n // remove cart from the account\n select_collection(\"users\")->updateOne(\n [\"_id\" => get_user_id()],\n ['$set' => [\n \"cart\" => []\n ]]\n );\n }\n}", "public function deleted(ShoppingCart $shoppingCart)\n {\n //\n }", "public function delete(){\n $array = self::getAll();\n foreach($array as $index => $berry){\n $sql = \"DELETE FROM products\n WHERE id=$berry->bushID\";\n $this->pdo->query($sql);\n }\n }", "function remove_cart_items() {\r\n\ttry {\r\n $data = array();\r\n $stmt = $this->dbh->prepare(\"delete from Cart where Cart_id = :Cid\");\r\n $stmt->execute(array(\"Cid\"=>$_SESSION[\"username\"]));\r\n return \"Cart emptied\";\r\n }catch(PDOexception $e) {\r\n echo $e->getMessage();\r\n die();\r\n }\r\n}", "public function actionDeleteFromCart()\n\t{\t$model= new cart;\n\t\t$modelu= new user;\n\n\t\tif(isset($_GET['prod_id']))\n\t\t{\n\t\t\t$modelu=user::model()->find('username=:usrn',array(':usrn'=>$_GET['user']));\n\t\t\t$model=cart::model()->findByAttributes(array('user_id'=>$modelu->user_id, 'prod_id'=>$_GET['prod_id']));\n\t\t\t$model->quantity=$model->quantity-1;\n\t\t\tif($model->quantity===0)\n\t\t\t\t$model->delete();\n\t\t\t\t\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('user/cart','id'=>$modelu->user_id));\n\t\t}\n\t}", "function cart_delete_single_entity($user,$barcode,$appli) {\n $sql_del = \"DELETE FROM `ew_cart` WHERE `user` = '\".$user.\"' AND `barcode` = '\".$barcode.\"' AND `application` = '\".$appli.\"';\";\n if (!($result = mysql_query($sql_del))) {\n echo(\"<script>window.alert('DB Error!');</script>\");\n die('<meta http-equiv=\"refresh\" content=\"0;URL=index.php\">');\n }\n}", "function deleteCart($userid) {\n queryMysql(\"DELETE FROM carrello WHERE carrello.cliente = '$userid';\");\n}", "function remove($rowid) {\n\t\tif ($rowid==\"all\"){\n\t\t\t$this->cart->destroy();\n\t\t}else{\n\t\t\t$data = array(\n\t\t\t\t'rowid' => $rowid,\n\t\t\t\t'qty' => 0\n\t\t\t);\n\n\t\t\t$this->cart->update($data);\n\t\t}\n\t\t$data['error']=$error;\n\t\tredirect('shop/shopping_bag');\n\t}", "public function remove_cart(){\n $this->model->key_id = $this->key_id;\n $this->model->delete();\n $this->key_id=\"\";\n \n Cache::instance()->set('CART'.md5(Session::instance()->id()), NULL);\n }", "public function delete() {\n\t\t$sql = 'delete from cart_customers_basket where customers_basket_id=\"' . e($this->getId()) . '\"';\n\t\tDatabase::singleton()->query($sql);\n\t}", "function remove($rowid) {\n \n $this->cart->update(array(\n 'rowid' => $rowid,\n 'qty' => 0\n ));\n redirect('view');\n }", "public function deleteOldData();", "public function cart($cart_id)\n {\n\t\t\n\t\t//DB::delete('update tblcarts set status=0 where cart_id= ?',[$cart_id]);\n\t\tDB::delete('delete from tblcarts where cart_id= ?',[$cart_id]);\n\t\treturn redirect(\"viewCart\"); \n\t\t\n }", "function del_all() {\n\t\t\t$Itemid = FSInput::get('Itemid',0,'int');\n\t\t\tif(isset($_SESSION['cart'])) {\n\t\t\t\tunset($_SESSION['cart']);\n\t\t\t}\n\t\t\t$link = FSRoute::_('index.php?module=products&view=cart&task=eshopcart2&Itemid='.$Itemid);\n\t\t\tsetRedirect($link);\n\t\t}", "public function modifyCart($mType, $device, $name){ //Modifies the database entry of the cart\n if($mType == \"add\") {\n $modify = \"INSERT INTO 'cart' ('cartID', 'name') VALUES ( :cartID, :name )\".\";\";\n }\n else {\n $modify = \"DELETE FROM 'device' WHERE 'devieID' = \". $deviceID .\";\";\n }\n $params = array( \"mType\" => $mType,\n \"device\" => $device,\n \"name\" => $name,\n );\n\n $exporter = Database::getDbConnection();\n $exporter->executeQuery($modify, $params);\n}", "function del() {\n\t\t\t$eid = FSInput::get('eid',0,'int');\n\t\t\t$pid = FSInput::get('id',0,'int');\n\t\t\t$Itemid = FSInput::get('Itemid',0,'int');\n\t\t\tif($eid && $pid) {\n\t\t\t\tif(isset($_SESSION['cart'])) {\n\t\t\t\t\t$cart = $_SESSION['cart'];\n\t\t\t\t\t\n\t\t\t\t\t$cart_new = array();\n\t\t\t\t\t\n\t\t\t\t\t// Repeat estores\n\t\t\t\t\tfor ($j = 0; $j < count($cart); $j ++) {\n\t\t\t\t\t\t $item = $cart[$j];\n\t\t\t\t\t\t\n\t\t\t\t\t\t// if exist estores\n\t\t\t\t\t\tif($item[0] == $eid) {\n\n\t\t\t\t\t\t\t$products_new = array();\n\t\t\t\t\t\t\t$count_products = 0;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$product_list = $item[1];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Repeat products\n\t\t\t\t\t\t\tfor($i = 0; $i < count($product_list); $i ++) {\n\t\t\t\t\t\t\t \t$prd = $product_list[$i];\n\t\t\t\t\t\t\t \tif($pid != $prd[0]) {\n\t\t\t\t\t\t\t \t\t$products_new[] = $prd;\n\t\t\t\t\t\t\t \t\t$count_products++;\n\t\t\t\t\t\t\t \t} \n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif($count_products) \n\t\t\t\t\t\t\t\t$cart_new[] = array('0' => $eid, $products_new);\n\t\t\t\t\t\t} else {\t\n\t\t\t\t\t\t\t$cart_new[] = $item;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$_SESSION['cart'] = $cart_new;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t$link = FSRoute::_('index.php?module=products&view=cart&task=shopcart2&Itemid='.$Itemid);\n\t\t\tsetRedirect($link);\n\t\t}", "function delete_cart($id_cart)\n {\n return $this->builder->delete(array('id_cart'=>$id_cart));\n }", "public function delOut(){\n\n $sId = session_id();\n $query = \"delete from tbl_cart where sId='$sId'\";\n $runQuery = $this->db->delete($query);\n return $runQuery;\n\n }", "function deleteCart()\n{\n $id = $_POST['deletecart'];\n $ip = $_SERVER[\"REMOTE_ADDR\"];\n\n $sql = \"DELETE FROM cart WHERE p_id = '$id' AND ip_add = '$ip'\";\n\n $login = new Connect();\n\n $run = $login->query($sql);\n\n}", "function removeItems()\r\n\t{\r\n\t\t$model = $this->getModel('carts');\t\t\r\n\t\t$cids = $this->input->get('cid', array(0), 'array');\r\n\t\t$product_attributes = $this->input->get('product_attributes', array(0), 'array');\r\n\t\t$quantities = $this->input->get('quantities', array(0), 'array');\r\n\r\n\t\t$session = JFactory::getSession();\r\n\t\t$user_id = $session->get('user_id', '', 'tienda_pos');\r\n\t\t\r\n\t\tforeach($cids as $cart_id => $product_id)\r\n\t\t\t{\r\n\t\t\t\t$row = $model->getTable();\r\n\t\t\t\t$ids = array('user_id' => $user_id,\r\n\t\t\t\t'cart_id' => $cart_id);\r\n\r\n\t\t\t\tif($return = $row->delete( array('cart_id' => $cart_id)))\r\n\t\t\t\t{\r\n\t\t\t\t\t$item = new JObject;\r\n\t\t\t\t\t$item->product_id = $product_id;\r\n\t\t\t\t\t$item->product_attributes = $product_attributes[$cart_id];\r\n\t\t\t\t\t$item->vendor_id = '0';\r\n\t\t\t\t\t// vendors only in enterprise version\r\n\r\n\t\t\t\t\t// fire plugin event\r\n\t\t\t\t\t$dispatcher = JDispatcher::getInstance();\r\n\t\t\t\t\t$dispatcher->trigger('onRemoveFromCart', array($item));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\r\n\t\t\r\n\t\t$this->setRedirect(\"index.php?option=com_tienda&view=pos&nextstep=step2\");\r\n\t}", "function supply_product_delete(){\n\n\t\tif(delete('tbl_plans',[\n\n\t\t\t'plans_id'=>parsejson()['plans_id'],\n\n\t\t])):\n\n\t\t\tjson_bind(true,CONST_HTTP_STATUS_OK,'Record Deleted',true);\n\n\t\telse:\n\n\t\t\tjson_bind(false,CONST_HTTP_STATUS_OK,'Error !',false);\n\n\t\tendif;\n\n\t}", "public function delCustomerCart(){\n\t\t$sid = session_id();\n\t\t$sql = \"DELETE FROM tbl_cart WHERE sessionId = '$sid'\";\n\t\treturn $this->db->delete($sql);\n\t}", "function update_cart()\n{\n\tglobal $db;\n\tif(isset($_POST['update']))\n\t{\n\t\tforeach ($_POST['remove'] as $remove_id) \n\t\t{\n\t\t $delete_product=\"delete * from cart where p_id='$remove_id'\";\n\t\t $run_delete=mysqli_query($db,$delete_product);\n\t\t if($run_delete)\n\t\t {\n\t\t \techo \"<script>window.open('cart.php','self')</script>\";\n\t\t }\n\t\t}\n\t}\n}", "protected function DeleteExtra()\n\t{\t$this->db->Query('DELETE FROM storeorderbundles WHERE orderid=' . (int)$this->id);\n\t//\tforeach ($this->GetItems() as $orderitem)\n\t//\t{\t$this->db->Query('DELETE FROM storegifts WHERE itemid=' . (int)$orderitem['id']);\n\t//\t}\n\t\t$this->db->Query('DELETE FROM storeorderitems WHERE orderid=' . (int)$this->id);\n\t\t$this->db->Query('DELETE FROM orderattendees WHERE orderid=' . (int)$this->id);\n\t}", "function delete_cart_entry($fid, $pname)\r\n{\r\n global $pdo;\r\n\r\n // get the ordersID\r\n $statement = $pdo->prepare(\"SELECT orders.idorders \r\n FROM \r\n user \r\n JOIN orders ON orders.user_iduser = user.iduser \r\n WHERE \r\n user.fb_id = :fid\");\r\n $statement->execute(array(':fid' => $fid));\r\n $oid = $statement->fetchAll()[0]['idorders'];\r\n\r\n\r\n\r\n // get the productID of the product\r\n $statement = $pdo->prepare(\"SELECT idproduct FROM product WHERE product_name = :pname\");\r\n $statement->execute(array(':pname' => $pname));\r\n $pid = $statement->fetchAll()[0]['idproduct'];\r\n\r\n $statement = $pdo->prepare(\"DELETE FROM order_item WHERE orders_idorders = :oid AND product_idproduct = :pid\");\r\n $statement->execute(array(':oid' => $oid, ':pid' => $pid));\r\n\r\n return \"Das Produkt wurde erfolgreich aus dem Warenkorb entfernt. 😊\";\r\n}", "function delete($cart_id = null)\n {\n if($cart_id != null)\n {\n $this->db->where('id', $cart_id);\n $this->db->update('cart', ['deleted' => 1]);\n $this->session->set_flashdata(\"success\", \"data deleted successfully\");\n }\n redirect('Shop_cart');\n }", "public function delete_all(){\n unset($_SESSION['cart']);\n }", "function deleteCartProduct($userid, $pid) {\n queryMysql(\"DELETE FROM carrello WHERE cliente = '$userid' AND prodotto = '$pid';\");\n}", "public function removeCart() {\n $cart = Cart::where('user_id', $this->getCartIdentification())\n ->first();\n\n if (!$cart && !Auth::guard(config('productcart.guard_name'))->check()) {\n $cart = Cart::where('cookie', $this->getCookieElement())\n ->first();\n }\n\n foreach ($cart->CartItems as $item) {\n $this->removeCartItem($item->id);\n }\n Cart::where('id', $cart->id)->delete();\n }", "public function deleteCart(Request $request) {\n\t\t$id = $request->id;\n\t\t$size = $request->size;\n\t\t$customizable = $request->customizable;\n\t\t\n\t\t$productList = Session::get('Cart');\n\t\t\n\t\tforeach($productList as $item => $value) \n\t\t{\n\t\t\tif ($value['id'] == $id && $value['size'] == $size && $value['customizable'] == $customizable) \n\t\t\t{\n\t\t\t\tunset($productList[$item]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tSession::forget('Cart');\n\t\tSession::put('Cart', $productList);\n\t\treturn redirect()->route(\"cart\");\n\t}", "public function Delete()\r\n {\r\n \t $sql = \"Delete From `goods` where goods_id = \".$this->Prepare($this->getGoods_id());\r\n \t $this->runScalar($sql);/*We Use RunScalar And Not RunSelect Since We Are Deleting....*/\r\n }", "public function delete() {\n\t\t$sql = 'delete from cart_manufacturers where manufacturers_id=\"' . e($this->getId()) . '\"';\n\t\tDatabase::singleton()->query($sql);\n\t}", "public function destroy(Cart $cart)\n {\n //\n }", "function delete_multi_cart_post()\n {\n $fcartid = $this->input->post('fcartid', TRUE);\n\n $result = $this->MOutgoing_T->delete_data2($fcartid);\n\n if($result > 0)\n {\n $this->response([\n 'status' => TRUE,\n 'message' => 'Delete successfully'\n ], REST_Controller::HTTP_OK);\n }\n else\n {\n $this->response([\n 'status' => FALSE,\n 'message' => 'Delete failed'\n ], REST_Controller::HTTP_OK);\n }\n }", "public static function remove(){\n\t\tglobal $c;\n\t\t@extract($_GET, EXTR_PREFIX_ALL, 'p');\n\t\t$p_CId=(int)$p_CId;\n\t\t$ProId=(int)db::get_value('shopping_cart', \"{$c['where']['cart']} and CId='$p_CId'\", 'ProId');\n\t\tdb::delete('shopping_cart', \"{$c['where']['cart']} and CId='$p_CId'\");\n\t\t$ProId && cart::update_cart_wholesale_price($ProId);//检查产品混批功能\n\t\tjs::back();\n\t}", "function shophead_deleted($postcode_id = \"\")\r\r\n {\r\r\n $id = base64_decode($postcode_id);\r\r\n $categroy_data = $this->Postcode->find('first', array('conditions' => array('Postcode.id' => $id)));\r\r\n $new_product_data=array();\r\r\n if (!empty($categroy_data)) {\r\r\n $new_product_data['Postcode']['is_deleted'] = 1;\r\r\n $new_product_data['Postcode']['id'] = $categroy_data['Postcode']['id'];\r\r\n if ($this->Postcode->save($new_product_data)) {\r\r\n $this->Session->write('flash', array(DELETE_RECORD, 'success'));\r\r\n $this->redirect(array('controller' => 'Postcodes', 'action' => 'index'));\r\r\n } else {\r\r\n $this->Session->write('flash', array(FAILURE_MSG, 'failure'));\r\r\n $this->redirect(array('controller' => 'Postcodes', 'action' => 'index'));\r\r\n }\r\r\n } else {\r\r\n $this->redirect(array('controller' => 'Postcodes', 'action' => 'index'));\r\r\n }\r\r\n }", "public function deletecart()\n {\n // $this->view->setCaching(false);\n $Id = FormUtil::getPassedValue('id', '', 'REQUEST');\n $shop_id = FormUtil::getPassedValue('shop_id', '', 'REQUEST');\n // echo \"ID :\" . $Id . \" Shop ID :\" . $shop_id; exit;\n // echo \"<pre>\"; print_r($_SESSION['cart']); echo \"</pre>\"; exit;\n unset($_SESSION ['cart'] [$shop_id] [$Id]);\n if (empty($_SESSION ['cart'] [$shop_id])) {\n unset($_SESSION ['cart'] [$shop_id]);\n }\n // session_destroy($_SESSION['cart'][$shop_id][$Id]);\n if (count($_SESSION ['cart'] [$shop_id] < 1)) {\n // unset($_SESSION['cart'][$shop_id]);\n }\n\n setcookie(\"cart[$shop_id][$Id]\", \"\", time() - 604800, '/');\n if (UserUtil::isLoggedIn()) {\n unset($_SESSION ['user_cart'] [$shop_id] [$Id]);\n if (empty($_SESSION ['user_cart'] [$shop_id])) {\n unset($_SESSION ['user_cart'] [$shop_id]);\n }\n $user_id = UserUtil::getVar('uid');\n $get_products = ModUtil::apiFunc('ZSELEX', 'user', 'get',\n $getargs = array(\n 'table' => 'zselex_cart',\n 'where' => \"user_id=$user_id\"\n )\n // 'fields' => array('id', 'quantity', 'availed')\n );\n $content = $get_products ['cart_content'];\n $cart_unserialize = unserialize($content);\n unset($cart_unserialize [$shop_id] [$Id]);\n if (empty($cart_unserialize [$shop_id])) {\n unset($cart_unserialize [$shop_id]);\n }\n $this->update_cart($cart_unserialize);\n } else {\n $this->validatecart($_SESSION ['cart']);\n }\n\n LogUtil::registerStatus($this->__('Done! Item has been deleted successfully from Cart.'));\n return $this->redirect(ModUtil::url('ZSELEX', 'user', 'cart'));\n }", "public function actionRemoveFromCart() {\n \\Yii::$app->response->format = \\yii\\web\\Response::FORMAT_JSON;\n $session = Yii::$app->session;\n if (Yii::$app->request->post()[\"scientific-object\"]) {\n $cart = $session['scientific-object'];\n $itemsWithName = Yii::$app->request->post()[\"scientific-object\"];\n $cart = array_diff_assoc($cart, $itemsWithName);\n $session['scientific-object'] = $cart;\n\n return ['totalCount' => count($session['scientific-object'])];\n }\n }", "public function deleteUserCart()\n {\n //echo \"<pre>\"; print_r($_REQUEST); echo \"</pre>\"; exit;\n $cart_id = FormUtil::getPassedValue('id', '', 'REQUEST');\n $shop_id = FormUtil::getPassedValue('shop_id', '', 'REQUEST');\n // echo $shop_id; exit;\n // echo $cart_id; exit;\n\n $user_id = UserUtil::getVar('uid');\n if (!UserUtil::isLoggedIn()) {\n $user_id = ZSELEX_Util::getTempUserId();\n }\n // if (UserUtil::isLoggedIn()) {\n if ($user_id) {\n // $delete = DBUtil::deleteWhere('zselex_cart', $where = \"cart_id=$cart_id\");\n $cartObj = $this->entityManager->find('ZSELEX_Entity_Cart', $cart_id);\n $this->entityManager->remove($cartObj);\n $this->entityManager->flush();\n\n /*\n * $cart = ModUtil::apiFunc('ZSELEX', 'user', 'get', array(\n * 'table' => 'zselex_cart',\n * 'where' => \"cart_id=$cart_id\",\n * // 'fields' => array('product_to_options_value_id', 'price')\n * ));\n */\n $getArgs = array(\n 'entity' => 'ZSELEX_Entity_Cart',\n 'fields' => array(\n 'a.cart_id'\n ),\n 'where' => array(\n 'a.cart_id' => $cart_id\n )\n );\n $cart = $this->entityManager->getRepository('ZSELEX_Entity_Cart')->get($getArgs);\n\n if (empty($cart)) {\n setcookie(\"last_shop_id\", $shop_id, time() + (86400 * 7), '/');\n }\n } else {\n unset($_SESSION ['temp_cart'] [$shop_id] [$cart_id]);\n if (empty($_SESSION ['temp_cart'] [$shop_id]) || count($_SESSION ['temp_cart'] [$shop_id])\n < 1) {\n unset($_SESSION ['temp_cart'] [$shop_id]);\n }\n $cookieEncode = json_encode($_SESSION ['temp_cart']);\n setcookie(\"temp_cart\", $cookieEncode, time() + 604800, '/');\n\n if (empty($cookieEncode)) {\n setcookie(\"last_shop_id\", $shop_id, time() + (86400 * 7), '/');\n }\n }\n LogUtil::registerStatus($this->__('Done! Item has been deleted successfully from Cart.'));\n return $this->redirect(ModUtil::url('ZSELEX', 'user', 'cart'));\n }", "public function delete($id)\n {\n $item = CartItem::find($id);\n if($item->count > 1)\n {\n $item->count -= 1;\n $item->save();\n return redirect()->action('CartController@index');\n }\n else if($item->count === 1) {\n $item->delete();\n // DB::statement('TRUNCATE TABLE `cart_items`');\n return redirect()->action('CartController@index');\n }\n }", "function remove($dates,$codetrans,$product)\n {\n // ============ update transaction ===================\n $this->ci->db->where('dates', $dates);\n $this->ci->db->where('code', $codetrans);\n $this->ci->db->where('product', $product);\n $this->ci->db->delete('warehouse_transaction');\n // ====================================================\n }", "public function delete(){\n\t\t\t// lay if tu url\n\t\t\t$id = isset($_GET[\"id\"]) ? $_GET[\"id\"] : 0;\n\t\t\t// goi ham cartDelete tu model\n\t\t\t$this->cartDelete($id);\n\t\t\t// di chuyen den trang gioi hang\n\t\t\theader(\"location:index.php?controller=cart\");\n\t\t}", "public function destroy(Cart $cart)\n {\n try {\n\n $jumlah_barang = Produk::where('id',$cart->produk_id)->first();\n\n Produk::where('id',$cart->produk_id)->update([\n 'jumlah_barang' => $jumlah_barang->jumlah_barang + $cart->jumlah_barang\n ]);\n\n Cart::destroy($cart->id);\n\n return back();\n\n } catch (\\Throwable $th) {\n dd($th);\n }\n }", "public function deleteOrderCart(Request $request) {\n\t\t$id = $request->id;\n\t\t$size = $request->size;\n\t\t$customizable = $request->customizable;\n\t\t\n\t\t$productList = Session::get('OrderCart');\n\t\t\n\t\tforeach($productList as $item => $value) \n\t\t{\n\t\t\tif ($value['id'] == $id && $value['size'] == $size && $value['customizable'] == $customizable) \n\t\t\t{\n\t\t\t\tunset($productList[$item]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tSession::forget('OrderCart');\n\t\tSession::put('OrderCart', $productList);\n\t\treturn view('admin.order-content-update');\n\t}", "function deleteProdInCart($product_id, $user_id)\n{\n global $start;\n $delete = \"DELETE FROM cart WHERE product_id = ? AND user_id = ?\";\n $request = $start->prepare($delete);\n $request->execute(\n array(\n $product_id,\n $user_id\n )\n );\n}", "public function deleteCartItem($cartItem);", "public function deleteCart($id){\n Cart::remove($id);\n return redirect()->back();\n }", "function removeCartItem($rowid) { \r\n $data = array(\r\n 'rowid' => $rowid,\r\n 'qty' => 0\r\n );\r\n $this->cart->update($data);\r\n\t\t$this->load->view('carrito');\r\n\t}", "public function remove($cartId);", "public function deleteCart($session) {\n $this->saveProduct($session, []);\n }", "public function actionAllToRemoveFromCart() {\n \\Yii::$app->response->format = \\yii\\web\\Response::FORMAT_JSON;\n $session = Yii::$app->session;\n\n $allobjects = $session['all-scientific-object'];\n $cart = $session['scientific-object'];\n $cart = array_diff_assoc($cart, $allobjects);\n $session['scientific-object'] = $cart;\n\n return ['totalCount' => count($session['scientific-object'])];\n }", "public function testRemoveFromCart() {\n \n $data['product_id'] = 1;\n $data['quantity'] = 2;\n\n $cartService = new ShoppingCartService();\n $this->assertTrue($cartService->addToCart($data));\n \n $data['product_id'] = 2;\n $data['quantity'] = 2;\n $this->assertTrue($cartService->addToCart($data));\n $this->assertEquals($cartService->getCartTotal(),220.50);\n $cartItems = $cartService->getItems();\n \n //secondly enterd product id\n $itmeId = $cartItems[1]['id'];\n \n $this->assertTrue($cartService->removeFromCart($itmeId));\n $cartItems = $cartService->getItems();\n \n $this->assertEquals(sizeof($cartItems),1);\n $this->assertEquals($cartService->getCartTotal(),200);\n \n }", "function update_qty()\r\n{\r\nif(isset($_POST['update_cart']))\r\n{\r\n$ip=getIp();\r\n\r\n\r\nforeach($_POST['remove'] as $remove_id)\r\n{\r\n\r\n\r\n$delete_product=\"delete from cart where p_id='$remove_id' AND ip_address='$ip'\";\r\n\r\n$run_delete=mysql_query($delete_product);\r\n\r\nif($run_delete)\r\n{\r\necho \"<script>window.open('cart.php','_self')</script>\";\r\n\r\n}\r\n\r\n}\r\n\r\n\r\n}\r\n\r\nif(isset($_POST['continue']))\r\n{\r\n\r\necho \"<script>window.open('index.php','_self')</script>\";\r\n\r\n}\r\n\r\n}", "public function delete() {\n $query = $this->getConnection()->prepare('DELETE FROM '.MYSQL_PREFIX.$this->TABLE_NAME.' WHERE payback_id=:payback_id');\n $query->bindParam(':payback_id', $this->payback_id);\n $query->execute();\n }", "public function afterDelete()\n\t{\n\t\tforeach (Inventory::find()->where(['vendor_id'=> $this->id])->all() as $record)\n\t\t{\n\t\t\t$record->delete();\n\t\t}\n\t}", "function removeItem($rowid) {\n \n $this->cart->update(array(\n 'rowid' => $rowid,\n 'qty' => 0\n ));\n redirect('view/registeruser');\n }", "public function delete(?Cart $cart): void\n {\n if(($this->get($cart->customer()))->id() === $cart->id())\n {\n throw new MySQLException('this cart not exist in database',501);\n return;\n }\n\n foreach ($cart->orderLines() as $orderLine) {\n $this->orderLineManager->delete($orderLine);\n }\n\n $this->cartManager->delete($cart);\n }", "public function deleteCartProduct($id=null)\n {\n DB::table('carts')->where('id',$id)->delete();\n return redirect('/cart')->with('flash_message_error','Product has been deleted!');\n }", "function delete_product($sku)\n {\n $db = new DB();\n $sql=$db->row(\"DELETE FROM digitulus_product WHERE sku = :s\", array(\"s\" => $sku)); \n return($sql);\n }", "public function clearcart(){\n\t\t$this->load->library(\"cart\");\n\t\t$this->cart->destroy();\n\t}", "function delete_from_cart($key=null)\n\t{\n\t\t$this->Session->delete('shopping_cart.'.$key);\n\n\n\t\t$counter=$this->Session->read('shopping_counter');\n\t\t$this->Session->write('shopping_counter',$counter-1);\n\t\t$this->Session->setFlash('Cart Item Deleted');\n\t\t$this->redirect('/books/view_cart/');\n\n\t}", "public function clearCart()\n {\n $userID = $_SESSION['userID'];\n $sqlQuery = \"DELETE FROM Basket WHERE idUser = ?\";\n $statement = $this->_dbHandle->prepare($sqlQuery); // prepare a PDO statement\n $statement->bindParam(1,$userID);\n $statement->execute(); // execute the PDO statement\n }", "public function emptyCart($customerId) {\n $this->db->where('customer_id', $customerId);\n $this->db->delete(TABLE_CART);\n }", "public function delete($id){\n \n $cart = Cart::find($id);\n $cart->delete();\n \n return \"Data deleted\";\n }", "function removeProductFromCart(){\n $product_id = Input::json('product_id');\n $cart_id = Session::get('carty.cart_id');\n\n $validator = Validator::make(\n array(\n 'product_id'=>$product_id\n ),\n array(\n 'product_id'=>array('required','integer')\n )\n );\n\n if($validator->fails()){\n Log::error(print_r($validator->messages()->all(),true),array(__CLASS__,__FUNCTION__));\n return Response::json(array('success'=>false,'message'=>'invalid request'),400);\n }\n\n try {\n DB::table('cart_contents')->where('product_id', '=', $product_id)->where('cart_id', '=', $cart_id)->delete();\n }catch(\\Exception $e){\n Log::error($e->getMessage(),array(__CLASS__,__FUNCTION__));\n Log::error($e->getTraceAsString(),array(__CLASS__,__FUNCTION__));\n\n return Response::json(array(\n 'success'=>false,\n 'message'=>\"error updating cart\"\n ), 500);\n }\n\n return Response::json(array('success'=>true));\n }", "function deleteCart(){\n unset($_SESSION['cart']);\n }", "function deletedb($link) {\n \n // if (mysqli_connect_errno($link))\n\t//exit(\"Could not connect\" . mysqli_connect_error());\n //else {\n //log_action(\"connected successfully: mysql\");\n \n \n mysqli_select_db($link, \"sales_db\");\n \n //if (mysql_query(\"DROP TABLE IF EXISTS Invoices\", $link))\n if (mysqli_query($link, \"DROP TABLE IF EXISTS Invoices\")) \n ;//log_action(\"deleted table: Invoices\");\n else\n log_error(\"Error deleting table: \" . mysqli_error($link));\n \n //if (mysql_query(\"DROP TABLE IF EXISTS Classes\", $link))\n if (mysqli_query($link, \"DROP TABLE IF EXISTS Classes\"))\n ;//log_action(\"deleted table: Classes\");\n else\n log_error(\"Error deleting table: \" . mysqli_error($link));\n\n if (mysqli_query($link, \"DROP TABLE IF EXISTS Suppliers\"))\n ;//log_action(\"deleted table: Classes\");\n else\n log_error(\"Error deleting table: \" . mysqli_error($link));\n\n //if (mysql_query(\"DROP TABLE IF EXISTS Lineitems\", $link))\n if (mysqli_query($link, \"DROP TABLE IF EXISTS Lineitems\"))\n ;//log_action(\"deleted table: Lineitems\");\n else\n log_error(\"Error deleting table: \" . mysqli_error($link));\n \n //if (mysql_query(\"DROP TABLE IF EXISTS Products\", $link))\n if (mysqli_query($link, \"DROP TABLE IF EXISTS Products\"))\n ;//log_action(\"deleted table: Products\");\n else\n log_error(\"Error deleting table: \" . mysqli_error($link));\n \n //if (mysql_query(\"DROP TABLE IF EXISTS LastUpdated\", $link))\n if (mysqli_query($link, \"DROP TABLE IF EXISTS LastUpdated\"))\n ;//log_action(\"deleted table: Last Updated\");\n else\n log_error(\"Error deleting table: \" . mysqli_error($link));\n \n //if (mysql_query(\"DROP TABLE IF EXISTS Suppliers\", $link))\n if (mysqli_query($link, \"DROP TABLE IF EXISTS Suppliers\"))\n ;//log_action(\"deleted table: Suppliers\");\n else\n log_error(\"Error deleting table: \" . mysqli_error($link));\n \n // }\n}", "public function destroy(cart $cart)\n {\n //\n }", "function hapus_cart(){\n $data = array(\n 'rowid' => $this->input->post('row_id'), \n 'qty' => 0, \n );\n $this->cart->update($data);\n redirect('c_po');\n }", "public function deleteFromCart($id){\n $user = auth('api')->user();\n // check if user is seller or not\n if(!$user->customer()->exists()){ \n return $this->apiResponse(null, HTTPCodesEnum::STATUS_UNAUTHORIZED , \"Unauthorized\");\n }\n\n $cart = Cart::find($id);\n if($cart == null){\n return $this->apiResponse('', HTTPCodesEnum::STATUS_NOT_FOUND, 'There are no Data');\n }\n // Delete record\n $cart->delete();\n // return successfully response\n return $this->apiResponse('', HTTPCodesEnum::STATUS_OK, 'Deleted Successfully');\n }", "public function clearCart()\n {\n if (static::getCurrentCart() !== null) {\n if (!empty($this->items)) {\n foreach ($this->items as $item) {\n $this->unlink('items', $item, true);\n }\n $this->updateAttributes(['total' => 0]);\n }\n }\n }", "public function removeCart(){\n $this->cartCookie->unsetCookie();\n }", "public function addToCartDelete($del_id){\n\n $query = \"delete from tbl_cart where cartId='$del_id'\";\n $get_query = $this->db->delete($query);\n\n if ($get_query) {\n $updatemsg = \"Data delete Successfully Done\";\n return $updatemsg;\n } else {\n $updatemsg = \"Data delete Not Successfully Done\";\n return $updatemsg;\n }\n\n }", "public function clear_cart() {\n\t\t\t$this->Session->delete('Cart');\n\t\t\t$this->Session->delete('Counter');\n\t\t\t$this->Session->delete('Quantity');\n\t\t\t$this->Session->setFlash(__('Cart Emptied!'), 'success');\n\t\t\t$this->redirect(array('controller' => 'products', 'action' => 'index'));\n\t\t}", "function hapus_cart() {\n $data = array(\n 'rowid' => $this->input->post('row_id'),\n 'qty' => 0,\n );\n $this->cart->update($data);\n echo $this->show_cart();\n }", "public function destroy(){\n\t\t\t// goi ham cartDestroy tu model\n\t\t\t$this->cartDestroy();\n\t\t\t// di chuyen den trang gioi hang\n\t\t\theader(\"location:index.php?controller=cart\");\n\t\t}", "public static function geoCart_deleteProcess()\n {\n $cart = geoCart::getInstance();\n\n $parent = $cart->item->getParent();\n if (is_object($parent)) {\n $session_vars = $parent->get('session_variables');\n $session_vars['attention_getter'] = 0;\n $session_vars['attention_getter_choice'] = 0;\n $parent->set('session_variables', $session_vars);\n $parent->save();\n }\n }", "public function delete()\r\n\t{\r\n\t if($this->table_name=\"ARTICLE\")\r\n {\r\n $this->db_conn->query(\"DELETE FROM ARTICLE_REVISION_HISTORY WHERE ARTICLE_ID=\" . $this->id);\r\n $this->db_conn->query(\"DELETE FROM SIMILARITY WHERE SIMILARITY_ARTICLE_ID=\" . $this->id);\r\n }\r\n\t\t$this->db_conn->query(\"DELETE FROM \" . $this->table_name . \" WHERE \" . $this->column_prefix . \"ID = \" . $this->id);\r\n\t}", "function delete() {\n\t\t\t\t//set the variable\n\t\t\t\t\t$db = $this->db;\n\t\t\t\t//remove the menu languages\n\t\t\t\t\t$sql = \"delete from v_menu_languages where menu_item_uuid \";\n\t\t\t\t\t$sql .= \"in (select i.menu_item_uuid from v_menu_languages l, v_menu_items i \";\n\t\t\t\t\t$sql .= \"where l.menu_uuid = i.menu_uuid \";\n\t\t\t\t\t$sql .= \"and (i.menu_item_protected <> 'true' \";\n\t\t\t\t\t$sql .= \"or i.menu_item_protected is null) \";\n\t\t\t\t\t$sql .= \"group by i.menu_item_uuid)\";\n\t\t\t\t\t$db->exec(check_sql($sql));\n\t\t\t\t//remove the old menu\n\t\t\t\t\t$sql = \"delete from v_menu_items \";\n\t\t\t\t\t$sql .= \"where menu_uuid = '\".$this->menu_uuid.\"' \";\n\t\t\t\t\t$sql .= \"and (menu_item_protected <> 'true' \";\n\t\t\t\t\t$sql .= \"or menu_item_protected is null); \";\n\t\t\t\t\t$db->exec(check_sql($sql));\n\t\t\t}", "public function drop()\n {\n if (!$_POST) {\n $this->session->set_flashdata('error', 'Aksi ditolak');\n redirect(base_url('cartin'));\n }\n\n if ($this->cartin->where('id_user', $this->id_user)->count() < 1) {\n $this->session->set_flashdata('warning', 'Tidak ada barang di dalam keranjang');\n redirect(base_url('cartin'));\n }\n\n // Hapus seluruh isi keranjang dari user\n $this->cartin->where('id_user', $this->id_user)->delete();\n\n // Jika tabel keranjang dari seluruh user kosong, reset autoincrement id keranjang\n if ($this->cartin->count() < 1) { \n $this->cartin->resetIndex();\n }\n\n $this->session->set_flashdata('success', 'Keranjang masuk anda telah dibersihkan');\n\n redirect(base_url('cartin'));\n }", "function Delete() {\n\n\t\t\t$dbMain = db_getDBObject(DEFAULT_DB, true);\n\n /* ModStores Hooks */\n HookFire(\"classpackageitem_before_delete\", [\n \"that\" => &$this\n ]);\n\n\t\t\t$sql = \"DELETE FROM PackageItems WHERE id = $this->id\";\n\t\t\t$dbObj->query($sql);\n\n\t\t}", "public function deleteProductFromCart(Request $request){\n try{\n $carts = FALSE;\n if($request->cart_id){\n for($i=0; $i<count($request->cart_id); $i++){\n $cart_id = $request->cart_id[$i]['id'];\n $productsPrice = DB::table('carts')->where('id',$cart_id)->get();\n if(count($productsPrice) != 0){\n $cart = DB::table('carts')->where('id',$cart_id)->delete();\n $carts = $cart;\n break;\n } \n } \n if($carts==TRUE){\n #send response\n return response()->json([\n 'message'=>'Deleted successfully',\n 'code'=>200,\n 'status'=>'success'\n ]);\n }else{\n return response()->json([\n 'message'=>\"cart not deleted yet.Please try again later.\",\n 'status'=>'error'\n ]);\n }\n }else{\n return response()->json([\n 'message'=>\"Provide Cart id first\",\n 'status'=>'error'\n ]);\n }\n }catch(\\Exception $e){\n return response()->json([\n 'message'=>'Something went wrong. Please contact administrator.'.$e->getMessage(),\n 'status' =>'error'\n ]);\n }\n }", "function updatecart(){\n\n global $con;\n\n $ip = getIp();\n\n // DELETE FROM THE SHOPPING CART THE PRODUCTS WHICH ARE SELECTED FOR REMOVE UPON CLICKING OF THE UPDATE_CART BUTTON\n if (isset($_POST['update_cart'])) {\n\n foreach ($_POST['remove'] as $remove_id) {\n\n $delete_product = \"DELETE FROM cart WHERE p_id='$remove_id' AND ip_add='$ip'\";\n\n $run_delete = mysqli_query($con, $delete_product);\n\n if ($run_delete) {\n echo \"<script>window.open('cart.php', '_self')</script>\";\n }\n }\n }\n if (isset($_POST['continue'])) {\n echo \"<script>Window.open('index.php','_self')</script \";\n }\n\n echo @$up_cart = updatecart();\n // TO ADD @ PRESS SHIFT + A. IT SIMPLY MEANS IF THE WHOLE FUNCTION IS NOT WORKING, IT WILL NOT GENERATE AN ERROR\n }" ]
[ "0.7327082", "0.7291701", "0.7068349", "0.7026294", "0.68468034", "0.6783256", "0.67559034", "0.6741791", "0.6726594", "0.6713757", "0.66907567", "0.66433775", "0.66009986", "0.6596244", "0.65927017", "0.6576082", "0.65554184", "0.6537767", "0.65358114", "0.6490019", "0.6469112", "0.64688176", "0.64557314", "0.64169395", "0.63997996", "0.6347506", "0.6344111", "0.6323884", "0.6312887", "0.6311835", "0.6307952", "0.62821215", "0.6280741", "0.62776935", "0.62732315", "0.62662643", "0.62660116", "0.6262939", "0.62616354", "0.62603605", "0.62569356", "0.62562394", "0.6253059", "0.6223552", "0.6217769", "0.61985075", "0.6187655", "0.6184507", "0.6174472", "0.6174365", "0.6163245", "0.61625075", "0.61590856", "0.6143858", "0.61412585", "0.6140935", "0.61356086", "0.6134685", "0.61201036", "0.610911", "0.61013186", "0.6095687", "0.60753375", "0.607505", "0.60686535", "0.6050679", "0.60464114", "0.60449934", "0.60436803", "0.60399145", "0.60391426", "0.6034821", "0.6030092", "0.6029106", "0.60179126", "0.60176796", "0.6011257", "0.6001817", "0.5999188", "0.59987366", "0.59887993", "0.59870857", "0.598089", "0.59787357", "0.5977766", "0.5971014", "0.5966104", "0.59565985", "0.5951091", "0.5945044", "0.59417546", "0.59409887", "0.5933399", "0.59318924", "0.59292305", "0.5928335", "0.59271216", "0.59257686", "0.59239626", "0.5923431" ]
0.78407824
0
It will call when a test ended
Оно будет вызываться, когда тест завершится
public function endTest();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function endTest()\n {\n\n }", "public function endTest() {\n\t\t\tunset($this->Whistle);\n\t\t\tClassRegistry::flush();\n\t\t}", "public function endTest() {\n\t\t\tunset($this->Helper);\n\t\t\tClassRegistry::flush();\n\t\t}", "function atTestEnd($method, &$test_case) {\n\t\t$context = &SimpleTest::getContext();\n\t\t$reporter = &$context->getReporter();\n\t\t$reporter->paintMessage(\"did and done $method\");\n\t}", "public function ended() {\n\t\t// do cleanup stuff here\n\t}", "protected function afterTest()\n {\n }", "public function endTestSuite(TestSuite $suite): void\n {\n }", "public function endTestSuite(PHPUnit_Framework_TestSuite $suite)\n {\n }", "public function endTestSuite(PHPUnit_Framework_TestSuite $suite)\n {\n }", "public function testEnd(\\Codeception\\Event\\TestEvent $e)\n {\n $cest = $e->getTest();\n\n //Access private TestResultObject to find stack and if there are any errors (as opposed to failures)\n $testResultObject = call_user_func(\\Closure::bind(\n function () use ($cest) {\n return $cest->getTestResultObject();\n },\n $cest\n ));\n $errors = $testResultObject->errors();\n if (!empty($errors)) {\n foreach ($errors as $error) {\n if ($error->failedTest()->getTestMethod() == $cest->getName()) {\n $stack = $errors[0]->thrownException()->getTrace();\n $context = $this->extractContext($stack, $cest->getTestMethod());\n // Do not attempt to run _after if failure was in the _after block\n // Try to run _after but catch exceptions to prevent them from overwriting original failure.\n if ($context != TestContextExtension::TEST_PHASE_AFTER) {\n $this->runAfterBlock($e, $cest);\n }\n continue;\n }\n }\n }\n // Reset Session and Cookies after all Test Runs, workaround due to functional.suite.yml restart: true\n $this->getDriver()->_runAfter($e->getTest());\n }", "public function testJobComplete()\n {\n }", "public function endTest(Test $test, float $time): void\n {\n }", "public function endTest() {\n\t\t\tunset($this->Amazon);\n\t\t}", "public static function end(){\r\n\t\tunregister_tick_function(array('Tests_Test_Timer', 'checkTime'));\r\n\t}", "public function runPostTestCleanUp();", "function atTestEnd($method)\r\n {\r\n parent :: atTestEnd($method);\r\n $debug = lmbDebug :: instance();\r\n $debug->resetExpectations();\r\n }", "public function endTest(TestCase $test)\n {\n $resolver = Resolver::getInstance();\n $resolver->setCurrentTest(null);\n }", "public function endTest(PHPUnit_Framework_Test $test, $time) {\n if ($this->currentTestPass) {\n $this->writeCase('pass', $time);\n }\n }", "public function endTestSuite(\\PHPUnit_Framework_TestSuite $suite)\n {\n $this->writeServiceMessage(\n self::MESSAGE_SUITE_FINISHED,\n $suite\n );\n }", "public function endTestSuite(\\PHPUnit_Framework_TestSuite $suite)\n {\n $this->writeServiceMessage(\n self::MESSAGE_SUITE_FINISHED,\n $suite\n );\n }", "public function endSetup();", "public function teardown(): void;", "public function tearDownTest() {\n }", "protected function end()\n {\n $this->comment(\"\\nDone.\");\n $this->comment(\"Run time: \" . (microtime(true) - $this->startTime) . \"\\n\");\n // print(PHP_EOL); // don't use this. Causes all tests to write a new line\n }", "public function teardown();", "public function endTest(Test $test, $time)\n {\n $this->currentSuiteTime += $time;\n $this->logger->logTest(\n $this->currentSuiteName,\n $test->getName(),\n $time\n );\n }", "function end() {\n\t\t$this->db->rollback();\n\t\tTestRecorder::end();\n\t}", "public function finished()\n {\n }", "public function teardown() { \n\n }", "public static function tearDownAfterClass()\n {\n $time = round((microtime(true) - self::$testRunTime) * 1000, 2);\n echo \"done in {$time} ms\";\n }", "public function testClose()\n {\n }", "public function endTest() {\n\t\t$this->Post->deleteAll(true);\n\t\tunset($this->Post);\n\t}", "public function finish() {}", "public function endTestSuite(PHPUnit_Framework_TestSuite $suite) {\n $this->currentTestSuiteName = '';\n $this->currentTestName = '';\n }", "public function endTest($method)\n {\n // message. After logging out, message is destoryed.\n if (isset($this->controller->Auth)) {\n $this->controller->Auth->logout();\n }\n unset($this->controller);\n ClassRegistry::flush();\n }", "public function teardown()\n {\n //\n }", "public function endTest() {\n\t\tunset($this->ProductCategory);\n\t\tClassRegistry::flush();\n\t}", "function tearDownSuite()\n {\n $this->done = array();\n }", "public function after() {}", "public static function endPerfomanceTest()\n {\n self::$metrics['time']['end']=microtime(true);\n self::$metrics['memory']['end']=memory_get_usage(true);\n }", "public function teardown(): void\n {\n }", "public function onEnd();", "function endTest() {\r\n unset($this->User);\r\n ClassRegistry::flush();\r\n }", "public function teardown()\n {\n $this->dispatchTeardown();\n }", "public function end() {}", "public function end() {}", "public function finish() {\n\t}", "public function tearDown() {\n\t\t$this->stop();\n\t}", "private function _After()\n {\n // Empty for now\n }", "public function testRunFinished(TestSuite $suite, TestResult $result) {\n $this->covering && $this->coverage->stop();\n\n foreach ($this->exports as $export) {\n $export();\n }\n\n $result->metric('Coverage', new CoverageDetails($this->coverage->report(), array_keys($this->exports)));\n }", "public function finish(): void\n {\n }", "public function finish()\n {\n }", "public function tearDown() {}", "public function tearDown() {}", "public function onAfter();", "public function finish()\n {\n\n }", "protected function emitFunctionalTestTearDown()\n {\n self::$bootstrap->getSignalSlotDispatcher()->dispatch(__CLASS__, 'functionalTestTearDown');\n }", "public function after()\r\n {\r\n \r\n }", "protected function doTearDown(): void\n {\n }", "protected function doTearDown(): void\n {\n }", "public function endTestSuite(PHPUnit_Framework_TestSuite $suite) {\n\t\tarray_pop($this->current_suites);\n\t}", "public function passFinishTest(Test $test)\n {\n $this->runningTests->removeElement($test);\n }", "public function teardown()\n\t{\n\t\t// Nothing by default\n\t}", "function finalTeardown()\n {\n\n }", "public function tearDown() {\n\t\t$this->write('Cool down the engine'.\"\\n\");\n\t}", "protected function tearDown() : void {\r\n \r\n }", "function after() {}", "protected function _end()\n {\n }", "public function tearDown() {\n\t\t\n\t}", "public static function tearDownAfterClass() {}", "public function testRunFinished(TestSuite $suite, \\unittest\\TestResult $result) {\n $this->out->writef(\n \"\\033]2;%s: %d/%d run (%d skipped), %d succeeded, %d failed\\007\",\n $result->failureCount() > 0 ? 'FAIL' : 'OK',\n $result->runCount(),\n $result->count(),\n $result->skipCount(),\n $result->successCount(),\n $result->failureCount()\n );\n }", "protected function tearDown(){\r\n \r\n }", "public function end() {\n\t\t$this->_endedMicrotime = microtime ( true );\n\t\t$this->_trace = $this->setTrace();\n\t}", "protected function _end()\n {\n }", "public function after()\n\t{\n\t\t\n\t}", "protected function end()\n\t{\n\t}", "public function after()\n {\n\n }", "public function tearDown(): void\n {\n\t // Your test code goes here...\n\t // Parent call\n parent::tearDown();\n }", "public function tearDown() { }", "public function tearDown();", "public function tearDown();", "public function finishTest(Test $test): void\n\t{\n\t\t$this->result = $this->result && ($test->getResult() !== Test::Failed);\n\n\t\tforeach ($this->outputHandlers as $handler) {\n\t\t\t$handler->finish($test);\n\t\t}\n\n\t\tif ($this->tempDir) {\n\t\t\t$lastResult = &$this->lastResults[$test->getSignature()];\n\t\t\tif ($lastResult !== $test->getResult()) {\n\t\t\t\tfile_put_contents($this->getLastResultFilename($test), $lastResult = $test->getResult());\n\t\t\t}\n\t\t}\n\n\t\tif ($this->stopOnFail && $test->getResult() === Test::Failed) {\n\t\t\t$this->interrupted = true;\n\t\t}\n\t}", "protected function tearDown() {\r\n \r\n }", "protected function tearDown() {\r\n \r\n }", "protected function tearDown() {\r\n \r\n }", "protected function tearDown() {\r\n \r\n }", "protected function tearDown() {\r\n \r\n }", "protected function tearDown() {\r\n \r\n }", "protected function tearDown() {\r\n \r\n }", "protected function tearDown() {\r\n \r\n }", "public function after() {\n\t\t\n\t}", "public function teardown()\n {\n parent::teardown();\n }", "public function after()\n {\n }", "public function after()\n {\n }", "public function after()\n {\n }", "public function after()\n {\n }", "public function endTest(\\PHPUnit_Framework_Test $test, $time)\n\t{\n\n\t\t// copied from parent:endTest()\n\t\tif ($test instanceof \\PHPUnit_Framework_TestCase) {\n\t\t\t$this->numAssertions += $test->getNumAssertions();\n\t\t}\n\t\telse if ($test instanceof \\PHPUnit_Extensions_PhptTestCase) {\n\t\t\t$this->numAssertions++;\n\t\t}\n\t\t$this->lastTestFailed = false;\n\n\n\t\t// custom printing code\n\t\tif (get_class($test) == 'PHPUnit_Framework_TestSuite') {\n\t\t\t// this occurs when the test suite setup has thrown an error\n\t\t\t$this->out(\" SETUP FAIL\",'fg-red',true);\n\t\t}\n\t\telseif ($test->hasFailed()) {\n\t\t\t$this->out(\" FAIL\",'fg-red',true);\n\t\t}\n\t\telse {\n\n\t\t\t$numAssertions = ($test instanceof \\PHPUnit_Framework_TestCase) ? $test->getNumAssertions() : 1;\n\n\t\t\tif ($numAssertions > 0) {\n\t\t\t\t$this->out(' OK (' . $numAssertions . ' assertions)','fg-green',true);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->out(' SKIPPED (0 assertions)','fg-yellow',true);\n\t\t\t}\n\t\t}\n\n\n\t}", "public function tearDown()\n {\n $this->callMethods(\n array_reverse($this->annotations()->having('tearDown'))\n );\n }", "public abstract function after();", "function tearDown() {\n\t}" ]
[ "0.8308364", "0.77142924", "0.7521401", "0.7407592", "0.73565036", "0.72858536", "0.7195817", "0.71846914", "0.71846914", "0.71484387", "0.71466076", "0.71415055", "0.7116206", "0.7110185", "0.70944345", "0.7049281", "0.7048322", "0.70314544", "0.70259714", "0.70259714", "0.70158434", "0.69935334", "0.6963751", "0.6957987", "0.69532", "0.6892056", "0.6888487", "0.6870523", "0.6843683", "0.6838772", "0.6837559", "0.6821242", "0.6793237", "0.67802894", "0.6763056", "0.6757571", "0.6756431", "0.67418724", "0.67390555", "0.673692", "0.67360085", "0.6735953", "0.6732452", "0.67130303", "0.67075807", "0.67075807", "0.6702328", "0.6689966", "0.6686704", "0.66851944", "0.6667674", "0.6666848", "0.6640411", "0.6640411", "0.6634719", "0.662966", "0.6622897", "0.66030425", "0.6591399", "0.6591399", "0.6580846", "0.6579404", "0.6575005", "0.65738934", "0.65730524", "0.6555079", "0.655403", "0.65393245", "0.65372676", "0.65343225", "0.6529461", "0.65096456", "0.6505968", "0.6502854", "0.64962363", "0.6494217", "0.6490027", "0.6476901", "0.64632916", "0.643808", "0.643808", "0.64370584", "0.6436121", "0.6436121", "0.6436121", "0.6436121", "0.6436121", "0.6436121", "0.6436121", "0.6436121", "0.6434505", "0.6431013", "0.64263463", "0.64263463", "0.64263463", "0.64263463", "0.64217454", "0.6420872", "0.6411469", "0.64075637" ]
0.8383321
0
Reorder multimedia objects of a series using the current sorting attribute.
Переупорядочьте мультимедийные объекты серии с использованием текущего атрибута сортировки.
public function reorder(Series $series) { $sorting = $series->getSortingCriteria(); $mms = $this->dm ->getRepository('PumukitSchemaBundle:MultimediaObject') ->findOrderedBy($series, $sorting); $rank = 1; foreach ($mms as $mm) { $this->dm ->createQueryBuilder('PumukitSchemaBundle:MultimediaObject') ->update() ->field('rank')->set($rank++) ->field('_id')->equals($mm->getId()) ->getQuery() ->execute(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sort() {\n usort($this->records, function($a, $b) {\n return $a->sortorder - $b->sortorder; \n });\n }", "private function reorder()\n {\n /** @var RankingPosition[] $sortedArray */\n $sortedArray = $this->positions->toArray();\n uasort($sortedArray, function(RankingPosition $p1, RankingPosition $p2) {\n return $p2->compare($p1);\n });\n $index = 1;\n /** @var RankingPosition|null $previous */\n $previous = null;\n foreach ($sortedArray as $position) {\n if (null !== $previous && $position->compare($previous) === RankingPosition::COMPARISON_EQUAL) {\n $position->setNumber($previous->getNumber());\n } else {\n $position->setNumber($index);\n }\n $position->setSortIndex($index);\n $index++;\n $previous = $position;\n }\n $this->updatedAt = new DateTimeImmutable();\n }", "public abstract function gdoSortObjects();", "function reorder( $where='' )\r\r\n\t{\r\r\n\t\t$k = $this->_tbl_key;\r\r\n\r\r\n\t\tif (!in_array( 'ordering', array_keys($this->getProperties() ) ))\r\r\n\t\t{\r\r\n\t\t\t$this->setError( get_class( $this ).' does not support ordering');\r\r\n\t\t\treturn false;\r\r\n\t\t}\r\r\n\r\r\n\t\tif ($this->_tbl == '#__content_frontpage')\r\r\n\t\t{\r\r\n\t\t\t$order2 = \", content_id DESC\";\r\r\n\t\t}\r\r\n\t\telse\r\r\n\t\t{\r\r\n\t\t\t$order2 = \"\";\r\r\n\t\t}\r\r\n\r\r\n\t\t$query = 'SELECT '.$this->_tbl_key.', ordering'\r\r\n\t\t. ' FROM '. $this->_tbl\r\r\n\t\t. ' WHERE ordering >= 0' . ( $where ? ' AND '. $where : '' )\r\r\n\t\t. ' ORDER BY ordering'.$order2\r\r\n\t\t;\r\r\n\t\t$this->_db->setQuery( $query );\r\r\n\t\tif (!($orders = $this->_db->loadObjectList()))\r\r\n\t\t{\r\r\n\t\t\t$this->setError($this->_db->getErrorMsg());\r\r\n\t\t\treturn false;\r\r\n\t\t}\r\r\n\t\t// compact the ordering numbers\r\r\n\t\tfor ($i=0, $n=count( $orders ); $i < $n; $i++)\r\r\n\t\t{\r\r\n\t\t\tif ($orders[$i]->ordering >= 0)\r\r\n\t\t\t{\r\r\n\t\t\t\tif ($orders[$i]->ordering != $i+1)\r\r\n\t\t\t\t{\r\r\n\t\t\t\t\t$orders[$i]->ordering = $i+1;\r\r\n\t\t\t\t\t$query = 'UPDATE '.$this->_tbl\r\r\n\t\t\t\t\t. ' SET ordering = '. (int) $orders[$i]->ordering\r\r\n\t\t\t\t\t. ' WHERE '. $k .' = '. $this->_db->Quote($orders[$i]->$k)\r\r\n\t\t\t\t\t;\r\r\n\t\t\t\t\t$this->_db->setQuery( $query);\r\r\n\t\t\t\t\t$this->_db->query();\r\r\n\t\t\t\t}\r\r\n\t\t\t}\r\r\n\t\t}\r\r\n\r\r\n\treturn true;\r\r\n\t}", "private function reorder_items() {\n\t\t$order_of_sections = array();\n\t\t$tab_items = $this->tab_items;\n\n\t\tforeach ( $tab_items as $key => $value ) {\n\t\t\t$order_of_sections[ $key ] = (int) $value['order'];\n\t\t}\n\n\t\tif ( array_multisort( $order_of_sections, SORT_ASC, $tab_items ) ) {\n\t\t\t$this->tab_items = $tab_items;\n\t\t}\n\t}", "function sortBy($order) {\n $prev = $this->sortOrder;\n $this->sortOrder = $order;\n return $prev;\n }", "function usort_reorder_custom_elements( $a, $b ) {\n\t\t\t$orderby = ( !empty( $_REQUEST['orderby'] ) ) ? $_REQUEST['orderby'] : 'id'; //If no sort, default to date\n\t\t\t$order = ( !empty( $_REQUEST['order'] ) ) ? $_REQUEST['order'] : 'desc'; //If no order, default to desc\n\t\t\t$result = strcmp( $a->$orderby, $b->$orderby ); //Determine sort order\n\t\t\treturn ( $order==='asc' ) ? $result : -$result; //Send final sort direction to usort\n\t\t}", "public function sort() {\r\n if ($this->order != ValueListOrder::$NONE) {\r\n $this->Utils->sort(0, $this->count - 1,\r\n new CompareValueIndex(),\r\n $this->series->getValueIndexSwapper()\r\n );\r\n }\r\n }", "function my_change_sort_order($query){\n\n if(is_post_type_archive('ait-item') || is_post_type_archive('ait-review')):\n\n //If you wanted it for the archive of a custom post type use: is_post_type_archive( $post_type )\n\n //Set the order ASC or DESC\n\n $query->set( 'order', 'DSC' );\n\n //Set the orderby\n\n $query->set( 'orderby', 'post_date' );\n\n $meta_query = array(array());\n $query->set( 'meta_query', $meta_query );\n\n\n endif; \n\n}", "public function reorder(array $data);", "public function asort() {}", "public function sortGrouped();", "public function normalize() {\n\t\tusort($this->slides, function(Slide $a, Slide $b) {\n\t\t\tif ($a->get_index() > $b->get_index()) {\n\t\t\t\treturn 1;\n\t\t\t} else if ($a->get_index() < $b->get_index()) {\n\t\t\t\treturn -1;\n\t\t\t} else {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t});\n\t\tfor ($i = 0; $i < count($this->slides); $i++) {\n\t\t\t$this->slides[$i]->set_index($i);\n\t\t\t$this->slides[$i]->write();\n\t\t}\n\t}", "function re_sort()\n\t{\n\t// needed when : after deleting an item\n\t// needed when : after moving a branch to a new node\n\t\t$result = $this->db->query(\"SELECT id_pattern FROM \".$this->_table_class.\" ORDER BY weight\");\n\t\tif($result->num_rows()){\n\t\t\t$order = 0;\n\t\t\tforeach($result->result() as $row):\n\t\t\t\t$order++; \n\t\t\t\t$this->db->query(\"UPDATE \".$this->_table_class.\" SET weight='$order' WHERE id_pattern='\".$row->id_pattern.\"'\");\n\t\t\tendforeach;\n\t\t}\n\t}", "public function reorderQuestions()\n {\n $repo = new AYL_Repo_Question();\n $questions = $repo->fetchAll('module_id', $this->id);\n $questions->orderBy('order');\n\n $order = 1;\n foreach($questions as $questions) {\n $questions->order = $order;\n $questions->save();\n $order++;\n }\n }", "protected function _sort() {}", "protected function _sort()\n {\n if ($this->_orderUpdated) {\n $newOrder = array();\n $index = 0;\n \n foreach ($this->_pages as $hash => $page) {\n $pos = $page->getPosition();\n if ($pos === null) {\n $newOrder[$hash] = $index;\n $index++;\n } else {\n $newOrder[$hash] = $pos;\n }\n }\n\n asort($newOrder);\n $this->_order = $newOrder;\n $this->_orderUpdated = false;\n }\n }", "function sort() {\n #in the future\n }", "function change_sort_order($query)\n{\n if(is_archive()):\n $query->set('order','DESC');\n $query->set('orderby', 'menu_order');\n endif;\n}", "public function testReorderMetadataFieldDatasource()\n {\n // datasource is set with values in the order v2, v3, v4\n $result = self::$adminApi->reorderMetadataFieldDatasource(self::$EXTERNAL_ID_SET_3, 'value', 'asc');\n\n self::assertMetadataFieldDataSource($result);\n // ascending order means v2 is the first value\n self::assertEquals(self::$DATASOURCE_MULTIPLE[0]['value'], $result['values'][0]['value']);\n\n $result = self::$adminApi->reorderMetadataFieldDatasource(self::$EXTERNAL_ID_SET_3, 'value', 'desc');\n\n self::assertMetadataFieldDataSource($result);\n // descending order means v4 is the first value\n self::assertEquals(self::$DATASOURCE_MULTIPLE[2]['value'], $result['values'][0]['value']);\n }", "function reorderArray($contentsArray)\n{\n foreach ($contentsArray as $index => $value) {\n $valueArray = explode('\", \"', $value);\n unset($contentsArray[$index]);\n $contentsArray[$index]['title'] = substr($valueArray[0], 1);\n $contentsArray[$index]['price'] = $valueArray[1];\n $contentsArray[$index]['location'] = $valueArray[2];\n $contentsArray[$index]['description'] = $valueArray[3];\n $contentsArray[$index]['image_url'] = $valueArray[4];\n $contentsArray[$index]['method'] = $valueArray[5];\n $contentsArray[$index]['categories'] = substr($valueArray[6], 0, -1);\n }\n return $contentsArray;\n}", "public function sort() {\n\t\tusort( $this->items, array( 'AtomizerItem', 'compare' ) );\n\t}", "function sort()\n\t{\n\t\tif(is_array($this->dirs) && in_array($this->sort_by, array('name', 'mod'))) {\n\t\t\tusort($this->dirs, \"Simplex::cmp_\".$this->sort_by);\n\t\t\tif($this->sort_as == \"desc\")\n\t\t\t\t$this->dirs = array_reverse($this->dirs);\n\t\t} else {\n\t\t\tusort($this->dirs, \"Simplex::cmp_name\");\n\t\t}\n\n\t\t// Here we filter the comparison functions supported by our file object\n\t\tif(is_array($this->files) && in_array($this->sort_by, array('name', 'size', 'mod'))) {\n\t\t\tusort($this->files, \"Simplex::cmp_\".$this->sort_by);\n\t\t\tif($this->sort_as == \"desc\")\n\t\t\t\t$this->files = array_reverse($this->files);\n\t\t} else {\n\t\t\tusort($this->files, \"Simplex::cmp_name\");\n\t\t}\n\t}", "public function pi_ajax_reorder_images(){\n\t $field_id = isset( $_POST['field_id'] ) ? $_POST['field_id'] : 0;\n\t $order = isset( $_POST['order'] ) ? $_POST['order'] : 0;\n\t $post_id = isset( $_POST['post_id'] ) ? (int) $_POST['post_id'] : 0;\n\t check_ajax_referer( \"pi-reorder-images_{$field_id}\" );\n\t parse_str( $order, $items );\n\t delete_post_meta( $post_id, $field_id );\n\t foreach ( $items['item'] as $item ){\n\t add_post_meta( $post_id, $field_id, $item, false );\n\t }\n\t wp_send_json_success();\n\t}", "protected function sortDataArray() {}", "function updateorder() {\n\n $sortOrder = $this->input->post('debugStr', TRUE);\n\n\n if ($sortOrder) {\n $sortOrder = trim($sortOrder);\n $sortOrder = trim($sortOrder, ',');\n //file_put_contents('facelube.txt',serialize($sortOrder));\n $chunks = explode(',', $sortOrder);\n $counter = 1;\n foreach ($chunks as $id) {\n $data = array();\n $data['slideshow_sort_order'] = $counter;\n $this->db->where('slideshoe_image_id', intval($id));\n $this->db->update('slideshow_image', $data);\n $counter++;\n }\n }\n }", "function updateorder() {\n\n $sortOrder = $this->input->post('debugStr', TRUE);\n\n\n if ($sortOrder) {\n $sortOrder = trim($sortOrder);\n $sortOrder = trim($sortOrder, ',');\n //file_put_contents('facelube.txt',serialize($sortOrder));\n $chunks = explode(',', $sortOrder);\n $counter = 1;\n foreach ($chunks as $id) {\n $data = array();\n $data['slideshow_sort_order'] = $counter;\n $this->db->where('slideshoe_image_id', intval($id));\n $this->db->update('slideshow_image', $data);\n $counter++;\n }\n }\n }", "protected function applySort()\n {\n if (!empty($this->_detailConfig[DynaGridStore::STORE_SORT])) {\n /** @var ActiveDataProvider $dataProvider */\n $dataProvider = $this->gridOptions['dataProvider'];\n $sort = $dataProvider->getSort();\n if (!$sort instanceof Sort) {\n return;\n }\n $sort->defaultOrder = $this->_detailConfig[DynaGridStore::STORE_SORT];\n $dataProvider->setSort($sort);\n $this->gridOptions['dataProvider'] = $dataProvider;\n }\n }", "function auction_listing_ordering($args){\n\t\t$args = array(\n\t\t\t'orderby'\t=> 'meta_value',\n\t\t\t'order'\t\t=> 'DESC',\n\t\t\t'meta_key'\t=> '_yith_auction_to'\n\t\t);\n return $args;\n\t}", "function photoblog_migrate_sorting($options)\n\t{\n\t\t\n\t\t$user_id = $options['user'];\n\t\tif ( ! $user_id )\n\t\t{\n\t\t\tthrow new Exception('Sorting order can only be migrated on one user at a time. Please specify a user ID.');\n\t\t}\n\t\t\n\t\t$log = '';\n\t\t\n\t\t$category_options = array('user' => $user_id);\n\t\t$categories = photoblog_categories_fetch($category_options);\n\t\t\n\t\tforeach ( $categories as $category )\n\t\t{\n\t\t\t$photos = unserialize($category['sorted_photos']);\n\t\t\t$log .= '<h3>Doing ' . $category['name'] . '</h3>';\n\t\t\t$index = 0;\n\t\t\tforeach ( $photos as $photo )\n\t\t\t{\n\t\t\t\t$query = 'UPDATE `user_photos`';\n\t\t\t\t$query .= ' SET `sort_index` = ' . $index;\n\t\t\t\t$query .= ' WHERE `id` = ' . (int)$photo;\n\t\t\t\t$query .= ' LIMIT 1';\n\t\t\t\tmysql_query($query) or report_sql_error($query, __FILE__, __LINE__);\n\t\t\t\t$log .= $query . '<br />';\n\t\t\t\t$index++;\n\t\t\t}\n\t\t}\n\t}", "function usort_reorder( $a, $b ) {\n $orderby = ( ! empty( $_GET['orderby'] ) ) ? $_GET['orderby'] : 'post_date';\n // If no order, default to asc\n $order = ( ! empty($_GET['order'] ) ) ? $_GET['order'] : 'dsc';\n // Determine sort order\n $result = strcmp( $a[$orderby], $b[$orderby] );\n // Send final sort direction to usort\n return ( $order === 'asc' ) ? $result : -$result;\n }", "public function pi_ajax_frontend_reorder_images(){\n\t $field_id = isset( $_POST['field_id'] ) ? $_POST['field_id'] : 0;\n\t $order = isset( $_POST['order'] ) ? $_POST['order'] : 0;\n\t $post_id = isset( $_POST['post_id'] ) ? (int) $_POST['post_id'] : 0;\n\t check_ajax_referer( \"pi-reorder-images_{$field_id}\" );\n\t parse_str( $order, $items );\n\t delete_post_meta( $post_id, $field_id );\n\t foreach ( $items['item'] as $item ){\n\t add_post_meta( $post_id, $field_id, $item, false );\n\t }\n\t wp_send_json_success();\n\t}", "public function doSort();", "function mwb_wpr_usort_reorder( $cloumna,$cloumnb ){\n $orderby = (!empty($_REQUEST['orderby'])) ? $_REQUEST['orderby'] : 'id'; \n $order = (!empty($_REQUEST['order'])) ? $_REQUEST['order'] : 'desc';\n if(is_numeric($cloumna[$orderby]) && is_numeric($cloumnb[$orderby])){\n if ($cloumna[$orderby] == $cloumnb[$orderby]) {\n return 0;\n }\n elseif($cloumna[$orderby] < $cloumnb[$orderby]){\n $result = -1;\n return ($order==='asc') ? $result : -$result;\n }\n elseif($cloumna[$orderby] > $cloumnb[$orderby]){\n $result = 1;\n return ($order==='asc') ? $result : -$result;\n }\n }\n else{\n $result = strcmp($cloumna[$orderby], $cloumnb[$orderby]);\n return ($order==='asc') ? $result : -$result;\n }\n }", "function reorder_images() {\n\t\tif (!isset($_POST['data'])) die();\n\t\tlist($order, $post_id, $key, $nonce) = explode('|',$_POST['data']);\n\t\tif (!wp_verify_nonce($nonce, 'rw_ajax_reorder')) die('1');\n\t\tparse_str($order, $items);\n\t\t$items['item'] = array_unique($items['item']);\n\t\t$items = implode(',',$items['item']);\n\t\tupdate_post_meta($post_id, 'CarsGallery', $items);\t\t\t\t\t\n\t\tdie('0');\n\t}", "function dwwp_review_column_orderby( $query ) { \n if( ! is_admin() ) \n return; \n\n $orderby = $query->get( 'orderby'); \n\n if( 'event_date' == $orderby ) { \n $query->set('meta_key','movie_rating'); \n $query->set('orderbt','meta_value'); \n } \n}", "public function sort()\n {\n if (!empty($_REQUEST['Sort'])) {\n foreach ($_REQUEST['Sort'] as $id => $index) {\n\n //many many or has many\n if ($this->isManyMany()) {\n $SQL_id = Convert::raw2sql($id);\n $SQL_index = Convert::raw2sql($index);\n\n list($parentClass, $componentClass, $parentField, $componentField, $table) = $this->getRecord(\n )->many_many($this->_relationship);\n\n DB::query(\n \"UPDATE \\\"{$table}\\\" set \\\"{$this->getSortField()}\\\" = '{$SQL_index}' WHERE \\\"{$parentField}\\\" = '{$this->getRecord()->ID}' AND \\\"{$componentField}\\\" = '{$SQL_id}'\"\n );\n } else {\n if ($this->isHasMany()) { //todo: versioned?\n $SQL_id = Convert::raw2sql($id);\n $SQL_index = Convert::raw2sql($index);\n\n $table = $this->getItemClassName();\n\n DB::query(\n \"UPDATE \\\"{$table}\\\" set \\\"{$this->getSortField()}\\\" = '{$SQL_index}' WHERE ID = '{$SQL_id}'\"\n );\n }\n }\n }\n\n return ContentModuleUtilities::json_response(\n array(\n 'Status' => 1,\n 'Message' => \"{$this->_relationship} order updated\",\n )\n );\n }\n\n return ContentModuleUtilities::json_response(\n array(\n 'Status' => 0,\n 'Message' => 'Nothing to sort'\n )\n );\n }", "public function reorderAction()\n {\n $singersMapper = new Application_Model_SingerMapper();\n $songGalleriesMapper = new Application_Model_SongGalleriesMapper();\n \n $post = $this->getRequest()->getPost();\n\n $singer = $post['singerId'];\n $movedItemId = $post['songId'];\n $startPos = $post['start_pos'];\n $endPos = $post['end_pos'];\n \n $error = \"\";\n try {\n $songGalleriesMapper->reorderSingerSongs($startPos, $endPos, \n $movedItemId, $singer);\n } catch(Exception $e) {\n $error = $e->getMessage(); \n }\n\n // makes disable renderer\n $this->_helper->viewRenderer->setNoRender();\n //makes disable layout\n $this->_helper->getHelper('layout')->disableLayout();\n \n echo $error;\n }", "function usort_reorder( $a, $b ) {\r\n\t\t// If no sort, default to form_id\r\n\t\t$orderby = ( ! empty( $_GET['orderby'] ) ) ? $_GET['orderby'] : 'fid';\r\n\t\t// If no order, default to asc\r\n\t\t$order = ( ! empty($_GET['order'] ) ) ? $_GET['order'] : 'asc';\r\n\t\t// Determine sort order\r\n\t\t$result = strcmp( $a[$orderby], $b[$orderby] );\r\n\t\t// Send final sort direction to usort\r\n\t\treturn ( $order === 'asc' ) ? $result : -$result;\r\n\t}", "public function setSortmode(DataContainer $dc)\n\t{\n\t\t$pid = $this->activeRecord->id ? $this->activeRecord->pid : CURRENT_ID;\n\n\t\t$objArchive = $this->Database->prepare(\"SELECT sortmode FROM tl_gallery_archive WHERE id=?\")\n\t\t\t\t->execute($pid);\n\n\t\tif ($objArchive->numRows)\n\t\t{\n\t\t\tswitch ($objArchive->sortmode)\n\t\t\t{\n\t\t\t\tcase 'sorting':\n\t\t\t\t\t$GLOBALS['TL_DCA']['tl_gallery']['list']['sorting']['fields'] = array('sorting');\n\t\t\t\t\tunset($GLOBALS['TL_DCA']['tl_gallery']['list']['sorting']['flag']);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'date_asc':\n\t\t\t\t\t$GLOBALS['TL_DCA']['tl_gallery']['list']['sorting']['fields'] = array('date', 'title');\n\t\t\t\t\t$GLOBALS['TL_DCA']['tl_gallery']['list']['sorting']['flag'] = 8;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'title':\n\t\t\t\t\t$GLOBALS['TL_DCA']['tl_gallery']['list']['sorting']['fields'] = array('title');\n\t\t\t\t\t$GLOBALS['TL_DCA']['tl_gallery']['list']['sorting']['flag'] = 11;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'date_desc':\n\t\t\t\tdefault:\n\t\t\t\t\t$GLOBALS['TL_DCA']['tl_gallery']['list']['sorting']['fields'] = array('date DESC', 'title');\n\t\t\t\t\t$GLOBALS['TL_DCA']['tl_gallery']['list']['sorting']['flag'] = 8;\n\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\n\t}", "function sort() { }", "public function reorderPages()\n {\n $repo = new AYL_Repo_Page();\n $pages = $repo->fetchAll('module_id', $this->id);\n $pages->orderBy('order');\n\n $order = 1;\n foreach($pages as $page) {\n $page->order = $order;\n $page->save();\n $order++;\n }\n }", "public function actionResortProductOrder()\n\t{\n\t\t\n\t\t// load products in category\n\t\t$productsInCategory = ProductCategoryRef::model()->findAll('category_id=:category_id', array(':category_id'=>$_POST['category_id']));\n\t\t$orderArray = array_reverse($_POST['orderArray']);\n\t\t\n\t\t// update order\n\t\tforeach ($productsInCategory as $key => $ref) {\n\t\t\t$ref->order = array_search($ref->product_id, $orderArray)+1;\n\t\t\t$ref->save();\n\t\t}\n\t\t\n\t\techo CJSON::encode(1);\n\t\t\n\t}", "public function remove_sorts()\n\t{\n\t\t$this->_sorts = array();\n\t}", "public function actionSort()\n {\n $data = Yii::$app->request->post('data');\n\n if(!empty($data) && is_array($data)){\n foreach($data as $sort=>$id){\n\n $img = Img::findOne($id);\n\n $img->sort = $sort;\n\n $img->save();\n\n }\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->jdwkrjpeg_id, $bCtrl); // jdwkrjpeg_id\n\t\t\t$this->UpdateSort($this->pegawai_id, $bCtrl); // pegawai_id\n\t\t\t$this->UpdateSort($this->f20170101, $bCtrl); // f20170101\n\t\t\t$this->UpdateSort($this->f20170102, $bCtrl); // f20170102\n\t\t\t$this->UpdateSort($this->f20170103, $bCtrl); // f20170103\n\t\t\t$this->UpdateSort($this->f20170104, $bCtrl); // f20170104\n\t\t\t$this->UpdateSort($this->f20170105, $bCtrl); // f20170105\n\t\t\t$this->UpdateSort($this->f20170106, $bCtrl); // f20170106\n\t\t\t$this->UpdateSort($this->f20170107, $bCtrl); // f20170107\n\t\t\t$this->UpdateSort($this->f20170108, $bCtrl); // f20170108\n\t\t\t$this->UpdateSort($this->f20170109, $bCtrl); // f20170109\n\t\t\t$this->UpdateSort($this->f20170110, $bCtrl); // f20170110\n\t\t\t$this->UpdateSort($this->f20170111, $bCtrl); // f20170111\n\t\t\t$this->UpdateSort($this->f20170112, $bCtrl); // f20170112\n\t\t\t$this->UpdateSort($this->f20170113, $bCtrl); // f20170113\n\t\t\t$this->UpdateSort($this->f20170114, $bCtrl); // f20170114\n\t\t\t$this->UpdateSort($this->f20170115, $bCtrl); // f20170115\n\t\t\t$this->UpdateSort($this->f20170116, $bCtrl); // f20170116\n\t\t\t$this->UpdateSort($this->f20170117, $bCtrl); // f20170117\n\t\t\t$this->UpdateSort($this->f20170118, $bCtrl); // f20170118\n\t\t\t$this->UpdateSort($this->f20170119, $bCtrl); // f20170119\n\t\t\t$this->UpdateSort($this->f20170120, $bCtrl); // f20170120\n\t\t\t$this->UpdateSort($this->f20170121, $bCtrl); // f20170121\n\t\t\t$this->UpdateSort($this->f20170122, $bCtrl); // f20170122\n\t\t\t$this->UpdateSort($this->f20170123, $bCtrl); // f20170123\n\t\t\t$this->UpdateSort($this->f20170124, $bCtrl); // f20170124\n\t\t\t$this->UpdateSort($this->f20170125, $bCtrl); // f20170125\n\t\t\t$this->UpdateSort($this->f20170126, $bCtrl); // f20170126\n\t\t\t$this->UpdateSort($this->f20170127, $bCtrl); // f20170127\n\t\t\t$this->UpdateSort($this->f20170128, $bCtrl); // f20170128\n\t\t\t$this->UpdateSort($this->f20170129, $bCtrl); // f20170129\n\t\t\t$this->UpdateSort($this->f20170130, $bCtrl); // f20170130\n\t\t\t$this->UpdateSort($this->f20170131, $bCtrl); // f20170131\n\t\t\t$this->UpdateSort($this->f20170201, $bCtrl); // f20170201\n\t\t\t$this->UpdateSort($this->f20170202, $bCtrl); // f20170202\n\t\t\t$this->UpdateSort($this->f20170203, $bCtrl); // f20170203\n\t\t\t$this->UpdateSort($this->f20170204, $bCtrl); // f20170204\n\t\t\t$this->UpdateSort($this->f20170205, $bCtrl); // f20170205\n\t\t\t$this->UpdateSort($this->f20170206, $bCtrl); // f20170206\n\t\t\t$this->UpdateSort($this->f20170207, $bCtrl); // f20170207\n\t\t\t$this->UpdateSort($this->f20170208, $bCtrl); // f20170208\n\t\t\t$this->UpdateSort($this->f20170209, $bCtrl); // f20170209\n\t\t\t$this->UpdateSort($this->f20170210, $bCtrl); // f20170210\n\t\t\t$this->UpdateSort($this->f20170211, $bCtrl); // f20170211\n\t\t\t$this->UpdateSort($this->f20170212, $bCtrl); // f20170212\n\t\t\t$this->UpdateSort($this->f20170213, $bCtrl); // f20170213\n\t\t\t$this->UpdateSort($this->f20170214, $bCtrl); // f20170214\n\t\t\t$this->UpdateSort($this->f20170215, $bCtrl); // f20170215\n\t\t\t$this->UpdateSort($this->f20170216, $bCtrl); // f20170216\n\t\t\t$this->UpdateSort($this->f20170217, $bCtrl); // f20170217\n\t\t\t$this->UpdateSort($this->f20170218, $bCtrl); // f20170218\n\t\t\t$this->UpdateSort($this->f20170219, $bCtrl); // f20170219\n\t\t\t$this->UpdateSort($this->f20170220, $bCtrl); // f20170220\n\t\t\t$this->UpdateSort($this->f20170221, $bCtrl); // f20170221\n\t\t\t$this->UpdateSort($this->f20170222, $bCtrl); // f20170222\n\t\t\t$this->UpdateSort($this->f20170223, $bCtrl); // f20170223\n\t\t\t$this->UpdateSort($this->f20170224, $bCtrl); // f20170224\n\t\t\t$this->UpdateSort($this->f20170225, $bCtrl); // f20170225\n\t\t\t$this->UpdateSort($this->f20170226, $bCtrl); // f20170226\n\t\t\t$this->UpdateSort($this->f20170227, $bCtrl); // f20170227\n\t\t\t$this->UpdateSort($this->f20170228, $bCtrl); // f20170228\n\t\t\t$this->UpdateSort($this->f20170229, $bCtrl); // f20170229\n\t\t\t$this->UpdateSort($this->f20170301, $bCtrl); // f20170301\n\t\t\t$this->UpdateSort($this->f20170302, $bCtrl); // f20170302\n\t\t\t$this->UpdateSort($this->f20170303, $bCtrl); // f20170303\n\t\t\t$this->UpdateSort($this->f20170304, $bCtrl); // f20170304\n\t\t\t$this->UpdateSort($this->f20170305, $bCtrl); // f20170305\n\t\t\t$this->UpdateSort($this->f20170306, $bCtrl); // f20170306\n\t\t\t$this->UpdateSort($this->f20170307, $bCtrl); // f20170307\n\t\t\t$this->UpdateSort($this->f20170308, $bCtrl); // f20170308\n\t\t\t$this->UpdateSort($this->f20170309, $bCtrl); // f20170309\n\t\t\t$this->UpdateSort($this->f20170310, $bCtrl); // f20170310\n\t\t\t$this->UpdateSort($this->f20170311, $bCtrl); // f20170311\n\t\t\t$this->UpdateSort($this->f20170312, $bCtrl); // f20170312\n\t\t\t$this->UpdateSort($this->f20170313, $bCtrl); // f20170313\n\t\t\t$this->UpdateSort($this->f20170314, $bCtrl); // f20170314\n\t\t\t$this->UpdateSort($this->f20170315, $bCtrl); // f20170315\n\t\t\t$this->UpdateSort($this->f20170316, $bCtrl); // f20170316\n\t\t\t$this->UpdateSort($this->f20170317, $bCtrl); // f20170317\n\t\t\t$this->UpdateSort($this->f20170318, $bCtrl); // f20170318\n\t\t\t$this->UpdateSort($this->f20170319, $bCtrl); // f20170319\n\t\t\t$this->UpdateSort($this->f20170320, $bCtrl); // f20170320\n\t\t\t$this->UpdateSort($this->f20170321, $bCtrl); // f20170321\n\t\t\t$this->UpdateSort($this->f20170322, $bCtrl); // f20170322\n\t\t\t$this->UpdateSort($this->f20170323, $bCtrl); // f20170323\n\t\t\t$this->UpdateSort($this->f20170324, $bCtrl); // f20170324\n\t\t\t$this->UpdateSort($this->f20170325, $bCtrl); // f20170325\n\t\t\t$this->UpdateSort($this->f20170326, $bCtrl); // f20170326\n\t\t\t$this->UpdateSort($this->f20170327, $bCtrl); // f20170327\n\t\t\t$this->UpdateSort($this->f20170328, $bCtrl); // f20170328\n\t\t\t$this->UpdateSort($this->f20170329, $bCtrl); // f20170329\n\t\t\t$this->UpdateSort($this->f20170330, $bCtrl); // f20170330\n\t\t\t$this->UpdateSort($this->f20170331, $bCtrl); // f20170331\n\t\t\t$this->UpdateSort($this->f20170401, $bCtrl); // f20170401\n\t\t\t$this->UpdateSort($this->f20170402, $bCtrl); // f20170402\n\t\t\t$this->UpdateSort($this->f20170403, $bCtrl); // f20170403\n\t\t\t$this->UpdateSort($this->f20170404, $bCtrl); // f20170404\n\t\t\t$this->UpdateSort($this->f20170405, $bCtrl); // f20170405\n\t\t\t$this->UpdateSort($this->f20170406, $bCtrl); // f20170406\n\t\t\t$this->UpdateSort($this->f20170407, $bCtrl); // f20170407\n\t\t\t$this->UpdateSort($this->f20170408, $bCtrl); // f20170408\n\t\t\t$this->UpdateSort($this->f20170409, $bCtrl); // f20170409\n\t\t\t$this->UpdateSort($this->f20170410, $bCtrl); // f20170410\n\t\t\t$this->UpdateSort($this->f20170411, $bCtrl); // f20170411\n\t\t\t$this->UpdateSort($this->f20170412, $bCtrl); // f20170412\n\t\t\t$this->UpdateSort($this->f20170413, $bCtrl); // f20170413\n\t\t\t$this->UpdateSort($this->f20170414, $bCtrl); // f20170414\n\t\t\t$this->UpdateSort($this->f20170415, $bCtrl); // f20170415\n\t\t\t$this->UpdateSort($this->f20170416, $bCtrl); // f20170416\n\t\t\t$this->UpdateSort($this->f20170417, $bCtrl); // f20170417\n\t\t\t$this->UpdateSort($this->f20170418, $bCtrl); // f20170418\n\t\t\t$this->UpdateSort($this->f20170419, $bCtrl); // f20170419\n\t\t\t$this->UpdateSort($this->f20170420, $bCtrl); // f20170420\n\t\t\t$this->UpdateSort($this->f20170421, $bCtrl); // f20170421\n\t\t\t$this->UpdateSort($this->f20170422, $bCtrl); // f20170422\n\t\t\t$this->UpdateSort($this->f20170423, $bCtrl); // f20170423\n\t\t\t$this->UpdateSort($this->f20170424, $bCtrl); // f20170424\n\t\t\t$this->UpdateSort($this->f20170425, $bCtrl); // f20170425\n\t\t\t$this->UpdateSort($this->f20170426, $bCtrl); // f20170426\n\t\t\t$this->UpdateSort($this->f20170427, $bCtrl); // f20170427\n\t\t\t$this->UpdateSort($this->f20170428, $bCtrl); // f20170428\n\t\t\t$this->UpdateSort($this->f20170429, $bCtrl); // f20170429\n\t\t\t$this->UpdateSort($this->f20170430, $bCtrl); // f20170430\n\t\t\t$this->UpdateSort($this->f20170501, $bCtrl); // f20170501\n\t\t\t$this->UpdateSort($this->f20170502, $bCtrl); // f20170502\n\t\t\t$this->UpdateSort($this->f20170503, $bCtrl); // f20170503\n\t\t\t$this->UpdateSort($this->f20170504, $bCtrl); // f20170504\n\t\t\t$this->UpdateSort($this->f20170505, $bCtrl); // f20170505\n\t\t\t$this->UpdateSort($this->f20170506, $bCtrl); // f20170506\n\t\t\t$this->UpdateSort($this->f20170507, $bCtrl); // f20170507\n\t\t\t$this->UpdateSort($this->f20170508, $bCtrl); // f20170508\n\t\t\t$this->UpdateSort($this->f20170509, $bCtrl); // f20170509\n\t\t\t$this->UpdateSort($this->f20170510, $bCtrl); // f20170510\n\t\t\t$this->UpdateSort($this->f20170511, $bCtrl); // f20170511\n\t\t\t$this->UpdateSort($this->f20170512, $bCtrl); // f20170512\n\t\t\t$this->UpdateSort($this->f20170513, $bCtrl); // f20170513\n\t\t\t$this->UpdateSort($this->f20170514, $bCtrl); // f20170514\n\t\t\t$this->UpdateSort($this->f20170515, $bCtrl); // f20170515\n\t\t\t$this->UpdateSort($this->f20170516, $bCtrl); // f20170516\n\t\t\t$this->UpdateSort($this->f20170517, $bCtrl); // f20170517\n\t\t\t$this->UpdateSort($this->f20170518, $bCtrl); // f20170518\n\t\t\t$this->UpdateSort($this->f20170519, $bCtrl); // f20170519\n\t\t\t$this->UpdateSort($this->f20170520, $bCtrl); // f20170520\n\t\t\t$this->UpdateSort($this->f20170521, $bCtrl); // f20170521\n\t\t\t$this->UpdateSort($this->f20170522, $bCtrl); // f20170522\n\t\t\t$this->UpdateSort($this->f20170523, $bCtrl); // f20170523\n\t\t\t$this->UpdateSort($this->f20170524, $bCtrl); // f20170524\n\t\t\t$this->UpdateSort($this->f20170525, $bCtrl); // f20170525\n\t\t\t$this->UpdateSort($this->f20170526, $bCtrl); // f20170526\n\t\t\t$this->UpdateSort($this->f20170527, $bCtrl); // f20170527\n\t\t\t$this->UpdateSort($this->f20170528, $bCtrl); // f20170528\n\t\t\t$this->UpdateSort($this->f20170529, $bCtrl); // f20170529\n\t\t\t$this->UpdateSort($this->f20170530, $bCtrl); // f20170530\n\t\t\t$this->UpdateSort($this->f20170531, $bCtrl); // f20170531\n\t\t\t$this->UpdateSort($this->f20170601, $bCtrl); // f20170601\n\t\t\t$this->UpdateSort($this->f20170602, $bCtrl); // f20170602\n\t\t\t$this->UpdateSort($this->f20170603, $bCtrl); // f20170603\n\t\t\t$this->UpdateSort($this->f20170604, $bCtrl); // f20170604\n\t\t\t$this->UpdateSort($this->f20170605, $bCtrl); // f20170605\n\t\t\t$this->UpdateSort($this->f20170606, $bCtrl); // f20170606\n\t\t\t$this->UpdateSort($this->f20170607, $bCtrl); // f20170607\n\t\t\t$this->UpdateSort($this->f20170608, $bCtrl); // f20170608\n\t\t\t$this->UpdateSort($this->f20170609, $bCtrl); // f20170609\n\t\t\t$this->UpdateSort($this->f20170610, $bCtrl); // f20170610\n\t\t\t$this->UpdateSort($this->f20170611, $bCtrl); // f20170611\n\t\t\t$this->UpdateSort($this->f20170612, $bCtrl); // f20170612\n\t\t\t$this->UpdateSort($this->f20170613, $bCtrl); // f20170613\n\t\t\t$this->UpdateSort($this->f20170614, $bCtrl); // f20170614\n\t\t\t$this->UpdateSort($this->f20170615, $bCtrl); // f20170615\n\t\t\t$this->UpdateSort($this->f20170616, $bCtrl); // f20170616\n\t\t\t$this->UpdateSort($this->f20170617, $bCtrl); // f20170617\n\t\t\t$this->UpdateSort($this->f20170618, $bCtrl); // f20170618\n\t\t\t$this->UpdateSort($this->f20170619, $bCtrl); // f20170619\n\t\t\t$this->UpdateSort($this->f20170620, $bCtrl); // f20170620\n\t\t\t$this->UpdateSort($this->f20170621, $bCtrl); // f20170621\n\t\t\t$this->UpdateSort($this->f20170622, $bCtrl); // f20170622\n\t\t\t$this->UpdateSort($this->f20170623, $bCtrl); // f20170623\n\t\t\t$this->UpdateSort($this->f20170624, $bCtrl); // f20170624\n\t\t\t$this->UpdateSort($this->f20170625, $bCtrl); // f20170625\n\t\t\t$this->UpdateSort($this->f20170626, $bCtrl); // f20170626\n\t\t\t$this->UpdateSort($this->f20170627, $bCtrl); // f20170627\n\t\t\t$this->UpdateSort($this->f20170628, $bCtrl); // f20170628\n\t\t\t$this->UpdateSort($this->f20170629, $bCtrl); // f20170629\n\t\t\t$this->UpdateSort($this->f20170630, $bCtrl); // f20170630\n\t\t\t$this->UpdateSort($this->f20170701, $bCtrl); // f20170701\n\t\t\t$this->UpdateSort($this->f20170702, $bCtrl); // f20170702\n\t\t\t$this->UpdateSort($this->f20170703, $bCtrl); // f20170703\n\t\t\t$this->UpdateSort($this->f20170704, $bCtrl); // f20170704\n\t\t\t$this->UpdateSort($this->f20170705, $bCtrl); // f20170705\n\t\t\t$this->UpdateSort($this->f20170706, $bCtrl); // f20170706\n\t\t\t$this->UpdateSort($this->f20170707, $bCtrl); // f20170707\n\t\t\t$this->UpdateSort($this->f20170708, $bCtrl); // f20170708\n\t\t\t$this->UpdateSort($this->f20170709, $bCtrl); // f20170709\n\t\t\t$this->UpdateSort($this->f20170710, $bCtrl); // f20170710\n\t\t\t$this->UpdateSort($this->f20170711, $bCtrl); // f20170711\n\t\t\t$this->UpdateSort($this->f20170712, $bCtrl); // f20170712\n\t\t\t$this->UpdateSort($this->f20170713, $bCtrl); // f20170713\n\t\t\t$this->UpdateSort($this->f20170714, $bCtrl); // f20170714\n\t\t\t$this->UpdateSort($this->f20170715, $bCtrl); // f20170715\n\t\t\t$this->UpdateSort($this->f20170716, $bCtrl); // f20170716\n\t\t\t$this->UpdateSort($this->f20170717, $bCtrl); // f20170717\n\t\t\t$this->UpdateSort($this->f20170718, $bCtrl); // f20170718\n\t\t\t$this->UpdateSort($this->f20170719, $bCtrl); // f20170719\n\t\t\t$this->UpdateSort($this->f20170720, $bCtrl); // f20170720\n\t\t\t$this->UpdateSort($this->f20170721, $bCtrl); // f20170721\n\t\t\t$this->UpdateSort($this->f20170722, $bCtrl); // f20170722\n\t\t\t$this->UpdateSort($this->f20170723, $bCtrl); // f20170723\n\t\t\t$this->UpdateSort($this->f20170724, $bCtrl); // f20170724\n\t\t\t$this->UpdateSort($this->f20170725, $bCtrl); // f20170725\n\t\t\t$this->UpdateSort($this->f20170726, $bCtrl); // f20170726\n\t\t\t$this->UpdateSort($this->f20170727, $bCtrl); // f20170727\n\t\t\t$this->UpdateSort($this->f20170728, $bCtrl); // f20170728\n\t\t\t$this->UpdateSort($this->f20170729, $bCtrl); // f20170729\n\t\t\t$this->UpdateSort($this->f20170730, $bCtrl); // f20170730\n\t\t\t$this->UpdateSort($this->f20170731, $bCtrl); // f20170731\n\t\t\t$this->UpdateSort($this->f20170801, $bCtrl); // f20170801\n\t\t\t$this->UpdateSort($this->f20170802, $bCtrl); // f20170802\n\t\t\t$this->UpdateSort($this->f20170803, $bCtrl); // f20170803\n\t\t\t$this->UpdateSort($this->f20170804, $bCtrl); // f20170804\n\t\t\t$this->UpdateSort($this->f20170805, $bCtrl); // f20170805\n\t\t\t$this->UpdateSort($this->f20170806, $bCtrl); // f20170806\n\t\t\t$this->UpdateSort($this->f20170807, $bCtrl); // f20170807\n\t\t\t$this->UpdateSort($this->f20170808, $bCtrl); // f20170808\n\t\t\t$this->UpdateSort($this->f20170809, $bCtrl); // f20170809\n\t\t\t$this->UpdateSort($this->f20170810, $bCtrl); // f20170810\n\t\t\t$this->UpdateSort($this->f20170811, $bCtrl); // f20170811\n\t\t\t$this->UpdateSort($this->f20170812, $bCtrl); // f20170812\n\t\t\t$this->UpdateSort($this->f20170813, $bCtrl); // f20170813\n\t\t\t$this->UpdateSort($this->f20170814, $bCtrl); // f20170814\n\t\t\t$this->UpdateSort($this->f20170815, $bCtrl); // f20170815\n\t\t\t$this->UpdateSort($this->f20170816, $bCtrl); // f20170816\n\t\t\t$this->UpdateSort($this->f20170817, $bCtrl); // f20170817\n\t\t\t$this->UpdateSort($this->f20170818, $bCtrl); // f20170818\n\t\t\t$this->UpdateSort($this->f20170819, $bCtrl); // f20170819\n\t\t\t$this->UpdateSort($this->f20170820, $bCtrl); // f20170820\n\t\t\t$this->UpdateSort($this->f20170821, $bCtrl); // f20170821\n\t\t\t$this->UpdateSort($this->f20170822, $bCtrl); // f20170822\n\t\t\t$this->UpdateSort($this->f20170823, $bCtrl); // f20170823\n\t\t\t$this->UpdateSort($this->f20170824, $bCtrl); // f20170824\n\t\t\t$this->UpdateSort($this->f20170825, $bCtrl); // f20170825\n\t\t\t$this->UpdateSort($this->f20170826, $bCtrl); // f20170826\n\t\t\t$this->UpdateSort($this->f20170827, $bCtrl); // f20170827\n\t\t\t$this->UpdateSort($this->f20170828, $bCtrl); // f20170828\n\t\t\t$this->UpdateSort($this->f20170829, $bCtrl); // f20170829\n\t\t\t$this->UpdateSort($this->f20170830, $bCtrl); // f20170830\n\t\t\t$this->UpdateSort($this->f20170831, $bCtrl); // f20170831\n\t\t\t$this->UpdateSort($this->f20170901, $bCtrl); // f20170901\n\t\t\t$this->UpdateSort($this->f20170902, $bCtrl); // f20170902\n\t\t\t$this->UpdateSort($this->f20170903, $bCtrl); // f20170903\n\t\t\t$this->UpdateSort($this->f20170904, $bCtrl); // f20170904\n\t\t\t$this->UpdateSort($this->f20170905, $bCtrl); // f20170905\n\t\t\t$this->UpdateSort($this->f20170906, $bCtrl); // f20170906\n\t\t\t$this->UpdateSort($this->f20170907, $bCtrl); // f20170907\n\t\t\t$this->UpdateSort($this->f20170908, $bCtrl); // f20170908\n\t\t\t$this->UpdateSort($this->f20170909, $bCtrl); // f20170909\n\t\t\t$this->UpdateSort($this->f20170910, $bCtrl); // f20170910\n\t\t\t$this->UpdateSort($this->f20170911, $bCtrl); // f20170911\n\t\t\t$this->UpdateSort($this->f20170912, $bCtrl); // f20170912\n\t\t\t$this->UpdateSort($this->f20170913, $bCtrl); // f20170913\n\t\t\t$this->UpdateSort($this->f20170914, $bCtrl); // f20170914\n\t\t\t$this->UpdateSort($this->f20170915, $bCtrl); // f20170915\n\t\t\t$this->UpdateSort($this->f20170916, $bCtrl); // f20170916\n\t\t\t$this->UpdateSort($this->f20170917, $bCtrl); // f20170917\n\t\t\t$this->UpdateSort($this->f20170918, $bCtrl); // f20170918\n\t\t\t$this->UpdateSort($this->f20170919, $bCtrl); // f20170919\n\t\t\t$this->UpdateSort($this->f20170920, $bCtrl); // f20170920\n\t\t\t$this->UpdateSort($this->f20170921, $bCtrl); // f20170921\n\t\t\t$this->UpdateSort($this->f20170922, $bCtrl); // f20170922\n\t\t\t$this->UpdateSort($this->f20170923, $bCtrl); // f20170923\n\t\t\t$this->UpdateSort($this->f20170924, $bCtrl); // f20170924\n\t\t\t$this->UpdateSort($this->f20170925, $bCtrl); // f20170925\n\t\t\t$this->UpdateSort($this->f20170926, $bCtrl); // f20170926\n\t\t\t$this->UpdateSort($this->f20170927, $bCtrl); // f20170927\n\t\t\t$this->UpdateSort($this->f20170928, $bCtrl); // f20170928\n\t\t\t$this->UpdateSort($this->f20170929, $bCtrl); // f20170929\n\t\t\t$this->UpdateSort($this->f20170930, $bCtrl); // f20170930\n\t\t\t$this->UpdateSort($this->f20171001, $bCtrl); // f20171001\n\t\t\t$this->UpdateSort($this->f20171002, $bCtrl); // f20171002\n\t\t\t$this->UpdateSort($this->f20171003, $bCtrl); // f20171003\n\t\t\t$this->UpdateSort($this->f20171004, $bCtrl); // f20171004\n\t\t\t$this->UpdateSort($this->f20171005, $bCtrl); // f20171005\n\t\t\t$this->UpdateSort($this->f20171006, $bCtrl); // f20171006\n\t\t\t$this->UpdateSort($this->f20171007, $bCtrl); // f20171007\n\t\t\t$this->UpdateSort($this->f20171008, $bCtrl); // f20171008\n\t\t\t$this->UpdateSort($this->f20171009, $bCtrl); // f20171009\n\t\t\t$this->UpdateSort($this->f20171010, $bCtrl); // f20171010\n\t\t\t$this->UpdateSort($this->f20171011, $bCtrl); // f20171011\n\t\t\t$this->UpdateSort($this->f20171012, $bCtrl); // f20171012\n\t\t\t$this->UpdateSort($this->f20171013, $bCtrl); // f20171013\n\t\t\t$this->UpdateSort($this->f20171014, $bCtrl); // f20171014\n\t\t\t$this->UpdateSort($this->f20171015, $bCtrl); // f20171015\n\t\t\t$this->UpdateSort($this->f20171016, $bCtrl); // f20171016\n\t\t\t$this->UpdateSort($this->f20171017, $bCtrl); // f20171017\n\t\t\t$this->UpdateSort($this->f20171018, $bCtrl); // f20171018\n\t\t\t$this->UpdateSort($this->f20171019, $bCtrl); // f20171019\n\t\t\t$this->UpdateSort($this->f20171020, $bCtrl); // f20171020\n\t\t\t$this->UpdateSort($this->f20171021, $bCtrl); // f20171021\n\t\t\t$this->UpdateSort($this->f20171022, $bCtrl); // f20171022\n\t\t\t$this->UpdateSort($this->f20171023, $bCtrl); // f20171023\n\t\t\t$this->UpdateSort($this->f20171024, $bCtrl); // f20171024\n\t\t\t$this->UpdateSort($this->f20171025, $bCtrl); // f20171025\n\t\t\t$this->UpdateSort($this->f20171026, $bCtrl); // f20171026\n\t\t\t$this->UpdateSort($this->f20171027, $bCtrl); // f20171027\n\t\t\t$this->UpdateSort($this->f20171028, $bCtrl); // f20171028\n\t\t\t$this->UpdateSort($this->f20171029, $bCtrl); // f20171029\n\t\t\t$this->UpdateSort($this->f20171030, $bCtrl); // f20171030\n\t\t\t$this->UpdateSort($this->f20171031, $bCtrl); // f20171031\n\t\t\t$this->UpdateSort($this->f20171101, $bCtrl); // f20171101\n\t\t\t$this->UpdateSort($this->f20171102, $bCtrl); // f20171102\n\t\t\t$this->UpdateSort($this->f20171103, $bCtrl); // f20171103\n\t\t\t$this->UpdateSort($this->f20171104, $bCtrl); // f20171104\n\t\t\t$this->UpdateSort($this->f20171105, $bCtrl); // f20171105\n\t\t\t$this->UpdateSort($this->f20171106, $bCtrl); // f20171106\n\t\t\t$this->UpdateSort($this->f20171107, $bCtrl); // f20171107\n\t\t\t$this->UpdateSort($this->f20171108, $bCtrl); // f20171108\n\t\t\t$this->UpdateSort($this->f20171109, $bCtrl); // f20171109\n\t\t\t$this->UpdateSort($this->f20171110, $bCtrl); // f20171110\n\t\t\t$this->UpdateSort($this->f20171111, $bCtrl); // f20171111\n\t\t\t$this->UpdateSort($this->f20171112, $bCtrl); // f20171112\n\t\t\t$this->UpdateSort($this->f20171113, $bCtrl); // f20171113\n\t\t\t$this->UpdateSort($this->f20171114, $bCtrl); // f20171114\n\t\t\t$this->UpdateSort($this->f20171115, $bCtrl); // f20171115\n\t\t\t$this->UpdateSort($this->f20171116, $bCtrl); // f20171116\n\t\t\t$this->UpdateSort($this->f20171117, $bCtrl); // f20171117\n\t\t\t$this->UpdateSort($this->f20171118, $bCtrl); // f20171118\n\t\t\t$this->UpdateSort($this->f20171119, $bCtrl); // f20171119\n\t\t\t$this->UpdateSort($this->f20171120, $bCtrl); // f20171120\n\t\t\t$this->UpdateSort($this->f20171121, $bCtrl); // f20171121\n\t\t\t$this->UpdateSort($this->f20171122, $bCtrl); // f20171122\n\t\t\t$this->UpdateSort($this->f20171123, $bCtrl); // f20171123\n\t\t\t$this->UpdateSort($this->f20171124, $bCtrl); // f20171124\n\t\t\t$this->UpdateSort($this->f20171125, $bCtrl); // f20171125\n\t\t\t$this->UpdateSort($this->f20171126, $bCtrl); // f20171126\n\t\t\t$this->UpdateSort($this->f20171127, $bCtrl); // f20171127\n\t\t\t$this->UpdateSort($this->f20171128, $bCtrl); // f20171128\n\t\t\t$this->UpdateSort($this->f20171129, $bCtrl); // f20171129\n\t\t\t$this->UpdateSort($this->f20171130, $bCtrl); // f20171130\n\t\t\t$this->UpdateSort($this->f20171201, $bCtrl); // f20171201\n\t\t\t$this->UpdateSort($this->f20171202, $bCtrl); // f20171202\n\t\t\t$this->UpdateSort($this->f20171203, $bCtrl); // f20171203\n\t\t\t$this->UpdateSort($this->f20171204, $bCtrl); // f20171204\n\t\t\t$this->UpdateSort($this->f20171205, $bCtrl); // f20171205\n\t\t\t$this->UpdateSort($this->f20171206, $bCtrl); // f20171206\n\t\t\t$this->UpdateSort($this->f20171207, $bCtrl); // f20171207\n\t\t\t$this->UpdateSort($this->f20171208, $bCtrl); // f20171208\n\t\t\t$this->UpdateSort($this->f20171209, $bCtrl); // f20171209\n\t\t\t$this->UpdateSort($this->f20171210, $bCtrl); // f20171210\n\t\t\t$this->UpdateSort($this->f20171211, $bCtrl); // f20171211\n\t\t\t$this->UpdateSort($this->f20171212, $bCtrl); // f20171212\n\t\t\t$this->UpdateSort($this->f20171213, $bCtrl); // f20171213\n\t\t\t$this->UpdateSort($this->f20171214, $bCtrl); // f20171214\n\t\t\t$this->UpdateSort($this->f20171215, $bCtrl); // f20171215\n\t\t\t$this->UpdateSort($this->f20171216, $bCtrl); // f20171216\n\t\t\t$this->UpdateSort($this->f20171217, $bCtrl); // f20171217\n\t\t\t$this->UpdateSort($this->f20171218, $bCtrl); // f20171218\n\t\t\t$this->UpdateSort($this->f20171219, $bCtrl); // f20171219\n\t\t\t$this->UpdateSort($this->f20171220, $bCtrl); // f20171220\n\t\t\t$this->UpdateSort($this->f20171221, $bCtrl); // f20171221\n\t\t\t$this->UpdateSort($this->f20171222, $bCtrl); // f20171222\n\t\t\t$this->UpdateSort($this->f20171223, $bCtrl); // f20171223\n\t\t\t$this->UpdateSort($this->f20171224, $bCtrl); // f20171224\n\t\t\t$this->UpdateSort($this->f20171225, $bCtrl); // f20171225\n\t\t\t$this->UpdateSort($this->f20171226, $bCtrl); // f20171226\n\t\t\t$this->UpdateSort($this->f20171227, $bCtrl); // f20171227\n\t\t\t$this->UpdateSort($this->f20171228, $bCtrl); // f20171228\n\t\t\t$this->UpdateSort($this->f20171229, $bCtrl); // f20171229\n\t\t\t$this->UpdateSort($this->f20171230, $bCtrl); // f20171230\n\t\t\t$this->UpdateSort($this->f20171231, $bCtrl); // f20171231\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "private function reorder() {\n $new = array();\n $key = 0;\n foreach($this->hand as $c) {\n $new[$key] = $c;\n $key++;\n }\n $this->hand = $new;\n }", "function bookcrossing_catalog_sort_by_genre($mode, $limit = 30)\n\n{\n\n $query = db_select('bookcrossing_books', 'b');\n\n $query->innerJoin('field_data_field_bookcrossing_genre', 'a', 'b.nid = a.entity_id');\n\n $query->innerJoin('taxonomy_term_data', 't', 'a.field_bookcrossing_genre_tid = t.tid');\n\n\n\n if ($mode == 'covers') {\n\n $query->distinct();\n\n }\n\n\n\n $query->fields('b', array('bid'));\n\n $query->condition('b.status', BOOKCROSSING_BOOK_STATUS_RESERVED, '<>');\n\n $query->addExpression('LOWER(LEFT(t.name, 1))', 'letter');\n\n\n\n $query = $query->extend('PagerDefault');\n\n if ($limit !== FALSE) {\n\n $query = $query->limit($limit);\n\n }\n\n\n\n//if ($mode == 'tile') {\n\n //$query->groupBy('concat(b.bid, t.name)');\n\n//}\n\n\n\n $query->orderBy(\"if(t.name regexp '^[а-яА-Я]', concat('1', t.name), t.name)\");\n\n //$query->orderBy(\"if(t.name regexp '^[а-яА-Я]', concat('a', t.name), t.name)\");\n\n $info = $query->execute()->fetchAll();\n\n\n\n $bids = array();\n\n $_SESSION['letters'] = array();\n\n\n\n foreach ($info as $bid) {\n\n $_SESSION['letters'][$bid->letter] = $bid->letter;\n\n $bids[] = $bid->bid;\n\n }\n\n\n\n $books = array();\n\n foreach ($bids as $bid) {\n\n $books[] = bookcrossing_load($bid);\n\n }\n\n\n\n return $books;\n\n}", "public function returnOrdering( $session )\n\t{\n\t\t$session['config_data']['sortorder']\t= $session['config_data']['sortorder'] ? $session['config_data']['sortorder'] : 'desc';\n\t\t$session['config_data']['offset_start']\t= $session['config_data']['offset_start'] ? $session['config_data']['offset_start'] : 0;\n\t\t$session['config_data']['offset_end']\t= $session['config_data']['offset_end'] ? $session['config_data']['offset_end'] : 10;\n\n\t\t$filters\t= array();\n\n\t\tswitch( $session['config_data']['content_type'] )\n\t\t{\n\t\t\tcase 'entries':\n\t\t\tdefault:\n\t\t\t\t$session['config_data']['sortby']\t= $session['config_data']['sortby'] ? $session['config_data']['sortby'] : 'submitted';\n\n\t\t\t\t$sortby\t= array( \n\t\t\t\t\t\t\t\tarray( 'name', $this->lang->words['sort_bloge__title'] ), \n\t\t\t\t\t\t\t\tarray( 'trackbacks', $this->lang->words['sort_bloge__trackbacks'] ), \n\t\t\t\t\t\t\t\tarray( 'submitted', $this->lang->words['sort_bloge__submitted'] ),\n\t\t\t\t\t\t\t\tarray( 'comments', $this->lang->words['sort_bloge__comments'] ),\n\t\t\t\t\t\t\t\tarray( 'lastcomment', $this->lang->words['sort_bloge__lastcomment'] ),\n\t\t\t\t\t\t\t\tarray( 'rand', $this->lang->words['sort_generic__rand'] )\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t$filters[]\t= array(\n\t\t\t\t\t\t\t\t\t'label'\t\t\t=> $this->lang->words['feed_sort_by'],\n\t\t\t\t\t\t\t\t\t'description'\t=> $this->lang->words['feed_sort_by_desc'],\n\t\t\t\t\t\t\t\t\t'field'\t\t\t=> $this->registry->output->formDropdown( 'sortby', $sortby, $session['config_data']['sortby'] ),\n\t\t\t\t\t\t\t\t\t);\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'comments':\n\t\t\t\t$session['config_data']['sortby']\t= $session['config_data']['sortby'] ? $session['config_data']['sortby'] : 'post_date';\n\n\t\t\t\t$sortby\t= array( \n\t\t\t\t\t\t\t\tarray( 'post_date', $this->lang->words['sort_blogc__postdate'] ), \n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t$filters[]\t= array(\n\t\t\t\t\t\t\t\t\t'label'\t\t\t=> $this->lang->words['feed_sort_by'],\n\t\t\t\t\t\t\t\t\t'description'\t=> $this->lang->words['feed_sort_by_desc'],\n\t\t\t\t\t\t\t\t\t'field'\t\t\t=> $this->registry->output->formDropdown( 'sortby', $sortby, $session['config_data']['sortby'] ),\n\t\t\t\t\t\t\t\t\t);\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'blogs':\n\t\t\t\t$session['config_data']['sortby']\t= $session['config_data']['sortby'] ? $session['config_data']['sortby'] : 'position';\n\n\t\t\t\t$sortby\t= array( \n\t\t\t\t\t\t\t\tarray( 'name', $this->lang->words['sort_blog__name'] ), \n\t\t\t\t\t\t\t\tarray( 'entries', $this->lang->words['sort_blog__entries'] ), \n\t\t\t\t\t\t\t\tarray( 'last_entry', $this->lang->words['sort_blog__lastdate'] ),\n\t\t\t\t\t\t\t\tarray( 'views', $this->lang->words['sort_blog__views'] ),\n\t\t\t\t\t\t\t\tarray( 'pinned', $this->lang->words['sort_blog__pinned'] ),\n\t\t\t\t\t\t\t\tarray( 'rate', $this->lang->words['sort_bloge__rate'] ),\n\t\t\t\t\t\t\t\tarray( 'rand', $this->lang->words['sort_generic__rand'] )\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t$filters[]\t= array(\n\t\t\t\t\t\t\t\t\t'label'\t\t\t=> $this->lang->words['feed_sort_by'],\n\t\t\t\t\t\t\t\t\t'description'\t=> $this->lang->words['feed_sort_by_desc'],\n\t\t\t\t\t\t\t\t\t'field'\t\t\t=> $this->registry->output->formDropdown( 'sortby', $sortby, $session['config_data']['sortby'] ),\n\t\t\t\t\t\t\t\t\t);\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\t$filters[]\t= array(\n\t\t\t\t\t\t\t'label'\t\t\t=> $this->lang->words['feed_order_direction'],\n\t\t\t\t\t\t\t'description'\t=> $this->lang->words['feed_order_direction_desc'],\n\t\t\t\t\t\t\t'field'\t\t\t=> $this->registry->output->formDropdown( 'sortorder', array( array( 'desc', 'DESC' ), array( 'asc', 'ASC' ) ), $session['config_data']['sortorder'] ),\n\t\t\t\t\t\t\t);\n\n\t\t$filters[]\t= array(\n\t\t\t\t\t\t\t'label'\t\t\t=> $this->lang->words['feed_limit_offset_start'],\n\t\t\t\t\t\t\t'description'\t=> $this->lang->words['feed_limit_offset_start_desc'],\n\t\t\t\t\t\t\t'field'\t\t\t=> $this->registry->output->formInput( 'offset_start', $session['config_data']['offset_start'] ),\n\t\t\t\t\t\t\t);\n\n\t\t$filters[]\t= array(\n\t\t\t\t\t\t\t'label'\t\t\t=> $this->lang->words['feed_limit_offset_end'],\n\t\t\t\t\t\t\t'description'\t=> $this->lang->words['feed_limit_offset_end_desc'],\n\t\t\t\t\t\t\t'field'\t\t\t=> $this->registry->output->formInput( 'offset_end', $session['config_data']['offset_end'] ),\n\t\t\t\t\t\t\t);\n\t\t\n\t\treturn $filters;\n\t}", "public function setOrder($attribute, $dir = self::SORT_ORDER_ASC)\n {\n if ($attribute == 'position') {\n return $this->setPositionOrder($dir);\n } elseif ($attribute == 'attribute_set_id') {\n return $this->setAttributeSetIdOrder($dir);\n }\n return parent::setOrder($attribute, $dir);\n }", "protected static function distribute_policy_document_sortorder() {\n global $DB;\n\n $sql = \"SELECT p.id, p.sortorder, MAX(v.timecreated) AS timerecentcreated\n FROM {tool_policy} p\n LEFT JOIN {tool_policy_versions} v ON v.policyid = p.id\n GROUP BY p.id, p.sortorder\n ORDER BY p.sortorder ASC, timerecentcreated ASC\";\n\n $rs = $DB->get_recordset_sql($sql);\n $sortorder = 10;\n\n foreach ($rs as $record) {\n if ($record->sortorder != $sortorder) {\n $DB->set_field('tool_policy', 'sortorder', $sortorder, ['id' => $record->id]);\n }\n $sortorder = $sortorder + 2;\n }\n\n $rs->close();\n }", "function cgalleries_order()\n\t{\n\t\tlusers_require('galleries/order');\n\n\t\t$post_data = linput_post();\n\t\t$order = $post_data['order'];\n\n\t\t$order = split('\\|', $order);\n\n\t\tfor ($i = 0; $i < count($order); $i++)\n\t\t{\n\t\t\tlcrud_update(lconf_get('lang') . '_images', array('id' => $order[$i]), array('orderid' => $i));\n\t\t}\n\n\t\tlcache_delete_all();\n\t}", "public function sort();", "public function sort();", "function orderByCategory($a, $b) {\n if ($a->group < $b->group)\n return -1;\n elseif ($a->group > $b->group)\n return 1;\n else\n return 0;\n}", "function woocommerce_catalog_ordering()\n {\n }", "public function reorder($ids) {\n $this->getApi()->executeMethod(\n 'flickr.photosets.orderSets',\n array('photoset_ids' => implode(',', $ids))\n );\n // update the cashed xml after the changes\n $this->refresh();\n }", "function masvideos_attribute_orderby( $post_type, $name ) {\n global $masvideos_attributes, $wpdb;\n\n $name = str_replace( $post_type . '_', '', sanitize_title( $name ) );\n\n if ( isset( $masvideos_attributes[ $post_type . '_' . $name ] ) ) {\n $orderby = $masvideos_attributes[ $post_type . '_' . $name ]->attribute_orderby;\n } else {\n $orderby = $wpdb->get_var( $wpdb->prepare( \"SELECT attribute_orderby FROM {$wpdb->prefix}masvideos_attribute_taxonomies WHERE post_type = %s AND attribute_name = %s;\", $post_type, $name ) );\n }\n\n return apply_filters( 'masvideos_attribute_orderby', $orderby, $name );\n}", "function OrderBy();", "public function arrange($order)\n {\n $orders = [];\n $i = 0;\n foreach ($order as $k => $v) {\n if (!$v) {\n $order[$k] = $k;\n }\n $orders[] = $order[$k];\n $i++;\n }\n sort($orders);\n $i = 0;\n $res = [];\n foreach ($order as $k => $v) {\n $res[$k] = $orders[$i];\n\n /** @var GalleryImage $instance */\n $instance = Yii::createObject(GalleryImage::class);\n $instance::updateAll(['rank' => $orders[$i]], ['id' => $k]);\n\n $i++;\n }\n\n return $order;\n }", "public function sortBy($column);", "protected function apply_sorts($object=null)\n\t{\n\t\tif($object==null){\n\t\t\t$object = $this;\n\t\t}\n\t\t\n\t\tforeach($this->_sorts as $column => $direction){\n\t\t\tif(strpos($column,'.')>-1){\n\t\t\t\t$column = $column;\n\t\t\t} elseif(strpos($column,':')>-1){\n\t\t\t\t$parts = explode(':',$column);\n\t\t\t\t$column = $parts[1];\n\t\t\t} else {\n\t\t\t\tif(is_callable(array($object,'object_name'))){\n\t\t\t\t\t$column = $object->object_name().'.'.$column;\n\t\t\t\t} else {\n\t\t\t\t\t$column = $this->_object_name.'.'.$column;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t\t$object->order_by($column,$direction);\n\n\t\t}\n\t\treturn $object;\n\t}", "public function sort($sortable);", "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->model_id); // model_id\n\t\t\t$this->UpdateSort($this->model_name); // model_name\n\t\t\t$this->UpdateSort($this->model_logo); // model_logo\n\t\t\t$this->UpdateSort($this->model_year); // model_year\n\t\t\t$this->UpdateSort($this->icon_menu); // icon_menu\n\t\t\t$this->UpdateSort($this->thumbnail); // thumbnail\n\t\t\t$this->UpdateSort($this->full_image); // full_image\n\t\t\t$this->UpdateSort($this->youtube_url); // youtube_url\n\t\t\t$this->UpdateSort($this->category_id); // category_id\n\t\t\t$this->UpdateSort($this->status); // status\n\t\t\t$this->UpdateSort($this->m_order); // m_order\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "public function setPromotionSortOrder(): void\n {\n //ToDo implement promotion logic in Magento\n parent::setPromotionSortOrder(false);\n }", "public function actionResort()\n\t{\n\t\t// Yii::log(CVarDumper::DumpAsString($_POST));\n\t\t\n\t\tif(isset($_POST['idOrder'])){\n\t\t\t$categories = Category::model()->findAll('id='.implode(' OR id=', $_POST['idOrder']));\n\t\t\tforeach ($categories as $key => $category) {\n\t\t\t\t$key = array_search($category->id, $_POST['idOrder']);\n\n\t\t\t\t$category->parent_id = $_POST['parent_id'];\n\t\t\t\t$category->sort_order = $key+1;\n\t\t\t\t$category->save();\n\t\t\t}\n\t\t}\n\t\t\n\t\techo CJSON::encode(1);\n\t}", "function unity3_slide_order_change($posts) {\n\t\treset($posts);\n\t\t$post_id = key($posts);\n\n\t\tif ($slider_id = $this->maybeGetSliderID($post_id)) {\n\t\t\tN2Loader::import(array( 'models.Sliders', 'models.Slides' ), 'smartslider');\n\t\t\tglobal $wpdb;\n\t\t\t$slider_refs = $wpdb->get_results(\n\t\t\t\t$wpdb->prepare(\n\t\t\t\t\t\"SELECT DISTINCT pm.post_id, pm.meta_value \n\t\t\t\t FROM {$wpdb->postmeta} pm\n\t\t\t\t LEFT JOIN {$wpdb->posts} p \n\t\t\t\t ON p.ID = pm.post_id\n\t\t\t\t WHERE pm.meta_key = '%s'\n\t\t\t\t AND p.post_type = '%s'\",\n\t\t\t\t$this->ID(),\n\t\t\t\t\tUnity3_Slides::ID\n\t\t\t\t), ARRAY_A\n\t\t\t);\n\n\t\t\tasort($posts);\n\t\t\tforeach ($slider_refs as $index => $row) {\n\t\t\t\t$posts[(int)$row['post_id']] = $row['meta_value'];\n\t\t\t}\n\n\t\t\t$slidesModel = new N2SmartsliderSlidesModel();\n\t\t\t$slidesModel->order((int)$slider_id, array_values($posts) );\n\t\t}\n\t}", "public function reverseOrder(){\n\t\t\t$this->videos = array_reverse($this->videos);\n\t\t}", "function afa_woocommerce_catalog_orderby( $orderby ) {\n unset($orderby[\"popularity\"]);\n unset($orderby[\"bid_asc\"]);\n unset($orderby[\"bid_desc\"]);\n unset($orderby[\"auction_end\"]);\n unset($orderby[\"auction_started\"]);\n unset($orderby[\"auction_activity\"]);\n return $orderby;\n}", "function reorder($stepNumber,$stepId,$newOrder) {\n\tglobal $recordCount, $row, $Recordset;\n\techo \"stepNumber = \" . $stepNumber . \", Id = \" . $stepId . \", NewOrder = \" . $newOrder . \"\\n<br />\";\n\tfor ($i=0;$i<$recordCount;$i++) {\n\t\techo \"Id = \" . $row['Id']. \", Order = \" . $row['SortOrder'] . \"\\n<br />\"; \n\t\t// we are moving the Step forward at the beggining of the list, so increment everything before it up to where it was in the list\n\t\tif ($stepNumber > $newOrder && $row['SortOrder'] >= $newOrder) {\n\t\t\t// stop when we get to the place where it was originally in the list \n\t\t\tif ($row['SortOrder'] >= $stepNumber)\n\t\t\t\tbreak;\n\t\t\tif ($row['Id'] != $stepId) {\t// if we are at the step we are repositioning don't update it \n\t\t\t\t$newSortOrder = $row['SortOrder'] + 1;\n\t\t\t\techo '$row[\\'SortOrder\\'] >= $newOrder' . \"\\n<br />\";\n\t\t\t\tpushUpdate($row['Id'],$newSortOrder);\n\t\t\t}\n\t\t} \t\n\t\tif ($row['Id'] == $stepId) {\n\t\t\t$newSortOrder = $newOrder;\n\t\t\tpushUpdate($row['Id'],$newSortOrder);\n\t\t\techo '$row[\\'Id\\'] == $stepId' . \"\\n<br />\";\n\t\t} else\n\t\t// we are moving beyond the existing item\n\t\tif ($row['SortOrder'] > $stepNumber && $newOrder > $stepNumber) {\n\t\t\tif ($row['SortOrder'] > $newOrder)\t// if we find a record greater than the new step number we can stop decrementing record numbers\n\t\t\t\tbreak;\n\t\t\techo '$row[\\'SortOrder\\'] > $stepNumber' . \"\\n<br />\";\n\t\t\t$newSortOrder = $row['SortOrder'] - 1;\n\t\t\tpushUpdate($row['Id'],$newSortOrder);\n\t\t}\n\t\t$row = mysql_fetch_assoc($Recordset);\n\t}\n\trunCommands();\n}", "function reorder()\n\t{\n\t\t// delta is the difference in position (1 = next node, -1 = previous node)\n\t\t\n\t\t$node = intval($this->params['form']['node']);\n\t\t$delta = intval($this->params['form']['delta']);\n\t\t\n\t\tif ($delta > 0) {\n\t\t\t$this->Category->movedown($node, abs($delta));\n\t\t} elseif ($delta < 0) {\n\t\t\t$this->Category->moveup($node, abs($delta));\n\t\t}\n\t\t\n\t\t// send success response\n\t\texit('1');\n\t\t\n\t}", "public function setSortOrder($order);", "public function sort($data);", "protected function _getSorting()\n {\n $sOrder = '';\n if (oxRegistry::getConfig()->getRequestParameter('synchoxid')) {\n $sOrder = parent::_getSorting();\n } elseif (($aSkipArt = oxRegistry::getSession()->getVariable('neworder_sess'))) {\n $sOrderBy = '';\n $sArtTable = $this->_getViewName('oxarticles');\n $sSep = '';\n foreach ($aSkipArt as $sId) {\n $sOrderBy = \" $sArtTable.oxid=\" . oxDb::getDb()->quote($sId) . \" \" . $sSep . $sOrderBy;\n $sSep = \", \";\n }\n $sOrder = \"order by \" . $sOrderBy;\n }\n\n return $sOrder;\n }", "public function sort($orderby = array(), $order = 'ASC', $preserve_keys = \\false)\n {\n }", "function SetUpSortOrder() {\n\t\tglobal $cronograma;\n\n\t\t// Check for an Order parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$cronograma->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$cronograma->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$cronograma->UpdateSort($cronograma->idCronograma); // Field \n\t\t\t$cronograma->UpdateSort($cronograma->idConsultoria); // Field \n\t\t\t$cronograma->UpdateSort($cronograma->fechaInicio); // Field \n\t\t\t$cronograma->UpdateSort($cronograma->fechaFinal); // Field \n\t\t\t$cronograma->UpdateSort($cronograma->detalle); // Field \n\t\t\t$cronograma->UpdateSort($cronograma->mesAnio); // Field \n\t\t\t$cronograma->UpdateSort($cronograma->estado); // Field \n\t\t\t$cronograma->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "public function setOrder($value) {\r\n if ($this->order != $value) {\r\n $this->order = $value;\r\n\r\n //DB: Removed as it breaks series initialization at design-time,\r\n //when changing series order it'll call fillSampleValues.\r\n //if (series != null) {\r\n // series.checkDataSource();\r\n //}\r\n }\r\n }", "private function Reorder(): void {\n\n //Sort the indices ascending.\n $this->Sort(static fn(Row $First, Row $Second): int => $First->Index <=> $Second->Index);\n\n //Loop through rows and set the indices.\n foreach($this->Elements as $Index => $Row) {\n $Row->Index = $Index;\n }\n }", "public function getGalOrder($rs) {\n\t\t$meta = $this->core->meta->getMetaArray($rs->post_meta);\n\t\t$order = array();\n\t\tif (isset($meta['galorderby'])){\n\t\t\t$order['orderby']=$meta['galorderby'][0];\n\t\t} else {\n\t\t\t$order['orderby']=\"P.post_dt\";\n\t\t}\n\t\tif (isset($meta['galsortby'])){\n\t\t\t$order['sortby']=$meta['galsortby'][0];\n\t\t} else {\n\t\t\t$order['sortby']=\"ASC\";\n\t\t}\n\t\treturn $order;\n\t}", "function custom_woocommerce_catalog_orderby( $sortby ) {\n\n\t$sortby['oldest_to_recent'] = __( 'Oldest to most recent', 'woocommerce' );\n\n\treturn $sortby;\n}", "private function sortOperands(): void\n {\n $first = $this->first;\n $last = $this->last;\n\n if ($this->operation === 'subtraction') {\n $this->first = $first > $last ? $first : $last;\n $this->last = $first > $last ? $last : $first;\n }\n }", "public function toggleSortOrder(){\n \n //Get new order value\n $order = ($this->getSessionData('order')) ? $this->getSessionData('order'): 'desc';\n $newOrder = ($order == 'desc') ? 'asc' : 'desc';\n \n //Update order value in session\n $this->setSessionData('order', $newOrder);\n \n $sort = ($this->getSessionData('sort')) ? $this->getSessionData('sort'): 'date';\n $orderText = ($newOrder == 'desc') ? 'Descending' : 'Ascending';\n \n //Add success message to user's flash data.\n $this->setFlashData(\n 'message', \n array('status' => 'alert-success', 'content' => 'Order by ' . ucfirst($sort) . ' ' .$orderText)\n );\n \n }", "function sortNodes(&$nodes, $order) {\n\n usort($nodes, function($a, $b) use($order) {\n\n $result = '';\n if ($order == 'ASCE') {//ascending order\n $result = $a->f > $b->f;\n } else // $order == 'DESC' , descending order\n $result = $a->f < $b->f;\n return $result;\n });\n $nodes = array_values($nodes);\n //return $nodes;\n}", "protected function _sortRawData()\n {\n foreach ($this->data as &$row) {\n ksort($row);\n }\n ksort($this->data);\n }", "public function sort($videotype, $property, $order)\n\t{\n\t\t$query = \"SELECT * FROM {$this->table} \n\t\twhere video_type= :video_type ORDER BY $property $order\";\n\t\t$params = array(':video_type' => $videotype);\n\t\t$stmt = static::$dbh->prepare($query);\n\t\t$stmt->execute($params);\n\t\treturn $stmt->fetchAll(\\PDO::FETCH_ASSOC);\n\t}", "function order( $inc )\r\n\t{\r\n\tglobal $mainframe;\r\n\r\n\t// Check for request forgeries\r\n\tJRequest::checkToken() or die( 'Invalid Token' );\r\n\r\n\t$db\t\t=& JFactory::getDBO();\r\n\t$cid\t\t= JRequest::getVar('cid', array(0), '', 'array');\r\n\t$option \t= JRequest::getCmd('option');\r\n\t$section\t= JRequest::getVar('section');\r\n\tJArrayHelper::toInteger($cid, array(0));\r\n\r\n\t$limit \t\t= JRequest::getVar( 'limit', 0, '', 'int' );\r\n\t$limitstart \t= JRequest::getVar( 'limitstart', 0, '', 'int' );\r\n\r\n\t$row =& JTable::getInstance( 'ligen', 'TableCLM' );\r\n\t$row->load( $cid[0] );\r\n\t$row->move( $inc, 'sid = '.(int) $row->sid.' AND published != 0' );\r\n\r\n\t$msg \t= JText::_( 'LIGEN_MSG_SORT' );\r\n\t$mainframe->redirect( 'index.php?option='. $option.'&section='.$section, $msg );\r\n\t}", "public function sort(array $order)\n {\n $order = array_filter($order);\n\n $this->createQuery('a')->update()\n ->set('a.position = ?', null)\n ->whereIn('a.id', array_keys($order))\n ->execute();\n \n $objects = $this->createQuery()->whereIn('id', array_keys($order))->execute();\n \n foreach ($objects as $object) \n {\n $object->position = $order[$object->id];\n $object->save();\n }\n }", "function majal_alumni_custom_column_sortable_order( $vars ) {\n\t\t\t// Order by first name\n\t\t\tif ( isset( $vars['orderby'] ) && '_majal_alumni_alumnus_namefirst' == $vars['orderby'] ) {\n\t\t\t\t$vars = array_merge( $vars, array(\n\t\t\t\t\t'meta_key' => '_majal_alumni_alumnus_namefirst',\n\t\t\t\t\t'orderby' => 'meta_value'\n\t\t\t\t) );\n\t\t\t}\n\t\t\t// Order by second name\n\t\t\tif ( isset( $vars['orderby'] ) && '_majal_alumni_alumnus_namesecond' == $vars['orderby'] ) {\n\t\t\t\t$vars = array_merge( $vars, array(\n\t\t\t\t\t'meta_key' => '_majal_alumni_alumnus_namesecond',\n\t\t\t\t\t'orderby' => 'meta_value'\n\t\t\t\t) );\n\t\t\t}\n\t\t\t// Order by first name of interviewer\n\t\t\tif ( isset( $vars['orderby'] ) && '_majal_alumni_alumnus_interviewer_namefirst' == $vars['orderby'] ) {\n\t\t\t\t$vars = array_merge( $vars, array(\n\t\t\t\t\t'meta_key' => '_majal_alumni_alumnus_interviewer_namefirst',\n\t\t\t\t\t'orderby' => 'meta_value'\n\t\t\t\t) );\n\t\t\t}\n\t\t\t\n\t\t\treturn $vars;\n\t\t}", "function _sortDataSource()\n {\n if (!empty($this->sortSpec)) {\n if ($this->_dataSource->hasFeature('multiSort')) {\n $this->_dataSource->sort($this->sortSpec);\n } else {\n reset($this->sortSpec);\n list($sortBy, $direction) = each($this->sortSpec);\n $this->_dataSource->sort($sortBy, $direction);\n }\n }\n }", "function _setRendererCurrentSorting()\n {\n $sortSpec = $this->sortSpec ? $this->sortSpec : $this->defaultSortSpec;\n if (isset($this->_dataSource)\n && $this->_dataSource->hasFeature('multiSort')\n ) {\n $this->_renderer->setCurrentSorting($sortSpec, true);\n } else {\n reset($sortSpec);\n list($field, $direction) = each($sortSpec);\n $this->_renderer->setCurrentSorting(\n array($field => $direction), false);\n }\n }", "function sortByAttributes($unordered_ids, $sortby_name = null, $sortby_key = null, $direction = 0)\n {\n return $unordered_ids;\n }", "public function usort_reorder( $a, $b ) {\r\n // If no sort, default to title\r\n $orderby = ( ! empty( $_GET['orderby'] ) ) ? $_GET['orderby'] : 'booktitle';\r\n // If no order, default to asc\r\n $order = ( ! empty($_GET['order'] ) ) ? $_GET['order'] : 'asc';\r\n // Determine sort order\r\n $result = strcmp( $a[$orderby], $b[$orderby] );\r\n // Send final sort direction to usort\r\n return ( $order === 'asc' ) ? $result : -$result;\r\n }", "function usort_reorder( $a, $b ) {\n $orderby = ( ! empty( $_GET['orderby'] ) ) ? $_GET['orderby'] : 'title';\n // If no order, default to asc\n $order = ( ! empty($_GET['order'] ) ) ? $_GET['order'] : 'asc';\n // Determine sort order\n $result = strcmp( $a[$orderby], $b[$orderby] );\n // Send final sort direction to usort\n return ( $order === 'asc' ) ? $result : -$result;\n }", "public function changeSortingAction(){\n\t\t$currentRequest = $this->request->getArguments();\n\t\t\n\t\t$lowSorting = $currentRequest['lowSorting'];\n\t\t$highSorting = $currentRequest['highSorting'];\n\t\t\n\t\t// On récupère les objets correspondants aux champs dont l'on souhaite échanger les places\n\t\t$fieldWithIncreasingSorting = $this->champBddRepository->findByUid($lowSorting);\n\t\t$fieldWithDecreasingSorting = $this->champBddRepository->findByUid($highSorting);\n\t\n\t\t// On stocke les sorting dans des variables\n\t\t$highestSorting = $fieldWithDecreasingSorting->getSorting(); \n\t\t$lowestSorting = $fieldWithIncreasingSorting->getSorting(); \n\t\t\t\t\t\n\t\t// On attribue le sorting de chaque item à l'autre\n\t\t$fieldWithIncreasingSorting->setSorting($highestSorting); \n\t\t$fieldWithDecreasingSorting->setSorting($lowestSorting); \n\t\t\t\n\t\t//On fait l'update\t\n\t\t$this->champBddRepository->update($fieldWithIncreasingSorting);\n\t\t$this->champBddRepository->update($fieldWithDecreasingSorting);\n\t\t\t\n\t\t\t\n\t\t// On rend effetifs les modifications définis au dessus\n\t\t$this->champBddRepository->publicPersistAll();\n\t}", "function bookcrossing_catalog_sort_by_author($mode, $limit = 30)\n\n{\n\n $query = db_select('bookcrossing_books', 'b');\n\n $query->innerJoin('field_data_field_bookcrossing_author', 'a', 'b.nid = a.entity_id');\n\n $query->innerJoin('taxonomy_term_data', 't', 'a.field_bookcrossing_author_tid = t.tid');\n\n\n\n if ($mode == 'covers') {\n\n $query->distinct();\n\n }\n\n\n\n $query->fields('b', array('bid'));\n\n $query->condition('b.status', BOOKCROSSING_BOOK_STATUS_RESERVED, '<>');\n\n $query->addExpression('LOWER(LEFT(t.name, 1))', 'letter');\n\n\n\n $query = $query->extend('PagerDefault');\n\n if ($limit !== FALSE) {\n\n $query = $query->limit($limit);\n\n }\n\n\n\n//if ($mode == 'tile') {\n\n// $query->groupBy('concat(b.bid, t.name)');\n\n//}\n\n\n\n $query->orderBy(\"if(t.name regexp '^[а-яА-Я]', concat('1', t.name), t.name)\");\n\n //$query->orderBy(\"if(LEFT(t.name, 1) regexp '^[а-яА-Я]', concat('a', LEFT(t.name, 1)), LEFT(t.name, 1))\");\n\n $info = $query->execute()->fetchAll();\n\n\n\n $bids = array();\n\n $_SESSION['letters'] = array();\n\n foreach ($info as $bid) {\n\n $_SESSION['letters'][] = $bid->letter;\n\n $bids[] = $bid->bid;\n\n }\n\n\n\n $books = array();\n\n foreach ($bids as $bid) {\n\n $books[] = bookcrossing_load($bid);\n\n }\n\n return $books;\n\n}", "function setSortBy($session, $row, $order) {\n\t\t$_SESSION[''.$session.''] = 'ORDER BY `'.$row.'` '.$order;\n\t\t}", "function myrsort($data){\n\trsort($data);\n\treturn $data;\n}", "public function applySort()\n {\n $sortby = $this->app->stickyGET($this->name.'_sort', null);\n $desc = false;\n if ($sortby && $sortby[0] == '-') {\n $desc = true;\n $sortby = substr($sortby, 1);\n }\n\n $this->table->sortable = true;\n\n if ($sortby && isset($this->table->columns[$sortby]) && $this->model->hasElement($sortby) instanceof \\atk4\\data\\Field) {\n $this->model->setOrder($sortby, $desc);\n $this->table->sort_by = $sortby;\n $this->table->sort_order = $desc ? 'descending' : 'ascending';\n }\n\n $this->table->on('click', 'thead>tr>th', new jsReload($this, [$this->name.'_sort'=>(new jQuery())->data('column')]));\n }", "public function volume_sort ( $entities, $order = 'asc' ) {\n usort ( $entities, array('HypnoticPackage', 'compare_volume') );\n\n if ( $order == 'desc' ) {\n return array_reverse( $entities );\n }\n\n return $entities;\n }", "public function testVersionedSortOrder()\n {\n $obj = $this->objFromFixture(TestManyManyThroughDataObject::class, 'obj1');\n $obj->publishSingle();\n $id = $obj->ID;\n\n Versioned::set_stage(Versioned::LIVE);\n $obj = TestManyManyThroughDataObject::get()->byID($id);\n $field = SortableUploadField::create('Files', 'Files', $obj->Files())->setRecord($obj);\n $this->assertEmpty($field->getItems()->column('Title'), 'There shouldn\\'t be any published records');\n\n // Now publish everything\n $obj->publishRecursive();\n $obj = TestManyManyThroughDataObject::get()->byID($id);\n $field = SortableUploadField::create('Files', 'Files', $obj->Files())->setRecord($obj);\n $this->assertEquals(['FileA', 'FileB', 'FileC', 'FileD'], $field->getItems()->column('Title'));\n\n Versioned::set_stage(Versioned::DRAFT);\n // change the sort Order and remove an Item\n $obj = TestManyManyThroughDataObject::get()->byID($id);\n $field = SortableUploadField::create('Files', 'Files', $obj->Files())->setRecord($obj);\n $field->setSubmittedValue(['Files' => ['3','2','1']]);\n $field->saveInto($obj);\n $obj->write();\n\n // Should now be changed on Draft\n $this->assertEquals(['FileC', 'FileB', 'FileA'], $obj->getLinkedFiles()->column('Title'));\n\n Versioned::set_stage(Versioned::LIVE);\n // Should still be unchanged on Live\n $obj = TestManyManyThroughDataObject::get()->byID($id);\n $this->assertEquals(['FileA', 'FileB', 'FileC', 'FileD'], $obj->getLinkedFiles()->column('Title'));\n\n // Should be updated after publishing\n $obj->publishRecursive();\n $obj = TestManyManyThroughDataObject::get()->byID($id);\n $this->assertEquals(['FileC', 'FileB', 'FileA'], $obj->getLinkedFiles()->column('Title'));\n }" ]
[ "0.5904523", "0.58329886", "0.5735202", "0.563791", "0.55973125", "0.55486786", "0.55243343", "0.5523146", "0.5510751", "0.548579", "0.5454831", "0.54410124", "0.53854096", "0.5371242", "0.5325615", "0.5319916", "0.53149396", "0.5297444", "0.52603996", "0.5242369", "0.5240349", "0.5229278", "0.5198942", "0.5187615", "0.51682615", "0.51680136", "0.51680136", "0.51633745", "0.5154423", "0.5154022", "0.5150776", "0.5139746", "0.51356435", "0.5129799", "0.51229036", "0.5119835", "0.5118137", "0.51176584", "0.51146436", "0.5107446", "0.50961876", "0.5094274", "0.5088317", "0.50744516", "0.5073876", "0.50681853", "0.50619197", "0.50548196", "0.50503254", "0.5034673", "0.5034014", "0.5033596", "0.50287145", "0.50287145", "0.50263387", "0.5025088", "0.5021705", "0.50214934", "0.50213313", "0.50212765", "0.5014457", "0.5001759", "0.49987262", "0.49986395", "0.49830398", "0.49826455", "0.4979689", "0.49771717", "0.4968913", "0.49643102", "0.4956968", "0.4952891", "0.4947615", "0.4937755", "0.49367145", "0.49356678", "0.49347827", "0.49313506", "0.49278545", "0.49275094", "0.49224496", "0.49174953", "0.49165392", "0.49161115", "0.49148792", "0.4909814", "0.49093035", "0.49017307", "0.49007544", "0.48980397", "0.48930582", "0.4892858", "0.48921722", "0.48892555", "0.48891056", "0.4886386", "0.48857087", "0.48794228", "0.48785496", "0.48783574" ]
0.71793103
0
Returns HTML for an islandora_solr_facet_wrapper.
Возвращает HTML для islandora_solr_facet_wrapper.
function pld_islandora_solr_facet_wrapper($variables) { $output = '<div class="islandora-solr-facet-wrapper">'; $output .= '<h3>' . $variables['title'] . '<span class="down-arrow"><i class="fas fa-arrow-down"></i></span></h3>'; $output .= $variables['content']; $output .= '</div>'; return $output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayFacets($solrQueryProcessor) {\n global $base_url;\n $facet_output = $output = '';\n $islandora_facets = isset($solrQueryProcessor->solrResult->facet_counts->facet_fields) ? $solrQueryProcessor->solrResult->facet_counts->facet_fields : array();\n\n if (empty($islandora_facets)) {\n return $output; //no facets to show\n }\n\n // set show more variable\n $show_more = FALSE;\n\n foreach ($islandora_facets as $key => $field) {\n $list_items = array();\n $list_type = \"ul\";\n $list_title = NULL;\n\n $test = get_object_vars($field); //get the number of fields if there aren't any don't show the key\n if (count($test) > 0) {\n $facet_count = 0;\n unset($normal_facet_output);\n\n foreach ($field as $name => $number) {\n $this->_addFacets($key, $name, $number, $solrQueryProcessor, $facet_count, $list_items);\n }\n \n if (count($list_items) > 0) {\n $facet_output .='<div class=\"islandora_solr_search_facet\">';\n\n // shown limit\n $shown_limit = variable_get('islandora_solr_search_block_facet_shown_limit', 0);\n $facetlimit = variable_get('islandora_solr_search_block_facet_limit', '12');\n $facetMinCount = variable_get('islandora_solr_search_block_facet_min_count', '2');\n\n $list_title = $this->facetFieldArray[$key];\n $list_type = \"ul\";\n $list_attributes = array(\n 'class' => implode(' ', array(\n 'islandora_solr_search_facet_list', \n 'facet_list'))\n );\n \n // split the array if shown_limit is between the min and max limits and if the total is larger than the shown_limit.\n $split_facet = $facet_count > $shown_limit AND \n $shown_limit < $facetlimit AND \n $shown_limit > $facetMinCount;\n \n if ($split_facet) {\n $show_more = TRUE; //There exists a split array...\n $list_items_hidden = array_slice($list_items, $shown_limit);\n $list_items = array_slice($list_items, 0, $shown_limit);\n }\n\n $facet_output .= theme_item_list($list_items, $list_title, $list_type, $list_attributes);\n\n // render the hidden facets\n if ($split_facet) {\n $facet_output .= '<a href=\"#\" class=\"shown-toggle\">' . t('Show more') . '</a>';\n $facet_output .= '<a href=\"#\" class=\"shown-toggle hidden\">' . t('Show less') . '</a>';\n $facet_output .= '<div class=\"toggle-wrapper hidden\">';\n $facet_output .= theme_item_list($list_items_hidden, NULL, $list_type, $list_attributes);\n $facet_output .= '</div>';\n }\n \n $facet_output .='</div>'; //div.islandora_solr_search_facet\n }\n }\n }\n\n if ($show_more) {\n // if there is at least one occurence of a split array, we add js to the page.\n drupal_add_js(drupal_get_path('module', 'islandora_solr_search') . '/js/islandora_solr_search_shown_limit.js');\n }\n\n //////////////////////////////////////////////////////////////////////////////////////\n // as we add additional facets, we're repeatedly URL-encoding old facet //\n // strings. when we double-encode quotation marks they're incomprehensible to solr. //\n // This is a quick workaround: //\n //////////////////////////////////////////////////////////////////////////////////////\n $facet_output = str_replace('%2B', '%252B', $facet_output);\n if(!empty($facet_output)) {\n $output .='<div class=\"islandora_solr_search_facet_wrap\">';\n $output .= $facet_output;\n $output .= '</div>';\n }\n\n return $output;\n }", "function rula_islandora_solr_facet_wrapper($variables) {\n//\t\n//\t<div class=\"panel-group\" id=\"accordion\">\n//\t<div class=\"panel panel-default\">\n//\t<div class=\"panel-heading\">\n//\t<h4 class=\"panel-title\">\n//\t<a data-toggle=\"collapse\" data-parent=\"#accordion\" href=\"#collapseOne\">\n//\tCollapsible Group Item #1\n//\t</a>\n//\t</h4>\n//\t</div>\n//\t<div id=\"collapseOne\" class=\"panel-collapse collapse in\">\n//\t<div class=\"panel-body\">\n//\t...\n//\t</div>\n//\t</div>\n//\t</div>\n//\t\n\t\n\t$t = $variables[\"title\"];\n\t$tl = strtolower($t);\n\t\n\t$output = '<div class=\"islandora-solr-facet-wrapper\">';\n\t$output .= '<div class=\"panel panel-default\">';\n\t$output .= '<div class=\"panel-heading\">';\n\t$output .= '<h3>' . $t . '</h3>';\n\t$output .= '<button type=\"button\" class=\"btn btn-primary collapsed\" data-toggle=\"collapse\" data-target=\"#collapse-'.$tl.'\">-</button>';\n\t$output .= '</div>';\n\t$output .= '<div id=\"collapse-'.$tl.'\" class=\"panel-collapse collapse in\">';\n\t$output .= '<div class=\"panel-body\">';\n\t$output .= $variables['content'];\n\t$output .= '</div>';\n\t$output .= '</div>';\n\t$output .= '</div>';\n\t$output .= '</div>';\n\treturn $output;\n\n}", "public static function facetBuilder()\n {\n return new wrappers\\FacetWrapper();\n }", "public function render() {\n\n // If the facet does not meet its dependencies, do not display it.\n if (!$this->meetsDependencies()) {\n return '';\n }\n\n // Check to see if this facet is a dependent.\n $dependentColumns = $this->getApp()->settings('dependent columns');\n $dependent = (!empty($dependentColumns[$this->getName()]));\n\n $class = 'stf-facet';\n $showLabel = TRUE;\n if ($dependent && $this->getApp()->settings('show dependents indented to the right')) {\n $showLabel = FALSE;\n $class .= ' stf-facet-dependent';\n }\n\n // Get the actual list of facet items.\n $list = $this->getList();\n if (empty($list)) {\n return '';\n }\n\n $output = '<div class=\"' . $class . '\">' . PHP_EOL;\n if ($showLabel) {\n $output .= ' <h2 class=\"stf-facet-label\">' . $this->getLabel() . '</h2>' . PHP_EOL;\n }\n $output .= $list;\n $output .= '</div>' . PHP_EOL;\n return $output;\n }", "function s4w_search_facets($results, $qry, $fqitms) {\n $fqstr = '';\n $query_values=array();\n foreach ((array)$fqitms as $fqitem) {\n if ($fqitem) {\n $splititm = split(':', $fqitem, 2);\n if($val = trim($splititm[1],'\"\\\\')) {\n $query_values[] = $val;\n }\n $fqstr = $fqstr . urlencode('||') . $splititm[0] . ':' . urlencode($splititm[1]);\n }\n } # handle facets\n print(__('<aside id=\"sidebar\"><ul class=\"facets\">', 'solr4wp'));\n\n if($results->facet_counts) {\n foreach ($results->facet_counts->facet_fields as $facetfield => $facet) {\n if ( ! get_object_vars($facet) ) {\n continue;\n }\n $facetfield_mod = trim(ucwords(str_replace(array('_taxonomy','_dt','_'),' ',$facetfield)));\n printf(__('<li class=\"facet\"><h3>%s</h3><ul class=\"facetitems\">', 'solr4wp'), $facetfield_mod);\n # categories is a taxonomy\n if ($categoy_as_taxonomy && $facetfield == 'categories') {\n # generate taxonomy and counts\n $taxo = array();\n foreach ($facet as $facetval => $facetcnt) {\n $taxovals = explode('^^', rtrim($facetval, '^^'));\n $taxo = s4w_gen_taxo_array($taxo, $taxovals);\n $facet_used = \"facet_not_used\";\n //create a list of facets used in the current search and show [X] next to it\n if (is_numeric($qfacet = array_search($facetval ,$query_values))) {\n $fqstrs = trim($fqstr,urlencode('|'));\n $faceturl = sprintf(__('?s=%s&fq=%s', 'solr4wp'), $qry, trim($fqstrs,urlencode('|')));\n $facet_url_replace = $facetfield.':'.urlencode('\"' . $facetval . '\"');\n $faceturl = str_replace($facet_url_replace, '', $faceturl);\n\n $faceturl = str_replace(\"=%7C%7C\", \"=\", $faceturl);\n\n $result_facet_used[] = sprintf(__('%s<a href=\"%s\"> [X]</a>','solr4wp'), rtrim($facetval,'^'), $faceturl);\n $facet_used = \"facet_used\";\n }\n }\n s4w_print_taxo($facet, $taxo, '', $fqstr, $facetfield, $facet_used);\n } \n else {\n foreach ($facet as $facetval => $facetcnt) {\n //if the facet is being/not used put the appropriate class with it\n if (is_numeric($qfacet = array_search($facetval ,$query_values))) {\n $fqstrs = trim($fqstr,urlencode('|'));\n $faceturl = sprintf(__('?s=%s&fq=%s&core=%s', 'solr4wp'), $qry, trim($fqstrs,urlencode('|')), $_GET['core']);\n $facet_url_replace = $facetfield.':'.urlencode('\"' . $facetval . '\"');\n $faceturl = str_replace($facet_url_replace, '', $faceturl);\n\n $faceturl = str_replace(\"=%7C%7C\", \"=\", $faceturl);\n\n $result_facet_used[] = sprintf(__('%s<a href=\"%s\"> [X]</a>','solr4wp'), $facetval, $faceturl);\n $facet_used = \"facet_used\";\n }\n else {\n $faceturl = sprintf(__('?s=%s&fq=%s:%s%s&core=%s', 'solr4wp'), $qry, $facetfield, urlencode('\"' . $facetval . '\"'), $fqstr,$_GET['core']);\n $facet_used = \"facet_not_used\";\n }\n printf(__('<li class=\"facetitem %s\"><a href=\"%s\">%s</a> (%d)</li>', 'solr4wp'), $facet_used, $faceturl, ucfirst($facetval), $facetcnt);\n }\n }\n print(__('</ul></li>', 'solr4wp'));\n }\n }\n\n\n print(__('</ul>', 'solr4wp'));\n\n //show the used facets\n if (count($result_facet_used) > 0) {\n print '<div class=\"result_facets_used\">';\n print '<p>To remove a search filter, click [x]</p>';\n foreach ($result_facet_used as $used_facet){\n print('<div class=\"result_facet_used\">'.$used_facet.'</div>');\n }\n print '</div>';\n }\n print(__('</aside>', 'solr4wp'));\n}", "public function render_widget_search($html) {\n // Remove `vf-box` classes\n $html = preg_replace(\n '#(widget\\s+?widget_search)\\s+?vf-box\\s+?vf-box--inlay#',\n '$1', $html\n );\n return $html;\n }", "function lib4ridora_get_organization_facets() {\n // Let us build an index of search fields and see if we need to replace the pid with the label:\n $myrecords = islandora_solr_get_fields(\"facet_fields\", FALSE, FALSE); // get all facet fields...\n $org_fields = array_map(\"trim\", explode(',', variable_get('lib4ridora_organization_block_organization_field', 'mods_name_personal_affiliation_ms, mods_name_corporate_affiliation_ms')));\n $facets = array();\n $omitted_facets = explode(PHP_EOL, variable_get('lib4ridora_organization_block_results_to_omit', '') );\n $omitted_facets = array_map( function($uTmp) { return trim(strtok(strtr($uTmp,'|#','//').'/','/')); }, $omitted_facets ); // to allow appending '//' comments/unit-name onto each line/unit-id \n $qp = new IslandoraSolrQueryProcessor();\n $qp->buildQuery('*:*');\n $qp->solrParams['fl'] = \"PID, \" . implode(', ', $org_fields);\n $qp->solrParams['facet.limit'] = 100000;\n $qp->solrParams['facet.mincount'] = 1;\n $qp->solrParams['facet.field'] = $org_fields;\n $qp->executeQuery(FALSE);\n // Remark. Weird naming convention: '$organization' actually contains the search field, whereas '$facet' refers to the name... We keep it as is, although it probably should be the other way around...\n foreach ($qp->islandoraSolrResult['facet_counts']['facet_fields'] as $organization => $results) {\n foreach ($results as $facet => $count) {\n if (!in_array($facet, $omitted_facets)) {\n $facet_alt = $facet;\n // Check if we want to translate the pid into the label and do it\n foreach ($myrecords as $mykey => $myval) {\n if ((strpos($organization, $myval['solr_field']) !== FALSE) && islandora_is_valid_pid($facet) && isset($myval['solr_field_settings']['pid_object_label']) && $myval['solr_field_settings']['pid_object_label']) {\n $myqp = new IslandoraSolrQueryProcessor();\n $myqp->buildQuery(\"PID:\\\"$facet\\\"\");\n $myqp->solrParams['fl'] = \"PID, \" . variable_get('islandora_solr_object_label_field', 'fgs_label_s');\n $myqp->executeQuery();\n if (!empty($myqp->islandoraSolrResult) && !empty($myqp->islandoraSolrResult['response']['objects']) && !empty($myqp->islandoraSolrResult['response']['object'][0]['object_label'])) {\n $facet_alt = $myqp->islandoraSolrResult['response']['objects'][0]['object_label'];\n }\n else {\n if ($myobj = islandora_object_load($facet)) {\n $facet_alt = $myobj->label;\n }\n }\n }\n }\n $facets[$facet] = array(\n 'field' => $organization,\n 'label' => $facet_alt,\n 'count' => $count,\n );\n }\n }\n }\n return $facets;\n}", "function widget($args, $instance) {\r\n if (WPSearchUtils::isSearchPage()) {\r\n global $wpsearch;\r\n $response = $wpsearch->getFacetsRender();\r\n extract($args, EXTR_SKIP);\r\n echo $before_widget;\r\n\r\n if ($response['facets'] || $response['searchinput']) {\r\n echo $response['activefacets'];\r\n ?>\r\n <div class=\"wpsearch_search\">\r\n <?php echo $response['searchinput']; ?>\r\n </div>\r\n <?php\r\n echo $response['facets'];\r\n }\r\n\r\n echo $after_widget;\r\n }\r\n }", "function currentQuery($solrQueryProcessor) {\n //dsm($solrQueryProcessor);\n global $base_url;\n $output = '';\n $islandora_fq = restoreSlashes($solrQueryProcessor->solrFilters);\n $islandora_facets = isset($solrQueryProcessor->solrResult->facet_counts->facet_fields) ?\n $solrQueryProcessor->solrResult->facet_counts->facet_fields :\n NULL;\n //dsm($islandora_facets);\n \n // look for the current display\n global $current_display;\n $display = isset($_GET['display']) ? $current_display : '';\n $query = '';\n if ($display) {\n $query = array('display' => $display);\n }\n \n if (strlen(trim($solrQueryProcessor->solrQuery))) {\n\n // Variables to build a drupal-ish unordered list\n $query_list_title = t('Query');\n $query_list_items = array();\n $query_list_type = \"ul\";\n $query_list_attributes = array('class' => 'islandora_solr_search_query_list query_list');\n\n // OK, so it's a list of one.\n // In the future, we could reasonably break the query on boolean operators\n // and allow one part to be removed at a time.\n $query = \"*:*\";\n $fq = replaceSlashes($islandora_fq);\n $defType = $solrQueryProcessor->solrDefType;\n $repr = '-';\n $link = \"islandora/solr/search/$query/$fq/$defType\";\n $query_list_items[] .= l($repr, $link,\n array(\n 'attributes' => array(\n 'class' => 'islandora_solr_add_remove_link'))\n ) . ' ' . $this->getSubstitutedFields(stripslashes($solrQueryProcessor->solrQuery), FIELD_SEARCH);\n\n $output .= '<div class=\"islandora_solr_search_query_wrap\">';\n\n $output .= theme_item_list($query_list_items, $query_list_title, $query_list_type, $query_list_attributes);\n $output .= '</div>'; // 'islandora_solr_search_query_wrap'\n }\n\n //////////////////////////////////////////////////////////////////////////////\n // Here we will build links to remove currently enforced facet filters ... //\n //////////////////////////////////////////////////////////////////////////////\n $filters = empty($islandora_fq) ? NULL : explode(IslandoraSolrResults::$facetSeparator, $islandora_fq);\n\n if (!empty($filters) && $islandora_fq != '-') {\n// $filter_output = NULL;\n // Variables to build a drupal-ish unordered list, which will be rendered\n // a little bit farther down\n $filter_list_title = t(\"Enabled Filters\");\n $filter_list_items = array();\n $filter_list_type = \"ul\";\n $filter_list_attributes = array('class' => 'islandora_solr_search_filter_list filter_list');\n\n foreach ($filters as $key => $filter) {\n $edit_filters = $filters;\n unset($edit_filters[$key]);\n $filter_disable = implode(IslandoraSolrResults::$facetSeparator, $edit_filters);\n if (empty($filter_disable)) {\n $filter_disable = '-';\n }\n $filter_name_and_value = explode(\":\", $filter, 2);\n $filter_name = $filter_name_and_value[0];\n $filter_value = $filter_name_and_value[1];\n if (strncmp($filter_name, '-', 1))\n $exclude = FALSE;\n else {\n $exclude = TRUE;\n $filter_name = substr($filter_name, 1);\n }\n \n $query = replaceSlashes($solrQueryProcessor->solrQuery); \n $fq = replaceSlashes($filter_disable);\n $defType = $solrQueryProcessor->solrDefType;\n $repr = '-';\n $link = \"islandora/solr/search/$query/$fq/$defType\";\n $filter_list_items[] = l($repr, $link, \n array(\n 'attributes' => array(\n 'class' => 'islandora_solr_add_remove_link'))\n ) .' '. $this->facetFieldArray[$filter_name] . ($exclude ? ' != ' : ' = ') . $filter_value;\n }\n }\n\n if (!empty($filter_list_items)) {\n// $filter_output = str_replace('%2B','%252B',$filter_output);\n $output .= '<div class=\"islandora_solr_search_filter_wrap\">';\n $output .= theme_item_list($filter_list_items, $filter_list_title, $filter_list_type, $filter_list_attributes);\n $output .= '</div>'; // 'islandora_solr_search_filter_wrap'\n }\n\n return $output;\n }", "function get_content()\n {\n if(!$this->results)\n {\n return '';\n }\n\n if(get_query_var('jsonDump'))\n {\n print_r(\"<pre>\");\n echo htmlspecialchars(json_encode($this->results, JSON_PRETTY_PRINT));\n print_r(\"</pre>\");\n }\n else\n {\n $facets = new edan_facet_view($this->results);\n\n $content = '<div class=\"edan-search-display-section\">';\n\n if(!$this->hidesearch)\n {\n $content .= $this->get_search_bar();\n }\n\n if(($this->initialResults || get_query_var('edan_q')) && !$this->hideresults)\n {\n $content .= '<div class=\"edan-search-results-block\">';\n $content .= $this->get_top_nav();\n $content .= $this->get_object_list();\n $content .= $this->get_bottom_nav();\n $content .= '</div>';\n\n if(!$this->hidefacets)\n {\n $content .= '<div class=\"edan-search-facets-side-bar\"><div>'.$facets->get_content().'</div></div>';\n }\n }\n\n if($this->hideresults && !$this->hidefacets)\n {\n $content .= \"<div class=\\\"edan-search-facets-full-view\\\">\" .$facets->get_content() . \"</div>\";\n }\n\n $content .= '</div>';\n\n return $content;\n }\n\n return '';\n }", "function displayResults($solrQueryProcessor, $title = NULL, $output = '') {\n if (is_null($title)) { //Needed to move this, as default parameters cannot be function calls\n $title = t(\"Search Results\");\n }\n $apacheSolrResult = $solrQueryProcessor->solrResult;\n $total = (int) $apacheSolrResult->response->numFound;\n\n $end = min(($solrQueryProcessor->solrLimit + $solrQueryProcessor->solrStart), $total);\n\n // Initialize drupal-style pager\n islandora_solr_search_pager_init($total, $solrQueryProcessor->solrLimit);\n\n $output .= $this->addSecondaries();\n\n $output .= '<h2>'.$title.'</h2>';\n $output .= '<div id=\"islandora_solr_result_count\">(' . ($solrQueryProcessor->solrStart + ($total > 0?1:0)) . ' - ' . $end . ' of ' . $total . ')</div>';\n $output .= '<div class=\"content\">';\n\n// drupal_set_message(print_r($secondary_display_profiles,1));\n // Render Drupal pager (top of search results)\n $output .= theme('pager', NULL, $solrQueryProcessor->solrLimit, 0, NULL, 5);\n\n /*\n * Then, here, we need to build links to the current query under the secondary query display\n * profile for each such profile which uses the hook.\n *\n * The link should basically be $theCurrentURL with &proile=<profile_name> tacked on.\n *\n * Also, perhaps there's no difference between primary and secondary profiles?\n */\n $output .= $this->printResults($apacheSolrResult);\n if (variable_get('islandora_solr_search_debug_mode', FALSE)) {\n $output .= $this->printDebugOutput($solrResult);\n }\n\n // Render Drupal pager (bottom of search results)\n $output .= theme('pager', NULL, $solrQueryProcessor->solrLimit, 0, NULL, 5);\n\n\n $output .= \"</div>\"; // class = \"content\"\n return $output;\n }", "function printResults($results) {\n // Check for empty resultset\n if( (int)$solrResult->response->numFound === 0 ) {\n $output .= \"<p>Sorry, but your search returned no results.</p>\";\n return $output;\n }\n\n $items = array();\n $type = \"ol\";\n $title = NULL;\n $recordStart = $results->response->start;\n $limitResults = variable_get('islandora_solr_search_limit_result_fields', 0);\n $rawResponse = $results->getRawResponse();\n $responseArray = json_decode($rawResponse, true);\n $docs = $responseArray['response']['docs'];\n //retrieve 'highlighing' from resultset.\n $highlightResults = $responseArray['highlighting'];\n $highlights = $results->highlighting;\n\n foreach ($highlights as $highlight) {\n $fields = get_object_vars($highlight);\n $keys = array_keys($fields);\n if (count($keys) > 0) {\n foreach ($highlight->$keys[0] as $body) {\n //drupal_set_message(\"$keys[0] $body\");\n }\n }\n //drupal_set_message($highlight->$keys[0]);\n }\n\n global $base_url;\n if (empty($results)) {\n return \"no results\";\n }\n\n foreach ($results->response->docs as $doc) {\n $rows = array();\n $row = 0;\n $snippet = null;\n foreach ($doc as $field => $value) {\n\n if ($limitResults && empty($this->resultFieldArray[$field])) {\n continue;\n }\n\n $translated_field_name = isset($this->allSubsArray[$field]) ? $this->allSubsArray[$field] : $field;\n $rows[$row][] = array(\n 'data' => $translated_field_name,\n 'header' => TRUE,\n );\n if (is_array($value)) {\n $value = implode(\", \", $value);\n }\n\n if ($field == 'PID') {\n $pid = $value;\n $l = l($value, 'fedora/repository/' . htmlspecialchars($value, ENT_QUOTES, 'utf-8'));\n $rows[$row][] = $l;\n if (is_array($keys)) {\n $snippet = $highlightResults[$value][$keys[0]];\n }\n }\n else {\n $rows[$row][] = $value;\n }\n $row++;\n }\n if ($snippet) {\n $rows[$row][] = array(\n 'data' => 'Full Text',\n 'header' => TRUE,\n );\n $rows[$row][] = $snippet[0];\n }\n $items[] = theme_table(NULL, $rows, array('class' => 'islandora_solr_search_results_object'));\n }\n $output .= theme_item_list($items, $title, $type, array('class' => 'stuff', 'start' => ($recordStart + 1)));\n return $output;\n }", "function dcsmt_inc_flickr($args, $instance){\r\n\r\n\textract( $args );\r\n\t$tab = '';\r\n\t$widget_options = wp_parse_args( $instance, $this->defaults );\r\n\textract( $widget_options, EXTR_SKIP );\r\n\t$nFlickr = $widget_options['nFlickr'];\r\n\t$api = 'photos_public.gne?';\r\n\t$id = $widget_options['flickrId'];\r\n\t$icon_close = '<a href=\"#\" class=\"dcsmt-close dcsmt-close-tab\"></a>';\r\n\t$title = $widget_options['flickrTitle'] != '' ? '<h3>'.$widget_options['flickrTitle'].$icon_close.'</h3>' : '' ;\r\n\t$tag= uniqid('flickr');\r\n\tif($id != ''){\r\n\t$tab .= '<script type=\"text/javascript\">\r\n\t\tjQuery(document).ready(function($){\r\n\t\r\n\t\t\t\t\t$(\"#'.$tag.'\").dcFlickr({\r\n\t\t\t\t\tlimit: '.$nFlickr.', \r\n\t\t\t\t\tstyle: \"thumb\",\r\n\t\t\t\t\tq: {id: \"'.$id.'\",\r\n\t\t\t\t\t\tlang: \"en-us\",\r\n\t\t\t\t\t\tformat: \"json\",\r\n\t\t\t\t\t\tjsoncallback: \"?\"}\r\n\t\t\t\t\t});\r\n\t\t});\r\n\t</script>';\r\n\t$tab .= '<div class=\"tab-flickr tab-inner\">'.$title;\r\n\t$tab .= '<ul id=\"'.$tag.'\"></ul>';\r\n\t$tab .= '</div>';\r\n\t}\r\n\treturn $tab;\r\n}", "function execute_search(){ \n\t\t \n\t\t $solr = new Apache_Solr_Service('localhost', 8983, '/solr');\n\t\t //$solr->setDefaultTimeout(5.0);\n\t\t if ($this->pingSolr($solr)) {\n\t\t //if (true) {\n\t\t\t\t try {\n\t\t\t\t\t $param_array = $this->param_array;\n\t\t\t\t\t \n\t\t\t\t\t if((count($param_array[\"facet.field\"])<10) && !$this->doPost){\t \n\t\t\t\t\t\t $response = $solr->search(\t$this->query,\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->offset,\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->number_recs,\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->param_array);\n\t\t\t\t\t }\n\t\t\t\t\t else{\n\t\t\t\t\t\t $response = $solr->search(\t$this->query,\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->offset,\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->number_recs,\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->param_array,\n\t\t\t\t\t\t\t\t\t\t\t\t\t \"POST\");\n\t\t\t\t\t\t \n\t\t\t\t\t }\n\t\t\t\t\t $this->queryString = $solr->queryString;\n\t\t\t\t\t $docs_array = array();\n\t\t\t\t\t \n\t\t\t\t\t foreach (($response->response->docs) as $doc) {\n\t\t\t\t\t\t \n\t\t\t\t\t\t $actDocOutput = array(\"uuid\" => $doc->uuid);\n\t\t\t\t\t\t if(!$this->rawDocsArray){\n\t\t\t\t\t\t\t\t$actDocOutput = $this->addResultFields($doc, $actDocOutput);\n\t\t\t\t\t\t }\n\t\t\t\t\t\t else{\n\t\t\t\t\t\t\t $allDoc = (array)$doc;\n\t\t\t\t\t\t\t $arrayKey = array_keys($allDoc);\n\t\t\t\t\t\t\t $actDocOutput = $allDoc[$arrayKey[1]]; //second key has the fields and data we want in an array\n\t\t\t\t\t\t\t //echo print_r($actDocOutput);\n\t\t\t\t\t\t }\n\t\t\t\t\t\t \n\t\t\t\t\t\t $docs_array[] = $actDocOutput ;\n\t\t\t\t\t }\n\t\t\t\t\t \n\t\t\t\t\t $rawResponse = Zend_Json::decode($response->getRawResponse());\n\t\t\t\t\t $reponse = $rawResponse['response'];\n\t\t\t\t\t $numFound = $reponse['numFound'];\n\t\t\t\t\t $this->numFound = $numFound;\n\t\t\t\t\t $this->documentsArray = $docs_array;\n\t\t\t\t\t \n\t\t\t\t\t if(isset($rawResponse['facet_counts'])){\n\t\t\t\t\t\t $this->facets = $rawResponse['facet_counts'];\n\t\t\t\t\t }\n\t\t\t\t\t $this->pseudoBoost();\n\t\t\t\t\t $this->getGeoTiles();\n\t\t\t\t\t $this->getChronoTiles();\n\t\t\t\t\n\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\t $this->solrDown = true;\n\t\t\t\t\t $this->queryString = $solr->queryString;\n\t\t\t\t\t $solrError = new SolrError;\n\t\t\t\t\t $requestParams = $this->requestParams;\n\t\t\t\t\t $requestParams[\"solrError\"] = (string)$e;\n\t\t\t\t\t $this->requestParams = $requestParams;\n\t\t\t\t\t $solrError->initialize($this->requestParams);\n\t\t\t\t}\n\t \n\t\t } else {\n\t\t\t\t //die(\"unable to connect to the solr server. exiting...\");\n\t\t\t\t //echo OpenContext_OCConfig::getSolrDownMessage();\n\t\t\t\t //die(\"Upgrade in progress, unable to connect to the solr server. exiting...\");\n\t\t\t\t \n\t\t\t\t$this->solrDown = true;\n\t\t\t\t$solrError = new SolrError;\n\t\t\t\t$solrError->initialize($this->requestParams);\n\t\t\n\t\t }\n\t\t \n\t\t $this->makeAltLinks(); //now that search results are found, make some links\n }", "public function testFacetedSearch() {\n\t\t$connection = new ASolrConnection();\n\t\t$connection->clientOptions->hostname = SOLR_HOSTNAME;\n\t\t$connection->clientOptions->port = SOLR_PORT;\n\t\t$connection->clientOptions->path = SOLR_PATH;\n\t\t$doc = new SolrInputDocument();\n\n\t\t$doc->addField('id', 334455);\n\t\t$doc->addField('cat', 'Software');\n\t\t$doc->addField('cat', 'Lucene');\n\t\t$doc->addField(\"popularity\",20);\n\t\t$doc->addField(\"incubationdate_dt\",date(\"Y-m-d\\TH:i:s\\Z\"));\n\t\t$this->assertTrue($connection->index($doc));\n\t\t$this->assertTrue($connection->commit());\n\t\t$criteria = new ASolrCriteria;\n\t\t$criteria->query = \"lucene\";\n\t\t$criteria->offset = 0;\n\t\t$criteria->limit = 10;\n\t\t$criteria->facet = true;\n\t\t$criteria->addFacetField(\"cat\")->addFacetField(\"name\");\n\t\t$criteria->addFacetDateField(\"incubationdate_dt\");\n\t\t$criteria->facetDateStart = \"2005-10-10T00:00:00Z\";\n\t\t$criteria->facetDateEnd = \"2015-10-10T00:00:00Z\";\n\t\t$criteria->facetDateGap = \"+12MONTH\";\n\t\t$criteria->addFacetQuery(\"popularity:[* TO 10]\");\n\t\t$criteria->addFacetQuery(\"popularity:[10 TO 20]\");\n\t\t$criteria->addFacetQuery(\"popularity:[20 TO *]\");\n\n\t\t$response = $connection->search($criteria);\n\t\t$this->assertTrue($response instanceof ASolrQueryResponse);\n\t\t$this->assertTrue(isset($response->getDateFacets()->incubationdate_dt));\n\t\t$this->assertTrue($response->getDateFacets()->incubationdate_dt instanceof ASolrFacet);\n\n\t\t$results = $response->getResults();\n\t\t$this->assertTrue(count($results) > 0);\n\t\tforeach($results as $n => $result) {\n\t\t\t$this->assertEquals($n, $result->getPosition());\n\t\t}\n\t\t$this->assertTrue($connection->delete(334455));\n\t\t$this->assertTrue($connection->commit());\n\t}", "public function addFacetQuery(string $facetQuery): \\SolrQuery {}", "public function addFacetQuery(string $facetQuery): \\SolrQuery {}", "public function render( $params ) {\n\t\t$output = '';\n\n\t\t// $output = get_geometa_editor_map('geojson_facet','');\n\n\t\tif ( $params['facet']['map_show_geocoder'] ) {\n\t\t\t$output .= '<div><label for=\"map_location_name\">Search Location</label><input type=\"text\" name=\"map_location_name\"/><br>';\n\t\t\t$output .= '<label for=\"map_search_radius\"><input type=\"text\" name=\"map_search_radius\" value=\"50\"/><br>';\n\t\t\t$output .= '</div>';\n\t\t}\n\n\t\t$map = new LeafletPHP(array(\n\t\t\t'zoom' => $params['facet']['map_zoom'],\n\t\t\t'center' => json_decode($params['facet']['map_center']),\n\t\t\t), 'geometa_map_' . $params['facet']['name'], 'geometa_draw_map');\n\n\t\t$map->add_layer('L.geoJSON',array(),'drawnItems');\n\n\t\t$map->add_control('L.Control.Draw', array(\n\t\t\t'edit' => array(\n\t\t\t\t'featureGroup' => '@@@drawnItems@@@'\n\t\t\t),\n\t\t\t'draw' => array(\n\t\t\t\t'circle' => false,\n\t\t\t\t'marker' => false,\n\t\t\t\t'gpsline' => false,\n\t\t\t\t),\n\t\t\t));\n\n\t\t$output .= $map;\n\n\t\treturn $output;\n\t}", "public function getSolrResponse();", "public function addStatsFacet(string $field): \\SolrQuery {}", "public function addStatsFacet(string $field): \\SolrQuery {}", "protected function getList() {\n\n $items = $this->getItems();\n if (empty($items)) {\n return '';\n }\n\n $collapseAfter = $this->getCollapse();\n $class = 'stf-facet-items';\n if ($this->getApp()->settings('use checkboxes for facets instead of links')) {\n $singleChoiceFacets = $this->getApp()->settings('facets limited to one choice');\n if (in_array($this->getName(), $singleChoiceFacets)) {\n $class .= ' stf-facet-radios';\n }\n else {\n $class .= ' stf-facet-checkboxes';\n }\n }\n if ($collapseAfter > -1) {\n $class .= ' stf-facet-collapse-outer';\n }\n if ($collapseAfter === 0) {\n $class .= ' stf-facet-collapse-all';\n }\n if ($this->isDate()) {\n $class .= ' stf-facet-date';\n }\n $output = ' <ul class=\"' . $class . '\">' . PHP_EOL;\n\n $listItems = $this->getListItems($this->getItems(), $collapseAfter);\n $output .= $listItems;\n\n // If this is a date facet, we may need to add more \"children\" of the\n // date hierarcy.\n if ($this->isDate()) {\n $currentValue = $this->getApp()->getParameter($this->getName());\n $showMonths = FALSE;\n $showDays = FALSE;\n if (!empty($currentValue)) {\n\n $numChars = strlen($currentValue);\n if ($numChars >= 4) {\n $showMonths = TRUE;\n }\n if ($numChars >= 7) {\n $showDays = TRUE;\n }\n }\n // If the months should be visible, we add a nested list.\n $dateGranularity = $this->getApp()->settings('date facet granularity');\n if (!empty($dateGranularity[$this->getName()])) {\n $dateGranularity = $dateGranularity[$this->getName()];\n }\n else {\n $dateGranularity = 'month';\n }\n if ($showMonths && 'year' != $dateGranularity) {\n $monthItems = $this->fetchItems($this->getName(), 'month');\n $listItems = $this->getListItems($monthItems, $collapseAfter, 'F');\n $output .= '<ul class=\"stf-facet-months\">' . $listItems;\n // If the days should be visible, we add another nested list.\n if ($showDays && 'day' == $dateGranulary) {\n $dayItems = $this->fetchItems($this->getName(), 'day');\n $listItems = $this->getListItems($dayItems, $collapseAfter, 'j');\n $output .= '<ul class=\"stf-facet-days\">' . $listItems;\n $output .= ' </ul>' . PHP_EOL;\n\n }\n $output .= ' </ul>' . PHP_EOL;\n }\n }\n $output .= ' </ul>' . PHP_EOL;\n return $output;\n }", "function settings_html() {\n?>\n <div class=\"facetwp-row\">\n <div><?php _e('Pager type', 'fwp'); ?>:</div>\n <div>\n <select class=\"facet-pager-type\">\n <option value=\"numbers\"><?php _e( 'Page numbers', 'fwp' ); ?></option>\n <option value=\"counts\"><?php _e( 'Result counts', 'fwp' ); ?></option>\n <option value=\"load_more\"><?php _e( 'Load more', 'fwp' ); ?></option>\n <option value=\"per_page\"><?php _e( 'Per page', 'fwp' ); ?></option>\n </select>\n </div>\n </div>\n <div class=\"facetwp-row\" v-show=\"facet.pager_type == 'numbers'\">\n <div>\n <div class=\"facetwp-tooltip\">\n <?php _e('Inner size', 'fwp'); ?>:\n <div class=\"facetwp-tooltip-content\"><?php _e( 'Number of pages to show on each side of the current page', 'fwp' ); ?></div>\n </div>\n </div>\n <div><input type=\"text\" class=\"facet-inner-size\" value=\"2\" /></div>\n </div>\n <div class=\"facetwp-row\" v-show=\"facet.pager_type == 'numbers'\">\n <div>\n <div class=\"facetwp-tooltip\">\n <?php _e('Dots label', 'fwp'); ?>:\n <div class=\"facetwp-tooltip-content\"><?php _e( 'The filler between the inner and outer pages', 'fwp' ); ?></div>\n </div>\n </div>\n <div><input type=\"text\" class=\"facet-dots-label\" value=\"…\" /></div>\n </div>\n <div class=\"facetwp-row\" v-show=\"facet.pager_type == 'numbers'\">\n <div>\n <div class=\"facetwp-tooltip\">\n <?php _e('Prev button label', 'fwp'); ?>:\n <div class=\"facetwp-tooltip-content\"><?php _e( 'Leave blank to hide', 'fwp' ); ?></div>\n </div>\n </div>\n <div><input type=\"text\" class=\"facet-prev-label\" value=\"« Prev\" /></div>\n </div>\n <div class=\"facetwp-row\" v-show=\"facet.pager_type == 'numbers'\">\n <div>\n <div class=\"facetwp-tooltip\">\n <?php _e('Next button label', 'fwp'); ?>:\n <div class=\"facetwp-tooltip-content\"><?php _e( 'Leave blank to hide', 'fwp' ); ?></div>\n </div>\n </div>\n <div><input type=\"text\" class=\"facet-next-label\" value=\"Next »\" /></div>\n </div>\n <div class=\"facetwp-row\" v-show=\"facet.pager_type == 'numbers'\">\n <div>\n <div class=\"facetwp-tooltip\">\n <?php _e('Number aria-label', 'a11y-for-fwp'); ?>:\n <div class=\"facetwp-tooltip-content\"><?php _e( 'Available tags: [page], and [pages]', 'a11y-for-fwp' ); ?></div>\n </div>\n </div>\n <div><input type=\"text\" class=\"facet-number-aria-label\" value=\"Go to [page] of [pages] of search results\" /></div>\n </div>\n <div class=\"facetwp-row\" v-show=\"facet.pager_type == 'counts'\">\n <div>\n <div class=\"facetwp-tooltip\">\n <?php _e('Count text (plural)', 'fwp'); ?>:\n <div class=\"facetwp-tooltip-content\"><?php _e( 'Available tags: [lower], [upper], and [total]', 'fwp' ); ?></div>\n </div>\n </div>\n <div><input type=\"text\" class=\"facet-count-text-plural\" value=\"[lower] - [upper] of [total] results\" /></div>\n </div>\n <div class=\"facetwp-row\" v-show=\"facet.pager_type == 'counts'\">\n <div><?php _e('Count text (singular)', 'fwp'); ?>:</div>\n <div><input type=\"text\" class=\"facet-count-text-singular\" value=\"1 result\" /></div>\n </div>\n <div class=\"facetwp-row\" v-show=\"facet.pager_type == 'counts'\">\n <div><?php _e('Count text (no results)', 'fwp'); ?>:</div>\n <div><input type=\"text\" class=\"facet-count-text-none\" value=\"No results\" /></div>\n </div>\n <div class=\"facetwp-row\" v-show=\"facet.pager_type == 'load_more'\">\n <div><?php _e('Load more text', 'fwp'); ?>:</div>\n <div><input type=\"text\" class=\"facet-load-more-text\" value=\"Load more\" /></div>\n </div>\n <div class=\"facetwp-row\" v-show=\"facet.pager_type == 'load_more'\">\n <div><?php _e('Loading text', 'fwp'); ?>:</div>\n <div><input type=\"text\" class=\"facet-loading-text\" value=\"Loading...\" /></div>\n </div>\n <div class=\"facetwp-row\" v-show=\"facet.pager_type == 'per_page'\">\n <div><?php _e('Default label', 'fwp'); ?>:</div>\n <div><input type=\"text\" class=\"facet-default-label\" value=\"Per page\" /></div>\n </div>\n <div class=\"facetwp-row\" v-show=\"facet.pager_type == 'per_page'\">\n <div>\n <div class=\"facetwp-tooltip\">\n <?php _e('Per page options', 'fwp'); ?>:\n <div class=\"facetwp-tooltip-content\"><?php _e( 'A comma-separated list of choices', 'fwp' ); ?></div>\n </div>\n </div>\n <div><input type=\"text\" class=\"facet-per-page-options\" value=\"10, 25, 50, 100\" /></div>\n </div>\n<?php\n }", "public function visit( FacetBuilder $facetBuilder )\n {\n $fieldpath=\"ezf_sp_words\";\n if( $facetBuilder->name != \"\" )\n {\n $facetname=\"{!ex=dt key=\" . $facetBuilder->name . \"}\" . $fieldpath;\n }\n \n return http_build_query(\n array(\n 'facet.field' => $facetname,\n 'f.' . $fieldpath . '.facet.limit' => $facetBuilder->limit,\n 'f.' . $fieldpath . '.facet.mincount' => $facetBuilder->minCount,\n 'f.' . $fieldpath . '.facet.prefix' => $facetBuilder->searchpart,\n )\n );\n }", "function theme_solr_search_form($form) {\n if (!isset($repeat)) {\n $repeat = variable_get('islandora_solr_search_block_repeat', '3');\n }\n\n $output = drupal_render($form['search_type']['type1']);\n $output .= drupal_render($form['fedora_terms1']);\n $output .= drupal_render($form['andor1']) . drupal_render($form['search_type']['type2']);\n $output .= drupal_render($form['fedora_terms2']);\n if ($repeat > 2 && $repeat < 9) {\n for ($i = 3; $i < $repeat + 1; $i++) {\n $t = $i - 1;\n $output .= drupal_render($form[\"andor$t\"]) . drupal_render($form['search_type'][\"type$i\"]);\n $output .= drupal_render($form[\"fedora_terms$i\"]);\n }\n }\n $output .= drupal_render($form['submit']);\n $output .= drupal_render($form);\n return $output;\n }", "protected function getWrapper()\n {\n $class = $this->center ? ' pagination-centered' : '';\n\n return '<div class=\"pagi-wrapper '.$class.'\"><ul class=\"pagination\">';\n }", "function __manidora_homepage_thumbnail_content(){\n module_load_include('php','islandora_solr','SolrPhpClient/Apache/Solr/Service');\n $num_pics = 16; // How many thumbnails are we displaying\n $num_rows = 2; // Figure out when to break\n $thumbs = variable_get('manidora_thumbnail_pids'); // Get the pids from the variable\n $output = \"\";\n if (!is_null($thumbs)){ // If its null we display nothing.\n $t_array = explode('~',urldecode($thumbs));\n /** \n * This is temporary for debugging, we extend the array by duplicating it to see the full selection.\n */\n if (count($t_array)<$num_pics){\n $dup = intval($num_pics / count($t_array)) + 1;\n $new_arr = array();\n for ($foo = 0; $foo < $dup; $foo += 1){\n $new_arr = array_merge($new_arr,$t_array);\n }\n $t_array = $new_arr;\n }\n /** \n * End temporary extension\n */\n /**\n * We want to have the image title as mouseover in the block\n */\n $solr_query = '+PID:(\"'.implode('\" \"',$t_array).'\")'; // Search for all the possible PIDs\n $solr_params = array('fl'=>'PID,dc.title'); // Get the PID and dc.title\n $path_parts = parse_url(variable_get('islandora_solr_url', 'localhost:8080/solr')); \n #$path_parts = parse_url('digitalcollections.lib.umanitoba.ca:8080/solr');\n $solr = new Apache_Solr_Service($path_parts['host'], $path_parts['port'], $path_parts['path'] . '/');\n\n $solr->setCreateDocuments(0);\n $results = $solr->search($solr_query,0,100,$solr_params);\n if ($results){\n $solr_results = json_decode($results->getRawResponse(), TRUE);\n $data = array();\n foreach ($solr_results[\"response\"][\"docs\"] as $key => $doc){\n $data[$doc['PID']] = $doc['dc.title'][0];\n }\n }\n if (count($t_array)>=$num_pics){\n $picked = array_rand($t_array,$num_pics);\n $output = '<div id=\"manidora-homepage-thumbs\">';\n foreach ($picked as $pid){\n $title = '';\n // If $data is an array and has a key of the current PID, then we know the title\n if (isset($data) && is_array($data) && array_key_exists($t_array[$pid],$data)){\n $title = 'title=\"' . check_plain($data[$t_array[$pid]]) . '\" ';\n }\n $output .= '<a '.$title.'href=\"' . url(\"islandora/object/\" . $t_array[$pid]) .'\" class=\"manidora-homepage-thumb-link\"><img src=\"' . url(\"islandora/object/\" . $t_array[$pid] . \"/datastream/TN/view\") . '\" alt=\"Object '. check_plain($t_array[$pid]) .'\" class=\"manidora-homepage-thumb-img\" /></a>' . \"\\n\";\n }\n $output .= \"</div> <!-- /#manidora-homepage-thumbs -->\\n\";\n }\n }\n return $output;\n}", "function fusion_wrap_embed_with_div( $html ) {\n\t$wrapper = '<div class=\"video-shortcode\">';\n\t$wrapper .= $html;\n\t$wrapper .= '</div>';\n\n\treturn $wrapper;\n}", "function printResults($results) {\n drupal_add_css(drupal_get_path('module', 'upei_vre_leg') . '/css/upei_vre_leg.css');\n global $base_url;\n $items = array();\n $type = \"ol\";\n $title = NULL;\n $recordStart = $results->response->start;\n $limitResults = variable_get('islandora_solr_search_limit_result_fields', 0);\n $rawResponse = $results->getRawResponse();\n $responseArray = json_decode($rawResponse, true);\n $docs = $responseArray['response']['docs'];\n //retrieve 'highlighing' from resultset.\n $highlightResults = $responseArray['highlighting'];\n $highlights = $results->highlighting;\n\n foreach ($highlights as $highlight) {\n $fields = get_object_vars($highlight);\n $keys = array_keys($fields);\n if (count($keys) > 0) {\n foreach ($highlight->$keys[0] as $body) {\n //drupal_set_message(\"$keys[0] $body\");\n }\n }\n //drupal_set_message($highlight->$keys[0]);\n }\n\n global $base_url;\n if (empty($results)) {\n return \"no results\";\n }\n $q = $responseArray['responseHeader']['params']['q'];\n //we need to get rid of fields and delimiters, the book assumes full text search only\n $terms = preg_split('/\"| or | OR | and | AND |[a-z._A-Z]*:|#(?<!\\\\\\)\\:#/', $q);\n //q_string should now be only the words searched for in the solr block minus the fields and modifiers\n $q_string = trim(implode(\" \", $terms));\n foreach ($results->response->docs as $doc) {\n $rows = array();\n $row = 0;\n $snippet = NULL;\n $sequence_number_variable = 'rels.isSequenceNumber';\n $pid = $doc->PID;\n $cmodel_field = 'rels.hasModel';\n $cmodel = $doc->$cmodel_field;\n if ($cmodel == 'info:fedora/islandora:biography_image_CModel') {\n $link_pid = $doc->PID;\n $link_title = $doc->title;\n $l = l($link_title, 'fedora/repository/' . htmlspecialchars($link_pid, ENT_QUOTES, 'utf-8'));\n }\n else {\n $link_pid = isset($doc->PARENT_pid_s) ? $doc->PARENT_pid_s : $doc->PID;\n $link_title = isset($doc->title) ? $doc->title : $doc->PID;\n $l = l($link_title, 'fedora/repository/' . htmlspecialchars($link_pid, ENT_QUOTES, 'utf-8'), array('query' => array('startpage' => $doc->{\"$sequence_number_variable\"}, 'solrq' => $q_string)));\n }\n\n\n $rows[$row][] = array('data' => l(\"<img src = '$base_url/fedora/repository/\" . $pid . \"/TN' class='upei_vre_leg_align-left upei_vre_leg_frame'/>\", 'fedora/repository/' . htmlspecialchars($link_pid, ENT_QUOTES, 'utf-8'), array('query' => array('startpage' => $doc->{\"$sequence_number_variable\"}, 'solrq' => $q_string), 'html' => TRUE)),\n 'rowspan' => 8);\n\n $rows[$row][] = array(\n 'data' => 'Title:',\n 'header' => TRUE,\n );\n $rows[$row++][] = array(\n 'data' => $l,\n );\n if (isset($doc->mods_affiliation)) {\n $rows[$row][] = array(\n 'data' => 'Affiliation(s):',\n 'header' => TRUE,\n );\n $rows[$row++][] = array(\n 'data' => $doc->mods_affiliation,\n );\n }\n if (isset($doc->region)) {\n $rows[$row][] = array(\n 'data' => 'Riding(s):',\n 'header' => TRUE,\n );\n $rows[$row++][] = array(\n 'data' => $doc->region,\n );\n }\n if (isset($doc->mods_occupation)) {\n $rows[$row][] = array(\n 'data' => 'Occupation(s):',\n 'header' => TRUE,\n );\n $rows[$row++][] = array(\n 'data' => $doc->mods_occupation,\n );\n }\n if (isset($doc->mods_role)) {\n $rows[$row][] = array(\n 'data' => 'Office(s):',\n 'header' => TRUE,\n );\n $offices = $doc->mods_role; \n if(is_array($offices)){\n $offices = implode(', ', $offices);\n }\n $rows[$row++][] = array(\n 'data' => $offices,\n );\n }\n //PARENT_dateIssued_s\n if ($doc->PARENT_dateIssued_s) {\n $rows[$row][] = array(\n 'data' => 'Date:',\n 'header' => TRUE,\n );\n $rows[$row++][] = array(\n 'data' => $doc->PARENT_dateIssued_s,\n );\n }\n if (isset($doc->ocr_text)) {\n $rows[$row][] = array(\n 'data' => 'Snippet:',\n 'header' => TRUE,\n );\n $rows[$row++][] = array(\n 'data' => $doc->ocr_text,\n );\n }\n if (!empty($doc->PARENT_session_s)) {\n $rows[$row][] = array(\n 'data' => 'Source:',\n 'header' => TRUE,\n );\n $rows[$row++][] = array(\n 'data' => 'Part of ' . (string) 'Session ' . $doc->PARENT_session_s . ', Assembly ' . (string) $doc->PARENT_assembly_s,\n );\n }\n if (isset($doc->PARENT_genre_s)) {\n $rows[$row][] = array(\n 'data' => 'Type:',\n 'header' => TRUE,\n );\n $rows[$row++][] = array(\n 'data' => $doc->PARENT_genre_s,\n );\n }\n\n if (isset($doc->PARENT_topis_s)) {\n $rows[$row][] = array(\n 'data' => 'Topic:',\n 'header' => TRUE,\n );\n $rows[$row++][] = array(\n 'data' => $doc->PARENT_topic_s,\n );\n }\n\n if (isset($doc->PARENT_subject_s)) {\n $rows[$row][] = array(\n 'data' => 'Subject:',\n 'header' => TRUE,\n );\n $rows[$row++][] = array(\n 'data' => $doc->PARENT_subject_s,\n );\n }\n if (isset($doc->subject)) {\n $rows[$row][] = array(\n 'data' => 'Subject(s):',\n 'header' => TRUE,\n );\n $rows[$row++][] = array(\n 'data' => implode(', ', $doc->subject),\n );\n }\n if (isset($doc->coverage)) {\n $rows[$row][] = array(\n 'data' => 'Information:',\n 'header' => TRUE,\n );\n $rows[$row++][] = array(\n 'data' => implode(', ', $doc->coverage),\n );\n }\n \n if (is_array($keys)) {\n $snippet = $highlightResults[$value][$keys[0]];\n }\n\n if ($snippet) {\n $rows[$row][] = array(\n 'data' => 'Full Text',\n 'header' => TRUE,\n );\n $rows[$row][] = $snippet[0];\n }\n //$tnString = \"<img src = '$base_url/fedora/repository/\" . $pid . \"/TN' class='upei_vre_leg_align-left upei_vre_leg_frame'/>\";\n $items[] = theme_table(NULL, $rows, array('class' => 'islandora_solr_search_results_object'));\n }\n\n $output = theme_item_list($items, $title, $type, array('class' => 'stuff', 'start' => ($recordStart + 1)));\n if (variable_get('islandora_solr_search_debug_mode', 0)) { // debug dump\n $results_r .= \"<pre>Results: \" . print_r($results, TRUE) . \"</pre>\";\n $fieldset_r = array(\n '#title' => t(\"Raw Results\"),\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n '#value' => $results_r,\n );\n $output .= theme('fieldset', $fieldset_r);\n }\n return $output;\n }", "function _perform_solr_search($queryparam = 'dummy') {\n\n // TODO: needs tidying.\n // encode the queryparam?\n\n $params = array();\n $params['rows'] = 50;\n $params['start'] = 0;\n $params['indent'] = 'on';\n $params['q'] = $queryparam;\n $params['version'] = '2.2';\n\n $params['fl'] = \"*\";\n $params['qt'] = \"standard\";\n $params['wt'] = \"json\";\n $params['hl'] = \"true\";\n $params['hl.fl'] = \"dc.type\";\n\n // If we display all items without pager.\n if ($params['rows'] == 0) {\n $params['rows'] = 1000000;\n }\n\n // Add filters to parameters.\n if (isset($params['filters'])) {\n $params['fq'] = $params['filters'];\n }\n\n // Add sorting.\n if (isset($params['sort'])) {\n // Populate sorting parameters.\n foreach ($params['sort'] as $field => $order) {\n $params['sort'][] = $field . ' ' . $order;\n }\n }\n\n // Set query.\n $dismax = NULL;\n if (isset($params['q'])) {\n // Query.\n $query = $params['q'];\n\n // Dismax.\n if (isset($params['defType']) AND $params['defType'] == 'dismax') {\n $dismax = $params['defType'];\n // If no qf fields are specified in the requestHandler\n // a default list is supplied here for dismax searches.\n $params['qf'] = 'dc.title^5 dc.subject^2 dc.description^2 dc.creator^2 dc.contributor^1 dc.type';\n }\n }\n else {\n $query = '*:*';\n }\n\n $url = variable_get('islandora_solr_search_block_url', 'http://localhost:8080/solr');\n $pathparts = parse_url($url);\n\n $solr = new Apache_Solr_Service($pathparts['host'], $pathparts['port'], $pathparts['path'] . '/');\n $solr->setCreateDocuments(0);\n\n // This is where the query gets executed and output starts being created.\n try {\n $results = $solr->search($query, $params['start'], $params['rows'], $params);\n } catch (Exception $e) {\n drupal_set_message(t('_perform_solr_search :: ') . $e->getMessage());\n }\n\n// $total = (int) $results->response->numFound;\n// $start = min(1, $total);\n// $end = min(($limit + $recordstart), $total);\n\n return $results;\n}", "public function getFacet() {\n return $this->facet;\n }", "public function setSolrResponse($solrResponse);", "protected function addWrapper()\n {\n $this->html = '<input type=\"checkbox\"' . $this->html . \"> \" . \n $this->displayValue . \"</br>\";\n }", "public function facet() : Stage\\Facet\n {\n return $this->builder->facet();\n }", "function hook_search_api_solr_search_results_alter(\\Drupal\\search_api\\Query\\ResultSetInterface $result_set, \\Drupal\\search_api\\Query\\QueryInterface $query, \\Solarium\\QueryType\\Select\\Result\\Result $result) {\n $result_data = $result->getData();\n if (isset($result_data['facet_counts']['facet_fields']['custom_field'])) {\n // Do something with $result_set.\n }\n}", "public function front_scripts() {\n?>\n\t\t<script>\n\t\t(function($) {\n\t\t\twp.hooks.addAction('facetwp/refresh/geometa', function($this, facet_name) {\n\t\t\t\tFWP.facets[facet_name] = $this.find('.facetwp-geometa').val() || '';\n\t\t\t});\n\n\t\t\twp.hooks.addAction('facetwp/ready', function() {\n\t\t\t\t$(document).on('change', '.facetwp-facet .facetwp-geometa', function() {\n\t\t\t\t\tFWP.refresh();\n\t\t\t\t});\n\t\t\t});\n\t\t})(jQuery);\n\t\t</script>\n<?php\n\t}", "protected function renderWidget()\n {\n $content = null;\n\n //If [$this->asFormPart === true] then create hidden textarea inside wrapper to seva passed data\n if($this->asFormPart){\n $content = $this->getTextArea();\n }\n \n $tag = $this->getWrapperTag();\n ArrayHelper::remove($this->wrapperOptions, 'tag');\n \n return Html::tag($tag, $content, $this->wrapperOptions);\n }", "function buildSolrQuery(){\n\t\n\t\t $this->queryPageRecs(); //set page and offset parameters for query\n\t\t $this->set_offset();\n\t\t $this->set_default_context(); //set default context path\n\t\t $this->checkTaxaPeopleFacets(); //check to see if we need to get taxa and people facets\n\t\t $this->makeGeoFromRequestParam(); //make geo parameters, if needed\t\n\t\t \n\t\t \n\t\t $requestParams = $this->requestParams;\n\t\t $slashCount = $this->slashCount;\n\t\t $context_depth = $this->context_depth;\n\t\t \n\t\t /*\n\t\t if(isset($requestParams[\"eol\"])){\n\t\t\t\t//this makes translates a taxon idenfied in the request to a set of || (OR) deliminated children taxon URIs for a \"rel[]\" parameter request\n\t\t\t\t$eolReq = $requestParams[\"eol\"];\n\t\t\t\t$hierarchyObj = new Facets_Hierarchy ;\n\t\t\t\t$relReq = $hierarchyObj->generateRelSearchEquivalent($eolReq , \"eol\");\n\t\t\t\tif($relReq != false){\n\t\t\t\t\t if($hierarchyObj->countReqChildren >= 5){\n\t\t\t\t\t\t $this->doPost = true;\n\t\t\t\t\t }\n\t\t\t\t\t $requestParams[\"rel\"][] = $relReq;\n\t\t\t\t\t $requestParams[\"rel\"][] = $hierarchyObj->getVocabRelationType(\"eol\");\n\t\t\t\t}\n\t\t\t\tunset($hierarchyObj);\n\t\t }\n\t\t */\n\t\t \n\t\t $hierarchyObj = new Facets_Hierarchy ;\n\t\t $requestParams = $hierarchyObj->hierarchicConversion($requestParams);\n\t\t if($hierarchyObj->countReqChildren >= 5){\n\t\t\t\t$this->doPost = true;\n\t\t }\n\t\t unset($hierarchyObj);\n\t\t \n\t\t $extendedFacets = OpenContext_FacetQuery::unfold_deep_parameters($requestParams, $slashCount);\n\t\t \n\t\t \n\t\t $DocumentTypes = $this->makeDocumentTypeArray();\n\t\t \n\t\t $param_array = array();\n\t\t $param_array = OpenContext_FacetQuery::build_simple_parameters($requestParams, $DocumentTypes);\n\t\t $param_array = OpenContext_FacetQuery::build_complex_parameters($requestParams, $param_array, $context_depth);\n\t\t\t \n\t\t //echo \"here's the context depth:\".print_r($param_array); \n\t\t \n\t\t \n\t\t $param_array = $this->requestSorting($param_array); //set sorting (if needed)\n\t\t $param_array = $this->addFacetFields($param_array);\n\t\t \n\t\t if($this->table && !$this->allDocs){\n\t\t\t //get rid of the project facet for tables, it's not needed or wanted.\n\t\t\t \n\t\t\t $fixedFacets = array();\n\t\t\t foreach($param_array[\"facet.field\"] as $facetField){\n\t\t\t if($facetField != \"project_name\" && $facetField != \"creator\"){\n\t\t\t\t $fixedFacets[] = $facetField ;\n\t\t\t }\n\t\t\t }\n\t\t\t $param_array[\"facet.field\"] = $fixedFacets;\n\t\t\t unset($fixedFacets);\n\t\t\t $this->showPeopleFacets = true;\n\t\t }\n\t\t \n\t\t if($this->showTaxaFacets){\n\t\t\t $param_array[\"facet.field\"][] = \"top_taxon\";\n\t\t }\n\t\t if($this->showPeopleFacets){\n\t\t\t $param_array[\"facet.field\"][] = \"person_link\";\n\t\t }\n\t\t else{\n\t\t\t\tif(array_search(\"creator\", $param_array[\"facet.field\"])){\n\t\t\t\t\t$badKey = array_search(\"creator\", $param_array[\"facet.field\"]);\n\t\t\t\t\tunset($param_array[\"facet.field\"][$badKey]);\n\t\t\t\t}\n\t\t }\n\t\t \n\t\t \n\t\t if($this->reconcile){\n\t\t\t\t//reconcilation doesn't need many facets, remove superfluous ones\n\t\t\t\t$skipFacets = array(\"project_name\", \"creator\", \"item_class\", \"person_link\",\n\t\t\t\t\t\t\t\t\t\"contributor\", \"image_media_count\", \"other_binary_media_count\",\n\t\t\t\t\t\t\t\t\t\"diary_count\");\n\t\t\t\t\t\n\t\t\t\t$fixedFacets = array();\n\t\t\t\tforeach($param_array[\"facet.field\"] as $facetField){\n\t\t\t\t\tif(!in_array($facetField, $skipFacets)){\n\t\t\t\t\t\t$fixedFacets[] = $facetField ;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$param_array[\"facet.field\"] = $fixedFacets;\n\t\t\t\tunset($fixedFacets);\n\t\t }\n \n\t\t \n\t\t \n\t\t $default_context_path = $this->default_context_path;\n\t\t if (!$default_context_path) {\n\t\t\t\t$query = \"*:*\";\n\t\t\t // otherwise, query for the default context path.\n\t\t } else {\n\t\t\t\t$query = \"default_context_path:\" . $default_context_path . \"*\";\n\t\t } \n\t\t\t \n\t\t $contextArray = Opencontext_FacetQuery::defaultContextORparser(\"default_context_path\", $this->original_default_context_path);\n\t\t $query = $contextArray[\"query\"];\n\t\t if(!stristr($query, \"default_context_path\")){\n\t\t\t\t$query = \"*:*\";\n\t\t }\n\t\t \n\t\t if($this->geoParam != false){\n\t\t\t\t$query = \"(\".$query.\") && (\".$this->geoParam.\")\";\n\t\t\t\tif(is_array($this->geoFacets)){\n\t\t\t\t\t foreach($this->geoFacets as $geoFacet){\n\t\t\t\t\t\t $param_array[\"facet.field\"][] = $geoFacet;\n\t\t\t\t\t }\n\t\t\t\t}\n\t\t }\n\t\t \n\t\t unset($param_array[\"bq\"]);\n\t\t //$param_array[\"bq\"][] = \"{item_type:site^10}\";\n\t\t //$param_array[\"fq\"] .= \" && item_type:site^10\";\n\t\t //$param_array[\"bq\"][] = \"!item_type:project^5\";\n\t\t \n\t\t \n\t\t if($this->allDocs){\n\t\t\t //query .= \"&hl=true\";\n\t\t\t $param_array[\"hl\"] = \"true\";\n\t\t\t $param_array[\"hl.fl\"] = \"full_text\";\n\t\t\t $param_array[\"hl.fragsize\"] = 140;\n\t\t\t $param_array['hl.simple.pre'] = '<strong>';\n\t\t\t $param_array['hl.simple.post'] = '</strong>';\n\t\t }\n\t\t \n\t\t if($this->facetSort){\n\t\t\t\t$param_array[\"facet.sort\"] = \"index\";\n\t\t }\n\t\t \n\t\t //$query .= \" item_type:site^10\";\n\t\t $this->param_array = $param_array;\n\t\t $this->query = $query;\n\t\t \n\t\t //echo print_r($param_array);\n\t\n }", "public function renderWidget()\r\n\t{\r\n\t\t$startDate = '2018-01-01';\r\n\t\t$endDate = '2018-12-31';\r\n\t\t$dates = Yii::$app->request->get('daterange',date(\"Y-m-d\") .' - ' . date(\"Y-m-d\", strtotime('+1 year')));\r\n\t\t$dates = explode(' - ',$dates);\r\n\t\tif (isset($dates[0]) && Util::isValidDate($dates[0]))\r\n\t\t\t$startDate = $dates[0];\r\n\t\t\r\n\t\tif (isset($dates[1]) && Util::isValidDate($dates[1]))\r\n\t\t\t$endDate = $dates[1];\r\n\t\t\r\n\t\t$carSearchModel = new CarSearch();\r\n\t\t$carSearchModel->load(Yii::$app->request->queryParams);\r\n\t\techo $this->render('quickSearch',['area'=>$carSearchModel->area,'area_id'=>$carSearchModel->area_id, 'startDate'=>$startDate,'endDate'=>$endDate]);\r\n\t}", "public function addFacetField(string $field): \\SolrQuery {}", "public function addFacetField(string $field): \\SolrQuery {}", "function _cmc_products_prepare_result_solr_content($result) {\n $rows = array();\n foreach($result['results'] as $id => $item) {\n $rows[$id]['title'] = $item['fields']['title'];\n $rows[$id]['field_instrument_code'] = strip_tags($item['fields']['field_instrument_code'],'<strong>');\n }\n return $rows;\n}", "function s4w_get_facet_result_count($fqitms, $searchtxt=\"\") {\n $output = new stdclass();\n $output->status = FALSE; \n //if no facet items have been supplied return appropriate msg\n if(count($fqitms)>0) {\n //if no qry is given send wildcard (\"*\") as the search txt\n $qry = (strlen($qry)>0)?$searchtxt:\"*\";\n //order the result by post date DESC\n $sort = \"postdate desc\";\n //query solr\n $results = s4w_query($qry, 0, 0, $fqitms, $sort);\n if ($results) {\n $output->status = TRUE; \n $output->itemsfound = $results->response->numFound;\n $output->time = $results->responseHeader->QTime/1000;\n }\n else { // no result returned\n $output->msg = \"No result\";\n }\n }\n else { //no facet items provided\n $output->msg = 'No query facets provided';\n }\n return $output;\n}", "function acf_render_field_wrap($field, $element = 'div', $instruction = 'label')\n{\n}", "protected function render() {\n\n\t\t$settings = $this->get_settings_for_display();\n\t\t$services_icon = $settings['portfolio_services_icon'];\n\t\t$services_title = $settings['portfolio_services_title'];\n\t\t$services_description = $settings['portfolio_services_description'];\n\n ?>\n\t\t<!-- Services Output Start Here -->\n\t\t\t<div class=\"service-box\">\n\t\t\t\t<div class=\"service-icon\">\n\t\t\t\t\t<span><?php echo $services_icon; ?></span>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"service-content\">\n\t\t\t\t\t<h3><?php echo $services_title; ?></h3>\n\t\t\t\t\t<p><?php echo $services_description; ?></p>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t<!-- Services End Here -->\n <?php\n\t}", "function widget($args, $instance) {\n global $careerfy_framework_options;\n extract($args, EXTR_SKIP);\n\n $title = empty($instance['title']) ? '' : apply_filters('widget_title', $instance['title']);\n $title = htmlspecialchars_decode(stripslashes($title));\n $username = empty($instance['username']) ? ' ' : apply_filters('widget_title', $instance['username']);\n $no_of_photos = empty($instance['no_of_photos']) ? ' ' : apply_filters('widget_title', $instance['no_of_photos']);\n if ('' === $instance['no_of_photos']) {\n $instance['no_of_photos'] = '3';\n }\n $before_widget = isset($args['before_widget']) ? $args['before_widget'] : '';\n $after_widget = isset($args['after_widget']) ? $args['after_widget'] : '';\n\n echo ( $before_widget );\n if ('' !== $title) {\n echo ( $before_title ) . esc_html($title) . ( $after_title );\n }\n\n $get_flickr_array = array();\n $apikey = isset($careerfy_framework_options['careerfy-flickr-api']) ? $careerfy_framework_options['careerfy-flickr-api'] : '';\n if ('' !== $apikey) {\n wp_enqueue_style('careerfy-fancybox-style');\n wp_enqueue_script('careerfy-fancybox-script');\n // Getting transient.\n $cachetime = 86400;\n $transient = 'flickr_gallery_data';\n $check_transient = get_transient($transient);\n // Get Flickr Gallery saved data.\n $saved_data = get_option('flickr_gallery_data');\n $db_apikey = '';\n $db_user_name = '';\n $db_total_photos = '';\n if ('' !== $saved_data) {\n $db_apikey = isset($saved_data['api_key']) ? $saved_data['api_key'] : '';\n $db_user_name = isset($saved_data['user_name']) ? $saved_data['user_name'] : '';\n $db_total_photos = isset($saved_data['total_photos']) ? $saved_data['total_photos'] : '';\n }\n if (false === $check_transient || ($apikey !== $db_apikey || $username !== $db_user_name || $no_of_photos !== $db_total_photos)) {\n $user_id = 'https://api.flickr.com/services/rest/?method=flickr.people.findByUsername&api_key=' . $apikey . '&username=' . $username . '&format=json&nojsoncallback=1';\n $user_info = wp_remote_get($user_id, array('decompress' => false));\n\n if (is_array($user_info)) {\n $user_info = isset($user_info['body']) ? $user_info['body'] : '';\n\n $user_info = json_decode($user_info, true);\n if (isset($user_info['stat']) && 'ok' === $user_info['stat']) {\n $user_get_id = $user_info['user']['id'];\n $get_flickr_array['api_key'] = $apikey;\n $get_flickr_array['user_name'] = $username;\n $get_flickr_array['user_id'] = $user_get_id;\n $url = 'https://api.flickr.com/services/rest/?method=flickr.people.getPublicPhotos&api_key=' . $apikey . '&user_id=' . $user_get_id . '&per_page=' . $no_of_photos . '&format=json&nojsoncallback=1';\n $content = wp_remote_get($url, array('decompress' => false));\n if (!is_array($content)) {\n return false;\n }\n $content = isset($content['body']) ? $content['body'] : '';\n $content = json_decode($content, true);\n if ('ok' === $content['stat']) {\n $counter = 0;\n echo '<ul>';\n foreach ((array) $content['photos']['photo'] as $photo) {\n $image_file = \"https://farm{$photo['farm']}.staticflickr.com/{$photo['server']}/{$photo['id']}_{$photo['secret']}_s.jpg\";\n $img_headers = @get_headers($image_file);\n if (strpos($img_headers[0], '200') !== false) {\n $image_file = $image_file;\n } else {\n $image_file = \"https://farm{$photo['farm']}.staticflickr.com/{$photo['server']}/{$photo['id']}_{$photo['secret']}_q.jpg\";\n $img_headers = @get_headers($image_file);\n if (strpos($img_headers[0], '200') !== false) {\n $image_file = $image_file;\n } else {\n $image_file = careerfy_framework_get_url('images/no-image-grid2.jpg');\n }\n }\n echo '<li>'\n . '<a href=\"https://www.flickr.com/photos/' . $photo['owner'] . '/' . $photo['id'] . '/\" target=\"_blank\">'\n . '<img src=\"' . esc_url($image_file) . '\" alt=\"\">'\n . '</a>'\n . '</li>';\n $counter ++;\n $get_flickr_array['photo_src'][] = $image_file;\n $get_flickr_array['photo_title'][] = $photo['title'];\n $get_flickr_array['photo_owner'][] = $photo['owner'];\n $get_flickr_array['photo_id'][] = $photo['id'];\n }\n echo '</ul>';\n $get_flickr_array['total_photos'] = $counter;\n // Setting Transient.\n set_transient($transient, true, $cachetime);\n update_option('flickr_gallery_data', $get_flickr_array);\n if ($counter == 0) {\n _e('No results found.', 'careerfy-frame');\n }\n } else {\n echo esc_html(__('Error: ', 'careerfy-frame')) . $content['code'] . ' - ' . $content['message'];\n }\n } else {\n echo esc_html(__('Error: ', 'careerfy-frame')) . $user_info['code'] . ' - ' . $user_info['message'];\n }\n } else {\n _e('No results found.', 'careerfy-frame');\n }\n } else {\n if (get_option('flickr_gallery_data') <> '') {\n $flick_data = get_option('flickr_gallery_data');\n echo '<ul>';\n if (isset($flick_data['photo_src'])) :\n $i = 0;\n foreach ($flick_data['photo_src'] as $ph) {\n echo '<li>';\n echo '\n <figure> \n <a target=\"_blank\" href=\"https://www.flickr.com/photos/' . $flick_data['photo_owner'][$i] . '/' . $flick_data['photo_id'][$i] . '/\"><img alt=\"\" src=\"' . esc_url($flick_data['photo_src'][$i]) . '\"></a>\n </figure>';\n echo '</li>';\n $i ++;\n }\n endif;\n echo '</ul>';\n } else {\n _e('No results found.', 'careerfy-frame');\n }\n }\n } else {\n _e('API key error.', 'careerfy-frame');\n }\n echo ( $after_widget );\n }", "function newspaper_theme_apachesolr_search_browse_blocks($vars) {\n $result = '';\n if ($vars['content']['#children']) {\n $result .= \"<div class='apachesolr-browse-blocks'>\\n<h3>\" . t('Or Start a Search By:') . \"</h3>\\n\";\n $result .= '<div class=\"blocks row\">';\n $result .= $vars['content']['#children'] . \"\\n</div>\\n\";\n $result .= '</div>';\n }\n\n return $result;\n}", "public function getHTML() {\n\n\t\t$widget = new Widget();\n\t\t$widget->number = $this->id; // needed to make a unique id for the widget html element.\n\t\tob_start();\n\t\t$args = self::$collection[ $this->id ];\n\t\t$args['is_shortcode'] = true; // indicate that we are doing shortcode processing to outputting funtions.\n\t\t$widget->widget(array(\n\t\t\t'before_widget' => '',\n\t\t\t'after_widget' => '',\n\t\t\t'before_title' => '',\n\t\t\t'after_title' => '',\n\t\t), $args);\n\t\t$ret = ob_get_clean();\n\t\t$ret = '<div id=\"' . esc_attr( $this->id ) . '\" class=\"' . esc_attr( $this->class ) . '\">' . $ret . '</div>';\n\t\treturn $ret;\n\t}", "function apachesolr_panels_apachesolr_form_content_type_render($subtype, $conf, $panel_args, $context) {\n $block = new stdClass();\n $block->module = 'search';\n $block->delta = 'form';\n $block->title = '';\n\n $search = apachesolr_panels_static_search_cache();\n\n // Set destination path depending on setting.\n switch ($conf['path_type']) {\n default:\n case 'same':\n $menu_item = menu_get_item();\n $path = $menu_item['href'];\n break;\n case 'custom':\n $path = $conf['path'];\n break;\n }\n\n // Set keys depending on setting.\n if ($conf['show_keys'] && $search) {\n $keys = $search['keys'];\n }\n else {\n $keys = '';\n }\n\n // Set prompt depending on setting.\n $prompt = $conf['override_prompt'] ? $conf['prompt'] : NULL;\n\n ctools_include('form');\n module_load_include('inc', 'search', 'search.pages');\n\n $form_state = array(\n 'no_redirect' => TRUE,\n 'args' => array(url($path), $keys, 'apachesolr_panels', $prompt),\n );\n\n $block->content = ctools_build_form('apachesolr_panels_search_form', $form_state);\n\n // We do the redirect manually because the built in search form is stupid\n // and won't redirect even though action is a valid argument for it.\n if (empty($block->content)) {\n drupal_goto($path .'/'. $form_state['values']['processed_keys']);\n }\n\n return $block;\n}", "public function settings_html() {\n\t\tprint '<tr><td>'; \n\t\tprint \"<label>Initial Map View</label>\";\n\t\tprint \"<p>The map shown in the facet will use the same zoom level and center as the map shown below, but will be scaled to fit the facet area.</p>\";\n\t\tprint \"\n\t\t<!-- START THE LEAFLETPHP MAP -->\n\t\t\";\n\t\t$map = new LeafletPHP(array(), 'geometa_draw_map', 'geometa_draw_map');\n\n\t\t// Can't Geolocate if it's not SSL.\n\t\tif ( is_ssl() ) {\n\t\t\t$map->add_control('L.Control.Locate', array(\n\t\t\t\t\t'icon' => 'pointer_marker',\n\t\t\t\t\t'iconLoading' => 'pointer_marker_loading'\n\t\t\t), 'location');\n\t\t}\n\n\t\tprint $map;\n\t\tprint \"\n\t\t<!-- END THE LEAFLETPHP MAP -->\n\t\t\";\n\t\tprint '<br>';\n\n\t\tprint '<label>Show Geocoder <input type=\"checkbox\" name=\"map_show_geocoder\" value=\"show_geocoder\"></label>';\n\t\tprint '<p>You will need to acquire a key for <a href=\"https://geocod.io/\" target=\"_blank\">Geocod.io</a>, then define it with <pre>define( \\'GEOCODIO_API_KEY\\', \\'your_key_here\\' );</pre></p>';\n\t\tprint '<p>If you do not do this, the geocoding input will not show up, even with this checkbox checked</p>';\n\t\tprint '</td></tr>';\n\t}", "function rc_class_facet_wp_template( $attributes ) {\n\t$attributes['class'] .= ' facetwp-template';\n\treturn $attributes; \n}", "private function dsp_admin_widget_spotlight($args = '')\n {\n $data['arr_all_position'] = $this->model->qry_all_spotlight();\n //print_r($data['arr_all_position']);\n $data['selected'] = 0;\n $data['widget_style'] = '';\n $data['display_mode'] = '';\n try\n {\n $args = @new SimpleXMLElement($args, LIBXML_NOCDATA);\n $data['selected'] = (int) $args->spotlight_position;\n $data['widget_style'] = (string) $args->widget_style;\n $data['display_mode'] = (string) $args->display_mode;\n }\n catch (Exception $ex)\n {\n \n }\n $html = $this->admin_widget_header();\n ob_start();\n $this->view->set_layout(NULL)->render('dsp_admin_widget_spotlight', $data);\n $html .= ob_get_clean();\n $html .= $this->admin_widget_footer();\n\n return $html;\n }", "function scholarly_preprocess_islandora_solr(&$variables) {\n drupal_set_title(t(\"Search results\"));\n if (!isset($variables['results'])) {\n return;\n }\n $fieldsep = variable_get('islandora_solr_search_field_value_separator', ', ');\n foreach ($variables['results'] as $key => $result) {\n $displayvalue = 'closed access';\n $displayclass = 'ubl-embargo-full-eternal';\n if (isset($result['solr_doc']['related_mods_accessCondition_type_ms']['value'])) {\n $accessCondType = $result['solr_doc']['related_mods_accessCondition_type_ms']['value'];\n $values = explode($fieldsep, trim($accessCondType, \" \\t\\n\\r\"));\n $values = array_filter(array_unique($values), function($v) { return $v !== 'use and reproduction'; });\n if (count($values) == 1) {\n $value0 = reset($values);\n switch ($value0) {\n case 'info:eu-repo/semantics/openAccess':\n $displayvalue = 'open access';\n $displayclass = 'ubl-embargo-none';\n break;\n case 'info:eu-repo/semantics/closedAccess':\n $displayvalue = 'closed access';\n $displayclass = 'ubl-embargo-full-eternal';\n break;\n case 'info:eu-repo/semantics/embargoedAccess':\n $embargodates = _scholarly_derive_embargodate($result['solr_doc'], $fieldsep, TRUE);\n if ($embargodates === FALSE) {\n $displayvalue = 'open access';\n $displayclass = 'ubl-embargo-none';\n }\n else {\n $today = date(\"Y-m-d\");\n if (count($embargodates) > 1 && strcmp(end($embargodates), $today) < 0) {\n $displayvalue = 'some documents under embargo';\n $displayclass = 'ubl-embargo-partial-eternal';\n }\n else {\n $displayvalue = 'under embargo';\n $displayclass = 'ubl-embargo-full-temporary';\n }\n $displayvalue .= ' until ' . $embargodates[0];\n }\n break;\n }\n }\n else {\n $displayvalue = 'some documents under embargo';\n $displayclass = 'ubl-embargo-partial-eternal';\n $embargodates = _scholarly_derive_embargodate($result['solr_doc'], $fieldsep, TRUE);\n if (in_array('info:eu-repo/semantics/closedAccess', $values) === FALSE && $embargodates === FALSE) {\n $displayvalue = 'open access';\n $displayclass = 'ubl-embargo-none';\n }\n elseif (in_array('info:eu-repo/semantics/closedAccess', $values) === FALSE && is_array($embargodates)) {\n $displayvalue .= ' until ' . $embargodates[0];\n }\n }\n }\n else {\n $displayvalue = 'metadata only';\n $displayclass = 'ubl-metadata-only';\n }\n $variables['results'][$key]['embargo'] = array('value' => $displayvalue, 'class' => $displayclass);\n if (isset($displayvalue) && (($displayvalue === 'closed access' || substr($displayvalue, 0, 13) === 'under embargo'))) {\n $variables['results'][$key]['thumbnail'] = str_replace(str_replace(':', '%3A', $result['thumbnail_url']), 'sites/all/themes/scholarly/img/closed_access.png', $result['thumbnail']);\n }\n }\n}", "public function __construct() {\r\n /* Widget settings. */\r\n $widget_ops = array('classname' => 'wpsearch_widget', 'description' => __( 'WP Search facets', 'wpsearch' ));\r\n\r\n /* Widget control settings. */\r\n $control_ops = array('width' => 250, 'height' => 350, 'id_base' => 'wpsearch_widget');\r\n\r\n /* Create the widget. */\r\n $this->WP_Widget('wpsearch_widget', __( 'WP Search facets', 'wpsearch' ), $widget_ops, $control_ops);\r\n }", "public function browseAction() {\n $field = $this->_getParam(\"field\");\n $_value = urldecode($this->_getParam(\"value\")); // store original form\n $value = $_value;\n $value = urldecode($value);\n\n // pass browse value to generate remove-facet links\n $this->view->url_params = array(\"value\" => $_value);\n\n $exact = $this->_getParam(\"exact\", false);\n if (! $exact) {\n $value = strtolower($value);\n $value = str_replace(\",\", \"\", $value); // remove commas from names\n }\n\n // add year to sort options\n $this->view->sort_fields[] = \"year\";\n\n $solr = Zend_Registry::get('solr');\n\n // note - solr default set to OR (seems to work best)\n //splitting out name parts to get an accurate match here (e.g.,\n //not matching committee members with a common first name)\n if ($exact) {\n $query = $field . ':\"' . $value . '\"';\n } else {\n $queryparts = array();\n foreach (preg_split('/[ +,.-]+/ ', strtolower($value), -1, PREG_SPLIT_NO_EMPTY) as $part) {\n if ($part != \"a\") // stop words that cause solr problem\n array_push($queryparts, \"$field:$part\");\n }\n $query = join($queryparts, '+AND+');\n }\n\n $options = $this->getFilterOptions();\n $options[\"query\"] = $query;\n $options[\"return_type\"] = \"solrEtd\";\n\n $etdSet = new EtdSet($options, null, 'findPublished');\n $this->view->etdSet = $etdSet;\n\n // Pagination Code\n /**\n * @todo refactor this paginator code that is repeated\n */\n // TODO: find a way to refactor this code that is repeated in this controller.\n $paginator = new Zend_Paginator($etdSet);\n $paginator->setItemCountPerPage(10);\n\n if ($this->_hasParam('page')) $paginator->setCurrentPageNumber($this->_getParam('page'));\n $this->view->paginator = $paginator;\n\n // if there's only one match found, forward directly to full record view\n if ($this->view->count == 1) {\n $this->_helper->flashMessenger->addMessage(\"Only one match found; displaying full record\");\n $this->_helper->redirector->gotoRoute(array(\"controller\" => \"view\",\n \"action\" => \"record\", \"pid\" => $etdSet->etds[0]->pid), \"\", true);\n }\n\n $this->view->value = $_value;\n\n $this->view->title = \"Browse by \" . $this->view->browse_mode . \" : \" . $_value;\n }", "public function WeatherWidgetHtml() {\n \n $strHtml = <<<EOT\n <div id=\"weather-sticker\">\n <span><a href=\"{$this->WidgetForecastUrl}\" title=\"{$this->WidgetForecastUrlText}\" \n target=\"_blank\"><img src=\"{$this->WidgetImageUrl}\" alt=\"{$this->WidgetImageAlt}\" \n width=\"{$this->ImageWidth}\" height=\"{$this->ImageHeight}\" /></a><br><a \n href=\"{$this->WidgetForecastUrl}\" title=\"{$this->WidgetForecastUrlText}\" \n target=\"_blank\">{$this->WidgetForecastUrlText}</a></span>\n\t\t\n\t\t<p class=\"noaa-url\"><a href=\"{$this->ExternalUrl}\"\n\t\t\t title=\"{$this->ExternalUrlLabel}\">{$this->ExternalUrlLabel}</a></p>\n </div><!-- weather-sticker -->\nEOT;\n \n return $strHtml;\n }", "public function fieldWrapperClose(array $options)\n {\n return ($options['wrapper'] !== false) ? '</div>' : '';\n }", "function apachesolr_check_facetapi() {\n if (!module_exists('facetapi')) {\n $filename = db_query_range(\"SELECT filename FROM {system} WHERE type = 'module' AND name = 'facetapi'\", 0, 1)\n ->fetchField();\n if ($filename && file_exists($filename)) {\n drupal_set_message(t('If you <a href=\"@modules\">enable the facetapi module</a>, Apache Solr Search will provide you with configurable facets.', array('@modules' => url('admin/modules'))));\n }\n else {\n drupal_set_message(t('If you install the facetapi module from !href, Apache Solr Search will provide you with configurable facets.', array('!href' => url('http://drupal.org/project/facetapi'))));\n }\n }\n}", "public function render() {\n $this->getGaData();\n $html = '<div class=\"span5\"><table class=\"table table-striped\">';\n $html .= '<caption>Subsequent pages to viewing this one</caption>';\n $html .= '<thead><tr><th>Next page</th><th>Visitors</th><th>Page views</th><th>Avg time on page</th></tr>';\n $html .= '</thead><tbody>';\n foreach ($this->_results as $row) {\n $html .= '<tr><td><a href=\"'. $this->view->serverUrl() . $row->getDimension(Zend_Gdata_Analytics_DataQuery::DIMENSION_PAGE_PATH) . '\">' . $row->getDimension(Zend_Gdata_Analytics_DataQuery::DIMENSION_PAGE_TITLE) . '</a></td>';\n $html .= '<td>' . $row->getMetric(Zend_Gdata_Analytics_DataQuery::METRIC_VISITORS) . '</td>';\n $html .= '<td>' . $row->getMetric(Zend_Gdata_Analytics_DataQuery::METRIC_PAGEVIEWS) . '</td>';\n $html .= '<td>' . $this->view->secondsToMinutes()->setSeconds($row->getMetric(Zend_Gdata_Analytics_DataQuery::METRIC_AVG_TIME_ON_PAGE)) . '</td>';\n $html .= '</tr>';\n }\n $html .= '</tbody></table></div>';\n return $html;\n }", "public function render()\n {\n return '<div class=\"widget\">' . $this->_content . '</div>';\n }", "function openskydora_advanced_search_form($form, &$form_state) {\n module_load_include('inc', 'islandora_solr', 'includes/utilities');\n global $_islandora_solr_queryclass;\n\n // 1: Form update using AJAX.\n if (isset($form_state['triggering_element'])) {\n\n unset($form_state['input']['terms']);\n // Check for add.\n if ($form_state['triggering_element']['#value'] == '+') {\n $form_state['values']['terms'][] = array();\n }\n // Check for remove.\n elseif ($form_state['triggering_element']['#value'] == '-') {\n $field = $form_state['triggering_element']['#field'];\n array_splice($form_state['values']['terms'], $field, 1);\n }\n\n $values = $form_state['values'];\n }\n // 2: Populate with current query on search results page.\n elseif (islandora_solr_results_page($_islandora_solr_queryclass) == TRUE && \n !isset($_islandora_solr_queryclass->internalSolrParams['type'])) {\n\n // Get current query.\n $query = $_islandora_solr_queryclass->solrQuery;\n\n $values['terms'] = array();\n\n $query_explode = preg_split(ISLANDORA_SOLR_QUERY_SPLIT_REGEX, $query);\n\n // Break up the solr query to populate the advanced search form.\n $i = 0;\n foreach ($query_explode as $key => $value) {\n $term = array();\n // Check for first colon to split the string.\n if (strpos($value, ':') != FALSE) {\n // Split the filter into field and value.\n $value_split = preg_split(ISLANDORA_SOLR_QUERY_FIELD_VALUE_SPLIT_REGEX, $value, 2);\n\n $values['terms'][$i]['field'] = stripslashes($value_split[0]);\n\n // Second part of the split is the query value (or first part of\n // it).\n $value_split[1] = str_replace(array('(', ')'), '', $value_split[1]);\n\n $values['terms'][$i]['search'] = $value_split[1];\n\n }\n // If the string does not include a colon or AND/OR/NOT, then it is\n // a\n // part of the query value.\n elseif (!preg_match('/(AND|OR|NOT)/', $value, $matches)) {\n // Trim brackets.\n $value = str_replace(array('(', ')'), '', $value);\n\n if (isset($values['terms'][$i]['search'])) {\n // Append to search string.\n $values['terms'][$i]['search'] .= ' ' . $value;\n }\n else {\n // Search field is not set, so create new search value.\n $values['terms'][$i]['search'] = $value;\n }\n }\n // If it matches AND/OR/NOT, then we have the boolean operator.\n else {\n $values['terms'][$i]['boolean'] = $value;\n\n // XXX: Something about only incrementing here seems... Wrong?\n $i++;\n }\n }\n }\n // 3: Anywhere else: empty form.\n else {\n // Need at least one term to draw the search box.\n $values = array(\n 'terms' => array(''),\n );\n }\n\n $terms = array(\n '#type' => 'markup',\n '#prefix' => '<div id=\"openskydora-advanced-terms\">',\n '#suffix' => '</div>',\n '#tree' => TRUE,\n );\n foreach ($values['terms'] as $i => $value) {\n $term = array(\n '#tree' => TRUE,\n '#prefix' => '<div>',\n '#suffix' => '</div>',\n );\n $term['field'] = array(\n '#title' => t('Field'),\n '#type' => 'select',\n '#default_value' => isset($value['field']) ? $value['field'] : 'dc.title',\n '#options' => islandora_solr_get_fields('search_fields'),\n );\n $term['search'] = array(\n '#title' => t('Search terms'),\n '#type' => 'textfield',\n '#size' => 20,\n '#default_value' => isset($value['search']) ? $value['search'] : '',\n );\n\n // Used for when the user presses enter on the search field.\n $term['hidden_submit'] = array(\n '#type' => 'submit',\n '#value' => t('Search'),\n '#attributes' => array('style' => 'visibility:hidden;position:fixed;top:-1000px;right:-1000px;'),\n );\n $term['add'] = array(\n '#type' => 'button',\n '#value' => '+',\n '#attributes' => array('title' => t('Add field')),\n '#name' => 'add-field-' . $i,\n '#ajax' => array(\n 'callback' => '_openskydora_advanced_search_terms',\n 'wrapper' => 'openskydora-advanced-terms',\n 'method' => 'replace',\n 'effect' => 'fade',\n 'progress' => array('type' => 'none'),\n ),\n );\n if (count($values['terms']) > 1) {\n $term['remove'] = array(\n '#type' => 'button',\n '#field' => $i,\n '#value' => '-',\n '#attributes' => array('title' => t('Remove field')),\n '#name' => 'remove-field-' . $i,\n '#ajax' => array(\n 'callback' => '_openskydora_advanced_search_terms',\n 'wrapper' => 'openskydora-advanced-terms',\n 'method' => 'replace',\n 'effect' => 'fade',\n 'progress' => array('type' => 'none'),\n ),\n );\n if ((variable_get('openskydora_search_boolean', 'user') == 'user') && ((count($values['terms']) - 1) != $i)) {\n $term['boolean'] = array(\n '#type' => 'select',\n '#prefix' => '<div>',\n '#suffix' => '</div>',\n '#default_value' => isset($value['boolean']) ? $value['boolean'] : 'AND',\n '#options' => array(\n 'AND' => 'AND',\n 'OR' => 'OR',\n 'NOT' => 'NOT',\n ),\n );\n }\n }\n\n $terms[] = $term;\n }\n\n // Add terms.\n $form['terms'] = $terms;\n\n // ------------------------\n // collections options supplied by openskydora_collection_select_options block,\n // and inserted into collection select via javascript (see custom.js in openskydora theme)\n // All because we can't get current collection from this function: it is evaluated apparently\n // too early -> request_uri is the PREVIOUS page, not this one!?\n\n $form['collection'] = array(\n '#title' => t('Collection'),\n '#type' => 'select',\n '#default_value' => '',\n '#options' => array (),\n '#validated' => 'TRUE',\n );\n // ------------------------\n\n // Add controls.\n $form['controls'] = array(\n '#type' => 'markup',\n '#prefix' => '<div class=\"islandora-solr-advanced-controls\">',\n '#suffix' => '</div>',\n );\n $form['controls']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Search'),\n );\n return $form;\n}", "protected function _solr()\n {\n if (!$this->_solr) {\n #$this->BClassAutoload->addPath(__DIR__ . '/lib');\n $conf = $this->BConfig->get('modules/Sellvana_IndexSolr');\n $this->_solr = new Apache_Solr_Service($conf['host'], $conf['port'], $conf['path']);\n if ($this->_solr->ping()) {\n throw new BException('Solr service not responding');\n }\n }\n return $this->_solr;\n }", "public function removeStatsFacet(string $value): \\SolrQuery {}", "public function removeStatsFacet(string $value): \\SolrQuery {}", "function fhr_results_shortcode($atts) {\n\t\t$params = array();\n\t\tforeach($_GET as $name => $value) {\n\t\t\t$params[] = $name.'='.$value;\n\t\t}\n\t\t\n\t\t$params = implode('&', $params);\n\t\t\n\t\t$options = get_option('fhr_settings');\n\t\t$results_type = isset($options['results_type']) ? $options['results_type'] : 'new';\n\t\t$results_form = isset($options['results_form']) ? $options['results_form'] : 'airport-parking';\n\t\t\n\t\tif ($results_type == 'iframe') {\n\t\t\tif ($results_form == 'airport-parking') {\n\t\t\t\t$html = '<iframe src=\"http://www.fhr-net.co.uk/airport-parking/results/?'.$params.'\" frameborder=\"0\" scrolling=\"auto\" width=\"100%\" height=\"2000\"></iframe>';\t\n\t\t\t} elseif ($results_form == 'airport-lounge') {\n\t\t\t\t$html = '<iframe src=\"http://www.fhr-net.co.uk/airport-lounges/results/?'.$params.'\" frameborder=\"0\" scrolling=\"auto\" width=\"100%\" height=\"2000\"></iframe>';\t\n\t\t\t} else {\n\t\t\t\t$html = '<iframe src=\"http://www.fhr-net.co.uk/airport-hotels/results/?'.$params.'\" frameborder=\"0\" scrolling=\"auto\" width=\"100%\" height=\"2000\"></iframe>';\t\n\t\t\t}\n\t\t} else {\n\t\t\tif ($results_form == 'airport-parking') {\n\t\t\t\t$html = fhr::parking_search();\n\t\t\t} elseif ($results_form == 'airport-lounge') {\n\t\t\t\t$html = fhr::lounge_search();\t\t\t\n\t\t\t} else {\n\t\t\t\t$html = fhr::hotel_search();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $html;\n\t}", "function lib4ridora_get_related_research_data_block_content($results) {\n $markup = array();\n foreach ($results as $key => $result) {\n $markup[\"research_$key\"] = array(\n '#theme' => 'link',\n '#text' => format_plural(count($results), 'View Research Data', 'View Research Data (!count)', array('!count' => $key + 1)),\n '#path' => $result,\n '#options' => array(\n 'attributes' => array('target' => '_blank'),\n ),\n \"#prefix\" => '<div class=\"libfourri-research-data\"><span>',\n '#suffix' => '</span></div>',\n );\n }\n return $markup;\n}", "public function build(array $realm, FacetapiFacetProcessor $processor) {\n $settings = $this->getSettings($realm);\n\n // Gets the base render array from the facet processor.\n $this->build = $processor->getBuild();\n\n // Executes filter plugins.\n // @todo Defensive coding here for filters?\n $enabled_filters = array_filter($settings->settings['filters'], 'facetapi_filter_disabled_filters');\n uasort($enabled_filters, 'drupal_sort_weight');\n foreach ($enabled_filters as $filter_id => $filter_settings) {\n if ($class = ctools_plugin_load_class('facetapi', 'filters', $filter_id, 'handler')) {\n $filter_plugin = new $class($filter_id, $this->adapter, $settings);\n $this->build = $filter_plugin->execute($this->build);\n }\n else {\n watchdog('facetapi', 'Filter %name not valid.', array('%name' => $filter_id), WATCHDOG_ERROR);\n }\n }\n\n // Instantiates the widget plugin and initializes.\n // @todo Defensive coding here for widgets?\n $widget_name = $settings->settings['widget'];\n if (!$class = ctools_plugin_load_class('facetapi', 'widgets', $widget_name, 'handler')) {\n watchdog('facetapi', 'Widget %name not valid.', array('%name' => $widget_name), WATCHDOG_ERROR);\n return array();\n }\n $widget_plugin = new $class($widget_name, $realm, $this, $settings);\n $widget_plugin->init();\n\n if ($this->build) {\n // Executes widget plugin.\n $widget_plugin->execute();\n $build = $widget_plugin->getBuild();\n }\n else {\n // Instantiates empty behavior plugin.\n $id = $settings->settings['empty_behavior'];\n $class = ctools_plugin_load_class('facetapi', 'empty_behaviors', $id, 'handler');\n $empty_plugin = new $class($settings);\n // Executes empty behavior plugin.\n $build = $widget_plugin->getBuild();\n $build[$this['field alias']] = $empty_plugin->execute();\n }\n\n // If the element is empty, unset it.\n if (!$build[$this['field alias']]) {\n unset($build[$this['field alias']]);\n }\n\n // Adds JavaScript settings in a way that merges with others already set.\n $merge_settings['facetapi']['facets'][] = $widget_plugin->getJavaScriptSettings();\n drupal_add_js($merge_settings, 'setting');\n\n // Returns array keyed by the FacetapiWidget::$key property.\n return array($widget_plugin->getKey() => $build);\n }", "public function tally_rendered_widgets($widget)\n {\n }", "public function widget($args, $instance) {\n\t\t\t\n\t\t\tglobal $wpdb, $post;\n\t\t\t\n\t\t\t///// MAKES SURE WE'RE IN A SINGLE SPOTS PAGE\n\t\t\tif(is_singular('spot')) {\n\t\t\t\t\n\t\t\t\t//// EXTRACT OUR INPUTS\n\t\t\t\textract($args);\n\t\t\t\textract($instance);\n\t\t\t\t$total = $count;\n\t\t\t\t$markup = '<ul class=\"related-spots\">';\n\t\t\t\t\n\t\t\t\t//////////////////////////////////////////////////////\n\t\t\t\t///// LETS DO OUR ARGUMENTS FOR TAG BASED\n\t\t\t\t//////////////////////////////////////////////////////\n\t\t\t\t\n\t\t\t\t$tags = wp_get_post_terms($post->ID, 'spot_tags');\n\t\t\t\t$tax_ids = array();\n\t\t\t\tforeach($tags as $_tag) {\n\t\n\t\t\t\t\t$tax_ids[] = $_tag->term_id;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$args = array(\n\t\t\t\t\n\t\t\t\t\t'post_type' => 'spot',\n\t\t\t\t\t'posts_per_page' => $count,\n\t\t\t\t\t'post_status' => 'publish',\n\t\t\t\t\t'post__not_in' => array( $post->ID ),\n\t\t\t\t\t'tax_query' => array(\n\t\t\t\t\t\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t'taxonomy' => 'spot_tags',\n\t\t\t\t\t\t\t'terms' => $tax_ids,\n\t\t\t\t\t\t\t'operator' => 'IN',\n\t\t\t\t\t\t\n\t\t\t\t\t\t)\n\t\t\t\t\t\n\t\t\t\t\t),\n\t\t\t\t\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\t$tQ = new WP_Query($args);\n\t\t\t\t\n\t\t\t\t///// IF WE HAVE ENOUGH POSTS\n\t\t\t\tif($tQ->have_posts()) {\n\t\t\t\t\t\n\t\t\t\t\t$total = $total - $tQ->found_posts;\n\t\t\t\t\t\n\t\t\t\t\twhile($tQ->have_posts()) { $tQ->the_post();\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t//// IMAGE \n\t\t\t\t\t\t\t$image = btoa_get_featured_image(get_the_ID());\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t///// OUTPUTS IT\n\t\t\t\t\t\t\tif($image && !empty($image)) { $markup .= '<li><a href=\"'.get_permalink().'\" title=\"'.get_the_title().'\"><img src=\"'.ddTimthumb($image, 150, 150).'\" alt=\"'.get_the_title().'\" title=\"'.get_the_title().'\" /></a>'; }\n\t\t\t\t\t\t\telse { $markup .= '<li class=\"no-image\">'; }\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$markup .= '<h4><a href=\"'.get_permalink().'\" title=\"'.get_the_title().'\">'.get_the_title().'</a></h4>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<h5><a href=\"'.get_permalink().'\" title=\"'.get_the_title().'\">'.get_post_meta(get_the_ID(), 'slogan', true).'</a></h5>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<div class=\"clear\"></div>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t</li>';\n\t\t\t\t\t\t\n\t\t\t\t\t} wp_reset_postdata();\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///// LETS DO OUR ARGUMENTS FOR CATEGORY BASED\n\t\t\t\t//////////////////////////////////////////////////////\n\t\t\t\t\n\t\t\t\tif($total > 0) {\n\t\t\t\t\n\t\t\t\t\t$tags = wp_get_post_terms($post->ID, 'spot_cats');\n\t\t\t\t\t$tax_ids = array();\n\t\t\t\t\tforeach($tags as $_tag) {\n\t\t\n\t\t\t\t\t\t$tax_ids[] = $_tag->term_id;\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//// WE STILL HAVE STUFF TO GET\n\t\t\t\t\t$args = array(\n\t\t\t\t\t\n\t\t\t\t\t\t'post_type' => 'spot',\n\t\t\t\t\t\t'posts_per_page' => $total,\n\t\t\t\t\t\t'post_status' => 'publish',\n\t\t\t\t\t\t'post__not_in' => array( $post->ID ),\n\t\t\t\t\t\t'tax_query' => array(\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t'taxonomy' => 'spot_cats',\n\t\t\t\t\t\t\t\t'terms' => $tax_ids,\n\t\t\t\t\t\t\t\t'operator' => 'IN',\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\n\t\t\t\t\t\t),\n\t\t\t\t\t\n\t\t\t\t\t);\n\t\t\t\t\n\t\t\t\t\t$tQ = new WP_Query($args);\n\t\t\t\t\t\n\t\t\t\t\t///// IF WE HAVE ENOUGH POSTS\n\t\t\t\t\tif($tQ->have_posts()) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t$total = $total - $tQ->found_posts;\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile($tQ->have_posts()) { $tQ->the_post();\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t//// IMAGE \n\t\t\t\t\t\t\t$image = btoa_get_featured_image(get_the_ID());\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t///// OUTPUTS IT\n\t\t\t\t\t\t\t$markup .= '<li>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<a href=\"'.get_permalink().'\" title=\"'.get_the_title().'\"><img src=\"'.ddTimthumb($image, 150, 150).'\" alt=\"'.get_the_title().'\" title=\"'.get_the_title().'\" /></a>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<h4><a href=\"'.get_permalink().'\" title=\"'.get_the_title().'\">'.get_the_title().'</a></h4>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<h5><a href=\"'.get_permalink().'\" title=\"'.get_the_title().'\">'.get_post_meta(get_the_ID(), 'slogan', true).'</a></h5>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<div class=\"clear\"></div>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t</li>';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} wp_reset_postdata();\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$markup .= '</ul>';\n\t\t\t\t\n\t\t\t\t///// NOW IF WE FOUND SIMILARP OSTS WE SHOW IT\n\t\t\t\tif($total < $count) {\n\t\t\t\t\n\t\t\t\t\t//// LET'S START OUR OUTPUT\n\t\t\t\t\techo $before_widget;\n\t\t\t\t\t\n\t\t\t\t\t//// OUR TITLE\n\t\t\t\t\tif($title != '') { echo $before_title.$title.$after_title; }\n\t\t\t\t\t\n\t\t\t\t\techo $markup;\n\t\t\t\t\t\n\t\t\t\t\t//// CLOSES OUR ITEM\n\t\t\t\t\techo $after_widget;\n\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\n\t\t}", "public function testHierarchicalFacet() {\n // Verify that the link to the index processors settings page is available.\n $this->drupalGet($this->facetEditPage);\n $this->clickLink('Search api index processor configuration');\n $this->assertSession()->statusCodeEquals(200);\n\n // Enable hierarchical facets and translation of entity ids to its names for\n // a better readability.\n $this->drupalGet($this->facetEditPage);\n $edit = [\n 'facet_settings[use_hierarchy]' => '1',\n 'facet_settings[translate_entity][status]' => TRUE,\n ];\n $this->submitForm($edit, 'Save');\n\n $values = [\n 'name' => 'Owl',\n 'id' => 'owl',\n 'facet_source_id' => 'search_api:views_page__search_api_test_view__page_1',\n ];\n $this->drupalGet('admin/config/search/facets/add-facet-summary');\n $this->submitForm($values, 'Save');\n $this->submitForm([], 'Save');\n\n $block = [\n 'region' => 'footer',\n 'id' => str_replace('_', '-', 'owl'),\n 'weight' => 50,\n ];\n $block = $this->drupalPlaceBlock('facets_summary_block:owl', $block);\n\n // Child elements should be collapsed and invisible.\n $this->drupalGet('search-api-test-fulltext');\n $this->assertFacetBlocksAppear();\n $this->assertFacetLabel('Parent 1');\n $this->assertFacetLabel('Parent 2');\n $this->assertSession()->linkNotExists('Child 1');\n $this->assertSession()->linkNotExists('Child 2');\n $this->assertSession()->linkNotExists('Child 3');\n $this->assertSession()->linkNotExists('Child 4');\n\n $this->assertSession()->pageTextContains($block->label());\n\n // Click the first parent and make sure its children are visible.\n $this->clickLink('Parent 1');\n $this->assertFacetBlocksAppear();\n $this->checkFacetIsActive('Parent 1');\n $this->assertFacetLabel('Child 1');\n $this->assertFacetLabel('Child 2');\n $this->assertSession()->linkNotExists('Child 3');\n $this->assertSession()->linkNotExists('Child 4');\n\n $this->assertSession()->pageTextContains($block->label());\n }", "public function getFacetSuggestUrl()\n {\n $params = array(\n 'cat' => $this->_filter->getLayer()->getCurrentCategory()->getId(),\n 'ajax' => true,\n '_current' => true,\n '_query' => array('p' => null, 'suggest' => null)\n );\n return Mage::getUrl('catalogsearch/ajax/facetSuggest', $params);\n }", "public function widget( $args, $instance ) {\n\t\t$title = apply_filters( 'widget_title', $instance['title'] );\n\t\t// This is where you run the code and display the output\n\t echo do_shortcode('[location_search title=\"' . $title . '\"]');\n }", "function opensky_advanced_search_form($form, &$form_state) {\n module_load_include('inc', 'islandora_solr', 'includes/utilities');\n global $_islandora_solr_queryclass;\n\n // 1: Form update using AJAX.\n if (isset($form_state['triggering_element'])) {\n\n unset($form_state['input']['terms']);\n // Check for add.\n if ($form_state['triggering_element']['#value'] == '+') {\n $form_state['values']['terms'][] = array();\n }\n // Check for remove.\n elseif ($form_state['triggering_element']['#value'] == '-') {\n $field = $form_state['triggering_element']['#field'];\n array_splice($form_state['values']['terms'], $field, 1);\n }\n\n $values = $form_state['values'];\n }\n // 2: Populate with current query on search results page.\n elseif (islandora_solr_results_page($_islandora_solr_queryclass) == TRUE && \n !isset($_islandora_solr_queryclass->internalSolrParams['type'])) {\n\n // Get current query.\n $query = $_islandora_solr_queryclass->solrQuery;\n\n $values['terms'] = array();\n\n $query_explode = preg_split(ISLANDORA_SOLR_QUERY_SPLIT_REGEX, $query);\n\n // Break up the solr query to populate the advanced search form.\n $i = 0;\n foreach ($query_explode as $key => $value) {\n $term = array();\n // Check for first colon to split the string.\n if (strpos($value, ':') != FALSE) {\n // Split the filter into field and value.\n $value_split = preg_split(ISLANDORA_SOLR_QUERY_FIELD_VALUE_SPLIT_REGEX, $value, 2);\n\n $values['terms'][$i]['field'] = stripslashes($value_split[0]);\n\n // Second part of the split is the query value (or first part of\n // it).\n $value_split[1] = str_replace(array('(', ')'), '', $value_split[1]);\n\n $values['terms'][$i]['search'] = $value_split[1];\n\n }\n // If the string does not include a colon or AND/OR/NOT, then it is\n // a\n // part of the query value.\n elseif (!preg_match('/(AND|OR|NOT)/', $value, $matches)) {\n // Trim brackets.\n $value = str_replace(array('(', ')'), '', $value);\n\n if (isset($values['terms'][$i]['search'])) {\n // Append to search string.\n $values['terms'][$i]['search'] .= ' ' . $value;\n }\n else {\n // Search field is not set, so create new search value.\n $values['terms'][$i]['search'] = $value;\n }\n }\n // If it matches AND/OR/NOT, then we have the boolean operator.\n else {\n $values['terms'][$i]['boolean'] = $value;\n\n // XXX: Something about only incrementing here seems... Wrong?\n $i++;\n }\n }\n }\n // 3: Anywhere else: empty form.\n else {\n // Need at least one term to draw the search box.\n $values = array(\n 'terms' => array(''),\n );\n }\n\n $terms = array(\n '#type' => 'markup',\n '#prefix' => '<div id=\"opensky-advanced-terms\">',\n '#suffix' => '</div>',\n '#tree' => TRUE,\n );\n foreach ($values['terms'] as $i => $value) {\n $term = array(\n '#tree' => TRUE,\n '#prefix' => '<div>',\n '#suffix' => '</div>',\n );\n $term['field'] = array(\n '#title' => t('Field'),\n '#type' => 'select',\n '#default_value' => isset($value['field']) ? $value['field'] : 'dc.title',\n '#options' => islandora_solr_get_fields('search_fields'),\n );\n $term['search'] = array(\n '#title' => t('Search terms'),\n '#type' => 'textfield',\n '#size' => 20,\n '#default_value' => isset($value['search']) ? $value['search'] : '',\n );\n\n // Used for when the user presses enter on the search field.\n $term['hidden_submit'] = array(\n '#type' => 'submit',\n '#value' => t('Search'),\n '#attributes' => array('style' => 'visibility:hidden;position:fixed;top:-1000px;right:-1000px;'),\n );\n $term['add'] = array(\n '#type' => 'button',\n '#value' => '+',\n '#attributes' => array('title' => t('Add field')),\n '#name' => 'add-field-' . $i,\n '#ajax' => array(\n 'callback' => '_opensky_advanced_search_terms',\n 'wrapper' => 'opensky-advanced-terms',\n 'method' => 'replace',\n 'effect' => 'fade',\n 'progress' => array('type' => 'none'),\n ),\n );\n if (count($values['terms']) > 1) {\n $term['remove'] = array(\n '#type' => 'button',\n '#field' => $i,\n '#value' => '-',\n '#attributes' => array('title' => t('Remove field')),\n '#name' => 'remove-field-' . $i,\n '#ajax' => array(\n 'callback' => '_opensky_advanced_search_terms',\n 'wrapper' => 'opensky-advanced-terms',\n 'method' => 'replace',\n 'effect' => 'fade',\n 'progress' => array('type' => 'none'),\n ),\n );\n if ((variable_get('opensky_search_boolean', 'user') == 'user') && ((count($values['terms']) - 1) != $i)) {\n $term['boolean'] = array(\n '#type' => 'select',\n '#prefix' => '<div>',\n '#suffix' => '</div>',\n '#default_value' => isset($value['boolean']) ? $value['boolean'] : 'AND',\n '#options' => array(\n 'AND' => 'AND',\n 'OR' => 'OR',\n 'NOT' => 'NOT',\n ),\n );\n }\n }\n\n $terms[] = $term;\n }\n\n // Add terms.\n $form['terms'] = $terms;\n\n // ------------------------\n // collections options supplied by opensky_collection_select_options block,\n // and inserted into collection select via javascript (see custom.js in opensky theme)\n // All because we can't get current collection from this function: it is evaluated apparently\n // too early -> request_uri is the PREVIOUS page, not this one!?\n\n $form['collection'] = array(\n '#title' => t('Collection'),\n '#type' => 'select',\n '#default_value' => '',\n '#options' => array (),\n '#validated' => 'TRUE',\n );\n // ------------------------\n\n // Add controls.\n $form['controls'] = array(\n '#type' => 'markup',\n '#prefix' => '<div class=\"islandora-solr-advanced-controls\">',\n '#suffix' => '</div>',\n );\n $form['controls']['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Search'),\n );\n return $form;\n}", "public function getPanel()\n\t{\n\t\t$cnt = 0;\n\t\t$s = \"\";\n\t\tforeach ($this->queries as $query) {\n\t\t\t$rowId = \"tracy-debug-Skautis-args-row-$cnt\";\n\t\t\t$s .= \"<tr>\"\n\t\t\t\t. \"<td>\" . sprintf('%0.2f', $query->time * 1000) . \"</td>\"\n\t\t\t\t. \"<td>{$query->fname}(\" . $this->formatToggle('Args', $rowId) . \")<div id='$rowId' class='tracy-collapsed'>\" . $this->dump(reset($query->args[0])) . \"</div></td>\"\n\t\t\t\t. \"<td>\" . $this->formatToggle('Result'). \"<div class='tracy-collapsed'>\" . $this->dump($query->result) . \"</div></td>\"\n\t\t\t\t. \"<td>\" . $this->prepareTrace($query->trace) . \"</td>\"\n\t\t\t\t. \"</tr>\";\n\t\t\t$cnt++;\n\t\t}\n\n\t\treturn empty($this->queries) ? '' :\n\t\t\t'<h1>Skautis</h1>'\n\t\t\t. '<div class=\"tracy-inner\">'\n\t\t\t. '<table>'\n\t\t\t. '<tr><th>Time&nbsp;ms</th><th>Function&nbsp;name</th><th>Result</th><th>Trace</th></tr>'\n\t\t\t. $s\n\t\t\t. '</table>'\n\t\t\t. '</div>';\n\t}", "public function getWrapperTag()\r\n {\r\n return $this->wrapperTag;\r\n }", "public function get_search_filter_html() {\n // load the search_id from POST\n $search_id = $this->input->post('search_id');\n\n // load the search library\n $this->load->library('search');\n\n try {\n // get available filters\n $filters = $this->search->get_available_search_filters($search_id);\n\n // get applied filters\n $applied_filters = $this->search->get_applied_search_filters($search_id);\n\n // get the facets so we can convert them to HTML output\n $facets = $this->search->get_search_facets($search_id);\n\n $display_filters = array();\n foreach($filters as $filter_key => $filter) {\n if(isset($facets[$filter_key]) && $filter['show_in_filter_list'] && isset($filter['display_name']) && !empty($facets[$filter_key]) && !in_array($filter_key, array_keys($applied_filters))) {\n $display_filters[$filter_key] = array(\n 'display_name' => $filter['display_name'],\n 'options' => $facets[$filter_key]\n );\n }\n }\n\n $this->data['display_filters'] = $display_filters;\n $this->get_view('modules/search/filters');\n } catch(Exception $e) {\n // @todo log the exception\n echo 'An error occurred while loading the search filters from the session.';\n }\n }", "public function getWrapperTag()\n {\n return $this->wrapperOptions['tag'];\n }", "public function setFacet(bool $flag): \\SolrQuery {}", "public function setFacet(bool $flag): \\SolrQuery {}", "function widget($args, $instance) {\r\n extract($args, EXTR_SKIP);\r\n $title = empty($instance['title']) ? 'Search Near By Miles Range' : apply_filters('widget_title', $instance['title']);\r\n /* $post_type = empty($instance['post_type']) ? 'listing' : apply_filters('widget_post_type', $instance['post_type']); */\r\n $post_type = get_post_type();\r\n $action_post_type = get_post_type();\r\n\t\t\t\t\t\r\n\t\t\t\t\t$addons_posttype = tmpl_addon_name(); /* all tevolution addons' post type as key and folter name as a value */\r\n\t\t\t\t\tif(!array_key_exists($post_type, $addons_posttype))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$action_post_type=\"listing\";\r\n\t\t\t\t\t}\r\n $miles_search = empty($instance['miles_search']) ? '' : apply_filters('widget_miles_search', $instance['miles_search']);\r\n $max_range = empty($instance['max_range']) ? '' : apply_filters('widget_max_range', $instance['max_range']);\r\n $radius_measure = empty($instance['radius_measure']) ? 'miles' : apply_filters('widget_radius_measure', $instance['radius_measure']);\r\n echo $before_widget;\r\n $search_txt = sprintf(__('Find a %s', 'templatic'), $post_type);\r\n wp_enqueue_script(\"jquery-ui-slider\");\r\n echo '<div class=\"search_nearby_widget\">';\r\n if ($title) {\r\n echo '<h3 class=\"widget-title\">' . $title . '</h3>';\r\n }\r\n global $wpdb, $wp_query;\r\n\r\n if (is_tax()) {\r\n $list_id = 'loop_' . $action_post_type . '_taxonomy';\r\n $page_type = 'taxonomy';\r\n } else {\r\n $list_id = 'loop_' . $action_post_type . '_taxonomy';\r\n $page_type = 'archive';\r\n }\r\n\r\n\r\n $queried_object = get_queried_object();\r\n $term_id = $queried_object->term_id;\r\n $query_string = '&term_id=' . $term_id;\r\n ?>\r\n<form method=\"get\" id=\"searchform\" action=\"<?php echo home_url(); ?>/\">\r\n <input type=\"hidden\" class=\"miles_range_post_type\" name=\"post_type\" value=\"<?php echo $post_type; ?>\" />\r\n <div class=\"search_range\">\r\n <input type=\"text\" name=\"range_address\" id=\"range_address\" value=\"\" class=\"range_address location placeholder\" placeholder=\"<?php _e('Enter your address', 'templatic'); ?>\"/>\r\n <?php if ($radius_measure == \"miles\"): ?>\r\n <label>\r\n <?php _e('Mile range:', 'templatic'); ?>\r\n </label>\r\n <?php else: ?>\r\n <label>\r\n <?php _e('Kilometer range:', 'templatic'); ?>\r\n </label>\r\n <?php endif; ?>\r\n <input type=\"text\" name=\"radius\" id=\"radius_range\" value=\"<?php echo $max_range; ?>\" style=\"border:0; font-weight:bold;\" readonly=\"readonly\"/>\r\n </div>\r\n <div id=\"radius-range\"></div>\r\n\t<script type=\"text/javascript\" async >\r\n\t\t\t\t\tvar slider_ajax = map_ajax = null;\r\n\t\t\t\t\tjQuery('#radius-range').bind('slidestop', function (event, ui) {\r\n\t\t\t\t\tvar miles_range = jQuery('#radius_range').val();\r\n\t\t\t\t\tvar range_address = jQuery('#range_address').val();\r\n\t\t\t\t\tvar list_id = '<?php echo $list_id ?>';\r\n\t\t\t\t\tjQuery('.' + list_id + '_process').remove();\r\n\t\t\t\t\tjQuery('#' + list_id).addClass(\"loading_results\");\r\n <?php\r\n if (isset($_SERVER['QUERY_STRING'])) {\r\n $query_string.='&' . $_SERVER['QUERY_STRING'];\r\n }\r\n ?>\r\n slider_ajax = jQuery.ajax({\r\n url: ajaxUrl,\r\n type: 'POST',\r\n beforeSend: function () {\r\n if (slider_ajax != null) {\r\n slider_ajax.abort();\r\n }\r\n },\r\n data: 'action=<?php echo $action_post_type . \"_search\"; ?>&posttype=<?php echo $post_type; ?>&range_address=' + range_address + '&miles_range=' + miles_range + '&defaul_range=<?php echo '1-' . $max_range; ?>&page_type=<?php echo $page_type . $query_string; ?>&radius_measure=<?php echo $radius_measure; ?>',\r\n success: function (results) {\r\n jQuery('.' + list_id + '_process').remove();\r\n jQuery('#' + list_id).html(results);\r\n jQuery('#listpagi').remove();\r\n jQuery('#' + list_id).removeClass(\"loading_results\");\r\n }\r\n });\r\n\r\n map_ajax = jQuery.ajax({\r\n url: ajaxUrl,\r\n type: 'POST',\r\n beforeSend: function () {\r\n if (map_ajax != null) {\r\n map_ajax.abort();\r\n }\r\n },\r\n dataType: 'json',\r\n data: 'action=<?php echo $action_post_type . \"_search_map\"; ?>&posttype=<?php echo $post_type; ?>&range_address=' + range_address + '&miles_range=' + miles_range + '&defaul_range=<?php echo '1-' . $max_range; ?>&page_type=<?php echo $page_type . $query_string; ?>&radius_measure=<?php echo $radius_measure; ?>',\r\n success: function (results) {\r\n googlemaplisting_deleteMarkers();\r\n markers = results.markers;\r\n templ_add_googlemap_markers(markers);\r\n }\r\n });\r\n });\r\n jQuery(document).on('click','#list_paggination .page-numbers', function (e) {\r\n e.preventDefault();\r\n var page_link = jQuery(this).children().html();\r\n var miles_range = jQuery('#radius_range').val();\r\n var range_address = jQuery('#range_address').val();\r\n var list_id = '<?php echo $list_id ?>';\r\n\t\t\t\t\t\t\t\t\t\tjQuery('.' + list_id + '_process').remove();\r\n\t\t\t\t\t\t\t\t\t\tjQuery('#' + list_id).addClass(\"loading_results\");\r\n <?php\r\n if (isset($_SERVER['QUERY_STRING'])) {\r\n $query_string.='&' . $_SERVER['QUERY_STRING'];\r\n }\r\n ?>\r\n\r\n slider_ajax = jQuery.ajax({\r\n url: ajaxUrl,\r\n type: 'POST',\r\n beforeSend: function () {\r\n if (slider_ajax != null) {\r\n slider_ajax.abort();\r\n }\r\n },\r\n data: 'action=<?php echo $action_post_type . \"_search\"; ?>&posttype=<?php echo $post_type; ?>&range_address=' + range_address + '&miles_range=' + miles_range + '&defaul_range=<?php echo '1-' . $max_range; ?>&page_type=<?php echo $page_type . $query_string; ?>&radius_measure=<?php echo $radius_measure; ?>&page_num=' + page_link,\r\n success: function (results) {\r\n jQuery('.' + list_id + '_process').remove();\r\n jQuery('#' + list_id).html(results);\r\n jQuery('#listpagi').remove();\r\n jQuery('#' + list_id).removeClass(\"loading_results\");\r\n }\r\n });\r\n\t\t\t\t\t\t\t\t\t\t\r\n map_ajax = jQuery.ajax({\r\n url: ajaxUrl,\r\n type: 'POST',\r\n beforeSend: function () {\r\n if (map_ajax != null) {\r\n map_ajax.abort();\r\n }\r\n },\r\n\t\t\t\t\t\t\t\t\t\t\t \r\n dataType: 'json',\r\n data: 'action=<?php echo $action_post_type . \"_search_map\"; ?>&posttype=<?php echo $post_type; ?>&range_address=' + range_address + '&miles_range=' + miles_range + '&defaul_range=<?php echo '1-' . $max_range; ?>&page_type=<?php echo $page_type . $query_string; ?>&radius_measure=<?php echo $radius_measure; ?>&page_num=' + page_link,\r\n success: function (results) {\r\n googlemaplisting_deleteMarkers();\r\n markers = results.markers;\r\n templ_add_googlemap_markers(markers);\r\n }\r\n });\r\n });\r\n /* Click event on range address */\r\n jQuery(document).on('keypress','#range_address', function (e) {\r\n if (e.which == 13) {\r\n jQuery('#radius-range').trigger('slidestop');\r\n }\r\n });\r\n jQuery(function () {\r\n jQuery(\"#radius-range\").slider({range: true, min: 1, max:<?php echo $max_range; ?>, values: [1,<?php echo $max_range; ?>], slide: function (e, t) {\r\n jQuery(\"#radius_range\").val(t.values[0] + \" - \" + t.values[1])\r\n }});\r\n jQuery(\"#radius_range\").val(jQuery(\"#radius-range\").slider(\"values\", 0) + \" - \" + jQuery(\"#radius-range\").slider(\"values\", 1))\r\n })\r\n </script>\r\n</form>\r\n<?php\r\n echo '</div>';\r\n echo $after_widget;\r\n }", "public function site_library_render() {\n\n\t\tif ( ! empty( $this->config['site_library'] ) ) {\n\n\t\t\t$site_library = $this->config['site_library'];\n\n\t\t\tif ( ! empty( $site_library ) ) {\n\t\t\t\t?>\n\t\t\t\t<div class=\"site-library-section three-col\">\n\t\t\t\t\t<div class=\"tg-site-library-top\">\n\t\t\t\t\t\t<h3><?php esc_html_e( 'Want to import any of the demos below?', 'zakra' ); ?></h3>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"plugin-install-notice\">\n\t\t\t\t\t\t<?php esc_html_e( 'Clicking the \"Import\" button in any of the demos below will install and activate the ThemeGrill demo importer plugin.', 'zakra' ); ?>\n\t\t\t\t\t</div>\n\t\t\t\t\t<?php\n\t\t\t\t\techo Zakra_Site_Library::zakra_site_library_page_content(); // WPCS: XSS OK.\n\t\t\t\t\t?>\n\t\t\t\t</div>\n\t\t\t\t<?php\n\t\t\t}\n\t\t}\n\n\t}", "function UTKdrupal_form_islandora_solr_simple_search_form_alter(&$form, &$form_state, $form_id) {\n $form['simple']['islandora_simple_search_query']['#attributes']['placeholder'] = t(\"Search Repository\");\n}", "public function addFacetCondition()\n {\n $query = $this->getLayer()->getProductCollection()->getSearchEngineQuery();\n $options = array('interval' => 1, 'field' => $this->_getFilterField());\n $query->addFacet($this->_getFilterField(), 'histogram', $options);\n\n return $this;\n }", "function solr_api_init() {\n\t//\t$call_method = \"GET\", $require_api_auth = false, $require_user_auth = false\n\n\telgg_ws_expose_function(\n\t\t'delete.updated_index_list',\n\t\t'delete_updated_index_list',\n\t\t[\n\t\t\t'guids' => [\n\t\t\t\t'type' => 'array',\n\t\t\t\t'required' => false,\n\t\t\t\t'description' => 'deletes records based on collection of entity guids'\n\t\t\t]\n\t\t],\n\t\t'deletes record that already updated the solr index',\n\t\t'POST',\n\t\ttrue,\n\t\tfalse\n\t);\n\n\n\telgg_ws_expose_function(\n 'get.entity_list',\n 'get_entity_list',\n [\n 'type' => [\n 'type' => 'string',\n 'required' => true,\n 'description' => 'the type of entity in string format',\n ],\n 'subtype' => [\n 'type' => 'string',\n 'required' => false,\n 'description' => 'the subtype of entity in string format, not required',\n ],\n\t\t\t'offset' => [\n 'type' => 'int',\n 'required' => true,\n 'description' => 'the subtype of entity in string format, not required',\n ],\n\n ],\n 'retrieves all entities filtered by type [and subtype]',\n 'GET',\n true,\n false\n\t);\n\n\n\telgg_ws_expose_function(\n 'get.user_list',\n 'get_user_list',\n [\n \t'offset' => [\n \t\t'type' => 'int',\n \t\t'required' => true,\n \t\t'description' => 'paging mechanism'\n \t]\n ],\n 'retrieves a user list',\n 'GET',\n true,\n false\n\t);\n\n\telgg_ws_expose_function(\n 'get.group_list',\n 'get_group_list',\n [\n \t'offset' => [\n \t\t'type' => 'int',\n \t\t'required' => true,\n \t\t'description' => 'api loads 20 groups at a time'\n \t]\n ],\n 'retrieves a group list',\n 'GET',\n true,\n false\n\t);\n\n\n\telgg_ws_expose_function(\n\t\t'get.list_of_deleted_records',\n\t\t'get_list_of_deleted_records',\n\t\tnull,\n\t\t'retrieves a list of deleted content',\n\t\t'GET',\n\t\ttrue,\n\t\tfalse\n\t);\n}", "function apachesolr_location_range_widget_location_form($form, &$form_state, $field_name) {\n $getmap = getlocations_search_getmap('page');\n $map = $getmap['map'];\n $mapid = $getmap['mapid'];\n $default_latitude = '';\n $default_longitude = '';\n $default_distance = '';\n //If Location form is already submitted or there is another filters setted by facets.\n if (isset($_GET['f'])) {\n $facet_filters = $_GET['f'];\n //Get filters name.\n foreach (array_values($facet_filters) as $filter) {\n //Checking for filter name.\n if (strpos($filter, $field_name . ':', 0) !== FALSE) {\n $array_index = array_keys($facet_filters, $filter);\n $index = reset($array_index);\n list($default_latitude, $default_longitude, $default_distance) = explode(',', str_replace($field_name . ':', '', $facet_filters[$index]));\n }\n }\n }\n\n //Generate location range form.\n $form['mapid'] = array('#type' => 'value', '#value' => $mapid);\n $form['getlocations_search_' . $mapid] = array(\n '#type' => 'textfield',\n '#title' => t('Search Address'),\n '#maxlength' => 255,\n '#required' => TRUE,\n '#default_value' => isset($_GET['search_location']) ? $_GET['search_location'] : '',\n );\n\n $form['getlocations_search_distance_' . $mapid] = array(\n '#type' => 'textfield',\n '#title' => t('Search distance'),\n '#size' => 10,\n '#required' => TRUE,\n '#description' => t('The distance away from the center to search for locations.'),\n '#default_value' => $default_distance,\n );\n $form['getlocations_search_lon_' . $mapid] = array(\n '#type' => 'textfield',\n '#default_value' => $default_longitude,\n );\n $form['getlocations_search_lat_' . $mapid] = array(\n '#type' => 'textfield',\n '#default_value' => $default_latitude,\n );\n\n $form['getlocations_search_submit_' . $mapid] = array(\n '#type' => 'submit',\n '#value' => t('Go')\n );\n $form['#attributes']['name'] = 'apachesolr_location_range_search_form_' . $mapid;\n\n //Set field name that are using for this facet.\n $form['field_name'] = array('#type' => 'value', '#value' => $field_name);\n\n return $form;\n}", "public static function get_totals_markup(){\n global $search_results_limit, $search_results_count, $search_results_total;\n $totals_markup = '';\n $totals_markup .= '<div class=\"totals_div\">';\n if (!empty($search_results_limit)){ $totals_markup .= ('<span class=\"showing\">Showing '.($search_results_count == 1 ? '1 Row' : $search_results_count.' Rows').'</span>'); }\n else { $totals_markup .= ('<span class=\"showing\">'.($search_results_count == 1 ? '1 Result' : $search_results_count.' Results').'</span>'); }\n if ($search_results_count != $search_results_total){ $totals_markup .= ('<span class=\"total\">'.number_format($search_results_total, 0, '.', ',').' Total</span>'); }\n $totals_markup .= '</div>';\n return $totals_markup;\n }", "protected function formatQuery(SolariumQueryInterface $solarium_query) {\n return 'Search API Backend: solr; Connector: ' . $this->getSolrConnector()->pluginId . '; Query: ' . $solarium_query->getOption('query') . '; Fields: ' . $solarium_query->getOption('fields');\n }", "public function removeFacetQuery(string $value): \\SolrQuery {}", "public function removeFacetQuery(string $value): \\SolrQuery {}", "function build_simple_solr_form() {\n // FIXME: This should actually be checking the settings in the request handler... Not making assumptions based on name\n $required = FALSE;\n if (variable_get('islandora_solr_search_block_request_handler', '') == 'standard') {\n $required = TRUE;\n }\n global $islandora_query;\n if (!strpos($islandora_query, ':')) {\n $default = $islandora_query;\n }\n // TODO: Fix the above. The global is no longer valid, and the test is not conclusive. Should instead test for deftype=dismax.\n $form[\"islandora_simple_search_query\"] = array(\n '#size' => '24%',\n '#type' => 'textfield',\n '#title' => '',\n '#default_value' => $default,\n '#required' => $required,\n );\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('search')\n );\n return $form;\n }", "protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)\n {\n $this->setElement($element);\n $this->addColumn('service_id', array(\n 'label' => Mage::helper('easylog')->__('Service'),\n 'renderer' => $this->_getServiceRenderer(),\n ));\n return parent::_getElementHtml( $element );\n }", "protected function _getIndexer() {\n return Mage::getSingleton('solrsearch/solr');\n }", "function widget( $args, $instance ) {\r\n\t\textract( $args );\r\n\r\n\t\t// Set up the arguments for wp_list_categories().\r\n\t\t$cur_arg = array(\r\n\t\t\t'title'\t\t\t=> $instance['title'],\r\n\t\t\t'type'\t\t\t=> empty( $instance['type'] ) ? 'user' : $instance['type'],\r\n\t\t\t'flickr_id'\t\t=> $instance['flickr_id'],\r\n\t\t\t'count'\t\t\t=> (int) $instance['count'],\r\n\t\t\t'display'\t\t=> empty( $instance['display'] ) ? 'latest' : $instance['display'],\r\n\t\t\t'size'\t\t\t=> isset( $instance['size'] ) ? $instance['size'] : 's',\r\n\t\t\t'copyright'\t\t=> ! empty( $instance['copyright'] ) ? true : false\r\n\t\t);\r\n\t\t\r\n\t\textract( $cur_arg );\r\n\t\r\n\t\t// print the before widget\r\n\t\techo $before_widget;\r\n\t\t\r\n\t\tif ( $title )\r\n\t\t\techo $before_title . $title . $after_title;\r\n\t\r\n\t\t// Get the user direction, rtl or ltr\r\n\t\tif ( function_exists( 'is_rtl' ) )\r\n\t\t\t$dir = is_rtl() ? 'rtl' : 'ltr';\r\n\r\n\t\t// Wrap the widget\r\n\t\tif ( ! empty( $instance['intro_text'] ) )\r\n\t\t\techo '<p>' . do_shortcode( $instance['intro_text'] ) . '</p>';\r\n\r\n\t\techo \"<div class='flickr-badge-wrapper zframe-flickr-wrap-$dir'>\";\r\n\t\r\n\t\t// If the widget have an ID, we can continue\r\n\t\tif ( ! empty( $instance['flickr_id'] ) )\r\n\t\t\techo \"<script type='text/javascript' src='http://www.flickr.com/badge_code_v2.gne?count=$count&amp;display=$display&amp;size=$size&amp;layout=x&amp;source=$type&amp;$type=$flickr_id'></script>\";\r\n\t\telse\r\n\t\t\techo '<p>' . __('Please provide an Flickr ID', $this->textdomain) . '</p>';\r\n\t\t\r\n\t\techo '</div>';\r\n\t\t\r\n\t\tif ( ! empty( $instance['outro_text'] ) )\r\n\t\t\techo '<p>' . do_shortcode( $instance['outro_text'] ) . '</p>';\r\n\t\t\r\n\t\tif ( $copyright )\r\n\t\t\techo '<a href=\"http://zourbuth.com/archives/500/flickr-badges-widget-free-wordpress-plugin/\">\r\n\t\t\t\t<span style=\"font-size: 11px;\"><span style=\"color: #0063DC; font-weight: bold;\">Flick</span><span style=\"color: #FF0084; font-weight: bold;\">r</span> Badge Widget</span>\r\n\t\t\t\t</a>';\r\n\t\t\r\n\t\t// Print the after widget\r\n\t\techo $after_widget;\r\n\t}", "public function displayPublishPanel(XMLElement &$wrapper, $data = NULL, $flagWithError = NULL, $fieldnamePrefix = NULL, $fieldnamePostfix = NULL, $entry_id = NULL){\n\n\t\t\t// We've been called out of context: Pulblish Filter\n\t\t\t$callback = Administration::instance()->getPageCallback();\n\t\t\tif($callback['context']['page'] != 'edit' && $callback['context']['page'] != 'new') {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tExtension_Frontend_Localisation::appendAssets();\n\t\t\tExtension_Multilingual_Tag_Field::appendAssets();\n\n\t\t\t$main_lang = FLang::getMainLang();\n\t\t\t$all_langs = FLang::getAllLangs();\n\t\t\t$langs = FLang::getLangs();\n\n\t\t\t$wrapper->setAttribute('class', $wrapper->getAttribute('class').' field-multilingual');\n\t\t\t$container = new XMLElement('div', null, array('class' => 'container'));\n\n\n\t\t\t/*------------------------------------------------------------------------------------------------*/\n\t\t\t/* Label */\n\t\t\t/*------------------------------------------------------------------------------------------------*/\n\n\t\t\t$label = Widget::Label($this->get('label'));\n\t\t\tif( $this->get('required') != 'yes' ) $label->appendChild(new XMLElement('i', __('Optional')));\n\t\t\t$container->appendChild($label);\n\n\n\t\t\t/*------------------------------------------------------------------------------------------------*/\n\t\t\t/* Tabs */\n\t\t\t/*------------------------------------------------------------------------------------------------*/\n\n\t\t\t$ul = new XMLElement('ul', null, array('class' => 'tabs'));\n\t\t\tforeach( $langs as $lc ){\n\t\t\t\t$li = new XMLElement('li', $all_langs[$lc], array('class' => $lc));\n\t\t\t\t$lc === $main_lang ? $ul->prependChild($li) : $ul->appendChild($li);\n\t\t\t}\n\n\t\t\t$container->appendChild($ul);\n\n\n\t\t\t/*------------------------------------------------------------------------------------------------*/\n\t\t\t/* Panels */\n\t\t\t/*------------------------------------------------------------------------------------------------*/\n\n\t\t\tforeach( $langs as $lc ){\n\t\t\t\t$div = new XMLElement('div', NULL, array('class' => 'tab-panel tab-'.$lc));\n\n\t\t\t\t$label = Widget::Label();\n\n\t\t\t\t$value = null;\n\n\t\t\t\tif( isset($data['value-'.$lc]) ){\n\t\t\t\t\t$data['value-'.$lc] = $this->__clearEmtpyTags($data['value-'.$lc]);\n\t\t\t\t\t$value = (is_array($data['value-'.$lc]) ? self::__tagArrayToString($data['value-'.$lc]) : $data['value-'.$lc]);\n\t\t\t\t}\n\n\t\t\t\t$label->appendChild(\n\t\t\t\t\tWidget::Input(\n\t\t\t\t\t\t\"fields{$fieldnamePrefix}[{$this->get('element_name')}][{$lc}]{$fieldnamePostfix}\",\n\t\t\t\t\t\t(strlen($value) != 0 ? General::sanitize($value) : NULL)\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t$div->appendChild($label);\n\n\t\t\t\tif( $this->get('pre_populate_source') != NULL ){\n\n\t\t\t\t\t$existing_tags = $this->findAllTags($lc);\n\n\t\t\t\t\tif( is_array($existing_tags) && !empty($existing_tags) ){\n\t\t\t\t\t\t$taglist = new XMLElement('ul');\n\t\t\t\t\t\t$taglist->setAttribute('class', 'tags');\n\t\t\t\t\t\t$taglist->setAttribute('data-interactive', 'data-interactive');\n\n\t\t\t\t\t\tforeach( $existing_tags as $tag ){\n\t\t\t\t\t\t\t$taglist->appendChild(\n\t\t\t\t\t\t\t\tnew XMLElement('li', General::sanitize($tag))\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$div->appendChild($taglist);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t$container->appendChild($div);\n\t\t\t}\n\n\n\t\t\t/*------------------------------------------------------------------------------------------------*/\n\t\t\t/* Errors */\n\t\t\t/*------------------------------------------------------------------------------------------------*/\n\n\t\t\tif( $flagWithError != NULL )\n\t\t\t\t$wrapper->appendChild(Widget::Error($container, $flagWithError));\n\t\t\telse\n\t\t\t\t$wrapper->appendChild($container);\n\t\t}", "public function widget( $args, $instance ) {\n\n\t\t\t$this->widget_start( $args, $instance );\n\n\t\t\techo dgwt_wcas_get_search_form();\n\n\t\t\t$this->widget_end( $args );\n\t\t}", "public static function index($query='*:*', $page=0, $fields='', $params=array(), $sparams=array()) {\n $res = array(\n 'items' => array(),\n 'facets' => array(),\n );\n\n $rows = isset($params['rows']) ? $params['rows'] : 20;\n if ($rows > 200) {\n $rows = 200;\n }\n\n $sparams = $sparams + array(\n 'start' => $page*$rows,\n 'rows' => $rows,\n 'qt' => 'standard',\n );\n $rows = $sparams['rows'];\n\n // Get field list\n if (empty($fields)) {\n $fields = array('nid', 'type', 'title');\n }\n else if (is_string($fields)) {\n $fields = split(',', $fields);\n }\n $sparams['fl'] = join($fields, ',');\n\n // Get facet params\n $facet_queries = array();\n $facets = array();\n if (isset($params['facets'])) {\n $facets = split(',', $params['facets']);\n $sparams['facet'] = 'true';\n $sparams['facet.sort'] = 'true';\n $sparams['facet.limit'] = !empty($params['facet_limit']) ? intval($params['facet_limit']) : 20;\n $sparams['facet.mincount'] = 1;\n $sparams['facet.field'] = $facets;\n\n if (isset($params['facet_queries'])) {\n $facet_queries = split(',', $params['facet_queries']);\n $sparams['facet.query'] = $facet_queries;\n }\n }\n\n // Validate sort parameter\n if (isset($params['sort']) && preg_match('/^([a-z0-9_]+ (asc|desc)(,)?)+$/i', $params['sort'])) {\n $sparams['sort'] = $params['sort'];\n }\n\n $solr = apachesolr_get_solr();\n $response = $solr->search($query, $sparams['start'], $sparams['rows'], $sparams, 'POST');\n $res['total'] = $response->response->numFound;\n $res['page_size'] = $sparams['rows'];\n if ($res['total']) {\n foreach ($response->response->docs as $doc) {\n $item = array();\n foreach ($doc->getFieldNames() as $field) {\n $item[$field] = $doc->getField($field);\n $item[$field] = $item[$field]['value'];\n }\n $res['items'][] = $item;\n }\n }\n if (isset($response->facet_counts->facet_fields)) {\n foreach ($response->facet_counts->facet_fields as $facet_field => $counts) {\n if (!empty($counts)) {\n $res['facets'][$facet_field] = get_object_vars($counts);\n\n switch ($facet_field) {\n case 'tid':\n self::getTermInfo($res['facets'][$facet_field]);\n break;\n case 'im_simple_geo_area':\n self::getAreaInfo($res['facets'][$facet_field]);\n break;\n // TODO: Maybe the facet describing process should be extensible?\n }\n }\n }\n }\n\n if (isset($response->facet_counts->facet_queries)) {\n foreach ($response->facet_counts->facet_queries as $query => $counts) {\n $res['query_facets'][$query] = $counts;\n }\n }\n\n return $res;\n }", "private function _RenderAsPopup()\n\t{\n\t\t$strObjectName = \"ProvisioningHistoryPopup\". ((DBO()->Service->Id->IsSet)? DBO()->Service->Id->Value : \"\");\n\t\t\n\t\t$this->_RenderFilterControls($strObjectName);\n\t\n\t\t// Render the History\n\t\t$strHistoryContainerDivId = \"HistoryContainerForPopup\". ((DBO()->Service->Id->IsSet)? DBO()->Service->Id->Value : \"\");\n\t\techo \"<div id='ContainerDiv_ScrollableDiv_History' style='border: solid 1px #606060; padding: 5px 5px 5px 5px'>\\n\";\n\t\techo \"<div id='ScrollableDiv_History' style='overflow:auto; height:410px; width:auto; padding: 0px 3px 0px 3px'>\\n\";\n\t\techo \"<div id='$strHistoryContainerDivId'>\\n\";\n\t\t$this->_RenderHistory($strObjectName);\n\t\techo \"</div>\\n\";\n\t\techo \"</div>\\n\"; //ScrollableDiv_History\n\t\techo \"</div>\\n\"; //ContainerDiv_ScrollableDiv_History\n\t\t\n\t\techo \"</div>\\n\"; // GroupedContent\n\t\t\n\t\techo \"<div class='ButtonContainer'><div class='Right'>\\n\";\n\t\t$this->Button(\"Close\", \"Vixen.Popup.Close(this);\");\n\t\techo \"</div></div>\\n\";\n\t\t\n\t\t// Initialise the javascript object\n\t\t$intAccountId\t\t= DBO()->Account->Id->Value;\n\t\t$intServiceId\t\t= (DBO()->Service->Id->Value) ? DBO()->Service->Id->Value : \"null\";\n\t\t$intCategoryFilter\t= DBO()->History->CategoryFilter->Value;\n\t\t$intTypeFilter\t\t= (DBO()->History->TypeFilter->Value) ? DBO()->History->TypeFilter->Value : \"null\";\n\t\t$intMaxItems\t\t= DBO()->History->MaxItems->Value;\n\t\t$strPopupId\t\t\t= $this->_objAjax->strId;\n\t\t$strJavascript\t= \"\tif (Vixen.$strObjectName == undefined)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tVixen.$strObjectName = new VixenProvisioningHistoryClass;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tVixen.$strObjectName.Initialise($intAccountId, $intServiceId, $intCategoryFilter, $intTypeFilter, $intMaxItems, '$strHistoryContainerDivId', false, '$strPopupId');\n\t\t\t\t\t\t\";\n\t\t\t\t\t\t\t\n\t\techo \"<script type='text/javascript'>$strJavascript</script>\\n\";\n\t}", "public function testCheckboxWidget() {\n $id = 't';\n $name = 'Facet & checkbox~';\n $facet_add_page = 'admin/config/search/facets/add-facet';\n\n $this->drupalGet($facet_add_page);\n\n $form_values = [\n 'id' => $id,\n 'status' => 1,\n 'url_alias' => $id,\n 'name' => $name,\n 'facet_source_id' => 'search_api_views:search_api_test_view:page_1',\n 'facet_source_configs[search_api_views:search_api_test_view:page_1][field_identifier]' => 'type',\n ];\n $this->drupalPostForm(NULL, ['facet_source_id' => 'search_api_views:search_api_test_view:page_1'], $this->t('Configure facet source'));\n $this->drupalPostForm(NULL, $form_values, $this->t('Save'));\n $this->drupalPostForm(NULL, ['widget' => 'checkbox'], $this->t('Save'));\n\n $block_values = [\n 'plugin_id' => 'facet_block:' . $id,\n 'settings' => [\n 'region' => 'footer',\n 'id' => str_replace('_', '-', $id),\n ],\n ];\n $this->drupalPlaceBlock($block_values['plugin_id'], $block_values['settings']);\n\n $this->drupalGet('search-api-test-fulltext');\n $this->drupalPostForm(NULL, array('type[item]' => 'item'), $this->t('submit'));\n $this->assertFieldChecked('edit-type-item');\n }", "protected static function getFacadeAccessor() {\n\t\treturn 'laravel-4-solr';\n\t}", "public function asHtml($linkResolver = null)\n {\n $classes = array('slice');\n if ($this->label != null) array_push($classes, $this->label);\n return '<div data-slicetype=\"' . $this->sliceType . '\" class=\"' . implode(' ', $classes) . '\">'\n . $this->value->asHtml($linkResolver)\n . '</div>';\n }" ]
[ "0.7048761", "0.5978933", "0.57354164", "0.5664428", "0.55946845", "0.54931843", "0.5487358", "0.54757327", "0.5320097", "0.5292083", "0.5218567", "0.51511085", "0.5120404", "0.50631887", "0.50576663", "0.5015178", "0.5015178", "0.49688917", "0.49139875", "0.4889492", "0.4889492", "0.48484167", "0.48113596", "0.47989887", "0.4797039", "0.47834754", "0.47765368", "0.47616893", "0.47604492", "0.47452572", "0.47431967", "0.4730779", "0.4675817", "0.46675628", "0.46305442", "0.46157706", "0.46116775", "0.4596856", "0.4589336", "0.4585744", "0.4585744", "0.45761806", "0.45736808", "0.4571404", "0.45701814", "0.4567159", "0.4560619", "0.4557006", "0.4556299", "0.45338276", "0.45300168", "0.45127258", "0.44964454", "0.44924545", "0.44801232", "0.44771343", "0.44572753", "0.44558847", "0.44291267", "0.4423032", "0.44155914", "0.44137153", "0.44084135", "0.44084135", "0.4397836", "0.43962052", "0.4391106", "0.43887064", "0.4385944", "0.4383976", "0.43802744", "0.43696174", "0.4365801", "0.43615788", "0.4359885", "0.43595695", "0.43554616", "0.43503958", "0.43503958", "0.43445933", "0.43424582", "0.43403012", "0.4339585", "0.4334047", "0.43319294", "0.4330569", "0.43267947", "0.432338", "0.432338", "0.4318194", "0.4314362", "0.43116453", "0.43059713", "0.43031475", "0.43010876", "0.42913577", "0.4280088", "0.42773578", "0.42701322", "0.42642218" ]
0.7884885
0
Returns the number of HardKeys on the phone or 0 if the model doesn't support HardKeys.
Возвращает количество HardKeys на телефоне или 0, если модель не поддерживает HardKeys.
public function numberOfHardKeys();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function numberOfSoftKeys();", "public function getKeyCount() {\r\n return ipworksencrypt_openpgp_get($this->handle, 8 );\r\n }", "private function CountKeys()\n {\n $cart = $this->Read();\n $count = count($cart);\n\n return (int) $count;\n }", "public function getKeysCount()\n {\n // for KEYS. The last one will be used to populate ARGV.\n return -1;\n }", "public function count()\n\t{\n\t\treturn $this->rediska->GetKeysCount();\n\t}", "public function getIntuneDeviceCount()\n {\n if (array_key_exists(\"intuneDeviceCount\", $this->_propDict)) {\n return $this->_propDict[\"intuneDeviceCount\"];\n } else {\n return null;\n }\n }", "public function count()\n {\n return $this->handler->lLen($this->key);\n }", "public function getNotApplicableDeviceCount()\n {\n if (array_key_exists(\"notApplicableDeviceCount\", $this->_propDict)) {\n return $this->_propDict[\"notApplicableDeviceCount\"];\n } else {\n return null;\n }\n }", "public function getNotInstalledDeviceCount()\n {\n if (array_key_exists(\"notInstalledDeviceCount\", $this->_propDict)) {\n return $this->_propDict[\"notInstalledDeviceCount\"];\n } else {\n return null;\n }\n }", "public function getNotInstalledDeviceCount()\n {\n if (array_key_exists(\"notInstalledDeviceCount\", $this->_propDict)) {\n return $this->_propDict[\"notInstalledDeviceCount\"];\n } else {\n return null;\n }\n }", "final public function count()\n {\n return count($this->keybuffer);\n }", "public function getDeviceCount()\n {\n if (array_key_exists(\"deviceCount\", $this->_propDict)) {\n return $this->_propDict[\"deviceCount\"];\n } else {\n return null;\n }\n }", "public function getRecipientKeyCount() {\r\n return ipworksencrypt_openpgp_get($this->handle, 19 );\r\n }", "public function count() {\n\t\treturn count($this->keys());\n\t}", "public function getInstalledDeviceCount()\n {\n if (array_key_exists(\"installedDeviceCount\", $this->_propDict)) {\n return $this->_propDict[\"installedDeviceCount\"];\n } else {\n return null;\n }\n }", "public function getInstalledDeviceCount()\n {\n if (array_key_exists(\"installedDeviceCount\", $this->_propDict)) {\n return $this->_propDict[\"installedDeviceCount\"];\n } else {\n return null;\n }\n }", "public function getSignerKeyCount() {\r\n return ipworksencrypt_openpgp_get($this->handle, 23 );\r\n }", "public function size(): int\n {\n return count($this->getKeys());\n }", "public function getCleanDeviceCount()\n {\n if (array_key_exists(\"cleanDeviceCount\", $this->_propDict)) {\n return $this->_propDict[\"cleanDeviceCount\"];\n } else {\n return null;\n }\n }", "public function count()\n {\n return count($this->hashToKeyObjectMap);\n }", "public function keyLength();", "public function getPendingQuickScanDeviceCount()\n {\n if (array_key_exists(\"pendingQuickScanDeviceCount\", $this->_propDict)) {\n return $this->_propDict[\"pendingQuickScanDeviceCount\"];\n } else {\n return null;\n }\n }", "public function numberOfExpansionModuleKeys()\n {\n return 84;\n }", "public function getFreeTries() { return $this->storage->freeTries; }", "public function keySize()\n\t{\n\t\treturn $this->key_len;\n\t}", "public function length()\n {\n return $this->client->llen($this->key);\n }", "public static function getKeyUsagesBits() {\n\t\treturn self::$key_usages;\n\t}", "public function getPendingOfflineScanDeviceCount()\n {\n if (array_key_exists(\"pendingOfflineScanDeviceCount\", $this->_propDict)) {\n return $this->_propDict[\"pendingOfflineScanDeviceCount\"];\n } else {\n return null;\n }\n }", "public function getMalwareDetectedDeviceCount()\n {\n if (array_key_exists(\"malwareDetectedDeviceCount\", $this->_propDict)) {\n return $this->_propDict[\"malwareDetectedDeviceCount\"];\n } else {\n return null;\n }\n }", "public function getKeyExchangeSize()\n {\n return $this->keyPairSize;\n }", "public function count($key): int;", "public function getNumDevices() {\n\t\t$this->getData();\n\t\treturn $this->numDevices;\n\t}", "public function getNoIssueDetectedDeviceCount()\n {\n if (array_key_exists(\"noIssueDetectedDeviceCount\", $this->_propDict)) {\n return $this->_propDict[\"noIssueDetectedDeviceCount\"];\n } else {\n return null;\n }\n }", "public function getNoIssueDetectedDeviceCount()\n {\n if (array_key_exists(\"noIssueDetectedDeviceCount\", $this->_propDict)) {\n return $this->_propDict[\"noIssueDetectedDeviceCount\"];\n } else {\n return null;\n }\n }", "public function key()\n\t\t{\n\t\t\treturn 0;\n\t\t}", "public function count()\n {\n return count($this->_storage);\n }", "public function getFailedDeviceCount()\n {\n if (array_key_exists(\"failedDeviceCount\", $this->_propDict)) {\n return $this->_propDict[\"failedDeviceCount\"];\n } else {\n return null;\n }\n }", "public function getFailedDeviceCount()\n {\n if (array_key_exists(\"failedDeviceCount\", $this->_propDict)) {\n return $this->_propDict[\"failedDeviceCount\"];\n } else {\n return null;\n }\n }", "public function count() {\n\t\treturn count($this->storage);\n\t}", "public function count() {\n\t\treturn count($this->storage);\n\t}", "private function getNeedRebootCount() {\r\n\t\t$sql = \"SELECT count(ComputerID) as count \";\r\n\t\t$sql .= \"FROM computers \";\r\n\t\t$sql .= \"WHERE ((Flags & 1024) = 1024) \";\r\n\t\t$result = mysql_query($sql) or die ('Error in SQL: ' . $sql);\r\n\r\n\t\twhile($row = mysql_fetch_array($result)) {\r\n\t\t\t$r = $row['count'];\r\n\t\t}\r\n\r\n\t\treturn($r);\r\n\t}", "public function getPendingFullScanDeviceCount()\n {\n if (array_key_exists(\"pendingFullScanDeviceCount\", $this->_propDict)) {\n return $this->_propDict[\"pendingFullScanDeviceCount\"];\n } else {\n return null;\n }\n }", "public function getPendingInstallDeviceCount()\n {\n if (array_key_exists(\"pendingInstallDeviceCount\", $this->_propDict)) {\n return $this->_propDict[\"pendingInstallDeviceCount\"];\n } else {\n return null;\n }\n }", "public function getDetectionScriptNotApplicableDeviceCount()\n {\n if (array_key_exists(\"detectionScriptNotApplicableDeviceCount\", $this->_propDict)) {\n return $this->_propDict[\"detectionScriptNotApplicableDeviceCount\"];\n } else {\n return null;\n }\n }", "public function getIssueDetectedDeviceCount()\n {\n if (array_key_exists(\"issueDetectedDeviceCount\", $this->_propDict)) {\n return $this->_propDict[\"issueDetectedDeviceCount\"];\n } else {\n return null;\n }\n }", "public function getIssueDetectedDeviceCount()\n {\n if (array_key_exists(\"issueDetectedDeviceCount\", $this->_propDict)) {\n return $this->_propDict[\"issueDetectedDeviceCount\"];\n } else {\n return null;\n }\n }", "function keyNumber( )\r\n {\r\n return $this->KeyNumber;\r\n }", "public function getUnknownStateThreatAgentDeviceCount()\n {\n if (array_key_exists(\"unknownStateThreatAgentDeviceCount\", $this->_propDict)) {\n return $this->_propDict[\"unknownStateThreatAgentDeviceCount\"];\n } else {\n return null;\n }\n }", "public function getPendingRestartDeviceCount()\n {\n if (array_key_exists(\"pendingRestartDeviceCount\", $this->_propDict)) {\n return $this->_propDict[\"pendingRestartDeviceCount\"];\n } else {\n return null;\n }\n }", "public function count()\n {\n return count($this->aStorage);\n }", "public function numberOfExpansionModuleKeysPerPage()\n {\n return 28;\n }", "public function getModelDeviceCount(): ?int {\n $val = $this->getBackingStore()->get('modelDeviceCount');\n if (is_null($val) || is_int($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'modelDeviceCount'\");\n }", "#[Deprecated(since: '7.1')]\nfunction mcrypt_enc_get_supported_key_sizes($td) {}", "public function getLockInstalledCount(): int\n {\n return count($this->getLockInstalled());\n }", "public function size($key);", "public function count(): int\n {\n return $this->getPrimary()->count();\n }", "public function hasCountAndroid(){\n return $this->_has(10);\n }", "public function getMaxHashCount() {}", "public function getMaxHashCount() {}", "public function getMaxHashCount() {}", "#[Deprecated(since: '7.1')]\nfunction mcrypt_enc_get_key_size($td) {}", "protected function getAvailableKeys()\n\t{\n\t\treturn array_diff($this->getPossibleKeys(), $this->getUnavailableKeys());\n\t}", "public function getItemCount(): int\n {\n return $this->length;\n }", "public function count(): int\n {\n return count($this->allIteratorKeys);\n }", "public function getTechIdsCount()\n {\n return $this->count(self::TECH_IDS);\n }", "public function NumberOfPrimaryKeyFields() {\n return 1;\n }", "public function NumberOfPrimaryKeyFields() {\n return 1;\n }", "public function key(): int\n {\n return $this->charCounter;\n }", "public function isUsedAllKeys(): mixed\n {\n return collect(json_decode(decrypt($this->google2fa_recovery_codes), true))->sum('active');\n }", "function enc_get_keysize($algo){\n\t\tif(preg_match('#^\\w+-(\\d+)#',$algo,$m)){\n\t\t\treturn $m[1]/8;\n\t\t}\n\t\treturn 128/8;\n\t}", "public function getPendingManualStepsDeviceCount()\n {\n if (array_key_exists(\"pendingManualStepsDeviceCount\", $this->_propDict)) {\n return $this->_propDict[\"pendingManualStepsDeviceCount\"];\n } else {\n return null;\n }\n }", "function getHardDisks()\n {\n return $this->sys->getHardDisks();\n }", "public function getnumofuserspershard()\n\t{\t\t\t\n\t\t$this->writelog(\"getnumofuserspershard() \\n\");\n\t\t$retVal = array();\n\t\ttry\n\t\t{\n\t\t\t//Check memcache\n\t\t\t// initialize class member variables\n\t\t\t$this->_client = new SoapClient($_SERVER['SOAP_CLIENT_URL']);\n\t\t\t$response = $this->_client->getnumofuserspershard();\n\t\t\t$retVal = $response;\t\t\t\t\t\t\n\t\t}\n\t\tcatch (SoapFault $fault) \n\t\t{\n\t\t\t$retVal = \"SOAP Fault: (faultcode: {$fault->faultcode}, faultstring: {$fault->faultstring})\";\n\t\t}\n\t\treturn $retVal;\n\t}", "public function getSize() {\n\t\tif($this->_size == null) {\n\t\t\t$this->_size = $this->_storage->getSize($this->_key);\n\t\t}\n\n\t\treturn $this->_size;\n\t}", "public function count()\n {\n return count($this->hData);\n }", "public function itemCount()\n {\n return $this->manager->getItemCount();\n }", "function getItemCount() {\n\t\treturn $this->_itemCount();\n\t}", "public function count(): int {\r\n return sizeof($this->items);\r\n }", "public function numOfKey($code, $key){\r\n\t $data = $this->db; \r\n\t\t\t\t$query = $data ->db_query(\r\n\t\t\t\t\"SELECT count(*) FROM a_otp WHERE id_user=\" . \r\n\t\t\t\t\t\t$this->user . \" AND expire_date > NOW() AND activate=1\");\r\n\t\tif($query){\r\n\t\t\t$row = mysql_fetch_array($query);\r\n\t\t\treturn $row[0] ;\r\n\t\t}\r\n\t\treturn 0;\r\n }", "public function getHashCount() {}", "public function getHashCount() {}", "public function getHashCount() {}", "function getItemCount()\n\t{\n\t\treturn count($this->items);\n\t}", "public function getNotInstalledDeviceCount(): ?int {\n $val = $this->getBackingStore()->get('notInstalledDeviceCount');\n if (is_null($val) || is_int($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'notInstalledDeviceCount'\");\n }", "private function _loadLength()\n {\n if ($searchSettings = \\App\\SearchSettings::where('user_id', auth()->user()->id)->first()) {\n return $searchSettings->home_entries;\n }\n return 25;\n }", "public function getMinHashCount() {}", "public function getMinHashCount() {}", "public function getMinHashCount() {}", "public function count()\n {\n return count($this->insertAutoIdKeys);\n }", "public function getCriticalFailuresDeviceCount()\n {\n if (array_key_exists(\"criticalFailuresDeviceCount\", $this->_propDict)) {\n return $this->_propDict[\"criticalFailuresDeviceCount\"];\n } else {\n return null;\n }\n }", "public function numberOfItems() {\n return db_query('SELECT COUNT(mqid) FROM {messaging_store} WHERE name = :name', array(':name' => $this->name))->fetchField();\n }", "public function listFlyweights(): int\n {\n $count = count($this->flyweights);\n echo \"\\nFlyweightFactory: I have $count flyweights:\\n\";\n foreach ($this->flyweights as $key => $flyweight) {\n echo $key . \"\\n\";\n }\n return $count;\n }", "public function getResTypeExtCount()\n {\n return $this->count(self::RES_TYPE_EXT);\n }", "public function getInstalledDeviceCount(): ?int {\n $val = $this->getBackingStore()->get('installedDeviceCount');\n if (is_null($val) || is_int($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'installedDeviceCount'\");\n }", "public function hasHp(){\n return $this->_has(26);\n }", "#[Deprecated(since: '7.1')]\nfunction mcrypt_get_key_size($cipher, $module) {}", "public static function getNumberOfVendors() {\n $cache = Cache::instance();\n if($cache->test(self::STAT_VENDOR_CACHE)) {\n $data = $cache->load(self::STAT_VENDOR_CACHE);\n }\n else {\n $db = Database::instance();\n $data = $db->select()\n ->from('vendor', 'COUNT(id) as k')\n ->query()->fetch()\n ;\n $cache->save($data, self::STAT_VENDOR_CACHE);\n }\n return $data['k'];\n }", "private function getMacCount() {\r\n\t\t$sql = \"SELECT count(*) as systems FROM computers \";\r\n\t\t$sql .= \"WHERE os LIKE '%darwin%'\";\r\n\t\t$result = mysql_query($sql) or die ('Error in SQL: ' . $sql);\r\n\r\n\t\twhile($row = mysql_fetch_array($result)) {\r\n\t\t\t$r = $row['systems'];\r\n\t\t}\r\n\r\n\t\treturn($r);\r\n\t}", "public function getInstalledCount(): int\n {\n return count($this->getInstalled());\n }", "public function getDiskCount()\n {\n return $this->disk_count;\n }" ]
[ "0.75731635", "0.6581608", "0.64486897", "0.61817557", "0.61064506", "0.6091121", "0.60250217", "0.60130924", "0.60088044", "0.60088044", "0.5978989", "0.59064555", "0.5901261", "0.58694124", "0.5859098", "0.5859098", "0.58030486", "0.57911944", "0.5764846", "0.5726201", "0.5704795", "0.57030857", "0.56801295", "0.5660581", "0.56530243", "0.5644028", "0.55695367", "0.55557835", "0.5534054", "0.55191135", "0.54518193", "0.54500544", "0.5446894", "0.5446894", "0.54369515", "0.5434687", "0.543141", "0.543141", "0.5409992", "0.5409992", "0.5398152", "0.5397295", "0.539511", "0.5388515", "0.532798", "0.532798", "0.5322522", "0.53143746", "0.531249", "0.52987176", "0.5287234", "0.52598655", "0.52421224", "0.5237643", "0.522913", "0.5228172", "0.51833844", "0.51805514", "0.51802844", "0.5179629", "0.51746017", "0.51721805", "0.51674604", "0.5162181", "0.5156394", "0.5150082", "0.5150082", "0.51462984", "0.51404625", "0.5139038", "0.5129401", "0.5128637", "0.5126574", "0.511195", "0.51106066", "0.5110195", "0.5109613", "0.5096887", "0.50967836", "0.5092608", "0.50915796", "0.50915796", "0.509039", "0.50898385", "0.5086578", "0.5085984", "0.5085984", "0.5084712", "0.50821173", "0.508132", "0.5076646", "0.50758237", "0.50715363", "0.50628984", "0.5059813", "0.505585", "0.5053263", "0.5048207", "0.5047782", "0.5046085" ]
0.79255605
0
Smarty plugin: sC_template_printMessage function
Smarty плагин: функция sC_template_printMessage
function smarty_function_sC_template_printMessageSurvey($params, &$smarty) { if (isset($params['message'])) { if (mb_strlen($params['message']) > 1000) { $prefix = mb_substr($params['message'], 0, 1000); $suffix = mb_substr($params['message'], mb_strlen($params['message']) - 300, mb_strlen($params['message'])); $infix = mb_substr($params['message'], 1001, mb_strlen($params['message']) - mb_strlen($prefix) - mb_strlen($suffix)); $params['message'] = $prefix.'<a href = "javascript:void(0)" onclick = "this.style.display = \'none\';Element.extend(this).next().show()"><br>[...]<br></a><span style = "display:none">'.$infix.'</span>'.$suffix; } if (isset($params['type']) && $params['type'] == 'success') { $image = '<img src = "images/32x32/success.png" title = "'._SUCCESS.'" alt = "'._SUCCESS.'"/>'; $class = "message_success"; } elseif (isset($params['type']) && $params['type'] == 'system_announcement') { $image = '<img src = "images/32x32/tools.png" title = "'._SYSTEM.'" alt = "'._SYSTEM.'" />'; $class = "message_announcement"; } else { $image = '<img src = "images/32x32/warning.png" title = "'._WARNING.'" alt = "'._WARNING.'" />'; $class = "message_failure"; } $str = ' <table class = "messageTable" id = "messageTable"> <tr><td class = "'.$class.'"> '.$image.' </td><td class = "'.$class.' message_text"> '.$params['message'].' </td><td class = "'.$class.'"> <img src = "images/16x16/close.png" alt = "'._CLOSE.'" title = "'._CLOSE.'" onclick = "document.getElementById(\'messageTable\').style.display=\'none\';"> </td></tr> </table>'; } else { $str = ''; } return $str; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function system_message($msg) {\r\n\r\n global $cfg;\r\n\r\n\r\n $theme_color = $cfg['USER_INITIAL_THEME_COLOR'];\r\n\r\n\r\n $tpl = new pTemplate();\r\n/*\r\n if (preg_match(\"/(admin|client|reseller)/\", $_SERVER['PHP_SELF'], $matches)) {\r\n\r\n $tpl_path = \"../\".$cfg['ROOT_TEMPLATE_PATH'];\r\n\r\n } else {\r\n\r\n $tpl_path = $cfg['ROOT_TEMPLATE_PATH'];\r\n\r\n }\r\n*/\r\n\t$tpl_path = \"../\".$cfg['ROOT_TEMPLATE_PATH'].$cfg['USER_INITIAL_THEME'];\r\n\t$tpl -> define_dynamic('page', $tpl_path.'/system-message.tpl');\r\n\r\n \r\n $tpl -> assign(\r\n array(\r\n 'TR_SYSTEM_MESSAGE_PAGE_TITLE' => 'VHCS Error',\r\n 'THEME_COLOR_PATH' => \"themes/$theme_color\",\r\n 'THEME_CHARSET' => tr('encoding'),\r\n\r\n 'TR_ERROR_MESSAGE' => 'Error Message',\r\n\t\t\t\t\t\t\t'TR_VHCS_LICENSE' => $cfg['VHCS_LICENSE'],\r\n\t\t\t\t\t\t\t'TR_TIME' => date(\"g:i a\"),\r\n\t\t\t\t\t\t\t'TR_DATE' => date(\"l dS of F Y\"),\r\n 'MESSAGE' => $msg\r\n )\r\n );\r\n \r\n $tpl -> parse('PAGE', 'page');\r\n \r\n $tpl -> prnt();\r\n\r\n\r\n exit(0);\r\n\r\n}", "function content_5a5f9b27167f16_04966390 ($_smarty_tpl) {\nif (isset($_smarty_tpl->tpl_vars['errors']->value) && $_smarty_tpl->tpl_vars['errors']->value[0] != '') {?><aside class=\"message pageerrorcontainer\" role=\"alert\"><?php\n$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['errors']->value, 'error');\nif ($_from !== null) {\nforeach ($_from as $_smarty_tpl->tpl_vars['error']->value) {\nif ($_smarty_tpl->tpl_vars['error']->value) {?><p><?php echo $_smarty_tpl->tpl_vars['error']->value;?>\n</p><?php }\n}\n}\n$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);\n?>\n</aside><?php }\nif (isset($_smarty_tpl->tpl_vars['messages']->value) && $_smarty_tpl->tpl_vars['messages']->value[0] != '') {?><aside class=\"message pagemcontainer\" role=\"status\"><?php\n$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['messages']->value, 'message');\nif ($_from !== null) {\nforeach ($_from as $_smarty_tpl->tpl_vars['message']->value) {\nif ($_smarty_tpl->tpl_vars['message']->value) {?><p><?php echo $_smarty_tpl->tpl_vars['message']->value;?>\n</p><?php }\n}\n}\n$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);\n?>\n</aside><?php }\n}", "public function print_template()\n {\n }", "public function print_template()\n {\n }", "public function printMessage()\n\t\t{\n\t\t\trequire ADMIN.'core/view/system_messages.php';\n\t\t}", "public final function print_template()\n {\n }", "function smarty_function_um_welcome_message($args, &$smarty_obj)\r\r\n{\r\r\n\r\r\n extract($args);\r\r\n\t$config_vars = $smarty_obj->_config[0][\"vars\"];\r\r\n\r\r\n\t$array_keys = array_keys($args);\r\r\n\r\r\n if (empty($var)) {\r\r\n $smarty_obj->_trigger_error_msg(\"um_welcome_message: missing 'var' parameter\");\r\r\n return;\r\r\n }\r\r\n\r\r\n if (!in_array('messages',$array_keys )) {\r\r\n $smarty_obj->_trigger_error_msg(\"um_welcome_message: missing 'messages' parameter\");\r\r\n return;\r\r\n }\r\r\n\r\r\n if (!in_array('unread', $array_keys)) {\r\r\n $smarty_obj->_trigger_error_msg(\"um_welcome_message: missing 'unread' parameter\");\r\r\n return;\r\r\n }\r\r\n if (!in_array('var', $array_keys)) {\r\r\n $smarty_obj->_trigger_error_msg(\"um_welcome_message: missing 'var' parameter\");\r\r\n return;\r\r\n }\r\r\n\r\r\n if (!in_array('boxname', $array_keys)) {\r\r\n $smarty_obj->_trigger_error_msg(\"um_welcome_message: missing 'boxname' parameter\");\r\r\n return;\r\r\n }\r\r\n\r\r\n\t$wlcmessage = $config_vars[\"msg_you_have\"]. \" <b>$messages</b> \";\r\r\n\r\r\n\tif($messages == 1)\r\r\n\t\t$wlcmessage .= $config_vars[\"msg_message\"].\", \";\r\r\n\telse\r\r\n\t\t$wlcmessage .= $config_vars[\"msg_messages\"].\", \";\r\r\n\tif($unread == 0)\r\r\n\t\t$wlcmessage .= $config_vars[\"msg_none_unread\"].\" \";\r\r\n\telseif($unread == 1)\r\r\n\t\t$wlcmessage .= \"<b>$unread</b> \". $config_vars[\"msg_one_unread\"].\" \";\r\r\n\telse\r\r\n\t\t$wlcmessage .= \"<b>$unread</b> \". $config_vars[\"msg_more_unread\"].\" \";\r\r\n\r\r\n\t$wlcmessage .= $config_vars[\"msg_in_the_folder\"].\" <b>$boxname</b>\";\r\r\n\r\r\n $smarty_obj->assign($var, $wlcmessage);\r\r\n return;\r\r\n}", "function message_template()\n{\nreturn <<<EOF\n<html>\n<head>\n\n<title>{title}</title>\n\n<meta http-equiv='content-type' content='text/html; charset={charset}' />\n\n{meta_refresh}\n\n<style type=\"text/css\">\n\nbody { \nbackground-color:\t#ffffff; \nmargin:\t\t\t\t50px; \nfont-family:\t\tVerdana, Arial, Tahoma, Trebuchet MS, Sans-serif;\nfont-size:\t\t\t11px;\ncolor:\t\t\t\t#000;\nbackground-color:\t#fff;\n}\n\na {\nfont-family:\t\tVerdana, Arial, Tahoma, Trebuchet MS, Sans-serif;\nletter-spacing:\t\t.09em;\ntext-decoration:\tnone;\ncolor: #330099;\nbackground-color: transparent;\n}\n \na:visited {\ncolor:\t\t\t\t#330099;\nbackground-color:\ttransparent;\n}\n\na:active {\ncolor:\t\t\t\t#ccc;\nbackground-color:\ttransparent;\n}\n\na:hover {\ncolor:\t\t\t\t#000;\ntext-decoration: underline;\nbackground-color:\ttransparent;\n}\n\n#content {\nborder:\t\t\t\t#000 1px solid;\nbackground-color: \t#DEDFE3;\npadding:\t\t\t22px 25px 14px 25px;\n}\n\nh1 {\nfont-family:\t\tVerdana, Arial, Tahoma, Trebuchet MS, Sans-serif;\nfont-weight:\t\tbold;\nfont-size:\t\t\t14px;\ncolor:\t\t\t\t#000;\nmargin-top: \t\t0;\nmargin-bottom:\t\t14px;\n}\n\np {\nfont-family:\t\tVerdana, Arial, Tahoma, Trebuchet MS, Sans-serif;\nfont-size: \t\t\t12px;\nfont-weight: \t\tnormal;\nmargin-top: \t\t12px;\nmargin-bottom: \t\t14px;\ncolor: \t\t\t\t#000;\n}\n\nul {\nmargin-bottom: \t\t16px;\n}\n\nli {\nlist-style:\t\t\tsquare;\nfont-family:\t\tVerdana, Arial, Tahoma, Trebuchet MS, Sans-serif;\nfont-size: \t\t\t12px;\nfont-weight: \t\tnormal;\nmargin-top: \t\t8px;\nmargin-bottom: \t\t8px;\ncolor: \t\t\t\t#000;\n}\n\n</style>\n\n</head>\n\n<body>\n\n<div id=\"content\">\n\n<h1>{heading}</h1>\n\n{content}\n\n<p>{link}</p>\n\n</div>\n\n</body>\n\n</html>\nEOF;\n}", "function _outputMessage($template) {\n $this->controller->beforeFilter();\n parent::_outputMessage($template);\n }", "public function print_template_content();", "function bp_core_render_message() {\r\n\tglobal $bp;\r\n\r\n\tif ( $bp->template_message ) {\r\n\t\t$type = ( 'success' == $bp->template_message_type ) ? 'updated' : 'error';\r\n\t?>\r\n\t\t<div id=\"message\" class=\"<?php echo $type; ?>\">\r\n\t\t\t<p><?php echo stripslashes( esc_attr( $bp->template_message ) ); ?></p>\r\n\t\t</div>\r\n\t<?php\r\n\t\tdo_action( 'bp_core_render_message' );\r\n\t}\r\n}", "function print_messages() {\n global $messages;\n foreach ($messages as $message) {\n echo \"<p class=\\\"message\\\">\" . htmlspecialchars($message) . \"</p>\\n\";\n }\n}", "public function printMessage() {\r\n\t\t$usermsg = '';\r\n\t\t$code = $this->getCode();\r\n\t\t\r\n\t\tswitch($code) {\r\n\t\t\tcase SOME_DEFINED_ERROR_CODE:\r\n\t\t\t\t$usermsg = 'Ooops! Sorry about that.';\r\n\t\t\t\tbreak;\r\n\t\t\tcase OTHER_DEFINED_ERROR_CODE:\r\n\t\t\t\t$usermsg = \"Drat\";\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\t$usermsg = file_get_contents('/templates/general_error.html');\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\treturn $usermsg;\r\n\t}", "function template_message($message, $url)\n{\n\tdisplay_header($url, 3);\n\tprint(\"$message<BR>\");\n\n\tif($url != null)\n\t\tprint(\"<A HREF=\\\"$url\\\">You will be redirected in 3 seconds...</A><BR>\");\n\n\tdisplay_footer();\n}", "function turtlepower_bp_core_render_message() {\n\tglobal $bp;\n\n\tif ( !empty( $bp->template_message ) ) :\n\t\t$type = ( 'success' == $bp->template_message_type ) ? 'updated' : 'error';\n\t\t$content = apply_filters( 'bp_core_render_message_content', $bp->template_message, $type ); ?>\n\n\t\t<div id=\"message\" class=\"bp-template-notice <?php echo $type; ?>\">\n\n\t\t\t<?php echo $content; ?>\n\n\t\t</div>\n\n\t<?php\n\n\t\tdo_action( 'bp_core_render_message' );\n\n\tendif;\n}", "function print_messages() {\n global $messages;\n foreach ($messages as $message) {\n echo \"<p><strong>\" . htmlspecialchars($message) . \"</strong></p>\\n\";\n }\n}", "function print_messages() {\n global $messages;\n foreach ($messages as $message) {\n echo \"<p><strong>\" . htmlspecialchars($message) . \"</strong></p>\\n\";\n }\n}", "function haltmsg($msg) {\n printf(\"<b>Template Error:</b> %s<br>\\n\", $msg);\n }", "public function printMessage()\n {\n echo self::gMessage(true);\n }", "public function messageAction()\r\n {\r\n \t$messages = $this->_getSession()->getMessages(true);\r\n \tif ($messages) {\r\n\t \techo $this->getLayout()->createBlock('ajaxify/messages')->setMessages($messages)->getGroupedHtml();\r\n \t}\r\n \treturn '';\r\n }", "protected function renderMessage() {}", "function smarty_function_debug( $params, &$smarty )\r\n{\r\n if ( isset( $params['output'] ) )\r\n {\r\n $smarty->assign( \"_smarty_debug_output\", $params['output'] );\r\n }\r\n require_once( SMARTY_CORE_DIR.\"core.display_debug_console.php\" );\r\n return smarty_core_display_debug_console( NULL, $smarty );\r\n}", "private function _messages ()\n\t{\n\t\t$string = '<!DOCTYPE html>\n<html>\n<head>\n <meta charset=\"utf-8\">\n <title>Generator script</title>\n</head>\n<body style=\"background: #FCF7E3;\">\n\t<div style=\"width: 600px; margin: 40px auto; font-family: arial, sans-serif; background: #fff; border: 1px dotted #000; padding: 30px; \">\n\t<h1>Generator script run</h1>\n\t\t' . ul($this->msg) . '\n\t</div>\n</body>\n</html>';\n\t\treturn $string;\n\t}", "function Debug_Template() {\n\n\n}", "protected function fm_js_template_message() {\n return $this->fp_js_template_message();\n }", "function paint_template_search($message){\n $log=log::getInstance();\n $log->add_log_general(\"error paint_template_search\",\"events_front_end\", \"response\".http_response_code());\n $log->add_log_user(\"error paint_template_search\",\"\",\"events_front_end\", \"response\".http_response_code());\n\n print (\"<section> \\n\");\n print (\"<div class='container'> \\n\");\n print (\"<div class='row text-center pad-row'> \\n\");\n\n print (\"<h2>\" . $message . \"</h2> \\n\");\n print (\"<br><br><br><br> \\n\");\n\n print (\"</div> \\n\");\n print (\"</div> \\n\");\n print (\"</section> \\n\");\n}", "function print_success($message) {\n ?><div class=\"success\">SUCCESS: <?=$message?></div><?php\n }", "function getMessage() ;", "function WBC_WooMessageGeneration(){\r\n include('templates/wbc-WooMessage.php');\r\n}", "public function js_template_message() {\n $rv = '<div class=\"{!}fp-msg\">\n <div class=\"{!}fp-msg-text\"></div>\n <div><button class=\"{!}fp-msg-butok\">'.get_string('ok').'</button></div>\n </div>';\n return preg_replace('/\\{\\!\\}/', '', $rv);\n }", "function EmailMessage()\n\t\t{\n\t\t\t$this->obTemplate->clear_cache('affiliates/ihtml/message.html');\n\t\t\t$this->obTemplate->assign('message', $this->message);\n\t\t\t$this->obTemplate->assign('extraVar1', $this->extraVar1);\n\t\t\t$this->obTemplate->assign('Content',$this->obTemplate->fetch('affiliates/ihtml/message.html'));\n\t\t\t$this->parse();\n\t\t}", "public function printMsg()\n {\n print $this->msg;\n }", "function print_error($message)\n{\n print <<<END\n <p class=\"error\">$message</p>\nEND;\n}", "protected function GetTemplate()\n\t{\n\t\treturn 'message.tpl';\n\t}", "function mamo_template_tag_message() {\n\t\t\t$mamo_msg = stripslashes($this->g_opt['mamo_pagemsg']);\n\t\t\t$mamo_msg = str_replace('[blogurl]', get_option('home'), $mamo_msg);\n\t\t\t$mamo_msg = str_replace('[blogtitle]', get_bloginfo('name'), $mamo_msg);\n\n\t\t\t$calctimes_arr = $this->calculate_times();\n\t\t\tif ($calctimes_arr['minutes_total'] == 0) {\n\t\t\t\t$mamo_msg = str_replace('[until]', $this->g_opt['mamo_placeholder_until_exc'], $mamo_msg);\n\t\t\t} else {\n\t\t\t\t$mamo_msg = str_replace('[until]', $this->g_opt['mamo_placeholder_until'], $mamo_msg);\t\t\t\n\t\t\t}\n\t\t\t$mamo_msg = str_replace('[date]', $calctimes_arr['date'], $mamo_msg);\n\t\t\t$mamo_msg = str_replace('[time]', $calctimes_arr['time'], $mamo_msg);\n\t\t\t$mamo_msg = str_replace('[days]', $calctimes_arr['calc_days'], $mamo_msg);\n\t\t\t$mamo_msg = str_replace('[hours]', $calctimes_arr['calc_hours'], $mamo_msg);\n\t\t\t$mamo_msg = str_replace('[minutes]', $calctimes_arr['calc_mins'], $mamo_msg);\n\t\t\treturn $mamo_msg;\n\t}", "function smarty_function_messagejui($params, &$smarty) {\r\n\t$xhtml = '';\r\n\tif( Pegasus::messageSet() ) {\r\n\t\t$note = new RenderNoteJUI();\r\n\t\t$note->setHidden(isset($params['hide']));\r\n \t$xhtml = $note->setContent(Pegasus::getMessage())->render();\r\n\t\tPegasus::clearMessage();\r\n\t}\r\n return $xhtml;\r\n}", "function show_message()\n {\n $output = '';\n if(isset($_SESSION[\"br_message\"])){\n $snippetdata = $this->vars[\"snippets\"][\"br_system_message\"][\"snippet_contents\"];\n $vars[0] = array(\n 'message' => $_SESSION[\"br_message\"]\n );\n $output = $this->EE->TMPL->parse_variables($snippetdata, $vars);\n unset($_SESSION[\"br_message\"]);\n }\n\n if(isset($_SESSION[\"br_alert\"])){\n $snippetdata = $this->vars[\"snippets\"][\"br_system_alert\"][\"snippet_contents\"];\n $vars[0] = array(\n 'alert' => $_SESSION[\"br_alert\"]\n );\n $output = $this->EE->TMPL->parse_variables($snippetdata, $vars);\n unset($_SESSION[\"br_alert\"]);\n }\n return $this->return_data = $output;\n }", "public function message(): string\n {\n //$emailChangeUrl = $this->config->app->frontEndUrl . '/user/' . $user->user_activation_email . '/email';\n //$subject = _('Email Change Request');\n //$body = sprintf(_('Click %shere%s to set a new email for your account.'), '<a href=\"' . $emailChangeUrl . '\">', '</a>');\n //break;\n\n return Template::generate('users-charge-success', $this->entity->toArray());\n }", "public static function print_upgrade_notice() {\n\n?>\n<div id=\"message\" class=\"error\">\n <p>\n <strong>Hey, this is important!</strong> Head over to the <a href=\n \"plugins.php?page=wp-pingfm-settings\">Ping.fm plugin settings</a> to finish\n upgrading to version <?php echo self::PLUGIN_VERSION; ?>. Do it! Go!\n </p>\n</div>\n<?php\n\n }", "function outputResultMessage()\n {\n global $application;\n\n if (modApiFunc('Session', 'is_set', 'ResultMessage'))\n {\n $msg = modApiFunc('Session', 'get', 'ResultMessage');\n modApiFunc('Session', 'un_set', 'ResultMessage');\n $template_contents = array(\n \"ResultMessage\" => getMsg('ML', $msg)\n );\n $this -> _Template_Contents = $template_contents;\n $application -> registerAttributes($this -> _Template_Contents);\n return $this -> mTmplFiller -> fill(\n 'multilang/language_settings/',\n 'result_message.tpl.html',\n array()\n );\n }\n else\n {\n return '';\n }\n }", "function piecrust_show_system_message($message, $details = null)\n{\n $contents = file_get_contents(__DIR__ . '/res/messages/' . $message . '.html');\n if ($details != null)\n {\n $contents = str_replace('{{ details }}', $details, $contents);\n }\n echo $contents;\n}", "private function _setMessageTemplate()\n\t{\n\t\treturn $this->getTemplateElement('message');\n\t}", "function FormExpress_user_display_message($args)\n{\n $render = pnRender::getInstance('FormExpress');\n $render->assign('message', $args['message'] );\n $render->assign('submitid', pnSessionGetVar('FORMEXPRESSSUBMITID') );\n pnSessionDelVar('FORMEXPRESSSUBMITID');\n return $render->fetch('formexpress_user_display_message.html');; \n}", "function estadisticas_ingreso()\n{\nglobal $template; /* Variable global para enviar mensajes al tpl deseado */ \n$template->display('estadisticas_ingreso.tpl');\t\t\n}", "function ShowMessage($title,$intro,$message) {\n\tglobal $config;\n\tglobal $fReadFile;\n\t$templates_message = fReadFile('templates/'.$config[\"framestyle\"].'/message.tpl');\n\t// Thay the TEMPLATES\n\t$temp=$templates_message;\n\t$temp=str_replace('{TITLE_PAGE}',$title,$temp);\n\t$temp=str_replace('{INTRO_PAGE}',$intro,$temp);\n\t$temp=str_replace('{MESSAGE}',$message,$temp);\n\treturn $temp;\n}", "protected function compile()\n {\n $translator = $this->container->get('translator');\n $strMessageId = 'hh.newsalert.module_redirect.opt'.$this->opt.'.'.$this->success.'.';\n $this->Template->headline = $translator->trans($strMessageId.'head');\n $this->Template->wrapperClass = $this->strWrapperClass;\n $this->Template->wrapperId = $this->strWrapperId;\n\n $this->Template->strMessage = $translator->trans($strMessageId.'message', [\n '%topic%' => $this->topic,\n ]);\n }", "function showmsg($message, $msg_type=\"warn\"){\n\t?><p class=\"msg <?php echo $msg_type; ?>\"><?php echo $message; ?></p><?php \n}", "function outputMessage()\n{\n\tglobal $strSign, $arrMail;\n\n\t$strMailContent = nl2br( $arrMail['Content'] );\n\n\t$strOutput = \"\";\n\n\tif ( $GLOBALS['config']['inquiryform']['show_form_title'] )\n\t{\n\t\t$stroutput .= sprintf('<h2 class=\"line\">%s</h2>', post('Formulartitel') );\n\t}\n\n\t$strOutput = \"\n\t\t<h2>Vielen Dank</h2>\n\n\t\t<p>\n\t\t\tDie Daten wurden an uns übermittelt.<br />\n\t\t\tBei Angabe einer gültigen Emailadresse wird\n\t\t\tautomatisch eine Kopie dieser Nachricht versand.<br />\n\t\t<br />\n\t\t<span class=\\\"quote\\\">\n\t\t<strong>Emailtext:</strong><br />\n\t\t{$strMailContent}\n\t\t</span>\n\t\t<br />\n\t\tWir werden uns schnellstmöglich bei Ihnen melden.<br />\n\t\t<br />\n\t\t{$strSign}<br />\n\t\t</p>\n\n\t\t<p style=\\\"text-align: center;\\\">\n\t\t\t<a title=\\\"zurück\\\" href=\\\"\".post('Umleitung').\"\\\">zurück zur Startseite</a>\n\t\t</p>\\n\";\n\n return $strOutput;\n\n}", "public function proto_b()\n {\n $this->analyze(__FUNCTION__);\n\n\n $this->smarty->display($this->template_path().\"/user/campaign/proto_c.html\");\n }", "function smarty_function_dump($params)\n{\n if (empty($params['v'])) {\n trigger_error(\"insert variable: missing 'v' parameter\");\n return;\n }\n return dump($params['v']);\n}", "function fillTemplate($msg) {\n\n require_once (\"php/MiniTemplator.class.php\");\n\n $t = new MiniTemplator;\n\n $ok = $t->readTemplateFromFile (\"html/errorpage_template.htm\");\n if (!$ok) die (\"MiniTemplator.readTemplateFromFile failed.\");\n\n $t->setVariable (\"message\", $msg);\n $t->addBlock (\"errormessages\");\n\n $t->generateOutput();\n\n }", "public function printResEmailValidation() {\n\t return\tAcid::tpl('modules/user/res-validation.tpl',array(),$this);\n\t}", "function MECPT_admin_notice($message) {\n$class = 'notice notice-error';\n$print_notice = __( $message, 'sample-text-domain' );\nprintf( '<div class=\"%1$s\"><p>%2$s</p></div>', $class, $print_notice ); \n}", "function printSuccess($msg) {\n // [15/12/2003 seh]\n global $lang;\n // [/seh]\n\techo '\n\t\t<table class=border cellSpacing=0 cellPadding=0 width=\"100%\" align=center border=0>\n\t\t\t<tr>\n\t\t\t\t<td>\n\t\t\t\t\t<table cellSpacing=1 cellPadding=5 width=\"100%\" border=0>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td class=info align=middle><b>'.$lang['success'].'</b></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 class=error align=middle>\n\t\t\t\t\t\t\t\t<b><font color=green>'. $msg . '</font></b><br>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</table>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t</table>';\n}", "function haltmsg($msg)\r\n\t{\r\n\t\t$the_error ='';\r\n\t\t$the_error .= \"\\n\\n \".$msg.\"\\n\\n\";\r\n\t\t$the_error .= \"Date: \".date(\"l dS of F Y h:i:s A\");\r\n\r\n\t\t$out = \"<html><head><title>Template Error</title>\r\n\t\t\t\t\t<style>P,BODY{ font-family: trebuchet MS,sans-serif; font-size:11px; \r\n\t\t\t\t\t}</style></head><body>&nbsp;<br><br><blockquote><b>There is an error with the \r\n\t\t\t\t\ttemplate system.</b><br>\r\n\t\t\t\t\tYou can try to refresh the page by clicking <a href=\\\"javascript:window.location=window.location;\\\">here</a>.\r\n\t\t\t\t\t<br><br><b>Error Returned</b><br>\r\n\t\t\t\t\t<form name='mysql'><textarea rows=\\\"5\\\" cols=\\\"60\\\">\".htmlspecialchars($the_error).\"</textarea></form></blockquote></body></html>\";\r\n\t\tprint $out;\r\n\t\texit();\r\n\t}", "function rcw_mes($t,$m){echo'<div id=\"message\" class=\"updated fade\"><strong>'.$t.'</strong><p>'.$m.'</p></div>';}", "function echo_result($code,$msgkey,$values=array())\r\n{\r\n\tglobal $_SGLOBAL;\r\n\r\n\t//ss_log($msgkey);\r\n\t//\r\n\tinclude_once(S_ROOT.'./language/lang_showmessage.php');\r\n\tif(isset($_SGLOBAL['msglang'][$msgkey]))\r\n\t{\r\n\t\t$message = lang_replace($_SGLOBAL['msglang'][$msgkey], $values);\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$message = $msgkey;\r\n\t}\r\n\r\n\t//ss_log('echo message:'.$message);\r\n\r\n\tprint \"<result>\"\r\n\t. \"<code> <![CDATA[\" .$code. \"]]> </code>\"\r\n\t. \"<message> <![CDATA[\" .$message. \"]]> </message>\"\r\n\t. \"</result>\\n\";\r\n\r\n\texit();//add by wangcya, 20130117\r\n}", "function printMessage($message)\n{\n echo \"$message\\n\";\n}", "public function getMessage(){\n return \"<tr><td><a href='$this->url'>$this->date : New $this->object by $this->author</a></td></tr>\";\n }", "function print_feedback() {\n?>\n\t<div id=\"message\" class=\"updated notice is-dismissible\">\n\t\t<p><strong>\n\t\t\t<?php echo __('Settings saved.', 'woocommerce') ?>\n\t\t</strong></p>\n\t</div>\n<?php\n}", "public function display()\r\n\t{\r\n\t\t$this->context->smarty->assign('warnings', $this->warnings);\r\n\t\tparent::display();\r\n\t\t\r\n\t}", "function printFromTemplate($tpl){\n\n\t\t// not callable by a multiform node\n\t\tif( $this->_multi == 'node' ) return false;\n\n\t\tif( is_file($tpl) ){\n\t\t\tif( !is_readable($tpl) ){ return false; }\n\t\t\t$tpl = file_get_contents($tpl);\n\t\t\tif($tpl === false){ return false; }\t\t\t\n\t\t}\n\n\t\t// store return flag to restore later\n\t\t$tmpReturn = $this->returnOutput;\n\t\t$this->returnOutput = true;\n\n\t\t$pattern = '/\\\\'.$this->tplStart.'([^\\\\'.$this->tplEnd.']+)\\\\'.$this->tplEnd.'/U';\n\t\tpreg_match_all($pattern, $tpl, $fields);\n\n\t\tforeach($fields[1] as $field){\n\t\t\tif( strstr($field, '_verify') ){ continue; }\n\t\t\t$replace = $this->tplStart.$field.$this->tplEnd;\n\t\t\tif( strstr($field, ':') ) {\n\t\t\t\t$pieces = explode(':',$field);\n\t\t\t\t$ct = count($pieces);\n\t\t\t\t// replace with a php variable, up to a 2 dimension array\n\t\t\t\tif($pieces[0]=='php'){\n\t\t\t\t\tglobal $$pieces[1];\n\t\t\t\t\tif($ct==2){\n\t\t\t\t\t\t$tpl = str_replace($replace, (isset(${$pieces[1]}) ? ${$pieces[1]}:''), $tpl);\n\t\t\t\t\t} else if($ct==3){\n\t\t\t\t\t\t$tpl = str_replace($replace, (isset(${$pieces[1]}[$pieces[2]]) ? ${$pieces[1]}[$pieces[2]]:''), $tpl);\n\t\t\t\t\t} else if($ct==4){\n\t\t\t\t\t\t$tpl = str_replace($replace, (isset(${$pieces[1]}[$pieces[2]][$pieces[3]]) ? ${$pieces[1]}[$pieces[2]][$pieces[3]]:''), $tpl);\n\t\t\t\t\t}\n\t\t\t\t} else if($pieces[0]=='setBreak'){\n\t\t\t\t\tif($ct==3){\n\t\t\t\t\t\tswitch( strtolower($pieces[1]) ){\n\t\t\t\t\t\t\tcase 'label':\n\t\t\t\t\t\t\t$tpl = str_replace($replace,$this->setLabelBreak($pieces[2]), $tpl);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'field':\n\t\t\t\t\t\t\t$tpl = str_replace($replace,$this->setFieldBreak($pieces[2]), $tpl);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'option':\n\t\t\t\t\t\t\t$tpl = str_replace($replace,$this->setOptionBreak($pieces[2]), $tpl);\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} else if( $field == 'open_form' || strstr($field,'open_form,') ) {\n\t\t\t\t$pieces = explode(',',$field);\n\t\t\t\t$tpl = str_replace($replace,\n\t\t\t\t\t$this->openForm(\n\t\t\t\t\t\t(isset($pieces[1])?$pieces[1]:''),\t // $attr\n\t\t\t\t\t\t(isset($pieces[2])?$pieces[2]:true), // $autosubmit\n\t\t\t\t\t\t(isset($pieces[3])?$pieces[3]:'')\t // $action\n\t\t\t\t\t), $tpl);\n\t\t\t} else if( $field=='close_form' || strstr($field,'close_form,') ) {\n\t\t\t\t$pieces = explode(',',$field);\n\t\t\t\t$tpl = str_replace($replace,\n\t\t\t\t\t$this->closeForm(\n\t\t\t\t\t\t(isset($pieces[1])?$pieces[1]:'Submit'),\t // $submitValue\n\t\t\t\t\t\t(isset($pieces[2])?$pieces[2]:''),\t\t\t // $attr\n\t\t\t\t\t\t(isset($pieces[3])?$pieces[3]:'Reset Form'), // $resetValue\n\t\t\t\t\t\t(isset($pieces[4])?$pieces[4]:true), \t\t // $printReset\n\t\t\t\t\t\t(isset($pieces[5])?$pieces[5]:true) \t\t // $closeForm\n\t\t\t\t\t), $tpl);\n\t\t\t} else {\n\t\t\t\n\t\t\t\t$verifyReplace = $this->tplStart.$field.'_verify'.$this->tplEnd;\n\t\t\t\t\n\t\t\t\t// get attribute arg if avail\n\t\t\t\tif( strpos($field, ',') !== false ){\n\t\t\t\t\tlist($field, $fieldAttr) = explode(',',$field,2);\n\t\t\t\t} else { $fieldAttr = null; }\n\t\t\t\t\n\t\t\t\t// get table and field if a multiform\n\t\t\t\tif( $this->_multi == 'root' && strpos($field, '.') !== false ){\n\t\t\t\t\tlist($table, $field) = explode('.',$field,2);\n\t\t\t\t\tif( array_key_exists($table,$this->tables) ){\n\t\t\t\t\t\t$formitable = &$this->tables[$table];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// get the correct object if its not a multiform\n\t\t\t\tif(!isset($formitable)){ $formitable = &$this; }\n\t\t\t\t\n\t\t\t\t// store node output flag if a root\n\t\t\t\tif( $this->_multi == 'root' ){\n\t\t\t\t\t$tmpMultiReturn = $formitable->returnOutput;\n\t\t\t\t\t$formitable->returnOutput = true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// replace the matched string w/ output of printField or empty string\n\t\t\t\t$tpl = str_replace($replace,\n\t\t\t\t\t( in_array($field,$formitable->fieldNames) ? $formitable->printField($field, $fieldAttr) : '' ), $tpl);\n\t\t\t\t\n\t\t\t\t// replace verify string if available\n\t\t\t\tif( in_array( (isset($table)?$table.'.':'').$field.'_verify', $fields ) ){\n\t\t\t\t\t$tpl = str_replace($verifyReplace, $formitable->printField($field, $fieldAttr, true), $tpl);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// restore node output flag if a root\n\t\t\t\tif( $this->_multi == 'root' ){\n\t\t\t\t\t$formitable->returnOutput = $tmpMultiReturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tunset($fieldAttr);\n\t\t\t}\n\t\t} // end foreach\n\n\t\t$this->returnOutput = $tmpReturn;\n\t\tif($tmpReturn){\n\t\t\treturn $tpl;\n\t\t} else {\n\t\t\tprint $tpl;\n\t\t\treturn true;\n\t\t}\n\n\t}", "protected function message($message = '&nbsp;') {\n\t\t//echo '<p style=\"padding:0; margin:1px 10px; font-family:sans-serif;\">'. $message .'</p>';\n\t}", "protected function _outputMessage($template) {\n\t\ttry {\n\t\t\t$this->controller->render($template);\n\t\t\t$this->controller->afterFilter();\n\t\t\t$this->controller->response->send();\n\t\t} catch (MissingViewException $e) {\n\t\t\t$this->_outputMessageSafe('error500');\n\t\t} catch (Exception $e) {\n\t\t\t$this->controller->set(array(\n\t\t\t\t'error' => $e,\n\t\t\t\t'name' => $e->getMessage(),\n\t\t\t\t'code' => $e->getCode(),\n\t\t\t));\n\t\t\t$this->_outputMessageSafe('error500');\n\t\t}\n\t}", "function bla($message) {\n print(\"$message\\n\");\n}", "function cp_print_errorSection($msg){ \r\n echo '<section>',\r\n '<h2>Oups, il y a une erreur...</h2>',\r\n '<p>La page que vous avez demandée a terminé son exécution avec le message d\\'erreur suivant :</p>',\r\n '<blockquote>',\r\n $msg,\r\n '</blockquote>',\r\n '</section>';\r\n}", "function outputResultMessage()\n {\n global $application;\n if(modApiFunc(\"Session\",\"is_set\",\"ResultMessage\"))\n {\n $msg=modApiFunc(\"Session\",\"get\",\"ResultMessage\");\n modApiFunc(\"Session\",\"un_set\",\"ResultMessage\");\n $template_contents=array(\n \"ResultMessage\" => $this->_var2msg($msg)\n );\n $this->_Template_Contents=$template_contents;\n $application->registerAttributes($this->_Template_Contents);\n $this->mTmplFiller = &$application->getInstance('TmplFiller');\n return $this->mTmplFiller->fill(\"product_options/\", \"result-message.tpl.html\",array());\n }\n elseif(modApiFunc(\"Session\",\"is_set\",\"Errors\"))\n {\n $return_html_code=\"\";\n $errors=modApiFunc(\"Session\",\"get\",\"Errors\");\n modApiFunc(\"Session\",\"un_set\",\"Errors\");\n foreach($errors as $ekey => $eval)\n {\n $template_contents=array(\n \"ErrorMessage\" => $this->_var2msg($eval)\n );\n $this->_Template_Contents=$template_contents;\n $application->registerAttributes($this->_Template_Contents);\n $this->mTmplFiller = &$application->getInstance('TmplFiller');\n $return_html_code.=$this->mTmplFiller->fill(\"product_options/\", \"error-message.tpl.html\",array());\n };\n return $return_html_code;\n }\n else\n return \"\";\n }", "function prnMsg($msg, $type = 'info', $prefix = '')\n{\n\n echo '<P>' . getMsg($msg, $type, $prefix) . '</P>';\n\n}", "function writeMessages()\n {\n $msg = messageGet();\n if ($msg != \"\") {\n echo \"<div class='messages'>\\n\";\n echo \"<div class='messages_inner'>\\n\";\n echo $msg;\n echo \"</div>\\n\";\n echo \"</div>\\n\";\n }\n }", "function bp_core_update_message() {\r\n\techo '<p style=\"color: red; margin: 3px 0 0 0; border-top: 1px solid #ddd; padding-top: 3px\">' . __( 'IMPORTANT: <a href=\"http://codex.buddypress.org/getting-started/upgrading-from-10x/\">Read this before attempting to update BuddyPress</a>', 'buddypress' ) . '</p>';\r\n}", "static function messages($messages,$type) {\n return Template::load(\"webcontent/render/messages.php\", array(\"messages\"=>$messages,\"type\"=>$type));\n }", "function print_msg($message, $redirect)\n\t{\n\t\techo \"<script type='text/javascript'>\n\t\t\t\talert('\".$message.\"');\n\t\t\t\twindow.location.replace('\".$redirect.\"');\n\t\t\t</script>\";\n\t}", "public function sendTemplate( $template, $message );", "function smarty_block_transtext($params, $content, &$smarty) {\n if ($content != '') {\n echo transtext($content, $params['context'], $params['param1'], $params['param2'], $params['param3']);\n }\n}", "function cmdeals_mail_template( $heading, $message ) {\n\tglobal $email_heading;\n\t\n\t$email_heading = $heading;\n\t\n\t// Buffer\n\tob_start();\n\n\tdo_action('cmdeals_email_header');\n\t\n\techo wpautop(wptexturize( $message ));\n\t\n\tdo_action('cmdeals_email_footer');\n\t\n\t// Get contents\n\t$message = ob_get_clean();\n\t\n\treturn $message;\n}", "public function __invoke(RenderUsingTwig $message)\n {\n var_dump($message);\n }", "public function message(): string\n {\n return $this->type->template ?: '';\n }", "function hook_uc_message() {\n $messages['configurable_message_example'] = t('This block of text represents a configurable message such as a set of instructions or an e-mail template. Using hook_uc_message to handle the default values for these is so easy even your grandma can do it!');\n\n return $messages;\n}", "public function print_script(){\n\t\tif(isset($_SESSION) && !empty($_SESSION['_wpg_mixi_message'])){\n\t\t\techo $this->generate_message_script($_SESSION['_wpg_mixi_message']);\n\t\t\tunset($_SESSION['_wpg_mixi_message']);\n\t\t}\n\t}", "function tpl($template, $msg=\"\") {\r\n $fn = __DIR__ . DIRECTORY_SEPARATOR . \"templates\" . DIRECTORY_SEPARATOR . $template . \".php\";\r\n if(file_exists($fn)) {\r\n ob_start();\r\n include $fn;\r\n return ob_get_clean();\r\n }\r\n else {\r\n return \"Template $fn not found\";\r\n }\r\n}", "public function show(MessageTemplate $messageTemplate)\n {\n //\n }", "private function println($message)\n\t{\n\t}", "function trans($msg,$context='phpVirtualBox') {\n\tif(!is_object($GLOBALS['_vbox_language'])) $GLOBALS['_vbox_language'] = new __vbox_language();\n\treturn $GLOBALS['_vbox_language']->trans($msg,$context);\n}", "function mMessage($alert, $msg, $type = null)\n{\n global $web;\n\n $html = ($type == 'nuevo' || $type == 'actualizar') ? 'form_avisos.html' : 'avisos.html';\n $web->simple_message($alert, $msg);\n $web->iniClases('admin', 'index avisos ' . $type);\n $web->smarty->display($html);\n die();\n}", "function output_responce_box($mesg)\n {\n echo<<<_END\n <div class=\"content_section\">\n <div id = \"page\">\n <p>$mesg</p>\n </div>\n\n </div>\n\n_END;\n }", "public function print_templates()\n {\n }", "function vw_page403(&$ctx, $template)\n{\n echo $template;\n}", "function t($msg, $vars = array(), $js = FALSE) {\n global $ft_messages;\n if(isset($ft_messages[LANG]) && isset($ft_messages[LANG][$msg])) {\n $msg = $ft_messages[LANG][$msg];\n } else {\n $msg = $msg;\n }\n // Replace vars\n if (count($vars) > 0) {\n foreach ($vars as $k => $v) {\n $msg = str_replace($k, $v, $msg);\n }\n }\n if ($js) {\n return str_replace(\"'\", \"\\'\", $msg);\n }\n return $msg;\n}", "function println($string_message = \"\") {\n\treturn print $string_message . \"\\n\";\n}", "public static function renderCustomMessage() {\n if ($source_code_message = get_option('source_code_message')) {\n echo '<!-- ' . $source_code_message . ' -->';\n }\n }", "function wc_print_notice($message, $notice_type = 'success', $data = array(), $return = \\false)\n {\n }", "public function GenerateSimpleMessage()\n\t{\n\t\t// javascript for showing and hiding the error details\n\t\t?>\n <strong><?php echo($this->code); ?></strong> <?php echo($this->simpleMessage); ?><br />\n <br />\n <?php echo($this->file); ?> at line <strong><?php echo($this->line); ?></strong>\n \n\t\t<?php\n\t\t// only show the MySQL error information if there was a MySQL error\n\t\tif ($this->mySQLErrorMessage !== NULL)\n\t\t{\n\t\t\t?>\n \n <br /><br />\n MySQL Error:<br />\n <strong><?php echo($this->mySQLErrorCode); ?></strong> <?php\n echo($this->mySQLErrorMessage);\n\t\t\t\n\t\t\tif ($this->mySQLQuery !== NULL)\n\t\t\t{\n\t\t\t\t?>\n \n <br /><br />\n <strong>Query Info:</strong><br />\n \n <?php\n\t\t\t\techo($this->mySQLQuery);\n\t\t\t}\n\t\t}\n\t}", "static function onMessage() \n { \n if (!empty(self::$errors)) { ?>\n <div class=\"bg-warning\">\n Errors: \n <ul>\n <?php \n foreach (self::$errors as $errorDescription){\n echo \"<li> $errorDescription </li>\";\n } \n ?>\n </ul>\n </div> \n <?php }\n if (!empty(self::$messages)) { ?>\n <div class=\"message\">\n Messages: \n <ul>\n <?php \n foreach (self::$messages as $message){\n echo \"<li> $message </li>\";\n } \n ?>\n </ul>\n </div> \n <?php }\n\n }", "private function printMessage() {\n\t\t$messageText = $GLOBALS['LANG']->sL('LLL:EXT:' . $this->extKey . '/locallang.xml:actionDenied.text');\n\t\tif ($GLOBALS['BE_USER']->isAdmin()) {\n\t\t\t$messageText .= '<br />' . $GLOBALS['LANG']->sL('LLL:EXT:' . $this->extKey . '/locallang.xml:actionDenied.admin');\n\t\t}\n\n\t\t$flashMessage = t3lib_div::makeInstance(\n\t\t\t't3lib_FlashMessage',\n\t\t\t$messageText,\n\t\t\t$text = $GLOBALS['LANG']->sL('LLL:EXT:' . $this->extKey . '/locallang.xml:actionDenied.header'),\n\t\t\tt3lib_FlashMessage::ERROR,\n\t\t\tTRUE // store in session\n\t\t);\n\t\tt3lib_FlashMessageQueue::addMessage($flashMessage);\n\t}", "function template_error($message, $url)\n{\n\tdisplay_header($url, 3);\n\tprint(\"<SPAN CLASS=\\\"error\\\">Error!</SPAN><BR>\");\n\tprint(\"<SPAN CLASS=\\\"error\\\">$message</SPAN><BR>\");\n\n\tif($url != null)\n\t\tprint(\"<A HREF=\\\"$url\\\">You will be redirected in 3 seconds...</A><BR>\");\n\tdisplay_footer();\n}", "function e($message) {\n if (is_string($message)) {\n echo \"<pre>{$message}</pre>\";\n return TRUE;\n }\n return FALSE;\n}", "function smarty_block_t($params, $text, &$smarty)\n{\n\tif(strlen($text) == 0)\n\t\treturn;\n\n\t$text = stripslashes($text);\n\n\t// set escape mode\n\tif (isset($params['escape'])) {\n\t\t$escape = $params['escape'];\n\t\tunset($params['escape']);\n\t}\n\n\t// set plural version\n\tif (isset($params['plural'])) {\n\t\t$plural = $params['plural'];\n\t\tunset($params['plural']);\n\n\t\t// set count\n\t\tif (isset($params['count'])) {\n\t\t\t$count = $params['count'];\n\t\t\tunset($params['count']);\n\t\t}\n\t}\n\n\t// use plural if required parameters are set\n\tif (isset($count) && isset($plural)) {\n\t\t$text = ngettext($text, $plural, $count);\n\t} else { // use normal\n\t\t$text = gettext($text);\n\t}\n\n\t// run strarg if there are parameters\n\tif (count($params)) {\n\t\t$text = strarg($text, $params);\n\t}\n\n\tif (!isset($escape) || $escape == 'html') { // html escape, default\n\t $text = nl2br(htmlspecialchars($text));\n } elseif (isset($escape) && ($escape == 'javascript' || $escape == 'js')) { // javascript escape\n\t $text = str_replace('\\'','\\\\\\'',stripslashes($text));\n }\n\n\treturn $text;\n}", "public function msg() {\n\t\t$args = func_get_args();\n\t\t$errorId = array_shift($args);\n\t\t$errorLevel = floor($errorId / 1000);\n\t\t$errorMessageId = $errorId % 1000;\n\t\tif (\\DynamicPageListHooks::getDebugLevel() >= $errorLevel) {\n\t\t\tif (\\DynamicPageListHooks::isLikeIntersection()) {\n\t\t\t\tif ($errorId == \\DynamicPageListHooks::FATAL_TOOMANYCATS) {\n\t\t\t\t\t$text = wfMessage('intersection_toomanycats', $args)->text();\n\t\t\t\t} elseif ($errorId == \\DynamicPageListHooks::FATAL_TOOFEWCATS) {\n\t\t\t\t\t$text = wfMessage('intersection_toofewcats', $args)->text();\n\t\t\t\t} elseif ($errorId == \\DynamicPageListHooks::WARN_NORESULTS) {\n\t\t\t\t\t$text = wfMessage('intersection_noresults', $args)->text();\n\t\t\t\t} elseif ($errorId == \\DynamicPageListHooks::FATAL_NOSELECTION) {\n\t\t\t\t\t$text = wfMessage('intersection_noincludecats', $args)->text();\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (empty($text)) {\n\t\t\t\t$text = wfMessage('dpl_log_'.$errorMessageId, $args)->text();\n\t\t\t}\n\t\t\t$this->buffer[] = '<p>Extension:DynamicPageList (DPL), version '.DPL_VERSION.': '.$text.'</p>';\n\t\t}\n\t\treturn false;\n\t}", "public function GenerateMessage()\n\t{\n\t\t// javascript for showing and hiding the error details\n\t\t?>\n\t\t<script language=\"javascript\">\n\t\tfunction showErrorDetails()\n\t\t{\n\t\t\tdocument.getElementById(\"errorDetails\").style.display = \"block\";\n\t\t\tdocument.getElementById(\"errorDetailsLink\").style.display = \"none\";\n\t\t}\n\t\t</script>\n \n <br />\n <div class=\"errorMessage\">\n <strong>Error <?php echo($this->code); ?>:</strong> <?php echo($this->simpleMessage); ?><br />\n <br />\t\n <a id=\"errorDetailsLink\" class=\"errorDetailsLink\" href=\"javascript:showErrorDetails()\">Show Error Details<br /></a>\n <div id=\"errorDetails\" class=\"errorDetails\">\n <?php echo($this->file); ?> at line <strong><?php echo($this->line); ?></strong>\n \n\t\t<?php\n\t\t// only show the MySQL error information if there was a MySQL error\n\t\tif ($this->mySQLErrorMessage !== NULL)\n\t\t{\n\t\t\t?>\n \n <br /><br />\n MySQL Error:<br />\n <strong><?php echo($this->mySQLErrorCode); ?></strong> <?php\n\t\t\t\techo($this->mySQLErrorMessage);\n\t\t\t\t\n\t\t\tif ($this->mySQLQuery !== NULL)\n\t\t\t{\n\t\t\t\t?>\n \n <br /><br />\n <strong>Query Info:</strong><br />\n \n <?php\n\t\t\t\t\techo($this->mySQLQuery);\n\t\t\t}\n\t\t}\n\t\t\n\t\techo('<br /><br /><strong>Stack Trace:</strong><br />' . $this->getTraceAsString() . '</div></div>');\n\t}", "private static function Debug($message){\n \n if(func_num_args() > 1){\n $args = func_get_args();\n \n for($i = 0; $i < func_num_args()-1; $i++){\n $message = str_replace(\"{{$i}}\",$args[$i+1],$message); \n }\n }\n if(!Elements::DEBUG_MODE){\n return;\n }\n $output = \"<span style=\\\"\\\">\".date(\"m:s\").\"> \".$message.\"<br /></span>\"; \n print $output; \n }" ]
[ "0.73305297", "0.68473434", "0.6607309", "0.6607138", "0.6575077", "0.6552365", "0.6538088", "0.64597744", "0.6431773", "0.63971126", "0.63480717", "0.63448596", "0.63407284", "0.63375086", "0.63329965", "0.63110626", "0.63110626", "0.6301789", "0.6300779", "0.6294928", "0.62424487", "0.61700463", "0.6150985", "0.61474806", "0.6128552", "0.61280787", "0.6121899", "0.61157125", "0.6093135", "0.60845405", "0.6080945", "0.60267824", "0.602572", "0.6009837", "0.600655", "0.60062635", "0.6004784", "0.5996884", "0.5992968", "0.59903216", "0.5989732", "0.59828436", "0.5960554", "0.5957425", "0.5951472", "0.59362936", "0.5926214", "0.5921208", "0.5909269", "0.59031683", "0.5901674", "0.58999586", "0.5892205", "0.5889129", "0.5884127", "0.58681375", "0.5851158", "0.58415574", "0.58405226", "0.5838578", "0.5838341", "0.58380866", "0.5826001", "0.5824441", "0.5814881", "0.5814866", "0.58059794", "0.58047354", "0.5801361", "0.5800757", "0.5789552", "0.5788878", "0.5779244", "0.57772034", "0.5771322", "0.5753391", "0.574506", "0.57443964", "0.57314396", "0.5729263", "0.5727042", "0.5723168", "0.57157075", "0.5714348", "0.57105315", "0.5709669", "0.57066494", "0.5689071", "0.5684558", "0.5682865", "0.56812423", "0.5673389", "0.5669316", "0.5668562", "0.56640345", "0.566103", "0.56596816", "0.5658392", "0.56563455", "0.565503" ]
0.709119
1
Sets the retries for external tasks asynchronously as batch. The returned batch can be used to track the progress.
Устанавливает повторные попытки для внешних задач асинхронно в пакете. Возвращенный пакет можно использовать для отслеживания прогресса.
public function setAsync(int $retries): BatchInterface;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function batch()\n {\n $this->is_batch = true;\n $this->batch = array();\n return $this;\n }", "public function batchExecute()\n {\n $guzzleRequests = $this->createBatchPostRequests();\n\n $results = Pool::batch($this->guzzleClient, $guzzleRequests, [\n 'pool_size' => $this->request->getOrtcConfig()->getBatchPoolSize()\n ]);\n\n if (count($results->getFailures()) > 0) {\n $batchRequestException = new BatchRequestException();\n $batchRequestException->setResults($results);\n\n throw $batchRequestException;\n }\n\n $handler = $this->request->getResponseHandler();\n return $handler->handle($results);\n }", "public function createBatch()\n {\n return new Batch(\n $this->client,\n false,\n $this->rootUrl,\n $this->batchPath\n );\n }", "public function setBatch(\\Gems_Task_TaskRunnerBatch $batch)\n {\n $this->batch = $batch;\n }", "public function batch($value) {\n return $this->setProperty('batch', $value);\n }", "function batch_task($baseurl, $params) {\n global $CFG;\n\n // Avoids misusing for external attacks.\n if (!preg_match(\"/{$CFG->wwwroot}/\", $baseurl)) {\n die(\"Required Url not in domain\");\n }\n\n foreach ($params as $param) {\n $url = $baseurl.$param;\n\n $ch = curl_init($url);\n\n $timeout = 5000;\n\n curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_POST, false);\n curl_setopt($ch, CURLOPT_USERAGENT, 'Examtraning Report Batch');\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\"Content-Type: text/xml charset=UTF-8\"));\n curl_setopt($ch, CURLOPT_HEADER, false);\n curl_setopt($ch, CURLOPT_PROXY, $CFG->proxyhost);\n curl_setopt($ch, CURLOPT_PROXYPORT, $CFG->proxyport);\n curl_setopt($ch, CURLOPT_PROXYTYPE, $CFG->proxytype);\n if (!empty($CFG->proxyuser)) {\n curl_setopt($ch, CURLOPT_PROXYUSERPWD, $CFG->proxyuser.':'.$CFG->proxypassword);\n }\n\n $rawresponse = curl_exec($ch);\n }\n}", "protected function _execute($url, $batch)\n {\n $this->log(\"Making cURL call to $url\", [\n 'data' => $batch,\n ]);\n $client = new Client([\n 'timeout' => $this->timeout, // Response timeout\n 'connect_timeout' => $this->connectTimeout, // Connection timeout\n 'http_errors' => config('mixpanel.ignore_http_errors')\n ]);\n $promises = [];\n $batch_size = ceil(count($batch) / $this->getNumThreads());\n for ($i = 0; $i < $this->getNumThreads() && !empty($batch); $i++) {\n $promises[] = $client->postAsync($url, [\n 'form_params' => [\n 'data' => $this->_encode(array_splice($batch, 0, $batch_size))\n ]\n ]);\n }\n $responses = Utils::settle($promises)->wait();\n $error = false;\n /** @var Response */\n foreach ($responses as $response) {\n if ($response) {\n if ($response && isset($response['value']) && $response['value']->getStatusCode() != Response::HTTP_OK) {\n $content = $response['value']->getBody()->getContents();\n $this->log(\"Guzzle consumer send request error\", array_merge([\n 'content' => $content,\n 'body' => $batch\n ]), true);\n $error = true;\n } else if ($response && isset($response['value'])) {\n $content = $response['value']->getBody()->getContents();\n $content = trim($content);\n if ($content !== \"1\") {\n $this->log(\"Guzzle consumer send request error\", array_merge([\n 'body' => $batch,\n 'response' => $content,\n ]), true);\n $error = true;\n }\n }\n } else {\n $this->log(\"Guzzle consumer send request error\", array_merge([\n 'body' => $batch,\n ]), true);\n $error = true;\n }\n }\n return !$error;\n }", "public function sendBatch()\n {\n $this->getChannel()->publish_batch();\n return $this;\n }", "protected function _setLastBatch($batch) {\n if (null !== ($cookieJar = $this->getCookieJar())) {\n foreach ($batch as $result) {\n $response = $result['response'];\n if (null !== $response->getCookie() && 0 < $response->getCookie()->count()) {\n $cookieJar->setCookies($response->getCookie()->getArrayCopy());\n }\n }\n }\n\n $this->_lastBatch = $batch;\n return $this;\n }", "protected function startBatchJob(){\n $job = new FeederBatchJob();\n $conn = $this->option('conn');\n\n if ($conn === 0 || $conn === '0'){\n $job->conn = 'ph4DBPess';\n } elseif ($conn === 1 || $conn === '1'){\n $job->conn = 'ph4DBOptim';\n } elseif ($conn === 2 || $conn === '2'){\n $job->conn = 'beanstalkd';\n } elseif ($conn === 3 || $conn === '3'){\n $job->conn = 'redis';\n } elseif ($conn === 4 || $conn === '4'){\n $job->conn = 'database_ph4';\n } else {\n $job->conn = $conn;\n }\n\n $job->batchSize = $this->option('batch-size');\n $job->delTsxFetch = $this->option('del-tsx-fetch');\n $job->delTsxRetry = $this->option('del-tsx-retry');\n $job->delMark = $this->option('del-mark');\n $job->workClone = $this->option('work-clone');\n $job->workMean = $this->option('work-mean');\n $job->windowStrategy = $this->option('window-strategy');\n $job->verify = $this->option('verify');\n $job->repeat = $this->option('repeat');\n $job->noJson = $this->option('no-json');\n $job->key = $this->option('key');\n\n $job->onConnection('sync')\n ->onQueue(null);\n dispatch($job);\n }", "public function send(BatchRequest $batchRequest);", "public function setBatchItems($batchItems)\n {\n $this->batchItems = $batchItems;\n return $this;\n }", "public function executeBatch();", "public function flush(&$lastBatchId = null): PreparedBatchImport {\n\n\t\t\t$lastBatchId = call_user_func($this->flushAllCallback);\n\n\t\t\treturn $this;\n\t\t}", "protected function executeImport($url, $batch)\n {\n $this->log(\"Making cURL call to $url\", [\n 'data' => $batch,\n ]);\n $isIgnoreError = config('mixpanel.ignore_http_errors');\n $client = new Client([\n 'timeout' => $this->timeout,\n 'connect_timeout' => $this->connectTimeout,\n 'http_errors' => $isIgnoreError\n ]);\n $promises = [];\n $headers = [\n 'Authorization' => 'Basic ' . $this->authorization_token\n ];\n $promises[] = $client->postAsync($url, [\n 'json' => $batch,\n 'headers' => $headers\n ]);\n $responses = Utils::settle($promises)->wait();\n $error = false;\n\n /** @var Response */\n foreach ($responses as $response) {\n if ($response) {\n if ($response && isset($response['value']) && $response['value']->getStatusCode() != Response::HTTP_OK) {\n $content = $response['value']->getBody()->getContents();\n $this->log(\"Guzzle consumer import send request error\", array_merge([\n 'content' => $content,\n 'body' => $batch\n ]), true);\n $error = true;\n } else if ($response && isset($response['value'])) {\n $content = $response['value']->getBody()->getContents();\n $content = trim($content);\n if ($content !== \"1\") {\n $this->log(\"Guzzle consumer import send request error\", array_merge([\n 'body' => $batch,\n 'response' => $content,\n ]), true);\n $error = true;\n }\n }\n } else {\n $this->log(\"Guzzle consumer import send request error\", array_merge([\n 'body' => $batch,\n ]), true);\n $error = true;\n }\n }\n\n return !$error;\n }", "public function getBatch()\r\r\n {\r\r\n return $this->batch;\r\r\n }", "public function sendBatch()\n {\n foreach ($this->queuedNotifications as $queuedNotification) {\n if ($queuedNotification['toClients']) {\n $this->sendToClients(\n $queuedNotification['entity'],\n $queuedNotification['force'],\n $queuedNotification['changeSet'],\n $queuedNotification['HTTPMethod'],\n $queuedNotification['options']\n );\n } else {\n $this->sendToServer(\n $queuedNotification['entity'],\n $queuedNotification['force'],\n $queuedNotification['changeSet'],\n $queuedNotification['HTTPMethod'],\n $queuedNotification['options']\n );\n }\n }\n\n $this->batchManager->sendAll();\n $this->clear();\n }", "protected function sendBatch($batch) {\n if ($this->handler == 'agent') {\n $this->sendBatchAgent($batch);\n } else {\n $this->sendBatchBlocking($batch);\n }\n }", "protected function setBatch(int $batch = null): self\n\t{\n\t\t$this->batch = $batch;\n\n\t\treturn $this;\n\t}", "public function batchRun($batchId, $rowIds)\n {\n // for increased compatability for models that expect an ajax request.\n Mage::app()->getRequest()->setParam('batch_id',$batchId);\n Mage::app()->getRequest()->setParam('rows',$rowIds);\n\n /* @var $batchModel Mage_Dataflow_Model_Batch */\n $batchModel = Mage::getModel('dataflow/batch')->load($batchId);\n\n if (!$batchModel->getId()) {\n return;\n }\n if (!is_array($rowIds) || count($rowIds) < 1) {\n return;\n }\n if (!$batchModel->getAdapter()) {\n return;\n }\n\n $batchImportModel = $batchModel->getBatchImportModel();\n $batchImportModel->getIdCollection();\n\n $adapter = Mage::getModel($batchModel->getAdapter());\n $adapter->setBatchParams($batchModel->getParams());\n\n $errors = array();\n $saved = 0;\n foreach ($rowIds as $importId) {\n $batchImportModel->load($importId);\n if (!$batchImportModel->getId()) {\n $errors[] = Mage::helper('dataflow')->__('Skip undefined row.');\n continue;\n }\n\n try {\n $importData = $batchImportModel->getBatchData();\n $adapter->saveRow($importData);\n } catch (Exception $e) {\n $errors[] = $e->getMessage();\n continue;\n }\n $saved ++;\n }\n\n if (method_exists($adapter, 'getEventPrefix')) {\n /**\n * Event for process rules relations after products import\n */\n Mage::dispatchEvent($adapter->getEventPrefix() . '_finish_before', array(\n 'adapter' => $adapter\n ));\n\n /**\n * Clear affected ids for adapter possible reuse\n */\n $adapter->clearAffectedEntityIds();\n }\n\n $result = array(\n 'savedRows' => $saved,\n 'errors' => $errors\n );\n echo Mage::helper('core')->jsonEncode($result);\n }", "public function sendBatch(array $notifications);", "public function testBatchingRequests()\n {\n $response = $this->client->import(['batch' => [['event' => 'foo', 'properties' => ['bar' => 'baz']]]]);\n $this->assertEquals(['success' => true], $response);\n\n // Test that operations that allow 'batching'\n $response = $this->client->track(['userId' => 123, 'event' => 'foo', 'properties' => ['bar' => 'baz']]);\n $this->assertEquals(['success' => true, 'batched' => true], $response);\n }", "public function batchStart() {\n $redis = $this->redisService->get();\n \n if ($redis->isBatchActive()) {\n throw new Neoform\\Entity\\Repo\\Exception('Batch operation already active');\n }\n\n $redis->multi();\n return $this;\n }", "public function getBatchItems()\n {\n return $this->batchItems;\n }", "public static function batchImport(): BatchImport {\n\t\t\treturn app(BatchImport::class, [\n\t\t\t\t'model' => new static,\n\t\t\t]);\n\t\t}", "public function testBatch() {\n\n\t\t$batch = [\n\t\t\t[\n\t\t\t\t'method' => 'GET',\n\t\t\t\t'relative_url' => '/product/1234',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'method' => 'POST',\n\t\t\t\t'name' => 'create-user',\n\t\t\t\t'relative_url' => '/user/?username=john',\n\t\t\t\t'content-type' => 'application/x-www-form-urlencoded',\n\t\t\t\t'body' => 'password=admin',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'method' => 'GET',\n\t\t\t\t'relative_url' => '/fourohfour',\n\t\t\t]\n\t\t];\n\n\t\t$batchedRequest = new BatchedRequest($batch);\n\n\t\t$batchedRequest->execute();\n\n\t\t$responses = $batchedRequest->getResponses();\n\n\t\t$this->assertCount(3, $responses, \"Failed asserting number of responses returned matches number of requests sent.\");\n\t\t$this->assertArrayHasKey(0, $responses, \"Failed asserting unnamed requests are indexed numerically.\");\n\t\t$this->assertArrayHasKey('create-user', $responses, \"Failed asserting named requests are returned indexed by that name.\");\n\t\t$this->assertArrayHasKey(2, $responses, \"Failed asserting unnamed requests are indexed numerically.\");\n\t\t$this->assertArrayHasKey('code', $responses[0], \"Failed asserting responses include an HTTP status code.\");\n\t\t$this->assertArrayHasKey('body', $responses[0], \"Failed asserting responses include a body\");\n\n\t}", "public function cancelBatch(): void\n {\n $this->isBatch = false;\n $this->batch = [];\n }", "private function tryConnectionInWorkerBulk($metadata, $retries=self::RETRIES)\n { \n while ($retries > 0) \n {\n try {\n list($respText, $status) = $this->radiamAPI->createDocumentBulk($this->project_config['endpoint'], $metadata);\n if ($respText) \n {\n if (gettype($respText) == \"array\")\n {\n foreach($respText as $s) {\n // check if s is a associative array\n if (gettype($s) == \"array\" and array_keys($s) !== range(0, count($s) - 1)) {\n if (!$s['result']) {\n $this->logger->error(\"Error sending file to API: {$s['docname'] {$s['result']}}\");\n }\n }\n }\n }\n else {\n $this->logger->error(\"Radiam API error with index {$this->project_config['endpoint']}: {$respText}\");\n }\n }\n return array($respText, $status);\n } catch (\\Exception $e) {\n $this->logger->warning($e->getMessage());\n $retries -= 1;\n sleep(10);\n }\n }\n throw new Exception(\"Run out of retries in tryConnectionInWorkderBulk function.\");\n }", "public function setBatchSize($batch_size)\n {\n $this->_batch_size = $batch_size;\n return $this;\n }", "public function sendBatchRequestToGoogle() {\n error_log(__METHOD__ . \":\" . __LINE__ . \", Memory:\" . memory_get_usage());\n $this->getService(\"GoogleRequestBatch\")->getDao(\"PendingGoogleApiRequest\")->db->save_queries = false;\n $hasRequest = $this->getService(\"GoogleRequestBatch\")->getDao(\"PendingGoogleApiRequest\")->getList([], [\"limit\" => 1]);\n if ($hasRequest) {\n if (($batchObj = $this->getService(\"GoogleRequestBatch\")->getNewBatch(GoogleService::FUNC_GOOGLE_CONTENT_API)) !== false) {\n $batchId = $batchObj->getId();\n $this->getService(\"GoogleRequestBatch\")->getDao('GoogleRequestBatch')->db->trans_begin();\n//insert\n $insertResult = $this->_sendBatchRequestToGoogleStep1($batchId);\n//delete\n $deleteResult = $this->_sendBatchRequestToGoogleStep2();\n\n if ($insertResult && $deleteResult) {\n $transCompleteResult = $this->getService(\"GoogleRequestBatch\")->getDao('GoogleRequestBatch')->db->trans_commit();\n if ($transCompleteResult) {\n//we do the update of the google api request table after the transaction lock\n//update\n $updateResult = $this->_sendBatchRequestToGoogleStep3($batchId);\n if ($updateResult !== false)\n $this->processBatchByBatchId($batchId);\n }\n } else {\n $this->getService(\"GoogleRequestBatch\")->getDao('GoogleRequestBatch')->db->trans_rollback();\n }\n $this->getService(\"GoogleRequestBatch\")->setBatchStatus($batchObj, date(\"Y-m-d H:i:s\"));\n } else {\n $this->sendAlert(\"[Panther] Cannot get a new batch to send google API\", \"error:\" . $this->getService(\"GoogleRequestBatch\")->getDao('GoogleRequestBatch')->db->error()[\"message\"]);\n }\n }\n error_log(__METHOD__ . \":\" . __LINE__ . \", Memory:\" . memory_get_usage());\n }", "public function get_batch($batch)\n\t{\n\t\t$batch = (int)$batch;\n\t\t\n\t\t$total_rec = $this->get_total();\n\t\t$total_batch = $this->get_total_batch($total_rec);\n\t\t\n\t\tif ($batch < 1)\n\t\t{\n\t\t\t$batch = 1;\n\t\t}\n\t\tif ($batch > $total_batch)\n\t\t{\n\t\t\t$batch = $total_batch;\n\t\t}\n\t\t\n\t\t$offset = ($batch - 1) * self::USERS_PER_IMPORT;\n\t\t\n\t\t$results = DB::select()->from($this->_table)\n\t\t\t->limit(self::USERS_PER_IMPORT)\n\t\t\t->offset($offset)\n\t\t\t->execute();\n\t\t\t\n\t\treturn $results->as_array();\n\t}", "function _batch_populate_queue(&$batch, $set_id) {\n $batch_set = &$batch['sets'][$set_id];\n\n if (isset($batch_set['operations'])) {\n $batch_set += [\n 'queue' => [\n 'name' => 'drupal_batch:' . $batch['id'] . ':' . $set_id,\n 'class' => $batch['progressive'] ? 'Drupal\\Core\\Queue\\Batch' : 'Drupal\\Core\\Queue\\BatchMemory',\n ],\n ];\n\n $queue = _batch_queue($batch_set);\n $queue->createQueue();\n foreach ($batch_set['operations'] as $operation) {\n $queue->createItem($operation);\n }\n\n unset($batch_set['operations']);\n }\n}", "public function _sendBatchRequestToGoogleStep3($batchId) {\n $result = $this->getService(\"GoogleApiRequest\")->getDao('GoogleApiRequest')->updateGoogleApiRequestFields($batchId);\n if ($result === false) {\n $this->_sendAlert(\"[Panther] Cannot clear data from google_api_request table, \" . __METHOD__ . __LINE__, \"error:\" . $this->getService(\"GoogleApiRequest\")->getDao('GoogleApiRequest')->db->error()[\"message\"]);\n }\n return $result;\n }", "final public function executeBatch( $batch )\n\t\t{\n\t\t\t// TODO: very bad!!! avoid!\n//\t\t\ttrigger_error(\"executeBatch is deprecated!\", E_USER_DEPRECATED);\n\t\t\t$queries = explode( \";\", $batch );\n\n\t\t\tforeach( $queries as $query )\n\t\t\t{\n\t\t\t\tif(trim($query))\n\t\t\t\t{\n\t\t\t\t\t$this->execute($query);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function batch($jobs)\n {\n return new PendingBatch($this->container, Collection::wrap($jobs));\n }", "public function batchExecute($batch)\r\n {\r\n list($response) = $this->batchExecuteWithHttpInfo($batch);\r\n return $response;\r\n }", "public function resetAllFailedTasks();", "public function getBatchDetails(\n $urls,\n $batchSize = 0,\n $batchTimeout = self::BATCH_TIMEOUT,\n $filter = false\n ) {\n $lookupUrls = [];\n $results = [];\n\n // no items?\n if (count($urls) == 0) {\n return $results;\n }\n\n // clip batch size.\n if (!is_numeric($batchSize) || $batchSize <= 0 || $batchSize > self::BATCH_MAX_SIZE) {\n $batchSize = self::BATCH_MAX_SIZE;\n }\n\n // filter out URLs already cached.\n if ($this->cache != null) {\n foreach ($urls as $url) {\n $cachedRes = $this->cache->get($this->cacheKey($url));\n if ($cachedRes != null) {\n $results[$url] = $cachedRes;\n } else {\n $lookupUrls[] = $url;\n }\n }\n } else {\n $lookupUrls = $urls;\n }\n\n // everything cached? exit early.\n if (count($lookupUrls) == 0) {\n return $results;\n }\n\n // prepare each batch & fire it off asynchronously.\n $apiUrl = self::API_URL . \"/batch\";\n if ($filter) {\n $apiUrl .= '?filter=1';\n }\n $promises = [];\n $totalBatches = ceil(count($lookupUrls) / $batchSize);\n for ($i = 0; $i < $totalBatches; $i++) {\n $start = $i * $batchSize;\n $batch = array_slice($lookupUrls, $start, $batchSize);\n $promise = $this->http_client->postAsync($apiUrl, [\n 'body' => json_encode($batch),\n 'timeout' => $batchTimeout\n ])->then(function ($resp) use (&$results) {\n $batchResult = json_decode($resp->getBody(), true);\n foreach ($batchResult as $k => $v) {\n $results[$k] = $v;\n }\n });\n $promises[] = $promise;\n }\n\n // wait for all batches to finish.\n Promise\\Utils::settle($promises)->wait();\n\n // cache any new results.\n if ($this->cache != null) {\n foreach ($lookupUrls as $url) {\n if (array_key_exists($url, $results)) {\n $this->cache->set($this->cacheKey($url), $results[$url]);\n }\n }\n }\n\n return $results;\n }", "function _batch_queue($batch_set) {\n static $queues;\n\n if (!isset($queues)) {\n $queues = [];\n }\n\n if (isset($batch_set['queue'])) {\n $name = $batch_set['queue']['name'];\n $class = $batch_set['queue']['class'];\n\n if (!isset($queues[$class][$name])) {\n $queues[$class][$name] = new $class($name, \\Drupal::database());\n }\n return $queues[$class][$name];\n }\n}", "function batch_process($redirect = NULL, Url $url = NULL, $redirect_callback = NULL) {\n $batch =& batch_get();\n\n if (isset($batch)) {\n // Add process information\n $process_info = [\n 'current_set' => 0,\n 'progressive' => TRUE,\n 'url' => $url ?? Url::fromRoute('system.batch_page.html'),\n 'source_url' => Url::fromRouteMatch(\\Drupal::routeMatch())->mergeOptions(['query' => \\Drupal::request()->query->all()]),\n 'batch_redirect' => $redirect,\n 'theme' => \\Drupal::theme()->getActiveTheme()->getName(),\n 'redirect_callback' => $redirect_callback,\n ];\n $batch += $process_info;\n\n // The batch is now completely built. Allow other modules to make changes\n // to the batch so that it is easier to reuse batch processes in other\n // environments.\n \\Drupal::moduleHandler()->alter('batch', $batch);\n\n // Assign an arbitrary id: don't rely on a serial column in the 'batch'\n // table, since non-progressive batches skip database storage completely.\n $batch['id'] = \\Drupal::database()->nextId();\n\n // Move operations to a job queue. Non-progressive batches will use a\n // memory-based queue.\n foreach ($batch['sets'] as $key => $batch_set) {\n _batch_populate_queue($batch, $key);\n }\n\n // Initiate processing.\n if ($batch['progressive']) {\n // Now that we have a batch id, we can generate the redirection link in\n // the generic error message.\n /** @var \\Drupal\\Core\\Url $batch_url */\n $batch_url = $batch['url'];\n /** @var \\Drupal\\Core\\Url $error_url */\n $error_url = clone $batch_url;\n $query_options = $error_url->getOption('query');\n $query_options['id'] = $batch['id'];\n $query_options['op'] = 'finished';\n $error_url->setOption('query', $query_options);\n\n $batch['error_message'] = t('Please continue to <a href=\":error_url\">the error page</a>', [':error_url' => $error_url->toString(TRUE)->getGeneratedUrl()]);\n\n // Clear the way for the redirection to the batch processing page, by\n // saving and unsetting the 'destination', if there is any.\n $request = \\Drupal::request();\n if ($request->query->has('destination')) {\n $batch['destination'] = $request->query->get('destination');\n $request->query->remove('destination');\n }\n\n // Store the batch.\n \\Drupal::service('batch.storage')->create($batch);\n\n // Set the batch number in the session to guarantee that it will stay alive.\n $_SESSION['batches'][$batch['id']] = TRUE;\n\n // Redirect for processing.\n $query_options = $error_url->getOption('query');\n $query_options['op'] = 'start';\n $query_options['id'] = $batch['id'];\n $batch_url->setOption('query', $query_options);\n if (($function = $batch['redirect_callback']) && function_exists($function)) {\n $function($batch_url->toString(), ['query' => $query_options]);\n }\n else {\n return new RedirectResponse($batch_url->setAbsolute()->toString(TRUE)->getGeneratedUrl());\n }\n }\n else {\n // Non-progressive execution: bypass the whole progressbar workflow\n // and execute the batch in one pass.\n require_once __DIR__ . '/batch.inc';\n _batch_process();\n }\n }\n}", "public function setJobRetries($id, $parameterArray) {\n $query = 'job/'.$id.'/retries';\n $this->restRequest('PUT', $query, $parameterArray);\n }", "public function batch($stmtb = null, $transact = true) {\n return $this->driver->batch($stmtb,$transact);\n }", "public function processBatchByBatchId($batchId, $reprocess = false) {\n $where[\"request_batch_id\"] = $batchId;\n if ($reprocess) {\n $where[\"`result` in ('N', 'F')\"] = null;\n } else {\n $where[\"result\"] = \"N\";\n }\n $processingList = $this->getService(\"GoogleApiRequest\")->getDao(\"GoogleApiRequest\")->getList($where, [\"limit\" => -1]);\n if (($processingList) && !is_array($processingList))\n $processingList = [$processingList];\n\n try {\n $googleConnect = $this->getService(\"GoogleConnect\");\n } catch (Exception $e) {\n $this->_sendAlert(\"[Panther] Cannot get GoogleConnect\", $e->getMessage());\n }\n\n if ($processingList) {\n $i = 0; //will be the entry ID\n do {\n $reOrderList = [];\n for($j=$i;$j<sizeof($processingList);$j++) {\n $reOrderList[$i] = $processingList[$j];\n $i++;\n if (($i%self::NUMBER_OF_PRODUCTS_IN_BATCH) == 0)\n break;\n }\n $googleConnect->processingInsertDeleteProductBatch($reOrderList);\n foreach($reOrderList as $key => $googleApiRequestObj) {\n $updateResult = $this->getService(\"GoogleApiRequest\")->getDao(\"GoogleApiRequest\")->update($googleApiRequestObj);\n if ($updateResult === false) {\n $this->_sendAlert(\"[Panther] cannot save google api request result\", $this->getService(\"GoogleApiRequest\")->getDao(\"GoogleApiRequest\")->db->last_query() . \", error:\". $this->getService(\"GoogleApiRequest\")->getDao(\"GoogleApiRequest\")->db->error()[\"message\"]);\n }\n }\n } while ($i<sizeof($processingList));\n unset($reOrderList, $processingList);\n $updateToPriceResult = $this->getService(\"GoogleApiRequest\")->getDao(\"GoogleApiRequest\")->updateBatchRequestToPrice($batchId);\n if ($updateToPriceResult === false) {\n $this->_sendAlert(\"[Panther] cannot update price\", $this->getService(\"GoogleApiRequest\")->getDao(\"GoogleApiRequest\")->db->last_query() . \", error:\". $this->getService(\"GoogleApiRequest\")->getDao(\"GoogleApiRequest\")->db->error()[\"message\"]);\n }\n\n $this->sendRequestResultToUser($batchId);\n } else {\n $this->_sendAlert(\"[Panther] batch has no data, batch_id:\" . $batchId, $this->getService(\"GoogleApiRequest\")->getDao(\"GoogleApiRequest\")->db->last_query() . \", error:\". $this->getService(\"GoogleApiRequest\")->getDao(\"GoogleApiRequest\")->db->error()[\"message\"]);\n }\n }", "public function getBatchSize();", "public function addBlocksToBatch( \\WPML_TM_Translation_Batch $batch ) {\n\t\treturn $this->manage_batch->addBlocks( $batch );\n\t}", "function _batch_append_set(&$batch, $batch_set) {\n $append_after_index = $batch['current_set'];\n $reached_current_set = FALSE;\n foreach ($batch['sets'] as $index => $set) {\n // As the indexes are not ordered numerically we need to first reach the\n // index of the current set and then search for the proper place to append\n // the new batch set.\n if (!$reached_current_set) {\n if ($index == $batch['current_set']) {\n $reached_current_set = TRUE;\n }\n continue;\n }\n if ($index > $append_after_index) {\n if (isset($set['appended_after_index'])) {\n $append_after_index = $index;\n }\n else {\n break;\n }\n }\n }\n $batch_set['appended_after_index'] = $append_after_index;\n\n // Iterate by reference over the existing batch sets and assign them by\n // reference in the new batch sets array in order not to break a retrieved\n // reference to the current set. Among other places a reference to the current\n // set is being retrieved in _batch_process(). Additionally, we have to\n // preserve the original indexes, as they are used to generate the queue name\n // of each batch set, otherwise the operations of the new batch set will be\n // queued in the queue of a previous batch set.\n // @see _batch_populate_queue().\n $new_sets = [];\n foreach ($batch['sets'] as $index => &$set) {\n $new_sets[$index] = &$set;\n if ($index == $append_after_index) {\n $new_set_index = count($batch['sets']);\n $new_sets[$new_set_index] = $batch_set;\n }\n }\n\n $batch['sets'] = $new_sets;\n _batch_populate_queue($batch, $new_set_index);\n}", "public function setBatchSize(int|string $batchSize): void\n {\n $this->batchSize = (int)$batchSize;\n }", "public function import_autoship_batches() {\n\t\trequire_once 'payment_gateways/PBBBank/AutoshipBatchImporter.php';\n\t\t\n\t\t$fileImporter = new PBBBank_AutoshipBatchImporter($this->_settings->sf_url, $this->_settings->sf_user, $this->_settings->sf_password);\n\t\t$fileImporter->processFiles();\n\t\t\n\t\treturn $this;\n\t}", "public function ensureBatchSize(\\Magento\\Framework\\DB\\Adapter\\AdapterInterface $adapter, $batchSize);", "public function setBatchSize($batchSize)\n\t{\n\t\t$batchSize = intval($batchSize);\n\n\t\tif ($batchSize <= 0) {\n\t\t\tthrow new CException('Batch size must be a positive integer');\n\t\t}\n\n\t\t$this->batchSize = $batchSize;\n\t}", "public function endBatch(): void\n {\n $this->isBatch = false;\n $this->connection->sendMessages($this->batch);\n $this->batch = [];\n }", "public function batchExecute() {\n $redis = $this->redisService->get();\n\n if (! $redis->isBatchActive()) {\n throw new Neoform\\Entity\\Repo\\Exception('No batch operation active');\n }\n\n return $redis->exec();\n }", "public function RetryAllJobFail()\n {\n $id =[];\n $queue_fail = Queue::all();\n if($queue_fail->count() > 0)\n {\n foreach ($queue_fail as $key=>$value)\n {\n array_push($id, $value->id);\n }\n }\n $retry = \\Artisan::call(\"queue:retry\",['id'=>$id]);\n\n if ($retry == 0) {\n \\Session::flash('error', 'Error Retry Queue Please try again.');\n\n return \\Redirect::back();\n }\n\n \\Session::flash('message', \"Successfully retry Queue.\");\n return \\Redirect::back();\n }", "public function setRetries($count, $delay = false)\n {\n }", "function api_batch_limpeza()\n{\n set_time_limit(0);\n\n $vNodesAntigo = db_getNodeAntigos();\n\n foreach ($vNodesAntigo as $key => $node) {\n //$operations[] = array('api_excuirNode', array($node->nid));\n $operations[] = array('node_delete', array($node->nid));\n }\n\n $batch = array(\n 'title' => t('Limpando notícias antigas...'),\n 'operations' => $operations,\n 'init_message' => 'Iniciando...',\n 'progress_message' => 'Processando @current de @total.',\n 'error_message' => t('Um erro ocorreu durante o processamento'),\n 'finished' => 'api_batch_limpeza_finished',\n 'file' => drupal_get_path('module', 'manutencao') . '/limpeza.inc');\n\n batch_set($batch);\n batch_process('admin/manutencao/batchReport');\n}", "public function setArrowRecordBatch($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\Bigquery\\Storage\\V1beta1\\ArrowRecordBatch::class);\n $this->writeOneof(4, $var);\n\n return $this;\n }", "public function setBatchItemIds($batchItemIds)\n {\n $this->batchItemIds = $batchItemIds;\n return $this;\n }", "public function __construct($batch)\n {\n $this->batch = $batch;\n }", "public function update_batch($set = null, $index = null, $batch_size = 100)\n {\n $table = $this->get_table();\n\n return $this->db->update_batch($table, $set, $index, $batch_size);\n }", "public function setBatchStatusAllDone()\n {\n\n // SELECT * FROM batches as b LEFT JOIN consignment AS c ON b.id_batch = c.id_batch AND b.batch_status = '0'\n // SELECT b.id_batch, b.batch_status, c.id, c.status, c.mailservice FROM batches as b LEFT JOIN consignment AS c ON b.id_batch = c.id_batch AND b.batch_status = '0'\n\nexit;\n $query = sprintf(\"SELECT b.id_batch, b.batch_status, c.id, c.status, c.mailservice \"\n .\"FROM batches as b \"\n .\"LEFT JOIN consignment AS c ON b.id_batch = c.id_batch AND b.batch_status = '0'\",\n self::DB_NAME,\n mysqli_real_escape_string($this->db_handle, $id_batch)\n );\n\n\n $query = sprintf(\"UPDATE %s SET batch_status = '1' WHERE id_batch = '%s' LIMIT 1\",\n self::DB_NAME,\n mysqli_real_escape_string($this->db_handle, $id_batch)\n );\n\n echo $query, PHP_EOL; // debug\n\n try {\n mysqli_query($this->db_handle, $query);\n } catch (Error $e) {\n echo $query . \" : \" . $e, PHP_EOL;\n }\n return $this;\n }", "function call_center_pathauto_bulk_update_batch_process(&$context) {\n if (!isset($context['sandbox']['current'])) {\n $context['sandbox']['count'] = 0;\n $context['sandbox']['current'] = 0;\n }\n\n $query = db_select('call_center', 'e');\n $query->leftJoin('url_alias', 'ua', \"CONCAT('call_center/', e.id) = ua.source\");\n $query->addField('e', 'id');\n $query->isNull('ua.source');\n $query->condition('e.id', $context['sandbox']['current'], '>');\n $query->orderBy('e.id');\n $query->addTag('pathauto_bulk_update');\n $query->addMetaData('entity', 'call_center');\n\n // Get the total amount of items to process.\n if (!isset($context['sandbox']['total'])) {\n $context['sandbox']['total'] = $query->countQuery()->execute()->fetchField();\n\n // If there are no nodes to update, the stop immediately.\n if (!$context['sandbox']['total']) {\n $context['finished'] = 1;\n return;\n }\n }\n\n $query->range(0, 25);\n $pids = $query->execute()->fetchCol();\n\n call_center_update_alias_multiple($pids, 'bulkupdate');\n $context['sandbox']['count'] += count($pids);\n $context['sandbox']['current'] = max($pids);\n $context['message'] = t('Updated alias for premise @pid.', array('@pid' => end($pids)));\n\n if ($context['sandbox']['count'] != $context['sandbox']['total']) {\n $context['finished'] = $context['sandbox']['count'] / $context['sandbox']['total'];\n }\n}", "public function setMaxRetries($var)\n {\n GPBUtil::checkInt32($var);\n $this->max_retries = $var;\n\n return $this;\n }", "public function getMigrationsByBatch ($batch) {\n\t}", "function getBatchReference() {\n return $this->m_batchReference;\n }", "private function send_all_jobs( array $batch, array $translators, array $batch_options ) {\n\t\t$basket_name_saved = $this->basket->get_name();\n\t\t$batch_options['basket_name'] = isset( $batch_options['basket_name'] ) ? $batch_options['basket_name'] : '';\n\t\t$batch_options['basket_name'] = $basket_name_saved ? $basket_name_saved : $batch_options['basket_name'];\n\t\t$this->basket->set_options( $batch_options );\n\n\t\tif ( $batch_options['basket_name'] ) {\n\t\t\t$this->basket->set_name( $batch_options['basket_name'] );\n\t\t}\n\n\t\t$valid_jobs = $this->get_valid_jobs_from_basket( $batch );\n\t\t$this->basket->set_remote_target_languages( $this->generate_remote_target_langs( $translators, $valid_jobs ) );\n\t\t$basket_items_types = $this->basket->get_item_types();\n\t\tforeach ( $basket_items_types as $item_type_name => $item_type ) {\n\t\t\t$type_basket_items = isset( $valid_jobs[ $item_type_name ] ) ? $valid_jobs[ $item_type_name ] : array();\n\t\t\tdo_action( 'wpml_tm_send_' . $item_type_name . '_jobs',\n\t\t\t $item_type_name,\n\t\t\t $item_type,\n\t\t\t $type_basket_items,\n\t\t\t $translators,\n\t\t\t $batch_options\n\t\t\t);\n\t\t}\n\n\t\t// check if there were no errors\n\t\treturn ! $this->tm_instance->messages_by_type( 'error' );\n\t}", "public function setBatchCallback(\\Closure $callback = null)\n {\n $this->onBatchLoaded = $callback;\n }", "public function SaveBatch($msBatch) {\r\n\r\n $response = $this->finance->SaveBatchRequest($this->accesskeyId, $this->associationId, $this->secretaccessId, $msBatch\r\n );\r\n\r\n return $response;\r\n }", "private function setAsync($val)\n {\n $this->settings['async'] = $val;\n }", "public function setBatchStatusDone(int $id_batch)\n {\n $query = sprintf(\"UPDATE %s SET batch_status = '1' WHERE id_batch = '%s' LIMIT 1\",\n self::DB_NAME,\n mysqli_real_escape_string($this->db_handle, $id_batch)\n );\n\n echo $query, PHP_EOL; // debug\n\n // debug sql query\n try {\n mysqli_query($this->db_handle, $query);\n } catch (Error $e) {\n echo $query . \" : \" . $e, PHP_EOL;\n }\n return $this;\n }", "function batch() {\n // Check for request forgeries.\n JRequest::checkToken() or jexit(JText::_('JINVALID_TOKEN'));\n\n // Initialise variables.\n $app = JFactory::getApplication();\n $model = $this->getModel('User');\n $vars = JRequest::getVar('batch', array(), 'post', 'array');\n $cid = JRequest::getVar('cid', array(), 'post', 'array');\n\n // Sanitize user ids.\n $cid = array_unique($cid);\n JArrayHelper::toInteger($cid);\n\n // Remove any values of zero.\n if (array_search(0, $cid, true)) {\n unset($cid[array_search(0, $cid, true)]);\n }\n\n // Attempt to run the batch operation.\n if (!$model->batch($vars, $cid)) {\n // Batch operation failed, go back to the users list and display a notice.\n $message = JText::sprintf('COM_USERS_USER_BATCH_FAILED', $model->getError());\n $this->setRedirect('index.php?option=com_users&view=users', $message, 'error');\n return false;\n }\n\n $message = JText::_('COM_USERS_USER_BATCH_SUCCESS');\n $this->setRedirect('index.php?option=com_users&view=users', $message);\n return true;\n }", "public static function batch($jobs)\n {\n /** @var \\Illuminate\\Bus\\Dispatcher $instance */\n return $instance->batch($jobs);\n }", "public function set(int $retries): void;", "public function setBatch(\\net\\authorize\\api\\contract\\v1\\BatchDetailsType $batch)\n {\n $this->batch = $batch;\n return $this;\n }", "function user_pathauto_bulk_update_batch_process(&$context) {\n if (!isset($context['sandbox']['current'])) {\n $context['sandbox']['count'] = 0;\n $context['sandbox']['current'] = 0;\n }\n\n $query = db_select('users', 'u');\n $query->leftJoin('url_alias', 'ua', \"CONCAT('user/', u.uid) = ua.source\");\n $query->addField('u', 'uid');\n $query->isNull('ua.source');\n $query->condition('u.uid', $context['sandbox']['current'], '>');\n $query->orderBy('u.uid');\n $query->addTag('pathauto_bulk_update');\n $query->addMetaData('entity', 'user');\n\n // Get the total amount of items to process.\n if (!isset($context['sandbox']['total'])) {\n $context['sandbox']['total'] = $query->countQuery()->execute()->fetchField();\n\n // If there are no nodes to update, the stop immediately.\n if (!$context['sandbox']['total']) {\n $context['finished'] = 1;\n return;\n }\n }\n\n $query->range(0, 25);\n $uids = $query->execute()->fetchCol();\n\n pathauto_user_update_alias_multiple($uids, 'bulkupdate', array());\n $context['sandbox']['count'] += count($uids);\n $context['sandbox']['current'] = max($uids);\n $context['message'] = t('Updated alias for user @uid.', array('@uid' => end($uids)));\n\n if ($context['sandbox']['count'] != $context['sandbox']['total']) {\n $context['finished'] = $context['sandbox']['count'] / $context['sandbox']['total'];\n }\n}", "public function getBatchItemIds()\n {\n return $this->batchItemIds;\n }", "private function sendBatch($batch_data)\n\t{\n\t\t$url = ECash::getConfig()->LANDMARK_ACH_BATCH_URL;\n\n\t\tforeach($batch_data as $transaction)\n\t\t{\n\t\t\t$record = $transaction->getBatchRecord();\n\n\t\t\tif(empty($record)) continue;\n\n\t\t\t$content=\"\";\n\n\t\t\tforeach($record as $key => $val)\n\t\t\t{\n\t\t\t\t$content .= $key.\"=\".urlencode($val).\"&\";\n\t\t\t}\n\n\t\t\t$ch = curl_init();\n\t\t\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER,1);\n\t\t\tcurl_setopt($ch, CURLOPT_HEADER, 0);\n\t\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, 20);\n\t\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $content);\n\t\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);\n\t\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\n\t\t\t$result = curl_exec($ch);\n\n\t\t\t$fail_transaction = FALSE;\n\n\t\t\tif (empty($result))\n\t\t\t{\n\t\t\t\t$error = \"Curl Error(\" . curl_errno($ch) . \") - \" . curl_error($ch);\n\t\t\t\t$this->log->Write(\"LM: Error ($error) - Posted Content: ($content)\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$response_array = explode(\"\\n\", $result);\n\n\t\t\t\t$result_code \t= trim((string)$response_array[0]);\n\t\t\t\t$error_message \t= $response_array[1];\n\n\t\t\t\t$odata = explode(',', $response_array[2]);\n\n\t\t\t\t$return_code = trim(substr($odata[3], 0, 4));\n\t\t\t\t$return_reason = trim(substr($odata[3], 5, strlen($odata[3])));\n\t\t\t\t$confirmation_number = $odata[4];\n\n\t\t\t\tif($result_code == \"0000\")\n\t\t\t\t{\n\t\t\t\t\t// Success\n\t\t\t\t\t$this->updateRecord($transaction->getACHID(), 'processed', '', '', $confirmation_number);\n\t\t\t\t}\n\t\t\t\telse if ($result_code == \"9999\")\n\t\t\t\t{\n\t\t\t\t\t$fail_transaction = TRUE;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Unknown Result Code\n\t\t\t\t\t$this->log->Write(\"LM: Unknown response - \" . var_export($response_array, TRUE));\n\t\t\t\t\t$this->log->Write(\"LM: Posted Content: ($content)\");\n\t\t\t\t\t$this->batch_errors[] = array('application_id' => $transaction->getApplicationID(), 'reason' => \"Unknown response: \" . $result_code);\n\n\t\t\t\t\t// It's questionable whether or not we should fail the transaction\n\t\t\t\t\t$fail_transaction = TRUE;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif($fail_transaction === TRUE)\n\t\t\t{\n\t\t\t\t$this->updateRecord($transaction->getACHID(), 'returned', $return_code, $error);\n\t\t\t\t$this->updateTransactionRegister($transaction->getPaymentTransactionRegisterId(), NULL, 'failed');\n\t\t\t\tUpdate_Status(NULL, $transaction->getApplicationID(), self::DENIED_STATUS, NULL, NULL, FALSE);\n\t\t\t\t// Update Status now - Should this care whether or not it was an unknown error\n\t\t\t\t// or if it was returned during post?\n\t\t\t}\n\t\t}\n\t}", "public function setBatchSending($batchSending)\n {\n $this->config->batchSending = $batchSending;\n\n return $this;\n }", "public function getBatchId()\n {\n return $this->batchId;\n }", "public function getBatchId()\n {\n return $this->batchId;\n }", "public function batch(string $method, array $requests, ?ProgressBar $progressBar = null)\n {\n if ($progressBar instanceof ProgressBar) {\n $progressBar->start(count($requests));\n }\n\n $requests = function () use ($method, $requests, $progressBar) {\n foreach ($requests as $request) {\n if ($progressBar instanceof ProgressBar) {\n $progressBar->advance();\n }\n\n yield new Request($method, $request['uri'], array_merge(self::DEFAULT_HEADERS, $request['headers']));\n }\n };\n\n $pool = new Pool($this->client, $requests(), ['concurrency' => 10]);\n $pool->promise()->wait();\n\n if ($progressBar instanceof ProgressBar) {\n $progressBar->finish();\n }\n }", "public function batchPublish()\n {\n $this->getChannel()->publish_batch();\n }", "function &batch_get() {\n // Not drupal_static(), because Batch API operates at a lower level than most\n // use-cases for resetting static variables, and we specifically do not want a\n // global drupal_static_reset() resetting the batch information. Functions\n // that are part of the Batch API and need to reset the batch information may\n // call batch_get() and manipulate the result by reference. Functions that are\n // not part of the Batch API can also do this, but shouldn't.\n static $batch = [];\n return $batch;\n}", "public function testBatch()\n {\n $client = new Client();\n $this->assertInstanceOf(\n 'Idio\\Api\\Batch',\n $client->batch(array()),\n \"Expecting a Idio\\Api\\Batch object to be returned\"\n );\n }", "function node_pathauto_bulk_update_batch_process(&$context) {\n if (!isset($context['sandbox']['current'])) {\n $context['sandbox']['count'] = 0;\n $context['sandbox']['current'] = 0;\n }\n\n $query = db_select('node', 'n');\n $query->leftJoin('url_alias', 'ua', \"CONCAT('node/', n.nid) = ua.source\");\n $query->addField('n', 'nid');\n $query->isNull('ua.source');\n $query->condition('n.nid', $context['sandbox']['current'], '>');\n $query->orderBy('n.nid');\n $query->addTag('pathauto_bulk_update');\n $query->addMetaData('entity', 'node');\n\n // Get the total amount of items to process.\n if (!isset($context['sandbox']['total'])) {\n $context['sandbox']['total'] = $query->countQuery()->execute()->fetchField();\n\n // If there are no nodes to update, the stop immediately.\n if (!$context['sandbox']['total']) {\n $context['finished'] = 1;\n return;\n }\n }\n\n $query->range(0, 25);\n $nids = $query->execute()->fetchCol();\n\n pathauto_node_update_alias_multiple($nids, 'bulkupdate');\n $context['sandbox']['count'] += count($nids);\n $context['sandbox']['current'] = max($nids);\n $context['message'] = t('Updated alias for node @nid.', array('@nid' => end($nids)));\n\n if ($context['sandbox']['count'] != $context['sandbox']['total']) {\n $context['finished'] = $context['sandbox']['count'] / $context['sandbox']['total'];\n }\n}", "public function startBatch() {\r\n $targetURL = 'https://api.sunfrogshirts.com/v1/Orders/' . $this -> apiUserProfile . '/startBatch.json';\r\n $data = [\r\n \"Iagree\" => \"1\", \r\n \"password\" => $this -> apiPassword,\r\n \"username\" => $this -> apiUserEmail\r\n ];\r\n \r\n $result = $this -> sendAPICall($endpoint = $targetURL, $payload = $data); \r\n return $result; \r\n }", "public function getBatchId()\n {\n return $this->batch_id;\n }", "public function batchSize(): int\n {\n return 1000;\n }", "public function store(PendingBatch $batch);", "private function getUpdateBatch()\n {\n if (null === $this->updateBatch) {\n $this->updateBatch = new \\MongoUpdateBatch($this->getCollection(), $this->writeConcern);\n }\n\n return $this->updateBatch;\n }", "function _entity_gallery_mass_update_batch_process(array $entity_galleries, array $updates, $langcode, $load, $revisions, &$context) {\n if (!isset($context['sandbox']['progress'])) {\n $context['sandbox']['progress'] = 0;\n $context['sandbox']['max'] = count($entity_galleries);\n $context['sandbox']['entity_galleries'] = $entity_galleries;\n }\n\n // Process entity galleries by groups of 5.\n $count = min(5, count($context['sandbox']['entity_galleries']));\n for ($i = 1; $i <= $count; $i++) {\n // For each egid, load the entity gallery, reset the values, and save it.\n $entity_gallery = array_shift($context['sandbox']['entity_galleries']);\n if ($load) {\n $entity_gallery = $revisions ?\n entity_revision_load('entity_gallery', $entity_gallery) : EntityGallery::load($entity_gallery);\n }\n $entity_gallery = _entity_gallery_mass_update_helper($entity_gallery, $updates, $langcode);\n\n // Store result for post-processing in the finished callback.\n $context['results'][] = \\Drupal::l($entity_gallery->label(), $entity_gallery->urlInfo());\n\n // Update our progress information.\n $context['sandbox']['progress']++;\n }\n\n // Inform the batch engine that we are not finished,\n // and provide an estimation of the completion level we reached.\n if ($context['sandbox']['progress'] != $context['sandbox']['max']) {\n $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];\n }\n}", "public function _sendBatchRequestToGoogleStep1($batchId) {\n $result = $this->getService(\"GoogleApiRequest\")->getDao('GoogleApiRequest')->cloneGoogleApiRequestDataWithBatchId($batchId);\n if ($result === false) {\n $this->_sendAlert(\"[Panther] Cannot insert data to google_api_request table, \" . __METHOD__ . __LINE__, \"error:\" . $this->getService(\"GoogleApiRequest\")->getDao('GoogleApiRequest')->db->error()[\"message\"]);\n }\n return $result;\n }", "public function getJobRetries(): int;", "public function getAll() \n {\n return $this->adapter->getRetries();\n }", "public function getOrdersBatchWithHttpInfoRetry($retry , $order_batch, $_expand = null)\n {\n $returnType = '\\ultracart\\v2\\models\\OrdersResponse';\n $request = $this->getOrdersBatchRequest($order_batch, $_expand);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n\n if($e->getResponse()) {\n $response = $e->getResponse();\n $statusCode = $response->getStatusCode();\n $retryAfter = 0;\n $headers = $response->getHeaders();\n if (array_key_exists('Retry-After', $headers)) {\n $retryAfter = intval($headers['Retry-After'][0]);\n }\n\n if ($statusCode == 429 && $retry && $retryAfter > 0 && $retryAfter <= $this->config->getMaxRetrySeconds()) {\n sleep($retryAfter);\n return $this->getOrdersBatchWithHttpInfoRetry(false , $order_batch, $_expand);\n }\n }\n\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\ultracart\\v2\\models\\OrdersResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\ultracart\\v2\\models\\ErrorResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 401:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\ultracart\\v2\\models\\ErrorResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 410:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\ultracart\\v2\\models\\ErrorResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 429:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\ultracart\\v2\\models\\ErrorResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 500:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\ultracart\\v2\\models\\ErrorResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "protected function requestMulti()\n {\n $urls_count = count($this->url);\n $curl_arr = array();\n $mh = curl_multi_init();\n $this->response = [];\n\n for ( $i = 0; $i < $urls_count; $i++ ) {\n $this->options[CURLOPT_URL] = $this->url[$i];\n $curl_arr[$i] = curl_init($this->url[$i]);\n\n curl_setopt_array($curl_arr[$i], $this->options);\n curl_multi_add_handle($mh, $curl_arr[$i]);\n }\n\n do {\n curl_multi_exec($mh, $running);\n usleep(1000);\n } while ( $running > 0 );\n\n for ( $i = 0; $i < $urls_count; $i++ ) {\n $curl_info = curl_getinfo($curl_arr[$i]); // Gather HTTP response information\n $received_data = curl_multi_getcontent($curl_arr[$i]);\n\n // Do not catch timeout error for async requests.\n if( in_array('async', $this->presets, true) ){\n $received_data = true;\n }\n\n if ( $received_data === '' ) {\n $received_data = array('error' => curl_error($curl_arr[$i]));\n }\n\n $this->response[$this->url[$i]] = new Response($received_data, $curl_info);\n }\n\n return $this->response;\n }", "public function retryFailed($curlInstances)\n {\n $failed = 0;\n\n $curlMultiInstance = new CurlMulti();\n\n /**\n * @var $curlInstance Curl\n */\n foreach ($curlInstances as $curlInstance) {\n if ($curlInstance->isSuccessful()) {\n continue;\n }\n\n $curlInstance->setRetryCount($curlInstance->getRetryCount() + 1);\n\n $curlMultiInstance->addInstance($curlInstance);\n\n $failed++;\n }\n\n $curlMultiInstance->exec();\n\n return $failed;\n }", "function set_immutable_batch($items = array()){\n if(!is_array($items)) return array();\n\n $batch = array();\n foreach($items as $item){\n $element = new stdClass();\n $element->key = $item['key'];\n $element->data = $item['value'];\n $element->expiry = $item['expiry'];\n $batch[] = $element;\n }\n $data_string = json_encode($batch);\n $data = \"TPL {$data_string}\";\n $response = json_decode($this->send($data), true);\n\n $return_batch = array();\n foreach($response['data'] as $response_item){\n $return_batch[$response_item['key']] = $response_item['data'] == '200 OK' ? true : false;\n }\n return $return_batch;\n }", "public function getBatchSize()\n\t{\n\t\treturn $this->batchSize;\n\t}", "public function runBatch()\n\t{\n\t\t$this->batch_record_count = 0;\n\t\t$this->batch_errors = array();\n\n\t\t/**\n\t\t * Create the batch and transactions, update statuses\n\t\t */\n\t\t$status = Check_Process_State($this->db, $this->company_id, 'landmark_create_batch', $this->business_day);\n\n\t\tif(($status === false) || ($status != 'completed'))\n\t\t{\n\t\t\t$batch_data = $this->createTransactions();\n\t\t\t$size = count($batch_data);\n\n\t\t\t$this->log->Write(\"We have $size items in the returned array\");\n\n\t\t}\n\t\telse if($status === 'completed')\n\t\t{\n\t\t\t// We don't want to continue. As it sits, the process will not gracefully restart.\n\t\t\t$this->log->Write(\"[{$this->company_short}] LM: Processing has already run for today!\");\n\t\t\treturn false;\n\t\t}\n\n\t\t/**\n\t\t * Generate the Post Data and send the batch\n\t\t */\n\t\t$status = Check_Process_State($this->db, $this->company_id, 'landmark_send_batch', $this->business_day);\n\t\tif(($status === false) || ($status != 'completed'))\n\t\t{\n\t\t\t$pid = Set_Process_Status($this->db, $this->company_id, 'landmark_send_batch', 'started');\n\n\t\t\ttry\n\t\t\t{\n\t\t\t\t// Format the Post data\n\t\t\t\t$batch_data = $this->formatPostData($batch_data);\n\n\t\t\t\t$error_count = count($this->batch_errors);\n\t\t\t\t$this->log->Write(\"There were $error_count errors with field validation.\");\n\n\t\t\t\t// Post the data\n\t\t\t\t$this->sendBatch($batch_data);\n\n\t\t\t\tSet_Process_Status($this->db, $this->company_id, 'landmark_send_batch', 'completed', null, $pid);\n\t\t\t}\n\t\t\tcatch (Exception $e)\n\t\t\t{\n\t\t\t\t$this->log->Write(\"LM: Error sending batch!\");\n\t\t\t\t$this->log->Write(\"Exception: \" . $e->getMessage());\n\t\t\t\t$this->log->Write(\"Trace: \\n\" . $e->getTraceAsString());\n\n\t\t\t\tSet_Process_Status($this->db, $this->company_id, 'landmark_send_batch', 'failed', null, $pid);\n\t\t\t}\n\t\t}\n\t\telse if($status === 'completed')\n\t\t{\n\t\t\t// We don't want to continue. As it sits, the process will not gracefully restart.\n\t\t\t$this->log->Write(\"[{$this->company_short}] LM: Batch has already been sent today!\");\n\t\t\treturn false;\n\t\t}\n\n\t\tif(count($this->batch_errors) > 0)\n\t\t{\n\t\t\t$this->log->Write(\"Error Processing the following applications:\");\n\t\t\tforeach($this->batch_errors as $error)\n\t\t\t{\n\t\t\t\t$this->log->Write(\"[App: {$error['application_id']}] - {$error['reason']}\");\n\t\t\t}\n\t\t}\n\t}", "public function retry_failed_resizing($count = null);" ]
[ "0.5528813", "0.5447026", "0.53193486", "0.52275157", "0.5217251", "0.5169117", "0.49882567", "0.498467", "0.498258", "0.49766383", "0.4974007", "0.4962958", "0.4916209", "0.49091884", "0.49059683", "0.48628184", "0.48494586", "0.48335123", "0.48294267", "0.47988898", "0.47897342", "0.47707778", "0.47609293", "0.47585666", "0.47321206", "0.4707177", "0.4704914", "0.4698712", "0.46916986", "0.4680663", "0.46679688", "0.464897", "0.46341765", "0.46256384", "0.4617789", "0.4600284", "0.45956853", "0.45851514", "0.4573128", "0.45595238", "0.45510125", "0.45289627", "0.45278817", "0.45203626", "0.45183837", "0.4510839", "0.44889498", "0.44860172", "0.44800052", "0.4469496", "0.44356346", "0.44305974", "0.44276085", "0.442101", "0.44198522", "0.44155213", "0.44145086", "0.43990853", "0.43900853", "0.43851152", "0.43784508", "0.43723476", "0.43523982", "0.43426", "0.43384373", "0.43336207", "0.43314573", "0.4327212", "0.4316824", "0.43094108", "0.43079203", "0.4306297", "0.42973414", "0.42915124", "0.4283568", "0.42694116", "0.4269331", "0.4265908", "0.4265908", "0.42503598", "0.4244138", "0.42378843", "0.42351863", "0.42239735", "0.42213577", "0.4208389", "0.4205579", "0.42017588", "0.41969308", "0.41958356", "0.41907328", "0.41871002", "0.4184578", "0.41813764", "0.41789505", "0.41775754", "0.41745242", "0.41676015", "0.4166155", "0.41586068" ]
0.73172545
0
Implements hook_user_logout(). Logs out authenticated user from CAS, WIND or both.
Реализует hook_user_logout(). Выходит из системы аутентифицированного пользователя из CAS, WIND или обоих.
function cls_sso_user_logout() { global $user; global $base_url; $wind_redirect = ""; $destination_url = $_SERVER['HTTP_REFERER'] ? $_SERVER['HTTP_REFERER'] : $base_url; //To avoid "Access Denied" message, user will be redirected to login page after logging out from user/* pages if (in_array($destination_url, array( "sso/cas/process-user", "$base_url/sso/cas/process-user", "user", "$base_url/user", "user/" . $user->uid, "$base_url/user/" . $user->uid ) )) { $destination_url = $base_url; } if (isset($_SESSION['wind']['ticketid'])) { //WIND logout $wind_logout_url = (variable_get('wind|sandbox_mode|enable')) ? variable_get('wind|wind_service|sandbox_logout_url') : variable_get('wind|wind_service|logout_url'); $service = variable_get('wind_service', 'law-web'); $wind_redirect = "$wind_logout_url?service=$service&destination=$destination_url&destinationtext=Back%20to%20Columbia%20Law%School&passthrough=1"; } session_destroy(); module_invoke_all('user', 'logout', NULL, $user); $user = drupal_anonymous_user(); //CAS logout cas_phpcas_init(); $logout_url = phpCAS::getServerLogoutURL(); //If user was logged in using both WIND and CAS, he/she will be redirected to WIND logout after CAS logout. //Otherwise, he/she will be redirected to destination. $destination_url = $wind_redirect ? $wind_redirect : $destination_url; $_SESSION['destination_url'] = $destination_url; $options = array('query' => array('service' => $destination_url)); drupal_goto($logout_url, $options); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function logout_hook();", "protected function userLogout() {\n user_logout();\n }", "function logout() {\n\t\tglobal $_MAMBOTS;\n\n\t\t//load user bot group\n\t\t$_MAMBOTS->loadBotGroup( 'user' );\n\n\t\t//get the user\n\t\t$user = $this->getUser();\n\n\t\t//trigger the onLogOutUser event\n\t\t$results = $_MAMBOTS->trigger( 'onLogoutUser', array( &$user ));\n\n\t\t//mosCache::cleanCache('com_content');\n\t\tmosCache::cleanCache();\n\n\t\t$session =& $this->_session;\n\t\t$session->destroy();\n\t}", "public function doLogout() {\n\t\tunset($_SESSION[self::$LOGGED_IN_USER]);\n\t}", "public static function userLogout(){\n session_destroy();\n setcookie(\"login_user\", '', time()-3600);\n setcookie(\"code_user\", '', time()-3600);\n header(\"Location: /auth_test/\");\n }", "public function logout() {\n\t\n\t\t$plugins \t\t\t\t\t\t= &singleton::get(__NAMESPACE__ . '\\plugins');\t\n\t\t$plugins->run('auth_logout_start');\n\t\t\n\t\tunset($this->current_user);\n\t\tsession_destroy();\n\t}", "function dologout()\r\n {\r\n //get login object\r\n $userlogin = getUserLogin();\r\n //logout\r\n $userlogin->logout();\r\n $this->latesession->set('USERLOGIN', $userlogin);\r\n //redirect\r\n redirect('');\r\n\r\n }", "function auth_log_out ($user_data)\r\n{\r\n\tglobal $db;\r\n\t\r\n\t// Remove session data from session table\r\n\t$db->set_query('DELETE FROM ' . SESSIONS_TABLE . ' WHERE session_id = :1');\r\n\t$db->execute($user_data['user_session_id']);\r\n\r\n\t// Delete cookies\r\n\tsetcookie(PHPFRAME_AUTOLOGIN_COOKIE, '', -3600, PHPFRAME_COOKIE_PATH, PHPFRAME_COOKIE_DOMAIN);\r\n\tsetcookie(PHPFRAME_SESSION_ID_COOKIE, '', -3600, PHPFRAME_COOKIE_PATH, PHPFRAME_COOKIE_DOMAIN);\r\n}", "public function doLogout() {\n\n\t\t// Grab the current user\n\t\t$oUser = wp_get_current_user();\n\n\t\t// Setup the sql\n\t\t$sSql = str_replace(array(\n\t\t\t'{wpdbPrefix}',\n\t\t\t'{nameSpace}',\n\t\t\t'{wpId}'\n\t\t), array(\n\t\t\t$this->getDatabase()->prefix,\n\t\t\t$this->getNamespace(),\n\t\t\t$oUser->ID\n\t\t), Whv_Config::Get('sqlMiscQueries', 'removeOneightyAccount'));\n\n\t\t// Try to run the query\n\t\tif ($this->getDatabase()->query($sSql)) {\n\n\t\t\t// The user has been\n\t\t\t// logged out, return\n\t\t\treturn true;\n\t\t} else {\n\n\t\t\t// The user was not\n\t\t\t// logged out, return\n\t\t\treturn false;\n\t\t}\n\t}", "static public function logout()\n {\n if(CasServiceProvider::auth())\n phpCAS::logout();\n }", "public function action_logout() {\r\n // Sign out the user\r\n Auth::instance()->logout();\r\n\r\n // redirect to the user account and then the signin page if logout worked as expected\r\n Request::instance()->redirect('user/profile');\r\n }", "public function onUserLogout($user, $options = array())\n\t{\n\t\t$db = JFactory::getDbo();\n\t\t$query = $db->getQuery(true);\n\t\t$query->select('*');\n\t\t$query->from('#__externallogin_servers AS a');\n\t\t$query->leftJoin('#__externallogin_users AS e ON e.server_id = a.id');\n\t\t$query->where('a.plugin = ' . $db->quote('system.caslogin'));\n\t\t$query->where('e.user_id = ' . (int) $user['id']);\n\t\t$db->setQuery($query);\n\t\t$server = $db->loadObject();\n\n\t\tif ($server)\n\t\t{\n\t\t\t// Destroy session\n\t\t\t$my \t\t= JFactory::getUser();\n\t\t\t$session \t= JFactory::getSession();\n\t\t\t$app \t\t= JFactory::getApplication();\n\n\t\t\t// Make sure we're a valid user first\n\t\t\tif ($user['id'] == 0 && !$my->get('tmp_user'))\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// Check to see if we're deleting the current session\n\t\t\tif ($my->get('id') == $user['id'] && $options['clientid'] == $app->getClientId())\n\t\t\t{\n\t\t\t\t// Hit the user last visit field\n\t\t\t\t$my->setLastVisit();\n\n\t\t\t\t// Destroy the php session for this user\n\t\t\t\t$session->destroy();\n\t\t\t}\n\n\t\t\t// Force logout all users with that userid\n\t\t\t$db = JFactory::getDBO();\n\t\t\t$db->setQuery(\n\t\t\t\t'DELETE FROM ' . $db->quoteName('#__session') .\n\t\t\t\t' WHERE ' . $db->quoteName('userid') . ' = ' . (int) $user['id'] .\n\t\t\t\t' AND ' . $db->quoteName('client_id') . ' = ' . (int) $options['clientid']\n\t\t\t);\n\t\t\t$db->execute();\n\n\t\t\t$params = new JRegistry($server->params);\n\n\t\t\t$local = $app->input->get('local');\n\n\t\t\t// Local logout only?\n\t\t\tif(isset($local))\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t// Logout from CAS\n\t\t\telseif ($params->get('autologout') && $my->get('id') == $user['id']) // && $app->getClientId() == 0\n\t\t\t{\n\t\t\t\t// Log message\n\t\t\t\tif ($params->get('log_logout', 0))\n\t\t\t\t{\n\t\t\t\t\tJLog::add(\n\t\t\t\t\t\tnew ExternalloginLogEntry(\n\t\t\t\t\t\t\t'Logout of user \"' . $user['username'] . '\" on server ' . $server->id,\n\t\t\t\t\t\t\tJLog::INFO,\n\t\t\t\t\t\t\t'system-caslogin-logout'\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif ($params->get('locale'))\n\t\t\t\t{\n\t\t\t\t\tlist($locale, $country) = explode('-', JFactory::getLanguage()->getTag());\n\t\t\t\t\t$locale = '&locale=' . $locale;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$locale = '';\n\t\t\t\t}\n\n\t\t\t\tif ($params->get('logouturl'))\n\t\t\t\t{\n\t\t\t\t\t$redirect = $this->getUrl($params) . '/logout?service=' . urlencode($params->get('logouturl')) . $locale;\n\t\t\t\t}\n\t\t\t\telseif ($app->input->get('return'))\n\t\t\t\t{\n\t\t\t\t\t$return = base64_decode($app->input->get('return', '', 'base64'));\n\n\t\t\t\t\tif (is_numeric($return))\n\t\t\t\t\t{\n\t\t\t\t\t\t$baseUrl = JUri::getInstance()->toString(array('scheme', 'host', 'port'));\n\t\t\t\t\t\t$return = $baseUrl . JRoute::_('index.php?Itemid=' . $return, true);\n\t\t\t\t\t}\n\n\t\t\t\t\t$redirect = $this->getUrl($params) . '/logout?service=' . urlencode($return) . '&url=' . urlencode($return) . $locale;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$redirect = $this->getUrl($params) . '/logout' . $locale;\n\t\t\t\t}\n\n\t\t\t\t$app->redirect($redirect);\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "function logout() {\n\t\tif ($this->Auth->user()) {\n\t\t\tif (isset($this->SwissArmy)) {\n\t\t\t\t$this->SwissArmy->addComponent('Cookie');\n\t\t\t\t$this->Cookie->del('User');\n\t\t\t}\n\t\t\t$this->Session->destroy();\n\t\t\t$this->Session->setFlash(__('now logged out', true));\n\t\t}\n\t\t$this->redirect($this->Auth->logout());\n\t}", "public function logout()\n {\n $this->cas->logout();\n }", "function logout_user() {\n // because we want to check that the cookie has been unset\n $raw_response = dialogue_api_post(\"/users/logout\", array(), True);\n return $raw_response;\n}", "public static function userLogout() {\n\n //Check if user is Logged in\n if (!login::isLoggedIn()){\n controller::redirectTo('home');\n }\n\n //Check if user clicked logout\n if(isset($_POST['confirm'])) {\n\n //Check if user still has cookie\n if(isset($_COOKIE['MID'])) {\n\n //delete login token\n database::query('DELETE FROM login_tokens WHERE login_token=:token', array(':token'=>sha1($_COOKIE['MID'])));\n \n //set Expired cookie (don't eat or you will get sick)\n setcookie(\"MID\", '1', time()-3600);\n\n controller::redirectTo(\"login\");\n }\n }\n\n }", "function logout()\n\t{\n\t\t// Initialize variables\n\t\t$retval = false;\n\n\t\t// Get a user object from the JApplication\n\t\t$user = JFactory::getUser();\n\n\t\t// Build the credentials array\n\t\t$credentials['username'] \t= $user->get('username');\n\t\t$credentials['id'] \t\t\t= $user->get('id');\n\n\t\t// Import the user plugin group\n\t\tJPluginHelper::importPlugin('user');\n\n\t\t// OK, the credentials are built. Lets fire the onLogout event\n\t\t$results = $this->triggerEvent( 'onLogout', $credentials);\n\n\t\t/*\n\t\t * If any of the authentication plugins did not successfully complete the logout\n\t\t * routine then the whole method fails. Any errors raised should be done in\n\t\t * the plugin as this provides the ability to provide much more information\n\t\t * about why the routine may have failed.\n\t\t */\n\t\tif (!in_array(false, $results, true))\n\t\t{\n\t\t\t$session =& JFactory::getSession();\n\n\t\t\t// Remove the session from the session table\n\t\t\t$table = & JTable::getInstance('session', JFactory::getDBO());\n\t\t\t$table->load( $session->getId());\n\t\t\t$table->destroy();\n\n\t\t\t// Destroy the php session for this user\n\t\t\t$session->destroy();\n\n\t\t\t$retval = true;\n\t\t}\n\n\t\t// Hit the user last visit field\n\t\t$user->setLastVisit();\n\n\t\treturn $retval;\n\t}", "public function logout(){\n unset($_SESSION['user']);\n\n // Successful logout\n $message_handler = new MessageHandler();\n $message_handler->add_message(\"You are now logged out.\", SUCCESS_MSG);\n $message_handler->build_messages();\n\n header(\"Location: \" . $GLOBALS['settings']['admin_settings']['logout_redirect']);\n }", "public function doLogout() {\n\t\t// Wir löschen die aktuelle Sitzung des Benutzers\n\t\tWCF::getSession()->delete();\n\t\t\n\t\t// Wir löschen die gesetzten Cookies\n\t\tif (isset($_COOKIE[COOKIE_PREFIX.'userID'])) HeaderUtil::setCookie('userID', 0);\n\t\tif (isset($_COOKIE[COOKIE_PREFIX.'password'])) HeaderUtil::setCookie('password', '');\n\t\t\n\t\t// Benutzer weiterleiten\n\t\tHeaderUtil::redirect('login.php');\n\t\texit;\n\t}", "public function logout()\n {\n $this->sensitivePageHTTPSorRedirectAndDie('/auth/logout');\n\t $auth = Auth::instance();\n\t if (method_exists($auth->driver, 'ldap_logout')) {\n\t $auth->driver->ldap_logout();\n\t }\n\t $auth->logout(TRUE);\n\t client::messageSend(Kohana::lang('auth.auth_logout_success'), E_USER_NOTICE);\n\t url::redirect(url::site());\n }", "function logout()\n\t{\t\t\n\t\t$this->messages->add('You have logged out successfully', 'success');\n\t\t\n\t\t//Ends user session\n\t\t$this->session->sess_destroy();\n\t\tdelete_cookie(\"rc_referal_url\");\n\t\t//Redirect to Login page\n\t\tredirect('bandook/account/login');\n\t}", "function logout() { \n if(!instance_of($this->logged_user, 'User')) {\n $this->redirectTo('mobile_access_login');\n } // if\n \n // Logout and redirect to login screen...\n $this->authentication->provider->logUserOut();\n \n $option = ConfigOptions::findByName('on_logout_url');\n $on_logout_url = $option->getValue();\n $this->redirectToUrl(is_valid_url($on_logout_url) ? $on_logout_url : assemble_url('mobile_access_login'));\n }", "public function mylogout()\n\t{\n\t\tif(Module::isInstalled('agilemultipleshop'))\n\t\t{\t\n\t\t\tunset($_SESSION[Context::getContext()->cookie->getName()]);\n\t\t}\n\t\tparent::mylogout();\n\n\t}", "static function logout() {\n\t\tglobal $g_cache_current_user_id, $g_cache_cookie_valid;\n\t\n\t\t# clear cached userid\n\t\t\\Core\\User::clear_cache( $g_cache_current_user_id );\n\t\t\\Core\\Current_User::set( null );\n\t\t$g_cache_cookie_valid = null;\n\t\n\t\t# clear cookies, if they were set\n\t\tif( self::clear_cookies() ) {\n\t\t\t\\Core\\Helper::clear_pref_cookies();\n\t\t}\n\t\n\t\tif( HTTP_AUTH == \\Core\\Config::mantis_get( 'login_method' ) ) {\n\t\t\tself::http_set_logout_pending( true );\n\t\t}\n\t\n\t\t\\Core\\Session::clean();\n\t}", "function doLogout()\r\n{\r\n\tif (isset($_SESSION['user_id'])) {\r\n\t\tunset($_SESSION['user_id']);\r\n\t\tsession_unregister('user_id');\r\n\t}\r\n\tif (isset($_SESSION['user_name'])) {\r\n\t\tunset($_SESSION['user_name']);\r\n\t\tsession_unregister('user_name');\r\n\t}\r\n\tif (isset($_SESSION['user_type'])) {\r\n\t\tunset($_SESSION['user_type']);\r\n\t\tsession_unregister('user_type');\r\n\t}\r\n\t\t\r\n\theader('Location: login.php');\r\n\texit;\r\n}", "public function onUserLogout(&$user) {\r\n // User logs out of the wiki we want to log them out of the form too.\r\n if (!isset($this->session)) {\r\n return true; // If the value is not set just return true and move on.\r\n }\r\n return true;\r\n // @todo: Add code here to delete the session.\r\n }", "public function action_logout()\n {\n Kopauth::instance()->clear_authenticated($this->request->param('strategy'));\n $this->redirect(URL::site(Route::get('kopauth')->uri()));\n }", "public function logout($user) {\n $this->initSettings();\n $this->initCasClient();\n session_unset();\n session_destroy();\n phpCAS::logout();\n }", "function user_logout() {\n\t global $database;\n\n\t // CLEAR LAST ACTIVITY DATE\n\t $database->database_query(\"UPDATE se_users SET user_lastactive='' WHERE user_id='\".$this->user_info[user_id].\"'\");\n\n\t // CREATE PLAINTEXT USER EMAIL COOKIE WHILE LOGGED OUT\n\t setcookie(\"prev_email\", $this->user_info[user_email], time()+99999999, \"/\");\n\n\t $this->user_clear();\n\t $this->user_setcookies();\n\t}", "public function userExit()\n {\n if (isset($_SESSION['auth'])) {\n $load_session = R::findOne('authorization', 'token = ?', array($_SESSION['auth']['token']));\n\n if ($load_session) {\n R::trash($load_session);\n }\n }\n\n unset($_SESSION['auth']);\n\n if (isset($_COOKIE['auth'])) {\n setcookie('auth','', time() - 3600 * 24 * 7);\n ob_end_flush();\n }\n\n redirect('/');\n }", "public function logout()\n {\n $loggedOutUser = $this->user;\n\n parent::logout();\n\n \\Event::fire('keios.prouser.afterLogout', [$loggedOutUser]);\n }", "protected function doLogoutAction() {\n\t\t$oSession = $this->getRequest()->getSession();\n\t\tif ( $oSession->getUser() ) {\n\t\t\t$oLog = new mofilmUserLog();\n\t\t\t$oLog->setType(mofilmUserLog::TYPE_OTHER);\n\t\t\t$oLog->setDescription('User logged out');\n\n\t\t\t$oSession->getUser()->getLogSet()->setObject($oLog);\n\t\t\t$oSession->getUser()->save();\n\t\t\t$oSession->setStatusMessage('Successfully Logged Out', mvcSession::MESSAGE_OK);\n\n\t\t\tsystemLog::notice($oSession->getUser()->getEmail().' logged out');\n\t\t}\n\t\t$oSession->setUser(null);\n\t\t$oSession->setLoggedIn(false);\n\t\t$oSession->regenerateSessionID();\n\t\t$oSession->destroy();\n\t\t$oSession = null;\n\t\tunset($oSession);\n\n\t\tsetcookie(mvcSession::MOFILM_LOGIN_HASH, '', time()-7200, \"/\", 'dash.mofilm.com', false, true);\n\n\t\t$this->redirect($this->buildUriPath(self::ACTION_LOGIN));\n\t}", "public function logout() {\n\t\tif($this->_checkToken()) {\n\t\t\t//TODO: this is done in the javascript\n\t\t\t$mods = $this->UCP->Modules->getModulesByMethod('logout');\n\t\t\tforeach($mods as $mod) {\n\t\t\t\t$this->UCP->Modules->$mod->logout();\n\t\t\t}\n\t\t\t$token = !empty($this->UCP->Session->token) ? $this->UCP->Session->token : (isset($_COOKIE[$this->remembermeCookieName]) ? $_COOKIE[$this->remembermeCookieName] : '');\n\t\t\tif(isset($_COOKIE[$this->remembermeCookieName])) {\n\t\t\t\t$this->_deleteCookie();\n\t\t\t}\n\t\t\t$this->_deleteToken($token);\n\t\t\t$this->uid = null;\n\t\t\t$this->user = null;\n\t\t\tunset($_SESSION['id']);\n\t\t\tsession_regenerate_id();\n\t\t\tsession_destroy();\n\t\t}\n\t\treturn true;\n\t}", "public function logout($user) {\n\t if ($this->as->isAuthenticated()) {\n\t $this->as->logout();\n\t }\n\t}", "public function logout()\n\t{\n\t\tif(Module::isInstalled('agilemultipleshop'))\n\t\t{\t\n\t\t\tunset($_SESSION[Context::getContext()->cookie->getName()]);\n\t\t}\n\t\t\n\t\tparent::logout();\n\t}", "public function executeLogout()\n {\n // We cancel the authentication\n $user = $this->container->get('User');\n $user->setAuthenticated(false);\n\n // Redirection to the index page\n $reponse = $this->container->get('HTTPResponse');\n $reponse->setStatus(301);\n $reponse->redirection('/');\n }", "private function doLogout()\n {\n if(isset($_COOKIE['remember_dxLinkAdmin'])){\n setcookie ('remember_dxLinkAdmin', \"\", time() - 3600, \"/\", \".dxlink.ca\", 1,1);\n setcookie(session_name(), \"\");\n }\n\n $_SESSION = array();\n session_destroy();\n $this->user_is_logged_in = false;\n header(\"Location: index.php\");\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# 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\t\t\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 - effectively logging them out\n\t\tsetcookie(\"token\", \"\", strtotime('-1 year'), '/');\n\t\t\n\t\t# Send them back to the main landing page\n\t\tRouter::redirect(\"/\");\n\n\t}", "public function logOutUser();", "function different_user () {\n session_logout();\n}", "public function processLogout()\n {\n //Fails if the proper action was not submitted\n if ($_POST['action'] != 'userLogout') {\n return \"Invalid action suplied for processLogout\";\n }\n // removes the user array from the current session\n session_destroy();\n return TRUE;\n }", "public function Logout(){\n $_SESSION['connect_compte_FRONT'] = false;\n unset($_SESSION['cp_userID'], $_SESSION['cp_userPseudo'], $_SESSION['cp_user']);\n\t\t//session_unset('ChallengesPlanet');\n\t\t$this->coreRedirect('page', 'home');\n\t}", "public static function logout () {\n\t\t\tself::init();\n\t\t\t$_SESSION['_xoket_auth_user'] = '';\n\t\t\tunset( $_SESSION['_xoket_auth_user'] );\n\t\t}", "public function logout() {\r\n\t\t$new_token = sha1(TOKEN_SALT.$this->user->email.Utils::generate_random_string());\r\n\t\t\r\n\t\t# Create the data array we'll use with the update method\r\n\t\t# In this case, we're only updating one field, so our array only has one entry\r\n\t\t$data = Array(\"token\" => $new_token);\r\n\t\t\r\n\t\t# Do the update\r\n\t\tDB::instance(DB_NAME)->update(\"users\", $data, \"WHERE token = '\".$this->user->token.\"'\");\r\n\t\t\r\n\t\t# Delete their token cookie - effectively logging them out\r\n\t\tsetcookie(\"token\", \"\", strtotime('-1 year'), '/');\r\n\t\t\r\n\t\techo \"You have been logged out.\";\r\n\r\n\t}", "function logoutUser($user=NULL) {\n\t\t$_SESSION['username'] = Null;\n\t\t$_COOKIE['username'] = Null;\n\t\tunset($_SESSION['username']);\n\t\t$this->signed_username = Null;\n\t}", "public function logoutAction() {\n $this->_sess->logged = false;\n $this->_sess->loginProcessing = false;\n unset($this->_sess->account); \n $this->_helper->redirector->gotoUrl('/');\n }", "function user_logout() {\n\t\n\t// End the session and unset all vars\n\t\n\tsession_unset ();\n\tsession_destroy ();\n}", "protected function logOutUser(){\r\n echo \"logged out \" . $_SESSION['username2'];\r\n //Unset the username and userID session \r\n unset($_SESSION['userID']);\r\n unset($_SESSION['username2']);\r\n unset($_SESSION['orderID']);\r\n unset($_SESSION['role']);\r\n \r\n }", "public function userLogout () {\r\n $service = 'UserLogout';\r\n $parameters = [];\r\n $enginesisResponse = $this->callServerAPI($service, $parameters);\r\n $results = $this->setLastErrorFromResponse($enginesisResponse);\r\n $this->m_refreshToken = null;\r\n setcookie(REFRESH_COOKIE, '', time() - SESSION_EXPIRE_SECONDS, '/', $this->sessionCookieDomain(), true, false);\r\n $this->sessionClear();\r\n return $results != null;\r\n }", "function logOut(){\n\t\tunset($_SESSION['user']);\n\t}", "public function logout(){\n\t\t$new_token = sha1(TOKEN_SALT.$this->user->email.Utils::generate_random_string());\n\t\t\n\t\t# Create the data array we'll use with the update method\n\t\t$data = Array(\"token\" => $new_token);\n\n\t\t# Do the update\n\t\tDB::instance(DB_NAME)->update(\"users\", $data, \"WHERE token = '\".$this->user->token.\"'\");\n\t\t\n\t\t# Delete their token cookie by setting it to a date in the past - effectively logging them out\n\t\tsetcookie(\"token\", \"\", strtotime('-1 year'), '/');\n\n\t\t#send back to main index\n\t\tRouter::redirect(\"/\");\n\t}", "public function logout()\n {\n unset ($_SESSION['user_logged_in']);\n header('Location: ' . $_SERVER['HTTP_REFERER'], true, 302);\n }", "public function logout()\n {\n Config::$user->logout();\n header('Location: ' . BASE_URI . '?call=Login');\n }", "public function user_logout()\n {\n $_SESSION['login'] = false;\n unset($_SESSION);\n\t\tsession_destroy();\n }", "function logout_user() {\n\t $session_names = array('user_id', 'user_time', 'user_unique');\n\n\t\tif (isset($_SESSION[$this->qls->config['cookie_prefix'] . 'user_unique'])) {\n $this->qls->SQL->delete('sessions',\n array('id' =>\n array(\n '=',\n $_SESSION[$this->qls->config['cookie_prefix'] . 'user_unique']\n )\n )\n );\n\t\t}\n\n // Remove all session information and unset the cookie\n $_SESSION = array();\n\n\t\tif (isset($_COOKIE[session_name()])) {\n\t\t setcookie(session_name(), '', time() - 42000, '/');\n\t\t}\n\n\t\tif (isset($_COOKIE[$this->qls->config['cookie_prefix'] . 'user_id'])) {\n\t\t\tforeach ($session_names as $value) {\n\t\t\t setcookie($this->qls->config['cookie_prefix'] . $value, 0, time() - 3600, $this->qls->config['cookie_path'], $this->qls->config['cookie_domain']);\n\t\t\t}\n\t\t}\n\n\t $this->qls->redirect($this->qls->config['logout_redirect']);\n\t}", "public function logout(){\n\t\tunset($_SESSION['ccUser']);\n\t}", "public function logout(){\n\t\tunset($_SESSION['ccUser']);\n\t}", "public function logout()\n {\n $res = $this->api->invoke('/user/logout.json', EpiRoute::httpGet);\n $this->route->redirect('/');\n }", "public function logout()\n\t{\n\t\tif (!$this->user->is_guest()) {\n\t\t\t$authCfg = new Vf_Config('config.auth', 'Xml');\n\t\t\t$this->auth->logout();\n\t\t\t\n\t\t\tif ($authCfg->remember == 1 && Vf_Core::getContainer()->request->cookie('autologin')) {\n\t\t\t\tVf_Core::getContainer()->request->response->setCookie('autologin', null, time() - 3600);\n\t\t\t}\n\t\t\t$this->redirect('./');\n\t\t}\n\t}", "public function logout(){\n\t\t$capsule = $this->getcookie('capsule');\n\t\t\n\t\t\t$user = $this->get_user($_SESSION['email']);\n\t\t\t$enValue = $this->encrypt($capsule.','.$user['interests']);\n\t\t $this->setcookie('capsule',$enValue,365);\n\t\t\t\n\t\t\t\n\t\t\tunset( $_SESSION['loggedin']);\n\t\tunset( $_SESSION['email']);\n\t\t\t\n\t\t$this->unsetcookie('remain2'); //remove password cookie\n\t\tsession_destroy();\n\t header(\"Location: http://$this->site_address\"); //redirects if not logged in \n\t}", "public static function logOut()\n {\n $user = static::getCurrentUser();\n if ($user) {\n try {\n ParseClient::_request('POST', 'logout', $user->getSessionToken());\n } catch (ParseException $ex) {\n // If this fails, we're going to ignore it.\n }\n static::$currentUser = null;\n }\n ParseClient::getStorage()->remove('user');\n }", "function do_logout(){\n\tif ( !is_logged_in() ){\n\t\treturn true;\n\t}\n\n\tmake_log(\"Log out\");\n\n\tglobal $auth;\n\tglobal $auth_config;\n\n\treturn $auth->logout( $_COOKIE[$auth_config->cookie_name] );\n\n}", "function logout() {\r\n\t\t\t$this->Cookie->del('Auth.User');\r\n\t\t\t\t$this->redirect($this->Auth->logout());\r\n\t\t}", "abstract public function logout( UserIdentity &$user ): void;", "function user_autologout(){\n if ( is_user_logged_in() ) {\n $current_user = wp_get_current_user();\n $user_id = $current_user->ID;\n \n $approved_status = get_user_meta($user_id, 'wp-approve-user', true);\n//if the user hasn't been approved yet by WP Approve User plugin, destroy the cookie to kill the session and log them out \n \n if ( $approved_status == 1 ){ \n return $redirect_url;\n }\n else{\n wp_logout();\n return get_permalink(woocommerce_get_page_id('myaccount')) . \"?approved=false\";\n }\n }\n}", "public static function logOut(){\n self::$_currentUser = null;\n unset($_SESSION[self::SESSION_USER_ID_KEY]);\n }", "public function log_out() {\n session_unset();\n session_destroy();\n code_cookie::set(\"cookie_hash\", NULL, mktime() - 36000000);\n setcookie(\"logged_in_user_id\", NULL, mktime() - 36000000); // this one needs to use setcookie as it's not player-specific\n }", "public function action_logout() {\n $this->bugzilla_client->logout();\n client::messageSend(\"You have logged out\", E_USER_NOTICE);\n $this->request->redirect('authenticate/login');\n }", "function logout(){\n\t\t\\SSO\\SSO::logout();\n\t}", "public function logout() {\n\t\t$this->_setDefaults();\n\t\tif (empty($this->_authenticateObjects)) {\n\t\t\t$this->constructAuthenticate();\n\t\t}\n\t\t$user = $this->user();\n\t\tforeach ($this->_authenticateObjects as $auth) {\n\t\t\t$auth->logout($user);\n\t\t}\n\t\t$this->Session->delete(static::$sessionKey);\n\t\t$this->Session->delete('Auth.redirect');\n\t\t$this->Session->renew();\n\n\t\treturn Router::normalize($this->logoutRedirect);\n\t}", "public function logout() {\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\t DB::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\t setcookie(\"token\", \"\", strtotime('-1 year'), '/');\n\n\t\t # Send them back to the main index.\n\t\t Router::redirect(\"/\");\n\n\t\t}", "function logoff_user()\n{\n session_unset();\n session_destroy();\n}", "public function logout(){\n\t\t\n\t\t//perform any custom authentication functions\n\t\t$this->strategy->logout_hook();\n\t\t\n\t\t//delete the php session cookie and autologin cookie\n\t\t$this->cookies->delete_cookie($this->session_zone->get_name());\n\t\t$this->cookies->delete_cookie('autologin');\n\t\t\n\t\t//this calls session_destroy() and session_unset()\n\t\t$this->session_zone->destroy();\n\t\t//clears the current user\n\t\t$this->user = null;\n\t\t\n\t\t//start a new session anonymous session\n\t\t$this->set_default_session();\n\t\n\t}", "public function doLogout() {\n\t\t$this->userSession->destroyUserSession();\n $message = \"Bye bye!\";\n\t\t$this->msgSession->setMessage($message); // MessageSession\n $this->userSession->unsetLoginCookie(self::$cookieName, self::$cookiePassword);\n $this->headerLocation(\"index.php\");\n\t\t\n\t}", "public function logout() {\n\t\ttry {\n\t\t\t$this->User->disconnect($this->Auth->user('id'));\n\t\t\t$this->Session->delete('Auth');\n\t\t\t$this->GApi->logout();\n $this->Session->setFlash(__d('access', 'User disconnected.', true), 'alert');\n\t\t} catch (Exception $e) {\n $this->Session->setFlash(__d('access', 'Invalid or Not Found User.', true), 'alert');\n\t\t}\n\t\t$this->redirect('/');\n\t}", "public function logout() {\n\t\tif(!$this->user) {\n\t\t\t\n\t\t\t# Send them to the login page\n\t\t\tRouter::redirect(\"/users/login\");\n\n\t\t}\n\t\t\n\t\t# Generate and save a new token for next login\n \t$new_token = sha1(TOKEN_SALT.$this->user->email.Utils::generate_random_string());\n \t$data = Array(\"token\" => $new_token);\n\n \t# Do the update\n \tDB::instance(DB_NAME)->update(\"users\", $data, \"WHERE token = '\".$this->user->token.\"'\");\n\n \t# Delete their token cookie\n \tsetcookie(\"token\", \"\", strtotime('-1 year'), '/');\n\n \t# Send them back to the main index.\n \tRouter::redirect(\"/\");\n\n\t}", "function execute_logout()\n{\n\tunset($_SESSION['user']);\n\texecute_views_lists_enabled_components();\n}", "public function logout() {\n $this->UserAuth->logout();\n $this->Session->setFlash(__('You are successfully signed out'));\n $this->redirect(LOGOUT_REDIRECT_URL);\n }", "private function doLogout()\n {\n $_SESSION = array();\n session_destroy();\n $this->user_is_logged_in = false;\n $this->feedback = \"You were just logged out.\";\n }", "function logout() {\n\t\t$this->Session->delete('username');\n\t\t\n\t\t// Call the Single-Sign-On API logout method to clear cookies\n\t\t@$this->edrnAuth->logout();\n\t\t\n\t\t// Send the ex-user home\n\t\t$this->redirect(\"/\");\n\t}", "public function processLogout();", "public function logout() {\n\t\tunset($_SESSION['user_id']);\n\t\tunset($_SESSION['user_name']);\n\t\tunset($_SESSION[LOCALE]);\n\t\t// session_unset();\n\t\t// session_destroy();\n\t\t// $_SESSION = array();\n\t\t$this->flash_page('user logout successfully!', '/admin/login', 1);\n\t}", "public function logout() {\n $this->isAuthenticated = 0;\n $this->session->unsetAuthenticatedWebid();\n }", "function openlab_log_out_social_accounts() {\n\tif ( ! is_user_logged_in() ) {\n\t\treturn;\n\t}\n\n\t$user_id = get_current_user_id();\n\t$social = get_user_meta( $user_id, 'social_commenter', true );\n\n\tif ( 'true' === $social ) {\n\t\t// Make sure there's no last_activity, so the user doesn't show in directories.\n\t\tBP_Core_User::delete_last_activity( $user_id );\n\n\t\t// Mark the user as spam, so the profile can't be viewed directly.\n\t\tglobal $wpdb;\n\t\t$wpdb->update( $wpdb->users, array( 'status' => 1 ), array( 'ID' => $user_id ) );\n\n\t\t$user = new WP_User( $user_id );\n\t\tclean_user_cache( $user );\n\n\t\t// Log out and redirect.\n\t\twp_clear_auth_cookie();\n\t\twp_safe_redirect( '/' );\n\t\tdie();\n\t}\n}", "public function logout()\n\t{\n\t\t$this->getLogger()->debug('Logout called for: '. $this->getUserId());\n\t\t$this->setAuthenticated(false, 0);\n\t\tsession_regenerate_id(true);\n\t\tsession_destroy();\n\t}", "public static function logout_user()\n\t{\n\t\t$db = Database::instance();\n\t\t$auth_type = Kohana::config('auth.driver');\n\t\tif ($auth_type == 'db') {\n\t\t\t$db->query('UPDATE user SET logged_in = 0 WHERE id='.(int)user::session('id'));\n\n\t\t\t# reset users logged_in value when they have been logged in\n\t\t\t# more than sesssion.expiration (default 7200 sec)\n\t\t\t$session_length = Kohana::config('session.expiration');\n\t\t\t$db->query('UPDATE user SET logged_in = 0 WHERE logged_in!=0 AND logged_in < '.(time()-$session_length));\n\t\t}\n\t\tSession::instance()->destroy();\n\t\treturn true;\n\t}", "function doUserLogout(){\n\t\n\tunset($_SESSION['loggedIn']);\n\tunset($_SESSION['userId']);\n\t\n\tsession_destroy();\n\t\n\t//redirect to the home page\n\theader(\"location: index.php\");\n\texit;\t\n}", "function m_LogOut()\n\t{\n\t\tunset($_SESSION['user']);\t\t\t\t\t\t\t\t\n\t\theader(\"Location: \".SITE_URL.\"adminindex.php?err=2\");\n\t}", "public function logout() {\n $new_token = sha1(TOKEN_SALT.$this->user->email.Utils::generate_random_string());\n\n # Create the data array we'll use with the update method\n # In this case, we're only updating one field, so our array only has one entry\n $data = Array(\"token\" => $new_token);\n\n #Do the update\n DB::instance(DB_NAME)->update(\"users\", $data, \"WHERE token = '\".$this->user->token.\"'\");\n\n #Delete their token cookie by setting it to a date in the past - effectively logging them out\n setcookie(\"token\", \"\", strtotime('-1 year'), '/');\n\n #Send them back to the main index.\n Router::redirect(\"/\");\n }", "public function logoutUser() {\r\n\t\tsession_unset();\r\n\t\tsession_destroy();\r\n\t}", "public function logoutUser()\n\t{\n\t\t$authentificationManager = new AuthentificationManager();\n\t\t$authentificationManager->logUserOut();\n\t\t$this->redirectToRoute('home');\n\t}", "public function logout() {\n\t\t$new_token = sha1(TOKEN_SALT.$this->user->email.Utils::generate_random_string());\n\t\t\n\t\t# create the data array we will use with the update method.... we can only update one field so array has only one entry\n\t\t$data = Array(\"token\" => $new_token);\n\t\t\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 the old token by setting it to a date in the past effectively logging them out\n\t\tsetcookie(\"token\",\"\", strtotime('-1 yeat'), '/');\n\t\t\n\t\t# send them back to the main index\n\t\tRouter::redirect(\"/\");\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t//echo 'This is the logout page';\n }", "public function logout() {\n // mysql class functions are commented out in favor of following PDO methods\n if(!$this->isLoggedIn()) {\n //user isn't logged in, quietly exit\n return false;\n }\n $uid = $this->userID;\n //clear the cookieHash from the DB\n $sql = \"UPDATE \". $this->site->pdo->TP .\"users SET cookieHash='' WHERE id='{$uid}'\";\n //$this->site->db->query($sql);\n $this->site->pdo->query($sql);\n unset($uid);\n //Destroy the cookies and clear out the class variables\n $this->destroyCookie();\n $this->userID = null;\n $this->userInfo = null;\n $this->admin = false;\n $this->loggedIn = false;\n $this->rememberMe = false;\n $this->site->event->trigger('user.logout');\n return true;\n }", "public function user_logout(){\n\t\t\t$_SESSION['login'] = FALSE;\n\n\t\t\t$where = array(\"employee_id\"=>$_SESSION['id']);\n\t\t\t$myarray = array(\n\t\t\t\t\"last_login\"=>$_SESSION['last_login'],\n\t\t\t\t\"status\"=>\"OUT\"\n\t\t\t);\n\t\t\t$this->update_data(\"Employee_Login_Master\", $where, $myarray);\n\n\t\t\t$myarray = array(\n\t\t\t\t\"employee_id\"=>$_SESSION['id'],\n\t\t\t\t\"status\"=>\"Logged_Out\"\n\t\t\t);\n\t\t\t$this->insert_data(\"Activity_Master\", $myarray);\n\n\t\t\tsession_destroy();\n\t\t}", "public function doLogout()\n {\n $this->deleteRememberMeCookie();\n\n $_SESSION = array();\n session_destroy();\n session_start();\n\n $this->user_is_logged_in = false;\n $this->messages[] = MESSAGE_LOGGED_OUT;\n }", "public function logout()\n {\n if ($this->getUser()->isLoggedIn()) {\n $this->getUser()->logout();\n }\n }", "public function log_out()\n\t\t{\n\t\t\t$_SESSION['user'] = null;\n\t\t\t$_SESSION['partners'] = null;\n\t\t\t$_SESSION['sections_student'] = null;\n\t\t\t$_SESSION['sections_ta'] = null;\n\t\t\t$_SESSION['permissions'] = null;\n\n\t\t\tadd_alert('Logged out!', Alert_Type::SUCCESS);\n\t\t\t//session_write_close();\n\t\t\tredirect_to_index();\n\t\t\t\n\t\t}", "public function logoutUser() {\n\t\t\n\t\t\tself::$user = null;\n\t\t\tself::saveToSession();\n\t\t\t\n\t\t}", "public function logout()\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 $this->request->session()->remove($this->getName());\n $this->request->session()->remove($this->getName().'_token');\n\n// if (! is_null($this->user)) {\n// $this->cycleRememberToken($user);\n// }\n//\n// if (isset($this->events)) {\n// $this->events->dispatch(new Events\\Logout($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\n// $this->loggedOut = true;\n }", "private function doLogout()\n {\n $_SESSION = array();\n session_destroy();\n $this->user_is_logged_in = false;\n $this->feedback = \"You were just logged out.\";\n header(\"location: ../../settings.php\");\n }" ]
[ "0.7271404", "0.7257981", "0.7193699", "0.716338", "0.71313614", "0.7128497", "0.71180815", "0.7101623", "0.70832545", "0.7077515", "0.70682716", "0.7066484", "0.70645666", "0.7024939", "0.7023359", "0.70078164", "0.69972545", "0.699302", "0.6990862", "0.69820106", "0.6980177", "0.69683737", "0.6967707", "0.6965746", "0.69404995", "0.69304633", "0.692616", "0.69189173", "0.6912324", "0.68995786", "0.6898476", "0.68938714", "0.6893698", "0.6893597", "0.68812233", "0.6877895", "0.6855966", "0.6844131", "0.6843088", "0.6839498", "0.6811141", "0.68103194", "0.6809879", "0.6806925", "0.67998064", "0.6792957", "0.6786841", "0.67849433", "0.6784718", "0.67760146", "0.6767621", "0.67676145", "0.6767186", "0.67598766", "0.67582536", "0.6751994", "0.6751994", "0.67506146", "0.67474914", "0.67472833", "0.6742553", "0.6740674", "0.6739787", "0.6739764", "0.6734993", "0.6728791", "0.6722976", "0.6711492", "0.6702885", "0.6701285", "0.6699219", "0.66975856", "0.6696155", "0.6692624", "0.6690379", "0.6688252", "0.66878986", "0.6687219", "0.6686069", "0.6685743", "0.6676371", "0.66637605", "0.6662552", "0.6654724", "0.665417", "0.66540325", "0.6651803", "0.665135", "0.6645978", "0.66427463", "0.664027", "0.6639863", "0.66377795", "0.6627328", "0.6625815", "0.6624425", "0.66242534", "0.6623736", "0.6621997", "0.6619973" ]
0.84088707
0
Determines which login page the user needs to be redirected to. Provides output to cls_sso_login_redirect() function.
Определяет, какую страницу входа необходимо перенаправить пользователю. Предоставляет выходные данные функции cls_sso_login_redirect().
function cls_sso_get_login_page($destination) { $passcode_login = cls_sso_check_path_for_passcode_page($destination); if ($passcode_login) { $login_page = "sso/passcode-login"; } else { $login_page = "sso/cas/process-user"; } if (preg_match('/^admissions\/jd\/admitted/', $destination)) { $login_page = "admissions/jd/admitted/login"; } if (preg_match('/^admissions\/graduate-legal-studies\/admitted/', $destination)) { $login_page = "admissions/graduate-legal-studies/admitted/login"; } if (preg_match('/^alumni\/reunion\/class\-photos/', $destination)) { $login_page = "sso/login-via-wind"; } if (preg_match('/^career\-services\/alumni/', $destination)) { $login_page = "sso/login-via-wind"; } return $login_page; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function login_redirect() {\n\n\t\t/**\n\t\t * this function is overwritten in the inheriting classes\n\t\t */\n\t}", "function cls_sso_login_redirect() {\n global $user;\n global $base_url;\n $destination = cls_sso_get_destination();\n $login_page = cls_sso_get_login_page($destination);\n if (module_exists('wind')) {\n $login_state = cls_sso_get_login_state();\n } else {\n $logged_in = cls_sso_check_login();\n }\n $login_page = (isset($_GET['force_sso']) && $_GET['force_sso'] == '1')?'sso/cas/process-user':$login_page;\n \n //Used to redirect user after successful authentication\n $_SESSION['destination_url'] = $destination;\n if (module_exists('wind')) {\n if ($login_state['logged_in']) {//User is logged in\n //Default behavior.\n } else if (!$login_state['ticket_id']){//User does not have a WIND ticket\n if (in_array($login_page, array(\"sso/cas/process-user\"))) {\n //Login through CAS SSO\n header('Location: ' . url($login_page, array('query' => array('destination' => \"sso/cas/process-user\"), 'absolute' => FALSE, 'alias' => TRUE)));\n }\n else if (in_array($login_page, array(\"sso/passcode-login\"))){\n //Login with passcode\n header('Location: ' . url($login_page, array('query' => array('destination' => drupal_get_path_alias($destination)), 'absolute' => FALSE, 'alias' => TRUE)));\n }\n else if (in_array($login_page, array(\"admissions/jd/admitted/login\"))){\n //Login with passcode\n header('Location: ' . url($login_page, array('query' => array('destination' => drupal_get_path_alias($destination)), 'absolute' => FALSE, 'alias' => TRUE)));\n }\n else if (in_array($login_page, array(\"admissions/graduate-legal-studies/admitted/login\"))){\n //Login with passcode\n header('Location: ' . url($login_page, array('query' => array('destination' => drupal_get_path_alias($destination)), 'absolute' => FALSE, 'alias' => TRUE)));\n }\n else if (in_array($login_page, array(\"sso/login-via-wind\"))){\n //Login with passcode\n header('Location: ' . url($login_page, array('absolute' => FALSE, 'alias' => TRUE)));\n }\n } else if ($login_state['authorized']){//User is authorized\n //Send WIND user to destination\n header('Location: ' . url($destination, array('query' => array(), 'absolute' => FALSE, 'alias' => TRUE)));\n } else {//User has a ticket, but is not authorized\n //Default behavior. User is sent to \"Access Denied\" page.\n }\n } else {\n if (!$logged_in) {\n if (in_array($login_page, array(\"sso/cas/process-user\"))) {\n //Login through CAS SSO\n header('Location: ' . url($login_page, array('query' => array('destination' => \"sso/cas/process-user\"), 'absolute' => FALSE, 'alias' => TRUE)));\n }\n else if (in_array($login_page, array(\"sso/passcode-login\"))) {\n //Login with passcode\n header('Location: ' . url($login_page, array('query' => array('destination' => drupal_get_path_alias($destination)), 'absolute' => FALSE, 'alias' => TRUE)));\n }\n else if (in_array($login_page, array(\"admissions/jd/admitted/login\"))) {\n //Login with passcode\n header('Location: ' . url($login_page, array('query' => array('destination' => drupal_get_path_alias($destination)), 'absolute' => FALSE, 'alias' => TRUE)));\n }\n else if (in_array($login_page, array(\"admissions/graduate-legal-studies/admitted/login\"))) {\n //Login with passcode\n header('Location: ' . url($login_page, array('query' => array('destination' => drupal_get_path_alias($destination)), 'absolute' => FALSE, 'alias' => TRUE)));\n }\n }\n }\n \n if ($user->uid) {\n return cls_sso_display_access_denied();\n }\n \n return;\n}", "public function getLoginPage()\n {\n return $this->loginPage;\n }", "function get_login_redirect() {\n global $aws_region;\n\n // Get the instance id for this by using instance metadata\n $instance_id = file_get_contents('http://169.254.169.254/latest/meta-data/instance-id/');\n\n // Need an Ec2Client\n $ec2 = new Ec2Client([\n 'region' => $aws_region,\n 'version' => 'latest'\n ]);\n\n // Get the tags for this instance id\n $result = $ec2->describeTags([\n 'Filters' => [\n [\n 'Name' => 'resource-id',\n 'Values' => [$instance_id, ],\n ],\n ],\n ]);\n\n // Username is stored in the tags with key -- 'analyserver-owner'\n for ($i=0; $i<count($result['Tags']); $i++) {\n if ($result['Tags'][$i]['Key'] == 'redirect-to-authserver') {\n $_SESSION['redirect_url'] = $result['Tags'][$i]['Value'];\n break;\n }\n }\n }", "public function redirect_to_login_page(){\n\t\tglobal $pagenow;\n\t\tif ( isset( $_SERVER['REQUEST_METHOD'] ) && $_SERVER['REQUEST_METHOD'] === 'GET' && $pagenow === 'wp-login.php' && ! is_user_logged_in() && tpe_auth_get_page_id( 'login' ) ) {\n\n\t $redirect_to = isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : null;\n\t if ( is_user_logged_in() ) {\n\t $this->redirect_user( $redirect_to );\n\t exit;\n\t }\n\n\t $login_url = $this->login_url;\n\n\t if ( ! empty( $redirect_to ) ) {\n\t $login_url = add_query_arg( 'redirect_to', urlencode( $redirect_to ), $login_url );\n\t }\n\n\t wp_redirect( $login_url ); exit;\n\t }\n\t}", "function symposium_redirect_login() {\n\tglobal $wpdb;\r\n\t$redirect = $wpdb->get_row($wpdb->prepare(\"SELECT enable_redirects, login_redirect, login_redirect_url FROM \".$wpdb->prefix . 'symposium_config'));\n\n\tif ( ($redirect->enable_redirects == 'on') && ($redirect->login_redirect != \"WordPress default\") ) {\n\t\tswitch($redirect->login_redirect) {\t\t\t\n\t\t\tcase \"Profile Wall\":\n\t\t\t\twp_redirect(symposium_get_url('profile'));\t\n\t\t\t\texit;\n\t\t\tcase \"Profile Settings\":\n\t\t\t\twp_redirect(symposium_get_url('profile').\"?view=settings\");\t\n\t\t\t\texit;\n\t\t\tcase \"Profile Personal\":\n\t\t\t\twp_redirect(symposium_get_url('profile').\"?view=personal\");\t\n\t\t\t\texit;\n\t\t\tcase \"Mail\":\n\t\t\t\twp_redirect(symposium_get_url('mail'));\t\n\t\t\t\texit;\n\t\t\tcase \"Forum\":\n\t\t\t\twp_redirect(symposium_get_url('forum'));\t\n\t\t\t\texit;\n\t\t\tcase \"Custom\":\n\t\t\t\twp_redirect($redirect->login_redirect_url);\t\n\t\t\t\texit;\n\t\t\tdefault:\n\t\t\t\twp_redirect(symposium_get_url('profile'));\t\n\t\t\t\texit;\n\t\t}\n\t}\n}", "function redirectToLogin()\n{\n // Get this page's URL\n $protocol = 'http';\n if (array_key_exists('HTTPS', $_SERVER) == true)\n {\n $protocol = 'https';\n }\n\n $redirect = urlencode($protocol . '://' . $_SERVER['SERVER_NAME'] . '/' . $_SERVER['REQUEST_URI']);\n\n header(\"Location: https://websso.it.northwestern.edu/amserver/UI/Login?goto=$redirect\");\n exit;\n}", "public function getLoginPage()\n {\n return str_replace(\n [\n '{COMPONENT_APPID}',\n '{PRE_AUTH_CODE}',\n '{REDIRECT_URI}',\n ],\n [\n $this->componentAppId,\n $this->preAuthCode->getPreAuthCode(),\n urlencode($this->redirectUri),\n ],\n static::COMPONENT_LOGIN_PAGE_URI\n );\n }", "protected function _loginPostRedirect()\n {\n $session = $this->_getSession();\n\n /*if (!$session->getBeforeAuthUrl() || $session->getBeforeAuthUrl() == Mage::getBaseUrl()) {\n // Set default URL to redirect customer to\n $session->setBeforeAuthUrl($this->_getHelper('customer')->getAccountUrl());\n // Redirect customer to the last page visited after logging in\n if ($session->isLoggedIn()) {\n if (!Mage::getStoreConfigFlag(\n Mage_Customer_Helper_Data::XML_PATH_CUSTOMER_STARTUP_REDIRECT_TO_DASHBOARD\n )) {\n $referer = $this->getRequest()->getParam(Mage_Customer_Helper_Data::REFERER_QUERY_PARAM_NAME);\n if ($referer) {\n // Rebuild referer URL to handle the case when SID was changed\n $referer = $this->_getModel('core/url')\n ->getRebuiltUrl($this->_getHelper('core')->urlDecodeAndEscape($referer));\n if ($this->_isUrlInternal($referer)) {\n $session->setBeforeAuthUrl($referer);\n }\n }\n } elseif ($session->getAfterAuthUrl()) {\n $session->setBeforeAuthUrl($session->getAfterAuthUrl(true));\n }\n } else {\n $session->setBeforeAuthUrl($this->_getHelper('customer')->getLoginUrl());\n }\n } elseif ($session->getBeforeAuthUrl() == $this->_getHelper('customer')->getLogoutUrl()) {\n $session->setBeforeAuthUrl($this->_getHelper('customer')->getDashboardUrl());\n } else {\n if (!$session->getAfterAuthUrl()) {\n $session->setAfterAuthUrl($session->getBeforeAuthUrl());\n }\n if ($session->isLoggedIn()) {\n $session->setBeforeAuthUrl($session->getAfterAuthUrl(true));\n }\n }*/\n\t\t\n\t\t$referer = $this->getRequest()->getParam(Mage_Customer_Helper_Data::REFERER_QUERY_PARAM_NAME);\n\t\tif ($referer) {\n\t\t\tif ($this->_isUrlInternal($referer)) {\n\t\t\t\t$session->setBeforeAuthUrl($referer);\n\t\t\t}\n\t\t}\n\n return $session->getBeforeAuthUrl(true);\n }", "public function LoginPage(){\n \\Hybrid_Auth::logoutAllProviders(); \n $loginPage = $this->getconfig('loginPage');\n if( $loginPage !== null){\n \\Hybrid_Auth::redirect($loginPage,\"PHP\");\n }\n //!TODO Make an alternative with loginList\n $this->loginList();\n exit;\n }", "function loginRedirect() {\n\t\t$this->getSession()->set('PPI_Login::returnUrl', $this->getFullUrl());\n\t\t$this->redirect('user/login');\n\t}", "public function login_before()\n {\n $passion = new Tempcode(); // Hidden fields\n\n // Where we will be redirected to after login, for GET requests (POST requests are handled further in the code)\n $redirect_default = get_self_url(true); // The default is to go back to where we are after login. Note that this is not necessarily the URL to the login module, as login screens happen on top of screens you're not allowed to access. If it is the URL to the login module, we'll realise this later in this code. This URL is coded to not redirect to root if we have $_POST, because we relay $_POST values and have intelligence (via $passion).\n $redirect = get_param_string('redirect', $redirect_default); // ... but often the login screen's URL tells us where to go back to\n $unhelpful_redirect = false;\n $unhelpful_url_stubs = array(\n static_evaluate_tempcode(build_url(array('page' => 'login'), '', null, false, false, true)),\n static_evaluate_tempcode(build_url(array('page' => 'login', 'type' => 'browse'), '', null, false, false, true)),\n static_evaluate_tempcode(build_url(array('page' => 'login', 'type' => 'login'), '', null, false, false, true)),\n static_evaluate_tempcode(build_url(array('page' => 'login', 'type' => 'logout'), '', null, false, false, true)),\n static_evaluate_tempcode(build_url(array('page' => 'login'), '_SELF', null, false, false, true)),\n static_evaluate_tempcode(build_url(array('page' => 'login', 'type' => 'browse'), '_SELF', null, false, false, true)),\n static_evaluate_tempcode(build_url(array('page' => 'login', 'type' => 'login'), '_SELF', null, false, false, true)),\n static_evaluate_tempcode(build_url(array('page' => 'login', 'type' => 'logout'), '_SELF', null, false, false, true)),\n );\n foreach ($unhelpful_url_stubs as $unhelpful_url_stub) {\n if (substr($redirect, 0, strlen($unhelpful_url_stub)) == $unhelpful_url_stub) {\n $unhelpful_redirect = true;\n break;\n }\n }\n if (($redirect != '') && (!$unhelpful_redirect)) {\n $passion->attach(form_input_hidden('redirect', $redirect));\n } else { // We will only go to the zone-default page if an explicitly blank redirect URL is given or if the redirect would take us direct to another login or logout page\n global $ZONE;\n $_url = build_url(array('page' => $ZONE['zone_default_page']), '_SELF');\n $url = $_url->evaluate();\n $passion->attach(form_input_hidden('redirect', $url));\n }\n\n // POST field relaying\n if (count($_FILES) == 0) { // Only if we don't have _FILES (which could never be relayed)\n $passion->attach(build_keep_post_fields($this->fields_to_not_relay));\n $redirect_passon = post_param_string('redirect', null);\n if (!is_null($redirect_passon)) {\n $passion->attach(form_input_hidden('redirect_passon', $redirect_passon)); // redirect_passon is used when there are POST fields, as it says what the redirect will be on the post-login-check hop (post fields prevent us doing an immediate HTTP-level redirect).\n }\n }\n\n // Lost password link\n if (get_forum_type() == 'cns' && !has_interesting_post_fields()) {\n require_lang('cns');\n $forgotten_link = build_url(array('page' => 'lost_password', 'wide_high' => get_param_integer('wide_high', null)), get_module_zone('lost_password'));\n $extra = do_lang_tempcode('cns:IF_FORGOTTEN_PASSWORD', escape_html($forgotten_link->evaluate()));\n } else {\n $extra = new Tempcode();\n }\n\n // It's just a session confirm to an existing cookie login, so we can make \"remember me\" ticked to avoid making user re-tick it\n if (!is_guest() && isset($_COOKIE[get_member_cookie()]) && !$GLOBALS['SESSION_CONFIRMED_CACHE']) {\n $_POST['remember'] = '1';\n }\n\n // Render\n $login_url = build_url(array('page' => '_SELF', 'type' => 'login'), '_SELF');\n require_css('login');\n $username = trim(get_param_string('username', ''));\n if (!is_guest()) {\n $username = $GLOBALS['FORUM_DRIVER']->get_username(get_member());\n if ($username === null) {\n $username = '';\n }\n }\n return do_template('LOGIN_SCREEN', array('_GUID' => '0940dbf2c42493c53b7e99eb50ca51f1', 'EXTRA' => $extra, 'USERNAME' => $username, 'JOIN_URL' => $GLOBALS['FORUM_DRIVER']->join_url(), 'TITLE' => $this->title, 'LOGIN_URL' => $login_url, 'PASSION' => $passion));\n }", "function get_redirect_page($event) {\n switch ($event) {\n case \"admin-only\":\n case \"disabled\":\n return \"/\";\n break;\n\n default:\n return NULL;\n }\n }", "public function getLoginRedirectUrl();", "public function login(){\r\n\t\t$returnTo = $this->input->get('returnTo');\r\n\t\t$re = !$returnTo ? site_url() . \"/page/overview\" : $returnTo;\r\n\r\n\t\t//SSO starts here\r\n\r\n\t\t$this->auth->login($re);\r\n\t}", "function _loginRedirect(){\n \t// send user to the login page\n \theader(\"Location:/login.php\");\n }", "function auth_redirect_map(){\n\tauth_redirect(link_to_signin_page(), is_signined(), '/'); // read like I want redirect from page '/auth/signin-page' to '/', but only if sign in fulfilled\n\tauth_redirect(link_to_signup_page(), is_signined(), '/');\n}", "static function getPageToReturnAfterLogIn(){\n if (!empty($_SESSION['return_after_login_path'])) {\n return $_SESSION['return_after_login_path'];\n }\n if (self::getLastPage()) {\n return self::getLastPage(true);\n }\n return self::getDefaultPage();\n }", "private function _loginPostRedirect()\n {\n $session = $this->_getSession();\n if ($referer = $this->getRequest()->getParam(Mage_Customer_Helper_Data::REFERER_QUERY_PARAM_NAME)) {\n $referer = Mage::helper('core')->urlDecode($referer);\n if ((strpos($referer, Mage::app()->getStore()->getBaseUrl()) === 0) ||\n (strpos($referer, Mage::app()->getStore()->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK, TRUE)) === 0)) {\n $session->setBeforeAuthUrl($referer);\n } else {\n $session->setBeforeAuthUrl(Mage::helper('customer')->getDashboardUrl());\n }\n } else {\n $session->setBeforeAuthUrl(Mage::helper('customer')->getDashboardUrl());\n }\n\n $this->_redirectUrl($session->getBeforeAuthUrl(TRUE));\n }", "public function redirectTo()\n {\n return config('bkstar123_bkscms_adminpanel.default_authenticated_page');\n }", "public function setRedirectOnLogin(){\n\t\t$_path = (string) $this->_getConfigValue('path_redirect');\n\t\treturn Mage::getUrl($_path);\n\t}", "function redirect()\n\t{\n\t\tif (!$this->IDPList)\n\t\t{\n\t\t\t$idp_list = $this->getIDPList();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$idp_list = $this->IDPList;\n\t\t}\n\t\t\n\t\t// Where to return after the authentication process\n\t\t$target = trim(ILIAS_HTTP_PATH, '/').'/shib_login.php?target='.$_POST[\"il_target\"];\n\t\t\n\t\t$idp_data = $idp_list[$this->selectedIDP];\n\t\tif (isset($idp_data[1]))\n\t\t{\n\t\t\tilUtil::redirect($idp_data[1].'?providerId='.urlencode($this->selectedIDP).'&target='.urlencode($target));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// TODO: This has to be changed to /Shibboleth.sso/DS?entityId= for \n\t\t\t// Shibbolet 2.x sometime...\n\t\t\tilUtil::redirect('/Shibboleth.sso?providerId='.urlencode($this->selectedIDP).'&target='.urlencode($target));\n\t\t}\n\t\t\n\t}", "public function getLoginRedirect()\n {\n return [\"/\"];\n }", "public function getLoginRedirectRoute();", "function redirectLogin()\n{\n\tglobal $CONFIGVAR;\n\n\t$ajax->redirect('/' . $CONFIGVAR['html_login_page']['value']);\n\texit;\n}", "abstract function getLogoutRedirect();", "public function outputLoginUrl()\n\t{\n\t\techo App::e($this->app->uri->getLogin());\n\t}", "function isLogin($next_page = ''){\r\n\tglobal $_conf_vars, $db;\r\n\t$clt_id = checkUserLogin();\r\n\tif(isEmpty($clt_id)){\r\n\t\tif(!isEmpty($next_page)) $_SESSION['NEXT_PAGE'] = $next_page;\r\n\t\tRedirect_To($_conf_vars['USER'].\"/\".$_conf_vars['LOGIN'].$_conf_vars['FILE_EXTN']);\r\n\t}\r\n\telse return $clt_id;\r\n}", "public static function redirect_to_login_prompt($returnURL = \"\");", "public function redirectToWpLoginPage() {\n\t\t$url = $this->wpAuthenticator->getWpLoginPageUrl();\n\t\t$this->redirectUrl($url);\n\t}", "function my_login_redirect( $redirect_to, $user_id ) {\n return home_url( '/?page_id=7' );\n\n}", "public static function get_redirect_to()\n {\n // At query string\n $redirect_to = Request::input( 'redirect_to', home_url( '/' ) );\n // At SESSION\n if ( isset( $_SESSION[ 'redirect_me_back' ] ) )\n $redirect_to = $_SESSION[ 'redirect_me_back' ];\n // Apply filters\n return apply_filters(\n 'addon_loginpage_redirect_to',\n $redirect_to\n );\n }", "function loginpage_hook() {\n global $frm;\n global $CFG;\n global $SESSION, $OUTPUT, $PAGE;\n\n if (isloggedin()) {\n if (!empty($SESSION->wantsurl)) {\n redirect($SESSION->wantsurl);\n }\n redirect($CFG->wwwroot);\n }\n\n // Return if digicode auth is not enabled.\n if (empty($this->config->enabled)) {\n return;\n }\n\n // Return if no session running or in prerun.\n if (!$activesession = $this->has_valid_session()) {\n return;\n }\n\n $site = get_site();\n\n $digicodethrough = optional_param('authDC', 'DC', PARAM_TEXT);\n if ($digicodethrough != 'DC') {\n return;\n }\n\n $username = optional_param('username', false, PARAM_TEXT);\n $password = optional_param('password', false, PARAM_TEXT);\n $password = preg_replace('/[^0-9]/', '', $password); // Trim out all non strictly digits.\n\n if (!empty($username)) {\n if ($this->user_login($username, $password)) {\n // Give back to the real authentifcation process. come back to user_login.\n redirect($CFG->wwwroot);\n }\n }\n\n // If digicode is enabled, we divert to a special form with digicode input.\n $digicodeformurl = new moodle_url('/auth/digicode/login.php', array('sessionid' => $activesession->id, 'sesskey' => sesskey()));\n redirect($digicodeformurl);\n }", "public function getLoginURL() {\n\n if( !$this->oFB ) {\n return false;\n }\n\n $oHelper = NULL;\n $oHelper = $this->oFB->getRedirectLoginHelper();\n\n return $oHelper->getLoginUrl(\n self::getOAuthRedirectUrl()\n , ['manage_pages','publish_pages']\n );\n }", "function login_redirect() {\n\tif ( ! is_user_logged_in() ) {\n\t\tauth_redirect();\n\t}\n}", "protected function redirectTo()\n {\n if(Auth::user()->user_type=='gud'){\n return 'gudhome' ;\n }else if(Auth::user()->user_type=='drv')\n {\n return 'drvhome' ;\n }else if(Auth::user()->user_type=='eqp')\n {\n return 'eqphome' ;\n \n }else {\n return 'home';\n }\n }", "public function redirectToLogin() {\n\t\tHttpResponse::redirect($this->loginURL, array('returnURL' => $_SERVER['REQUEST_URI']));\n\t}", "private function redirectToIndexIfLoginPage(string $reqPage)\n {\n switch ($reqPage) {\n case 'login.php':\n case 'trylogin.php':\n $this->url->redirect(\"{$this->folder}/index.php\");\n break;\n default:\n // No redirect, the page will be loaded\n break;\n }\n }", "public function i4_login_redirect() {\n\n if (!is_user_logged_in()) { //Redirect the user if they are not authenticated\n auth_redirect();\n }\n }", "function custom_login_permalink() {\n\t\t$login_url = get_theme_mod('capstone_auth_login_page') ? get_permalink(get_theme_mod('capstone_auth_login_page')) . '?redirect_to=' . get_permalink() : wp_login_url( get_permalink() );\n\t\techo sprintf( __( 'You must <a href=\"%s\">sign in</a> to apply for this position.', 'capstone' ), $login_url );\n\t}", "private function external_login_redirect() {\n $this->session_return_url( 'set' );\n $this->redirect_to( $this->external_site_url( $this->options['ext_site_redirector_path'] ) . \"?redirect=\" . $this->current_page() );\n }", "public function loginRedirect()\n {\n //OBTENEMOS LOS DATOS DEL USUARIO LOGUEADO\n $userinfo = $this->Auth->user();\n //COMPROBAMOS SU ROL Y REDIRECCIONAMOS SEGUN EL CUAL SEA\n switch ($userinfo['Usuario']['rol']) {\n case ConstantesRoles::CLIENTE:\n $this->redirect(array('controller' => 'clientes', 'action' => 'index'));\n break;\n case ConstantesRoles::EMPRESA:\n $this->redirect(array('controller' => 'empresas', 'action' => 'index'));\n break;\n case ConstantesRoles::ADMIN:\n $this->redirect(array('controller' => 'admins', 'action' => 'index'));\n break;\n }\n }", "protected function redirectToLogin() {\n\t\t$data['location'] = 'login/';\n\t\t\t\t\t\t\n\t\t// redirect and die\n\t\t$this->_view->render('redirect', $data);\n\t}", "public function userPage() {\n if ($this->currentUser()->isAuthenticated()) {\n return $this->redirect('entity.user.canonical', ['user' => $this->currentUser()->id()]);\n }\n else {\n return $this->redirect('sfgov_user.start_page');\n }\n }", "function login_page_redirection() \n{\t\n\t$_SERVERHTTP_HOST = $_SERVER[HTTP_HOST];\n\t$_SERVERREQUEST_URI = $_SERVER[REQUEST_URI];\t\n\t$theRequest = \"http://\".$_SERVERHTTP_HOST .\"\".$_SERVERREQUEST_URI;\t\n\t$theRequest = explode( \"?\" , $theRequest );\t\n\tif ( site_url('/wp-login') == $theRequest[0] || site_url('/wp-login.php') == $theRequest[0] ) \n\t{\t\n\t\t$url = site_url('/404.php');\n\t\t/*\n\t\tif (wp_redirect($url))\n\t\t{\n\t\t exit;\n\t\t}\n\t\t*/\n\t\techo \"<script>window.location.href = '\".$url.\"';</script>\";\t\t\n\t} \n}", "public function getLoginRedirectRoute()\r\n {\r\n return $this->loginRedirectRoute;\r\n }", "public function redirectToLoginPage()\n\t{\n\n\t\t$loginUrl = $this->_urlInterface->getUrl(\n\t\t\t'customer/account/login'\n\t\t);\n\t\t$currentUrl = $this->_urlInterface->getCurrentUrl();\n\n\t\tif ($loginUrl !== $currentUrl) {\n\n\t\t\t$messageToConnect = 'Veuillez vous connecter à votre compte client B2B pour voir ce magasin';\n\t\t\t// add a message to the flashbag message\n\t\t\t$this->_messageManager->addWarning(__($messageToConnect));\n\t\t\t// redirect to the login url\n\t\t\t$this->_response->setRedirect($loginUrl);\n\t\t}\n\t}", "public function getRedirect();", "public function redirectTo()\n {\n if(Auth::user()->role_as == '1') //1 = Admin Login\n {\n return 'dashboard';\n }\n elseif(Auth::user()->role_as == '0') // Normal or Default User Login\n {\n return '/stemadd';\n }\n }", "function redirectPortal()\n{\n\tglobal $CONFIGVAR;\n\tglobal $dbconf;\n\tglobal $herr;\n\tglobal $ajax;\n\n\tswitch ($_SESSION['portalType'])\n\t{\n\t\tcase 0:\n\t\t\t$ajax->redirect('/modules/' . $CONFIGVAR['html_gridportal_page']['value']);\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\t$ajax->redirect('/modules/' . $CONFIGVAR['html_linkportal_page']['value']);\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\t$ajax->redirect('/application/' . $CONFIGVAR['html_appportal_page']['value']);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$ajax->redirect('/modules/' . $CONFIGVAR['html_gridportal_page']['value']);\n\t\t\tbreak;\n\t}\n\texit;\n}", "public function gluu_sso_login_url()\n\t{\n $config = $this->config('gluu_sso.default');\n\t\t$openidurl=$config->get('openidurl');\n\t\t$oxd_port=$config->get('oxd_port');\n\t\t$user_acr=$config->get('user_acr');\n $oxd_id=$config->get('gluu_oxd_id');\n\t\t$scopes=$config->get('gluu_scopes');\n $gluu_config=$config->get(\"gluu_config\");\n $base_url=self::gluu_sso_getbaseurl();\n if($oxd_id =='')\n {\n drupal_set_message('Please check your admin settings');\n $response = new RedirectResponse($base_url);\n $response->send();\n return;\n }\n else {\n\n $get_authorization_url = new Get_authorization_url();\n $get_authorization_url->setRequestOxdId($oxd_id);\n $get_authorization_url->setRequestScope($gluu_config['scope']);\n $get_authorization_url->setRequestAcrValues(array($user_acr));\n $get_authorization_url->request();\n header(\"Location: \".$get_authorization_url->getResponseAuthorizationUrl());\n\t\t exit;\n }\n\t}", "protected function redirectTo()\n {\n switch (Auth::guard($this->guard)->user()->type()) {\n case 'cso':\n return '/cso/home';\n break;\n case 'donor':\n return '/donor/home';\n break;\n\n default:\n return '/';\n break;\n }\n }", "function redirect_login_page() {\n $login_page = home_url( '/' );\n $page_viewed = basename($_SERVER['REQUEST_URI']);\n \n if( $page_viewed == \"wp-login.php\" && $_SERVER['REQUEST_METHOD'] == 'GET') {\n wp_redirect($login_page);\n exit;\n }\n}", "function ds_login_redirect( $redirect_to, $request, $user ) {\n\t//is there a user to check?\n\tglobal $user;\n\tif ( isset( $user->roles ) && is_array( $user->roles ) ) {\n\t\t//check for admins\n\t\tif ( in_array( 'administrator', $user->roles ) ) {\n\t\t\t// redirect them to the default place\n\t\t\treturn $redirect_to;\n\t\t} else {\n\t\t\treturn home_url();\n\t\t}\n\t} else {\n\t\treturn $redirect_to;\n\t}\n}", "abstract public function getRedirectUrl();", "public function showLoginPage()\n {\n $redirect =\"/admin\"; //\\Wh::instring('/login', $intended ) ? \"/admin\" : $intended;\n //return $redirect; \n return \\Auth::check()? redirect($redirect) : view('standart.auth.login');\n }", "protected function redirect_login_page() {\n redirect($this->get_login_action(), 'refresh');\n }", "function learn_press_get_login_url( $redirect = null ) {\n\t$url = wp_login_url( $redirect );\n\t$profile_page = learn_press_get_page_link( 'profile' );\n\n\tif ( 'yes' === LP()->settings()->get( 'enable_login_profile' ) && $profile_page ) {\n\t\t$parse_url = parse_url( $url );\n\t\t$url = $profile_page . ( ! empty( $parse_url['query'] ) ? '?' . $parse_url['query'] : '' );\n\t}\n\n\treturn apply_filters( 'learn-press/login-url', $url );\n}", "function markcond_login_url() { return home_url(); }", "public static function login_url($returnURL = \"\");", "private function executeRedirectRules()\n\t{\n\t\tif($this->redirect_to_maintenance_page())\n\t\t{\n\t\t\treturn self::MAINTENANCE_URL;\n\t\t}\n\t\t\n\t // Test if forced login is in effect\n\t\tif($this->redirect_to_login_page())\n\t\t{\n\t\t\treturn self::LOGIN_URL;\n\t\t}\n\t\t\n\t\t// Test if the route exists\n\t\tif($this->redirect_to_404())\n {\n \treturn self::ERROR_404_URL;\n\t }\n\t\t\n\t // Test if route is enabled\n\t\tif($this->redirect_to_403())\n\t\t{\n\t\t\treturn self::ERROR_403_URL;\n\t\t}\n\n\t\t// Test if there are user specific reroute rules in effect\n\t\tif($sRedirectUrl = $this->redirect_to_user_specific_rule())\n\t\t{\n\t\t\treturn $sRedirectUrl;\n\t\t}\n\n\t\t// Check for site specific permanent redirection\n\t\tif($sRedirectUrl = $this->redirect_to_301())\n\t\t{\n\t\t\t//@todo: denne er nyttig hvis jeg endrer noe i url syntaxen. Jeg lagrer den gamle i databaesn, og returnerer denne koden. View må få vite om disse ulike response kodene på en eller annen måte.\n\t\t\treturn $sRedirectUrl;\n\t\t}\n\t}", "public function redirect_wp_login()\n\t{\n\t\tif ( 'wp-login.php' == $GLOBALS['pagenow'] )\n\t\t{\n\t\t\t$redirect_url = $this->new_login_url();\n\n\t\t\tif (! empty($_REQUEST['action']) )\n\t\t\t{\n\t\t\t\tif ( 'rp' == $_REQUEST['action'] || 'resetpass' == $_REQUEST['action'] ) {\n\t\t\t\t\treturn;\n\t\t\t\t} elseif ( 'lostpassword' == $_REQUEST['action'] ) {\n\t\t\t\t\t$redirect_url = add_query_arg( 'action', 'passworderror', $this->new_login_url() );\n\t\t\t\t} elseif ( 'register' == $_REQUEST['action'] ) {\n\t\t\t\t\t$page = get_page_by_path('register');\n\t\t\t\t\tif ( $page ) $redirect_url = get_permalink($page->ID);\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif (! empty($_REQUEST['loggedout']) )\n\t\t\t{\n\t\t\t\t$redirect_url = add_query_arg('action', 'loggedout', $this->new_login_url());\n\t\t\t}\n\n\t\t\twp_redirect( $redirect_url );\n\t\t\texit;\n\t\t}\n\t}", "public function getLoginUrl()\n\t{\n\t\t$scope = implode(\",\", $this->permArray);\n\t\t$loginUrl = 'https://www.facebook.com/dialog/oauth/?scope='.$scope.'&client_id='.$this->appID.'&redirect_uri='.$this->appPage;\n\t\theader('Location: '.$loginUrl);\n\t}", "public function getLoginPageUrl(\r\n\t\t\t$returnURL);", "static function processSuccessfullLogin(){\n Utils::processActionsWithRedirects();\n }", "public static function redirect_ToLogin($bool_UseSecure = true)\r\n\t{\n\t\tcSession::setLastUrl(self::get_PageURL());\n\n\t\tswitch (self::$m_int_LoginType)\n\t\t{\n\t\t\tcase self::C_INT_LOGIN_TYPE_CUSTOM :\n\n\t\t\t\t$str_LoginUrl = \"http\";\r\n\t\t\t\tif ($bool_UseSecure)\r\n\t\t\t\t{\r\n\t\t\t\t\t$str_LoginUrl .= \"s\";\r\n\t\t\t\t}\r\n\t\t\t\t$str_LoginUrl .= \"://\" . $_SERVER[\"SERVER_NAME\"];\r\n\t\t\t\tif (!$bool_UseSecure)\r\n\t\t\t\t{\r\n\t\t\t\t\t$str_LoginUrl .= \":\" . $_SERVER[\"SERVER_PORT\"];\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$str_LoginUrl .= self::getLogInUrl();\r\n\r\n\t\t\t\t@header('Location: ' . $str_LoginUrl);\r\n\t\t\t\t// \t\t\t\tdie();\n\t\t\t\treturn;\n\t\t\tcase self::C_INT_LOGIN_TYPE_HTTP:\n\t\t\t\tself::httpLogin();\n\t\t\t\tbreak;\n\t\t}\r\n\t}", "public function get_login_url() { }", "protected function redirectTo(){\n $user = Auth::user();\n\n if( $user->role == 'ADMIN'){\n return url('administration');\n }\n\n if( $user->role == 'MOD'){\n return url('moderation');\n }\n\n return url('homepage');\n }", "function redirect_to_login() {\n\tredirect('login?redirect='.urlencode(current_url()));\n}", "private function _redirect(){\n\t\t// do not allow login when user is already logged in\n\t\tif($this->helper->isUserLoggedIn())\n\t\t\t$this->helper->defaultRedirect();\n\n\t\t// set return to\n\t\t$returnTo = !empty($_GET['returnto']) ? $_GET['returnto'] : '';\n\t\t$this->helper->setSessionData('returnTo',$returnTo);\n\n\t\t$source = $this->helper->getSource();\n\t\t$oauth = $this->helper->getOAuthObj($source);\n\t\tif($source == 'qq'){\n\t\t\t$state = md5(microtime(true) . $this->helper->createRandomString(8));\n\t\t\t$this->helper->setSessionData('qqLoginState',$state);\n\t\t\t$oauth->setState($state);\n\t\t}\n\t\t$redirectUrl = $oauth->getRedirectUrl();\n\t\theader(\"Location: $redirectUrl\",true ,302);\n\t}", "public function getRedirectTo();", "public static function RedirectToLogin() {\n\t\t\tQApplication::Redirect('/login/?strReferer=' . urlencode(QApplication::$RequestUri));\n\t\t}", "protected function getRedirectUrl()\n {\n switch ($this->property('redirect')) {\n case 'payment':\n return $this->controller->pageUrl(GeneralSettings::get('checkout_page'), ['page' => 'payment']);\n case 'quickCheckout':\n return $this->controller->pageUrl(GeneralSettings::get('checkout_page'), ['step' => 'overview']);\n case 'account':\n return $this->controller->pageUrl(GeneralSettings::get('account_page'), ['page' => 'addresses']);\n default:\n return $this->controller->pageUrl(GeneralSettings::get('checkout_page'), ['step' => 'confirm']);\n }\n }", "protected function redirectTo()\n {\n $authed = User::find(Auth::user()->id);\n\n if ($authed->details->type->id == UserType::ADMIN_USER_TYPE)\n {\n return RouteServiceProvider::ADMIN;\n }\n else if ($authed->details->type->id == UserType::COMPANY_USER_TYPE)\n {\n return RouteServiceProvider::COMPANY;\n }\n else if ($authed->details->type->id == UserType::COMPANY_USER_TYPE)\n {\n return RouteServiceProvider::HOME;\n }\n\n return RouteServiceProvider::INDEX;\n }", "function pre_login()\n {\n parent::pre_login();\n\n if (empty($_REQUEST['no_saml'])) {\n SugarApplication::redirect('?entryPoint=SAML');\n }\n }", "public function getLoginRedirectionTargetURL()\n {\n return $this->getValue('nb_site_lang_login_redirection_target_url');\n }", "function _get_redirect_url()\n\t{\n\t\tif ($this->_fetch_param('return'))\n\t\t{\n\t\t\treturn str_replace(SLASH,'/',$this->_fetch_param('return')); \n\t\t}\n\t\telseif ($this->_fetch_param('redirect'))\n\t\t{\n\t\t\treturn str_replace(SLASH,'/',$this->_fetch_param('redirect')); \n\t\t}\n\t\treturn FALSE; \n\t}", "function loginpage_hook() {\n global $DB;\n\n if (!isloggedin()) {\n if (isset($_SERVER['PHP_AUTH_USER']) &&\n isset($_SERVER['PHP_AUTH_PW'])) {\n\n $username = htmlspecialchars($_SERVER['PHP_AUTH_USER']);\n $password = htmlspecialchars($_SERVER['PHP_AUTH_PW']);\n\n // User existence check\n if ($user = $DB->get_record( 'user', array( 'username' => $username) )) {\n\n // Verification of authorization data\n if (validate_internal_user_password($user, $password)) {\n complete_user_login($user);\n $this->redirect_user();\n } else {\n // Authentication data verification error\n $this->authorization_window();\n }\n } else {\n // User search failed\n $this->authorization_window();\n }\n } else {\n // Authorization data is missing\n $this->authorization_window();\n }\n }\n }", "protected function login_redirect() {\n $url = wp_login_url($_SERVER['REQUEST_URI']);\n wp_redirect($url);\n exit;\n }", "public function redirectTo() {\n\n if (Auth::user()->mudou_senha == 0) {\n return '/primeiroacesso';\n } else {\n \n if(Auth::user()->permissao >= 1 && Auth::user()->permissao <= 8) {\n return '/etapaano';\n } elseif(Auth::user()->permissao == 9) {\n return 'admin';\n }\n }\n }", "public function login($redirect_url=NULL);", "private function getLoginPage()\n {\n // Set the login page\n $this->loginPage = $this->loginPage ?? $this->getClient()->get($this->loginUrl);\n\n return $this->loginPage;\n }", "public function getLogin()\n\t{\n\t\tif(self::session()):\n\n\t\t\treturn self::go('index');\n\n\t\telse:\n\n\t\t\tself::addArgument('msg_error', Session::get('msg_error'));\n\n\t\t\tself::addArgument('msg_warning', Session::get('msg_warning'));\n\n\t\t\tself::addArgument('msg_success', Session::get('msg_success'));\n\n\t\t\tself::addArgument('redirect_to', Session::get('redirect_to'));\n\n\t\t\treturn self::make('login');\n\t\t\t\n\t\tendif;\n\t}", "function iconic_login_redirect( $redirect, $user ) {\n return home_url( '/' );\n}", "function sylr_wc_login_redirect($redirect_to, $user) {\n \n $output_url = $redirect_to; \n \n // Check if default URL given\n $login_redirect_url = get_option('sy_default_login_url'); \n if($login_redirect_url!='') { \n $output_url = $login_redirect_url;\n } \n \n // Check User Roles\n\tif ( isset( $user->roles ) && is_array( $user->roles ) ) {\n \n $user_roles = $user->roles; \n $syrl_user_roles = get_option('sy_user_roles'); \n \n // Check User Role Admin \n\t\tif ( in_array( 'administrator', $user_roles ) ) {\n // Redirect Admin To Default Place\n \n\t\t\t$output_url = $redirect_to;\n \n\t\t} else {\n if(is_array($syrl_user_roles) && !empty($syrl_user_roles)) {\n \n foreach($syrl_user_roles as $syrl_user_role) {\n if ( in_array( $syrl_user_role, $user_roles ) ) {\n $sy_login_url = get_option('sy_login_url_'.$syrl_user_role);\n if($sy_login_url!='') { \n $output_url = $sy_login_url; \n } \n }\n }\n \n }\n\t\t}\n\t}\n \n return $output_url; \n \n }", "public function redirectTo() {\n $role = Auth::user()->roles()->first()->role; \n switch ($role) {\n case 'Admin':\n return '/admin';\n break;\n case 'User':\n return '/normal';\n break; \n case 'Lab':\n return '/lab';\n break; \n default:\n return '/login'; \n break;\n }\n }", "function redirect_user ($page = 'jax-blog/login.php') {\n $url = 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER)['PHP_SELF'];\n $url = rtrim($url, '/\\\\');\n $url .= '/' . $page;\n header(\"Location: $url\");\n exit();\n }", "public function loginUrl()\n\t{\n\t\tif (isset($this->file->login) && $this->file->login) {\n\t\t\tdefine(\"USER_LOGIN\", $this->file->login);\n\t\t}\n\t}", "function webdraftertheme_login_url() { return home_url(); }", "static function loginRedirectCheck()\n\t{\n\t\tif(isset($_SESSION['user']))\n\t\t{\n \tUtil::redirect(\"/\");\n \tdie();\n \t}\n }", "protected function redirectTo()\n {\n switch (Auth::user()->user_type) {\n case 'Admin':\n return redirect(\"/admin/home\");\n break;\n \n case 'Secretary':\n return redirect(\"/secretary/home\");\n break;\n \n case 'Suppliers':\n return redirect(\"/supplier/home\");\n break;\n \n case 'Client':\n return redirect(\"/client/home\");\n break;\n\n default:\n return redirect(\"/404\");\n break;\n }\n }", "public function actionLoggedRedirect()\n\t{\n\t\tif(isset(Yii::app()->user->id)){\n \t$adminRules = User::adminRoles();\n\t\t\t$userRole = Yii::app()->user->role;\n\t\t\t$urlModule = in_array($userRole, $adminRules)? 'admin': str_replace(\"role_\",\"\",$userRole);\n $this->redirect(Yii::app()->baseurl.\"/\".$urlModule);\n\t\t}else{\n\t\t\t$this->redirect(Yii::app()->baseurl.\"/\");\n\t\t}\n\t}", "public function getPage() { \n if (Auth::check()) {\n return redirect()->route('home');\n }\n else {\n return redirect()->route('login');\n }\n }", "private function _redirect()\n {\n $sessionUser = $this->session->{$this->findBy};\n $redirectTo = $this->_getAccessRole($sessionUser)->redirectPage;\n header(\"location: \" . $redirectTo);\n }", "protected function getLoginUrl()\n {\n }", "private static function __isPageLogin() {\n\t\t$params = Router::getParams();\n\n\t\treturn (\n\t\t\t!empty($params['controller']) && 'users' == $params['controller']\n\t\t\t&& !empty($params['action']) && 'login' == $params['action']\n\t\t);\n\t}", "public function redirectPath()\n {\n if (property_exists($this, 'redirectPath')) {\n return $this->redirectPath;\n }\n //later, may put in check for user type here, and then redirect appropriately?\n return property_exists($this, 'redirectTo') ? $this->redirectTo : '/home';\n }", "function authForwardTo()\n{\n\t\n\tif(isset($_POST['goThere']))\n\t{\n\t\t$forwardTo=filter_input(INPUT_POST,'authSection',FILTER_SANITIZE_STRING);\n\t\t\n\t\t# Decide which page to send the user\n\t\tif('handover'==$forwardTo)\n\t\t{\n\t\t\theader('Location: ./authHome');\t\t\n\t\t}\n\t\telse if('handoverAdmin'==$forwardTo)\n\t\t{\n\t\t\theader('Location: ./authAdmin');\t\n\t\t}\n\t\telse if('dashboardAdmin'==$forwardTo)\n\t\t{\n\t\t\theader('Location: ./authDashAdmin');\t\n\t\t}\n\t\telse if('dashboardClient'==$forwardTo)\n\t\t{\n\t\t\theader('Location: ./dashClient');\t\n\t\t}\n\t}\n}", "function redirectPortal()\n{\n\tglobal $CONFIGVAR;\n\tglobal $ajax;\n\n\tif (isset($_SESSION['passChange']))\n\t{\n\t\tif ($_SESSION['passChange'] == true)\n\t\t\thandleError('Cannot Continue: Your password must be changed.');\n\t}\n\telse\n\t{\n\t\tif ($_SESSION['method'] == 0)\n\t\t{\n\t\t\thandleError(\"Internal Error: Password change flag missing.\");\n\t\t}\n\t}\n\t$_SESSION['banner'] = true;\n\tswitch((int)$_SESSION['portalType'])\n\t{\n\t\tcase 0:\n\t\t\t$ajax->redirect('/modules' . '/' . $CONFIGVAR['html_gridportal_page']['value']);\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\t$ajax->redirect('/modules' . '/' . $CONFIGVAR['html_linkportal_page']['value']);\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\t$ajax->redirect('/application' . '/' . $CONFIGVAR['html_appportal_page']['value']);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\thandleError('Invalid redirect. Contact your administrator.');\n\t\t\tbreak;\n\t}\n}", "public function getRedirectUrl()\n {\n // Leave it for the applicatino to decide where to sent the user.\n return;\n }" ]
[ "0.699047", "0.6747382", "0.66408", "0.6638594", "0.6606087", "0.6519883", "0.6518924", "0.651142", "0.6472059", "0.64655703", "0.63646764", "0.6308026", "0.6307745", "0.62875676", "0.6285324", "0.62714416", "0.6270691", "0.62553805", "0.62547374", "0.6254275", "0.62476355", "0.623139", "0.6228737", "0.6218545", "0.62143177", "0.6204334", "0.61737883", "0.6173189", "0.61622727", "0.6156656", "0.61362076", "0.61306494", "0.6123405", "0.6103844", "0.61011904", "0.60991037", "0.6098045", "0.60744953", "0.6068511", "0.605182", "0.6050572", "0.6046497", "0.6039135", "0.6037093", "0.59845155", "0.59668154", "0.5962004", "0.59612125", "0.59530133", "0.5939678", "0.5924382", "0.5914448", "0.5909427", "0.59068", "0.589203", "0.58909315", "0.5879087", "0.587772", "0.5876988", "0.5853112", "0.58507574", "0.5849884", "0.58469737", "0.5844871", "0.58431166", "0.5830215", "0.58296365", "0.58271444", "0.58239985", "0.58170086", "0.5794367", "0.5791834", "0.57855064", "0.57820886", "0.5780912", "0.57791305", "0.5778776", "0.57670337", "0.5764846", "0.57607365", "0.5758978", "0.57576543", "0.57532716", "0.5743393", "0.5740723", "0.57368535", "0.573407", "0.5721974", "0.5716305", "0.5711907", "0.5708501", "0.57040983", "0.5697578", "0.56932986", "0.56931734", "0.5684188", "0.56829077", "0.5673397", "0.566474", "0.5655161" ]
0.72032696
0
Displays custom page not found message.
Отображает кастомное сообщение о не найденной странице.
function cls_sso_display_page_not_found() { return "<h4>Requested page is not found.</h4>"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function page_not_found(){\n\t\t\n\t\t//Set title\n\t\t$this->data['title'] = \"404! Page not found!\";\n\t\n\t\t//Render 404 page\n\t\t$this->_render_page_view('404',$this->data);\n\t\t\n\t\t//End!\n\t\treturn;\n\t\n\t}", "function PageNotFound()\n {\n $this->tpl->assign('Page', array('Content' => 'Page not found on this server!', 'Title' => '404 : Page not found'));\n $this->tpl->display('page.error');\n }", "protected function defaultNotFound() {\n\t\techo static::generateTemplateMarkup('404 Page Not Found', '<p>The page you are looking for could not be found. Check the address bar to ensure your URL is spelled correctly. If all else fails, you can visit our home page at the link below.</p><a href=\"' . $this->request->getRootUri() . '/\">Visit the Home Page</a>');\n\t}", "public function PageNotFound(){\n\n\t\t\t$content[\"icon\"] = \"warning\";\n\t\t\t$content[\"message\"] = \"Error 404: Page not found!\";\n\t\t\t$content[\"buttonText\"] = \"Go to Home\";\n\t\t\t$content[\"buttonLink\"] = base_url();\n\n\t\t\t$this->loadPageLayout(\"pages/InfoMessage\", $content);\n\n\t\t}", "function pageNotFound()\n {\n $this->global['pageTitle'] = MYAPP_NAME.' : 404 - Page Not Found';\n \n $this->loadViews(\"404\", $this->global, NULL, NULL);\n }", "public function pageNotFound(){\n $this->viewError->pageNotFound();\n }", "function pageNotFound()\n {\n $this->global['pageTitle'] = 'Carver Consulting Inc : 404 - Page Not Found';\n \n $this->loadViews(\"404\", $this->global, NULL, NULL);\n }", "public function page_not_found() {\n\t\t$this->page_data['page_name'] = 'page_not_found';\n\t\t$this->page_data['page_view'] = 'page_not_found';\n\t\t$this->page_data['page_title'] = '404 page not found';\n\t\t$this->load->view('index', $this->page_data);\n\t}", "function pageNotFound()\n {\n $this->global['pageTitle'] = '404 - Page Not Found';\n \n $this->loadViews(\"404\", $this->global, NULL, NULL);\n }", "public function page404(){\n $this->_app->render('common/404.html', [\n 'page' => [\n 'author' => $this->_app->site->author,\n 'title' => \"404 Error\",\n 'description' => \"We couldn't deliver. We're sorry.\"\n ]\n ]);\n }", "protected function notFound()\n\t{\n\t\tif (_PS_VERSION_ < '1.5')\n\t\t\tTools::display404Error();\n\t\telse\n\t\t\tController::getController('PageNotFoundController')->run();\n\t}", "public function notFound()\n {\n return $this->renderPage('404.html', [], [], 404);\n }", "private function pageNotFound() {\n\n http_response_code(404);\n echo \"page recherchée introuvable\";\n }", "public function _custom_404($message=NULL)\n {\n header(\"HTTP/1.0 404 Not Found\");\n $this->serve_page_cache('404_not_found');\n \n if(empty($message))\n $message = 'This Page does not exist<br/>Please ensure the page name was spelled correctly. Thank you!';\n \n $this->template->set_global('title', 'Page Not Found.');\n $this->save_page_as = '404_not_found';\n $this->to_browser($message, 'master', FALSE);\n }", "public function action_404()\n\t{\n\t\t\n\t\t$this->template->html_head->title = __(\"page not found - 404\");\n\t\t$this->template->content = View::factory('error/404');\n\t\t$this->template->content->errors = array();\n\n\t}", "public function page_not_found()\n\t{\n\t\t$this->load->view('templates/404.php');\n\t\t$this->load->view('templates/site_footer');\n\t}", "public function notFoundAction(): void\n {\n $this->viewRenderer->addViewConfig('page', 'notfound');\n\n $this->viewRenderer->renderTemplate();\n }", "public function show404()\n {\n $this->showError(404, \"Page non trouvée\", \"La page que vous recherchez n'existe pas.\");\n }", "private function showPageNotFound()\n {\n global $Core;\n\n $this->setController($Core->pageNotFoundLocation);\n $this->setView($Core->pageNotFoundLocation);\n }", "public static function not_found() {\n\n\t\t// Set the HTTP response.\n\t\thttp_response_code( 404 );\n\n\t\treturn self::view( theme_template_path( '404.php' ), array( 'title' => 'Page Not Found' ), true );\n\n\t}", "public function print404ErrorMessage() {\n echo \"<div class='text_box' style='margin:70px auto 0;width:400px'>\" .\n \"<span class='sub_header'>Page Not Found</span><p>The page you have requested was not found. \" .\n \"It may have been permanently removed or could be under maintenance.<br />\" .\n \"Please make sure that the spelling in the URL is correct, or try again later.<br /></p>\" .\n \"<p>We apologize for any inconvenience.</p></div>\";\n }", "public function notFoundAction()\n {\n $this->getResponse()->setHttpResponseCode(404);\n\n $this->view->badUri = $this->getRequest()->getRequestUri();\n\n // Render the error script that displays debugging info.\n if ($this->isInDebugMode()) {\n if (!($e = $this->_getException())) {\n $e = new Omeka_Controller_Exception_404(__(\"Page not found.\"));\n }\n $this->renderException($e);\n } else {\n $this->render('404');\n }\n }", "public function error404() {\n\n // J'affiche le template \"404.php\"\n echo $this->templates->render('main/404');\n }", "public function Error_404(){\n\t\tglobal $langmessage;\n\n\t\tmessage($langmessage['OOPS']);\n\t}", "abstract function pageNotFoundAction();", "public function not_found()\n\t{\n\t\tset_status_header(404);\n\t\t$data = $this->data;\n\t\t$data['title'] = \"Page Not Found\";\t\t\n\t\t$data['extraJS'] = '<style>.content {background-image:url(/images/404.jpg);margin:0;padding:0;height:100%;} .container { margin-top: 45px; }</style>';\n\t\t\n\t\t$this->load->view('templates/header', $data);\n\t\t$this->load->view('templates/menu', $data);\n\t\t$this->load->view('templates/menu_mall', $data);\n\t\t$this->load->view('errors/not_found', $data);\n\t}", "public function outputError404()\n {\n $this->outputError(\n 404,\n 'Page not found',\n 'Sorry, the page you were looking for does not exist.'\n );\n }", "public function notFound()\n {\n if (is_null($this->request)) { $this->request = $this->app->request(); }\n $this->loadComponents();\n $this->autoAssign();\n $this->app->render('error/404.html', $this->assigned_data, 404);\n $this->app->stop();\n }", "function action_404() {\n $this->view->set(\"PageTitle\", \"Error 404\");\n $this->view->render();\n }", "public static function default404()\n {\n echo static::errorMarkup(\n\t\t\t'404',\n\t\t\t'<p>The page you are looking for could not be found.</p>'\n\t\t);\n }", "function showNoPageError() {\n require_once(\"views/404.php\");\n }", "function not_found(){\n\terror(404, render('404', null, false));\n}", "public function page_not_found() {\r\n\t\t$data = array();\r\n\t\t//$this->router->show_404(); //does not work,\r\n\t\theader(\"HTTP/1.1 404 Not Found\");\r\n\t\t$this->load->view('pages/404_view', $data);\r\n\t}", "public static function not_found() {\n\n\t\thttp_response_code( 404 );\n\n\t\treturn self::view( self::$path . 'not_found.php', array( 'title' => 'Not Found &lsaquo; System' ), true );\n\n\t}", "public function notFound()\n\t{\n\t\t$dir = PathManager::getViewTemplateDirectory();\n\t\t$ext = NameManager::getTemplateExtension();\n\t\t$exists = file_exists(sprintf('%s/error/not_found.%s', $dir, $ext));\n\t\tif ($this->view instanceof ViewAbstract && $exists) {\n\t\t\t$this->view->setTemplate('not_found', 'error');\n\t\t\t$this->view->enableLayout(false);\n\t\t\t$this->view->render();\n\t\t} else {\n\t\t\techo '404 Not Found';\n\t\t}\n\t}", "public function pageNotFoundAction()\n {\n $this->getResponse()\n ->setHttpResponseCode(404);\n }", "public function NotFoundAction(){\n $this->fw->model('Spages')->showPageByFullUrl($this->fw->request_url);\n }", "function not_found($errno, $errstr, $errfile = null, $errline = null)\n {\n Core::option('views_dir', Core::option('error_views_dir'));\n $msg = Helpers::h(rawurldecode($errstr));\n return View::html(\"<h1>Page not found:</h1><p><code>{$msg}</code></p>\", Error::layout());\n }", "public function error404()\n {\n $this->show('error404');\n }", "public function notfound()\n\t{\n\t\t$this->data['message'] \t= '';\n\t\t$this->data['title']\t= 'Post Jobs Online Free|Get Resumes|Conduct Video Interviews';\n\t\t$this->data['metakey']\t= 'HR Solutions, Cherry Hire, IPF';\n\t\t$this->data['metadesc']\t= 'Online recruitment software to post jobs free to online job portals, social media websites in one click,conduct video interviews and make hiring process fast';\n\t\t$this->data['mid'] \t\t= 0;\n\t\t$this->load->view('common/header',$this->data);\n\t\t$this->load->view('common/home-menu',$this->data);\n\t\t$this->load->view('404',$this->data);\n\t\t$this->load->view('common/footer',$this->data);\n\t}", "protected function notFound()\n {\n ob_start();\n require($this->viewPath . 'errors/404.php');\n $content = ob_get_clean();\n require($this->viewPath . 'templates/error.php');\n header('HTTP/1.0 404 Not Found');\n exit();\n }", "public function pageNotFound($args){\n\n\t\t$this->view = new View();\n\n\t\t$this->view->render($this->templateDir . Config::get('ds') . '404', 1, \"http/1.0 404 Not Found\");\n\t}", "function page_not_found()\n {\n return view('errors/404');\n }", "public function pageNotFound()\n {\n return view('errors.404');\n }", "public function action_404()\n {\n $buttons = Model_Event::find('all');\n\n $this->template->title = \"Page Not Found\";\n $this->template->content = Response::forge(Presenter::forge('welcome/404'), 404);\n }", "public function action_404()\n\t{\n\t\t$this->template->content = View::forge('site/404');\n\t}", "private function notFound()\n {\n if (file_exists(APP . 'Controller/error.php')) {\n header('Location: ' . BASE_URL . 'error');\n } else {\n die('Sorry, the requested content could not be found');\n }\n }", "function drupal_not_found() {\n drupal_set_header('HTTP/1.1 404 Not Found');\n\n watchdog('page not found', check_plain($_GET['q']), WATCHDOG_WARNING);\n\n // Keep old path for reference\n if (!isset($_REQUEST['destination'])) {\n $_REQUEST['destination'] = $_GET['q'];\n }\n\n $path = drupal_get_normal_path(variable_get('site_404', ''));\n if ($path && $path != $_GET['q']) {\n menu_set_active_item($path);\n $return = menu_execute_active_handler();\n }\n else {\n // Redirect to a non-existent menu item to make possible tabs disappear.\n menu_set_active_item('');\n }\n\n if (empty($return) || $return == MENU_NOT_FOUND || $return == MENU_ACCESS_DENIED) {\n drupal_set_title(t('Page not found'));\n menu_set_active_item('');\n $return = '';\n }\n // To conserve CPU and bandwidth, omit the blocks\n print theme('page', $return, FALSE);\n}", "public function showNotFoundPage()\n {\n return view('errors.404');\n }", "public function error404()\n {\n $this->pageTitle = 'error 404';\n $this->template = 'error404';\n }", "static function show404()\n {\n\t\t$message = \"404 Page Not Found\";\n\t\tinclude(APPPATH.'errors/404error'.EXT);\n exit();\n }", "public static function error404(){\n\t\tinclude_once \"view/pages/error404.php\";\n\t}", "public function not_found_response() {\n //404 page\n }", "public function notFoundError()\n {\n return $this->render('JaccobAppBundle:Default:notFoundError.html.twig');\n }", "public function errorPage(){\n\t\theader(\"HTTP/1.0 404 Not Found\");\n\t\tdie();\n\t}", "public static function notFound()\n {\n self::stirLatte();\n http_response_code(404);\n $view_file = Path::root() . '/resources/views/404.latte'; \n self::$latte->render($view_file);\n die();\n }", "public function action_404()\n\t{\n\t\t$this->show_404();\n\t}", "public function error404() {\n\t\tif (self::_hasAdapter(get_called_class(), __FUNCTION__))\n\t\t\treturn self::_callAdapter(get_called_class(), __FUNCTION__);\n\t\t\n\t\techo \"Error 404 Page Not Found\";\n\t\t\n\t\texit();\n\t}", "protected function output404Page()\r\n\t{\r\n\t\theader('HTTP/1.1 404 Not Found');\r\n\t\texit();\r\n\t}", "public function not_found(){\n $this->View(\"404\");\n }", "public static function notFound(): void\n {\n self::error(\"Not found\", 404);\n }", "protected function createErrorPage() {\n $node = $this->setupNode('page');\n $node->title = 'Page not found';\n $node->xmlsitemap['status'] = 0;\n\n $node->body[LANGUAGE_NONE][0] = array(\n 'value' => '<p>The requested page could not be found.</p>',\n 'format' => 'default',\n );\n\n node_save($node);\n variable_set('site_404', 'node/' . $node->nid);\n }", "public function AuctionNotFound(){\n\t\t\t$content[\"icon\"] = \"warning\";\n\t\t\t$content[\"message\"] = \"Error: The auction you have been looking for has not been found!\";\n\t\t\t$content[\"buttonText\"] = \"Go to Home\";\n\t\t\t$content[\"buttonLink\"] = base_url();\n\n\t\t\t$this->loadPageLayout(\"pages/InfoMessage\", $content);\n\t\t}", "public function error404Action(){\r\n header('HTTP/1.0 404 Not Found');\r\n\r\n return $this->render('404');\r\n }", "public static function e_404() {\n if(file_exists(\"templates/errors/404.php\"))\n require_once(\"templates/errors/404.php\");\n die();\n }", "public function notFoundAction()\n {\n $this->_view();\n }", "public function error404()\n {\n $view['company_name'] = $this->settings_model->get_setting('company_name');\n\n $this->load->view('general/error404', $view);\n }", "public function error404() {\n\t\t\trequire('views/404.php');\n\t\t}", "function p404()\n{\n\thttp_response_code(404);\n\tView\\Json::render(['error'=>'page not found']);\n}", "public function notfound()\n\t{\n\t\t$assign\t= [\n\t\t\t'error'\t=> [\n\t\t\t\t'num'\t=> 404,\n\t\t\t\t'msg'\t=> '你跟丢了~',\n\t\t\t\t'tip'\t=> '这是一个提示语句',\n\t\t\t]\n\t\t];\n\n\t\treturn view('pages._error', $assign);\n\t}", "public function pageNotFound(){\n $html = $this->banner('Oops! The page was not found', 'Sorry we could not find the page your were looking for').'\n <main id=\"main\">\n <div class=\"container\">\n <div class=\"row d-flex justify-content-center\">\n <div class=\"col-12 col-md-5\">\n <div class=\"card mt-4 login-form shadow-lg \">\n <div class=\"card-header\"\n <div class=\"card-body\">\n <h3 class=\"text-center\">404 Page Not Found</h3>\t\t\n <hr>\n <div class=\"form-group\">\n <p class=\"text-center\">\n <a href=\"'.BASE_URL.'\"><i class=\"fa fa-home\"></i> Go to Home</a>\n </p>\n </div>\n </div> \n </div>\n \n </div>\n </div>\n </div>\n </main> \n \n\n ';\n return $html;\n \n }", "protected function show404(){\n Response::createGeneric404()->render();\n die();\n }", "public static function error404() {\n header('This is not the page you are looking for', true, 404);\n $html404 = sprintf(\"<!doctype html>\\n\" .\n \"<title>Error 404: Page does not exist</title>\\n\" .\n \"<h1>Error 404: Page does not exist</h1>\\n\" .\n \"<p>The page <i>%s</i> does not exist.</p>\", $_SERVER[\"REQUEST_URI\"]);\n\n echo $html404;\n }", "public function _error() {\n $this->display404();\n }", "public function not_found()\r\n {\r\n $view = new View();\r\n return $view->render(‘404’);\r\n }", "public function index()\n\t{\n\t\t$this->global['title'] = '404 - Page not found! | '.$this->title;\n\n\t\t$data = array();\n\n\t\t$this->output->set_status_header('404');\n\n\t\t$this->loadViews(\"custom404_html\", $this->global, $data, NULL);\n\t}", "abstract protected function notFoundError($message = \"Resource not found\");", "function action_PageNotFound( $_ctrl, $_pageObj )\n {\n // show some excuses, or blame user for not finding a page.\n if( $_ctrl->getOption( 'pageNotFound_file' ) ) {\n // pageNotFound file is set. should load this page.\n $_ctrl->prependModule( array(\n array( '\\AmidaMVC\\AppSimple\\Loader', 'loader' ),\n array( '\\AmidaMVC\\AppSimple\\Emitter', 'emitter' ),\n ) );\n return array();\n }\n $_pageObj->title( 'Page Not Found' );\n $contents = \"#Error 404\\n\\nrequested page not found...\\n\\n\";\n $contents .= \"[back to top](\" . $_ctrl->getBaseUrl() . \")\";\n $_pageObj->setContent( $contents );\n $_pageObj->contentType( 'markdown' );\n $_pageObj->status( '404' );\n $_ctrl->setMyAction( $_ctrl->defaultAct() );\n return array();\n }", "public function notFound()\n {\n $title = trans('general.not_found');\n return view('admin.errors.not-found', compact('title'));\n }", "protected function NotFound()\n {\n $this->resp->SetStatus_NotFound();\n\n $tpl = $this->app->Template( 'Page' );\n $tpl->title = 'Nepareiza saite';\n $tpl->Header = false;\n $tpl->Content = 'Jūsu pieparasītā lapa neeksistē vai arī saite (URL) tika sastādīta nepareizi.';\n\n return $tpl;\n }", "public function _errorPage404() {\n header('HTTP/1.1 404 Not Found');\n header(\"Status: 404 Not Found\");\n//header('Location:' . $host . '4.04'); //Needbuild output page 404\n echo ('<html><head><title>' . SITENAME . ' - Page not found</title></head><h3>404 Page not found </h3></head>');\n }", "public function notfoundAction()\n {\n return s('result')->showNotFound(template('layout', [\n 'title'=>$this->lang->title,\n 'content'=> template('article', [\n 'header'=>$this->lang->header,\n 'text'=>$this->lang->text\n ]),\n ]));\n }", "function e404($message){\n\t\theader(\"HTTP/1.0 404 Not Found\");\n\t\t//Pas de controller error, on rend directement une vue en spécifiant le chemin\n\t\t$this->render('/errors/e404', array('message' => $message));\n\t\tdie();\n\t}", "public function error404()\n\t{\n\t\t//envoie une entête 404 (pour notifier les clients que ça a foiré)\n\t\theader(\"HTTP/1.0 404 Not Found\");\n\t\tView::show(\"errors/404.php\", \"Oups ! Lost ?\");\n\t}", "function errorView404()\r\n{\r\n\tstartOfPage();\r\n\tuserForm();\r\n\techo '<div align=center style=\"border:2px solid red\"><b><h3>' .PHP_EOL;\r\n\techo 'Error 404 : Page not found<br/>' .PHP_EOL;\r\n\techo 'Wrong view parameter' .PHP_EOL;\r\n\techo '</h3></b></div>' .PHP_EOL;\r\n\tendOfPage();\r\n}", "public function notFound()\n {\n return ['Error/NotFound.php', ['message' => 'Page not found']];\n }", "public function createNotFoundException($message = 'Not Found')\n {\n wp_die(__('Page not found.'));\n }", "public function error404()\n\t{\n\t\t//envoie une entête 404 (pour notifier les clients que ça a foiré)\n\t\theader(\"HTTP/1.0 404 Not Found\");\n\t\tView::show(\"errors/404.php\", \"Oups ! Perdu ?\");\n\t}", "function notFound(): void\n {\n @clear_ob();\n header('Content-Type: text/html');\n header('HTTP/1.1 404 Not Found', true, 404);\n $path = str_replace(basepath(), '', __DIR__);\n respond()->send(render($path . '/errors/error', ['pesan' => 'Not Found 404']));\n exit(0);\n }", "public function step_seePageNotFound() {\n $args = func_get_args();\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Action('seePageNotFound', $args));\n }", "public function error404()\n\t{\n // Create your custom controller\n\n // Display page\n\t\t// $this->load->view('templates/header');\n\t\t$this->load->view('errors/custom404view');\n\t\t// $this->load->view('templates/footer');\n\t}", "public function errorNotFoundAction()\n {\n if ($this->request->isAjax()) {\n\n return $this->response->setStatusCode(404, 'Not Found')->setJsonContent([\n 'message' => 'You are lost...',\n ])->send();\n }\n // -- Render the 404 view\n $this->view->setVar('title', 'NotFound');\n $this->view->setVar('style', 'parts/error-styles');\n $this->view->setVar('main', 'error404');\n return $this->response->setStatusCode(404, 'Not Found')->send();\n }", "public function errorNotFound()\n {\n return $this->loadPublicView('errors.not-found');\n }", "private function Page404() {\n header('HTTP/1.0 404 Not Found');\n header('Status: 404 Not Found');\n exit;\n }", "public static function error404()\n {\n ViewLoader::load('errors/404');\n }", "function error_404(){\n\theader(\"HTTP/1.0 404 Error Page Not Found\");\n\techo render(\"404\",\"standard\",\"404\");\n}", "public function err404_run($message=\"La page n'existe pas\"){\n the()->headerOutput->set404($message);\n return new View(\"404\",$message);\n }", "public function error404()\n {\n return View::render('404'); \n }", "public function show404Action()\r\n\t{\r\n $twig = $this->initTwig();\r\n\t\t$templateFile = '404_page.html.twig';\r\n\t\t$myDescription = new PresentationService();\r\n\t\t$array = array('profil' => $myDescription->getTwigArray(),);\r\n\t\t$this->renderTwig($twig, $templateFile, $array);\r\n\t\t\r\n\t}", "public function error_404()\n {\n $this->load->view('error_404');\n }" ]
[ "0.8530085", "0.8498048", "0.8483171", "0.84744793", "0.84390175", "0.8395996", "0.83572274", "0.83432597", "0.8326129", "0.82607055", "0.823952", "0.8081201", "0.80800396", "0.80518305", "0.8021034", "0.8018821", "0.79691607", "0.7964062", "0.79571503", "0.7952405", "0.7941784", "0.79311997", "0.7926507", "0.7909376", "0.79040974", "0.7903294", "0.7888549", "0.7821818", "0.78093183", "0.78089607", "0.77927035", "0.7762689", "0.7745377", "0.7741409", "0.7739822", "0.7736701", "0.77269274", "0.77175266", "0.7692215", "0.7660732", "0.7659776", "0.76171446", "0.76046705", "0.75990254", "0.759577", "0.7594013", "0.7582583", "0.758022", "0.75597155", "0.7551337", "0.75335175", "0.75154793", "0.7515389", "0.75151575", "0.74985754", "0.7468633", "0.7460204", "0.74525225", "0.7434349", "0.7429148", "0.74199176", "0.7406121", "0.74022114", "0.7402129", "0.7394942", "0.73849404", "0.7375592", "0.7370974", "0.7362558", "0.73581576", "0.735045", "0.73415506", "0.7336313", "0.73244005", "0.7323906", "0.7321235", "0.73192877", "0.7313807", "0.72933674", "0.72900987", "0.72809196", "0.72653323", "0.7264719", "0.7260886", "0.72554207", "0.7254423", "0.7224572", "0.7218922", "0.71935964", "0.718327", "0.7182263", "0.71554995", "0.7141099", "0.7138823", "0.71367544", "0.71320266", "0.7131757", "0.7120756", "0.7117435", "0.7115709" ]
0.8629749
0
Displays custom "account not set up" message.
Показывает кастомное сообщение "аккаунт не настроен".
function cls_sso_display_account_not_set_up() { return "<h4>Your account has not been set up fully.</h4>"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function account(){\n Gui::setBody('<h1>Not implemented</h1>');\n }", "public function error_missing_user()\n {\n $msg = __(\n '<strong>Easypay Gateway Disabled</strong> Missing USER. %sClick here to configure.%s',\n 'wceasypay'\n );\n\n $msgFinal = sprintf($msg, $this->ahref, $this->a);\n\n echo sprintf($this->error, $msgFinal);\n }", "private function displayLoginError()\n {\n $error = $this->getService('config')\n ->get()['errors']['login']['not_exist'];\n $this->getService('flash')->addMessage('error', $error);\n }", "function mymail_error_notice() {\n\t\t\t$msg = '<strong>Connects - '.$this->setting['name'].' Addon</strong> requires <strong>\"MyMail - Email Newsletter Plugin for WordPress\"</strong> installed and activated.';\n\t\t\techo\"<div class=\\\"error\\\"> <p>\" . $msg . \"</p></div>\"; \n\t\t}", "public function admin_notices_error() {\n prinft( '<div class=\"notice notice-error\"><p>%1$s</p></div>', __( 'Settings not saved. Please check your input and try again.', 'slick-base' ) );\n }", "public function admin_notice_error() {\n\n global $pagenow;\n\n if($pagenow == 'options-general.php' || $pagenow == 'post.php') {\n if( $this->fbIsAuthenticated ) {\n $class1 = 'notice notice-success is-dismissible';\n $message1 = __( 'Your are authorized with Facebook.', 'sample-text-domain' );\n } else {\n $class1 = 'notice notice-error is-dismissible';\n $message1 = __( 'Please authorize your Facebook App. <a href=\"\"/>Log In</a>', 'sample-text-domain' );\n }\n\n if( $this->twitterIsAuthenticated ) {\n $class2 = 'notice notice-success is-dismissible';\n $message2 = __( 'You are authrorized with Twitter.', 'sample-text-domain' );\n } else {\n $class2 = 'notice notice-error is-dismissible';\n $message2 = __( 'Please create your Twitter App. <a href=\"https://dev.twitter.com/web/sign-in\" target=\"_blank\">Log In</a>', 'sample-text-domain' );\n }\n }\n\n\n\tprintf( '<div class=\"%1$s\"><p>%2$s</p></div>', $class1, $message1 );\n printf( '<div class=\"%1$s\"><p>%2$s</p></div>', $class2, $message2 );\n}", "function show_less_login_info() {\n\treturn \"<strong>ERROR</strong>: What's wrong, don't remember? Try again...\";\n}", "function show_less_login_info()\n{ \n\treturn \"<strong>ERROR</strong>: What's wrong, don't remember? Try again...\";\n}", "public function error_config_username_empty() {\n $message = 'Merci de renseigner ce champ.';\n $class = 'error';\n include __DIR__ . '/view/admin/notice/alertform.php';\n }", "public function show_plugin_activation_error( ) {\n\t\techo get_option( 'msn_plugin_activation_error' );\n\t}", "function salsa_campaigns_error_page() {\n return \"We're sorry but this campaign seems to be incorrectly configured, please contact the site owner to report this problem.\";\n}", "public function error_config_username() {\n $message = 'Votre identifiant Affiliation LWS ne doit contenir que des chiffres.';\n $class = 'error';\n include __DIR__ . '/view/admin/notice/alertform.php';\n }", "function show_less_login_info() {\n return __('<strong>ERROR</strong>: Stop guessing!','oseo'); }", "function successful_signup_message() {\n\tif ( ! empty( $_GET['googleauthenticator'] ) && 'enabled' === $_GET['googleauthenticator'] ) : ?>\n\t\t<div class=\"updated notice\">\n\t\t\t<p><?php esc_html_e( 'Congratulations, you have successfully enabled Google Authenticator for your account', 'google-authenticator' ); ?></p>\n\t\t</div>\n\n\t<?php endif;\n}", "public function CantBanYourself(){\n\t\t\t$content[\"icon\"] = \"warning\";\n\t\t\t$content[\"message\"] = \"Failed: You cannot ban yourself!\";\n\t\t\t$content[\"buttonText\"] = \"Go back\";\n\t\t\t$content[\"buttonLink\"] = base_url() . 'ManageAccounts';\n\n\t\t\t$this->loadPageLayout(\"pages/infoMessage\", $content);\n\t\t}", "function envato_toolkit_credentials_admin_notices() {\n $message = sprintf( esc_html__( \"To enable theme update notifications, please enter your Envato Marketplace credentials in the %s\", \"the-rex\"),\n \"<a href='\" . admin_url() . \"admin.php?page=envato-wordpress-toolkit'>Envato WordPress Toolkit Plugin</a>\" );\n echo \"<div id='message' class='updated below-h2'><p>{$message}</p></div>\";\n }", "function cf7pp_my_admin_notice() {\n\t\t\t\t?>\n\t\t\t\t<div class=\"error\">\n\t\t\t\t\t<p><?php _e( '<b>This is sad :(</b> Contact Form 7 is not installed and / or active! Booking form won\\'t work', 'cf7pp' ); ?></p>\n\t\t\t\t\t</div>\n\t\t\t\t\t<?php\n\t\t\t}", "public function RegistrationFailedBadUsername(){\n\t\t\t$content[\"icon\"] = \"warning\";\n\t\t\t$content[\"message\"] = \"Registration failed: User with given username already exist!\";\n\t\t\t$content[\"buttonText\"] = \"Go back\";\n\t\t\t$content[\"buttonLink\"] = base_url() . \"Register\";\n\n\t\t\t$this->loadPageLayout(\"pages/InfoMessage\", $content);\n\t\t}", "private function checkForAccount()\n\t{\n\t\tif(!BackendMailmotorCMHelper::checkAccount()) SpoonHTTP::redirect(BackendModel::createURLForAction('settings', 'mailmotor', BL::getWorkingLanguage()));\n\t}", "function error_msg()\n\t{\n\t\t//How did the user get here? Must've been up to no good.\n\t\techo \"<div class='invalid' align='center'>Error: Invalid information.</div><br>\n\t\t\t<div align='center'>If you feel you reached this in error, please contact webmaster@footesbooks.com</div>\";\n\t}", "public function setUserExistsMessage() {\n\t\t$this->message .= 'User exists, pick another username.<br />';\n\t}", "public function reasonNotActivated()\n {\n return 'Admin has deactivated you account';\n }", "public function show_admin_notices() {\n\t\t\t\t$options = get_option( $this->get_settings_field_name() );\n\t\t\t \n\t\t\t\tif ( !$options || ! isset( $options['email'] ) || ! isset( $options['license_key'] ) ||\n\t\t\t\t\t$options['email'] == '' || $options['license_key'] == '' ) {\n\t\t\t \n\t\t\t\t\t$msg = __( 'Please enter your email and license key to enable updates to %s.', $this->plugin_name );\n\t\t\t\t\t$msg = sprintf( $msg, $this->product_name );\n\t\t\t\t\t?>\n\t\t\t\t\t\t<div class=\"update-nag\">\n\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t<?php echo $msg; ?>\n\t\t\t\t\t\t\t</p>\n\t\t\t \n\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t<a href=\"<?php echo admin_url( 'options-general.php?page=' . $this->get_settings_page_slug() ); ?>\">\n\t\t\t\t\t\t\t\t\t<?php _e( 'Complete the setup now.', $this->plugin_name ); ?>\n\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t<?php\n\t\t\t\t}\n\t\t\t}", "function wpfme_login_obscure(){ return '<strong>Sorry</strong>: Inlog gegevens kloppen niet!';}", "public function message()\n {\n return 'Sorry! user with this :attribute is not present in our system.';\n }", "public function displayConnectionErrorMessage() {\n\t\techo \"<h1> <font color='FF0000'>Error Connecting to Database</font></h1>\";\n\t\techo \"<h2> Check database login credentials and database access privileges.</h2>\";\n\t}", "public function output_account_warning() {\n\t\treturn true;\n\t}", "function action_admin_notices() {\n\t\t$message = sprintf( __( \"Jetpack Follow Link for P2 is enabled. You'll also need to activate the <a href='%s' target='_blank'>P2 theme</a> and <a href='%s' target='_blank'>Jetpack</a> Subscriptions to start using the plugin.\", 'jpflfp2' ), 'http://p2theme.com/', 'http://jetpack.me' );\n\t\techo '<div class=\"error\"><p>' . $message . '</p></div>';\n\t}", "function notice() {\n\n\t\tglobal $current_user;\n\n\t\twp_get_current_user();\n\n\t\tif ( get_user_meta( $current_user->ID, 'force-password-change', true ) ) {\n\t\t\tprintf(\n\t\t\t\t'<div class=\"error\"><p>%s</p></div>',\n\t\t\t\t__( 'Please change your password in order to continue using this website', 'force-password-change' )\n\t\t\t\t);\n\t\t}\n\n\t}", "public static function customErrorMsg()\n {\n echo \"<p>An error occurred, The error has been reported.</p>\";\n exit;\n }", "public function needauthentificationAction()\n\t{\n\t\n\t\t$this->view->errorMessage = 'Missing User Authentification Data';\n\t\n\t}", "public function message()\n {\n return __('This bet is not allowed.');\n }", "public function message()\n {\n return 'Esse usuário já existe no ldap';\n }", "public function error_missing_country()\n {\n $msg = __(\n '<strong>Easypay Gateway Disabled</strong> Missing COUNTRY. %sClick here to configure.%s',\n 'wceasypay'\n );\n\n $msgFinal = sprintf($msg, $this->ahref, $this->a);\n\n echo sprintf($this->error, $msgFinal);\n }", "public function RegistrationFailedBadEmail(){\n\t\t\t$content[\"icon\"] = \"warning\";\n\t\t\t$content[\"message\"] = \"Registration failed: User with given email already exist!\";\n\t\t\t$content[\"buttonText\"] = \"Go back\";\n\t\t\t$content[\"buttonLink\"] = base_url() . \"Register\";\n\n\t\t\t$this->loadPageLayout(\"pages/InfoMessage\", $content);\n\t\t}", "private function showErrorMessage() {\n\t\tif (isset($_SESSION[self::SESSION_MESSAGE_ERROR_KEY])) {\n\t\t\tadd_settings_error(md5($_SESSION[self::SESSION_MESSAGE_ERROR_KEY]), esc_attr('settings_updated'), $_SESSION[self::SESSION_MESSAGE_ERROR_KEY], 'error');\n\t\t\tunset($_SESSION[self::SESSION_MESSAGE_ERROR_KEY]);\n\t\t}\n\t}", "protected function displayInitiatedErrorMessage(): void\n {\n $this->error(\"Modules are already initiated.\");\n }", "public function getNotEnabledMessage() {\n return $this->__(\n 'You have installed the PHP native passwords API module, but have not enabled its functionality. ' .\n 'It is strongly recommended to enable this value in your Magento <a href=\"%s\">customer configuration</a>, in the Password Options section.',\n Mage::getUrl('adminhtml/system_config/edit', array('section'=>'customer'))\n );\n }", "function customer_settings() {\r\n return t('There are no general settings for customers. You can manage fields and display settings here.');\r\n}", "function login_error() {\n $this->template->render('login');\n }", "public function toString()\n {\n return 'Default customer account information tab is correct.';\n }", "function accountSettings() {\n\t\ttry {\n\t\t$this->loadView('user_account_settings');\n\t} catch (Exception $e) {\n\t \t$this->handleException($e->getMessage());\n\t} \t\t\n\t}", "public function message()\n {\n return 'This field must not be present when ' .$this->field .' is chosen.' ;\n }", "function remp_paywall_deactivate_notice() {\n\tprintf(\n\t\t'<div class=\"error\"><p>%s</p></div>',\n\t\t__(\n\t\t\t'The plugin <strong>DN REMP Paywall</strong> requires <strong>DN REMP CRM Auth</strong> plugin to be installed.',\n\t\t\t'dn-remp-crm-auth'\n\t\t)\n\t);\n}", "public function thankyou_page_fail_callback()\n {\n printf(\n '<input type=\"text\" id=\"thankyou_page_fail\" name=\"hbl_option_name[thankyou_page_fail]\" value=\"%s\" />',\n isset($this->options['thankyou_page_fail']) ? esc_attr($this->options['thankyou_page_fail']) : 'Payment process could not completed.Please try again.'\n );\n }", "public function message()\n {\n return 'You\\'re not authorized to use this application';\n }", "public function message()\n {\n return 'The username is not valid.';\n }", "public function message()\n {\n return __('You are not allowed to use this role');\n }", "public function coinpayments_settings_callback() {\n\t\tesc_html_e( 'Please enter details related to your CoinPayment.net account. A CoinPayment.net API public and private key are required for all operations.', 'stats-dashboard-for-coinpayments' );\n\t}", "private function show_html_notaffiliated() {\n\t\t$this->show_html_generic_header('Anmeldung');\n\t\t?>\n\t\t<br><br>\n\t\t<div id=\"vcs_automat-notaffiliated\">Registrierung ist nur für VCS-Mitglieder möglich!</div>\n\t\t<br><br>\n\t\t<?php\n\t}", "function republitheme_login_obscure() { \r\n return '<strong>Sorry</strong>: Think you have gone wrong somwhere!';\r\n}", "public function error_missing_entity()\n {\n $msg = __(\n '<strong>Easypay Gateway Disabled</strong> Missing ENTITY. %sClick here to configure.%s',\n 'wceasypay'\n );\n\n $msgFinal = sprintf($msg, $this->ahref, $this->a);\n\n echo sprintf($this->error, $msgFinal);\n }", "function CF7_PayPing_admin_notice(){\n echo '<div class=\"error\">\n\t\t\t<p>' . _e('<b> افزونه درگاه بانکی برای افزونه Contact Form 7 :</b> Contact Form 7 باید فعال باشد ', 'my-text-domain') . '</p>\n\t\t</div>\n\t\t';\n }", "public function message()\n {\n return 'Current password is wrong.';\n }", "function cls_sso_display_page_not_found() {\n return \"<h4>Requested page is not found.</h4>\";\n}", "function admin_notices() {\n\t$settings[cgid] = get_option( 'linkconnector_uts_cgid' );\n\t$settings[eid] = get_option( 'linkconnector_uts_eid' );\n\tif ( ! isset( $settings[cgid] ) || empty( $settings[cgid] ) ) {\n\t\techo ( '<div class=\"error\"><p>' . __( 'LinkConnector UTS WP eCommerce Merchant Tracking requires your Campaign Group ID before it can start tracking sales. <a href=\"admin.php?page=linkconnector-uts\">Do this now</a>', 'linkconnector-uts' ) . '</p></div>' );\n\t}\n\tif ( ! isset( $settings[eid] ) || empty( $settings[eid] ) ) {\n\t\techo ( '<div class=\"error\"><p>' . __( 'LinkConnector UTS WP eCommerce Merchant Tracking requires your Event ID before it can start tracking sales. <a href=\"admin.php?page=linkconnector-uts\">Do this now</a>', 'linkconnector-uts' ) . '</p></div>' );\n\t}\n\t\n}", "function pp_registration_disabled_notice() {\n\tif ( ! is_super_admin( get_current_user_id() ) ) {\n\t\treturn;\n\t}\n\tif ( get_option( 'users_can_register' ) ) {\n\t\treturn;\n\t}\n\n\t$url = is_multisite() ? network_admin_url( 'settings.php' ) : admin_url( 'options-general.php' );\n\n\t?>\n\t<div id=\"message\" class=\"updated notice is-dismissible\">\n\t\t<p>\n\t\t\t<?php printf( __( 'User registration currently disabled. To enable, Go to <a href=\"%1$s\">Settings -> General</a>, and under Membership, check \"Anyone can register\"', 'ppress' ), $url ); ?>. </p>\n\t</div>\n\t<?php\n}", "public function pro6pp_admin_notices_action() {\n settings_errors('pro6pp_settings_notice');\n }", "public function init_error_messages()\n\t{\n?>\n\t\t<div class=\"error\">\n\t\t\t<p><?php echo __('Opn Payments WooCommerce plugin requires <strong>WooCommerce</strong> to be activated.', 'omise'); ?></p>\n\t\t</div>\n<?php\n\t}", "public function message()\n {\n return 'Cannot transfer credits to '. $this->username .'.';\n }", "public function message()\n {\n return 'The user already exists in the role.';\n }", "public function fallback_notice() {\n\t\t\techo '<div class=\"error\">';\n\t\t\techo '<p>' . __( 'Woo Extension Plugin Boilerplate: Needs the WooCommerce Plugin activated.', 'woo-extension-plugin-boilerplate' ) . '</p>';\n\t\t\techo '</div>';\n\t\t}", "public function showCreateAccount()\n {\n if (App::loggedIn()) {\n App::redirect(URL_BASE.'community');\n }\n $app = App::getInstance();\n\n $app->template->addValidation();\n $app->template->addRequiredJs('pages/account/create.js');\n $app->template->render('Account/Create.php');\n }", "function network_admin_notices()\n {\n }", "function outputConfigurationMessage()\n {\n global $application;\n\n $result = '';\n if (!$application -> multilang_core -> _mb_enabled)\n $result .= $this -> mTmplFiller -> fill(\n 'multilang/language_settings/',\n 'mb_string_not_found.tpl.html',\n array()\n );\n\n return $result;\n }", "public function message()\n {\n return 'you cannot attach this user to order as this delivery guy is not part of this branch.';\n }", "function wp_ozh_yourls_admin_notice() {\r\r\tglobal $plugin_page;\r\r\tif( $plugin_page == 'ozh_yourls' ) {\r\r\t\t$message = '<strong>YOURLS - WordPress</strong> configuration incomplete';\r\r\t} else {\r\r\t\t$url = menu_page_url( 'ozh_yourls', false );\r\r\t\t$message = 'Please configure <strong>YOURLS - WordPress</strong> <a href=\"'.$url.'\">settings</a> now';\r\r\t}\r\r\t$notice = <<<NOTICE\r\r\t<div class=\"error\"><p>$message</p></div>\r\rNOTICE;\r\r\techo apply_filters( 'ozh_yourls_notice', $notice );\r\r}", "public function message()\n {\n return 'Your balance is insufficient.';\n }", "abstract function getMissingAccount();", "public function notAuthorizedError()\n {\n return $this->render('JaccobAppBundle:Default:notAuthorizedError.html.twig');\n }", "private function display_error(){\n \n $e = get_settings_errors( 'error-settings' );\n if( count( $e ) > 0 ) {\n echo '<div class=\"error settings-error below-h2\" id=\"setting-error-error-settings\"><p><strong>' . __( 'There were mistakes, not all changes have been saved', 'pwp' ) . '</strong></p></div>';\n dbug( $e );\n } else {\n settings_errors();\n }\n }", "private function make_error_message() {\n\t\t$message = __( '<strong>Error</strong>: Due to site rules, a strong password is required. Please choose a new password that rates as <strong>Strong</strong> on the meter.', 'it-l10n-ithemes-security-pro' );\n\n\t\treturn wp_kses( $message, array( 'strong' => array() ) );\n\t}", "function missing_timber_admin_notice() {\n\t\techo '<div class=\"error\"><p>' . sprintf(__('Timber not activated. Make sure you activate the plugin in <a href=\"%1$s\">%2$s</a>' ), esc_url( admin_url( 'plugins.php#timber' ) ), esc_url( admin_url( 'plugins.php') ) ) . '</p></div>';\n\t}", "public static function deactivation_notice() {\n\t\techo '<p><strong>' . __( 'Theme was remotely de-registered.', 'the7mk2' ) . '</strong></p>';\n\t}", "protected function notAuthorisedAction() {\n\t\t$oView = new accountView($this);\n\t\t$oView->showNotAuthorisedPage();\n\t}", "function unsupported_prefix_notice() {\n echo '<div class=\"error\">';\n echo '<p style=\"color: red; font-size: 14px; font-weight: bold;\">' . __( 'Network Plugin Auditor', 'npa' ) . '</p>';\n\n echo '<p>' . __( 'Your wp-config.php has an empty database table prefix, which is not supported. Please disable the Network Plugin Auditor and visit the support forum for assistance.', 'npa' ) . '</p>';\n\n echo '<p><a href=\"http://wordpress.org/support/plugin/network-plugin-auditor\">http://wordpress.org/support/plugin/network-plugin-auditor</a></p>';\n\n echo '</div>';\n }", "private function showPageRegistration()\n {\n if ($this->feedback) {\n echo $this->feedback . \"<br/><br/>\";\n }\n\n echo \"<div id='loginerror'>\";\n echo 'Not Authorized';\n echo \"</div>\";\n\n }", "public function message()\n {\n return 'Page slug already in use - try a different title';\n }", "public function getRegistrationCustomErrorMessage()\n {\n return Mage::getStoreConfig('privatesales/registration/disable_error_msg');\n }", "protected function getFailedLoginMessage()\n {\n return 'Неверная комбинация логина и пароля.';\n }", "public static function display_activation_msg() {\r\r\n $sac = get_option( 'image_default_positioning', 0 );\r\r\n if( $sac!=1 ) {\r\r\n echo '<div class=\"notice notice-error\">'; // notice-success\r\r\n echo '<p>';\r\r\n echo sprintf( __( '%sPlease note:%s You are missing out on important updates for Super Forms! Please %sactivate your copy%s to receive automatic updates.', 'super_forms' ), '<strong>', '</strong>', '<a href=\"' . admin_url() . 'admin.php?page=super_settings#activate\">', '</a>' );\r\r\n echo '</p>';\r\r\n echo '</div>';\r\r\n }\r\r\n }", "public function message()\n {\n return 'The user is invalid';\n }", "public function show_user_error()\n\t{\n\t\treturn ee()->output->show_user_error($this->_type, $this->getMessage());\n\t}", "public function callbackFail()\n {\n $this->AddOutput(\"<p><i>Användaren kunde inte uppdateras i databasen!</i></p>\");\n $this->redirectTo();\n }", "function noPermission()\n\t{\n\t\tglobal $lang;\n\t\treturn '<div class=\"confirmationMsg\">'.$lang->noPermissionToAccessThisPage.'</div>';\n\t}", "public function error_missing_lang()\n {\n $msg = __(\n '<strong>Easypay Gateway Disabled</strong> Missing LANGUAGE. %sClick here to configure.%s',\n 'wceasypay'\n );\n\n $msgFinal = sprintf($msg, $this->ahref, $this->a);\n\n echo sprintf($this->error, $msgFinal);\n }", "function action_admin_notices() {\n\t\t$message = sprintf( __( \"P2 Resolved Posts is enabled. You'll also need to activate the <a href='%s' target='_blank'>P2 theme</a> to start using the plugin.\", 'p2-resolve' ), 'http://p2theme.com/' );\n\t\techo '<div class=\"error\"><p>' . $message . '</p></div>';\n\t}", "function ccfm_error() { ?>\n <div class=\"error\">\n <p><?php _e( 'You do not have permission to do that.', 'ccfm' ); ?></p>\n </div>\n<?php\n}", "function print_signup_link() {\n\t\tglobal $g_allow_signup;\n\n\t\tif ( $g_allow_signup != 0 ) {\n\t\t\tPRINT '<br /><div align=\"center\">';\n\t\t\tprint_bracket_link( 'index.php?m=webtracking&a=signup_page', lang_get( 'signup_link' ) );\n\t\t\tPRINT '</div>';\n\t\t}\n\t}", "public function invalid_xrp()\n {\n _e('<div class=\"notice notice-error\"><p>The specified <b>XRP Account</b> and/or <b>XRPL Webhook</b> details are invalid. Please correct these for <b>WooCommerce XRP</b> to work properly.</p></div>', 'wc-gateway-xrp');\n }", "function purchase_key_notice(){\n if ( current_user_can( 'install_plugins' ) && !get_option( 'ead_envato_key' ) ) {\n $class = 'notice notice-error';\n $url = 'options-general.php?page=' . $this->settings_slug . '&tab=updates';\n $notice = sprintf( wp_kses( __( 'Please <a href=\"%s\">activate your copy</a> of Embed Any Document Plus to receive automatic updates.', 'embed-any-document-plus' ), array( 'a' => array( 'href' => array() ) ) ), esc_url( $url ) );\n printf( '<div class=\"%1$s\"><p>%2$s</p></div>', esc_attr( $class ), $notice ); \n }\n }", "public function show_admin_notice() {\n\n if( $this->statusmESSAGE!=='Active'){\n $class = 'notice notice-error';\n \t$message = 'Invalid license. Response: ' . $this->statusmESSAGE;\n\n \tprintf( '<div class=\"%1$s\"><p>%2$s</p></div>', esc_attr( $class ), $message );\n }\n }", "function yz_reset_profile_default_tab_msg() {\r\n\r\n\t// Get default tab\r\n $default_tab = get_option( 'yz_profile_default_tab' );\r\n\r\n\tif ( ! empty( $default_tab ) ) {\r\n\t\treturn false;\r\n\t}\r\n\r\n\t// Get Settings Url.\r\n\t$tabs_settings_url = admin_url( 'admin.php?page=yz-profile-settings&tab=tabs' );\r\n\r\n\t// Get Message Class.\r\n\t$class = 'notice notice-info is-dismissible';\r\n\r\n\t// Get Message Content.\r\n\t$message = sprintf( __( 'The default profile tab is deleted or does not exist, Please choose another one from the <a href=\"%s\">Profile Tabs Settings</a> !!', 'youzer' ), $tabs_settings_url );\r\n\r\n\t// Print Message.\r\n\tprintf( '<div class=\"%1$s\"><strong><p>%2$s</p></strong></div>', esc_attr( $class ), $message );\r\n\r\n\r\n}", "public function printMessage() {\r\n\t\t$usermsg = '';\r\n\t\t$code = $this->getCode();\r\n\t\t\r\n\t\tswitch($code) {\r\n\t\t\tcase SOME_DEFINED_ERROR_CODE:\r\n\t\t\t\t$usermsg = 'Ooops! Sorry about that.';\r\n\t\t\t\tbreak;\r\n\t\t\tcase OTHER_DEFINED_ERROR_CODE:\r\n\t\t\t\t$usermsg = \"Drat\";\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\t$usermsg = file_get_contents('/templates/general_error.html');\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\treturn $usermsg;\r\n\t}", "public function message()\n {\n return 'Not available.';\n }", "function admin_notices() {\n\t\t\tsettings_errors( 'wpex_tweaks_notices' );\n\t\t}", "public function showAccount(){\n $this->get_session();\n\n // Generate navigational items\n $menu = $this->menu($this->bootstrap, [\"active\" => \"/staff/account/\", \"align\" => \"stacked\"], $_SESSION['type']);\n $breadcrumbs = $this->breadcrumbs($this->bootstrap, [$_SESSION[\"staff_name\"] => \"../account/\", \"Mijn account\" => \"#\"]);\n\n echo $this->templates->render(\"login::account\",\n [\n \"title\" => \"Tekstmijn | Mijn account\",\n \"page_title\" => \"Mijn account\", \"menu\" => $menu, \"breadcrumbs\" => $breadcrumbs,\n \"name\" => $_SESSION[\"staff_name\"], \"email\" => $_SESSION[\"staff_email\"], \"type\" => $_SESSION[\"type\"],\n \"page_js\" => \"../vendor/application/register_validate.js\"\n ]\n );\n }", "function render_account_section( $args ) {\n\t\tesc_html_e( 'Select a Wordpress account for Tidal-contributed content.', 'tidal' );\n\t}", "public function message()\n {\n return '账号密码错误';\n }", "function showNotice()\n\t{\n\t\t$lng = new ilLanguage($_GET[\"lang\"]);\n\t\t\n\t\tif (!$this->isSelection() or $this->isValidSelection())\n\t\t{\n\t\t\treturn '';\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $lng->txt(\"shib_invalid_home_organization\");\n\t\t}\n\t}" ]
[ "0.69007385", "0.67499197", "0.6482895", "0.639338", "0.63436353", "0.63403136", "0.6279274", "0.61977506", "0.6195419", "0.6188204", "0.6185512", "0.61759293", "0.6169478", "0.6131056", "0.6105589", "0.6087772", "0.60835606", "0.6077466", "0.6047875", "0.60214466", "0.60066426", "0.59768283", "0.59740543", "0.59537435", "0.5950726", "0.5949845", "0.59457594", "0.59421134", "0.59186757", "0.5890311", "0.5889853", "0.5882433", "0.58648455", "0.58623874", "0.58445317", "0.5824744", "0.58007336", "0.5799741", "0.57951224", "0.5791266", "0.5783149", "0.5762165", "0.5759459", "0.5749447", "0.57431865", "0.57339716", "0.5729515", "0.57267094", "0.57240456", "0.57212365", "0.5718246", "0.5709896", "0.56960756", "0.56917465", "0.56910056", "0.5687154", "0.568012", "0.5668793", "0.56616116", "0.5646229", "0.56410986", "0.5628871", "0.5627096", "0.5624949", "0.5623175", "0.5622303", "0.56204087", "0.5617878", "0.56131965", "0.5605093", "0.55995977", "0.5595762", "0.5583289", "0.55797017", "0.5571562", "0.5565644", "0.5563877", "0.5561042", "0.5557189", "0.55494183", "0.554928", "0.55407846", "0.5535582", "0.5535467", "0.5532392", "0.5526454", "0.55244994", "0.552337", "0.552151", "0.55201066", "0.5514849", "0.5512731", "0.55100936", "0.5509372", "0.5502646", "0.54991263", "0.5496783", "0.54938716", "0.548785", "0.54847294" ]
0.83492523
0
sellercosts is the shippingrate total in case
sellercosts является общим стоимостью доставки в случае
protected function getSellercosts() { $shippingAddress = $this->getQuote()->getShippingAddress(); $shippingCost = $shippingAddress->getData("base_shipping_amount"); $shippingTaxR = $shippingAddress->getData("base_shipping_tax_amount"); //the sellercosts is float type return floatval($shippingCost + $shippingTaxR); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getShippingCosts()\n {\n $session = Shopware()->Session();\n $country = [ 'id' => $session['sCountry'] ];\n $payment = Shopware()->Container()->get('MoptPayoneMain')->getPaymentHelper()->getPaymentPaydirektExpress();\n if (empty($country) || empty($payment)) {\n return ['brutto' => 0, 'netto' => 0];\n }\n $shippingcosts = Shopware()->Modules()->Admin()->sGetPremiumShippingcosts($country);\n return empty($shippingcosts) ? ['brutto' => 0, 'netto' => 0] : $shippingcosts;\n }", "private function getTotalCost() : Float {\n $grossTotal = 0;\n foreach( $this->selectedProducts as $product ) {\n $grossTotal += $product['product']->getPrice() * $product['qty'];\n }\n $grossTotal = parent::applyOffers($this->selectedProducts, $grossTotal);\n $shippingCost = $this->getShippingCost($grossTotal);\n return number_format($grossTotal + $shippingCost, 2);\n }", "public function getAtiShippingCost();", "public function getNetShippingCost();", "protected function getShippingCosts()\n\t{\n\t\tif($this->quote->getShippingAddress()->getShippingMethod() != null){\n\n\t\t\t$taxRate = Mage::helper('klarnaCheckout')->getShippingVatRate($this->quote);\n\t\t\t$shippingAddress = $this->quote->getShippingAddress();\n\n\t\t\tif($shippingAddress->getBaseShippingDiscountAmount())\n\t\t\t\t$this->discounted += $shippingAddress->getBaseShippingDiscountAmount();\n\n\t\t\t$this->cart[] = array(\n\t\t\t\t'type' => 'shipping_fee',\n\t\t\t\t'reference' => 'shipping_fee',\n\t\t\t\t'name' => $shippingAddress->getShippingDescription(),\n\t\t\t\t'quantity' => 1,\n\t\t\t\t'unit_price' => $this->helper->formatPriceForKlarna($shippingAddress->getBaseShippingInclTax()),\n\t\t\t\t'tax_rate' => (int)($taxRate * 100),\n\t\t\t\t'total_tax_amount' => $this->helper->formatPriceForKlarna($shippingAddress->getBaseShippingTaxAmount()),\n\t\t\t\t'total_discount_amount' => $this->helper->formatPriceForKlarna($shippingAddress->getBaseShippingDiscountAmount()),\n\t\t\t\t'total_amount' => $this->helper->formatPriceForKlarna($shippingAddress->getBaseShippingInclTax())\n\t\t\t);\n\t\t}\n\t}", "public function getOrderShippingCost($params, $shipping_cost)\n\t{\n\t\tglobal $cart;\n\t\t$currency_id=$cart->id_currency;\t\t\n\t\t$RataConversie = Db::getInstance()->getRow('select conversion_rate from '._DB_PREFIX_.'currency where id_currency = '.$currency_id.'');\n\t\t$RataConversie[\"conversion_rate\"]=round((float)$RataConversie[\"conversion_rate\"],4);\n\t\t\n\t\t//selectare rata conversie leu\n\t\t$RataConversieLeu = Db::getInstance()->getRow('select conversion_rate from '._DB_PREFIX_.'currency where iso_code=\"RON\"');\n\t\t$RataConversieLeu[\"conversion_rate\"]=round((float)$RataConversieLeu[\"conversion_rate\"],4);\n\t\t\n\t\t//echo $RataConversieLeu[\"conversion_rate\"];\n\t\t\n\t\t\n\t\tif (!Configuration::get('fancourier_enabled')) {\n\t\t\treturn false;\n\t\t}\n\n $suma_fixa = Configuration::get('fancourier_suma_fixa');\n\n if (!isset($this->context->cart)) {\n if (isset($suma_fixa) and $suma_fixa!='' and is_numeric($suma_fixa)){\n return $suma_fixa;\n } else {\n $delivery_info = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('select * from `'._DB_PREFIX_.'fancourier_delivery_info` where id_cart = \\''.($params->id).'\\'');\n foreach ($delivery_info as $delivery)\n {\n $shipping_cost = $shipping_cost + $delivery[\"price\"];\n return $shipping_cost;\n }\n }\n }\n \n $address = new Address((int)($this->context->cart->id_address_delivery));\n \n $username = Configuration::get('fancourier_username');\n $parola = Configuration::get('fancourier_password');\n $clientid = Configuration::get('fancourier_clientid');\n $parcel = Configuration::get('fancourier_parcel');\n $labels = Configuration::get('fancourier_labels');\n $ramburs = Configuration::get('fancourier_ramburs');\n $content = Configuration::get('fancourier_content');\n $serviciu = Configuration::get('fancourier_serviciu');\n $paymentdest = Configuration::get('fancourier_paymentdest');\n $paymentrbdest = Configuration::get('fancourier_paymentrbdest');\n $payment0 = Configuration::get('fancourier_payment0');\n $min_gratuit = Configuration::get('fancourier_min_gratuit');\n \n\t \t\t\t//transformare minim gratuit in orice valuta \n if (is_numeric($min_gratuit))\n {\n $min_gratuit=($min_gratuit*$RataConversie[\"conversion_rate\"])/$RataConversieLeu[\"conversion_rate\"];\n }\n \n $observatii = Configuration::get('fancourier_comment');\n\t\t\t\t//boby 02.05.2014 afisare persoana de contact expeditor\n\t\t\t\t$pers_contact_expeditor = Configuration::get('pers_contact_expeditor');\n\t\t\t\t//end boby\n\t\t\t\t//boby 05.05.2014 deschidere la livrare\n\t\t\t\t$optiuni = Configuration::get('deschidere_livrare');\n\t\t\t\t//end boby\n $asigurare = Configuration::get('fancourier_asigurare');\n $totalrb = Configuration::get('fancourier_totalrb');\n $onlyadm = Configuration::get('fancourier_onlyadm');\n $fara_tva = Configuration::get('fancourier_fara_tva');\n\t\t\t\t//fara km suplimentari\n\t\t\t\t//$fara_km = Configuration::get('fancourier_fara_km');\n\t\t\t\t//doar km suplimentari\n\t\t\t\t$doar_km = Configuration::get('fancourier_doar_km');\n\t\t\t\t\n $msg = \"Comanda nu a fost procesata de catre FAN Courier.<br>Va rugam sa corectati datele de livrare conform mesajului de mai jos: <br><br>\";\n\n $url = 'http://www.selfawb.ro/order.php';\n $c = curl_init ($url);\n curl_setopt ($c, CURLOPT_POST, true);\n curl_setopt ($c, CURLOPT_POSTFIELDS, \"username=$username&user_pass=$parola&client_id=$clientid&return=services\");\n curl_setopt ($c, CURLOPT_RETURNTRANSFER, true);\n $page = curl_exec ($c);\n curl_close ($c);\n\n //$servicii_data = str_getcsv($page,\"\\n\"); // COMPATIBIL PENTRU VERSIUNE PHP > 5.3.X\n $servicii_data = explode(\"\\n\",ltrim(rtrim($page))); // COMPATIBIL PENTRU VERSIUNE PHP < 5.2.X\n\n foreach($servicii_data as $tip_serviciu_info){\n $tip_serviciu_info = str_replace('\"','',$tip_serviciu_info);\n $tip_serviciu = explode(\",\",$tip_serviciu_info);\n\n if ('FAN Courier - '.$tip_serviciu[0] == $serviciu){\n $contcolector = $tip_serviciu[1];\n if ($contcolector==1) $ramburs=1;\n $redcode = $tip_serviciu[2];\n $express = $tip_serviciu[3];\n }\n }\n\n $method_data = array();\n $error = '';\n\n if (is_numeric($min_gratuit)) $min_gratuit = $min_gratuit + 0; else $min_gratuit = 0 + 0;\n\n if ($parcel){\n $plic=\"0\";\n if (is_numeric($labels)){\n $colet=$labels;\n } else {\n $colet=1;\n }\n } else {\n $colet=\"0\";\n if (is_numeric($labels)){\n $plic=$labels;\n } else {\n $plic=1;\n }\n }\n\n if ($totalrb){\n $totalrb = \"1\";\n } else {\n $totalrb = \"0\";\n }\n\n if ($asigurare){\n $valoaredeclarata = number_format(round((float)$this->context->cart->getOrderTotal(true, Cart::BOTH_WITHOUT_SHIPPING),2), 2, '.', '');\n } else {\n $valoaredeclarata = 0;\n }\n\n $greutate = number_format(round((float)$this->context->cart->getTotalWeight(),0), 0, '.', '');\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\tif ($greutate>1)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$plic=0;\n\t\t\t\t\t\t\t\t\t\tif (is_numeric($labels))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$colet=$labels;\n\t\t\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\t\t\telse \n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$colet=1;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\n if (round((float)$this->context->cart->getTotalWeight(),0)>5) $redcode = false;\n\n $lungime=0;\n $latime=0;\n $inaltime=0;\n \n if ($paymentdest){\n $plata_expeditiei=\"destinatar\";\n }else{\n $plata_expeditiei=\"expeditor\";\n }\n\n $rambursare = '';\n $rambursare_number = 0 + 0;\n\n $plata_expeditiei_ramburs = \"\";\n\n if ($ramburs or $contcolector){\n if ($contcolector){\n $rambursare = number_format(round((float)$this->context->cart->getOrderTotal(true, Cart::BOTH_WITHOUT_SHIPPING),2), 2, '.', '');\n $rambursare_number = round((float)$this->context->cart->getOrderTotal(true, Cart::BOTH_WITHOUT_SHIPPING),2)+0;\n if ($paymentrbdest){\n $plata_expeditiei_ramburs=\"destinatar\";\n }else{\n $plata_expeditiei_ramburs=\"expeditor\";\n }\n } else {\n $rambursare = (string)number_format(round((float)$this->context->cart->getOrderTotal(true, Cart::BOTH_WITHOUT_SHIPPING),2), 2, '.', '').\" LEI\";\n $rambursare_number = round((float)$this->context->cart->getOrderTotal(true, Cart::BOTH_WITHOUT_SHIPPING),2)+0;\n if ($paymentrbdest){\n $plata_expeditiei_ramburs=\"destinatar\";\n }else{\n $plata_expeditiei_ramburs=\"expeditor\";\n }\n }\n } else {\n $rambursare_number = round((float)$this->context->cart->getOrderTotal(true, Cart::BOTH_WITHOUT_SHIPPING),2)+0;\n }\n\n $localitate_dest = $address->city;\n\n if ($address->id_state!=0 and is_numeric($address->id_state)){\n $state_info = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('select name from `'._DB_PREFIX_.'state` where id_state = \\''.($address->id_state).'\\'');\n foreach ($state_info as $state)\n {\n $judet_dest = $state[\"name\"];\n }\n } else {\n $judet_dest = 'Bucuresti';\n }\n\n $localitate_dest = trim($localitate_dest);\n \n $judet_dest = trim($judet_dest);\n \n //$pers_contact_expeditor = '';\n\n $continut='';\n if ($content){\n $continut = \"\";\n foreach($this->context->cart->getProducts() as $Products){\n //$continut = $continut.', '.$Products[\"category\"];\n\t\t\t\t\t\t$continut = $continut.', '.$Products[\"quantity\"].' x '.$Products[\"name\"];\n }\n if ($continut!='') $continut = substr($continut, 2, 35);\n\n }\n\n if(trim($address->company)!=''){\n $nume_destinatar =$address->company;\n $persoana_contact = $address->firstname.\" \".$address->lastname;\n } else {\n $nume_destinatar = $address->firstname.\" \".$address->lastname;\n $persoana_contact = '';\n }\n\n $telefon = $address->phone;\n if (!is_null($address->phone_mobile) and $address->phone_mobile!='') $telefon=$telefon.\" / \".$address->phone_mobile;\n \n\n $strada = $address->address1;\n if ($address->address2!=''){\n $strada = $strada.\", \".$address->address2;\n }\n\n $postalcode = str_pad($address->postcode, 6 ,\"0\");\n\n $url = 'http://www.selfawb.ro/order.php';\n $c = curl_init ($url);\n curl_setopt ($c, CURLOPT_POST, true);\n curl_setopt ($c, CURLOPT_POSTFIELDS, \"username=$username&user_pass=$parola&client_id=$clientid&return=services\");\n curl_setopt ($c, CURLOPT_RETURNTRANSFER, true);\n $page = curl_exec ($c);\n curl_close ($c);\n\n //$servicii_data = str_getcsv($page,\"\\n\"); // COMPATIBIL PENTRU VERSIUNE PHP > 5.3.X\n $servicii_data = explode(\"\\n\",ltrim(rtrim($page))); // COMPATIBIL PENTRU VERSIUNE PHP < 5.2.X\n\n foreach($servicii_data as $tip_serviciu_info){\n $tip_serviciu_info = str_replace('\"','',$tip_serviciu_info);\n $tip_serviciu = explode(\",\",$tip_serviciu_info);\n if ('FAN Courier - '.$tip_serviciu[0] == $serviciu){\n if ((!$contcolector or round($ramburs, 0)==0)){\n if ($tip_serviciu[1]==0 and (($tip_serviciu[2]==0 and $tip_serviciu[3]==0) or ($tip_serviciu[2]==1 and $redcode) or ($tip_serviciu[3]==1 and $express))){\n \t\t// alex g 22.04.2014\n \t\tif (!($payment0) and ($min_gratuit>$rambursare_number or $min_gratuit==0)) {} else {$suma_fixa=0; $totalrb=0;}\n \t\t//sfarsit alex g\n $url = 'http://www.selfawb.ro/order.php';\n $c = curl_init ($url);\n curl_setopt ($c, CURLOPT_POST, true);\n curl_setopt ($c, CURLOPT_POSTFIELDS, \"username=$username&user_pass=$parola&client_id=$clientid&plata_expeditiei=$plata_expeditiei&tip_serviciu=$tip_serviciu[0]&localitate_dest=$localitate_dest&judet_dest=$judet_dest&plic=$plic&colet=$colet&greutate=$greutate&lungime=$lungime&latime=$latime&inaltime=$inaltime&valoare_declarata=$valoaredeclarata&plata_ramburs=$plata_expeditiei_ramburs&ramburs=$rambursare&pers_contact_expeditor=$pers_contact_expeditor&observatii=$observatii&continut=$continut&nume_destinatar=$nume_destinatar&persoana_contact=$persoana_contact&telefon=$telefon&strada=$strada&postalcode=$postalcode&totalrb=$totalrb&admin=$onlyadm&fara_tva=$fara_tva&suma_fixa=$suma_fixa&doar_km=$doar_km&optiuni=$optiuni\");\n curl_setopt ($c, CURLOPT_RETURNTRANSFER, true);\n $page = curl_exec ($c);\n curl_close ($c);\n $price = explode(\"|||\",$page);\n if (!($payment0) and ($min_gratuit>$rambursare_number or $min_gratuit==0)) {$price_standard = $price[0];} else {$price_standard = 0;$suma_fixa=0;}\n $link_standard = $price[1];\n if (is_numeric($price_standard) and $link_standard!=\"\")\n\t\t\t\t\t\t\t\t\t\t{\n// file_put_contents('C:/xampp/php/logs/log5.txt', 'FAN_PRICE'.$this->context->cart->id);\n //if (isset($suma_fixa) and $suma_fixa!='' and is_numeric($suma_fixa)){\n // Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'fancourier_delivery_info WHERE id_cart = \\''.($this->context->cart->id).'\\'');\n // Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'fancourier_delivery_info VALUE (\\''.($this->context->cart->id).'\\',\\''.($suma_fixa).'\\',\\''.($link_standard).'\\')'); \n // $_SESSION['cost']=$shipping_cost;\n // return ($shipping_cost*$RataConversie[\"conversion_rate\"])/$RataConversieLeu[\"conversion_rate\"];\n //} else {\n Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'fancourier_delivery_info WHERE id_cart = \\''.($this->context->cart->id).'\\'');\n Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'fancourier_delivery_info VALUE (\\''.($this->context->cart->id).'\\',\\''.($price_standard).'\\',\\''.($link_standard).'\\')');\n $shipping_cost = $shipping_cost + $price_standard;\n $_SESSION['cost']=$shipping_cost;\n return ($shipping_cost*$RataConversie[\"conversion_rate\"])/$RataConversieLeu[\"conversion_rate\"];\n //}\n }\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t{\n Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'fancourier_delivery_info WHERE id_cart = \\''.($this->context->cart->id).'\\'');\n $shipping_cost=99999;\n $_SESSION['cost']=$shipping_cost;\n return false;\n }\n }\n unset($tip_serviciu);\n } else {\n $tip_serviciu = explode(\",\",$tip_serviciu_info);\n if ($tip_serviciu[1]==1 and (($tip_serviciu[2]==0 and $tip_serviciu[3]==0) or ($tip_serviciu[2]==1 and $redcode) or ($tip_serviciu[3]==1 and $express))){\n \t\t// alex g 22.04.2014\n \t\tif (!($payment0) and ($min_gratuit>$rambursare_number or $min_gratuit==0)) {} else {$suma_fixa=0; $totalrb=0;}\n \t\t//sfarsit alex g\n $url = 'http://www.selfawb.ro/order.php';\n $c = curl_init ($url);\n curl_setopt ($c, CURLOPT_POST, true);\n curl_setopt ($c, CURLOPT_POSTFIELDS, \"username=$username&user_pass=$parola&client_id=$clientid&plata_expeditiei=$plata_expeditiei&tip_serviciu=$tip_serviciu[0]&localitate_dest=$localitate_dest&judet_dest=$judet_dest&plic=$plic&colet=$colet&greutate=$greutate&lungime=$lungime&latime=$latime&inaltime=$inaltime&valoare_declarata=$valoaredeclarata&plata_ramburs=$plata_expeditiei_ramburs&ramburs=$rambursare&pers_contact_expeditor=$pers_contact_expeditor&observatii=$observatii&continut=$continut&nume_destinatar=$nume_destinatar&persoana_contact=$persoana_contact&telefon=$telefon&strada=$strada&postalcode=$postalcode&totalrb=$totalrb&admin=$onlyadm&fara_tva=$fara_tva&suma_fixa=$suma_fixa&doar_km=$doar_km&optiuni=$optiuni\");\n curl_setopt ($c, CURLOPT_RETURNTRANSFER, true);\n $page = curl_exec ($c);\n curl_close ($c);\n $price = explode(\"|||\",$page);\n if (!($payment0) and ($min_gratuit>$rambursare_number or $min_gratuit==0)) {$price_standard = $price[0];} else {$price_standard = 0;$suma_fixa=0;}\n $link_standard = $price[1];\n if (is_numeric($price_standard) and $link_standard!=\"\")\n\t\t\t\t\t\t\t\t\t\t{\n// file_put_contents('C:/xampp/php/logs/log5.txt', 'FAN_PRICE'.$this->context->cart->id);\n //if (isset($suma_fixa) and $suma_fixa!='' and is_numeric($suma_fixa)){\n // Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'fancourier_delivery_info WHERE id_cart = \\''.($this->context->cart->id).'\\'');\n // Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'fancourier_delivery_info VALUE (\\''.($this->context->cart->id).'\\',\\''.($suma_fixa).'\\',\\''.($link_standard).'\\')');\n //$shipping_cost = $shipping_cost + $suma_fixa;\n\t\t\t\t\t\t\t\t\t\t\t\t // $shipping_cost = $shipping_cost + $price_standard;\n // $_SESSION['cost']=$shipping_cost;\n // return ($shipping_cost*$RataConversie[\"conversion_rate\"])/$RataConversieLeu[\"conversion_rate\"];\n //} \n\t\t\t\t\t\t\t\t\t\t\t\t//else \n\t\t\t\t\t\t\t\t\t\t\t\t//{ \n Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'fancourier_delivery_info WHERE id_cart = \\''.($this->context->cart->id).'\\'');\n Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'fancourier_delivery_info VALUE (\\''.($this->context->cart->id).'\\',\\''.($price_standard).'\\',\\''.($link_standard).'\\')');\n $shipping_cost = $shipping_cost + $price_standard;\n $_SESSION['cost']=$shipping_cost;\n return ($shipping_cost*$RataConversie[\"conversion_rate\"])/$RataConversieLeu[\"conversion_rate\"];\n //}\n }\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t{\n \t \n Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'fancourier_delivery_info WHERE id_cart = \\''.($this->context->cart->id).'\\'');\n //echo var_dump($params); exit;\n $shipping_cost=99999;\n $_SESSION['cost']=$shipping_cost;\n //echo $_SESSION['cost'];\n \t//echo $shipping_cost; \n return false;\n }\n }\n unset($tip_serviciu);\n }\n }\n }\n \n return false;\n\n\t}", "protected function getShippingCosts()\n\t{\n\t\tif($this->quote->getShippingAddress()->getShippingMethod() != null){\n\n\t\t\t$taxRate = $this->helper->getShippingVatRate($this->quote);\n\t\t\t$shippingAddress = $this->quote->getShippingAddress();\n\t\t\t$discountRate = 0;\n\n\t\t\tif($shippingAddress->getBaseShippingDiscountAmount()){\n\t\t\t\t$discountRate = $shippingAddress->getBaseShippingInclTax() == 0\n\t\t\t\t\t? 100\n\t\t\t\t\t: $shippingAddress->getBaseShippingDiscountAmount() / ($shippingAddress->getBaseShippingInclTax() / 100);\n\t\t\t\t$this->discounted += $shippingAddress->getBaseShippingDiscountAmount();\n\t\t\t}\n\n\t\t\t$shippingCosts = array(\n\t\t\t\t'type' => 'shipping_fee',\n\t\t\t\t'reference' => 'shipping_fee',\n\t\t\t\t'name' => $shippingAddress->getShippingDescription(),\n\t\t\t\t'quantity' => 1,\n\t\t\t\t'unit_price' => $this->helper->formatPriceForKlarna($shippingAddress->getBaseShippingInclTax()),\n\t\t\t\t'discount_rate' => $this->helper->formatPriceForKlarna($discountRate),\n\t\t\t\t'tax_rate' => $this->helper->formatPriceForKlarna($taxRate)\n\t\t\t);\n\n\t\t\t$this->cart[] = $shippingCosts;\n\t\t}\n\t}", "public function getPayPalPaymentCosts()\n {\n }", "public function getCost() {\n\t\tif (isset($_SESSION['authenticated_user'])) {\n\t\t\t$cartitems = CartBasket::getUserCartBaskets($_SESSION['authenticated_user']->getId());\n\t\t} else {\n\t\t\t$cartitems = CartBasket::getUserCartBaskets();\n\t\t}\n\t\t\n\t\t$totalAmount = 0.00;\n\t\t$palletCount = 0.00;\n\t\tforeach ($cartitems as $item) {\n\t\t\t$totalAmount += $item->getPrice() * $item->getQuantity();\n\t\t\tif ($item->getProduct()->getPalletCount() != 0){\n\t\t\t\t$palletCount += $item->getQuantity() / $item->getProduct()->getPalletCount();\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$palletCount += 0;\n\t\t\t}\n\t\t}\n\t\t$palletCount = ceil($palletCount);//Round up the number of pallets to an integer number\n\t\tif ($totalAmount >= 1000)\n\t\t\treturn SiteConfig::get(\"Cart::ShippingCostMoreThan1000\") * $palletCount;\n\t\telseif ($totalAmount >= 500)\n\t\t\treturn SiteConfig::get(\"Cart::ShippingCostLessThan999\") * $palletCount;\n\t\telse\n\t\t\treturn SiteConfig::get(\"Cart::ShippingCostLessThan499\") * $palletCount;\n\t}", "public function getPayPalWrappingCosts()\n {\n }", "function calc_shipping_cost()\n {\n $SHIPEXPEDITE = 20;\n $SHIPREGULAR = 10;\n $total = 0;\n if ((isset ($_SESSION['shipping']['shipping_type'])) && (count($_SESSION['shipping']['shipping_type']) > 0)) {\n $shipping_type = $_SESSION['shipping']['shipping_type'];\n if ($shipping_type == 'expedite') {\n return $SHIPEXPEDITE;\n } else {\n return $SHIPREGULAR;\n }\n }\n return $total;\n }", "function calculateTotalStandard($cartObj){\n return $cartObj->getTotalCost() + $cartObj->getShippingCostStandard();\n}", "public function getShippingCost()\n {\n return 0.0;\n }", "public function getPayPalGiftCardCosts()\n {\n }", "public function resellerCost(): float\n {\n return (float) $this->resellercost;\n }", "function calculateDeliveryCosts() {\n \t \t\n \t/**\n \t * Just one Hook\n \t * as there is no sence for mor than one delievery cost claculation\n \t */\n \t$hookObject='';\n\t\t\tif (($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/lib/class.tx_commerce_article.php']['calculateDeliveryCost'])) {\n\t\t\t\t\n\t\t\t\t$hookObject = &t3lib_div::getUserObj($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/lib/class.tx_commerce_article.php']['calculateDeliveryCost']);\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t}\n \n\t\t\tif (method_exists($hookObject, 'calculateDeliveryCostNet')) {\n\t\t\t\t\t$hookObject->calculateDeliveryCostNet($this->deliveryCostNet,$this);\n\t\t\t}\n\t\t\t \n\t\t\n\t\t\tif (method_exists($hookObject, 'calculateDeliveryCostGross')) {\n\t\t\t\t\t$hookObject->calculateDeliveryCostGross($this->deliveryCostGross,$this);\n\t\t\t}\n\t\t\t \t\n \t\n }", "public function getTotalShipping()\n {\n $salesFlatOrderItem = Mage::getSingleton('core/resource')->getTableName('sales_flat_order_item');\n $write = Mage::getSingleton('core/resource')->getConnection('core_write'); \n $supplierId = Mage::getSingleton('admin/session')->getUser()->getUserId();\n $orderId = Mage::app()->getRequest()->getParam('order_id');\n $select = \"SELECT sum(`or`.`shipping_rate`) as total_shipping, sum(`or`.`row_total_incl_tax` + `or`.`shipping_rate`) as order_total, sum(`or`.`base_shipping_rate`) as base_total_shipping, sum(`or`.`base_row_total_incl_tax` + `or`.`base_shipping_rate`) as base_order_total FROM `\".$salesFlatOrderItem.\"` as `or` WHERE (or.supplier_id= \".$supplierId.\" and `or`.`order_id` = \".$orderId .\" )\";\n $result = $write->fetchRow($select);\n if(count($result)>0) {\n $total['total_shipping'] = $result['total_shipping'];\n $total['order_total'] = $result['order_total'];\n\t\t\t$total['base_total_shipping'] = $result['base_total_shipping'];\n $total['base_order_total'] = $result['base_order_total'];\n } else {\n $total['total_shipping'] = 0;\n $total['order_total'] = 0;\n\t\t\t$total['base_total_shipping'] = 0;\n $total['base_order_total'] = 0;\n\t\t}\t\n return $total;\n }", "function calc_cart_total_shipping() {\r\n\t\t$this->shipping_is_set = false;\r\n\r\n\t\t$totalshipping = 0;\r\n\t\t$totalhandling = 0;\r\n\t\t$shippingGroups = array();\r\n\r\n\t\tif ($this->have_shipping_params()) {\t\t\t\r\n\t\t\tforeach ($this->items as $item) {\r\n\t\t\t\tif (!$this->have_item_shipping_info($item)) {\r\n\t\t\t\t\t$this->totalshipping = 0;\r\n\t\t\t\t\t$this->totalhandling = 0;\r\n\t\t\t\t\t$this->shipping_is_set = false;\r\n\t\t\t\t\t$this->error = \"Item is missing shipping information, such as weight and dimensions.\";\r\n\t\t\t\t}\r\n\t\t\t\t// If in a group, then charge 2nd rate for more than 1 item\r\n\t\t\t\t$itemID = $item['itemID'];\r\n\t\t\t\tif ($item['itemShippingGroup'] > 0) {\r\n\t\t\t\t\tif ($shippingGroups[$item['itemShippingGroup']] < 1) {\r\n\t\t\t\t\t\t// 1st item in group (not identical items, but we group them for shipping, like prints)\r\n\t\t\t\t\t\t$totalshipping += $item['shipping'];\r\n\t\t\t\t\t\t$totalhandling += $item['handling'];\r\n\t\t\t\t\t\t$shippingGroups[$item['itemShippingGroup']]['shipping'] = $item['shipping'];\r\n\t\t\t\t\t\t$shippingGroups[$item['itemShippingGroup']]['shipping2'] = $item['shipping2'];\r\n\t\t\t\t\t\t$shippingGroups[$item['itemShippingGroup']]['handling'] = $item['handling'];\r\n\t\t\t\t\t\t// if the quantity of this one item is > 1, then we add costs of secondary items\r\n\t\t\t\t\t\t$totalshipping += $item['shipping2'] * ($item['itemQty'] - 1);\r\n\t\t\t\t\t\t// update item values for display and for shipper ordering (uses total of shipping, not quant * shipping)\r\n\t\t\t\t\t\t$this->items[$itemID]['item_display_shipping'] = $item['shipping'] + ($item['shipping2'] * ($item['itemQty'] - 1));\r\n\t\t\t\t\t\t$this->items[$itemID]['item_total_shipping'] = $item['shipping'] + ($item['shipping2'] * ($item['itemQty'] - 1));\r\n\t\t\t\t\t\t$this->items[$itemID]['item_display_handling'] = $item['handling'];\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// Additional items in the group (not identical items, but we group them for shipping, like prints)\r\n\t\t\t\t\t\t$totalshipping += $item['shipping2'];\r\n\t\t\t\t\t\t$shippingGroups[$item['itemShippingGroup']]['shipping'] += $item['shipping2'] * $item['itemQty'];\r\n\t\t\t\t\t\t// update item values for display and for shipper ordering (uses total of shipping, not quant * shipping)\r\n\t\t\t\t\t\t$this->items[$itemID]['item_display_shipping'] = $item['shipping2'] * ($item['itemQty'] - 1);\r\n\t\t\t\t\t\t$this->items[$itemID]['item_total_shipping'] = $item['shipping2'] * ($item['itemQty'] - 1);\r\n\t\t\t\t\t\t$this->items[$itemID]['item_display_handling'] = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Add quantity to the count of items in this group\r\n\t\t\t\t\t$shippingGroups[$item['itemShippingGroup']]['count'] += $item['itemQty'];\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Not in a group; charge full shipping/handling per item\r\n\t\t\t\t\t$totalshipping += $item['shipping'] * $item['itemQty'];\r\n\t\t\t\t\t$totalhandling += $item['handling'] * $item['itemQty'];\r\n\t\t\t\t\t// update item values for display and for shipper ordering (uses total of shipping, not quant * shipping)\r\n\t\t\t\t\t$this->items[$itemID]['item_display_shipping'] = $item['shipping'] * $item['itemQty'];\r\n\t\t\t\t\t$this->items[$itemID]['item_total_shipping'] = $item['shipping'] * $item['itemQty'];\r\n\t\t\t\t\t$this->items[$itemID]['item_display_handling'] = $item['handling'] * $item['itemQty'];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$this->totalshipping = $totalshipping;\r\n\t\t\t$this->totalhandling = $totalhandling;\r\n\t\t\t$this->shipping_is_set = true;\r\n\t\t} else {\r\n\t\t\t$this->totalshipping = 0;\r\n\t\t\t$this->totalhandling = 0;\r\n\t\t\t$this->shipping_is_set = false;\r\n\t\t}\r\n\t}", "public function getShippingAmount();", "public function getSumOfCostOfAllItemsPayPalBasket()\n {\n }", "protected function distributeShippingCost()\n {\n $totalShippingCost = 0;\n\n $modifier = $this->order->getModifier(\\XLite\\Model\\Base\\Surcharge::TYPE_SHIPPING, 'SHIPPING');\n\n if ($modifier) {\n $shippingRate = $modifier->getSelectedRate();\n\n if ($shippingRate && $shippingRate->getMethod()) {\n $totalShippingCost = $shippingRate->getTaxableBasis();\n $totalWeight = $modifier->getModifier()->getWeight();\n $orderSubtotal = $modifier->getModifier()->getSubtotal();\n $orderItems = $modifier->getModifier()->getItems();\n }\n }\n\n if (0 < $totalShippingCost) {\n // Order currency\n $currency = $this->getOrder()->getCurrency();\n\n // Initialize service variables\n $distributedSum = 0;\n $lastItemKey = null;\n\n foreach ($orderItems as $key => $item) {\n if ($item->isShippable()) {\n // Calculate item shipping cost\n $cost = $totalShippingCost\n * ($item->getWeight() / $totalWeight + $item->getSubtotal() / $orderSubtotal)\n / 2;\n\n // Set shipping cost for item\n $orderItems[$key]->setShippingCost($cost);\n\n // Update distributed shipping cost value\n $distributedSum += $cost;\n\n // Remember last used item\n $lastItemKey = $key;\n }\n }\n\n if ($distributedSum != $totalShippingCost) {\n // Correct last item's shipping cost\n $orderItems[$lastItemKey]->setShippingCost(\n $orderItems[$lastItemKey]->getShippingCost() + $totalShippingCost - $distributedSum\n );\n }\n }\n }", "public function collectRates(Mage_Shipping_Model_Rate_Request $request){\n if (!Mage::getStoreConfig('carriers/'.$this->_code.'/active')){\n return false;\n\t\t\t}\n $result = Mage::getModel('shipping/rate_result');\n $handling = 0;\n\t\t$session = Mage::getSingleton('checkout/session');\n\t\t$write = Mage::getSingleton('core/resource')->getConnection('core_write');\n\t\t$postcode=$session->getQuote()->getShippingAddress()->getPostcode();\n\t\t$countrycode=$session->getQuote()->getShippingAddress()->getCountry();\n\t\t$postcode=str_replace('-', '', $postcode);\n\t\t$shippingdetail=array();\n\t\tforeach ($session->getQuote()->getAllItems() as $item) {\n\t\t\t$proid=$item->getProductId();\n\t\t\t$collection=Mage::getModel('marketplace/product')\n\t\t\t\t->getCollection()->addFieldToFilter('mageproductid',array('eq'=>$proid));\n\t\t\tforeach($collection as $temp){\n\t\t\t\t$partner=$temp->getUserid();\n\t\t\t}\n\t\t\t$product=Mage::getModel('catalog/product')->load($proid)->getWeight();\n\t\t\t$weight=$product*$item->getQty();\n\t\t\tif(count($shippingdetail)==0){\n\t\t\t\tarray_push($shippingdetail,array('seller_id'=>$partner,'items_weight'=>$weight,'product_name'=>$item->getName()));\n\t\t\t}else{\n\t\t\t\t$shipinfoflag=true;\n\t\t\t\t$index=0;\n\t\t\t\tforeach($shippingdetail as $itemship){\n\t\t\t\t\tif($itemship['seller_id']==$partner){\n\t\t\t\t\t\t$itemship['items_weight']=$itemship['items_weight']+$weight;\n\t\t\t\t\t\t$itemship['product_name']=$itemship['product_name'].\",\".$item->getName();\n\t\t\t\t\t\t$shippingdetail[$index]=$itemship;\n\t\t\t\t\t\t$shipinfoflag=false;\n\t\t\t\t\t}\n\t\t\t\t\t$index++;\n\t\t\t\t}\n\t\t\t\tif($shipinfoflag==true){\n\t\t\t\t\tarray_push($shippingdetail,array('seller_id'=>$partner,'items_weight'=>$weight,'product_name'=>$item->getName()));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$shippinginfo=array();\n\t\tforeach($shippingdetail as $shipdetail){\n\t\t\t$shipping=Mage::getModel('mpshipping/mpshipping')\n\t\t\t\t\t\t\t\t\t\t->getCollection()\n\t\t\t\t\t\t\t\t\t\t->addFieldToFilter('dest_country_id',array('eq'=>$countrycode))\n\t\t\t\t\t\t\t\t\t\t->addFieldToFilter('partner_id',array('eq'=>$shipdetail['seller_id']))\n\t\t\t\t\t\t\t\t\t\t->addFieldToFilter('dest_zip',array('lteq'=>$postcode))\t\t\n\t\t\t\t\t\t\t\t\t\t->addFieldToFilter('dest_zip_to',array('gteq'=>$postcode))\n\t\t\t\t\t\t\t\t\t\t->addFieldToFilter('weight_from',array('lteq'=>$shipdetail['items_weight']))\n\t\t\t\t\t\t\t\t\t\t->addFieldToFilter('weight_to',array('gteq'=>$shipdetail['items_weight']));\n\t\t\tif(count($shipping)==0){\n\t\t\t\t$shipping=Mage::getModel('mpshipping/mpshipping')\n\t\t\t\t\t\t\t\t\t\t->getCollection()\n\t\t\t\t\t\t\t\t\t\t->addFieldToFilter('dest_country_id',array('eq'=>$countrycode))\n\t\t\t\t\t\t\t\t\t\t->addFieldToFilter('partner_id',array('eq'=>$shipdetail['seller_id']))\n\t\t\t\t\t\t\t\t\t\t->addFieldToFilter('dest_zip',array('eq'=>'*'))\t\t\n\t\t\t\t\t\t\t\t\t\t->addFieldToFilter('dest_zip_to',array('eq'=>'*'))\n\t\t\t\t\t\t\t\t\t\t->addFieldToFilter('weight_from',array('lteq'=>$shipdetail['items_weight']))\n\t\t\t\t\t\t\t\t\t\t->addFieldToFilter('weight_to',array('gteq'=>$shipdetail['items_weight']));\n\t\t\t}\n\t\t\tforeach($shipping as $ship){\n\t\t\t\t$price=$ship->getPrice();\n\t\t\t}\n\t\t\tif(count($shipping)==0){\n\t\t\t\t$msg=\"<span style='color:#ff0000;'>Seller Of Product <u>\".$shipdetail['product_name'].\"</u> Not Provide Shipping Service in Your Location</span>\";\n\t\t\t\tMage::getSingleton('core/session')->setShippingCustomError($msg);\n\t\t\t\treturn $result;\n\t\t\t}\n\t\t\t $handling= $handling+$price;\n\t\t\t array_push($shippinginfo,array('seller_id'=>$shipdetail['seller_id'],'shipping_ammount'=>$price));\n\t\t}\n\t\t\n\t\t/*store shipping in session*/\n\t\t$shippingAll=Mage::getSingleton('core/session')->getData('shippinginfo');\n\t\t$shippingAll[$this->_code]=$shippinginfo;\n\t\tMage::getSingleton('core/session')->setData('shippinginfo',$shippingAll);\n\t\t/*store shipping in session*/\n\t\t\n $method = Mage::getModel('shipping/rate_result_method');\n\t\t$method->setCarrier($this->_code);\n\t\t$method->setCarrierTitle(Mage::getStoreConfig('carriers/'.$this->_code.'/title'));\n /* Use method name */\n\t\t$method->setMethod($this->_code);\n\t $method->setMethodTitle(Mage::getStoreConfig('carriers/'.$this->_code.'/name'));\n\t\t$method->setCost($handling);\n\t\t$method->setPrice($handling); \n $result->append($method);\n return $result;\t\n }", "public function getShipmentPrice()\n { \n //get amount of every item\n return $this->_getItemAmount(); \n }", "function getShippingCost($method_id=\"\")\n {\n return 0;// it is used to output the modules in CZ. The unification. PRICE_N_A;\n }", "public function getShippingAmount()\n {\n }", "function fn_sdek_calculate_cost_by_shipment($order_info, $shipping_info, $shipment_info)\n{\n $total = $weight = 0;\n $length = $width = $height = SDEK_DEFAULT_DIMENSIONS;\n $sum_rate = 0;\n\n $shipping_info['module'] = $shipment_info['carrier'];\n\n $symbol_grams = Registry::get('settings.General.weight_symbol_grams');\n\n foreach ($shipment_info['products'] as $item_id => $amount) {\n $product = $order_info['products'][$item_id];\n\n $total += $product['subtotal'];\n\n $product_extra = db_get_row(\"SELECT shipping_params, weight FROM ?:products WHERE product_id = ?i\", $product['product_id']);\n\n $product_weight = fn_sdek_check_weight($product_extra['weight'], $symbol_grams);\n\n $p_ship_params = unserialize($product_extra['shipping_params']);\n\n $package_length = empty($p_ship_params['box_length']) ? $length : $p_ship_params['box_length'];\n $package_width = empty($p_ship_params['box_width']) ? $width : $p_ship_params['box_width'];\n $package_height = empty($p_ship_params['box_height']) ? $height : $p_ship_params['box_height'];\n $weight_ar = fn_expand_weight($product_weight);\n $weight = $weight_ar['plain'];\n\n $params_product['weight'] = $weight;\n $params_product['length'] = $package_length;\n $params_product['width'] = $package_width;\n $params_product['height'] = $package_height;\n\n foreach ($order_info['product_groups'] as $product_groups) {\n if (!empty($product_groups['products'][$item_id])) {\n $products[$item_id] = $product_groups['products'][$item_id];\n $products[$item_id] = array_merge($products[$item_id], $params_product);\n $products[$item_id]['amount'] = $amount;\n }\n\n $shipping_info['package_info'] = $product_groups['package_info'];\n }\n }\n\n $data_package = Shippings::groupProductsList($products, $shipping_info['package_info']['location']);\n $data_package = reset($data_package);\n $shipping_info['package_info_full'] = $data_package['package_info_full'];\n $shipping_info['package_info'] = $data_package['package_info_full'];\n\n $sum_rate = Shippings::calculateRates(array($shipping_info));\n $sum_rate = reset($sum_rate);\n $result = $sum_rate['price'];\n\n return $result;\n}", "static function getTotals(&$vars) {\n\t\t//$vars['db']['handler']->getData($vars, 'SELECT * FROM ASDASD fdk');\n\t\t//tpt_dump('asdasdass', true);\n\t\t$pricingObjects = array();\n\t\t$inhouse = array();\n\t\t$overseas = array();\n\t\t$stockcustom = array();\n\t\t//if($_SERVER['REMOTE_ADDR'] == '109.120.245.125') var_dump(self::$products);die();\n\n\n\t\tforeach(self::$products as $product) {\n\t\t\t\t//if($_SERVER['REMOTE_ADDR'] == '109.120.245.125') var_dump($product);\n\t\t\t\t//if (is_a($product, 'amz_customStockproduct')) {\n\t\t\t\t//}\n\t\t\t\tif(is_a($product, 'amz_customproduct')) {\n\t\t\t\t\t//if($_SERVER['REMOTE_ADDR'] == '109.120.245.125') $pricingObjects[] = $product->pricingObject;\n\t\t\t\t\tif(($product->data['band_style'] != 7)) {\n\t\t\t\t\t\t$price_modifiers = self::processPriceModifiers($vars, array(), $product);\n\n\n\t\t\t\t\t\t$product->pricingObject->regenerate($vars, null, null, null, $price_modifiers, null);\n\t\t\t\t\t}\n\n\t\t\t\t\t/*\n\t\t\t\t\tif(($_SERVER['REMOTE_ADDR'] == '109.160.0.218') && ($_GET['debug'] == 'debug')) {\n\t\t\t\t\t\t//var_dump($this->pricingTable);//die();\n\t\t\t\t\t\t//var_dump($this->total_qty);//die();\n\t\t\t\t\t\tvar_dump($product->pricingObject);\n\t\t\t\t\t\t//var_dump(count($mfgcosts));//die();\n\t\t\t\t\t\t//var_dump($mfgcosts[count($mfgcosts)-1]);//die();\n\t\t\t\t\t\t//var_dump($mfg_costs);//die();\n\t\t\t\t\t\t//var_dump($options_costs);//die();\n\t\t\t\t\t\t//var_dump($this->mfgcost);\n\n\t\t\t\t\t}\n\t\t\t\t\t*/\n\t\t\t\t\t$product->pricingObject->getPrice();\n\t\t\t\t\tif(!$product->pricingObject->pricingType) {\n\t\t\t\t\t\t$overseas[] = $product;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$inhouse[] = $product;\n\t\t\t\t\t\t/*\n\t\t\t\t\t\tif($_SERVER['REMOTE_ADDR'] != '109.160.0.218') {\n\t\t\t\t\t\t$values = array('sbase_price'=>$product->pricingObject->price['values']['customer_price_per_discounted'], 'mbase_price'=>$product->pricingObject->price['values']['customer_price_total_discounted']);\n\t\t\t\t\t\t$html = $values;\n\t\t\t\t\t\t//var_dump($html);\n\t\t\t\t\t\tarray_walk($html, 'format_price_array');\n\t\t\t\t\t\t$product->price = array('html'=>$html, 'values'=>$values);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t*/\n\t\t\t\t\t}\n\t\t\t\t} else if(is_a($product, 'amz_product2')) {\n\t\t\t\t\t//if($_SERVER['REMOTE_ADDR'] == '109.120.245.125') $pricingObjects[] = $product->pricingObject;\n\t\t\t\t\tif(($product->data['style'] != 7)) {\n\t\t\t\t\t\t$price_modifiers = self::processPriceModifiers($vars, array(), $product);\n\n\n\t\t\t\t\t\t$product->pricingObject->regenerate($vars, null, null, null, $price_modifiers, null);\n\t\t\t\t\t}\n\n\t\t\t\t\t/*\n\t\t\t\t\tif(($_SERVER['REMOTE_ADDR'] == '109.160.0.218') && ($_GET['debug'] == 'debug')) {\n\t\t\t\t\t\t//var_dump($this->pricingTable);//die();\n\t\t\t\t\t\t//var_dump($this->total_qty);//die();\n\t\t\t\t\t\tvar_dump($product->pricingObject);\n\t\t\t\t\t\t//var_dump(count($mfgcosts));//die();\n\t\t\t\t\t\t//var_dump($mfgcosts[count($mfgcosts)-1]);//die();\n\t\t\t\t\t\t//var_dump($mfg_costs);//die();\n\t\t\t\t\t\t//var_dump($options_costs);//die();\n\t\t\t\t\t\t//var_dump($this->mfgcost);\n\n\t\t\t\t\t}\n\t\t\t\t\t*/\n\t\t\t\t\t$product->pricingObject->getPrice();\n\t\t\t\t\tif(!$product->pricingObject->pricingType) {\n\t\t\t\t\t\t$overseas[] = $product;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$inhouse[] = $product;\n\t\t\t\t\t\t/*\n\t\t\t\t\t\tif($_SERVER['REMOTE_ADDR'] != '109.160.0.218') {\n\t\t\t\t\t\t$values = array('sbase_price'=>$product->pricingObject->price['values']['customer_price_per_discounted'], 'mbase_price'=>$product->pricingObject->price['values']['customer_price_total_discounted']);\n\t\t\t\t\t\t$html = $values;\n\t\t\t\t\t\t//var_dump($html);\n\t\t\t\t\t\tarray_walk($html, 'format_price_array');\n\t\t\t\t\t\t$product->price = array('html'=>$html, 'values'=>$values);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t*/\n\t\t\t\t\t}\n\t\t\t\t} else if (is_a($product, 'amz_customStockproduct')) {\n\t\t\t\t\t//$cur_result = amz_pricing::getStockProductPricing($vars, array($product->data['sku'], $product->qty));\n\t\t\t\t\t//$product->price = $cur_result;\n\t\t\t\t\t$stockcustom[] = $product;\n\n\t\t\t\t\t//$flatfee = true;\n\t\t\t\t}\n\t\t\t\t$pricingObjects[] = $product;\n\t\t}\n\n\t\t//if($_SERVER['REMOTE_ADDR'] == '109.120.245.125') var_dump($pricingObjects);\n\n\t\t//if($_SERVER['REMOTE_ADDR'] == '109.160.0.218') {\n\t\t$precision_subtotal = 0;\n\t\tself::$totals['pricing'] = amz_pricing::getBulkPricing($vars, $pricingObjects);\n\t\tif(!empty($stockcustom)) {\n\t\t\t\t//var_dump(amz_pricing::getBulkStockCustomPricing($vars, $stockcustom));die();\n\t\t\t\t//var_dump(self::$totals['pricing']);die();\n\t\t\t\tself::$totals['pricing']['values']['retail_price'] += amz_pricing::getBulkStockCustomPricing($vars, $stockcustom);\n\t\t\t\tself::$totals['pricing']['values']['customer_price'] += amz_pricing::getBulkStockCustomPricing($vars, $stockcustom);\n\t\t\t\tself::$totals['pricing']['values']['lowest_price'] += amz_pricing::getBulkStockCustomPricing($vars, $stockcustom);\n\t\t\t\t$precision_subtotal += amz_pricing::getBulkStockCustomPricing($vars, $stockcustom);\n\t\t\t\t//self::$totals['pricing']['values']['lowest_price_discounted'] += amz_pricing::getBulkStockCustomPricing($vars, $stockcustom);\n\t\t}\n\t\t//if($_SERVER['REMOTE_ADDR'] == '109.120.245.125') var_dump(self::$totals['pricing']);//die();\n\n\n\t\t//tpt_logger::dump($vars, self::$totals['pricing'], debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS), 'self::$totals[\\'pricing\\']', __FILE__.' '.__LINE__);\n\t\t$inhouse_total = 0;\n\t\t$inhouse_quantity = 0;\n\t\t$lowest_inhouse = null;\n\t\t$lowest_inhouse_products_price = 0;\n\t\t$overseas_total = 0;\n\t\t$overseas_quantity = 0;\n\t\t$lowest_overseas = null;\n\t\t$lowest_overseas_products_price = 0;\n\t\t//if($_SERVER['REMOTE_ADDR'] == '109.160.0.218') {\n\t\tforeach($inhouse as $product) {\n\t\t\t\tif(is_null($product->pricingObject->final_total) && (self::$totals['pricing']['values']['ihc'] < 1)) {\n\t\t\t\t\tif(defined('CART_INHOUSE_PRICE_TOTAL_RECALCULATE') && (CART_INHOUSE_PRICE_TOTAL_RECALCULATE == 1)) {\n\t\t\t\t\t\t$product_price = round($product->pricingObject->price['values']['lowest_price_per_discounted']*self::$totals['pricing']['values']['ihc'], CART_INHOUSE_PRICE_PER_DECIMALS);\n\t\t\t\t\t\t$products_price = round($product_price*$product->qty, CART_INHOUSE_PRICE_TOTAL_DECIMALS);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$products_price = round($product->pricingObject->price['values']['lowest_price_total_discounted']*self::$totals['pricing']['values']['ihc'], CART_INHOUSE_PRICE_TOTAL_DECIMALS);\n\t\t\t\t\t\t$product_price = round($products_price/$product->qty, CART_INHOUSE_PRICE_PER_DECIMALS);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif(defined('CART_INHOUSE_PRICE_TOTAL_RECALCULATE') && (CART_INHOUSE_PRICE_TOTAL_RECALCULATE == 1)) {\n\t\t\t\t\t\t$product_price = round($product->pricingObject->price['values']['lowest_price_per_discounted'], CART_INHOUSE_PRICE_PER_DECIMALS);\n\t\t\t\t\t\t$products_price = round($product_price*$product->qty, CART_INHOUSE_PRICE_TOTAL_DECIMALS);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$products_price = round($product->pricingObject->price['values']['lowest_price_total_discounted'], CART_INHOUSE_PRICE_TOTAL_DECIMALS);\n\t\t\t\t\t\t$product_price = round($products_price/$product->qty, CART_INHOUSE_PRICE_PER_DECIMALS);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//var_dump($product->pricingObject->price['values']);die();\n\t\t\t\t$values = array('sbase_price'=>$product_price, 'mbase_price'=>$products_price);\n\t\t\t\t$html = $values;\n\t\t\t\t//var_dump($html);\n\t\t\t\tarray_walk($html, 'format_price_array');\n\t\t\t\t//var_dump($product->pricingObject);die();\n\t\t\t\t$product->price = array('html'=>$html, 'values'=>$values);\n\t\t\t\t$precision_subtotal += $products_price;\n\t\t\t\t$inhouse_total += $products_price;\n\t\t\t\t$inhouse_quantity += $product->qty;\n\t\t\t\tif(($lowest_inhouse_products_price==0) || ($products_price<$lowest_inhouse_products_price)) {\n\t\t\t\t\t$lowest_inhouse = key($inhouse);\n\t\t\t\t\t$lowest_inhouse_products_price = $products_price;\n\t\t\t\t}\n\t\t\t\ttpt_logger::dump($vars, $product->pricingObject->options, debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS), '$product->pricingObject->options', __FILE__.' '.__LINE__);\n\t\t\t\ttpt_logger::dump($vars, $product->qty.' '.$product_price.' '.$products_price, debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS), '$product->qty.\\' \\'.$product_price.\\' \\'.$products_price', __FILE__.' '.__LINE__);\n\t\t\t\t//tpt_logger::dump($vars, $product_price, debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS), '$product_price', __FILE__.' '.__LINE__);\n\t\t\t\t//tpt_logger::dump($vars, $products_price, debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS), '$products_price', __FILE__.' '.__LINE__);\n\t\t}\n\n\n\t\tforeach($overseas as $product) {\n\t\t\t\tif(is_null($product->pricingObject->final_total) && (self::$totals['pricing']['values']['osc'] < 1)) {\n\t\t\t\t\tif(defined('CART_OVERSEAS_PRICE_TOTAL_RECALCULATE') && (CART_OVERSEAS_PRICE_TOTAL_RECALCULATE == 1)) {\n\t\t\t\t\t$product_price = round($product->pricingObject->price['values']['lowest_price_per_discounted']*self::$totals['pricing']['values']['osc'], CART_OVERSEAS_PRICE_PER_DECIMALS);\n\t\t\t\t\t$products_price = round($product_price*$product->qty, CART_OVERSEAS_PRICE_TOTAL_DECIMALS);\n\t\t\t\t\t} else {\n\t\t\t\t\t$products_price = round($product->pricingObject->price['values']['lowest_price_total_discounted']*self::$totals['pricing']['values']['osc'], CART_OVERSEAS_PRICE_TOTAL_DECIMALS);\n\t\t\t\t\t$product_price = round($products_price/$product->qty, CART_OVERSEAS_PRICE_PER_DECIMALS);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif(defined('CART_OVERSEAS_PRICE_TOTAL_RECALCULATE') && (CART_OVERSEAS_PRICE_TOTAL_RECALCULATE == 1)) {\n\t\t\t\t\t\t$product_price = round($product->pricingObject->price['values']['lowest_price_per_discounted'], CART_OVERSEAS_PRICE_PER_DECIMALS);\n\t\t\t\t\t\t$products_price = round($product_price*$product->qty, CART_OVERSEAS_PRICE_TOTAL_DECIMALS);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$products_price = round($product->pricingObject->price['values']['lowest_price_total_discounted'], CART_OVERSEAS_PRICE_TOTAL_DECIMALS);\n\t\t\t\t\t\t$product_price = round($products_price/$product->qty, CART_OVERSEAS_PRICE_PER_DECIMALS);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//var_dump($product->pricingObject->price['values']);die();\n\t\t\t\t$values = array('sbase_price'=>$product_price, 'mbase_price'=>$products_price);\n\t\t\t\t$html = $values;\n\t\t\t\t//var_dump($html);\n\t\t\t\tarray_walk($html, 'format_price_array');\n\t\t\t\t//var_dump($product->pricingObject);die();\n\t\t\t\t$product->price = array('html'=>$html, 'values'=>$values);\n\t\t\t\t$precision_subtotal += $products_price;\n\t\t\t\t$overseas_total += $products_price;\n\t\t\t\t$overseas_quantity += $product->qty;\n\t\t\t\tif(($lowest_overseas_products_price==0) || ($products_price<$lowest_overseas_products_price)) {\n\t\t\t\t\t$lowest_overseas = key($overseas);\n\t\t\t\t\t$lowest_overseas_products_price = $products_price;\n\t\t\t\t}\n\t\t}\n\t\t//var_dump(self::$totals['pricing']);die();\n\t\t//}\n\t\t//var_dump(self::$products);die();\n\t\t//tpt_dump(self::$totals['pricing'], true);\n\t\t//tpt_logger::dump($vars, $precision_subtotal, debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS), '$precision_subtotal', __FILE__.' '.__LINE__);\n\t\t//tpt_logger::dump($vars, $vars['user'], false, __FILE__, __LINE__);\n\t\tself::$totals['products_count'] = count(self::$products);\n\n\n\t\tself::$totals['pricing']['values']['retail_price'] = $precision_subtotal;\n\t\tself::$totals['pricing']['values']['customer_price'] = $precision_subtotal;\n\t\tself::$totals['pricing']['values']['lowest_price'] = $precision_subtotal;\n\n\n\t\t$html = self::$totals['pricing']['values'];\n\t\t//array_pop($html);\n\t\t//tpt_dump($html, true);\n\t\tarray_walk_recursive($html, 'format_price_array');\n\t\tself::$totals['pricing']['html'] = $html;\n\t}", "public function quickordcalcshiprates($orddata) {\n $item_id = $orddata['order_item_id'];\n $zip = $orddata['shipping_zipcode'];\n $qty = $orddata['item_qty'];\n $cntcode = $orddata['ship_cntcode'];\n $shipmeth=$orddata['shipping_method_code'];\n // Select vendor zip\n $this->db->select('v.vendor_zipcode');\n $this->db->from('sb_items i');\n $this->db->join('sb_vendor_items vi','vi.vendor_item_id=i.item_id');\n $this->db->join(\"vendors v\",'v.vendor_id=vi.vendor_item_vendor');\n $this->db->where('i.item_id', $item_id);\n $vndres=$this->db->get()->row_array();\n $vendorzip = (isset($vndres['vendor_id']) ? $vndres['vendor_zipcode'] : $this->config->item('zip'));\n // Get Data about Item\n $this->load->model('items_model');\n $itemdata = $this->items_model->get_item($item_id);\n $item = $itemdata['data'];\n // Calc Weight, Num PACK, etc\n\n $weight = $item['item_weigth'];\n $numpack = (intval($item['cartoon_qty']) == 0 ? $this->min_qty_pack : $item['cartoon_qty']);\n // Shipdates\n $startdeliv = strtotime($orddata['shipping_date']);\n\n $options = array(\n 'zip' => $zip,\n 'numinpack' => $numpack,\n 'itemqty' => $qty,\n 'weight' => $weight,\n 'startdeliv' => $startdeliv,\n 'vendor_zip' => $vendorzip,\n 'item_length' => $item['cartoon_depth'],\n 'item_width' => $item['cartoon_width'],\n 'item_height' => $item['cartoon_heigh'],\n 'ship' => array(),\n 'cnt_code' => $cntcode,\n );\n\n $out = calculate_shipcost($options);\n $outrate=0;\n if ($out['result'] == TRUE) {\n $ship = $out['ship'];\n $codes= explode('|', $out['code']);\n if (in_array($shipmeth, $codes)) {\n /* Recalc Rates */\n $ship = recalc_rates($ship, $item, $qty, $cntcode);\n foreach ($ship as $shrow) {\n if ($shrow['ServiceCode']==$shipmeth) {\n $outrate=$shrow['Rate'];\n }\n }\n }\n }\n return $outrate;\n }", "public function generateShippingCost() {\n\t\t\tif ($this->form['shipArrangement']) {\n\t\t\t\t$shippingCosts = shippingOptionsController::generateShippingCost($this->form['shipArrangement'], $this->shippingAddress, $this->package);\n\t\t\t\tif (!empty($shippingCosts)) {\n\t\t\t\t\t$finalShippingCost = 0;\n\t\t\t\t\tforeach ($shippingCosts as $memberID => $cost) {\n\t\t\t\t\t\t$finalShippingCost += $cost;\n\t\t\t\t\t}\n\t\t\t\t\t$this->subShippingCosts = $shippingCosts;\n\t\t\t\t\t$this->shippingCost = $finalShippingCost;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function getSaleTotals($client, $provider)\n {\n $TOTAL_PRICE = 0;\n //dd();\n\n //echo '<pre>';dd($provider);\n if ($client->CremainsInfo->package_plan == \"1\") $saleSummary['report']['package_plan']['price'] = $provider->pricing_options->basic_cremation;\n elseif ($client->CremainsInfo->package_plan == \"2\") $saleSummary['report']['package_plan']['price'] = $provider->pricing_options->premium_cremation;\n else $saleSummary['report']['package_plan']['price'] = '';\n\n $saleSummary['report']['package_plan']['name'] = 'Plan';\n $saleSummary['report']['package_plan']['qnt'] = '1';\n $saleSummary['report']['package_plan']['desc'] = $client->CremainsInfo->package_plan == 1 ? 'Package A' : 'Package B';\n $TOTAL_PRICE += $saleSummary['report']['package_plan']['price'];\n\n\n if ($client->DeceasedInfo->weight == \"weight_lt_250\") $saleSummary['report']['weight']['price'] = $provider->pricing_options->weight_lt_250;\n elseif ($client->DeceasedInfo->weight == \"weight_lt_300\") $saleSummary['report']['weight']['price'] = $provider->pricing_options->weight_lt_300;\n elseif ($client->DeceasedInfo->weight == \"weight_lt_350\") $saleSummary['report']['weight']['price'] = $provider->pricing_options->weight_lt_350;\n elseif ($client->DeceasedInfo->weight == \"weight_gt_350\") $saleSummary['report']['weight']['price'] = $provider->pricing_options->weight_gt_350;\n else $saleSummary['report']['weight']['price'] = '';\n\n $saleSummary['report']['weight']['name'] = 'Weight';\n $saleSummary['report']['weight']['qnt'] = '1';\n $saleSummary['report']['weight']['desc'] = $client->DeceasedInfo->weight;\n $TOTAL_PRICE += $saleSummary['report']['weight']['price'];\n\n\n if ($client->DeceasedInfo->has_pace_maker == \"1\") $saleSummary['report']['has_pace_maker']['price'] = $provider->pricing_options->pacemaker;\n else $saleSummary['report']['has_pace_maker']['price'] = '';\n $saleSummary['report']['has_pace_maker']['name'] = 'Has Pacemaker';\n $saleSummary['report']['has_pace_maker']['qnt'] = '1';\n $saleSummary['report']['has_pace_maker']['desc'] = $client->DeceasedInfo->has_pace_maker ? 'Yes' : 'No';\n $TOTAL_PRICE += $saleSummary['report']['has_pace_maker']['price'];\n\n /*\n if($client->CremainsInfo->cremain_plan == \"scatter_on_land\") $saleSummary['report']['cremain_plan']['price'] = $provider->pricing_options->scatter_on_land;\n elseif($client->CremainsInfo->cremain_plan == \"scatter_at_sea\") $saleSummary['report']['cremain_plan']['price'] = $provider->pricing_options->scatter_at_sea;\n else $saleSummary['report']['cremain_plan']['price'] = '';\n $saleSummary['report']['cremain_plan']['desc'] = \"Plan For Cremation Remains: \" . $client->CremainsInfo->cremain_plan;\n $TOTAL_PRICE += $saleSummary['report']['cremain_plan']['price'];\n */\n\n if ($client->CremainsInfo->cremation_shipping_plan == \"scatter_on_land\") $saleSummary['report']['cremation_shipping_plan']['price'] = $provider->pricing_options->scatter_on_land;\n elseif ($client->CremainsInfo->cremation_shipping_plan == \"scatter_at_sea\") $saleSummary['report']['cremation_shipping_plan']['price'] = $provider->pricing_options->scatter_at_sea;\n elseif ($client->CremainsInfo->cremation_shipping_plan == \"ship_to_you\") $saleSummary['report']['cremation_shipping_plan']['price'] = $provider->pricing_options->ship_to_you;\n else $saleSummary['report']['cremation_shipping_plan']['price'] = '';\n $saleSummary['report']['cremation_shipping_plan']['name'] = 'Plan For Cremation Remains';\n $saleSummary['report']['cremation_shipping_plan']['qnt'] = '1';\n $saleSummary['report']['cremation_shipping_plan']['desc'] = $client->CremainsInfo->cremation_shipping_plan;\n $TOTAL_PRICE += $saleSummary['report']['cremation_shipping_plan']['price'];\n\n\n if ($client->CremainsInfo->cert_plan == \"deathcert_wurn\") {\n $saleSummary['report']['cert_plan']['price'] = $provider->pricing_options->deathcert_wurn;\n $desc = \"Mail certificate(s) with urn\";\n } elseif ($client->CremainsInfo->cert_plan == \"deathcert_cep\") {\n $saleSummary['report']['cert_plan']['price'] = $provider->pricing_options->deathcert_cep;\n $desc = \"Mail certificate(s) seperately\";\n } elseif ($client->CremainsInfo->cert_plan == \"deathcert_pickup\") {\n $saleSummary['report']['cert_plan']['price'] = $provider->pricing_options->deathcert_pickup;\n $desc = \"Pick up certificate(s) at our office\";\n } else {\n $saleSummary['report']['cert_plan']['price'] = $desc = '';\n }\n $saleSummary['report']['cert_plan']['name'] = 'Certificate Shipping';\n $saleSummary['report']['cert_plan']['qnt'] = '1';\n $saleSummary['report']['cert_plan']['desc'] = $desc;\n\n $TOTAL_PRICE += $saleSummary['report']['cert_plan']['price'];\n //echo '<pre>';print_r($client->CremainsInfo); print_r($provider->pricing_options); echo '</pre>'; die();\n\n //dd($cremain_info);\n $saleSummary['report']['number_of_first_certs']['name'] = 'First Certificate';\n $saleSummary['report']['number_of_first_certs']['desc'] = 'First Certificate ($' . $provider->pricing_options->deathcert_first . \"): 1\" ;\n $saleSummary['report']['number_of_first_certs']['qnt'] = '1';\n $saleSummary['report']['number_of_first_certs']['price'] = number_format((float)$provider->pricing_options->deathcert_first, 2, '.', '');\n $saleSummary['report']['number_of_first_certs']['price'] = number_format((float)$provider->pricing_options->deathcert_first * ($client->CremainsInfo->number_of_certs ? 1 : 0), 2, '.', '');\n $TOTAL_PRICE += $saleSummary['report']['number_of_first_certs']['price'];\n\n if ($client->CremainsInfo->number_of_certs > 1) {\n $saleSummary['report']['number_of_certs']['name'] = 'Additional Certificates';\n $saleSummary['report']['number_of_certs']['desc'] = 'Additional Certificates ($' . $provider->pricing_options->deathcert_each . \" each): \" . ($client->CremainsInfo->number_of_certs-1);\n $saleSummary['report']['number_of_certs']['qnt'] = ($client->CremainsInfo->number_of_certs - 1);\n $saleSummary['report']['number_of_certs']['price'] = number_format((float)$provider->pricing_options->deathcert_each, 2, '.', '');\n $saleSummary['report']['number_of_certs']['line_price'] = number_format((float)$provider->pricing_options->deathcert_each * (($client->CremainsInfo->number_of_certs > 1) ? ($client->CremainsInfo->number_of_certs - 1) : 0), 2, '.', '');\n $TOTAL_PRICE += $saleSummary['report']['number_of_certs']['line_price'];\n }\n\n $saleSummary['report']['filing_fee']['name'] = 'Filing Fee';\n $saleSummary['report']['filing_fee']['qnt'] = '1';\n $saleSummary['report']['filing_fee']['desc'] = '';\n $saleSummary['report']['filing_fee']['price'] = $provider->pricing_options->filing_fee;\n $TOTAL_PRICE += $saleSummary['report']['filing_fee']['price'];\n\n if($provider->pricing_options->custom1_text != \"\" and ($client->CremainsInfo->custom1==1) and ClientController::customerCustomPlanOptions($client->CremainsInfo->package_plan, $provider->pricing_options->custom1_included)) {\n $saleSummary['report']['custom1']['desc'] = '';\n $saleSummary['report']['custom1']['qnt'] = '1';\n $saleSummary['report']['custom1']['name'] = $provider->pricing_options->custom1_text;\n $saleSummary['report']['custom1']['price'] = $provider->pricing_options->custom1;\n $TOTAL_PRICE += $saleSummary['report']['custom1']['price'];\n }\n if($provider->pricing_options->custom2_text != \"\" and ($client->CremainsInfo->custom2==1) and ClientController::customerCustomPlanOptions($client->CremainsInfo->package_plan, $provider->pricing_options->custom2_included)) {\n $saleSummary['report']['custom2']['desc'] = '';\n $saleSummary['report']['custom2']['qnt'] = '1';\n $saleSummary['report']['custom2']['name'] = $provider->pricing_options->custom2_text;\n $saleSummary['report']['custom2']['price'] = $provider->pricing_options->custom2;\n $TOTAL_PRICE += $saleSummary['report']['custom2']['price'];\n }\n if($provider->pricing_options->custom3_text != \"\" and ($client->CremainsInfo->custom3==1) and ClientController::customerCustomPlanOptions($client->CremainsInfo->package_plan, $provider->pricing_options->custom3_included)) {\n $saleSummary['report']['custom3']['desc'] = '';\n $saleSummary['report']['custom3']['qnt'] = '1';\n $saleSummary['report']['custom3']['name'] = $provider->pricing_options->custom3_text;\n $saleSummary['report']['custom3']['price'] = $provider->pricing_options->custom3;\n $TOTAL_PRICE += $saleSummary['report']['custom3']['price'];\n }\n \n \n //URN COSTS\n $client_choosen_product = ClientProducts::where('provider_id',$provider->id)->where('client_id',$client->id)->first();\n if($client_choosen_product == null || count($client_choosen_product)<1)$this_product = 1;\n else $this_product = $client_choosen_product->product_id; \n \n $client_product = ProviderProducts::where('provider_id',$provider->id)->where('product_id',$this_product)->first();\n if($client_product == null || count($client_product)<1)$client_product = Products::where('id',$this_product)->first();\n\n $saleSummary['report']['urn_product']['name'] = 'Urn';\n $saleSummary['report']['urn_product']['qnt'] = '1';\n $saleSummary['report']['urn_product']['desc'] = $client_product->name;\n $saleSummary['report']['urn_product']['price'] = $client_product->price;\n $TOTAL_PRICE += $saleSummary['report']['urn_product']['price'];\n \n \n\n $saleSummary['total'] = number_format((float)$TOTAL_PRICE, 2, '.', '');\n \n return $saleSummary;\n }", "function calculateStandardShipping($cartObj){\n if ($cartObj->getTotalCost() < 1500){\n $shipping = ($cartObj->getTotalIndividualPaintings() * 25);\n }\n else {\n $shipping = 0;\n }\n $cartObj->setShippingCostStandard($shipping);\n return $shipping;\n}", "protected function calculate_shipping_totals()\n {\n }", "public function calculate_shipping()\n {\n }", "public function calculate_shipping()\n {\n }", "function total_cost_to_pay()\n\t{\n\t\t$t=$this->total;\n\t\t$vat=$t*0.14;\n\t\treturn \"<br/><br/>\".\"Overall Total: R\".$this->total.\"<br/> VAT: R\".$vat;\t\n\t}", "public function collectRates(Mage_Shipping_Model_Rate_Request $request)\n {\n if (!Mage::getStoreConfig('carriers/'.$this->_code.'/active')) {\n return false;\n }\n\n $result = Mage::getModel('shipping/rate_result');\n\n $method = Mage::getModel('shipping/rate_result_method');\n $method->setCarrier($this->_code);\n $method->setCarrierTitle(Mage::getStoreConfig('carriers/'.$this->_code.'/title'));\n\n /* Computation */\n //Mage::getSingleton('core/session', array('name'=>'frontend'));\n //$session = Mage::getSingleton('checkout/session');\n //$cart_items = $session->getQuote()->getAllVisibleItems();\n //$region = Mage::getSingleton('checkout/session')->getQuote()->getShippingAddress()->getData('region');\n //$totals = Mage::getSingleton('checkout/session')->getQuote()->getTotals();\n $visible_items = $this->getAllVisibleItems($request);\n //$package_value = $request->getPackageValue();\n $package_value = $request->getPackageValueWithDiscount();\n $region = strtolower($request->getDestRegionCode()); //use if onepage checkout\n $region_id = strtolower($request->getDestRegionId()); //use if onestep checkout\n $brands = explode(\"\\n\", strtoupper($this->getConfigData('diaperbrands')));\n $bulkyfee = (float) $this->getConfigData('bulkyfee');\n $total_bulk_fee = 0.00;\n $flatrate = (float)$this->getConfigData('flatrate');\n $mm_min = (float)$this->getConfigData('mm_min');\n $mm_fee = (float)$this->getConfigData('mm_fee');\n $pr_min = (float)$this->getConfigData('pr_min');\n $pr_fee = (float)$this->getConfigData('pr_fee');\n $shippingFee = 0.00;\n $is_bulky = false;\n\n\t //force region value\n\t if($region == '') $region = $region_id;\n\n foreach ($visible_items as $item) {\n $product = Mage::getModel('catalog/product')->load($item->getProduct_id());\n $product_brand = strtoupper($product->getResource()->getAttribute('brand')->getFrontend()->getValue($product));\n $bulkyAttr = $product->getResource()->getAttribute('is_bulky'); //is_bulky product attribute required.;\n\n if ($bulkyAttr) {\n $is_bulky = strtolower($bulkyAttr->getFrontend()->getValue($product));\n }\n\n if (in_array($product_brand, $brands) || $is_bulky == 'yes') {\n $total_bulk_fee += $bulkyfee * $item->getQty();\n }\n }\n\n if ($region) {\n if ($region == 'metro manila') {\n if ($package_value < $mm_min) {\n $shippingFee += $mm_fee;\n }\n } else {\n if ($package_value < $pr_min) {\n $shippingFee += $pr_fee;\n }\n }\n } else {\n if ($package_value < $mm_min)\n $shippingFee += $flatrate;\n }\n\n $shippingFee += $total_bulk_fee;\n //if free shipping\n if ($request->getFreeShipping() === true) {\n $shippingFee = 0;\n }\n\n /* Use method name */\n $method->setMethod($this->_code);\n $method->setMethodTitle(Mage::getStoreConfig('carriers/'.$this->_code.'/name'));\n $method->setCost($shippingFee);\n $method->setPrice($shippingFee);\n $result->append($method);\n\n return $result;\n }", "public function getShippingRates($params)\n {\n $carriers = $this->scopeConfig->getValue('carriers', \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE);\n foreach ($carriers as $carrierCode => $carrierConfig) {\n if ($carrierConfig['active']) {\n if (isset($carrierConfig['price'])) {\n\n $method = new \\stdclass();\n $method->id = $carrierCode;\n $method->type = $carrierCode;\n $method->provider = $carrierCode;\n $method->name = $carrierConfig['title'];\n $price = 0;\n if ($carrierConfig['model'] == 'Magento\\OfflineShipping\\Model\\Carrier\\Flatrate') {\n if ($carrierConfig['type'] == 'I') {\n $price = $params['items_count'] * $carrierConfig['price'];\n } else {\n $price = $carrierConfig['price'];\n }\n } else {\n $price = $carrierConfig['price'];\n }\n\t\t\t\t\tif(isset($carrierConfig['handling_fee'])){\n \t$method->price = $price + $carrierConfig['handling_fee'];\n \t}else{\n\t \t$method->price = $price ;\n \t}\n \n\n if (!empty($carrierConfig['specificcountry'])) {\n $areas = explode(',', $carrierConfig['specificcountry']);\n foreach ($areas as $area) {\n if ($area == 'NL') {//todo change me\n $shippingMethods[] = $method;\n }\n }\n } else {\n $shippingMethods[] = $method;\n }\n } elseif ('Magento\\OfflineShipping\\Model\\Carrier\\Freeshipping' == $carrierConfig['model']) {\n $amount = $params['amount'];\n\n if ($amount >= $carrierConfig['free_shipping_subtotal']) {\n $method = new \\stdclass();\n $method->id = $carrierCode;\n $method->type = $carrierCode;\n $method->provider = $carrierCode;\n $method->name = $carrierConfig['title'];\n $method->price = 0;\n\n if (!empty($carrierConfig['specificcountry'])) {\n $areas = explode(',', $carrierConfig['specificcountry']);\n foreach ($areas as $area) {\n if ($area == 'NL') { // Todo change me\n $shippingMethods[] = $method;\n }\n }\n } else {\n $shippingMethods[] = $method;\n }\n }\n } elseif ('Magento\\OfflineShipping\\Model\\Carrier\\Tablerate' == $carrierConfig['model']) {\n //Table rate based\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();\n $tablerateColl = $objectManager->get('Magento\\OfflineShipping\\Model\\ResourceModel\\Carrier\\Tablerate\\Collection');\n foreach ($tablerateColl as $tablerate) {\n $table_data = $tablerate->getData();\n if ($table_data['condition_name'] == 'package_value') {\n $items_count = $params['items_count'];\n if ($items_count >= $table_data['condition_value']) {\n $rate_price = $table_data['price'];\n }\n } elseif ($table_data['condition_name'] == 'package_weight') {\n $item_weight = $params['weight'];\n if ($item_weight >= $table_data['condition_value']) {\n $rate_price = $table_data['price'];\n }\n }\n }\n\n $method = new \\stdclass();\n $method->id = 'tablerate';\n $method->type = 'tablerate';\n $method->provider = 'tablerate';\n $method->name = $carrierConfig['title'];\n if(isset($carrierConfig['handling_fee'])){\n \t$method->price = $rate_price + $carrierConfig['handling_fee'];\n \t}else{\n\t \t$method->price = $rate_price ;\n \t}\n \t\n \tif(isset($carrierConfig['specificcountry'])){\n \t$ratecountries = $carrierConfig['specificcountry'];\n\t\t\t\t\t\t$ratecountcheck = explode(',', $ratecountries);\n\n\t if (!empty($ratecountries)) {\n\t foreach ($ratecountcheck as $area) {\n\t if ($area == 'NL') {//todo change me\n\t $shippingMethods[] = $method;\n\t }\n\t }\n\t } else {\n\t $shippingMethods[] = $method;\n\t }\n\t }else {\n $shippingMethods[] = $method;\n }\n }\n }\n }\n \n $postnl_active = $this->scopeConfig->getValue('fastcheckout/fastcheckout_postnl/postnl_active', \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE);\n \n if($postnl_active){\n\t $method = new \\stdclass();\n $method->id = 'PostNL';\n $method->type = 'pickup';\n $method->provider = 'pickup';\n $method->name = 'Post NL - Pak je gemak';\n $method->price = $this->scopeConfig->getValue('fastcheckout/fastcheckout_postnl/postnl_amount', \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE);\n $shippingMethods[] = $method;\n }\n \n\n foreach ($shippingMethods as $shipmethod) {\n $shipping = array();\n $shipping['id'] = $shipmethod->id;\n $shipping['name'] = $shipmethod->name;\n $shipping['cost'] = $shipmethod->price;\n $shipping['currency'] = 'EUR';\n $output[] = $shipping;\n }\n\n $outxml = '<?xml version=\"1.0\" encoding=\"UTF-8\"?>';\n $outxml .= '<shipping-info>';\n foreach ($output as $rate) {\n $outxml .= '<shipping>';\n $outxml .= '<shipping-name>' . htmlentities($rate['name']) . '</shipping-name>';\n $outxml .= '<shipping-cost currency=\"' . $rate['currency'] . '\">' . $rate['cost'] . '</shipping-cost>';\n $outxml .= '<shipping-id>' . $rate['id'] . '</shipping-id>';\n $outxml .= '</shipping>';\n }\n $outxml .= '</shipping-info>';\n\n return $outxml;\n }", "public function getShippingCostTotal()\n {\n return $this->orderAmount - $this->orderAmountCoupon;\n }", "public function get_total_shipping()\n {\n }", "function calc_total_with_shipping()\n {\n $SHIPEXPEDITE = 20;\n $SHIPREGULAR = 10;\n $total = 0;\n if ((isset ($_SESSION['shipping']['shipping_type'])) && (count($_SESSION['shipping']['shipping_type']) > 0)) {\n $shipping_type = $_SESSION['shipping']['shipping_type'];\n if ($shipping_type == 'expedite') {\n $total = calc_total_price() + $SHIPEXPEDITE;\n } else {\n $total = calc_total_price() + $SHIPREGULAR;\n }\n }\n return $total;\n }", "public function getOrderShippingCost($params, $shipping_cost)\n {\n return 10;\n }", "public static function calculate_shipping()\n {\n }", "function display_shipping_cost() {\n // via teleportation, shipping is fixed\n return 10.00;\n}", "public function calculate_shipping($package = array())\n {\n $total = WC()->cart->get_displayed_subtotal();\n if (WC()->cart->display_prices_including_tax()) {\n $total = round($total - (WC()->cart->get_discount_total() + WC()->cart->get_discount_tax()), wc_get_price_decimals());\n } else {\n $total = round($total - WC()->cart->get_discount_total(), wc_get_price_decimals());\n }\n\n $cost = $this->cost;\n\n if ($total >= $this->min_amount) {\n $cost = 0; \n }\n\n //$title = $cost === 0 ? \"Kostenlose Lieferung\" : $this->title;\n\n \n\n $rate = array(\n 'label' => $this->title,\n 'cost' => $cost,\n 'taxes' => false,\n 'package' => $package,\n );\n\n $this->add_rate($rate);\n\n }", "public function calculateTotalCost() {\n\n $total = 0;\n\n foreach($this->items as $item) {\n $total = bcadd($total,$item->calculateCost(),4);\n }\n\n return $total;\n\n }", "public function testRuleByProductWeightWithFreeShipping()\n {\n $cartId = $this->prepareQuote(1);\n $methods = $this->estimateShipping($cartId);\n\n $this->assertTrue(count($methods) > 0);\n $this->assertEquals('flatrate', $methods[0]->getMethodCode());\n $this->assertEquals(0, $methods[0]->getAmount());\n }", "public function getEarnedAmount() {\n\t\t\n\t\t// Total Earned Amount\n\t\t$data = ['total'=> 0 , 'action' => ''];\n\t\t$completeOrdersCollection = [];\n\t\t$netAmount = 0;\n\t\t$priceCurrency=$this->_objectManager->get('Magento\\Framework\\Pricing\\PriceCurrencyInterface');\n\t\t$orderCollection = $this->getBookingOrdersCollection();\n\t\tif (count($orderCollection)!=0) {\n\t\t\t$orderData = $orderCollection->addFieldToFilter('status','complete')->getData();\n\t\t}\n\t\tif (isset($orderData) && count($orderData)!=0) {\n\t\t\tforeach ($orderData as $earnedData) {\n\t\t\t\t$netAmount = $earnedData['grand_total'] + $netAmount;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($netAmount > 1000000000000) {\n\t\t\t\t$netAmount = round($netAmount / 1000000000000, 4);\n\t\t\t\t$data['total'] = $this->_localeCurrency->getCurrency($this->_objectManager->create('Magento\\Store\\Model\\StoreManagerInterface')->getStore(null)->getBaseCurrencyCode())->toCurrency($netAmount) . 'T';\n\t\t\t\t\n\t\t} elseif ($netAmount > 1000000000) {\n\t\t\t\t$netAmount = round($netAmount / 1000000000, 4);\n\t\t\t\t$data['total'] = $this->_localeCurrency->getCurrency($this->_objectManager->create('Magento\\Store\\Model\\StoreManagerInterface')->getStore(null)->getBaseCurrencyCode())->toCurrency($netAmount) . 'B';\n\t\t} elseif ($netAmount > 1000000) {\n\t\t\t\t$netAmount = round($netAmount / 1000000, 4);\n\t\t\t\t$data['total'] = $this->_localeCurrency->getCurrency($this->_objectManager->create('Magento\\Store\\Model\\StoreManagerInterface')->getStore(null)->getBaseCurrencyCode())->toCurrency($netAmount) . 'M';\n\t\t\t\n\t\t} elseif ($netAmount > 1000) {\n\t\t\t\t$netAmount = round($netAmount / 1000, 4);\t\n\t\t\t\t$data['total'] = $this->_localeCurrency->getCurrency($this->_objectManager->create('Magento\\Store\\Model\\StoreManagerInterface')->getStore(null)->getBaseCurrencyCode())->toCurrency($netAmount) . 'K';\n\t\t\t\t\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\t\n\t\t\t\t$data['total'] = $priceCurrency->format($netAmount);\n\t\t}\n\t\t\t\n\t\treturn $data;\n\t}", "function CalculateTotalShipping($products, $subtotal){\n global $config, $shipping_config, $cart_range, $domestic_zone_array, $international_zone_array, $domestic_final_price, $international_final_price;\n\n // clear variables\n $totalshipping = 0;\n $totalweight = 0;\n\n $billing = GetBilling(); // so we can get the country\n\n // Free Shipping Level\n if ($config[\"ShippingFreeLevel\"] <= $subtotal && trim($config[\"ShippingFreeLevel\"]) != \"\") // free shipping if total is greater or equal\n return 0;\n\n // No Products in Cart\n if (sizeof($products) == 0)\n return 0;\n\n // Get Country\n $country_selected = LookupCountry3($billing[\"COUNTRYID\"]);\n\n // If USA, get domestic shipping price\n if ($country_selected == \"USA\"){\n\n // Get State ID\n $state_selected = LookupState($billing[\"STATEID\"]);\n\n // Find State in Zone Array\n\n for ($i = 0; $i <= 7; $i++){\n $find_state = array_search($state_selected, $domestic_zone_array[$i]);\n if ($find_state !== FALSE){\n $zone_selected = $i;\n }\n }\n\n\n if ($shipping_config == \"subtotal\"){\n\n if ($subtotal > 0 AND $subtotal < $cart_range[0]){\n $totalshipping = $domestic_final_price[0][$zone_selected];\n }\n elseif ($subtotal > $cart_range[0] AND $subtotal < $cart_range[1]){\n $totalshipping = $domestic_final_price[1][$zone_selected];\n }\n elseif ($subtotal > $cart_range[1] AND $subtotal < $cart_range[2]){\n $totalshipping = $domestic_final_price[2][$zone_selected];\n }\n elseif ($subtotal > $cart_range[2] ){\n $totalshipping = $domestic_final_price[3][$zone_selected];\n }\n\n }\n elseIf ($shipping_config == \"quantity\"){\n\n // get total quanities of items in cart\n $total_quanity = 0;\n foreach ($products as $product){ // calculate shipping\n $total_quanity += $total_quanity + $product[PRODUCTQUANTITY];\n }\n\n\n if ($total_quanity > 0 AND $total_quanity < $cart_range[0]){\n $totalshipping = $domestic_final_price[0][$zone_selected];\n }\n elseif ($total_quanity > $cart_range[0] AND $total_quanity < $cart_range[1]){\n $totalshipping = $domestic_final_price[1][$zone_selected];\n }\n elseif ($total_quanity > $cart_range[1] AND $total_quanity < $cart_range[2]){\n $totalshipping = $domestic_final_price[2][$zone_selected];\n }\n elseif ($total_quanity > $cart_range[2] ){\n $totalshipping = $domestic_final_price[3][$zone_selected];\n }\n }\n\n return $totalshipping;\n }\n else { // international orders\n\n // check to see if this is an identified zone\n $zone_selected = array_search($country_selected, $international_zone_array);\n if ($zone_selected == '' ){\n $zone_selected = 3;\n }\n\n if ($shipping_config == \"subtotal\"){\n\n if ($subtotal > 0 AND $subtotal < $cart_range[0]){\n $totalshipping = $international_final_price[0][$zone_selected];\n }\n elseif ($subtotal > $cart_range[0] AND $subtotal < $cart_range[1]){\n $totalshipping = $international_final_price[1][$zone_selected];\n }\n elseif ($subtotal > $cart_range[1] AND $subtotal < $cart_range[2]){\n $totalshipping = $international_final_price[2][$zone_selected];\n }\n elseif ($subtotal > $cart_range[2] ){\n $totalshipping = $international_final_price[3][$zone_selected];\n }\n\n }\n elseIf ($shipping_config == \"quantity\"){\n\n // get total quanities of items in cart\n $total_quanity = 0;\n foreach ($products as $product){ // calculate shipping\n $total_quanity += $total_quanity + $product[PRODUCTQUANTITY];\n }\n\n\n if ($total_quanity > 0 AND $total_quanity < $cart_range[0]){\n $totalshipping = $international_final_price[0][$zone_selected];\n }\n elseif ($total_quanity > $cart_range[0] AND $total_quanity < $cart_range[1]){\n $totalshipping = $international_final_price[1][$zone_selected];\n }\n elseif ($total_quanity > $cart_range[1] AND $total_quanity < $cart_range[2]){\n $totalshipping = $international_final_price[2][$zone_selected];\n }\n elseif ($total_quanity > $cart_range[2] ){\n $totalshipping = $international_final_price[3][$zone_selected];\n }\n }\n\n return $totalshipping;\n }\n\n\n}", "public function getCosts()\n\t{\n\t\treturn $this->costs;\n\t}", "function get_shipping_costs_from_shipper($item, $shipper = \"Ups\") {\r\n\t\tswitch ($shipper) {\r\n\t\t\tcase \"Ups\" :\r\n\r\n\t\t\tdefault :\r\n\t\t\t\t$rate = new Ups;\r\n\r\n\t\t\t\t$rate->weight($item['shipping_packageWeight']);\r\n\t\t\t\t$rate->shippingValue = $item['itemPrice'];\r\n\r\n\t\t\t\t$rate->upsProduct($this->shipping_params['product']); // See upsProduct() function for codes\r\n\t\t\t\t$rate->origin($this->shipping_params['origPostal'], $this->shipping_params['origCountry']); // Use ISO country codes!\r\n\t\t\t\t$rate->dest($this->shipping_params['destPostal'], $this->shipping_params['destCountry']); // Use ISO country codes!\r\n\t\t\t\t$rate->rate($this->shipping_params['rateCode']); // See the rate() function for codes\r\n\t\t\t\t$rate->container($this->shipping_params['shippingContainerCode']); // See the container() function for codes\r\n\t\t\t\t$rate->rescom($this->shipping_params['rescom']); // See the rescom() function for codes\r\n\t\t\t\t$quote = $rate->getQuote();\r\n\r\n\t\t\t\treturn $quote;\r\n\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "protected function calculateShipping()\n {\n $fShippingSurcharge = $this->pricing->getPriceForShipping($this->configuration->getShipping());\n $this->shippingSurcharge = $fShippingSurcharge;\n $this->addToTotalPer100($fShippingSurcharge);\n }", "public function providerShippingPrices() {\n return [\n [1000, 14],\n [3000, 19],\n ];\n }", "function fetch_item_shipping_cost($item) {\r\n\r\n\t\tif ($this->have_shipping_params() && $this->have_item_shipping_info($item) ) {\r\n\r\n\t\t\tif ($this->shipping_params['pickup']) {\r\n\t\t\t\t$shippingCosts['shipping'] = 0;\r\n\t\t\t\t$shippingCosts['shipping2'] = 0;\r\n\t\t\t\t$shippingCosts['handling']= 0;\r\n\t\t\t} else {\r\n\t\t\t\t$quote = $this->get_shipping_costs_from_shipper($item, \"Ups\");\r\n\t\t\t\t$shippingCosts['shipping'] = $quote;\r\n\t\t\t\t$shippingCosts['shipping2'] = 0;\r\n\t\t\t\tif ($this->shipping_params['origCountry'] == $this->shipping_params['destCountry']) {\r\n\t\t\t\t\t$shippingCosts['handling'] = $item['handling_local'];\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$shippingCosts['handling'] = $item['handling_intl'];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$this->error = \"Shipping information incomplete.\";\r\n\t\t}\r\n\r\n\t\treturn $shippingCosts;\r\n\t}", "public function getShippingCost() {\n return $this->shippingCost;\n }", "function _oldcalculate_shipcost($options)\n{\n $ci=&get_instance();\n $zip = $options['zip'];\n $numinpack = (isset($options['numinpack']) ? $options['numinpack'] : 1);\n $itemweight = (isset($options['weight']) ? $options['weight'] : '0.010');\n $qty = (isset($options['itemqty']) ? $options['itemqty'] : 250);\n $startdeliv = (isset($options['startdeliv']) ? $options['startdeliv'] : time());\n $vendorzip = (isset($options['vendor_zip']) ? $options['vendor_zip'] : $ci->config->item('zip'));\n $item_length = (isset($options['item_length']) ? $options['item_length'] : 0);\n $item_width = (isset($options['item_width']) ? $options['item_width'] : 0);\n $item_height = (isset($options['item_height']) ? $options['item_height'] : 0);\n $ship = $options['ship'];\n $cnt_code = (isset($options['cnt_code']) ? $options['cnt_code'] : 'US');\n $brand = ifset($options,'ALL');\n /* Calculate REST of full cartoon */\n if (intval($numinpack) == 0) {\n $ci->load->config('shipping');\n $numinpack = $ci->config->item('default_inpack');\n }\n\n $numpack = floor($qty / $numinpack);\n\n $rest = $qty - ($numpack * $numinpack);\n /* Total Parameters for Transit */\n $transitpack = $numpack + 1;\n\n /* if ($numpack<1) {\n $numpack=1;\n $rest=0;\n }*/\n $transitweigth = $itemweight * $qty;\n\n $ci->load->library('United_parcel_service');\n\n $out = array();\n\n $daydiff = round((time() - $startdeliv) / (24 * 60 * 60), 0);\n // $daydiff=BankDays($startdeliv, strtotime(date('Y-m-d')));\n if (abs($daydiff) > 10) {\n $startdeliv = strtotime(date('Y-m-d') . ' + 1 day');\n }\n\n $code = '';\n $upsserv = new United_parcel_service();\n $transit_arr = $upsserv->ship_time($zip, $cnt_code, $transitpack, $transitweigth, date('Ymd', $startdeliv), $vendorzip);\n\n if ($transit_arr['result'] == FALSE) {\n $out['result'] = FALSE;\n $out['error'] = $transit_arr['msg'];\n $out['error_code'] = 'TNT';\n } else {\n $transit_arr = $transit_arr['times'];\n $out['times'] = $transit_arr;\n $ratescalc = 1;\n $errmsg = '';\n $incrkf = 0;\n if ($numpack != 0) {\n if ($numpack > 20) {\n $incrkf = $numpack / 20;\n $numpack = 20;\n }\n // $fullResult = $upsserv->ship_rates($zip,'',$numpack,$itemweight*$numinpack*$numpack, $startdeliv ,true, $vendorzip,$cnt_code, $item_length, $item_width, $item_height);\n $fullResult = $upsserv->ship_rates($zip, '', $numpack, $itemweight * $numinpack * $numpack, $startdeliv, true, $vendorzip, $cnt_code, $item_length, $item_width, $item_height);\n if ($fullResult['result'] == FALSE) {\n $ratescalc = 0;\n $errmsg = $fullResult['msg'];\n }\n } else {\n $fullResult = array();\n }\n\n if ($rest != 0 && $ratescalc == 1) {\n $restweight = $itemweight * $rest;\n $restResult = $upsserv->ship_rates($zip, '', 1, $restweight, $startdeliv, true, $vendorzip, $cnt_code, 0, 0, 0);\n if ($restResult['result'] == FALSE) {\n $ratescalc = 0;\n $errmsg = $restResult['msg'];\n }\n } else {\n $restResult = array();\n }\n\n if ($ratescalc == 0) {\n $out['result'] = FALSE;\n $out['error'] = $errmsg;\n $out['error_code'] = 'RATES';\n } else {\n $out['result'] = TRUE;\n $code = \"\";\n $codes = array();\n if (!empty($fullResult)) {\n $fullrates = $fullResult['rates'];\n foreach ($fullrates as $row) {\n $delivdate = '';\n if ($row['ServiceCode'] == '03') {\n if (isset($transit_arr['GND'])) {\n array_push($codes, 'GND');\n $delivdate = $transit_arr['GND']['transit_timestamp'];\n if (abs($daydiff) > 10) {\n // Make changes in deliv date\n $delivdate = fixdeliv_different($delivdate, $daydiff);\n }\n $ship['GND'] = array('ServiceCode' => 'GND', // 'ServiceName' =>$row['ServiceName'],\n 'ServiceName' => 'Ground', // 'Rate' =>$row['Rate'],\n 'Rate' => ($incrkf == 0 ? $row['Rate'] : round($row['Rate'] * $incrkf, 2)), 'DeliveryDate' => $delivdate, 'current' => 0,);\n // $ship['deliv']=$delivdate;\n $code .= \"GND|\";\n } elseif (isset ($transit_arr['G'])) {\n array_push($codes, 'GND');\n $delivdate = $transit_arr['G']['transit_timestamp'];\n if (abs($daydiff) > 10) {\n // Make changes in deliv date\n $delivdate = fixdeliv_different($delivdate, $daydiff);\n }\n $ship['GND'] = array('ServiceCode' => 'GND', 'ServiceName' => 'Ground',\n 'Rate' => ($incrkf == 0 ? $row['Rate'] : round($row['Rate'] * $incrkf, 2)), 'DeliveryDate' => $delivdate, 'current' => 0,);\n $code .= \"GND|\";\n }\n /* Canadian */\n /* UPS Standard */\n } elseif ($row['ServiceCode'] == '11') {\n if (isset($transit_arr['03'])) {\n $delivdate = $transit_arr['03']['transit_timestamp'];\n if (abs($daydiff) > 10) {\n // Make changes in deliv date\n $delivdate = fixdeliv_different($delivdate, $daydiff);\n }\n array_push($codes, 'UPSStandard');\n $ship['UPSStandard'] = array('ServiceCode' => '11', 'ServiceName' => 'Ground',\n 'Rate' => ($incrkf == 0 ? $row['Rate'] : round($row['Rate'] * $incrkf, 2)), 'DeliveryDate' => $delivdate, 'current' => 0,);\n $code .= \"11|\";\n }\n } elseif ($row['ServiceCode'] == '02') {\n if (isset($transit_arr['2DA'])) {\n $delivdate = $transit_arr['2DA']['transit_timestamp'];\n if (abs($daydiff) > 10) {\n // Make changes in deliv date\n $delivdate = fixdeliv_different($delivdate, $daydiff);\n }\n array_push($codes, 'DA2');\n $ship['DA2'] = array('ServiceCode' => '2DA', 'ServiceName' => $row['ServiceName'],\n 'Rate' => ($incrkf == 0 ? $row['Rate'] : round($row['Rate'] * $incrkf, 2)), 'DeliveryDate' => $delivdate, 'current' => 0,);\n $code .= \"2DA|\";\n } elseif (isset($transit_arr['02'])) {\n $delivdate = $transit_arr['02']['transit_timestamp'];\n if (abs($daydiff) > 10) {\n // Make changes in deliv date\n $delivdate = fixdeliv_different($delivdate, $daydiff);\n }\n array_push($codes, 'DA2');\n $ship['DA2'] = array('ServiceCode' => '2DA', 'ServiceName' => '2nd Day Air',\n 'Rate' => ($incrkf == 0 ? $row['Rate'] : round($row['Rate'] * $incrkf, 2)), 'DeliveryDate' => $delivdate, 'current' => 0,);\n $code .= \"2DA|\";\n }\n } elseif ($row['ServiceCode'] == '13') {\n if (isset($transit_arr['1DP'])) {\n $delivdate = $transit_arr['1DP']['transit_timestamp'];\n if (abs($daydiff) > 10) {\n // Make changes in deliv date\n $delivdate = fixdeliv_different($delivdate, $daydiff);\n }\n array_push($codes, 'DP1');\n $ship['DP1'] = array('ServiceCode' => '1DP', 'ServiceName' => $row['ServiceName'],\n 'Rate' => ($incrkf == 0 ? $row['Rate'] : round($row['Rate'] * $incrkf, 2)), 'DeliveryDate' => $delivdate, 'current' => 0,);\n $code .= \"1DP|\";\n }\n } elseif ($row['ServiceCode'] == '01') {\n // 1 Day Air\n if (isset($transit_arr['01'])) {\n $delivdate = $transit_arr['01']['transit_timestamp'];\n if (abs($daydiff) > 10) {\n // Make changes in deliv date\n $delivdate = fixdeliv_different($delivdate, $daydiff);\n }\n array_push($codes, 'DP1');\n $ship['DP1'] = array('ServiceCode' => '1DP', 'ServiceName' => 'Next Day PM',\n 'Rate' => ($incrkf == 0 ? $row['Rate'] : round($row['Rate'] * $incrkf, 2)), 'DeliveryDate' => $delivdate, 'current' => 0,);\n $code .= \"1DP|\";\n }\n } elseif ($row['ServiceCode'] == '14') {\n if (isset($transit_arr['1DM'])) {\n $delivdate = $transit_arr['1DM']['transit_timestamp'];\n if (abs($daydiff) > 10) {\n // Make changes in deliv date\n $delivdate = fixdeliv_different($delivdate, $daydiff);\n }\n array_push($codes, 'DA1');\n $ship['DA1'] = array('ServiceCode' => '1DM', 'ServiceName' => $row['ServiceName'],\n 'Rate' => ($incrkf == 0 ? $row['Rate'] : round($row['Rate'] * $incrkf, 2)), 'DeliveryDate' => $delivdate, 'current' => 0,);\n $code .= \"1DA|\";\n }\n } elseif ($row['ServiceCode'] == '08') {\n if (isset($transit_arr['05'])) {\n $delivdate = $transit_arr['05']['transit_timestamp'];\n if (abs($daydiff) > 10) {\n // Make changes in deliv date\n $delivdate = fixdeliv_different($delivdate, $daydiff);\n }\n array_push($codes, 'UPSExpedited');\n $ship['UPSExpedited'] = array('ServiceCode' => '08', 'ServiceName' => 'Expedited',\n 'Rate' => ($incrkf == 0 ? $row['Rate'] : round($row['Rate'] * $incrkf, 2)), 'DeliveryDate' => $delivdate, 'current' => 0,);\n $code .= \"08|\";\n }\n /* UPS Worldwide Express */\n } elseif ($row['ServiceCode'] == '07') {\n if (isset($transit_arr['01'])) {\n $delivdate = $transit_arr['01']['transit_timestamp'];\n if (abs($daydiff) > 10) {\n // Make changes in deliv date\n $delivdate = fixdeliv_different($delivdate, $daydiff);\n }\n array_push($codes, 'UPSExpress');\n $ship['UPSExpress'] = array('ServiceCode' => '07', 'ServiceName' => 'Express',\n 'Rate' => ($incrkf == 0 ? $row['Rate'] : round($row['Rate'] * $incrkf, 2)), 'DeliveryDate' => $delivdate, 'current' => 0,);\n $code .= \"07|\";\n }\n /* UPS Saver */\n } elseif ($row['ServiceCode'] == '65') {\n if (isset($transit_arr['28'])) {\n $delivdate = $transit_arr['28']['transit_timestamp'];\n if (abs($daydiff) > 10) {\n // Make changes in deliv date\n $delivdate = fixdeliv_different($delivdate, $daydiff);\n }\n array_push($codes, 'UPSSaver');\n $ship['UPSSaver'] = array('ServiceCode' => '65', 'ServiceName' => 'Saver',\n 'Rate' => ($incrkf == 0 ? $row['Rate'] : round($row['Rate'] * $incrkf, 2)), 'DeliveryDate' => $delivdate, 'current' => 0,);\n $code .= \"65|\";\n }\n /* UPS Worldwide Expedited */\n }\n }\n }\n /* Check Rest Rates */\n if (!empty($restResult)) {\n $restrates = $restResult['rates'];\n foreach ($restrates as $row) {\n $delivdate = '';\n if ($row['ServiceCode'] == '03') {\n if (isset($transit_arr['GND'])) {\n if (!in_array('GND', $codes)) {\n array_push($codes, 'GND');\n $delivdate = $transit_arr['GND']['transit_timestamp'];\n if (abs($daydiff) > 10) {\n // Make changes in deliv date\n $delivdate = fixdeliv_different($delivdate, $daydiff);\n }\n $ship['GND'] = array('ServiceCode' => 'GND',\n 'ServiceName' => 'Ground', 'Rate' => $row['Rate'], 'DeliveryDate' => $delivdate, 'current' => 0,);\n $code .= \"GND|\";\n } else {\n $ship['GND']['Rate'] = $ship['GND']['Rate'] + $row['Rate'];\n }\n } elseif (isset ($transit_arr['G'])) {\n if (!in_array('GND', $codes)) {\n array_push($codes, 'GND');\n $delivdate = $transit_arr['G']['transit_timestamp'];\n if (abs($daydiff) > 10) {\n // Make changes in deliv date\n $delivdate = fixdeliv_different($delivdate, $daydiff);\n }\n $ship['GND'] = array('ServiceCode' => 'GND', 'ServiceName' => 'Ground',\n 'Rate' => $row['Rate'], 'DeliveryDate' => $delivdate, 'current' => 0,);\n $code .= \"GND|\";\n } else {\n $ship['GND']['Rate'] = $ship['GND']['Rate'] + $row['Rate'];\n }\n }\n /* Canadian */\n /* UPS Standard */\n } elseif ($row['ServiceCode'] == '11') {\n if (isset($transit_arr['03'])) {\n if (!in_array('UPSStandard', $codes)) {\n $delivdate = $transit_arr['03']['transit_timestamp'];\n if (abs($daydiff) > 10) {\n // Make changes in deliv date\n $delivdate = fixdeliv_different($delivdate, $daydiff);\n }\n array_push($codes, 'UPSStandard');\n $ship['UPSStandard'] = array('ServiceCode' => '11', 'ServiceName' => 'Ground',\n 'Rate' => $row['Rate'], 'DeliveryDate' => $delivdate, 'current' => 0,);\n $ship['deliv'] = $delivdate;\n $code .= \"11|\";\n } else {\n $ship['UPSStandard']['Rate'] = $ship['UPSStandard']['Rate'] + $row['Rate'];\n }\n }\n } elseif ($row['ServiceCode'] == '02') {\n if (isset($transit_arr['2DA'])) {\n if (!in_array('DA2', $codes)) {\n $delivdate = $transit_arr['2DA']['transit_timestamp'];\n if (abs($daydiff) > 10) {\n // Make changes in deliv date\n $delivdate = fixdeliv_different($delivdate, $daydiff);\n }\n array_push($codes, 'DA2');\n $ship['DA2'] = array('ServiceCode' => '2DA', 'ServiceName' => $row['ServiceName'], 'Rate' => $row['Rate'], 'DeliveryDate' => $delivdate, 'current' => 0,);\n $code .= \"2DA|\";\n } else {\n $ship['DA2']['Rate'] = $ship['DA2']['Rate'] + $row['Rate'];\n }\n } elseif (isset($transit_arr['02'])) {\n if (!in_array('DA2', $codes)) {\n $delivdate = $transit_arr['02']['transit_timestamp'];\n if (abs($daydiff) > 10) {\n // Make changes in deliv date\n $delivdate = fixdeliv_different($delivdate, $daydiff);\n }\n array_push($codes, 'DA2');\n $ship['DA2'] = array('ServiceCode' => '2DA', 'ServiceName' => '2nd Day Air',\n 'Rate' => $row['Rate'], 'DeliveryDate' => $delivdate, 'current' => 0,);\n $code .= \"2DA|\";\n } else {\n $ship['DA2']['Rate'] = $ship['DA2']['Rate'] + $row['Rate'];\n }\n }\n } elseif ($row['ServiceCode'] == '13') {\n if (isset($transit_arr['1DP'])) {\n if (!in_array('DP1', $codes)) {\n $delivdate = $transit_arr['1DP']['transit_timestamp'];\n if (abs($daydiff) > 10) {\n // Make changes in deliv date\n $delivdate = fixdeliv_different($delivdate, $daydiff);\n }\n array_push($codes, 'DP1');\n $ship['DP1'] = array('ServiceCode' => '1DP', 'ServiceName' => $row['ServiceName'], 'Rate' => $row['Rate'], 'DeliveryDate' => $delivdate, 'current' => 0,);\n $code .= \"1DP|\";\n } else {\n $ship['DP1']['Rate'] = $ship['DP1']['Rate'] + $row['Rate'];\n }\n }\n } elseif ($row['ServiceCode'] == '01') {\n // 1 Day Air\n if (isset($transit_arr['01'])) {\n if (!in_array('DP1', $codes)) {\n $delivdate = $transit_arr['01']['transit_timestamp'];\n if ($daydiff > 10) {\n // Make changes in deliv date\n $delivdate = fixdeliv_different($delivdate, $daydiff);\n }\n array_push($codes, 'DP1');\n $ship['DP1'] = array('ServiceCode' => '1DP', 'ServiceName' => 'Next Day PM', /* $row['ServiceName'], */\n 'Rate' => $row['Rate'], 'DeliveryDate' => $delivdate, 'current' => 0,);\n $code .= \"1DP|\";\n } else {\n $ship['DP1']['Rate'] = $ship['DP1']['Rate'] + $row['Rate'];\n }\n }\n } elseif ($row['ServiceCode'] == '14') {\n if (isset($transit_arr['1DM'])) {\n if (!in_array('DA1', $codes)) {\n $delivdate = $transit_arr['1DM']['transit_timestamp'];\n if (abs($daydiff) > 10) {\n // Make changes in deliv date\n $delivdate = fixdeliv_different($delivdate, $daydiff);\n }\n array_push($codes, 'DA1');\n $ship['DA1'] = array('ServiceCode' => '1DM', 'ServiceName' => $row['ServiceName'], 'Rate' => $row['Rate'], 'DeliveryDate' => $delivdate, 'current' => 0,);\n $code .= \"1DA|\";\n } else {\n $ship['DA1']['Rate'] = $ship['DA1']['Rate'] + $row['Rate'];\n }\n }\n } elseif ($row['ServiceCode'] == '08') {\n if (isset($transit_arr['05'])) {\n if (!in_array('UPSExpedited', $codes)) {\n $delivdate = $transit_arr['05']['transit_timestamp'];\n if (abs($daydiff) > 10) {\n // Make changes in deliv date\n $delivdate = fixdeliv_different($delivdate, $daydiff);\n }\n array_push($codes, 'UPSExpedited');\n $ship['UPSExpedited'] = array('ServiceCode' => '08', 'ServiceName' => 'Expedited', /* $row['ServiceName'], */\n 'Rate' => $row['Rate'], 'DeliveryDate' => $delivdate, 'current' => 0,);\n $code .= \"08|\";\n } else {\n $ship['UPSExpedited']['Rate'] = $ship['UPSExpedited']['Rate'] + $row['Rate'];\n }\n }\n /* UPS Worldwide Express */\n } elseif ($row['ServiceCode'] == '07') {\n if (isset($transit_arr['01'])) {\n if (!in_array('UPSExpress', $codes)) {\n $delivdate = $transit_arr['01']['transit_timestamp'];\n if (abs($daydiff) > 10) {\n // Make changes in deliv date\n $delivdate = fixdeliv_different($delivdate, $daydiff);\n }\n array_push($codes, 'UPSExpress');\n $ship['UPSExpress'] = array('ServiceCode' => '07', 'ServiceName' => 'Express', /* $row['ServiceName'],*/\n 'Rate' => $row['Rate'], 'DeliveryDate' => $delivdate, 'current' => 0,);\n $code .= \"07|\";\n } else {\n $ship['UPSExpress']['Rate'] = $ship['UPSExpress']['Rate'] + $row['Rate'];\n }\n }\n /* UPS Saver */\n } elseif ($row['ServiceCode'] == '65') {\n if (isset($transit_arr['28'])) {\n if (!in_array('UPSSaver', $codes)) {\n $delivdate = $transit_arr['28']['transit_timestamp'];\n if (abs($daydiff) > 10) {\n // Make changes in deliv date\n $delivdate = fixdeliv_different($delivdate, $daydiff);\n }\n array_push($codes, 'UPSSaver');\n $ship['UPSSaver'] = array('ServiceCode' => '65', 'ServiceName' => 'Saver', /* $row['ServiceName'], */\n 'Rate' => $row['Rate'], 'DeliveryDate' => $delivdate, 'current' => 0,);\n $code .= \"65|\";\n } else {\n $ship['UPSSaver']['Rate'] = $ship['UPSSaver']['Rate'] + $row['Rate'];\n }\n }\n /* UPS Worldwide Expedited */\n }\n }\n }\n }\n }\n $out['ship'] = $ship;\n $out['code'] = $code;\n // $out['codes'] = $codes;\n return $out;\n}", "public function getShippingRateInput();", "public function paidShipping($user, $cost);", "function calculateExpressShipping($cartObj){\n if ($cartObj->getTotalCost() < 2500){\n $shipping = ($cartObj->getTotalIndividualPaintings() * 50);\n }\n else {\n $shipping = 0;\n }\n $cartObj->setShippingCostExpress($shipping);\n return $shipping;\n}", "function calculateTotalExpress($cartObj){\n return $cartObj->getTotalCost() + $cartObj->getShippingCostExpress();\n}", "function calculate_shipping($cart=array())\n{\n $price = 0.0;\n if(is_array($cart))\n {\n foreach($cart as $prodid => $qty)\n { \nif ($prodid !='items' && $prodid!='total_price' && $prodid!='total_tax' && $prodid!='total_shipping' && $prodid!='grand_total' && $prodid!='parts'){\n $query = \"select shipcost from products where idcode='$prodid'\";\n $result = mysql_query($query);\n if ($result)\n {\n $row=mysql_fetch_array($result);\n $shipping = $row[\"shipcost\"];\n $price +=($shipping*$qty);\n}\n }\n }\n }\n return $price;\n}", "public function calculateAction()\n {\n $helper = Mage::helper('novaposhta');\n $warehouseId = (int) $this->getRequest()->getParam('warehouse');\n\n $result = $helper->getShippingCost($warehouseId);\n $result['cost'] = $helper->currency( (float) $result['cost'], true, false);\n\n $this->getResponse()->setBody($helper->jsonEncode($result));\n }", "public function calculate_shipping( $package = array() ) {\r\n \r\n $cost = $this->cost;\r\n \r\n $this->add_rate( array(\r\n 'id' => $this->id,\r\n 'label' => $this->title,\r\n 'package' => $package,\r\n 'cost' => $cost,\r\n 'taxes' => false\r\n ) );\r\n }", "public function totalCost()\n {\n return collect($this->currentCart())->sum('total_price');\n }", "function calculateTotalPrice()\n{\n $cartTotal = getCartTotal();\n $shippingFees = calculateShippingFees();\n return $cartTotal + $shippingFees;\n}", "public function totalCost()\n {\n return $this->tickets->sum('price');\n }", "public function getPayPalTsProtectionCosts()\n {\n }", "public function calculateShipmentCost(Request $request)\n {\n \n /**\n * validate the input fields\n **/\n \n //dd($request);\n $user = Auth::user();\n \n $shippingrates = Shippingrate::select('rate')->where('weight_from', '<=', $request->weight)\n ->where('weight_to','>', $request->weight)->first();\n\n //dd($request);\n //dd($shippingrates);\n $shipment = new Shipment();\n $shipment ->updateOrCreate(['id'=>$request->id],[\n 'shipping_rate'=>$shippingrates->rate,\n 'shipping_cost'=>$shippingrates->rate*$request->weight\n ]);\n\n //dd($shipment);\n //$cost=$shippingrates*$request->weight;\n //dd($cost);\n if($shipment){\n flash('Shipping cost updated successfully!')->info();\n $role=Auth::user()->role;\n if ($role=='Admin') {\n return redirect()->back();\n }\n else if ($role=='Employee') {\n return redirect()->back();\n } \n }else{\n flash('Error updating shipping cost!')->error();\n return redirect()->back(); \n }\n \n\n }", "protected function _initTotals()\n {\n\t\t\n$id =$this->getSource()->getQuoteId();\n$fee = 0;\n\tif(is_numeric($id) && $id > 0) {\n\t\t $resource = Mage::getSingleton('core/resource');\n\t\t$readConnection = $resource->getConnection('core_read');\n\t\t$table = $resource->getTableName('sales/quote_address');\n\t\t$query = 'SELECT beezup_fee FROM ' . $table . ' WHERE quote_id = '.$id.' and address_type = \\'shipping\\' LIMIT 1';\t \n\t\t$fee = $readConnection->fetchOne($query);\n\t}\n\t parent::_initTotals();\n \n \n if ($fee>0) {\n $this->addTotalBefore(new Varien_Object(array(\n 'code' => 'turnkeye_insurance',\n 'value' => $fee,\n 'base_value'=> $fee,\n 'label' => 'Frais de Gestion Cdiscount',\n ), array('shipping', 'tax')));\n }\n\t\t $this->_totals['paid'] = new Varien_Object(array(\n 'code' => 'paid',\n 'strong' => true,\n 'value' => $this->getSource()->getTotalPaid() +$fee,\n 'base_value'=> $this->getSource()->getBaseTotalPaid() + $fee,\n 'label' => $this->helper('sales')->__('Total Paid'),\n 'area' => 'footer'\n ));\n\t\t\n\t\t $this->_totals['grand_total'] = new Varien_Object(array(\n 'code' => 'grand_total',\n 'strong' => true,\n 'value' => $this->getSource()->getGrandTotal() +$fee,\n 'base_value'=> $this->getSource()->getBaseGrandTotal() +$fee,\n 'label' => $this->helper('sales')->__('Grand Total'),\n 'area' => 'footer'\n ));\n\t\t\n // $this->setGrandTotal($this->getGrandTotal() + 20);\n return $this;\n }", "public function getTotalCost()\r\n\t{\r\n\t\treturn $this->productInvoice->getTotal();\r\n\t}", "public function getShippingCost()\n {\n $discounted = $this->getDiscountedCost();\n if (null === $discounted) {\n return $this->getRegularCost();\n }\n return $discounted;\n }", "public function getRate($shippingCode, $cartItems, $freeVistaEditionTypes = array('15', '17', '19', '22')) {\n\n\t\t//Initiate rate, handling, shipping rate and apply handling variables.\n \t$rate = 0.00;\n \t$handling = $this->rateTable[$shippingCode]['handling_fee'];\n\t\t\n\t$shippingRate = $this->rateTable[$shippingCode];\n\t\t\n\t$applyHandlingFee = false;\n\t$configurables = array();\n \tforeach($cartItems as $item) {\n \t\t//Load the product based off the cart item. \n \t\t$product = Mage::getModel('catalog/product')->load( $item->getProductId() );\n \t\tif($item->getParentItem()) {\n\t\t\tcontinue;\n\t\t}\n \t\t//Skips to the next item if the product belongs to a vendor. It's possible to get here if a cart has mixed items of dropshipped and F+W Media products.\n \t\tif($product->getDropshipVendorId() != 0 && $product->getDropshipVendorId() != null && $product->getDropshipVendorId() != '') {\n \t\t\tcontinue;\n \t\t}\n \t\t\n \t\t$productType = $product->getVistaEditionType();\n \t\t\n\t\t\t//Skips to the next item if product vista edition type is in the array freeVistaEditionTypes\n\t \tif(in_array($productType, $freeVistaEditionTypes)) {\n\t \t\tcontinue;\n\t \t}\n\t \t\n\t \t//We reached an item that is not assigned a dropshipper and isn't considered a free shipping type so set applyHandlingFee to free and get the rate. \n\t \t$applyHandlingFee = true;\n\t \t$itemQty = $item->getQty();\n\t \t\n\t \t//First check to see if the vistaEditionType is a special rate, if so use that rate instead of default.\n\t \tif(isset($shippingRate['product_level_rate']) && isset($shippingRate['product_level_rate'][$productType])) {\n\t \t\t$rate += $shippingRate['product_level_rate'][$productType] * $itemQty;\n\t \t} else {\n\t \t\t//Use default rate based on shipping code that was passed.\n\t \t\t$rate += $shippingRate['default_rate'] * $itemQty;\n\t \t}\n \t}\n \t\n \tif($applyHandlingFee == true) {\n \t\t$rate += $shippingRate['handling_fee'];\n \t}\n \t\n \treturn $rate;\n }", "private function getTotalsForDisplay()\n {\n\t\tif(\\Cart2Quote\\License\\Model\\License::getInstance()->isValid()) {\n\t\t\t$source = $this->getSource();\n $store = $source->getStore();\n $amount = $this->getQuote()->formatPriceTxt($this->getAmount());\n $amountInclTax = $this->getSource()->getShippingInclTax();\n if (!$amountInclTax) {\n $amountInclTax = $this->getAmount() + $this->getSource()->getShippingTaxAmount();\n }\n $amountInclTax = $this->getQuote()->formatPriceTxt($amountInclTax);\n $fontSize = $this->getFontSize() ? $this->getFontSize() : 7;\n if ($this->_taxConfig->displaySalesShippingBoth($store)) {\n $totals = [\n [\n 'amount' => $this->getAmountPrefix() . $amount,\n 'label' => __('Shipping (Excl. Tax)') . ':',\n 'font_size' => $fontSize,\n ],\n [\n 'amount' => $this->getAmountPrefix() . $amountInclTax,\n 'label' => __('Shipping (Incl. Tax)') . ':',\n 'font_size' => $fontSize\n ],\n ];\n } elseif ($this->_taxConfig->displaySalesShippingInclTax($store)) {\n $totals = [\n [\n 'amount' => $this->getAmountPrefix() . $amountInclTax,\n 'label' => __($this->getTitle()) . ':',\n 'font_size' => $fontSize,\n ],\n ];\n } else {\n $totals = [\n [\n 'amount' => $this->getAmountPrefix() . $amount,\n 'label' => __($this->getTitle()) . ':',\n 'font_size' => $fontSize,\n ],\n ];\n }\n return $totals;\n\t\t}\n\t}", "public function calculate_shipping( $package ) {\n\n $countries = new WC_Countries();\n \n $Freight_Quote_Shipping_Method = new Freight_Quote_Shipping_Method();\n $settings = $Freight_Quote_Shipping_Method->settings;\n\n if(empty($settings['username']) || empty($settings['password'])){\n\n $message = sprintf('Username or Password is missing for Freight Quote.');\n $messageType = \"error\";\n \n if( ! wc_has_notice( $message, $messageType ) ) {\n wc_add_notice( $message, $messageType );\n }\n }\n \n $credentails = array(\n 'username' => $settings['username'],\n 'password' => $settings['password']\n );\n $cost = 0;\n \n if(isset($package[\"destination\"])&&$package[\"destination\"]['postcode']&&$package[\"destination\"]['country']){\n $freightquote = new Freightquote($credentails);\n\n $requests = [];\n foreach ( $package['contents'] as $item_id => $values ) \n { \n $_product = $values['data']; \n $zipcode = $_product->get_attribute('pa_'.$settings['zipcode_field']) ? $_product->get_attribute('pa_'.$settings['zipcode_field']) : $settings['zipcode'];\n\n $product = [\n 'Weight' => $_product->get_weight(),\n 'Length' => $_product->get_length(),\n 'Height' => $_product->get_height(),\n 'Width' => $_product->get_width(),\n 'ProductDescription' => $_product->get_name(),\n 'PackageType' => 'Boxes',\n 'ContentType' => 'NewCommercialGoods',\n 'IsHazardousMaterial' => 'false',\n 'PieceCount' => $values['quantity'],\n ];\n\n if(isset($requests[$zipcode])){\n $requests[$zipcode]['QuoteShipment']['ShipmentProducts']['Product'][] = $product;\n continue;\n }\n\n $requests[$zipcode] = array(\n 'CustomerId'=> $settings['username'],\n 'QuoteType' => 'B2B',\n 'ServiceType' => 'LTL',\n 'QuoteShipment' => array(\n 'IsBlind' => 'false',\n 'ShipmentLocations' => array(\n 'Location' => array(\n array(\n 'LocationType' => 'Origin',\n 'LocationAddress' => array(\n 'PostalCode' => $zipcode,\n 'CountryCode' => $countries->get_base_country(),\n ),\n ),\n array(\n 'LocationType' => 'Destination',\n 'LocationAddress' => array(\n 'PostalCode' => $package[\"destination\"]['postcode'],\n 'CountryCode' => $package[\"destination\"]['country'],\n ),\n \n ),\n ),\n ),\n 'ShipmentProducts' => array(\n 'Product' => [$product]\n ),\n ),\n );\n \n }\n\n foreach ($requests as $request) {\n $response = $freightquote->getQuotes($request);\n // echo \"<pre>\";print_r($response);echo \"</pre>\";die();\n\n if($response && isset($response['status']) && $response['status']){\n $cost = $response['data']['QuoteCarrierOptions'][0]['CarrierOption'][0]['QuoteAmount'] + $cost;\n }elseif(isset($response['error'])){\n $message = sprintf(isset($response['error']['ErrorMessage'])?$response['error']['ErrorMessage']:'Error in FreightQuote Api');\n $messageType = \"error\";\n \n if( ! wc_has_notice( $message, $messageType ) ) {\n wc_add_notice( $message, $messageType );\n }\n }\n }\n\n if($cost){\n\n $rate = array(\n 'id' => $this->id,\n 'label' => $this->title,\n 'cost' => $cost\n );\n \n $this->add_rate( $rate );\n }\n }\n\n \n }", "public function get_calculated_shipping()\n {\n }", "public function get_cart_shipping_total()\n {\n }", "function getShippingCostForCustomerOfOrders($startDatetimestamp, $stopDatetimestamp) {\n\t$extraSQL = \"\";\n\t$extraSQL = ($startDate == \"\" || $stopDate == \"\") ? \"\" : \" AND o.datetimestamp >= '\" . $startDatetimestamp . \"' AND o.datetimestamp < '\" . $stopDatetimestamp . \"'\";\n\t$sql = \"SELECT SUM(o.shipping_price) AS totalCost FROM `\" . DBTABLEPREFIX . \"orders_products` op LEFT JOIN `\" . DBTABLEPREFIX . \"orders` o ON o.id = op.order_id LEFT JOIN `\" . DBTABLEPREFIX . \"purchaseorders` po ON po.purchaseorders_order_id = o.id WHERE o.status = '\" . STATUS_ORDER_SHIPPED . \"'\" . $extraSQL;\n\t$result = mysql_query($sql);\n\t//echo $sql . \"<br />\";\n\t\t\t\t\t\n\tif ($result && mysql_num_rows($result) > 0) {\n\t\twhile ($row = mysql_fetch_array($result)) {\n\t\t\treturn $row['totalCost'];\n\t\t}\n\t\n\t\tmysql_free_result($result);\n\t}\n\telse {\n\t\treturn \"0\";\n\t}\n}", "private function getUsswEbayCost($pPrice,$tariff,$wFee,$tFee,$sFee,$sPrice){\n\t\t$exchange = M(C('DB_METADATA'))->where(C('DB_METADATA_ID'))->getField(C('DB_METADATA_USDTORMB'));\n\t\treturn round((($pPrice+0.5)/$exchange+($pPrice*1.2/$exchange)*$tariff+$wFee+$tFee+$sFee+$sPrice*0.129+0.3),2);\n\t}", "public function getCost()\n {\n return $this->beverage->getCost() + 2;\n }", "function tep_get_tax_rate($class_id, $country_id = -1, $zone_id = -1) {\n//Eversun mod for sppc and qty price breaks\n\n if ( ! isset($_SESSION['sppc_customer_group_tax_exempt']) ) {\n $customer_group_tax_exempt = '0';\n } else {\n $customer_group_tax_exempt = $_SESSION['sppc_customer_group_tax_exempt'];\n }\n\n if ($customer_group_tax_exempt == '1') return 0;\n\n if( ! isset($_SESSION['customer_country_id'])) {\n $_SESSION['customer_country_id'] = false;\n }\n if( ! isset($_SESSION['customer_zone_id'])) {\n $_SESSION['customer_zone_id'] = false;\n }\n\n//Eversun mod end for sppc and qty price breaks\n if ( ($country_id == -1) && ($zone_id == -1) ) {\n if ( ! isset($_SESSION['customer_id']) ) {\n $country_id = STORE_COUNTRY;\n $zone_id = STORE_ZONE;\n } else {\n $country_id = $_SESSION['customer_country_id'];\n $zone_id = $_SESSION['customer_zone_id'];\n }\n }\n\n $tax_query = tep_db_query(\"select sum(tax_rate) as tax_rate from \" . TABLE_TAX_RATES . \" tr left join \" . TABLE_ZONES_TO_GEO_ZONES . \" za on (tr.tax_zone_id = za.geo_zone_id) left join \" . TABLE_GEO_ZONES . \" tz on (tz.geo_zone_id = tr.tax_zone_id) where (za.zone_country_id is null or za.zone_country_id = '0' or za.zone_country_id = '\" . (int)$country_id . \"') and (za.zone_id is null or za.zone_id = '0' or za.zone_id = '\" . (int)$zone_id . \"') and tr.tax_class_id = '\" . (int)$class_id . \"' group by tr.tax_priority\");\n if (tep_db_num_rows($tax_query)) {\n $tax_multiplier = 1.0;\n while ($tax = tep_db_fetch_array($tax_query)) {\n $tax_multiplier *= 1.0 + ($tax['tax_rate'] / 100);\n }\n return ($tax_multiplier - 1.0) * 100;\n } else {\n return 0;\n }\n }", "public function TotalCosts()\n\t{\t$cost = $this->details['tuition_c'] + $this->details['reg_c'] + $this->details['enrol_c'] + $this->details['exam_c'] + $this->details['other_c'] + $this->details['books_c'] + $this->details['equip_c'] + $this->details['courseother_c'] + ($this->details['travel_weeks'] * $this->details['travel_c']);\n\t\t\n\t\treturn $cost;\n\t}", "protected function get_item_costs_by_tax_class()\n {\n }", "public function getShippingRefunded()\n {\n $salesFlatCreditmemo = Mage::getSingleton('core/resource')->getTableName('sales_flat_creditmemo');\n $write = Mage::getSingleton('core/resource')->getConnection('core_write'); \n $supplierId = Mage::getSingleton('admin/session')->getUser()->getUserId();\n $orderId = Mage::app()->getRequest()->getParam('order_id');\n $select = \"SELECT sum(`ce`.`shipping_rate`) as shipping_refunded, sum(`ce`.`base_shipping_rate`) as base_shipping_refunded FROM `\".$salesFlatCreditmemo.\"` AS `ce` WHERE (ce.supplier_id= \".$supplierId.\" and `ce`.`order_id` = \".$orderId .\" )\";\n $result = $write->fetchRow($select);\n if($result['shipping_refunded']!= null) {\n $shippingRefunded['shipping_refunded'] = $result['shipping_refunded'];\n\t\t\t$shippingRefunded['base_shipping_refunded'] = $result['base_shipping_refunded'];\n\t\t} else {\n\t\t\t$shippingRefunded['shipping_refunded'] = 0;\n\t\t $shippingRefunded['base_shipping_refunded'] =0;\n\t\t}\n\t\treturn $shippingRefunded;\t\t\n }", "public function getOriginalShippingPrice();", "public function calculateProductShippingFeeBasedOnWeight(){\n\t\t$flat_rate = __FLAT_RATE__;\n\t\t$total_prices_of_products = $this->getTotalPricesOfProducts();\n\t\t$charged_over_weight = $this->chargeOverWeightForEachProduct($flat_rate);\n\t\t\n\t\t// Secion A Condition #1 : If at least one product weight more than 1KG, despite above conditions, \n\t\t// 10% of \"Flat Rate\" amount will be charged per additional KG per product.\n\t\tif($charged_over_weight > 0)\n\t\t\treturn ($flat_rate + $charged_over_weight);\n\t\t\n\t\t// Section A Condition #2 : If the Cart value (total value of products) > $100, the shipping fee is free.\n\t\tif($total_prices_of_products > 100)\n\t\t\treturn 0;\n\t\t// Section A Condition : If Condition #1 & #2 is invalid, shipping fee is Flat Rate = $5.\n\t\treturn $flat_rate;\n\t}", "public function shippingcost($country_code = 'OTHER', $user_id = 0)\n\t{\n\t\t//if user isn't logged in we will default to the us rate\n\t\tif ($user_id == 0 || $user_id = null) {\n\t\t\t$country_code = 'US';\n\t\t}\n\n\t\treturn $this->GetRegionShippingCost($country_code);\n\t}", "protected function applyOffers($products, $totalCost) : Float {\n\n // Check if there is any offer on a product\n foreach($products as $product) {\n // Iterate over offers\n foreach($this->offers as $offer) {\n \n /**\n * Check if a product matches the products (in basket)\n * Also check if quantity is greater than 1\n */\n if($offer['itemCode'] === $product['product']->getCode() && $product['qty'] >= $offer['qtyApplicable']) {\n\n \n // This formula is the key to apply offer discount to every couple in the basket instead of just the second\n $discountCount = floor($product['qty'] / $offer['qtyApplicable']); \n \n // Check if the offer amount is a fixed price or percentage\n if( $offer['isPercentage'] ) {\n\n $offerDiscount = $product['product']->getPrice() * ($offer['offerDiscount'] * ($discountCount) / 100);\n $totalCost = $totalCost - ( $offerDiscount );\n\n } else {\n\n $offerDiscount = $product['product']->getPrice() - $offer['offerDiscount'];\n $totalCost = $totalCost - ( $offerDiscount );\n\n }\n\n } // Offer match condition ends here\n\n } // Nestd offers loop ends here\n\n } // Products loop ends here\n\n return $totalCost;\n }", "public function setShipping(float $cost);", "public function onKetshopShipping($deliveryAddress, $nbProducts, $weightsDimensions)\r\n {\r\n $shippings = $this->getShippings('shipping', $nbProducts);\r\n $shippings = $this->checkWeight($shippings, $weightsDimensions);\r\n//var_dump($shippings);\r\n foreach($shippings as $key => $shipping) {\r\n // \r\n if($shipping->delivery_type == 'at_destination') {\r\n\t// Searches postcodes. \r\n\tforeach($shipping->postcodes as $postcode) {\r\n\t if($deliveryAddress->postcode >= $postcode->from && $deliveryAddress->postcode <= $postcode->to) {\r\n\t $shippings[$key]->shipping_cost = $postcode->cost;\r\n\t }\r\n\t}\r\n\r\n\t// In case a cost is found, moves on to the next shipping.\r\n\tif(isset($shippings[$key]->shipping_cost)) { continue; }\r\n\r\n\t// Searches cities. \r\n\tforeach($shipping->cities as $city) {\r\n\t if($deliveryAddress->city == $city->name) {\r\n\t $shippings[$key]->shipping_cost = $city->cost;\r\n\t }\r\n\t}\r\n\r\n\tif(isset($shippings[$key]->shipping_cost)) { continue; }\r\n\r\n\t// Searches regions. \r\n\tforeach($shipping->regions as $region) {\r\n\t if($deliveryAddress->region_code == $region->code) {\r\n\t $shippings[$key]->shipping_cost = $region->cost;\r\n\t }\r\n\t}\r\n\r\n\tif(isset($shippings[$key]->shipping_cost)) { continue; }\r\n\r\n\t// Searches countries. \r\n\tforeach($shipping->countries as $country) {\r\n\t if($deliveryAddress->country_code == $country->code) {\r\n\t $shippings[$key]->shipping_cost = $country->cost;\r\n\t }\r\n\t}\r\n\r\n\tif(isset($shippings[$key]->shipping_cost)) { continue; }\r\n\r\n\t// Searches continents. \r\n\tforeach($shipping->continents as $continent) {\r\n\t if($deliveryAddress->continent_code == $continent->code) {\r\n\t $shippings[$key]->shipping_cost = $continent->cost;\r\n\t }\r\n\t}\r\n\r\n\t// In case no cost has been found, the shipping is removed from the list.\r\n\tif(!isset($shippings[$key]->shipping_cost)) {\r\n\t unset($shippings[$key]);\r\n\t}\r\n }\r\n // at delivery point.\r\n else {\r\n\t$shippings[$key]->shipping_cost = $shipping->delivpnt_cost;\r\n }\r\n }\r\n\r\n return $shippings;\r\n }", "function _calculate_dimensshipcost($options)\n{\n $ci=&get_instance();\n $zip = $options['zip'];\n $numinpack = (isset($options['numinpack']) ? $options['numinpack'] : 1);\n $itemweight = (isset($options['weight']) ? $options['weight'] : '0.010');\n $qty = (isset($options['itemqty']) ? $options['itemqty'] : 250);\n $startdeliv = (isset($options['startdeliv']) ? $options['startdeliv'] : time());\n $vendorzip = (isset($options['vendor_zip']) ? $options['vendor_zip'] : $ci->config->item('zip'));\n $item_length = (isset($options['item_length']) ? $options['item_length'] : 0);\n $item_width = (isset($options['item_width']) ? $options['item_width'] : 0);\n $item_height = (isset($options['item_height']) ? $options['item_height'] : 0);\n $ship = $options['ship'];\n $cnt_code = (isset($options['cnt_code']) ? $options['cnt_code'] : 'US');\n $brand = ifset($options,'ALL');\n /* Calculate REST of full cartoon */\n if (intval($numinpack) == 0) {\n $ci->load->config('shipping');\n $numinpack = $ci->config->item('default_inpack');\n }\n $numpack = ceil($qty / $numinpack);\n $shipratekf = ($numpack > 1 ? $numpack : 1);\n $transitpack = 1;\n $transitweigth = $itemweight * $numinpack;\n $ci->load->library('United_parcel_service');\n $out = array();\n $daydiff = round((time() - $startdeliv) / (24 * 60 * 60), 0);\n\n if (abs($daydiff) > 10) {\n $startdeliv = strtotime(date('Y-m-d') . ' + 1 day');\n }\n $code = '';\n $upsserv = new United_parcel_service();\n $transit_arr = $upsserv->ship_time($zip, $cnt_code, $transitpack, $transitweigth, date('Ymd', $startdeliv), $vendorzip);\n if ($transit_arr['result'] == FALSE) {\n $out['result'] = FALSE;\n $out['error'] = $transit_arr['msg'];\n $out['error_code'] = 'TNT';\n } else {\n $transit_arr = $transit_arr['times'];\n $out['times'] = $transit_arr;\n $restResult = $upsserv->ship_rates($zip, '', $transitpack, $transitweigth, $startdeliv, true, $vendorzip, $cnt_code, $item_length, $item_width, $item_height);\n // $item_length, $item_width, $item_height\n $ratescalc =1;\n if ($restResult['result'] == FALSE) {\n $ratescalc = 0;\n $errmsg = $restResult['msg'];\n }\n if ($ratescalc == 0) {\n $out['result'] = FALSE;\n $out['error'] = $errmsg;\n $out['error_code'] = 'RATES';\n } else {\n $out['result'] = TRUE;\n $code = \"\";\n $codes = array();\n $rates = $restResult['rates'];\n foreach ($rates as $row) {\n $delivdate = '';\n if ($row['ServiceCode'] == '03') {\n if (isset($transit_arr['GND'])) {\n array_push($codes, 'GND');\n $delivdate = $transit_arr['GND']['transit_timestamp'];\n if (abs($daydiff) > 10) {\n // Make changes in deliv date\n $delivdate = fixdeliv_different($delivdate, $daydiff);\n }\n $ship['GND'] = array(\n 'ServiceCode' => 'GND', // 'ServiceName' =>$row['ServiceName'],\n 'ServiceName' => 'Ground', // 'Rate' =>$row['Rate'],\n 'Rate' => round($row['Rate'] * $shipratekf, 2),\n 'DeliveryDate' => $delivdate, 'current' => 0,\n );\n // $ship['deliv']=$delivdate;\n $code .= \"GND|\";\n } elseif (isset ($transit_arr['G'])) {\n array_push($codes, 'GND');\n $delivdate = $transit_arr['G']['transit_timestamp'];\n if (abs($daydiff) > 10) {\n // Make changes in deliv date\n $delivdate = fixdeliv_different($delivdate, $daydiff);\n }\n $ship['GND'] = array(\n 'ServiceCode' => 'GND',\n 'ServiceName' => 'Ground',\n 'Rate' => round($row['Rate'] * $shipratekf, 2),\n 'DeliveryDate' => $delivdate,\n 'current' => 0,\n );\n $code .= \"GND|\";\n }\n /* Canadian */\n /* UPS Standard */\n } elseif ($row['ServiceCode'] == '11') {\n if (isset($transit_arr['03'])) {\n $delivdate = $transit_arr['03']['transit_timestamp'];\n if (abs($daydiff) > 10) {\n // Make changes in deliv date\n $delivdate = fixdeliv_different($delivdate, $daydiff);\n }\n array_push($codes, 'UPSStandard');\n $ship['UPSStandard'] = array(\n 'ServiceCode' => '11',\n 'ServiceName' => 'Ground',\n 'Rate' => round($row['Rate'] * $shipratekf, 2),\n 'DeliveryDate' => $delivdate, 'current' => 0,\n );\n $code .= \"11|\";\n }\n } elseif ($row['ServiceCode'] == '02') {\n if (isset($transit_arr['2DA'])) {\n $delivdate = $transit_arr['2DA']['transit_timestamp'];\n if (abs($daydiff) > 10) {\n // Make changes in deliv date\n $delivdate = fixdeliv_different($delivdate, $daydiff);\n }\n array_push($codes, 'DA2');\n $ship['DA2'] = array(\n 'ServiceCode' => '2DA',\n 'ServiceName' => $row['ServiceName'],\n 'Rate' => round($row['Rate'] * $shipratekf, 2),\n 'DeliveryDate' => $delivdate, 'current' => 0,\n );\n $code .= \"2DA|\";\n } elseif (isset($transit_arr['02'])) {\n $delivdate = $transit_arr['02']['transit_timestamp'];\n if (abs($daydiff) > 10) {\n // Make changes in deliv date\n $delivdate = fixdeliv_different($delivdate, $daydiff);\n }\n array_push($codes, 'DA2');\n $ship['DA2'] = array(\n 'ServiceCode' => '2DA',\n 'ServiceName' => '2nd Day Air',\n 'Rate' => round($row['Rate'] * $shipratekf, 2),\n 'DeliveryDate' => $delivdate, 'current' => 0,\n );\n $code .= \"2DA|\";\n }\n } elseif ($row['ServiceCode'] == '13') {\n if (isset($transit_arr['1DP'])) {\n $delivdate = $transit_arr['1DP']['transit_timestamp'];\n if (abs($daydiff) > 10) {\n // Make changes in deliv date\n $delivdate = fixdeliv_different($delivdate, $daydiff);\n }\n array_push($codes, 'DP1');\n $ship['DP1'] = array(\n 'ServiceCode' => '1DP',\n 'ServiceName' => $row['ServiceName'],\n 'Rate' => round($row['Rate'] * $shipratekf, 2),\n 'DeliveryDate' => $delivdate,\n 'current' => 0,\n );\n $code .= \"1DP|\";\n }\n } elseif ($row['ServiceCode'] == '01') {\n // 1 Day Air\n if (isset($transit_arr['01'])) {\n $delivdate = $transit_arr['01']['transit_timestamp'];\n if (abs($daydiff) > 10) {\n // Make changes in deliv date\n $delivdate = fixdeliv_different($delivdate, $daydiff);\n }\n array_push($codes, 'DP1');\n $ship['DP1'] = array(\n 'ServiceCode' => '1DP',\n 'ServiceName' => 'Next Day PM',\n 'Rate' => round($row['Rate'] * $shipratekf, 2),\n 'DeliveryDate' => $delivdate,\n 'current' => 0,\n );\n $code .= \"1DP|\";\n }\n } elseif ($row['ServiceCode'] == '14') {\n if (isset($transit_arr['1DM'])) {\n $delivdate = $transit_arr['1DM']['transit_timestamp'];\n if (abs($daydiff) > 10) {\n // Make changes in deliv date\n $delivdate = fixdeliv_different($delivdate, $daydiff);\n }\n array_push($codes, 'DA1');\n $ship['DA1'] = array(\n 'ServiceCode' => '1DM',\n 'ServiceName' => $row['ServiceName'],\n 'Rate' => round($row['Rate'] * $shipratekf, 2),\n 'DeliveryDate' => $delivdate,\n 'current' => 0,\n );\n $code .= \"1DA|\";\n }\n } elseif ($row['ServiceCode'] == '08') {\n if (isset($transit_arr['05'])) {\n $delivdate = $transit_arr['05']['transit_timestamp'];\n if (abs($daydiff) > 10) {\n // Make changes in deliv date\n $delivdate = fixdeliv_different($delivdate, $daydiff);\n }\n array_push($codes, 'UPSExpedited');\n $ship['UPSExpedited'] = array(\n 'ServiceCode' => '08',\n 'ServiceName' => 'Expedited',\n 'Rate' => round($row['Rate'] * $shipratekf, 2),\n 'DeliveryDate' => $delivdate,\n 'current' => 0,\n );\n $code .= \"08|\";\n }\n /* UPS Worldwide Express */\n } elseif ($row['ServiceCode'] == '07') {\n if (isset($transit_arr['01'])) {\n $delivdate = $transit_arr['01']['transit_timestamp'];\n if (abs($daydiff) > 10) {\n // Make changes in deliv date\n $delivdate = fixdeliv_different($delivdate, $daydiff);\n }\n array_push($codes, 'UPSExpress');\n $ship['UPSExpress'] = array(\n 'ServiceCode' => '07',\n 'ServiceName' => 'Express',\n 'Rate' => round($row['Rate'] * $shipratekf, 2),\n 'DeliveryDate' => $delivdate,\n 'current' => 0,\n );\n $code .= \"07|\";\n }\n /* UPS Saver */\n } elseif ($row['ServiceCode'] == '65') {\n if (isset($transit_arr['28'])) {\n $delivdate = $transit_arr['28']['transit_timestamp'];\n if (abs($daydiff) > 10) {\n // Make changes in deliv date\n $delivdate = fixdeliv_different($delivdate, $daydiff);\n }\n array_push($codes, 'UPSSaver');\n $ship['UPSSaver'] = array(\n 'ServiceCode' => '65',\n 'ServiceName' => 'Saver',\n 'Rate' => round($row['Rate'] * $shipratekf, 2),\n 'DeliveryDate' => $delivdate,\n 'current' => 0,\n );\n $code .= \"65|\";\n }\n /* UPS Worldwide Expedited */\n }\n }\n }\n }\n $out['ship'] = $ship;\n $out['code'] = $code;\n return $out;\n}", "public function testRuleByProductWeightWithoutFreeShipping()\n {\n $cartId = $this->prepareQuote(5);\n $methods = $this->estimateShipping($cartId);\n\n $this->assertTrue(count($methods) > 0);\n $this->assertEquals('flatrate', $methods[0]->getMethodCode());\n $this->assertEquals(25, $methods[0]->getAmount());\n }", "private function calculateBilling($items){\n //initialise a total counter\n $total = 0;\n\n foreach ($items as $item){\n $product = Product::whereId($item->id)->first();\n $material = Material::whereId($item -> options -> material -> material_id)->first();\n\n Log::info('Product id '.$item->id);\n Log::info('Material id '.$item -> options -> material -> material_id);\n\n // add the products price times the quantity of the product\n $total += ($product -> price * $item->qty);\n Log::info('Product Cost'.$total);\n\n // add the material price per the amount of yards for the product\n $total += ($material->price * ($product->no_of_yards * $item -> qty));\n Log::info('Material Cost '.$material->price);\n Log::info('No of yards '.$product->no_of_yards);\n\n Log::info('Total before shipping '.$total);\n\n }\n\n //add the shipping price to the total\n $total += config('payments.shipping');\n\n Log::info('Total After shipping'+$total);\n return $total;\n }", "public function cost() {\n\t\treturn $this->meta( 'wprm_cost', '' );\n\t}", "public function getShipment()\n {\n $user = $this->getUser();\n $basket = $this->getBasket();\n if (!empty($user['additional']['charge_vat'])) {\n return $basket['sShippingcostsWithTax'];\n }\n\n return str_replace(',', '.', $basket['sShippingcosts']);\n }", "function getSubtotal($clientId, $destId, $sendby, $weight){\n\t\t\n\t\t$maxWeight = $this->getMaxWeight($clientId, $destId, $sendby);\n\t\t\n\t\t$maxWeightRate = explode('-', $maxWeight);\n\t\t\n\t\t// Check if the input weight is greater than \n\t\t// weight from DB\n\t\tif($maxWeightRate[0] < $weight){\n\t\t\t\t\t\t\n\t\t\t$remainingWeight = $weight - $maxWeightRate[0];\n\t\t\t\n\t\t\t// Get Branch Destination\n\t\t\t$getBranchDest=$this->ExecuteQuery(\"SELECT Destination_Id FROM tbl_branchs WHERE Branch_Id=\".$_SESSION['buser']);\n\t\t\t// Get Branch State\n\t\t\t$getBranchState = $this->ExecuteQuery(\"SELECT State_Id FROM tbl_destinations WHERE Destination_Id=\".$getBranchDest[1]['Destination_Id']);\t\t\n\t\t\t// Get User Input Destination State \n\t\t\t// To Compare with the Branch State\n\t\t\t$getInputState=$this->ExecuteQuery(\"SELECT State_Id FROM tbl_destinations WHERE Destination_Id=\".$destId);\n\t\t\t\n\t\t\t// check if the input destination id is \n\t\t\t// coming under the \"within state\n\t\t\tif($getBranchState[1]['State_Id'] == $getInputState[1]['State_Id']){\n\t\t\t\t\n\t\t\t\t// check if the input destination id is \n\t\t\t\t// coming under the \"within city\n\t\t\t\tif($getBranchDest[1]['Destination_Id'] == $destId){\n\t\t\t\t\t$res=$this->ExecuteQuery(\"SELECT Additional_Weight, Additional_Rate FROM tbl_rates WHERE Rate_Id=(SELECT Rate_Id FROM tbl_rates WHERE Client_Id=\".$clientId.\" AND Zone_Id=1 AND Send_By=\".$sendby.\")\");\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$res=$this->ExecuteQuery(\"SELECT Additional_Weight, Additional_Rate FROM tbl_rates WHERE Rate_Id=(SELECT Rate_Id FROM tbl_rates WHERE Client_Id=\".$clientId.\" AND Zone_Id=2 AND Send_By=\".$sendby.\")\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$res=$this->ExecuteQuery(\"SELECT Additional_Weight, Additional_Rate FROM tbl_rates WHERE Rate_Id=(SELECT Rate_Id FROM tbl_rates WHERE Client_Id=\".$clientId.\" AND Zone_Id=(SELECT Zone_Id FROM tbl_states WHERE State_Id=(SELECT State_Id FROM tbl_destinations WHERE Destination_Id=\".$destId.\")) AND Send_By=\".$sendby.\")\");\t\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\n\t\t\tif($remainingWeight < $res[1]['Additional_Weight']){\n\t\t\t\t$toatlAdditionalAmt = $res[1]['Additional_Rate'];\n\t\t\t\t$totalAmt = $maxWeightRate[1] + $toatlAdditionalAmt;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t\n\t\t\t\t$totalAdditionalWeight = $remainingWeight / $res[1]['Additional_Weight'];\n\t\t\t\t$totalWeight = ceil($totalAdditionalWeight);\n\t\t\t\t//$totalAdditionalWeight = ceil($remainingWeight);\t\t\t\t\n\t\t\t\t$toatlAdditionalAmt = $res[1]['Additional_Rate'] * $totalWeight;\t\t\t\n\t\t\t\t$totalAmt = $maxWeightRate[1] + $toatlAdditionalAmt;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\techo sprintf(\"%0.2f\",$totalAmt);\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\t\n\t\t\t// Get Branch Destination\n\t\t\t$getBranchDest=$this->ExecuteQuery(\"SELECT Destination_Id FROM tbl_branchs WHERE Branch_Id=\".$_SESSION['buser']);\n\t\t\t// Get Branch State\n\t\t\t$getBranchState = $this->ExecuteQuery(\"SELECT State_Id FROM tbl_destinations WHERE Destination_Id=\".$getBranchDest[1]['Destination_Id']);\t\t\n\t\t\t// Get User Input Destination State \n\t\t\t// To Compare with the Branch State\n\t\t\t$getInputState=$this->ExecuteQuery(\"SELECT State_Id FROM tbl_destinations WHERE Destination_Id=\".$destId);\n\t\t\t\n\t\t\t// check if the input destination id is \n\t\t\t// coming under the \"within state\n\t\t\tif($getBranchState[1]['State_Id'] == $getInputState[1]['State_Id']){\n\t\t\t\t\n\t\t\t\t// check if the input destination id is \n\t\t\t\t// coming under the \"within city\n\t\t\t\tif($getBranchDest[1]['Destination_Id'] == $destId){\n\t\t\t\t\t$res=$this->ExecuteQuery(\"SELECT Amount FROM tbl_weight_rate_relation WHERE Weight_From <= \".$weight.\" AND Weight_To >= \".$weight.\" AND Rate_Id=(SELECT Rate_Id FROM tbl_rates WHERE Client_Id=\".$clientId.\" AND Zone_Id=1 AND Send_By=\".$sendby.\")\");\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$res=$this->ExecuteQuery(\"SELECT Amount FROM tbl_weight_rate_relation WHERE Weight_From <= \".$weight.\" AND Weight_To >= \".$weight.\" AND Rate_Id=(SELECT Rate_Id FROM tbl_rates WHERE Client_Id=\".$clientId.\" AND Zone_Id=2 AND Send_By=\".$sendby.\")\");\n\t\t\t\t}\n\t\t\t}//eof if condition\n\t\t\telse{\n\t\t\t\t$res=$this->ExecuteQuery(\"SELECT Amount FROM tbl_weight_rate_relation WHERE Weight_From <= \".$weight.\" AND Weight_To >= \".$weight.\" AND Rate_Id=(SELECT Rate_Id FROM tbl_rates WHERE Client_Id=\".$clientId.\" AND Zone_Id=(SELECT Zone_Id FROM tbl_states WHERE State_Id=(SELECT State_Id FROM tbl_destinations WHERE Destination_Id=\".$destId.\")) AND Send_By=\".$sendby.\")\");\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif(count($res)!=0){\n\t\t\t\techo $res[1]['Amount'];\n\t\t\t}\n\t\t\telse{\n\t\t\t\techo 0;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "public function getOrderShippingCost($params, $shipping_cost) {\n return $shipping_cost;\n }", "public function stripe_total()\n\t{\n\t\t$products = $this->get();\n\n\t\t$data ='';\n\t\t$total = 0;\n\n\n\t\tif ($products != '')\n\t\t{\n\t\t\t// products to display\n\t\t\t$shipping = 0;\n\n\t\t\tforeach($products as $product)\n\t\t\t{\n\t\t\t\t$shipping += ($this->get_shipping_cost($product['price']));\n\t\t\t\t$total += $product['price'] * $_SESSION['cart'][$product['id']];\n\t\t\t}\n\n\t\t\t$data = (SHOP_TAX * $total) + $total + $shipping; \n\n\n\t\t\treturn $data;\n\t\t}\n\t}", "protected function get_tax_class_costs()\n {\n }", "public static function AddDeliveryCosts($session=\"\",$delivery_costs=array())\n {\n \t$sr=new SleekShopRequest();\n \t$xml=$sr->add_delivery_costs($session,$delivery_costs);\n }", "public function calculateShipping($parcel)\n {\n $rate = 1.78;\n\n // calculate the courier_list\n $rate = $this->getShippingRateForCountry($parcel->destinationCountry);\n // calculate the cost\n $cost = $rate * $parcel->weight;\n return $cost;\n }", "public function collectRates(Mage_Shipping_Model_Rate_Request $request)\n {\n // skip if not enabled\n\tif(!$this->isActive()){\n\t\treturn false;\n\t}\n\n\t$quote\t=\t$this->getQuote();\n\t$cart\t=\t$this->getCart();\n\n\t$method = Mage::getModel('shipping/rate_result_method');\n\t$method_name = '';\n\n\t/* Calcula o PESO CUBADO, que é a multiplicação das medidas de cada volume com sua quantidade e a densidade estabelecida como padrão por todas as transportadoras brasileiras.\n\t\tSe o PESO CUBADO for maior que o PESO REAL, o peso cubado é enviado para o web service calcular o frete. Caso contrário, o peso real é enviado.\n\t\tEsta é a diferença entre, por exemplo, carregar 10 kg de chumbo e 10 kg de pena. O espaço necessário para carregar o primeiro volume é muito menor que o requerido pelo segundo. */\n\t// Verifica se os campos \"comprimento\", \"largura\" e \"altura\" existem //\n\t$atributo_comprimento_existe = ($attribute = Mage::getModel('eav/entity_attribute')->loadByCode('catalog_product', 'length')) && ($attribute->getId());\n\t$atributo_largura_existe = ($attribute = Mage::getModel('eav/entity_attribute')->loadByCode('catalog_product', 'width')) && ($attribute->getId());\n\t$atributo_altura_existe = ($attribute = Mage::getModel('eav/entity_attribute')->loadByCode('catalog_product', 'height')) && ($attribute->getId());\n\n\t$peso_cubado_habilita = $atributo_comprimento_existe && $atributo_largura_existe && $atributo_altura_existe;\n\t// ================================================================= //\n\n\tif ($peso_cubado_habilita) {\n\t\t// Verifica a unidade de medida a ser utilizada //\n\t\tswitch ($this->getConfigData('measure_type')) {\n\t\t\tcase 'mm': $unidade_medida = 0.001; break;\n\t\t\tcase 'cm': $unidade_medida = 0.01; break;\n\t\t\tcase 'dm': $unidade_medida = 0.1; break;\n\t\t\tcase 'm':\n\t\t\tdefault: $unidade_medida = 1; break;\n\t\t}\n\t\t// ============================================ //\n\n\t\t// Verifica a densidade a ser utilizada, de acordo com o modal. Rodoviário = 300 Aéreo = 167 //\n\t\t$densidade = $this->getConfigData('modal_type') == 'R' ? 300 : 167;\n\n\t\t$peso_cubado = $peso_real = $peso_total = 0.00;\n\n\t\t// Calcula o peso cubado de cada item da sacola //\n\t\tforeach (Mage::getSingleton('checkout/session')->getQuote()->getAllItems() as $item) {\n\t\t\t// Carrega os dados do produto //\n\t\t\t$product = Mage::getSingleton('catalog/product')->load($item->getProduct()->getId());\n\n\t\t\t// Calcula a multiplicação do comprimento com a largura e com a altura, depois arredonda com duas casas decimais, pois uma precisão maior afeta negativamente o valor do frete //\n\t\t\t$peso_cubado_volume = (float)number_format((float)number_format($product->getData('length') * $unidade_medida, 3, '.', '') *\n\t\t\t\t\t\t\t\t\t\t\t\t\t (float)number_format($product->getData('width') * $unidade_medida, 3, '.', '') *\n\t\t\t\t\t\t\t\t\t\t\t\t\t (float)number_format($product->getData('height') * $unidade_medida, 3, '.', ''), 2, '.', '');\n\t\t\t// =========================================================================================================================================================================== //\n\n\t\t\tif ($peso_cubado_habilita && $peso_cubado_volume > 0.00) {\n\t\t\t\t// Multiplica o valor acima com a densidade, obtendo o peso cubado do volume //\n\t\t\t\t$peso_cubado_volume = (float)number_format($peso_cubado_volume * $densidade, 3, '.', '');\n\n\t\t\t\t// Multiplica o peso cubado do volume com a quantidade, obtendo o peso cubado total do item //\n\t\t\t\t$peso_cubado += (float)number_format($peso_cubado_volume * $item->getQty(), 3, '.', '');\n\t\t\t} else {\n\t\t\t\t// Desabilita o peso cubado //\n\t\t\t\t$peso_cubado = 0.00;\n\t\t\t\t$peso_cubado_habilita = false;\n\t\t\t\t// ======================== //\n\t\t\t}\n\n\t\t\t// Multiplica o peso real do produto com a quantidade, obtendo o peso real do item //\n\t\t\t$peso_real += (float)number_format($item->getWeight() * $item->getQty(), 3, '.', '');\n\t\t}\n\t\t// ============================================ //\n\n\t\t// Se o peso cubado é maior que o real, pega o cubado para enviar ao web service, caso contrário, pega o real //\n\t\t$Weight = $peso_cubado_habilita && $peso_cubado > $peso_real ? $peso_cubado : $peso_real;\n\t} else {\n\t\t// Pega o peso total dos itens //\n\t\t$Weight = $request->getPackageWeight();\n\t}\n\t// ================================================================================================================================================================================ //\n\n\t// Se a configuração do peso for em gramas, transforma o peso total para quilos //\n if ($this->getConfigData('weight_type') == 2) $Weight /= 1000;\n\n\t$PackageValue = number_format($request->getPackageValue(), 2, '.', '');\n\n\t// Verifica o CNPJ do destinatário //\n\tswitch($this->getConfigData('use_default')){\n\t\tcase 0:\n\t\t\t$cnpjdes = $quote->getData(\"customer_taxvat\");\n\t\t\tbreak;\n\n\t\tcase 1:\n\t\t\t$cnpjdes = $this->getConfigData('cnpj');\n\t\t\tbreak;\n\n\t\tcase 2:\n\t\t\t$cnpjdes = $this->getConfigData('cnpj_default');\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\t$cnpjdes = $quote->getData(\"customer_taxvat\");\n\t\t\tbreak;\n\t}\n\t// =============================== //\n\n\t// Constroi os parâmetros da chamada ao web service //\n\t$this->params = array(\"cnpj\" => preg_replace( '/[^0-9]/', '', $this->getConfigData('cnpj') ),\n\t\t\t\t\t\t \"emporigem\" => 2,\n\t\t\t\t\t\t \"ceporigem\" => preg_replace( '/[^0-9]/', '', Mage::getStoreConfig('shipping/origin/postcode', $this->getStore())),\n\t\t\t\t\t\t \"cepdestino\" => preg_replace( '/[^0-9]/', '', $request->getDestPostcode() ),\n\t\t\t\t\t\t \"cnpjrem\" => preg_replace( '/[^0-9]/', '', $this->getConfigData('cnpj') ),\n\t\t\t\t\t\t \"cnpjdes\" => preg_replace( '/[^0-9]/', '', $cnpjdes),\n\t\t\t\t\t\t \"tipofrete\" => $this->getConfigData('shipping_type'),\n\t\t\t\t\t\t \"peso\" => $Weight,\n\t\t\t\t\t\t \"valornf\" => $PackageValue,\n\t\t\t\t\t\t \"volume\" => $cart->getItemsCount(),\n\t\t\t\t\t\t \"modal\" => $this->getConfigData('modal_type'));\n\t// ================================================ //\n\n\t// Chama o web service //\n\t$calFrete = $this->getConfigData('access_type') == 1 ? $this->CalculaFrete() : simplexml_load_file($this->_url_base_web . implode(',', $this->params));\n\n\t// Inicializa o resultado da função //\n $this->_result = Mage::getModel('shipping/rate_result');\n\n\t// Cria o log da chamada deste método //\n\tif($this->getConfigData('debug')){\n\t\t//Mage::log($request->getData(), null, 'request.log');\n\t\t//Mage::log($quote->getData(), null, 'quote.log');\n\t\tMage::log(\"--------ENVIADO--------------------\", null, 'braspress.log');\n\t\tMage::log($this->params, null, 'braspress.log');\n\t\tMage::log(\"-----------------------------------\", null, 'braspress.log');\n\t\tMage::log(\"--------RESPOSTA-------------------\", null, 'braspress.log');\n\t\tMage::log($calFrete, null, 'braspress.log');\n\t\tMage::log(\"-----------------------------------\", null, 'braspress.log');\n\n\t\t//Mage::log($quote->getData(),null,'teste1.log'); // order data\n\t\t//Mage::log(Mage::helper('checkout')->getQuote()->getShippingAddress()->getData(),null,'teste2.log'); // shipping data\n\t\t//Mage::log(Mage::helper('tax'), null, 'tax.log');\t\n\t}\n\t// ================================== //\n \n if($calFrete->MSGERRO != \"OK\"){\n $this->_throwError('specificerrmsg', $calFrete->MSGERRO, __LINE__); \n }else{\n if($calFrete->TOTALFRETE > (float) 0 ){\n $method->setCarrier($this->_code);\n $method->setCarrierTitle($this->getConfigData('title'));\n \n // record method information\n $method->setMethod($this->_code);\n\n\t\t\tMage::log($calFrete->PRAZO, null, 'braspress_test.log');\n\t\t\t\n\t\t\tif($this->getConfigData('delivery_time')){\n\t\t\t\t$prazo = $calFrete->PRAZO;\n\t\t\t\tswitch($prazo){\n\t\t\t\t\tcase 0:\n\t\t\t\t\t\t$prazomsg = ' entrega imediata';\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\t$prazomsg = ' prazo de 1 dia';\n\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$prazomsg = ' prazo de '.$prazo.' dias';\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$method_name .= $this->getConfigData('method_name').$prazomsg;\n\t\t\t}else{\n\t\t\t\t$method_name .= $this->getConfigData('method_name');\n\t\t\t}\n\n $method->setMethodTitle($method_name);\n\n\t\t\t// Verifica se deve ser calculada uma porcentagem sobre o valor da compra para ser usada como valor do frete //\n\t\t\t$min_carrier_valid = $this->getConfigData('min_carrier_active') == 1 &&\n\t\t\t\t\t\t\t\t ($min_carrier_value = (float)preg_replace(array('|[^\\d\\.,]|', '|\\.|', '|,|'), array('', '', '.'), $this->getConfigData('min_carrier_value'))) && $min_carrier_value > 0.00 &&\n\t\t\t\t\t\t\t\t ($min_carrier_max_order_value = (float)preg_replace(array('|[^\\d\\.,]|', '|\\.|', '|,|'), array('', '', '.'), $this->getConfigData('min_carrier_max_order_value'))) && $min_carrier_max_order_value > 0.00 &&\n\t\t\t\t\t\t\t\t $PackageValue <= $min_carrier_max_order_value;\n\n\t\t\t$percentage_over_order_value = $this->getConfigData('percentage_over_order_value') == 1 &&\n\t\t\t\t\t\t\t\t\t\t ($percentage = (float)preg_replace(array('|[^\\d\\.,]|', '|\\.|', '|,|'), array('', '', '.'), $this->getConfigData('percentage'))) &&\n\t\t\t\t\t\t\t\t\t\t ($percentage > 0 && $percentage < 100);\n\n\t\t\tif ($min_carrier_valid) {\n\t\t\t\t$price = (float)number_format($min_carrier_value, 2, '.', '');\n\t\t\t} elseif ($percentage_over_order_value) {\n\t\t\t\t$price = (float)number_format($PackageValue * $percentage / 100, 2, '.', '');\n\t\t\t} else {\n\t\t\t\t// Formata o valor do frete para float, caso contrário, não grava os centavos //\n\t\t\t\t$price = (float)preg_replace(array('|[^\\d\\.,]|', '|\\.|', '|,|'), array('', '', '.'), $calFrete->TOTALFRETE);\n\t\t\t}\n\t\t\t// ========================================================================================================= //\n\n\t\t\t$method->setPrice($price);\n\n // add this rate to the result\n $this->_result->append($method);\n }\n }\n \n return $this->_result;\n //return Zend_Debug::Dump($calFrete->SUBTOTAL);\n\n }" ]
[ "0.7254943", "0.71856785", "0.71132606", "0.70602405", "0.70528895", "0.69732213", "0.6960232", "0.6927833", "0.68679714", "0.6858767", "0.6832947", "0.6776122", "0.6749442", "0.6743829", "0.6742588", "0.6720141", "0.6690459", "0.6628701", "0.6625727", "0.660815", "0.65743047", "0.65559614", "0.65281457", "0.65123105", "0.65032345", "0.64977145", "0.64853156", "0.64721704", "0.64673835", "0.64287007", "0.64199406", "0.6410895", "0.6368192", "0.636764", "0.6360718", "0.6357461", "0.6357013", "0.6356497", "0.63472164", "0.63295877", "0.63261956", "0.6322692", "0.6313143", "0.63125116", "0.62930095", "0.62884426", "0.6281299", "0.6265379", "0.62649924", "0.62649906", "0.6259593", "0.62572503", "0.62562835", "0.62512606", "0.62434494", "0.62283033", "0.62207586", "0.62153196", "0.6214399", "0.6202611", "0.6201107", "0.619436", "0.61828595", "0.61747557", "0.6157359", "0.615451", "0.6150059", "0.6149811", "0.6146214", "0.6125443", "0.6123662", "0.6117111", "0.6112689", "0.61119175", "0.6105456", "0.6095494", "0.60899997", "0.608164", "0.6075819", "0.6071708", "0.6069323", "0.6054695", "0.60543734", "0.6048564", "0.6023513", "0.60215163", "0.60134387", "0.5995417", "0.5984279", "0.5983782", "0.59679544", "0.5967212", "0.5963701", "0.5962215", "0.5959801", "0.5954846", "0.5954552", "0.5953658", "0.5952393", "0.5948585" ]
0.79971117
0
Replace the entire error output buffer with the given string.
Замените весь буфер вывода ошибки заданным строкой.
public function replaceErrorOutput(string $output) { $this->output = collect($this->output)->reject(function ($output) { return $output['type'] === 'err'; })->values()->all(); if (strlen($output) > 0) { $this->output[] = [ 'type' => 'err', 'buffer' => rtrim($output, "\n")."\n", ]; } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function error($string) {\n $this->output->writeln(\"<error>$string</error>\");\n }", "public function error($string)\n {\n $this->getOutput()->writeln(\"<error>$string</error>\");\n }", "public function addErr(string $output): void\n {\n $this->stdErr .= $output;\n }", "protected function error(string $string)\n {\n $this->output->writeln(\"<error>{$string}</error>\");\n }", "protected function resolveErrorOutput()\n {\n $output = collect($this->output)\n ->filter(fn ($output) => $output['type'] === 'err');\n\n return $output->isNotEmpty()\n ? rtrim($output->map->buffer->implode(''), \"\\n\").\"\\n\"\n : '';\n }", "public function error($string)\n {\n parent::error($this->_getOutputPrefix() . $string);\n $this->_log($string, true);\n }", "function handleError($string) {\n echo strip_tags(utf8_decode(\"ERROR:\\n\\n\" . $string));\n die();\n}", "function handleError($string) {\n echo strip_tags(utf8_decode(\"ERROR:\\n\\n\" . $string));\n die();\n}", "public function outputError(string $text)\n {\n $red = \"\\e[91m\";\n\n return $this->output($red . $text);\n }", "public function set_output($string)\n\t{\n\t\t$this->buffer = $string;\n\t}", "public function updateErrors()\n\t\t{\n\t\t\tif(isset($this->pipes[self::STDERR]) and is_resource($this->pipes[self::STDERR]))\n\t\t\t{\n\t\t\t\t$this->result->write(self::STDERR, stream_get_contents($this->pipes[self::STDERR]));\n\t\t\t}\n\t\t}", "public static function error($string) {\r\n\t\treturn;\r\n\t}", "public function setError() {\r\n $this->error = \"\";\r\n }", "public function setError($err_str){\n //entonces se inicializa la cadena de error\n if(!$this->error_flag) $this->error_str = \"\";\n $this->error_flag = true;\n $this->error_str .= \"ERROR(\".$this->error_count.\"):\".$err_str.\"\\n\";\n $this->error_count++; \n }", "public function setError($var)\n {\n GPBUtil::checkString($var, True);\n $this->error = $var;\n }", "public function clearError() {\n $this->error = \"\";\n }", "protected function writeError(string $message)\n {\n $this->output->write('<error>' . $message . '</error>');\n }", "public function error($string)\n {\n $this->line($string, 'error');\n }", "public function HTMLizeErrlog(){\n\t\t\treturn str_replace(\"\\n\", \"<br />\", $this->errlog);\n\t\t}", "function plex_error($str) {\n\t$str = @date('H:i:s').\" Error: $str\\n\";\n\tfwrite(STDERR, $str);\n}", "public function replaceOutput(string $output)\n {\n $this->output = collect($this->output)->reject(function ($output) {\n return $output['type'] === 'out';\n })->values()->all();\n\n if (strlen($output) > 0) {\n $this->output[] = [\n 'type' => 'out',\n 'buffer' => rtrim($output, \"\\n\").\"\\n\",\n ];\n }\n\n return $this;\n }", "private function outputError($output)\r\n\t{\r\n\t\t$this->display($output, 'error');\r\n\t}", "protected function error($text)\n {\n return $this->output->writeln('<error>' . $text . '</error>');\n }", "function fatalErrorWatchdog($buffer)\r\n\t{\r\n\t\t$html_errors = ini_get('html_errors');\r\n\t\t// if user has html_errors on, we need to have the non-html version\r\n\t\tif ($html_errors)\r\n\t\t{\r\n\t\t\t$sanitizedBuffer = strip_tags($buffer);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$sanitizedBuffer = trim($buffer);\r\n\t\t}\r\n\r\n\t\t// we know we got here from a thrown fatal error\r\n\t\t// NOTE: this searches anywhere in the string, so outputting the\r\n\t\t// string equal to FATAL_ERROR_PREFIX will trigger an error report\r\n\t\t// QUESTION: would there be a way to backout if no exception existed?\r\n\t\tif (($pos = strpos($sanitizedBuffer, FATAL_ERROR_PREFIX)) !== false)\r\n\t\t{\r\n\t\t\t$this->response->setError();\r\n\t\t\t$this->response->setStatus(c('HttpServletResponse::SC_INTERNAL_SERVER_ERROR'));\r\n\t\t\tif ($e = catch_exception())\r\n\t\t\t{\r\n\t\t\t\treturn $this->report($this->request, $this->response, $e);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn $this->report($this->request, $this->response, new RootException(substr($sanitizedBuffer, $pos)));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn trim($buffer);\r\n\t}", "function error($error) {\n global $version;\n \t$tmp = '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n \t<html>\n \t\t<head>\n \t\t\t<title>Error</title>\n \t\t\t<style>\n \t\t\t\t* {\n \t\t\t\t\tmargin:0;\n \t\t\t\t\tpadding:0;\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\tbody {\n \t\t\t\t\tbackground:#ffc8c8;\n \t\t\t\t\tfont:11px Arial;\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t#error { \n \t\t\t\t\twidth:200px;\n \t\t\t\t\tbackground:#f77979;\n \t\t\t\t\tborder:1px solid #9b0202;\n \t\t\t\t\tmargin:100px auto 0 auto;\n \t\t\t\t\tcolor:#ffffff;\n \t\t\t\t\tpadding:20px;\n \t\t\t\t}\n\n \t\t\t\t#menno { \n \t\t\t\t\twidth:200px;\n \t\t\t\t\tmargin:auto auto 0 auto;\n \t\t\t\t\tcolor:#ffffff;\n text-align: right;\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\th1 {\n \t\t\t\t\tmargin:0 0 10px 0;\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\tp {\n \t\t\t\t\tmargin:0 0 8px 0;\n \t\t\t\t}\n \t\t\t</style>\n \t\t\t<body>\n \t\t\t\t%error%</div>\n <div id=\"menno\">PHPMenno '.$version.'</div>\n \t\t\t</body>\n \t\t</head>\n \t</html>';\n \t\n \treturn str_replace('%error%', '<div id=\"error\"><h1>Oeps</h1>' . $error, $tmp);\n }", "public function setError($value)\r\n\t{\r\n\t\t$this->error = $value;\r\n\t}", "function set_and_return_error( $err_string ) {\r\n $return_array = array(\r\n \"error\" => true,\r\n \"error_msg\" => \"Server: \" . $err_string,\r\n );\r\n\r\n echo json_encode( $return_array );\r\n}", "public function setError($error)\n\t{\n\t\t$this->errors = (string) $error;\n\t}", "public function setError($error)\n\t{\n\t\t$this->errors = (string) $error;\n\t}", "public function setError($error)\n\t{\n\t\t$this->errors = (string) $error;\n\t}", "public function setError($error)\n\t{\n\t\t$this->errors = (string) $error;\n\t}", "public function setError($error)\n\t{\n\t\t$this->errors = (string) $error;\n\t}", "public function setError($error)\n\t{\n\t\t$this->errors = (string) $error;\n\t}", "public function error($string)\n {\n $this->logger->addError($string);\n $this->echoer->write(\"[ERROR] \" . $string);\n }", "function set_and_return_error( $err_string ) {\r\n $return_array = array(\r\n \"error\" => true,\r\n \"error_msg\" => \"Server: \" . $err_string,\r\n );\r\n\r\n echo json_encode( $return_array );\r\n die();\r\n}", "function error($string=\"\");", "function error($string){\n\n\t\tError::manage($string);\n\n\t}", "public static function setError(string $error)\n {\n self::$errors[] = $error;\n }", "public static function error(string $string):void{\n echo self::colorString($string, self::RED);\n die;\n }", "public function setMessage($string)\n {\n $this->_error_message = $string;\n }", "public static function error($string) {\n\t\tstatic::init();\n\n\t\t$string = static::getMessageFromParameter($string);\n\t\tforeach (static::$writers as $writer) {\n\t\t\t/* @var $writer \\Koldy\\Log\\Writer\\AbstractLogWriter */\n\t\t\t$writer->error($string);\n\t\t}\n\t}", "public function setError($var)\n {\n GPBUtil::checkString($var, True);\n $this->error = $var;\n\n return $this;\n }", "public function setError($var)\n {\n GPBUtil::checkString($var, True);\n $this->error = $var;\n\n return $this;\n }", "public function setErr(\\io\\streams\\OutputStream $err) {\n $this->err= new \\io\\streams\\StringWriter($err);\n return $err;\n }", "function error_string();", "public function seterror($error)\n\t{\n\t\tif ($this->error=='' && $error!='')$this->error='Verifique los siguentes errores: \\n\\n';\n\t\t$this->error .= $error.'\\n';\n\t}", "function error_append($string) {\n\t// simple function to append to error mesages;\n\tglobal $error_message;\t\n\t$error_message .= $string;\n\n\t// add to debugging too.\n\tdebug_append($string);\n\n\treturn true;\t\n}", "public function errorOutput(array|string $output)\n {\n if (is_array($output)) {\n collect($output)->each(fn ($line) => $this->errorOutput($line));\n\n return $this;\n }\n\n $this->output[] = ['type' => 'err', 'buffer' => rtrim($output, \"\\n\").\"\\n\"];\n\n return $this;\n }", "public function setLastError($errors = '');", "function flushErrors() {\n\t\tif (count($this->err) > 0) {\n\t\t\tif ($this->wantXML) {\n\t\t\t\t$this->out .= \"<errors>\";\n\t\t\t\twhile (list($num, $value) = each($this->err)) {\n\t\t\t\t\t$this->out .= \"<message>\" . $value . \"</message>\";\n\t\t\t\t}\n\t\t\t\t$this->out .= \"</errors>\";\n\t\t\t}\n\t\t}\n\t}", "public function setErrorMessage(string $error): void;", "private function error(OutputInterface $output, $message, $args = array())\n {\n /** @noinspection HtmlUnknownTag */\n $output->writeln('<error>' . sprintf($message, $args) . '</error>');\n exit(0);\n }", "function fail($str) {\n global $errors;\n array_push($errors, \"error: \" . $str);\n}", "public function append_output($string)\n\t{\n\t\t$this->buffer .= $string;\n\t}", "function error(string $error): void;", "protected function setError($error='') {\n self::$error = $error;\n }", "public function setErrorOutput($error) {\n\t\t$this->error = $error;\n\t\treturn $this;\n\t}", "public function error($error)\n\t{\n\t\t$this->error->write($error . PHP_EOL);\n\t}", "public function stderrLn($string)\n {\n $return = parent::stderr($string);\n echo PHP_EOL;\n return $return;\n }", "public function setMessage() {\n $this->err_message = $message;\n }", "protected function _replace_placeholders($error_text)\n {\n $error_text = parent::_replace_placeholders($error_text);\n\n return str_replace(':regexp', $this->_regexp, $error_text);\n }", "public function setError(string $message) {\n\t\t$this->error = $message;\n\t}", "protected function error($value = '')\n {\n return $this->output->writeln('<error>' . $value . '</error>');\n }", "public function error() {\r\n\t\treturn \"$(element).after(error);\";\r\n\t}", "public function clearErrors()\n {\n $this->errorOutput->clear();\n }", "public function error_str() {\n\t\treturn implode(\"\\r\\n\", $this->errors);\n\t}", "protected function sendErrorMessage($message, $why, $useHTML) {\n\t\t\n\t\t$hadOutput = $this->sendExistingOutput();\n\t\tif($hadOutput) echo \"\\n\\n\";\n\n\t\tif($this->config && $this->config->debug) {\n\t\t\t$message = $this->seasonErrorMessage($message);\n\t\t}\n\t\t\n\t\t// return text-only error\n\t\tif(!$useHTML) {\n\t\t\techo \"$message\\n\\n$why\\n\\n\";\n\t\t\treturn;\n\t\t}\n\n\t\t// output HTML error\n\t\t$html = $this->config->fatalErrorHTML ? $this->config->fatalErrorHTML : self::defaultFatalErrorHTML;\n\t\t$html = str_replace(array(\n\t\t\t'{message}',\n\t\t\t'{why}'\n\t\t), array(\n\t\t\tnl2br(htmlspecialchars($message, ENT_QUOTES, \"UTF-8\", false)),\n\t\t\thtmlspecialchars($why, ENT_QUOTES, \"UTF-8\", false)\n\t\t), $html);\n\t\t\n\t\t// make a prettier looking debug backtrace, when applicable\n\t\t$style = 'font-family:monospace;font-size:14px';\n\t\t$html = preg_replace('!(<br[^>]*>\\s*)(#\\d+\\s+[^<]+)!is', '$1<span style=\"' . $style . '\">$2</span>', $html);\n\t\t\n\t\t// reference original file rather than compiled version, when applicable\n\t\t$html = str_replace('assets/cache/FileCompiler/site/', '', $html);\n\t\n\t\t// remove unnecessary stack trace label\n\t\t$html = str_replace('Stack trace:<', '<', $html);\n\t\n\t\t// remove portions of path that are not needed in this output\n\t\t$rootPath = str_replace('/wire/core/', '/', dirname(__FILE__) . '/');\n\t\t$rootPath2 = $this->config ? $this->config->paths->root : '';\n\t\t$html = str_replace($rootPath, '/', $html); \n\t\tif($rootPath2 && $rootPath2 != $rootPath) $html = str_replace($rootPath2, '/', $html); \n\t\n\t\t// underline filenames\n\t\t$html = preg_replace('!(\\s)/([^\\s:(]+?)\\.(php|module|inc)!', '$1<u>$2.$3</u>', $html);\n\t\t\n\t\t// improving spacing between filename and line number (123)\n\t\t$html = str_replace('</u>(', '</u> (', $html);\n\t\t\n\t\t// ProcessWire namespace is assumed so does not need to add luggage to output\n\t\t$html = str_replace('ProcessWire\\\\', '', $html);\n\t\n\t\t// output the error message\n\t\techo \"$html\\n\\n\";\n\t}", "function SetLastError($line, $err = null)\n {\n if ($this->UsingStream) {\n $this->errorReason = \"?\";\n } else {\n if ($err === null) $err = socket_last_error($this->socket);\n $this->errorReason = socket_strerror($err);\n }\n $this->errorNumber = $err;\n $this->errorLine = $line;\n }", "public function errorString() {\n return $this->error_string;\n }", "public function error($string, $verbosity = null)\n {\n $this->output->writeln(\"<error>$string</error>\");\n\n return $string;\n }", "protected function error($message)\n {\n $this->output->writeln(\"<error>{$message}</error>\");\n }", "function error($str,$redir)\n{\n // dummy\n return \"<script>alert('ERROR: $str');</script>\";\n}", "public function renderError();", "public function sendError($output = -1) {\n if($this->isDebugging()) {\n echo 'Error: '. $output;\n }\n die;\n }", "function error($message)\n{\n file_put_contents('php://stderr', $message . PHP_EOL);\n}", "function print_user_error($string) {\n echo \"<h4><FONT color=\\\"red\\\">$string</FONT></h4>\";\n}", "public function setError($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->error !== $v) {\n $this->error = $v;\n $this->modifiedColumns[CarthedTableMap::COL_ERROR] = true;\n }\n\n return $this;\n }", "function customError($errno, $errstr)\n{\necho \"\n<b>\nError:\n</b>\n[$errno] $errstr\";\n}", "public function setError($value) {\n return $this->set(self::ERROR, $value);\n }", "private function removeErrorFile($string)\n {\n return preg_replace('/(at )?(\\S*)\\.php line \\d+\\s*/', '', $string);\n }", "public function setErrorOutput($stream): void\n {\n if ($this->process !== null) {\n throw new Exception\\LogicException('Cannot set the output stream when the command is executed');\n }\n\n if (is_string($stream)) {\n $this->ioFlags = $this->ioFlags | self::CLOSE_STDERR;\n $stream = fopen($stream, 'w+');\n }\n\n if (!is_resource($stream)) {\n throw new Exception\\InvalidArgumentException('Error output must be a stream resource or a valid file name');\n }\n\n $this->stderr = $stream;\n }", "protected function setError(string $error): void\r\n {\r\n if (!$this->errors->has($error)) $this->errors->add(\r\n \"{$this->currentInputKey}_error\",\r\n $error\r\n );\r\n }", "function FileCompileError(\n\t\t$strOutput\n\t) {\n\t\t$strPrefix = FILE_COMPILE_ERR_PREFIX;\n\t\t\n\t\t// Is strOutput an error message? If so the message is returned minus\n\t\t// the prefix string.\n\t\tif (substr($strOutput, 0, strlen($strPrefix)) == $strPrefix)\n\t\t\treturn substr($strOutput, strlen($strPrefix), (strlen($strOutput) - strlen($strPrefix)));\n\t\telse\n\t\t\t// Othrwise an empty string is returned to indicate no error.\n\t\t\treturn \"\";\n\t}", "function errorify($err)\n{\n\treturn '<span style=\"color:red;\">'. $err .'</span><br />';\n}", "public function error($text)\n {\n $this->display(\"\\e[31m\" . $text . \"\\e[31m\");\n }", "function change_error_msg($error){\n\t$error = 'Dont waste your time by entering wrong credentials !';\n\treturn $error;\n}", "protected function report($output = '', $suffix = \"\\n\") {\n file_put_contents('php://stderr', $output . $suffix);\n }", "function fail($s, $i) {\n global $sinput;\n printf(\"error: %s\\n\", $s);\n printf(\"at: %s\\n\", substr($sinput, $i, 200));\n exit(1);\n}", "public static function error($error)\n {\n self::command(array(\n 'selector' => '#web-message',\n 'fn' => 'append',\n 'args' => 'error',\n ));\n }", "public function outputHandler($buffer) {\n // log last error, if it's level is enabled\n $error = error_get_last();\n if ($error !== null && (in_array($error['type'], [E_ERROR, E_PARSE, E_COMPILE_ERROR]))) {\n $errorStr = $error['file'].\"::\".$error['line'].\": \".$error['type'].\": \".$error['message'];\n self::logger()->error($errorStr);\n // suppress error message in browser\n if (!$this->debug) {\n header('HTTP/1.1 500 Internal Server Error');\n $buffer = '';\n }\n else {\n $buffer = \"<pre>\\n\".$errorStr.\"\\n</pre>\";\n }\n }\n return trim($buffer);\n }", "function error($string=\"\", $query=null)\n\t{\n\t\tif($this->error_reporting)\n\t\t{\n\t\t\tif(class_exists(\"errorHandler\"))\n\t\t\t{\n\t\t\t\tglobal $error_handler;\n\n\t\t\t\tif(!is_object($error_handler))\n\t\t\t\t{\n\t\t\t\t\trequire_once MYBB_ROOT.\"inc/class_error.php\";\n\t\t\t\t\t$error_handler = new errorHandler();\n\t\t\t\t}\n\n\t\t\t\t$error = array(\n\t\t\t\t\t\"error_no\" => $this->error_number($query),\n\t\t\t\t\t\"error\" => $this->error_string($query),\n\t\t\t\t\t\"query\" => $string\n\t\t\t\t);\n\t\t\t\t$error_handler->error(MYBB_SQL, $error);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ttrigger_error(\"<strong>[SQL] [\".$this->error_number().\"] \".$this->error_string().\"</strong><br />{$string}\", E_USER_ERROR);\n\t\t\t}\n\t\t}\n\t}", "public function watchdogError(string $string) {\n \\Drupal::logger('steward_common')->error($string);\n }", "function setError($message) {\r\n global $error;\r\n $error = (object) array(\r\n 'message' => $message\r\n );\r\n }", "public function renderForConsole($output, Exception $e);", "static function error( $text, $appendDate = false )\n {\n\n if( $appendDate )\n $text .= date('Y-m-d');\n\n if( IS_CLI ) {\n fwrite( STDERR, 'ERROR: '.$text.NL );\n } else {\n echo '<p style=\"color:red;\" >ERROR: '.$text.'</p>'.NL;\n flush();\n }\n\n }", "function errors_on_two_fronts($error_msg_string) {\n trigger_error($error_msg_string);\n echo \"$error_msg_string \\n\";\n}", "public function errorBlock(string $message)\n {\n $this->output->error($message);\n }", "private function setError($errno, $errstr = \"\") {\n $this->error_number = $errno;\n $this->error_string = $errstr;\n }", "function error($errorMessage, $previousPage)\r\n {\r\n $html = $this->_html;\r\n return <<< EOT\r\n<div id=\"centerbar\">\r\n <h2>Bad email address</h2>\r\n <p>$errorMessage</p>\r\n <p>$previousPage</p>\r\n</div>\r\n\r\nEOT;\r\n }", "protected function add_error(string $error) : void\n {\n }" ]
[ "0.64449817", "0.6345561", "0.6334998", "0.62116003", "0.5958168", "0.5898102", "0.58421266", "0.58421266", "0.5800836", "0.57851774", "0.574481", "0.57163656", "0.5617986", "0.5610103", "0.5600734", "0.5583176", "0.5577233", "0.5520488", "0.5484097", "0.54734164", "0.5436853", "0.54177606", "0.53953284", "0.53689736", "0.53535575", "0.53339046", "0.5332499", "0.53246325", "0.53246325", "0.53246325", "0.53246325", "0.53246325", "0.53246325", "0.52969", "0.5286463", "0.5272115", "0.5270779", "0.5267176", "0.5261278", "0.5260927", "0.5259747", "0.523431", "0.523431", "0.52296007", "0.5222463", "0.5221774", "0.52146995", "0.5214695", "0.5211374", "0.52113634", "0.5188253", "0.5182607", "0.5182552", "0.5182207", "0.51705986", "0.51686186", "0.5148498", "0.5133665", "0.5133083", "0.5130268", "0.5129542", "0.5110353", "0.5102625", "0.51024526", "0.5091067", "0.5090451", "0.50878584", "0.5080683", "0.50735784", "0.5055072", "0.50545925", "0.5049382", "0.5047508", "0.50453275", "0.5041599", "0.5041149", "0.50388867", "0.5025007", "0.50233346", "0.502177", "0.50159544", "0.50109243", "0.5009965", "0.49989974", "0.49859786", "0.49823552", "0.4971557", "0.49674654", "0.4966577", "0.49635294", "0.49634638", "0.49602535", "0.49582133", "0.4954154", "0.49461713", "0.4940766", "0.4935198", "0.49294737", "0.4925416", "0.4920091" ]
0.7056343
0
Resolve the standard output as a string.
Разрешите стандартный вывод как строку.
protected function resolveOutput() { $output = collect($this->output) ->filter(fn ($output) => $output['type'] === 'out'); return $output->isNotEmpty() ? rtrim($output->map->buffer->implode(''), "\n")."\n" : ''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStandardOutput(): string\n {\n return $this->stdout;\n }", "public function output() : string\n {\n return $this->stdout->read();\n }", "public function output() {\n return (string)$this->output;\n }", "protected function resolveErrorOutput()\n {\n $output = collect($this->output)\n ->filter(fn ($output) => $output['type'] === 'err');\n\n return $output->isNotEmpty()\n ? rtrim($output->map->buffer->implode(''), \"\\n\").\"\\n\"\n : '';\n }", "public function outputString();", "public function getStandardError(): string\n {\n return $this->stderr;\n }", "public function getRaw(): string\n {\n return $this->stdOut;\n }", "public function getOutput() : string\n {\n return $this->output;\n }", "public function getOutput()\r\n {\r\n $size = @filesize($this->stdout);\r\n if (!$size) return FALSE;\r\n \r\n $output = @file_get_contents($this->stdout);\r\n\r\n if ($this->status == self::ABORTED)\r\n {\r\n $output .= 'WRN: [' . date('Y-m-d H:i:s') . '] ' . _TASK_HAS_BEEN_ABORTED . PHP_EOL;\r\n }\r\n \r\n return $output;\r\n }", "public function getStreamOutput() : string;", "public function output() {\n $this->flush();\n return ThinUtil::array2String($this->output);\n }", "public function output(): string {\n\t\treturn implode('', $this->output);\n\t}", "public function output()\n {\n return $this->getBaseConsole()->output();\n }", "public function getErrorOutput(): ?string\n {\n if (!is_resource($this->stderr)) {\n return null;\n }\n\n return stream_get_contents($this->stderr);\n }", "public function getOutput(): ?string\n {\n if (!is_resource($this->output)) {\n return null;\n }\n\n return file_get_contents($this->output);\n }", "public function output()\n {\n return $this->getArtisan()->output();\n }", "public function getStdOut()\n {\n return $this->_stdout;\n }", "public function readStdout() {\n\t\t$output = '';\n\t\twhile ( $line = fread( $this->pipes[1], 1024 ) ) {\n\t\t\t$output .= $line;\n\t\t}\n\n\t\treturn $output;\n\t}", "public function getOutput($string);", "public function read():string {\r\n\t\t$output = \"\" ;\r\n\t\t\r\n\t\tforeach($this->processList as $name=>$process){\r\n\t\t\t$out = $process->getOutput();\r\n\t\t\t\r\n\t\t\tif(!empty($out)){\r\n\t\t\t\t$output .= \"OUTPUT for [$name] : \" . PHP_EOL . $out . PHP_EOL .PHP_EOL;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $output ;\r\n\t}", "private function getOutput()\n {\n if (is_null($this->output)) {\n switch ($this->mode) {\n case 'console':\n $this->output = 'php://output';\n break;\n case 'file':\n $this->output = $this->getLogFile();\n break;\n }\n }\n return $this->output;\n }", "public function output()\n {\n return $this->lastOutput ? $this->lastOutput->fetch() : '';\n }", "public static function output()\n { //Method inherited from \\Illuminate\\Foundation\\Console\\Kernel\n /** @var \\App\\Console\\Kernel $instance */\n return $instance->output();\n }", "public function getOutput(): string|null;", "public function __toString()\n {\n if (Str::startsWith($this->output, 'Warning:')) {\n $this->output = substr($this->output, strpos($this->output, \"\\n\") + 1);\n }\n\n return trim($this->output);\n }", "function outputString($string){\n\t$stream = \\STDOUT;\n\tif(Console::streamSupportsAnsiColors($stream)){\n\t\t$args = func_get_args();\n\t\tarray_shift($args);\n\t\t$string = Console::ansiFormat($string, $args);\n\t}\n\treturn Console::stdout($string.PHP_EOL);\n}", "public function output() {\n\t\t$content = $this->_exec($this->_getCommand(), $this->_Pdf->html());\n\n\t\tif (strpos(mb_strtolower($content['stderr']), 'error')) {\n\t\t\tthrow new CakeException(\"System error <pre>\" . $content['stderr'] . \"</pre>\");\n\t\t}\n\n\t\tif (mb_strlen($content['stdout'], $this->_Pdf->encoding()) === 0) {\n\t\t\tthrow new CakeException(\"WKHTMLTOPDF didn't return any data\");\n\t\t}\n\n\t\tif ((int)$content['return'] !== 0 && !empty($content['stderr'])) {\n\t\t\tthrow new CakeException(\"Shell error, return code: \" . (int)$content['return']);\n\t\t}\n\n\t\treturn $content['stdout'];\n\t}", "public function output() {\n\t\treturn implode('', $this->output);\n\t}", "public function toString()\n {\n $result = [];\n foreach ($this->getOutput() as $o) {\n $result[] = $o[0];\n }\n\n return implode('', $result);\n }", "public function get_output() {\n\t\t\treturn $this->_parse_vars ? $this->parse($this->_out) : $this->_out;\n\t\t}", "final public function output()\n {\n return $this->prepareStringForExport();\n }", "public function getOutputFile()\r\n {\r\n return $this->stdout;\r\n }", "public function rawOutput()\n {\n return $this->rawOutput;\n }", "public static function getOutput()\n {\n if (!self::$output) {\n $output = new ConsoleOutput();\n $output->setFormatter(new OutputFormatter(true));\n self::$output = $output;\n }\n\n return self::$output;\n }", "public static function output($text = null) {\n return static::stdout($text . PHP_EOL);\n }", "public function getConsoleOutput(int $length = -1): string\n {\n $definition = -1 == $length ? $this->api->getAllConsoleOutput() : $this->api->getConsoleOutput();\n\n $response = $this->execute($definition, [\n 'os-getConsoleOutput' => new \\stdClass(),\n 'id' => $this->id,\n 'length' => $length,\n ]);\n\n return Utils::jsonDecode($response)['output'];\n }", "public function output()\n {\n $this->bootstrap();\n\n return $this->getArtisan()->output();\n }", "public function readStdOutLines();", "protected function getOutput(): OutputInterface\n {\n return new ConsoleOutput();\n }", "public function getOutput() {\r\n ob_start();\r\n $this->output();\r\n $output = ob_get_clean();\r\n return $output;\r\n }", "public function updateOutput()\n\t\t{\n\t\t\tif(isset($this->flags[self::WINDOWS]) and isset($this->fileHandles[self::STDOUT]) and is_resource($this->fileHandles[self::STDOUT]))\n\t\t\t{\n\t\t\t\tfseek($this->fileHandles[self::STDOUT], $this->readBytes[self::STDOUT]);\n\t\t\t\t$this->result->write(self::STDOUT, stream_get_contents($this->fileHandles[self::STDOUT]));\n\t\t\t}\n\t\t\telseif(isset($this->pipes[self::STDOUT]) and is_resource($this->pipes[self::STDOUT]))\n\t\t\t{\n\t\t\t\t$this->result->write(self::STDOUT, stream_get_contents($this->pipes[self::STDOUT]));\n\t\t\t}\n\t\t}", "protected function stdOut($str) {\n\t\techo $str;\n\t}", "public function getRawErr(): string\n {\n return $this->stdErr;\n }", "function out($string){\r\n\t\treturn $string;\r\n\t}", "public function getStdOut()\n\t{\n\t\treturn $this->getIOChannel(StdConsts::STDOUT);\n\t}", "public function getOutput() {\n\t\tob_start();\n\t\t$this->output();\n\t\treturn ob_get_clean();\n\t}", "public function inputs_as_string(){\n\t\t\tob_start();\n\t\t\t$this->print_empty_group();\n\t\t\treturn ob_get_clean();\n\t\t}", "function getOutput() {\n return $this->success($this->strOutput);\n }", "public function getActualOutput()\n {\n return $this->actualOutput;\n }", "public function getOutput(): ConsoleOutput\n {\n return $this->output;\n }", "abstract protected function getParsedOutput();", "public static function getOutput()\n {\n return self::$_output;\n }", "public function getOutput(){\n \tif(!$this->_output)\n \t\t$this->process();\n return $this->_output;\n }", "private static function convertToString($value){\r\n ob_start();\r\n var_dump($value);\r\n $string = ob_get_contents();\r\n ob_end_clean();\r\n return $string;\r\n }", "public function toString(): string\n {\n $buffer = '';\n\n $tokens = clone $this->tokens;\n\n while (!$tokens->isEmpty()) {\n /** @var Token $token */\n $token = $tokens->pop();\n $buffer = $this->output->transform($token->type, $token->text) . $buffer;\n }\n\n return $buffer;\n }", "private function sendOutput(&$output)\n {\n $this->truncateOutput($output);\n $output = preg_replace(\"/\\r\\n|\\r|\\n/\", '\\n', \n sprintf(\"<span>%s</span>\", implode(\"</span><span>\", \n explode(\"\\n\", addslashes(htmlentities($output))))));\n echo \"<script>TERM_receiver(\\\"{$output}\\\");</script>\\n\";\n flush();\n $end = strpos($output, END_DELIMETER);\n if (FALSE !== $end) {\n echo \"<script>TERM_receiver(\\\":q\\\");</script>\\n\";\n }\n return $output;\n }", "public function get_output()\n\t\t{\n\t\t\treturn $this->output;\n\t\t}", "public function getIncrementalOutput()\n {\n if (!$this->ran) {\n $this->ran = true;\n try {\n $this->process->start();\n } catch (Oxygen_Process_Exception_ExceptionInterface $e) {\n throw new Oxygen_Process_Exception_ProcessFailedException($this->process);\n }\n }\n\n if ($this->process->isRunning()) {\n $output = $this->process->getIncrementalOutput();\n $this->process->clearOutput();\n\n if (strlen($output) < Oxygen_Process_Pipes_PipesInterface::CHUNK_SIZE) {\n // Don't hog the processor while waiting for incremental process output.\n usleep(100000);\n }\n\n // The stream will be read again because we're returning a string.\n return (string) $output;\n } else {\n if (!$this->process->isSuccessful()) {\n throw new Oxygen_Process_Exception_ProcessFailedException($this->process);\n }\n\n $output = $this->process->getIncrementalOutput();\n $this->process->clearOutput();\n\n // The process has finished and is successful. This part will probably get run twice,\n // first time we'll return final output, second time we'll return 'false' and break the loop.\n return empty($output) ? false : $output;\n }\n }", "function printt\n(\n\t$output\n)\n{\n\tsystem('echo -e \"' . $output . '\"');\n}", "function get_output()\n\t{\n\t\treturn $this->final_output;\n\t}", "public function getOutput() {}", "public function resultAsText()\n {\n $buffer = (string) '';\n foreach ($this->exectuion_response as $stdout) {\n $buffer .= $stdout . \"\\n\";\n }\n return $buffer;\n }", "public function readError():string {\r\n\t\t$output = \"\" ;\r\n\t\t\r\n\t\tforeach($this->processList as $name=>$process){\r\n\t\t\t$out = $process->getErrorOutput();\r\n\t\t\t\r\n\t\t\tif(!empty($out)){\r\n\t\t\t\t$output .= \"ERROR for [$name] : \" . PHP_EOL . $out . PHP_EOL .PHP_EOL;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $output ;\r\n\t}", "public function getErrorOutput();", "public function output()\n {\n return $this->output;\n }", "public function output()\n {\n return $this->output;\n }", "public function getOutput()\n {\n return $this->output;\n }", "public function getOutput()\n {\n return $this->output;\n }", "public function getOutput()\n {\n return $this->output;\n }", "public function getOutput()\n {\n return $this->output;\n }", "public function getOutput()\n {\n return $this->output;\n }", "public function getOutput()\n {\n return $this->output;\n }", "public function getOutput()\n {\n return $this->output;\n }", "public function getOutput()\n {\n return $this->output;\n }", "public function getOutput()\n {\n return $this->output;\n }", "public function getOutput()\n {\n return $this->output;\n }", "public function fetchOutput()\n {\n return $this->output->fetch();\n }", "protected function output( $output ) {\n\t\treturn htmlentities( $output, NULL, NULL, FALSE );\n\t}", "function toAscii()\n {\n return $this->getOutput();\n }", "function getStdout()\n\t{\n\t\treturn $this->stdout;\n\t}", "public function outputAsString()\n {\n if (!($handle = fopen('php://temp', 'w+b'))) {\n throw new IllegalArgumentException(\"Temp file can not open from write.\");\n }\n $this->saveAsStream($handle, false);\n rewind($handle);\n $content = stream_get_contents($handle);\n fclose($handle);\n return $content;\n }", "public function __invoke()\n {\n return $this->output();\n }", "public function outputResults() : ?string\n {\n /* 0 initialize vars */\n $plugins = $this->_getDependencyContainer()->getPlugins();\n $event = $plugins->getFirstEvent();\n $result = $plugins->getLastResult();\n $eventConfiguration = $plugins->getEventConfiguration($event);\n if (! $eventConfiguration instanceof \\Yana\\Plugins\\Configs\\IsMethodConfiguration) {\n return null; // error - unable to continue\n }\n // @codeCoverageIgnoreStart\n $template = $eventConfiguration->getTemplate();\n\n switch (strtolower($template))\n {\n /**\n * 1) the reserved template 'NULL' is an alias for 'no template' and will prevent the use of HTML template files.\n *\n * This may mean the plugin has created some output itself using print(),\n * or it is a triggered cron-job that is not meant to produce any output at all,\n * or it has returned a value, that will be sent as a JSON encoded string.\n */\n case 'null':\n return $this->outputAsJson($result);\n /**\n * 2) the reserved template 'MESSAGE' is a special template that produces a text message.\n *\n * The text usually is an ID of some text.\n * The actual message is stored in the language files and the translated message will be read from there\n * depending on the user's prefered language setting.\n */\n case 'message':\n return $this->outputAsMessage();\n /**\n * 3) all other template settings go here\n */\n default:\n if ($result === false && $this->_getDependencyContainer()->getExceptionLogger()->getMessages()->count() === 0) {\n return $this->outputAsMessage();\n }\n return $this->outputAsTemplate($template, $eventConfiguration);\n }\n // @codeCoverageIgnoreEnd\n\n }", "function getStdout(): ResourceOutputStream\n{\n static $key = OutputStream::class . '\\\\stdout';\n\n $stream = Loop::getState($key);\n\n if (!$stream) {\n $stream = new ResourceOutputStream(\\STDOUT);\n Loop::setState($key, $stream);\n }\n\n return $stream;\n}", "public function processOutput() {}", "public function __toString()\n {\n return $this->output;\n }", "public function get_as_string()\n {\n $f = fopen('php://temp', 'w');\n $this->to_handle($f);\n rewind($f);\n return stream_get_contents($f);\n }", "public function getOutput()\n {\n return $this->_output;\n }", "public function getOutput()\n {\n return $this->_output;\n }", "public function getOutput();", "public function getOutput();", "public function getOutput();", "public function getOutput();", "public function getOutput();", "public function getOutput()\n\t{\n\t\treturn $this->output;\n\t}", "public function handle(): string\n {\n if ($this instanceof BashCommand) {\n $this->run();\n }\n return $this->bash->implode(\"\\n\");\n }", "public function outputAsMessage(): ?string\n {\n $route = $this->_getDependencyContainer()->getPlugins()->getNextEvent();\n $target = null;\n\n $logger = $this->_getDependencyContainer()->getExceptionLogger();\n if ($route instanceof \\Yana\\Plugins\\Configs\\EventRoute) {\n // create default message if there is none\n if ($logger->getMessages()->count() === 0) {\n\n $this->_logExecutionResult($route, $logger);\n }\n\n $target = $route->getTarget();\n }\n if (empty($target)) {\n // if no other destination is defined, route back to default homepage\n $target = $this->_getDependencyContainer()->getDefault(\"homepage\");\n assert(!empty($target), 'Configuration error: No default homepage set.');\n assert(is_string($target), 'Configuration error: Default homepage invalid.');\n }\n $this->_getDependencyContainer()->getRegistry()->setVar('STDOUT', $logger->getMessages());\n\n return $target;\n }", "public function displayOutput() {\n echo($this->getOutput());\n }", "public function output() {}", "public function output() {}" ]
[ "0.73219705", "0.7205157", "0.6660674", "0.66313076", "0.6490487", "0.63916075", "0.6322467", "0.6242903", "0.6233393", "0.617447", "0.61712116", "0.61532605", "0.6132894", "0.6102507", "0.61018527", "0.6077336", "0.5984304", "0.5963712", "0.5954009", "0.59485346", "0.59395695", "0.59054816", "0.5891108", "0.5878466", "0.5824442", "0.58128345", "0.5804038", "0.57787526", "0.5734546", "0.5729062", "0.57110447", "0.5704156", "0.56797576", "0.5671356", "0.56585115", "0.56155956", "0.55905056", "0.5588007", "0.5586846", "0.5555295", "0.55414903", "0.55203897", "0.5502919", "0.55001616", "0.5482788", "0.5481835", "0.54800147", "0.5462587", "0.5455506", "0.5450572", "0.5441616", "0.5440473", "0.54360354", "0.54094464", "0.53898215", "0.53877634", "0.5366406", "0.53579247", "0.5342945", "0.53415614", "0.5335723", "0.53257316", "0.53123736", "0.5304802", "0.52978384", "0.52978384", "0.52920467", "0.52920467", "0.52920467", "0.52920467", "0.52920467", "0.52920467", "0.52920467", "0.52920467", "0.52920467", "0.52920467", "0.5291", "0.5286264", "0.5282222", "0.5278361", "0.52748746", "0.52496827", "0.5248126", "0.52402914", "0.5226953", "0.52222645", "0.52188194", "0.520862", "0.520862", "0.51976806", "0.51976806", "0.51976806", "0.51976806", "0.51976806", "0.51787525", "0.51690745", "0.5166624", "0.515517", "0.5150837", "0.5150837" ]
0.73689485
0
Resolve the error output as a string.
Разрешите вывод ошибки в виде строки.
protected function resolveErrorOutput() { $output = collect($this->output) ->filter(fn ($output) => $output['type'] === 'err'); return $output->isNotEmpty() ? rtrim($output->map->buffer->implode(''), "\n")."\n" : ''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getErrorOutput();", "protected function resolveOutput()\n {\n $output = collect($this->output)\n ->filter(fn ($output) => $output['type'] === 'out');\n\n return $output->isNotEmpty()\n ? rtrim($output->map->buffer->implode(''), \"\\n\").\"\\n\"\n : '';\n }", "public function __toString(): string {\n return strval($this->get_readable_errors(true));\n }", "public function getRawErr(): string\n {\n return $this->stdErr;\n }", "public function error_str() {\n\t\treturn implode(\"\\r\\n\", $this->errors);\n\t}", "public function error()\n {\n return (string) $this;\n }", "public function getErrorString()\n\t{\n\t\t$string = \"\";\n\n\t\tforeach($this->error AS $error)\n\t\t{\n\t\t $string .= $error . \"\\n\";\n\t\t}\n\n\t\treturn $string;\n\t}", "public function getErrorOutput(): ?string\n {\n if (!is_resource($this->stderr)) {\n return null;\n }\n\n return stream_get_contents($this->stderr);\n }", "public function readError():string {\r\n\t\t$output = \"\" ;\r\n\t\t\r\n\t\tforeach($this->processList as $name=>$process){\r\n\t\t\t$out = $process->getErrorOutput();\r\n\t\t\t\r\n\t\t\tif(!empty($out)){\r\n\t\t\t\t$output .= \"ERROR for [$name] : \" . PHP_EOL . $out . PHP_EOL .PHP_EOL;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $output ;\r\n\t}", "public function errorString() {\n return $this->error_string;\n }", "public abstract function last_error_as_plain_text ();", "public function __toString()\n {\n return (string) $this->exportTo(ErrortypePeer::DEFAULT_STRING_FORMAT);\n }", "public function error() {\n\t\tif (!is_object($this->result)) return '';\n\t\treturn $this->result->errorInfo();\n\t}", "public function errstr() : string;", "public function errString()\n {\n return $this->sql_link->error;\n }", "function error_string();", "public function getErrorString()\n {\n return $this->error;\n }", "public function getErrorsAsString(): string;", "public function getErrorOutput() {\n\t\treturn $this->error;\n\t}", "public function getStandardError(): string\n {\n return $this->stderr;\n }", "public function getErrorString() {\n\t\treturn $this->errstr;\n\t}", "function _get_error_string()\n {\n \t# Driver specific\n }", "function error_string($query=null)\n\t{\n\t\tif($query != null)\n\t\t{\n\t\t\treturn pg_result_error($query);\n\t\t}\n\n\t\tif($this->current_link)\n\t\t{\n\t\t\treturn pg_last_error($this->current_link);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn pg_last_error();\n\t\t}\n\t}", "public function output() {\n return (string)$this->output;\n }", "public function __toString()\n {\n if (Str::startsWith($this->output, 'Warning:')) {\n $this->output = substr($this->output, strpos($this->output, \"\\n\") + 1);\n }\n\n return trim($this->output);\n }", "public function __toString()\n {\n $err = $this->getI5Error();\n return \"i5Error: num={$err['num']} cat={$err['cat']} msg=\\\"{$err['msg']}\\\" desc=\\\"{$err['desc']}\\\"\";\n }", "public function getError(): string|null;", "public function error()\n {\n if (!is_array($this->errors)) {\n $this->errors = array((string) $this->errors);\n }\n $message = '';\n foreach ($this->errors as $error) {\n $message .= $error.\"\\n\";\n }\n\n return $message;\n }", "public function __toString()\n {\n // __toString cannot throw exception\n // use trigger_error to bypass this limitation\n try {\n return $this->render();\n } catch (\\Exception $e) {\n ErrorHandler::convertExceptionToError($e);\n return '';\n } catch (\\Throwable $e) {\n ErrorHandler::convertExceptionToError($e);\n return '';\n }\n }", "public function getErrorText();", "public function getErrorMessage(): string\n {\n\n if (isset($this->responses[$this->current_handle]['error_message'])) {\n return $this->responses[$this->current_handle]['error_message'];\n }\n\n return '';\n\n }", "public function getErrorOutput()\n {\n return $this->errorOutput;\n }", "public function getMessage() {\n\t\t\t$full_error = \"\";\n\t\t\tforeach($this->errorInfo() as $error) {\n\t\t\t\t$full_error .= $error . \"\\n\";\t\n\t\t\t}\n\t\t\treturn $full_error;\n\t\t}", "public function getErrorOutput()\n {\n return $this->_errorOutput;\n }", "function strError () {\n switch ($this->errFlag) {\n case 1:\n return \"Read error detected\";\n case 2:\n return \"Write error detected\";\n case 3:\n return \"Read and write errors detected\";\n default:\n return \"No error detected\";\n }\n }", "public function error(): string;", "public function error(): string;", "public function __toString()\n\t{\n\t\tswitch ($this->format) {\n\t\tcase 'xml':\n\t\t\t$obj = SASUA_Canteens_Utility::XMLObj( $this->rootNode );\n\t\t\t$obj->addChild( 'error' );\n\t\t\t$obj->error->addAttribute( 'msg', $this->message );\n\t\t\t$obj->error->addAttribute( 'code', $this->code );\n\t\t\t$err = $obj->document();\n\t\t\tbreak;\n\t\tcase 'json':\n\t\tcase 'phps':\n\t\t\t$obj = new stdClass();\n\t\t\t$obj->error->msg = $this->message;\n\t\t\t$obj->error->code = $this->code;\n\t\t\t$err = $this->format === 'json' ? SASUA_Canteens_Utility::toJSON( $obj ) : SASUA_Canteens_Utility::toPHPS( $obj );\n\t\t\tbreak;\n\t\t}\n\t\treturn $err;\n\t}", "public /*String*/ function getError(){\n\t\treturn $this->error;\n\t}", "public function getOutput()\r\n {\r\n $size = @filesize($this->stdout);\r\n if (!$size) return FALSE;\r\n \r\n $output = @file_get_contents($this->stdout);\r\n\r\n if ($this->status == self::ABORTED)\r\n {\r\n $output .= 'WRN: [' . date('Y-m-d H:i:s') . '] ' . _TASK_HAS_BEEN_ABORTED . PHP_EOL;\r\n }\r\n \r\n return $output;\r\n }", "private static function errorSummary(): string\n {\n $errors = libxml_get_errors();\n $concise = [];\n $summary = '';\n\n foreach ($errors as $error) {\n $concise[$error->message][] = $error->line;\n }\n\n foreach ($concise as $error => $lines) {\n $summary .= trim($error) . PHP_EOL . \"\\tLines: \" . implode(', ', $lines) . PHP_EOL . PHP_EOL;\n }\n\n return trim($summary);\n }", "public function errorText()\n\t{\n\t\treturn $this->_errtext;\n\t}", "function error2string($value){\n\t\t$level_names = array(\n\t\t\tE_ERROR => 'E_ERROR',\n\t\t\tE_WARNING => 'E_WARNING',\n\t\t\tE_PARSE => 'E_PARSE',\n\t\t\tE_NOTICE => 'E_NOTICE',\n\t\t\tE_CORE_ERROR => 'E_CORE_ERROR',\n\t\t\tE_CORE_WARNING => 'E_CORE_WARNING',\n\t\t\tE_COMPILE_ERROR => 'E_COMPILE_ERROR',\n\t\t\tE_COMPILE_WARNING => 'E_COMPILE_WARNING',\n\t\t\tE_USER_ERROR => 'E_USER_ERROR',\n\t\t\tE_USER_WARNING => 'E_USER_WARNING',\n\t\t\tE_USER_NOTICE => 'E_USER_NOTICE'\n\t\t);\n\t\tif(defined('E_STRICT')){\n\t\t\t$level_names[E_STRICT] = 'E_STRICT';\n\t\t}\n\t\t$levels = array();\n\t\tif(($value & E_ALL) == E_ALL){\n\t\t\t$levels[] = 'E_ALL';\n\t\t\t$value &= ~E_ALL;\n\t\t}\n\t\tforeach($level_names as $level => $name){\n\t\t\tif(($value & $level) == $level){\n\t\t\t\t$levels[] = $name;\n\t\t\t}\n\t\t}\n\t\treturn implode(' | ', $levels);\n\t}", "public function __toString() {\n\t\t// PHP doesn't like exceptions in __toString.\n\t\t// catch any exceptions and convert them to strings.\n\t\ttry {\n\t\t\t$result = $this->render();\n\t\t\treturn $result;\n\t\t} catch (Exception $e) {\n\t\t\treturn \"Error rendering mustache: \" . $e->getMessage();\n\t\t}\n\t}", "public function getError(){\n return $this->output['error'];\n }", "public function errors()\n\t{\n\t\t$_output = '';\n\t\tforeach ($this->errors as $error)\n\t\t{\n\t\t\t$errorLang = $this->lang->line($error) ? $this->lang->line($error) : $error;\n\t\t\t$_output .= $this->error_start_delimiter . $errorLang . $this->error_end_delimiter;\n\t\t}\n\t\t\n\t\t$this->clear_errors();\n\t\t\n\t\treturn $_output;\n\t}", "public function getProblem(): string\n {\n return sprintf('Invalid argument %s. %s', $this->option, $this->error);\n }", "public function getError(): string\n\t{\n\t\treturn $this->error;\n\t}", "function error2string($value){\n\t$level_names = array(\n\t\tE_ERROR => 'E_ERROR',\n\t\tE_WARNING => 'E_WARNING',\n\t\tE_PARSE => 'E_PARSE',\n\t\tE_NOTICE => 'E_NOTICE',\n\t\tE_CORE_ERROR => 'E_CORE_ERROR',\n\t\tE_CORE_WARNING => 'E_CORE_WARNING',\n\t\tE_COMPILE_ERROR => 'E_COMPILE_ERROR',\n\t\tE_COMPILE_WARNING => 'E_COMPILE_WARNING',\n\t\tE_USER_ERROR => 'E_USER_ERROR',\n\t\tE_USER_WARNING => 'E_USER_WARNING',\n\t\tE_USER_NOTICE => 'E_USER_NOTICE'\n\t);\n\tif(defined('E_STRICT')){\n\t\t$level_names[E_STRICT] = 'E_STRICT';\n\t}\n\t$levels = array();\n\tif(($value&E_ALL) == E_ALL){\n\t\t$levels[] = 'E_ALL';\n\t\t$value &= ~E_ALL;\n\t}\n\tforeach($level_names as $level => $name){\n\t\tif(($value&$level) == $level){\n\t\t\t$levels[] = $name;\n\t\t}\n\t}\n\treturn implode(' | ', $levels);\n}", "function error_message() {\n\t\t\tif($this->type == \"pounds\" && $this->convert_to == \"pounds\") {\n\t\t\t\treturn \"You can't convert \" . $this->type . \" to \" . $this->convert_to . \"!\";\n\t\t\t}\n\t\t\telse if($this->type == \"kilograms\" && $this->convert_to == \"kilograms\") {\n\t\t\t\treturn \"You can't convert \" . $this->type . \" to \" . $this->convert_to . \"!\";\n\t\t\t}\n\t\t\telse if($this->type == \"stones\" && $this->convert_to == \"stones\") {\n\t\t\t\treturn \"You can't convert \" . $this->type . \" to \" . $this->convert_to . \"!\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t}", "public function getString()\n {\n $html = '';\n if ($this->error->has()) {\n $html .= '<ul class=\"ccm-error\">';\n foreach ($this->error->getList() as $error) {\n $html .= '<li>';\n if ($error instanceof HtmlAwareErrorInterface && $error->messageContainsHtml()) {\n $html .= (string) $error;\n } else {\n $html .= nl2br(h((string) $error));\n }\n $html .= '</li>';\n }\n $html .= '</ul>';\n }\n\n return $html;\n }", "public function outputString();", "public function get_last_error(): string {\r\n\t\treturn $this->error;\r\n\t}", "public function __toString(): string\n {\n $message = $this->message ?? 'An error occurred.';\n\n foreach ($this->getContext() as $name => $value) {\n $message = str_replace(sprintf('%%%s%%', $name), (string)$value, $message);\n }\n\n return $message;\n }", "public function getOutput(): string|null;", "public function __toString() {\n\t\treturn $this->_Error->message;\n\t}", "public static function errorToString($error) {\n Assert::int($error);\n\n if (\\key_exists($error, self::$win32Errors))\n return self::$win32Errors[$error][0];\n return (string) $error;\n }", "public function get_error_string(){\n\n return implode(' ', $this->errors_array);\n\n }", "public function __toString() {\n\t\t$type = $this->getType () . ': ';\n\t\tif ($this->code != 0) {\n\t\t\t$type .= $this->code . ': ';\n\t\t}\n\t\treturn $type . $this->error;\n\t}", "public function outputAsMessage(): ?string\n {\n $route = $this->_getDependencyContainer()->getPlugins()->getNextEvent();\n $target = null;\n\n $logger = $this->_getDependencyContainer()->getExceptionLogger();\n if ($route instanceof \\Yana\\Plugins\\Configs\\EventRoute) {\n // create default message if there is none\n if ($logger->getMessages()->count() === 0) {\n\n $this->_logExecutionResult($route, $logger);\n }\n\n $target = $route->getTarget();\n }\n if (empty($target)) {\n // if no other destination is defined, route back to default homepage\n $target = $this->_getDependencyContainer()->getDefault(\"homepage\");\n assert(!empty($target), 'Configuration error: No default homepage set.');\n assert(is_string($target), 'Configuration error: Default homepage invalid.');\n }\n $this->_getDependencyContainer()->getRegistry()->setVar('STDOUT', $logger->getMessages());\n\n return $target;\n }", "static function get() { # string or array with errors\n $e = self::$err;\n self::$err = [];\n return sizeof($e) == 1 ? $e[0] : $e;\n }", "public function getLastError() {\n if ($this->_data['url'] == 'http://exec.fail.com/') return 'exec fail';\n if ($this->_data['url'] == 'http://getinfo.fail.com/') return 'getinfo fail';\n if ($this->_data['url'] == 'http://setopt.fail.com/') return 'setopt fail';\n if ($this->_data['url'] == 'http://setoptarray.fail.com/') return 'setoptarray fail';\n\n return '';\n }", "public function resultAsText()\n {\n $buffer = (string) '';\n foreach ($this->exectuion_response as $stdout) {\n $buffer .= $stdout . \"\\n\";\n }\n return $buffer;\n }", "public function getError($link): string\n {\n $GLOBALS['errno'] = 0;\n\n if ($link !== null && $link !== false) {\n $error_number = $link->errno;\n $error_message = $link->error;\n } else {\n $error_number = mysqli_connect_errno();\n $error_message = (string) mysqli_connect_error();\n }\n\n if ($error_number === 0 || $error_message === '') {\n return '';\n }\n\n // keep the error number for further check after\n // the call to getError()\n $GLOBALS['errno'] = $error_number;\n\n return Utilities::formatError($error_number, $error_message);\n }", "public function output() {\n\t\t$content = $this->_exec($this->_getCommand(), $this->_Pdf->html());\n\n\t\tif (strpos(mb_strtolower($content['stderr']), 'error')) {\n\t\t\tthrow new CakeException(\"System error <pre>\" . $content['stderr'] . \"</pre>\");\n\t\t}\n\n\t\tif (mb_strlen($content['stdout'], $this->_Pdf->encoding()) === 0) {\n\t\t\tthrow new CakeException(\"WKHTMLTOPDF didn't return any data\");\n\t\t}\n\n\t\tif ((int)$content['return'] !== 0 && !empty($content['stderr'])) {\n\t\t\tthrow new CakeException(\"Shell error, return code: \" . (int)$content['return']);\n\t\t}\n\n\t\treturn $content['stdout'];\n\t}", "public function displayError() {\r\n\t\treturn $this->error;\r\n\t}", "function mb_http_output(string $encoding = null)\n{\n error_clear_last();\n if ($encoding !== null) {\n $safeResult = \\mb_http_output($encoding);\n } else {\n $safeResult = \\mb_http_output();\n }\n if ($safeResult === false) {\n throw MbstringException::createFromPhpError();\n }\n return $safeResult;\n}", "public function __toString()\n {\n try {\n return $this->display(true, true);\n } catch (\\Exception $e){\n return $e->getMessage();\n }\n }", "public function get_errstr() { return $this->errstr; }", "public function get_errors() { return $this->errortext; }", "public function getErrors()\n {\n $output = \"\";\n\n foreach($this->errors as $error)\n {\n $output .= $error;\n }\n\n return $output;\n }", "public function getErrorText()\n {\n return $this->errText;\n }", "public function getErrorMessage()\n\t{\n\t\t$importId = $this->getImportId();\n\t \t$events = CSImport::get_events($importId);\n\n\t \tforeach ($events as $event) {\n\n\t\t \t// look for an error event \n\t\t \tif ($event['status'] == 'ERROR') { \n\t\t\t\treturn $event['description'];\n\t \t}\n \t\t}\n \t\t\n \t\treturn '';\n\t}", "public function asString($result) {\n return (string)$result;\n }", "public function getErrorMsg() : string{\n return $this->errorMsg;\n }", "public function getErrorMessage(): ?string\n {\n return $this->links[0]->getError();\n }", "public function outputResults() : ?string\n {\n /* 0 initialize vars */\n $plugins = $this->_getDependencyContainer()->getPlugins();\n $event = $plugins->getFirstEvent();\n $result = $plugins->getLastResult();\n $eventConfiguration = $plugins->getEventConfiguration($event);\n if (! $eventConfiguration instanceof \\Yana\\Plugins\\Configs\\IsMethodConfiguration) {\n return null; // error - unable to continue\n }\n // @codeCoverageIgnoreStart\n $template = $eventConfiguration->getTemplate();\n\n switch (strtolower($template))\n {\n /**\n * 1) the reserved template 'NULL' is an alias for 'no template' and will prevent the use of HTML template files.\n *\n * This may mean the plugin has created some output itself using print(),\n * or it is a triggered cron-job that is not meant to produce any output at all,\n * or it has returned a value, that will be sent as a JSON encoded string.\n */\n case 'null':\n return $this->outputAsJson($result);\n /**\n * 2) the reserved template 'MESSAGE' is a special template that produces a text message.\n *\n * The text usually is an ID of some text.\n * The actual message is stored in the language files and the translated message will be read from there\n * depending on the user's prefered language setting.\n */\n case 'message':\n return $this->outputAsMessage();\n /**\n * 3) all other template settings go here\n */\n default:\n if ($result === false && $this->_getDependencyContainer()->getExceptionLogger()->getMessages()->count() === 0) {\n return $this->outputAsMessage();\n }\n return $this->outputAsTemplate($template, $eventConfiguration);\n }\n // @codeCoverageIgnoreEnd\n\n }", "public abstract function getReportResultString():string;", "public function __toString() {\n return __CLASS__ . \" Error {$this->code}: {$this->message} when sending {$this->request['method']} to {$this->request['url']}\\n\";\n }", "function GetResponseText() {\n return $this->posnetResponse->errormessage;\n }", "public function getLastError(): string\n {\n return $this->lastError;\n }", "public function getLastError(): string\n {\n return $this->lastError;\n }", "function _error_message() {\n $infos = $this->conn_id->errorInfo();\n return $infos[2];\n }", "public function outputErrors()\n {\n $errors = '';\n foreach ($this->getErrors() as $key => $error) {\n $i = $key + 1;\n $errors .= $i . '. ' . $error->getMessage() . \"\\n\";\n $errors .= ' ' . $error->getMethod() . \"\\n\";\n $errors .= ' ' . $error->getFile() . \"\\n\";\n $errors .= ' Line ' . $error->getLine() . \"\\n\";\n }\n return $this->output($errors);\n }", "public function get_error(){\n\t\t$message = $this->error;\n\t\t$this->error = null;\n\t\treturn $message;\n\t}", "public function __toString()\n {\n try {\n return $this->render();\n } catch (\\Exception $e) {\n /**\n * Display the exception message.\n *\n * We use this method here because it's impossible to throw an\n * exception from __toString().\n */\n $error_response = Exception::handle($e);\n\n return $error_response->body();\n }\n }", "public static function getOpenSSLErrorsAsString(): string\n {\n $errors = [];\n while ($msg = openssl_error_string()) {\n $errors[] = $msg;\n }\n\n if (empty($errors)) {\n return '';\n } else {\n return implode(' // ', $errors);\n }\n }", "public function __toString()\n\t\t{\n\t\t\treturn $this->getMessage().\"\\nError code: \".$this->getErrorCode();\n\t\t}", "public function resolve(): string;", "public function getError() {}", "function handleError($string) {\n echo strip_tags(utf8_decode(\"ERROR:\\n\\n\" . $string));\n die();\n}", "function handleError($string) {\n echo strip_tags(utf8_decode(\"ERROR:\\n\\n\" . $string));\n die();\n}", "private function outputError($output)\r\n\t{\r\n\t\t$this->display($output, 'error');\r\n\t}", "public function toText()\n {\n $causes = array();\n $this->getCauseMessage($causes);\n $causeMsg = '';\n foreach ($causes as $i=>$cause) {\n $causeMsg .= str_repeat(' ', $i) . $cause['class'] . ': ' . $cause['message'] . ' in ' . $cause['file'] . ' on line ' . $cause['line'] . \"\\n\";\n }\n return $causeMsg . $this->getTraceAsString();\n }", "public function toText()\n {\n $causes = array();\n $this->getCauseMessage($causes);\n $causeMsg = '';\n foreach ($causes as $i => $cause) {\n $causeMsg .= str_repeat(' ', $i) . $cause['class'] . ': '\n . $cause['message'] . ' in ' . $cause['file']\n . ' on line ' . $cause['line'] . \"\\n\";\n }\n return $causeMsg . $this->getTraceAsString();\n }", "public function __toString() {\n\t\t$result = parent::__toString();\n\t\tif($this->errstr !== null) $result .= \"\\nerror string: \" . $this->errstr;\n\t\tif($this->sql_error_code !== null) $result .= ' [' . $this->sql_error_code . ']';\n\t\tif($this->state !== null) $result .= \"\\nSQL state: \" . $this->state;\n\t\tif($this->sql !== null) $result .= \"\\nSQL code: \" . $this->sql;\n\t\treturn $result;\n\t}", "function __toString(){\n\t\treturn \"Si e' verificato un errore SQL nell'istruzione seguente: \".$this->sql.\". Messaggio d'errore: \".$this->message;\n\t}", "function get_error_text(){\n \t\treturn $this->error_text;\n \t}", "public function getError() {\n\t\tif (!$this->result) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// Convert the message rows to an array\n\t\t$parts = explode(\"\\n\", $this->result);\n\n\t\t// Remove the last value which is white space\n\t\tarray_pop($parts);\n\n\t\t// Possible error message should be the second last value\n\t\t$error_message = array_pop($parts);\n\n\t\treturn $error_message;\n\t}", "function FileCompileError(\n\t\t$strOutput\n\t) {\n\t\t$strPrefix = FILE_COMPILE_ERR_PREFIX;\n\t\t\n\t\t// Is strOutput an error message? If so the message is returned minus\n\t\t// the prefix string.\n\t\tif (substr($strOutput, 0, strlen($strPrefix)) == $strPrefix)\n\t\t\treturn substr($strOutput, strlen($strPrefix), (strlen($strOutput) - strlen($strPrefix)));\n\t\telse\n\t\t\t// Othrwise an empty string is returned to indicate no error.\n\t\t\treturn \"\";\n\t}" ]
[ "0.6863654", "0.6738424", "0.661801", "0.66070867", "0.656694", "0.65577394", "0.65475756", "0.6533133", "0.6455235", "0.64260817", "0.64240724", "0.6194351", "0.6169133", "0.6156744", "0.61536497", "0.614944", "0.6134003", "0.6131387", "0.61013305", "0.6092556", "0.60616505", "0.5990355", "0.5966892", "0.5945727", "0.5944707", "0.5937159", "0.5930387", "0.5910334", "0.58835405", "0.5867107", "0.5804207", "0.5803844", "0.57828057", "0.5770897", "0.5770485", "0.57640386", "0.57640386", "0.57615787", "0.5755841", "0.57523805", "0.5743962", "0.57437205", "0.5741646", "0.57399285", "0.5731373", "0.5688605", "0.56852806", "0.56835324", "0.5675276", "0.567168", "0.56667715", "0.5651619", "0.56314933", "0.56307817", "0.563046", "0.5615029", "0.5596044", "0.55950344", "0.5592259", "0.55898494", "0.558283", "0.55745685", "0.55508393", "0.5548816", "0.5548567", "0.5541621", "0.55238163", "0.5521059", "0.55071783", "0.5466458", "0.5463565", "0.54628634", "0.5462408", "0.5455773", "0.54464763", "0.54441375", "0.5441744", "0.5440307", "0.54376835", "0.54374236", "0.5435382", "0.5435382", "0.5420127", "0.54140276", "0.5404508", "0.5401342", "0.53981376", "0.53951913", "0.5393636", "0.53904444", "0.538929", "0.538929", "0.5389044", "0.53822374", "0.5379826", "0.53751206", "0.53720295", "0.5365158", "0.53629094", "0.53615606" ]
0.799691
0
fills the collection if it hasn't already been fille
заполняет коллекцию, если она еще не была заполнена
protected function _fillCollection() { if ($this->_filled) { return; } $ids = $this->_ids; if ($this->_pager instanceof Pager) { $ids = array_slice($ids, $this->_pager->getOffset(), $this->_pager->getPageSize()); } $object_name = $this->_object_name; $objects = $object_name::get($ids); $this->exchangeArray($objects); $this->_filled = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function initFilteredCollection()\n {\n if ($this->length === 0) {\n $this->findNext();\n }\n }", "private function _populateCollection()\n {\n //merge the properties into the collection\n $this->collection = $this->_getBaseArray();\n $this->collection['media-col'] = array_merge(\n $this->collection['media-col'],\n $this->rawProperties['media-col']\n );\n }", "public function process(Collection $data, array $fill = []);", "protected function _prepareCollection()\n {\n $collection = $this->getDataColllection();\n $this->setCollection($collection);\n return parent::_prepareCollection();\n }", "public function populate();", "protected function _prepareCollection()\n {\n $giftCard = $this->coreRegistry->registry('giftcard_giftcard');\n if ($giftCard->getId()) {\n $collection = $this->collectionFactory->create();\n $collection->addFieldToFilter(HistoryInterface::GIFT_CARD_ID, $giftCard->getId());\n $this->setCollection($collection);\n }\n\n return parent::_prepareCollection();\n }", "protected function _mergeWithEmptyData()\n {\n if (count($this->_items) == 0) {\n return $this;\n }\n\n foreach ($this->_items as $key => $item) {\n foreach ($this->_resourceCollection as $dataItem) {\n if ($item->getData($this->_columnGroupBy) == $dataItem->getData($this->_columnGroupBy)) {\n if ($this->_items[$key]->getIsEmpty()) {\n $this->_items[$key] = $dataItem;\n } else {\n $this->_items[$key]->addChild($dataItem);\n }\n }\n }\n }\n\n return $this;\n }", "public function resetCollection()\n {\n $this->primes = [];\n }", "protected function setCollection()\n {\n //TODO: Get the mapped table name.\n\n $dbTable = DbModelDefinition::getTableName($this->baseClass, $this->collectionClass);\n $sql = \"\n Select \" . (string)$this->collectionClass . \"Id\n From \" . (string)$dbTable . \"\n Where \" . (string)$this->baseClass . \"Id = \" . (int)$this->baseClassId;\n $results = $this->db->query($sql);\n $data = $results->get(1);\n if($data->hasRows())\n {\n foreach($data->getAll() as $result)\n {\n $itemId = $result[$this->collectionClass . 'Id'];\n //$obj = new $this->collectionClass($itemId);\n $obj = ModelFactory::get($this->collectionClass, $itemId);\n $this->items[$itemId] = $obj;\n }\n $t=0;\n }\n }", "public function initFbos()\n\t{\n\t\t$this->collFbos = array();\n\t}", "private function __makeAutocomplete($collection) {\n \tif (empty($collection) || $collection->isEmpty()) {\n \t\treturn;\n \t}\n \tforeach ($collection as $model) {\n \t\t$this->push($model);\n \t}\n }", "public function prepareCollection()\n {\n $this->addBetweenFilter($this->_from, $this->_to);\n\n $this->addSubscriptionData(array('start_date'));\n $this->addSubscriptionQuoteData(array('store_id', 'base_subtotal', 'base_grand_total', 'base_currency_code'));\n $this->addRenewalOrderData(array('order_status' => 'status', 'order_base_grand_total' => 'base_grand_total'));\n\n $this->addFilterToMap('store_id', 'q.store_id');\n $this->addFieldToFilter('store_id', array('in' => $this->_storeIds));\n }", "protected function _prepareCollection()\n {\n $collection = Mage::getResourceModel($this->_getCollectionClass());\n $collection->setFirstStoreFlag(true);\n //$collection = Mage::getModel('datta_storelocator/store')->getCollection();\n $this->setCollection($collection);\n return parent::_prepareCollection();\n }", "public function reloadCollection(): void\n {\n // TODO: Implement reloadCollection() method.\n }", "public function clear(): Collection\n {\n $this->data = [];\n return $this;\n }", "protected function _prepareCollection() {\n $data = Mage::getModel('membership/membership')->load($this->getEntityId());\n return $data;\n }", "protected function _prepareCollection()\n {\n $collection = $this->_createCollection()\n ->addFieldToFilter(\n 'customer_id',\n $this->_getCustomer()->getId()\n );\n $this->setCollection($collection);\n\n return parent::_prepareCollection();\n }", "protected function _prepareCollection()\n {\n /** @var Collection $collection */\n $collection = $this->reportCollectionFactory->create();\n $this->setCollection($collection);\n\n return parent::_prepareCollection();\n }", "protected function _prepareCollection() {\n $verifyHostCollection = Mage::getModel ( 'airhotels/verifyhost' )->getCollection ()->addFieldToFilter ( 'file_path', array (\n neq => '' \n ) );\n $this->setCollection ( $verifyHostCollection );\n return parent::_prepareCollection ();\n }", "public function populate() {\n $api = new BluecatsApi();\n $sites = json_decode($api->getAllSites(), true);\n foreach($sites['sites'] as $site) {\n if(!Site::where('site_id', $site['id'])->exists()) {\n //insert\n Site::create(array('site_id' => $site['id']));\n }\n };\n }", "function rewind () { reset ( $this->collection ); }", "public function __construct(){\r\n\t\t$this->collection = array();\r\n\t\t$this->indice = 0;\r\n\t}", "public function init()\n {\n $this->patients = new ArrayCollection();\n }", "protected function doInitialize()\n {\n $collection = $this->collection;\n $ids = $collection->getKeys();\n $products = $this->repository->findByIds($ids);\n $this->collection = new ArrayCollection();\n foreach ($products as $product) {\n $lineItem = LineItemView::create($product, $collection->get($product->getId()));\n $this->collection->set($product->getId(), $lineItem);\n }\n }", "protected function _prepareCollection()\n { \n $collection = WoltersKluwer_CchSureTax_Model_Resource_Creditmemo_Collection::joinWithCreditmemo();\n $this->setCollection($collection);\n return parent::_prepareCollection();\n }", "public function clearFinancieres()\n {\n $this->collFinancieres = null; // important to set this to NULL since that means it is uninitialized\n }", "public function clearFbos()\n\t{\n\t\t$this->collFbos = null; // important to set this to NULL since that means it is uninitialized\n\t}", "public function test_good_collection()\n {\n $collection = (new GoodCollection(Good::all()))->toArray([]);\n $this->assertTrue(true);\n $this->assertArrayHasKey('name', $collection[0]);\n }", "public function populate()\r\n {\r\n }", "private function createCollection(): void\n\t{\n\t\t$customer = new Customer();\n\n\t\t$application = new Application();\n\t\t$application->setCustomer($customer);\n\n\t\t$applicationVersion = new Application\\Version();\n\t\t$applicationVersion->setApplication($application);\n\n\t\t$this->collection = new Collection();\n\t\t$this->collection->setApplicationVersion($applicationVersion);\n\t\t$this->collection->setIdentifier('locations');\n\t}", "public function __construct() {\n $this->aus = new ArrayCollection();\n $this->deposits = new ArrayCollection();\n }", "private function updateGarbageCollection() {\n // If we're ready to start the next collection cycle, load all the\n // collectors.\n $next = $this->nextCollection;\n if ($next && (PhabricatorTime::getNow() >= $next)) {\n $this->nextCollection = null;\n\n $all_collectors = PhabricatorGarbageCollector::getAllCollectors();\n $this->garbageCollectors = $all_collectors;\n }\n\n // If we're in a collection cycle, continue collection.\n if ($this->garbageCollectors) {\n foreach ($this->garbageCollectors as $key => $collector) {\n $more_garbage = $collector->runCollector();\n if (!$more_garbage) {\n unset($this->garbageCollectors[$key]);\n }\n // We only run one collection per call, to prevent triggers from being\n // thrown too far off schedule if there's a lot of garbage to collect.\n break;\n }\n\n if ($this->garbageCollectors) {\n // If we have more work to do, return true.\n return true;\n }\n\n // Otherwise, reschedule another cycle in 4 hours.\n $now = PhabricatorTime::getNow();\n $wait = phutil_units('4 hours in seconds');\n $this->nextCollection = $now + $wait;\n }\n\n return false;\n }", "protected function _prepareCollection()\n {\n $collection = Mage::getModel('emvcore/account')->getCollection();\n $this->setCollection($collection);\n return parent::_prepareCollection();\n }", "protected function _prepareCollection()\n {\n $collection = Mage::getResourceSingleton('eadesign/pdfgenerator_collection');\n $this->setCollection($collection);\n return parent::_prepareCollection();\n }", "protected function _prepareCollection()\r\n {\r\n $collection = Mage::getResourceModel('sales/order_address_collection');\r\n\r\n $collection->getSelect()\r\n ->reset()\r\n ->from(array(\"main_table\" => $collection->getMainTable()), array())\r\n ->columns('email')\r\n ->columns('firstname')\r\n ->columns('lastname')\r\n ->columns('telephone')\r\n ->columns('postcode')\r\n ->columns('country_id')\r\n ->columns('region')\r\n ->distinct(true);\r\n\r\n $collection->getSelect()->where(\r\n 'main_table.email <> ?', ''\r\n );\r\n\r\n $collection->getSelect()->where(\r\n 'main_table.firstname <> ?', ''\r\n );\r\n\r\n $collection->getSelect()->where(\r\n 'main_table.lastname <> ?', ''\r\n );\r\n\r\n $collection->getSelect()->where(\r\n 'main_table.address_type = ?', 'billing'\r\n );\r\n \r\n // we should get only users which are not registered yet\r\n $entity = Mage::getModel('customer/customer')->getResource();\r\n $attribute = Mage::getSingleton('eav/config')\r\n ->getCollectionAttribute($entity->getType(), 'email');\r\n\r\n $collection->getSelect()->where(\r\n 'main_table.email NOT IN (?)',\r\n new Zend_Db_Expr(\"SELECT email FROM `\".$attribute->getBackendTable().\"`\")\r\n );\r\n\r\n // echo $collection->getSelect()->__toString();\r\n\r\n $this->setCollection($collection);\r\n return parent::_prepareCollection();\r\n }", "protected function _prepareCollection(){\n\t\t$collection = Mage::getResourceModel('customweb_subscription/schedule_collection')->addFilter('subscription_id',\n\t\t\t\tarray(\n\t\t\t\t\t'eq' => $this->getSubscription()->getId()\n\t\t\t\t));\n\t\t$this->setCollection($collection);\n\t\treturn parent::_prepareCollection();\n\t}", "private function hydrateEmpty ()\r\n {\r\n // set our data\r\n if (isset($this->erLoadData) && is_array($this->erLoadData))\r\n foreach ($this->erLoadData AS $key => $value)\r\n $this->{$key} = $value;\r\n\r\n foreach ($this->getColumnNames() AS $field)\r\n $this->{$field} = null;\r\n\r\n // mark object as new\r\n $this->isNew = true;\r\n }", "protected function _prepareCollection() {\n $gid = Mage::helper ( 'marketplace' )->getGroupId ();\n $collection = Mage::getResourceModel ( 'customer/customer_collection' )->addNameToSelect ()->addAttributeToSelect ( 'email' )->addAttributeToSelect ( 'created_at' )->addAttributeToSelect ( 'group_id' )->addFieldToFilter ( 'group_id', $gid );\n $this->setCollection ( $collection );\n return parent::_prepareCollection ();\n }", "public function __construct()\n {\n $this->destinataires = new ArrayCollection();\n }", "private function populateClubMaster(){\n $tblTemp = ClubMaster::all();\n foreach ($tblTemp as $rec){\n $this->arrayClubMaster[] = $rec;\n }\n }", "public function dry(): Collection\n {\n foreach ($this->cleanData as $key => $value) {\n $this->$key = $value;\n }\n return new Collection($this->cleanData);\n }", "public function __construct()\n {\n $this->bookings = new ArrayCollection();\n }", "public function clearFournisseurs()\n {\n $this->collFournisseurs = null; // important to set this to NULL since that means it is uninitialized\n }", "private function __construct()\n {\n $this->collection = [];\n $this->position = 0;\n }", "public function rewind()\n {\n reset($this->collection);\n }", "public function clear(): void\n {\n $this->collection = [];\n $this->position = 0;\n }", "private function constructDataInSingleMode(){\n $numOfFields = $_POST['counter'];\n // generating\n $collection = array();\n for ($i = 0; $i < $numOfFields; $i ++){\n // get values\n $subject = $_POST['field_div_id_'.$i.'_subject'];\n $year = $_POST['field_div_id_'.$i.'_year'];\n\n if (!in_array($subject,$collection)){\n array_push($collection,$subject);\n }\n if (!isset($collection[$subject])){\n $tmp = [$year];\n $collection[$subject] = $tmp;\n }else{\n $tmp = $collection[$subject];\n if (!in_array($year,$tmp)){\n array_push($tmp,$year);\n }\n $collection[$subject] = $tmp;\n }\n }\n return $collection;\n }", "public function clearSeguirs()\n {\n $this->collSeguirs = null; // important to set this to NULL since that means it is uninitialized\n }", "public function clearViajess()\n {\n $this->collViajess = null; // important to set this to NULL since that means it is uninitialized\n }", "public function __construct()\n {\n $this->data = new Collection();\n }", "public function __construct()\n {\n $this->groups = new ArrayCollection();\n $this->invitations = new ArrayCollection();\n }", "private function fillData()\n {\n $this->loadPrinters();\n $this->loadCartridges();\n $this->loadSituatedPrinters();\n $this->loadDepartments();\n }", "public function putCollection();", "protected function _prepareCollection()\n {\n $this->setCollection($this->_galleryCollection);\n return parent::_prepareCollection();\n }", "private function insertCollectionFieldRecord()\n {\n return $this->collection->fields()->create($this->field);\n }", "public function clean_all()\n\t{\n\t\t$this->_list = [];\n\t}", "public function getEmptyCollection();", "private function Pre_Prequal_Collect()\n\t{\n\t\t// our current page has the 'pre_prequal' stat), this is outdated [AM]\n\t\t//if( !isset($_SESSION[\"fle_dupe_id\"]) && in_array($this->config->site_type, $this->fle_site_types) && strlen($this->normalized_data[\"email_primary\"]) > 5 )\n\n\t\t// only run this if we haven't run it already, and\n\t\t// if our email address is considered valid\n\t\tif ((!isset($_SESSION['fle_dupe_id'])) && (!in_array('email_primary', $this->errors)))\n\t\t{\n\t\t\t// insert into the dupes table: we might want to make\n\t\t\t// the index unique and use a replace into?\n\t\t\t$query = \"INSERT INTO fle_dupes ( email, site ) VALUES ( '{$this->normalized_data['email_primary']}', '{$this->config->site_name}' )\";\n\t\t\t$result = $this->sql->Query($this->database, $query);\n\n\t\t\t// save our ID\n\t\t\t$_SESSION['fle_dupe_id'] = $this->sql->Insert_ID();\n\n\t\t}\n\n\t\treturn;\n\n\t}", "public function __construct() {\n $this->fellowshipSubspecialties = new ArrayCollection();\n $this->fellowshipVisaStatuses = new ArrayCollection();\n }", "public function prepareCollection()\n {\n $this->addFieldToSelect(array('id', 'status', 'created_at'));\n $this->addQuoteData(array('store_id', 'base_subtotal', 'base_grand_total', 'base_currency_code'));\n\n $this->addStatusFilter(Sheep_Subscription_Model_Subscription::STATUS_CANCELLED);\n $this->addFieldToFilter('main_table.canceled_at', array(\n 'from' => $this->_from,\n 'to' => $this->_to,\n 'datetime' => true\n ));\n\n if ($this->_storeIds) {\n $this->addFieldToFilter('q.store_id', array('in' => $this->_storeIds));\n $this->getSelect()->where('q.store_id IN (?)', $this->_storeIds);\n }\n }", "public function oneItemCollection()\n {\n $collection = new Collection($this->getClient([['id' => '0', 'key' => 0]]), 'single');\n foreach ($collection as $item) {\n $this->assertSame(['id' => '0', 'key' => 0], $item);\n }\n }", "public function initCamps()\n\t{\n\t\t$this->collCamps = array();\n\t}", "public function __construct()\n {\n $this->managedCompetitions = new ArrayCollection();\n }", "public function __construct()\n {\n $this->fundingOrganizations = new ArrayCollection();\n }", "private function populateFields()\n {\n // With data_participants, data_forms data_questionnaires, and data_config tables.\n foreach ($this->collection as $model)\n {\n $this->dataParticipants[] = $model['original'];\n $this->dataForms[] = $model->data_form->toArray();\n $this->dataQuestionnaires[] = $model->data_questionnaire->toArray();\n $this->dataConfigs[] = $model->data_config->toArray();\n }\n\n\n // With data_game_phases.\n foreach ($this->collection as $dataParticipantModel)\n {\n foreach ($dataParticipantModel->data_game_phases->toArray() as $phase)\n {\n $this->dataGamePhases[] = $phase;\n }\n }\n\n }", "public function testIsEmpty()\n {\n // Start of user code Collection.testisEmpty\n $collection = new GenericCollection();\n $this->assertTrue($collection->isEmpty());\n\n $collection->add(new SomeItem());\n $this->assertFalse($collection->isEmpty()); \n unset($collection);\n // End of user code\n }", "public function clear()\n {\n $this->items = [];\n $this->itemCollections = [];\n $this->idCollections = [];\n }", "protected function doHydrate(): void {\n\t\tglobal $wpdb;\n\t\t$this->collection = new ArrayCollection();\n\n\t\t$posts = [];\n\n\t\tif ( $this->criteria ) {\n\t\t\t$query = $this->getQueryGenerator()->getQuery();\n\n\t\t\t$posts = $wpdb->get_results( $query );\n\t\t}\n\n\t\tif ( empty( $posts ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tforeach ( $posts as $post ) {\n\t\t\t$property = $this->normalizeEntity( $post );\n\t\t\t$this->collection[ $property->getKey() ] = $property;\n\t\t}\n\t}", "public function testWhenNoEntriesArePassedThenBuildEmptyCollection()\n {\n $response = TableFieldCollection::build();\n $helper = \\ClassHelper::instance($response);\n\n static::assertInstanceOf(TableFieldCollection::class, $response);\n static::assertEquals([], $helper->entries);\n }", "public function clearConcluirs()\n {\n $this->collConcluirs = null; // important to set this to NULL since that means it is uninitialized\n }", "public function enregistrerNouvelleCollection() {\n\t\t\n\t\t$this->log->debug(\"Questionnaire::enregistrerNouvelleCollection() Début\");\n\t\t\n\t\t$titre = $this->get(\"collection_ajouter\");\n\t\t\n\t\tif ($titre != '') {\n\n\t\t\t// Préparer la nouvelle collection\n\t\t\t$collection = new Collection($this->log, $this->dbh);\n\t\t\t$collection->set(\"titre\", $titre);\n\t\t\t$collection->set(\"id_projet\", $this->get(\"id_projet\"));\n\t\t\t$collection->set(\"remarque\", \"\");\n\t\t\t\n\t\t\t// Ajouter la collection\n\t\t\t$collection->ajouter();\n\t\t\t\n\t\t\t// Régler l'id de collection du questionnaire sur l'id de la nouvelle collection\n\t\t\t$this->set(\"id_collection\", $collection->get(\"id_collection\"));\n\t\t}\n\t\t\n\t\t$this->log->debug(\"Questionnaire::enregistrerNouvelleCollection() Fin\");\n\t\t\n\t}", "public function __construct()\n {\n $this->collection = collect(CurrencyGenerator::generate());\n /*\n if(Storage::exists('AmazingDB')) {\n $this->collection = collect($this->loadFormFile());\n } else {\n $this->collection = collect(CurrencyGenerator::generate());\n }\n */\n }", "public function fillModel(CrudableModel $model, Collection $data): CrudableModel;", "private function fill(?callable $randomizer = null): void\n {\n $cards = [];\n\n foreach (range(1, 13) as $priority) {\n foreach (range(1, 4) as $suit) {\n $cards[] = Card::make($priority, $suit);\n }\n }\n\n $this->cards = new CardsCollection($cards, 0, 'ArrayIterator', $randomizer);\n }", "public static function clear(): void\n {\n static::$_collection = null;\n }", "protected function _updateCollection(){\r\n\t\t$updated = false;\r\n\t\t$models = $this->getStorage()->getModels();\r\n\t\tforeach ($models as $model){\r\n\t\t\t$collection = modelCollection::getInstance($model);\r\n\t\t\t/** @var $collection modelCollection */\r\n\t\t\tif ($collection->exists()){\r\n\t\t\t\tif ($realFields = $this->getFieldNames($collection)){\r\n\t\t\t\t\t$collectionFields = $collection->getFieldNames();\r\n\t\t\t\t\tforeach ($collectionFields as $fieldName){\r\n\t\t\t\t\t\tif (!in_array($fieldName, $realFields)){\r\n\t\t\t\t\t\t\t$helper = $collection->getHelper();\r\n\t\t\t\t\t\t\t$fieldSql = $helper[$fieldName]->getCreateSql($this);\r\n\t\t\t\t\t\t\t// ALTER TABLE `sdf` ADD `sdfads` INT NOT NULL AFTER `id`\r\n\t\t\t\t\t\t\t$tableName = $collection->getTableName();\r\n\t\t\t\t\t\t\t// AFTER `id`\r\n\t\t\t\t\t\t\t// FIRST\r\n\t\t\t\t\t\t\t$sql = \"ALTER TABLE {$tableName} ADD \".$fieldSql;\r\n\t\t\t\t\t\t\tif ($collection->internalQuery($sql)){\r\n\t\t\t\t\t\t\t\t$updated = 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}\r\n\t\t\t}else{\r\n\t\t\t\t$this->_createCollection();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $updated;\r\n\t}", "public function testPrepareCollection()\n {\n $this->tileBlock->setData('id', 1);\n $collection = $this->tileBlock->getPreparedCollection();\n $this->assertEquals($this->collection, $this->tileBlock->getCollection());\n $this->assertEquals($this->collection, $collection);\n }", "protected function _prepareCollection()\n {\n $collection = Mage::getResourceModel($this->_getCollectionClass());\n $this->setCollection($collection);\n \n return parent::_prepareCollection();\n }", "public function __construct() \n {\n $this->attachments = new ArrayCollection();\n $this->genres = new ArrayCollection();\n }", "public function __construct()\n {\n $this->products = new ArrayCollection();\n }", "public function requestingCollection();", "public function getEmptyCollection()\n {\n $collection = new EntityCollection(Person::class);\n // Collections map mocck\n $collectionsMap = $this->getMockedCollectionMap();\n $collectionsMap->expects($this->once())\n ->method('get')\n ->with('SELECT people.* FROM people', false)\n ->willReturn(false);\n $collectionsMap->expects($this->once())\n ->method('set')\n ->with('SELECT people.* FROM people', $collection);\n\n // Adapter mock\n $adapter = $this->getMockedAdapter();\n $adapter->expects($this->once())\n ->method('query')\n ->with($this->queryObject, [])\n ->willReturn([]);\n $this->queryObject->setAdapter($adapter);\n\n\n $entityMapper = $this->getMockedEntityMapper();\n $entityMapper->expects($this->once())\n ->method('createFrom')\n ->with([])\n ->willReturn($collection);\n\n\n\n /** @var RepositoryInterface|MockObject $repository */\n $repository = $this->queryObject->getRepository();\n $repository->expects($this->once())\n ->method('getEntityMapper')\n ->willReturn($entityMapper);\n $repository->expects($this->atLeast(2))\n ->method('getCollectionsMap')\n ->willReturn($collectionsMap);\n $this->assertSame($collection, $this->queryObject->all());\n }", "private function _refresh()\n {\n $this->_id = $this->_id??$this->checkIfExist('u_name', $this->_name);\n $fields = $this->getById($this->_id);\n if (is_array($fields) && !empty($fields)) {\n $this->_name = array_key_exists('u_name', $fields) ? $fields['u_name'] : 'Name not set';\n $this->_correctAmount = array_key_exists('correct_answers', $fields) ? $fields['correct_answers'] : 0;\n }\n }", "protected function _prepareCollection()\n {\n $collection = Mage::getModel('ml_testimonials/testimonials')->getCollection();\n $this->setCollection($collection);\n return parent::_prepareCollection();\n }", "public function set_data_empty() {\n\t\t$this->data = array();\n\t\tforeach ($this->fields as $field) {\n\t\t\t$this->data[$field] = null;\n\t\t}\n\t\t$this->data['set_from'] = 'empty';\n\t}", "public function getEmptyCollection()\n\t{\n\t\treturn new GeneralCollectionDefault();\n\t}", "protected function _prepareCollection()\n {\n /** @var \\RedChamps\\IpSecurity\\Model\\Ipsecuritylog $model */\n $model = $this->ipSecurityLogFactory->create();\n\n $collection = $model->getCollection();\n $this->setCollection($collection);\n return parent::_prepareCollection();\n }", "public function __construct()\n {\n parent::__construct();\n $this->franchises = new ArrayCollection();\n }", "protected function initCollectionValues($args){\n if(sizeof($args)){\n foreach($args as $argument){\n array_push($this->_collection, $argument);\n }\n }\n }", "public function setTmpCollections(){\n\t\t$list = array('tmp.invites');\n\t\t// set database\n\t\t$totsy = Invitation::connection()->connection; \n\t\t\n\t\t/** \n\t\t * drop collections only when number of rows that contains 'tmp'\n\t\t * elements are equal to zero!\n\t\t * When there is rows with tmp element - meaning cron job\n\t\t * wasn't finishied succesfully so, finish what we had before.\n\t\t */\n\t\t$conditions = array( 'tmp' => array('$exists' => true));\n\t\t$counter = Invitation::collection()->find($conditions)->count();\n\n\t\tif ($counter == 0) {\n\t\t\t// drop tmp collections if any\n\t\t\t$dbs = $totsy->listCollections();\n\t\t\tforeach ($dbs as $db){\n\t\t\t\tif (in_array($db->getName(),$list)){\n\t\t\t\t\t$db->drop();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//create new tmp collections\n\t\t\tforeach( $list as $collection ){\n\t\t\t\t$totsy->createCollection(array(\n\t\t\t\t\t'create' => $collection,\n\t\t\t\t\t'capped' => false\n\t\t\t\t));\n\t\t\t}\n\t\t} else {\n\t\t\t$this->mssg('no db cleanup. found rows with tmp element: '.$counter);\n\t\t}\n\t\t\t\t\t\n\t\t$this->tmpInvites = $totsy->{'tmp.invites'};\n\t\t$this->tmpInvites->ensureIndex(array('user_id'=>1));\n\t\t\n\t\t// make sure all necessary fields have indexes\n\t\t$ensure_indexes = array( 'email', 'user_id', 'credited', 'tmp', 'creditet', 'status');\n\t\t$is = Invitation::collection()->getIndexInfo();\n\t\t$indexes = array();\n\t\tforeach ($is as $i){\n\t\t\tforeach ($i['key'] as $k=>$v){\n\t\t\t\t$indexes[] = $k;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$indexes = array_unique($indexes);\n\t\tforeach ($ensure_indexes as $ie){\n\t\t\tif (!in_array($ie, $indexes)){\n\t\t\t\tInvitation::collection()->ensureIndex(array($ie => 1));\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public function clearViajes()\n {\n $this->collViajes = null; // important to set this to NULL since that means it is uninitialized\n }", "public function clearViajes()\n {\n $this->collViajes = null; // important to set this to NULL since that means it is uninitialized\n }", "final public function catchValuesFromDatabaseIfNotDoneYet() {\n\t\tif (!$this->CatchedValues) {\n\t\t\t$this->catchValuesFromDatabase();\n\n\t\t\t$this->CatchedValues = true;\n\t\t}\n\t}", "protected function _prepareCollection()\n {\n $collection = Mage::getModel('zitec_branding/branding')->getCollection();\n $collection->addStoresToResult();\n $this->setCollection($collection);\n\n return parent::_prepareCollection($collection);\n }", "private function setNewAssocFields() {\n if (isset($this->fields)) {\n $this->data = array_flip($this->fields);\n //Inicializo el array en blanco\n foreach ($this->data as $key => $value) {\n $this->data[$key] = NULL;\n }\n }\n }", "public function __construct()\n {\n $this->results = new ArrayCollection();\n }", "public function merge($collection);", "public function testMissingCollections()\n {\n $collections = new Horde_ActiveSync_Collections($this->_cache, $this->_as);\n $col = array(\n 'id' => 'INBOX',\n 'windowsize' => 5,\n 'truncation' => 0,\n 'mimesupport' => 0,\n 'mimetruncation' => 8,\n 'conflict' => 1,\n 'bodyprefs' => array(\n 'wanted' => 2,\n 2 => array(\n 'type' => 2,\n 'truncationsize' => 200000)\n ),\n 'synckey' => '{517541cc-b188-478d-9e1a-fa49c0a8015f}96',\n 'deletesasmoves' => 1,\n 'filtertype' => 5,\n );\n $collections->addCollection($col);\n $collections->initPartialSync();\n $this->assertEquals(1, $collections->collectionCount());\n $collections->getMissingCollectionsFromCache();\n $this->assertEquals(3, $collections->collectionCount());\n }", "public function __construct() {\n $this->backings = new ArrayCollection();\n }", "protected function _generateDataCollection()\n\t{\n\t\t$this->_dataCollection = new Doctrine_Collection($this->getModelClassName());\n\t\tforeach($this->_data as $data) {\n\t\t\t$currency = L8M_Doctrine_Record::factory($this->getModelClassName());\n\t\t\t$currency->merge($data);\n\t\t\t$currency->Translation['en']->name = $data['name_en'];\n\t\t\t$currency->Translation['de']->name = $data['name_de'];\n\t\t\t$currency->Translation['en']->sub_name = $data['sub_name_en'];\n\t\t\t$currency->Translation['de']->sub_name = $data['sub_name_de'];\n\t\t\t$this->_dataCollection->add($currency, $data['id']);\n\t\t} \n\t\t\n\t}" ]
[ "0.6407444", "0.6180204", "0.60203826", "0.58663714", "0.5796227", "0.5727422", "0.57199794", "0.5707549", "0.5696004", "0.56746125", "0.5671355", "0.5660921", "0.5651445", "0.56430906", "0.55832136", "0.55751", "0.55716115", "0.5570264", "0.55661404", "0.5563896", "0.5559465", "0.55366063", "0.5512755", "0.5501831", "0.5487594", "0.5485591", "0.5462292", "0.54559743", "0.5454406", "0.543946", "0.5435191", "0.5388558", "0.53825396", "0.53650355", "0.5346793", "0.5332427", "0.5331546", "0.5327754", "0.5322841", "0.53154165", "0.5314657", "0.53073657", "0.5303421", "0.53031677", "0.52915245", "0.5265839", "0.5265834", "0.5265225", "0.5261676", "0.5256378", "0.5255185", "0.5248571", "0.5247908", "0.52400523", "0.523315", "0.5227064", "0.52211434", "0.52147835", "0.52144337", "0.52135205", "0.52101874", "0.52069885", "0.52046853", "0.52032644", "0.520062", "0.51990664", "0.5196631", "0.5194148", "0.5190876", "0.5184954", "0.5181142", "0.51723737", "0.5170691", "0.51684165", "0.5167844", "0.5162968", "0.5161414", "0.5161372", "0.5160812", "0.5158881", "0.5157672", "0.5155419", "0.5151367", "0.5149044", "0.5144625", "0.5126269", "0.5113369", "0.5112938", "0.5109847", "0.5107809", "0.51070523", "0.51070523", "0.5107051", "0.5105917", "0.51048774", "0.510249", "0.50996965", "0.50952595", "0.5094599", "0.5090853" ]
0.75485015
0
gets the pager object
получает объект пейджеров
public function getPager() { return $this->_pager; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _pager($pageQueryStr = '')\n{\n return new Pager($pageQueryStr);\n}", "protected function getPage() {}", "protected function getPage() {}", "function getPage() { return $this->page; }", "public function getPage() {}", "public function getPage () {}", "public function getPage();", "public function getPage();", "public function getMyPagintaor( )\n\t{\n\t\treturn $this->myPaginator;\t\n\t}", "public function getPage(){\n return $this->page;\n }", "public function getPage(){\n return $this->page;\n }", "public function getPage() {\n\t\treturn $this->_page;\n\t}", "public final function getPage(){\r\n return $this->page;\r\n }", "public function getPage()\n {\n return new Page($this);\n }", "function getPageObject(){\r\n return Zend_Registry::get('Page'); \r\n}", "public function getPagerParameter();", "public function getPage()\n {\n return $this->page;\n }", "public function getPage()\n {\n return $this->page;\n }", "public function getPage()\n {\n return $this->page;\n }", "public function getPage()\n {\n return $this->page;\n }", "public function getPage()\n {\n return $this->page;\n }", "public function getPage()\n {\n return $this->page;\n }", "public function getPage()\n {\n return $this->page;\n }", "public function getPage()\n {\n return $this->page;\n }", "public function getPage()\n {\n return $this->page;\n }", "public function getPage()\n {\n return $this->page;\n }", "public function getPage()\n {\n return $this->page;\n }", "public function getPage()\n {\n return $this->page;\n }", "public function getPage()\n {\n return $this->page;\n }", "public function getPage()\n {\n return $this->page;\n }", "public function getPage()\n {\n return $this->pagina;\n }", "protected function PageObject() {\n\treturn fcApp::Me()->GetPageObject();\n }", "public function getPage()\n\t{\n\n\t\treturn $this->_page;\n\n\t}", "public function getPager()\n {\n $hasDiscriminator = $this->discriminatorColumn !== null;\n $hasRepositoryClass = $this->repositoryClass !== null;\n\n if (!$hasRepositoryClass && !$hasDiscriminator) {\n throw new \\RuntimeException('You should define either a repository class, either discriminator');\n }\n\n if (is_null($this->results)) {\n throw new \\RuntimeException('You should define sphinx results on '.__CLASS__);\n }\n\n $adapter = $this->container->get('highco.sphinx.pager.white_october.doctrine_orm.adapter');\n\n $results = $hasDiscriminator ? $this->getDiscriminatorResults() : $this->getResults();\n \n $adapter->setArray($results);\n\n $adapter->setNbResults(isset($this->results['total_found']) ? $this->results['total_found'] : 0);\n\n return new Pagerfanta($adapter);\n }", "public function getPage()\n\t{\n\t\treturn $this->page;\n\t}", "public function getPage()\n {\n return $this->page;\n }", "public function getPage() {\n return $this->page;\n }", "public function getPage() {\n return $this->page;\n }", "public function paginator(){\n return\n $this->Paginator;\n }", "public function getPage() {\n\t\treturn $this->pois;\n\t}", "function &getPageObject()\n\t{\n\t\treturn $this->page_object;\n\t}", "function init()\n {\n $options = array();\n \n // Setting core pager options. Users can overwrite these\n if (is_null($this->_options['pagerOptions']['totalItems'])) {\n $options['totalItems'] = $this->_totalRecordsNum;\n }\n \n if (is_null($this->_options['pagerOptions']['perPage'])) {\n $options['perPage'] = is_null($this->_pageLimit) \n ? $this->_totalRecordsNum \n : $this->_pageLimit;\n }\n \n if (is_null($this->_options['pagerOptions']['urlVar'])) {\n $options['urlVar'] = $this->_requestPrefix . 'page';\n }\n \n if (is_null($this->_options['pagerOptions']['currentPage'])) {\n $options['currentPage'] = $this->_page;\n }\n \n if (is_null($this->_options['pagerOptions']['onclick'])) {\n $onclick = $this->_buildOnMoveCall('%d', $this->_currentSort);\n $options['onclick'] = $onclick ? \"return $onclick\" : '';\n }\n \n // Check if NUM is enabled\n if ($this->_urlMapper) {\n $options['append'] = false; \n $options['path'] = '';\n \n reset($this->_currentSort);\n $orderBy = key($this->_currentSort);\n $direction = current($this->_currentSort);\n $options['fileName'] = $this->_buildMapperURL($orderBy, \n $direction, \n '00000');\n \n // NUM does not allow a %d to be generated as page, hack needed..\n $options['fileName'] = str_replace('00000', '%d', $options['fileName']);\n }\n\n if (!isset($this->_pager)) {\n // No external container, Then we set our defaults.\n $options = array_merge($this->_options['pagerOptions'], $options);\n \n $options['excludeVars'] = array_merge($this->_options['excludeVars'],\n $options['excludeVars']); \n \n $options['extraVars'] = array_merge($this->_options['extraVars'],\n $options['extraVars']); \n \n $this->_pager = Pager::factory($options);\n } else {\n // There is an external container. We try to be less intrusive as \n // possible. We need to set the core options anyway.\n $options = array_merge($this->_pager->getOptions(), $options);\n\n // FIXME: does not forward get arguments\n\n $options['excludeVars'] = array_merge($this->_options['excludeVars'],\n $options['excludeVars']); \n \n $options['extraVars'] = array_merge($this->_options['extraVars'],\n $options['extraVars']); \n \n $this->_pager->setOptions($options);\n }\n }", "public function getPagerQuery();", "public function getPage(){\n return $this->currentPage;\n }", "public function findPage($pager_id = 0);", "public function getPager() {\n\n\t\t// returns array($pageLabel => $pageNum, ...)\n\n\t\tif($this->totalItems <= $this->itemsPerPage) return array();\n\t\tif(!is_null($this->pager)) return $this->pager;\n\t\t$this->pager = array();\n\n\n\t\tif($this->numPageLinks) {\n\t\t\t$numPageLinks = $this->numPageLinks-1;\n\t\t\t//$numHalf = (int) round($numPageLinks / 2); \n\t\t\t$numHalf = (int) floor($numPageLinks / 2); \n\t\t\t$startPage = $this->currentPage - $numHalf; \n\n\t\t\tif($startPage <= 0) {\n\t\t\t\t$startPage = 0;\n\n\t\t\t} else if($startPage > 0) {\n\t\t\t\t$numPageLinks--;\n\t\t\t}\n\n\t\t\t$endPage = $startPage + $numPageLinks;\n\n\t\t\tif($endPage > $this->totalPages) {\n\t\t\t\t$endPage = $this->totalPages; \n\t\t\t\t$startPage = $endPage - $numPageLinks;\n\t\t\t\tif($startPage < 0) $startPage = 0;\n\t\t\t}\t\t\n\n\t\t} else {\n\t\t\t$startPage = 0; \n\t\t\t$endPage = $this->totalPages; \n\t\t}\n\n\t\t/*\n\t\t// uncomment for debugging purposes\n\t\techo \t\"numPageLinks=$numPageLinks<br />\" . \n\t\t\t\"numHalf=$numHalf<br />\" . \n\t\t\t\"startPage=$startPage<br />\" . \n\t\t\t\"endPage=$endPage<br />\" . \n\t\t\t\"totalPages={$this->totalPages}<br />\" . \n\t\t\t\"totalItems={$this->totalItems}<br />\";\n\t\t*/\n\t\t\t\n\n\t\tfor($n = $startPage; $n <= ($endPage+1); $n++) {\n\t\t\t$type = $n == ($this->currentPage+1) ? PagerNavItem::typeCurrent : '';\n\t\t\tif($n) $this->pager[] = new PagerNavItem($n, $n - 1, $type);\n\t\t}\n\n\t\tif($this->currentPage < $this->totalPages) {\n\t\t\t$useLast = true; \n\t\t\t$item = null;\n\t\t\t$key = null;\n\n\t\t\tforeach($this->pager as $key => $item) {\n\t\t\t\tif($item->pageNum == $this->totalPages) $useLast = false;\n\t\t\t}\n\n\t\t\t/*\n\t\t\tif($item && $item->pageNum == ($this->totalPages-1)) {\n\t\t\t\tunset($this->pager[$key]); \n\t\t\t\t$this->pager[] = $this->separator; \n\t\t\t\t$this->pager[] = new PagerNavItem($this->totalPages+1, $this->totalPages); \n\t\t\t\t$useLast = false; \n\t\t\t}\n\t\t\t*/\n\n\t\t\tif($useLast) {\n\t\t\t\t$this->pager[] = $this->separator; \n\t\t\t\t$this->pager[] = new PagerNavItem($this->totalPages+1, $this->totalPages, PagerNavItem::typeLast); \n\t\t\t}\n\n\t\t\tif($this->getLabel('next')) $this->pager[] = new PagerNavItem($this->getLabel('next'), $this->currentPage+1, PagerNavItem::typeNext); \n\t\t}\n\n\t\tif(count($this->pager) > 1) {\n\n\t\t\t$firstPageLink = false;\n\n\t\t\tforeach($this->pager as $key => $item) {\n\t\t\t\t// convert from 0-based to 1-based\n\t\t\t\tif($item->type != 'separator') $item->pageNum = $item->pageNum+1;\n\t\t\t\tif($item->pageNum == 1) $firstPageLink = true; \n\t\t\t}\n\n\n\t\t\tif(!$firstPageLink) {\n\n\t\t\t\t// if the first page in pager is page 2, then get rid of it because we're already adding a page 1 (via typeFirst)\n\t\t\t\t// and leaving it here would result in 1 ... 2\n\t\t\t\t$item = reset($this->pager); \n\t\t\t\tif($item->pageNum == 2) array_shift($this->pager); \n\n\t\t\t\tarray_unshift($this->pager, $this->separator); \n\t\t\t\tarray_unshift($this->pager, new PagerNavItem(1, 1, PagerNavItem::typeFirst)); // add reference to page 1\n\t\t\t}\n\n\t\t\tif($this->currentPage > 0 && $this->getLabel('previous')) {\n\t\t\t\tarray_unshift($this->pager, new PagerNavItem($this->getLabel('previous'), $this->currentPage, PagerNavItem::typePrevious));\n\t\t\t}\n\n\t\t} else $this->pager = array(); \n\n\t\n\t\treturn $this->pager; \t\n\t}", "public function getPaginator();", "public function getPaginator();", "abstract protected function getPage() ;", "function getPage(){\n\t\tglobal $page;\n\t\tif($page != null){\n\t\t\treturn $page;\n\t\t} else {\n\t\t\tdie(\"Page object is not set\");\n\t\t}\n\t}", "protected function _project_pager()\n\t{\n\t\t$this->test = new Model_Pager;\n\n\t\t$test = $this->test;\n\t\t$this->test_next_project = $test->next_project($this->page_slug, $this->project_slug);\n\t\t\n\t\t// and check for errors\n\t\tif ($this->test_next_project['status'] == Model_Project::SUCCESS)\n\t\t{\n\t\t\t$this->view->pager = $this->test_next_project;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->view->pager = NULL;\n\t\t}\n\t}", "public function paginator()\n {\n return $this->paginator;\n }", "public function getPage()\n {\n return PagesModel::getPageById($this->id_page);\n }", "public function get_page() {\n\t \t\t\treturn $this->page;\n\t \t\t}", "public function getPager()\n {\n $pager = $this->getChild('adverboard_list_pager');\n\n if ($pager) {\n $advertPerPage = Mage::helper('ab_adverboard')->getAdvertPerPage();\n $pager->setAvailableLimit(array($advertPerPage => $advertPerPage));\n $pager->setTotalNum($this->getCollection()->getSize());\n $pager->setCollection($this->getCollection());\n $pager->setShowPerPage(true);\n return $pager->toHtml();\n }\n }", "function &getPagination()\r\n{\r\n\tif ($this->pagination == Null)\r\n\t\t$this->pagination = new JPagination(0,0,0);\r\n\treturn $this->pagination;\r\n}", "public function getPaginator () {\n return $this->paginator;\n }", "function getPagination()\n\t{\n\t\t// Lets load the content if it doesn't already exist\n\t\tif (empty($this->_pagination))\n\t\t{\n\t\t\tglobal $mainframe;\n\t\t\tif ($mainframe->isAdmin()){\n\t\t\t\tjimport('joomla.html.pagination');\n\t\t\t\t$this->_pagination = new JPagination( $this->getTotal(), $this->getState('limitstart'), $this->getState('limit') );\n\t\t\t}\n\t\t\telse {\n\t\t\t\tinclude_once(JPATH_COMPONENT_ADMINISTRATOR.\"/libraries/JevPagination.php\");\n\t\t\t\t$this->_pagination = new JevPagination( $this->getTotal(), $this->getState('limitstart'), $this->getState('limit'),true);\n\t\t\t}\n\t\t}\n\n\t\treturn $this->_pagination;\n\t}", "function getPagination()\n {\n \t// Lets load the pagination if it doesn't already exist\n \tif (empty($this->_pagination))\n \t{\n \t\tjimport('joomla.html.pagination');\n \t\t$this->_pagination = new JPagination( $this->getTotal(), $this->getState('limitstart'), $this->getState('limit') );\n \t}\n \treturn $this->_pagination;\n }", "private function getPage()\n {\n return $this->getMink()->getSession()->getPage();\n }", "protected function getPage()\n {\n return $this->getNode()->getPage();\n }", "public function getPage()\n {\n if ($this->_page instanceOf Default_Model_Page) {\n return $this->_page;\n } else {\n return new Default_Model_Page();\n }\n }", "public function getPaginator()\n {\n return $this->call('paginator');\n }", "function getPagination()\n\t{\n\t\t// Lets load the content if it doesn't already exist\n\t\tif (empty($this->_pagination))\n\t\t{\n\t\t\tjimport('joomla.html.pagination');\n\t\t\t$this->_pagination = new JPagination( $this->getTotal(), $this->getState('limitstart'), $this->getState('limit') );\n\t\t}\n\n\n\t\treturn $this->_pagination;\n\t}", "protected function _getPage() \n\t{\n\t\treturn $this->_grid->getPage();\n\t}", "public function getPage()\n {\n return Page::getByID($this->scanned_page_id);\n }", "public function getPage(): Page\n {\n\t\treturn $this->page;\n\t}", "public static function get(){\n return new Page();\n }", "protected function initializePager() {\n if ($this->pager && !empty($this->pager['limit']) && !$this->count) {\n $page = \\Drupal::service('pager.parameters')->findPage($this->pager['element']);\n $count_query = clone $this;\n $this->pager['total'] = $count_query->count()->execute();\n $this->pager['start'] = $page * $this->pager['limit'];\n \\Drupal::service('pager.manager')->createPager($this->pager['total'], $this->pager['limit'], $this->pager['element']);\n $this->range($this->pager['start'], $this->pager['limit']);\n }\n }", "function getPagination()\n\t{\n\t\t// Lets load the content if it doesn't already exist\n\t\tif (empty($this->_pagination))\n\t\t{\n\t\t\tjimport('joomla.html.pagination');\n\t\t\t$this->_pagination = new JPagination( $this->getTotal(), $this->getState('limitstart'), $this->getState('limit') );\n\t\t}\n\n\t\treturn $this->_pagination;\n\t}", "function getPagination()\n\t{\n\t\t// Lets load the content if it doesn't already exist\n\t\tif (empty($this->_pagination))\n\t\t{\n\t\t\tjimport('joomla.html.pagination');\n\t\t\t$this->_pagination = new JPagination( $this->getTotal(), $this->getState('limitstart'), $this->getState('limit') );\n\t\t}\n\n\t\treturn $this->_pagination;\n\t}", "function getPagination()\n\t{\n\t\t// Lets load the content if it doesn't already exist\n\t\tif (empty($this->_pagination))\n\t\t{\n\t\t\tjimport('joomla.html.pagination');\n\t\t\t$this->_pagination = new JPagination( $this->getTotal(), $this->getState('limitstart'), $this->getState('limit') );\n\t\t}\n\n\t\treturn $this->_pagination;\n\t}", "function getPagina(){\r\n return $this->pag;\r\n }", "public function getPaginator()\n {\n return $this->paginator;\n }", "public function getPaginator()\n {\n return $this->paginator;\n }", "private function getPage()\n {\n return $this->getSession()->getPage();\n }", "function getPagination()\n {\n \tif (empty($this->_pagination)) {\n \t jimport('joomla.html.pagination');\n \t $this->_pagination = new JPagination($this->getTotal(), $this->getState('limitstart'), $this->getState('limit') );\n \t}\n \treturn $this->_pagination;\n }", "public function getPage()\n {\n return $this->currentPage;\n }", "public function getPagerRange()\n {\n return $this->_pagerRange;\n }", "public function getPage() {\r\n\t\t\tglobal $db;\r\n\t\t\t$query = $this->query;\r\n\t\t\t$query .= ' LIMIT '.$this->offset.', '.$this->rows_per_page;\r\n\t\t\t$result = $db->query($query);\r\n\t\t\treturn $result;\r\n\t\t}", "function getPagination() {\r\n\t\tif (empty ( $this->_pagination )) {\n\t\t\tjimport ( 'joomla.html.pagination' );\n\t\t\t$this->_pagination = new JPagination ( $this->getTotal (), $this->getState ( 'limitstart' ), $this->getState ( 'limit' ) );\n\t\t}\n\t\t\n\t\treturn $this->_pagination;\n\t}", "public function getPago()\n {\n return $this->pago;\n }", "private function getPage()\r\n\t{\r\n\t\t$page = null;\r\n\t\t$theme = Theme::getActiveTheme();\r\n\t\tif($theme != null)\r\n\t\t{\r\n\t\t\t$router = new Router($theme);\r\n\t\t\t$url = $this->getUrlPath();\r\n\t\t\t$page = $router->findByUrl($url);\r\n\t\t}\r\n\t\treturn $page;\r\n\t}", "public function getPaginator(): Paginator\n {\n return $this->paginator;\n }", "public function getPaginatorAdapter() {}", "public function getPaginatorAdapter() {}", "public function getPaginatorAdapter() {}", "public function getPaginatorAdapter() {}", "public function getPaginatorAdapter() {}", "function getPage () {\n\t\treturn $this->_attributes['page'];\n\t}", "function getPage() {\n\t\t\tif (is_null($this->page)) {\n\t\t\t\t$this->page= 1;\n\t\t\t}\n\t\t\tif ($this->getTotal() > 0) {\n\t\t\t\tif($this->page > $this->getPageCount()) {\n\t\t\t\t\t$this->page = $this->getPageCount();\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($this->page < 1) {\n\t\t\t\t$this->page = 1;\n\t\t\t}\n\t\t\treturn $this->page;\n\t\t}", "function &getPage()\n {\n atkimport(\"atk.ui.atkpagexf\");\n $page = &atkPage::getInstance();\n\n // Backwardscompatibility hack. We must inform the (deprecated) layout class\n // of the page.\n global $g_layout;\n $g_layout->m_atkpage = &$page;\n\n return $page;\n }", "protected function getPage()\n {\n if ($id = $this->get(['id', 'from_id'])) {\n return Page::find($id);\n }\n\n $from = $this->get(['from', 'folder', 'url'], URL::getCurrent());\n\n // First check for a URI as-is\n if (Page::uriExists($from)) {\n return Page::whereUri($from);\n }\n\n // If that didn't work, try prepending a slash\n $from_slashed = Str::ensureLeft($from, '/');\n if (Page::uriExists($from_slashed)) {\n return Page::whereUri($from_slashed);\n }\n\n // Finally try an id\n return Page::find($from);\n }", "public function getPagination()\n\t{\n\t\t// Lets load the content if it doesn't already exist\n\t\tif (empty($this->_pagination))\n\t\t{\n\t\t\tjimport('joomla.html.pagination');\n\t\t\t$this->_pagination = new JPagination( $this->getTotal(), $this->getState('limitstart'), $this->getState('limit') );\n\t\t\t\n\t\t}\n\t\t\n\t\treturn $this->_pagination;\n\t}", "public function page()\n {\n return \\Statamic\\API\\Page::find($this->id);\n }", "public function getPage($id)\n {\n\n\n }", "public function getPagination();", "public function getPagination();", "public function getPager()\n {\n if (!isset($this->pager) && $this->usePcntl()) {\n if (\\getenv('TERM') === 'dumb') {\n return false;\n }\n\n if ($pager = \\ini_get('cli.pager')) {\n // use the default pager\n $this->pager = $pager;\n } elseif ($less = $this->configPaths->which('less')) {\n // check for the presence of less...\n $this->pager = $less.' -R -F -X';\n }\n }\n\n return $this->pager;\n }" ]
[ "0.69663215", "0.68967867", "0.6895591", "0.6827396", "0.6712954", "0.6700859", "0.66793555", "0.66793555", "0.66063553", "0.6497499", "0.6478193", "0.647521", "0.64652073", "0.6453097", "0.6429506", "0.6410901", "0.64108235", "0.64108235", "0.64108235", "0.64108235", "0.64108235", "0.64108235", "0.64108235", "0.64108235", "0.64108235", "0.64108235", "0.64108235", "0.64108235", "0.64108235", "0.64108235", "0.63917583", "0.6389149", "0.63736993", "0.6351031", "0.6341707", "0.6338378", "0.6331576", "0.6331576", "0.63221586", "0.6307013", "0.6305903", "0.6288192", "0.62681097", "0.62560654", "0.6229052", "0.6208799", "0.6155402", "0.6155402", "0.61553884", "0.61496216", "0.61481476", "0.61226207", "0.61200726", "0.6094285", "0.6066025", "0.60559994", "0.6053936", "0.6053135", "0.60269994", "0.6020306", "0.6009266", "0.60079694", "0.6004899", "0.5992276", "0.59918755", "0.59875137", "0.5985597", "0.5983352", "0.5973137", "0.596573", "0.596573", "0.596573", "0.5961363", "0.5954121", "0.5954121", "0.5953804", "0.5950454", "0.59476465", "0.58924305", "0.58796626", "0.58759457", "0.58654916", "0.5865133", "0.58530015", "0.5845896", "0.5845896", "0.5845896", "0.5845896", "0.5845896", "0.58355284", "0.58302784", "0.58296365", "0.5818034", "0.5815601", "0.58123255", "0.5807763", "0.58043855", "0.58043855", "0.5802729" ]
0.72074026
0
Recreate images directory, with subdirectories and images for live and pending items. Users SSE(server sent event). See note on SSE in controller/admin/recreateImages.
Воссоздайте директорию изображений с поддиректориями и изображениями для живых и ожидающих элементов. Пользователи SSE (server sent event). См. примечание по SSE в controller/admin/recreateImages.
function recreateImages() { header('Content-Type: text/event-stream'); header('Cache-Control: no-cache'); $progressPercent = 0; $imagesCount = $this->countImages(); if (empty($imagesCount)) $imagesCount = 1; $backupDate = date('Y-m-d-H-i-s'); // backup images file $this->eventMessage('Backup in progress', 5); $src = CONFIG_DIR.'/content/images'; $dst = CONFIG_DIR.'/content/backups/images-' . $backupDate; if ($this->copyDirectory($src, $dst)) $this->eventMessage('Backup complete to directory: images-'. $backupDate, 9); else $this->eventMessage('Backing up images FAILED, did not proceed with recreate images', 100); // create new folders $percentPerImage = floor(90 / $imagesCount); $this->eventMessage('Recreating images in progress:', $progressPercent); ini_set('max_execution_time', 300); //300 seconds = 5 minutes $baseFolder = 'temp-images-' . $backupDate; $tempFolder = CONFIG_DIR.'/content/backups/' . $baseFolder; if (!mkdir($tempFolder)) { $this->reportError('cms/model/edit_update.php recreateImages. Failed to create folder: '. $tempFolder); } $subFolders = array ( '/landscape', '/portrait', '/panorama', '/square', '/landscape/1x', '/portrait/1x', '/panorama/1x', '/square/1x', '/landscape/2x', '/portrait/2x', '/panorama/2x', '/square/2x', '/landscape/3x', '/portrait/3x', '/panorama/3x', '/square/3x', '/thumbnail', '/uncropped', '/original',); foreach ($subFolders as $subFolder) { if (!mkdir($tempFolder . $subFolder)) { $this->reportError('cms/model/edit_update.php recreateImages. Failed to create folder: '. $tempFolder . $subFolder); } } // recreate live images $items = $this->edit->getContentItemsList(); foreach ($items as $item) { $images = $this->edit->getContentImages($item); foreach ($images as $image) { $progressPercent += ($percentPerImage); $this->eventMessage('&nbsp;&nbsp; &nbsp;' . $image['src'], $progressPercent); if (!copy(CONFIG_DIR.'/content/images/original/'.$image['src'], $tempFolder.'/original/'.$image['src'])) error_log('model/edit_update recreateImages. copy to original failed'); if (!copy(CONFIG_DIR.'/content/images/uncropped/'.$image['src'], $tempFolder.'/uncropped/'.$image['src'])) error_log('model/edit_update recreateImages. copy to uncropped failed'); if (!copy(CONFIG_DIR.'/content/images/thumbnail/'.$image['src'], $tempFolder.'/thumbnail/'.$image['src'])) error_log('model/edit_update recreateImages. copy to thumbnail failed'); $this->editUpdate->createWebsiteImages(array($image), 'backups/'.$baseFolder); } } // recreate images for pending items $items = $this->edit->getPendingItemsList(); foreach ($items as $item) { $images = $this->edit->getPendingImages($item); foreach ($images as $image) { $progressPercent += $percentPerImage; $this->eventMessage('&nbsp;&nbsp; &nbsp;' . $image['src'], $progressPercent); if (!copy(CONFIG_DIR.'/content/images/original/'.$image['src'], $tempFolder.'/original/'.$image['src'])) error_log('model/edit_update recreateImages. copy to original failed'); if (!copy(CONFIG_DIR.'/content/images/uncropped/'.$image['src'], $tempFolder.'/uncropped/'.$image['src'])) error_log('model/edit_update recreateImages. copy to uncropped failed'); if (!copy(CONFIG_DIR.'/content/images/thumbnail/'.$image['src'], $tempFolder.'/thumbnail/'.$image['src'])) error_log('model/edit_update recreateImages. copy to thumbnail failed'); } } // move newly created images to live images directory $this->removeDirectory(CONFIG_DIR.'/content/images'); rename($tempFolder, CONFIG_DIR.'/content/images'); $this->eventMessage('PROCESS COMPLETE - new images created.', 100); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function execute()\n {\n foreach (scandir('../assets/images') as $imageFile) {\n file_put_contents('../content/images/new', file_get_contents($imageFile));\n unlink($imageFile);\n }\n }", "public function action_reset_images()\n\t{\n\t\ttry {\n\t\t set_time_limit(0);\n\t\t ini_set('memory_limit', '512M');\n\t\t} catch (\\Exception $e) {\n\t\t // Nothing!\n\t\t}\n\t\t\n\t\t$em = \\D::manager();\n\t\t$driver = $em->getConfiguration()->getMetadataDriverImpl();\n\t\t$tables_fields = array();\n\t\t$sql = array();\n\t\t\n\t\t// Loop through all the model metadata and check for image fields\n\t\tforeach ($driver->getAllClassNames() as $class) {\n\t\t \n\t\t $metadata = $em->getClassMetadata($class);\n\t\t $fields = $metadata->fieldMappings;\n\t\t $image_fields = array();\n\t\t \n\t\t foreach ($fields as $field_name => $field) {\n\t\t \n\t\t if ($field['type'] == 'image') $image_fields[] = $field_name;\n\t\t \n\t\t }\n\t\t \n\t\t if (count($image_fields) === 0) continue;\n\t\t \n\t\t $items = $class::select('item')->getQuery()->getResult();\n\t\t foreach ($items as $num => $item) {\n\t\t \t\n\t\t \t$item->set('updated_at', new \\Datetime());\n\t\t \t$data = array();\n\t\t \t\n\t\t \tforeach ($image_fields as $image_field) {\n\t\t \t\t\n\t\t \t\t$image_value = $item->$image_field;\n\t\t \t\t\n\t\t \t\tif (is_array($image_value))\n\t\t \t\t\t$data[$image_field] = \\Arr::filter_keys($image_value, array('src', 'width', 'height', 'alt'));\n\t\t \t\t\n\t\t \t}\n\t\t \t\n\t\t \t$item->populate($data);\n\t\t \t\\D::manager()->persist($item);\n\t\t }\n\t\t \n\t\t}\n\t\t\n\t\t\\D::manager()->flush();\n\t\t$this->heading = \\Lang::get('admin.messages.reset_images_success');\n\t\t$this->template = 'admin/generic.twig';\n\t}", "public function indexImagesResize () {\n\t\tforeach (File::directories(lqOption('stock_image_path', 'uploads/stocks')) as $path) {\n\t\t\tif (!Str::contains(str_replace('\\\\', '/', $path), lqOption('stock_image_original_path', 'uploads/stocks/original'))) {\n\t\t\t\tFile::deleteDirectory($path);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// create new resized files and directories\n\t\tforeach (Stock::whereNotNull('index_image')->get() as $model) {\n\t\t\t$this->resizeIndexImage($model, lqOption('stock_image_original_path', 'uploads/stocks/original'), lqOption('stock_image_path', 'uploads/stocks'), explode(',', lqOption('stock_image_sizes', '80*80,250*250,500*500')), $model->index_image, lqOption('stock_image_aspect_ratio', 0));\n\t\t}\n\t\t\n\t\treturn redirect(route('admin_stock_list'));\n\t}", "function UpdateImageFolder($postarr)\n{\n\n\t// have a array that specifies what posts there is still ,\n\t// if the post is not in that list have it removed from system -- do this on user delete and post delete\n\t$keepimg = array();\n\t$ext = '.png';\n\tforeach($postarr as $post)\n\t{\n\t\t$img_dst = APPROOT. '/Images/combo/' . $post->id . $ext;\n\t\t$img_src = APPROOT. '/Images/userimages/' . $post->id . $ext;\n\t\t$img_stick = APPROOT. '/Images/stickers/' . $post->id . $ext;\n\t\t\n\t\tarray_push($keepimg, $img_dst, $img_src, $img_stick);\n\t}\n\t$allImages = glob(APPROOT. '/Images/*/*' . $ext, GLOB_BRACE);\n\n\tforeach ($allImages as $image)\n\t{\n\t\tif (!in_array($image,$keepimg))\n\t\t{\n\t\t\tif (file_exists($image))\n\t\t\t\tunlink($image);\n\t\t}\n\t}\n}", "public function saveImages()\n {\n foreach($this->data_feed as $item) :\n\n # If there's a new image, let's save it to our images folder\n if(!glob($this->full_path . '/*' . basename($item['full_image']))) :\n\n # Save Full Image\n $this->_saveImage($item['full_image'], $this->full_path . '/' . $item['base'] . '');\n\n # Save Thumbnail Image\n $this->_saveImage($item['thumbnail_image'], $this->thumbnail_path . '/' . $item['base'] . '');\n endif;\n\n endforeach;\n }", "private function updateImages()\n {\n $psdb = rbDbClass::rbDbInstance();\n\n $templates = $psdb->getRow(\n \"SELECT * FROM `\" . $psdb->prefix . RbSliderGlobals::TABLE_RBSLIDER_OPTIONS_NAME . \"`\n WHERE `name`='revslider_templates_premium'\"\n );\n\n $templates = (@Rbthemeslider::getIsset($templates['value']) &&\n !empty($templates['value'])) ? unserialize($templates['value']) : array();\n\n $reload = array();\n\n if (!empty($templates) && is_array($templates)) {\n if (!empty($templates['slider']) && is_array($templates['slider'])) {\n foreach ($templates['slider'] as $key => $temp) {\n $file = PS_CONTENT_DIR . $this->templates_path . $temp['img'];\n\n if (!file_exists($file)) {\n $image_data = @Tools::file_get_contents(\n $this->templates_url . $this->templates_server_path . $temp['img']\n );\n\n if ($image_data !== false) {\n $reload[$temp['alias']] = true;\n @mkdir(dirname($file));\n @file_put_contents($file, $image_data);\n }\n }\n }\n }\n\n if (!empty($templates['slides']) && is_array($templates['slides'])) {\n foreach ($templates['slides'] as $key => $temp) {\n foreach ($temp as $k => $tvalues) {\n $file = PS_CONTENT_DIR . $this->templates_path . '/' . $tvalues['img'];\n\n if (!file_exists($file)) {\n $image_data = @Tools::file_get_contents(\n $this->templates_url . $this->templates_server_path . $tvalues['img']\n );\n\n if ($image_data !== false) {\n @mkdir(dirname($file));\n @file_put_contents($file, $image_data);\n }\n }\n }\n }\n }\n }\n }", "public function run()\n {\n $images = glob(Applicant::getImageDirectory().'/*');\n foreach($images as $image){\n if (file_exists($image)) {\n unlink($image);\n }\n }\n Applicant::truncate();\n Applicant::factory(20)->create();\n }", "public function run()\n {\n $imagepaths = Storage::allFiles();\n unset ($imagepaths[0], $imagepaths[1]);\n\n do {\n $img = array_shift($imagepaths);\n $img = new ImagesModel(['path' => explode('/', $img)[1]]);\n $img->save();\n }\n while ($imagepaths);\n }", "function MoveImages($root,$oldname,$usrid,$dummy=false,$innerfolder='')\n\t{\n\t$folder = $root .$usrid.$innerfolder.'/';\n\t$finalname = $folder.'normal.jpg';\n\n\tif(preg_match('/[.]/', $folder)) die();\n\n\tif(!file_exists($folder))\n\t\tmkdir($folder, 0777,true);\n\n\t$ext_arr = split(\"\\.\",$form->image);\n\t$ext = strtolower($ext_arr[count($ext_arr)-1]); //Get the last extension\n\n\trequire('../lib/resize.php');\n\tif ($ext=='png')//if png convert it to jpg\n\t\t{\n\t\t$input = imagecreatefrompng($oldname);\n\t\tlist($width, $height) = getimagesize($oldname);\n\t\t$output = imagecreatetruecolor($width, $height);\n\t\t$white = imagecolorallocate($output, 255, 255, 255);\n\t\timagefilledrectangle($output, 0, 0, $width, $height, $white);\n\t\timagecopy($output, $input, 0, 0, 0, 0, $width, $height);\n\t\timagejpeg($output,$finalname);\n\t\tunlink($oldname);\n\n\t\t//create thumbnail and regular size\n\t\t$image = new SimpleImage();\n\t\t$image->load($finalname);\n\t\t$image->resize(264,264);\n\n\t\t$image2 = new SimpleImage();\n\t\t$image2->load($finalname);\n\t\t$image2->resize(22,22);\n\n\t\t$image3 = new SimpleImage();\n\t\t$image3->load($finalname);\n\t\t$image3->resize(224,224);\n\n\t\t$image->save($folder.'medium.jpg');\n\t\t$image2->save($folder.'mini.jpg');\n\t\t$image3->save($folder.'small.jpg');\n\t\t}\n\t\telse\n\t\t{\n\t\tcopy($oldname,$finalname);\n\t\tif ($dummy!=true)\n\t\t\tunlink($oldname);\n\t\t//create thumbnail and regular size\n\t\t$image = new SimpleImage();\n\t\t$image->load($finalname);\n\t\t$image->resize(264,264);\n\n\t\t$image2 = new SimpleImage();\n\t\t$image2->load($finalname);\n\t\t$image2->resize(22,22);\n\n\t\t$image3 = new SimpleImage();\n\t\t$image3->load($finalname);\n\t\t$image3->resize(224,224);\n\n\t\t$image->save($folder.'medium.jpg');\n\t\t$image2->save($folder.'mini.jpg');\n\t\t$image3->save($folder.'small.jpg');\n\t\t}\n\t}", "function new_resize_images(){\n\n\t\t\tglobal $db;\n\t\t\t$select = ' SELECT * FROM fs_products WHERE id <= 500';\n//\t\t\t$select = ' SELECT * FROM fs_products WHERE id < 1500 AND id >=1000';\n\t\t\t$sql = $db->query($select);\n\t\t\t\n\t\t\t$list = $db->getObjectList();\n\t\t\t\n\t\t\t$arr_img_paths = array(array('resized',141,197,'resized_not_crop'),array('large',251,350,'resized_not_crop'));\n\t\t\t$fsFile = FSFactory::getClass('FsFiles','');\n\t\t\tfor($i = 0; $i < count($list) ; $i ++){\n\t\t\t\t$item = $list[$i]; \n\t\t\t\t$image = PATH_BASE.str_replace('/',DS,$item -> image);\n//\t\t\t\t$fsFile -> create_folder($folder_image_destination);\n//\t\t\t\tif(!$fsFile -> copy_file($folder_image_begin.$image,$folder_image_destination.$image))\n//\t\t\t\t\tcontinue;\n\t\t\t\tforeach($arr_img_paths as $path){\n\t\t\t\t\t$path_resize = str_replace(DS.'original'.DS, DS.$path[0].DS, $image);\n//\t\t\t\t\t$fsFile -> create_folder($path_resize);\n\t\t\t\t\t$method_resize = $path[3]?$path[3]:'resized_not_crop';\n//\t\t\t\t\t$fsFile -> remove_file_by_path($path_resize);\n\t\t\t\t\tif(!$fsFile ->$method_resize($image, $path_resize,$path[1], $path[2])){\n\t\t\t\t\t\techo $item->id.'_';\n\t\t\t\t\t}\n//\t\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function MoveImages($root,$oldname,$usrid,$dummy=false,$innerfolder='')\n\t{\n\t$folder = $root .$usrid.$innerfolder.'/';\n\t$finalname = $folder.'normal.jpg';\n\t\n\tif(preg_match('/[.]/', $folder)) die();\n\n\tif(!file_exists($folder)) \n\t\tmkdir($folder, 0777,true);\n\n\t$ext_arr = split(\"\\.\",$form->image);\n\t$ext = strtolower($ext_arr[count($ext_arr)-1]); //Get the last extension\n\n\trequire('resize.php');\n\tif ($ext=='png')//if png convert it to jpg\n\t\t{\n\t\t$input = imagecreatefrompng($oldname);\n\t\tlist($width, $height) = getimagesize($oldname);\n\t\t$output = imagecreatetruecolor($width, $height);\n\t\t$white = imagecolorallocate($output, 255, 255, 255);\n\t\timagefilledrectangle($output, 0, 0, $width, $height, $white);\n\t\timagecopy($output, $input, 0, 0, 0, 0, $width, $height);\n\t\timagejpeg($output,$finalname);\n\t\tunlink($oldname);\n\n\t\t//create thumbnail and regular size\n\t\t$image = new SimpleImage();\n\t\t$image->load($finalname);\n\t\t$image->resize(264,264);\n\t\t\n\t\t$image2 = new SimpleImage();\n\t\t$image2->load($finalname);\n\t\t$image2->resize(22,22);\n\n\t\t$image3 = new SimpleImage();\n\t\t$image3->load($finalname);\n\t\t$image3->resize(224,224);\n\n\t\t$image->save($folder.'medium.jpg');\n\t\t$image2->save($folder.'mini.jpg');\n\t\t$image3->save($folder.'small.jpg');\n\t\t}\n\t\telse\n\t\t{\n\t\tcopy($oldname,$finalname);\n\t\tif ($dummy!=true)\n\t\t\tunlink($oldname);\n\t\t//create thumbnail and regular size\n\t\t$image = new SimpleImage();\n\t\t$image->load($finalname);\n\t\t$image->resize(264,264);\n\t\t\n\t\t$image2 = new SimpleImage();\n\t\t$image2->load($finalname);\n\t\t$image2->resize(22,22);\n\n\t\t$image3 = new SimpleImage();\n\t\t$image3->load($finalname);\n\t\t$image3->resize(224,224);\n\n\t\t$image->save($folder.'medium.jpg');\n\t\t$image2->save($folder.'mini.jpg');\n\t\t$image3->save($folder.'small.jpg');\n\t\t}\n\t}", "public function loadImages()\n {\n foreach ($this->images as $oldPath => $newPath){\n $p = base_path($newPath);\n\n if(!file_exists($p)) {\n \\File::copy(__DIR__ . '/../views/' . $oldPath, $p);\n }\n }\n }", "public function callResizeImagesInsideUploadFolder(){\n\n $this->resizeImagesInsideUploadFolder(public_path().'/uploads/pix');\n\n\n\n }", "function resetDirectories($db){\n $useridquery = \"SELECT userid, pPicture, bPicture FROM Users\";\n $userids = $db->fetchQuery($useridquery);\n $curdirs = glob(\"../images/Users/*\" , GLOB_ONLYDIR);\n //Delete Directories not in users table\n foreach($curdirs as $i){\n $erase = true;\n $dirnum = str_replace('../images/Users/', '' , $i);\n // echo $i .'</br>';\n // echo $dirnum .'</br>';\n foreach($userids as $id){\n if(!$erase){\n continue;\n }\n if($dirnum == $id['userid']){\n $erase = false;\n continue;\n }\n }\n if($erase){\n echo \"Delete Directory \". $dirnum. '</br>';\n $it = new RecursiveDirectoryIterator($i, RecursiveDirectoryIterator::SKIP_DOTS);\n $files = new RecursiveIteratorIterator($it,\n RecursiveIteratorIterator::CHILD_FIRST);\n foreach($files as $file) {\n if ($file->isDir()){\n rmdir($file->getRealPath());\n } else {\n unlink($file->getRealPath());\n }\n }\n rmdir($i);\n }\n }\n // Add new Directories in User Table\n foreach($userids as $id){\n $add = true;\n foreach($curdirs as $i){\n if(!$add){\n continue;\n }\n $dirnum = str_replace('../images/Users/', '' , $i);\n if($id['userid'] == $dirnum){\n $add = false;\n continue;\n }\n }\n if($add){\n mkdir(getRoot().\"images/Users/\".$id['userid'] );\n mkdir(getRoot().\"images/Users/\".$id['userid'].\"/Profile\" );\n mkdir(getRoot().\"images/Users/\".$id['userid'].\"/Banner\" );\n mkdir(getRoot().\"images/Users/\".$id['userid'].\"/Uploads\" );\n copy(getRoot().\"images/icons/defaultProfile.jpg\" , getRoot().\"images/Users/\".$id['userid'].\"/Profile/\".$id['pPicture']);\n copy(getRoot().\"images/icons/defaultBanner.png\" , getRoot().\"images/Users/\".$id['userid'].\"/Banner/\".$id['bPicture']);\n }\n }\n }", "function admin_clear_thumbnail_cache($folder_name=null) {\n \t$this->autoRender = false;\n \tif($folder_name[0] == '.') { $folder_name = null; return false; } // don't something like ../other-folder be passed, even though htaccess would catch and it wouldn't even get here, if code somewhere calls it.\n \t$cycle_images_folder = new Folder(WWW_ROOT.'cycle_images');\n \tif(empty($folder)) {\n\t \t$contents = $cycle_images_folder->read();\n\t \tforeach($contents[0] as $folder) {\n\t \t\t// Might as well do a final check to ensure it's really a folder just to be safe also don't remove the \"thumb\" folder, it's been put there by meio upload and it's not being used. There's nothing in it anyway.\n\t \t\tif((is_dir(WWW_ROOT.'cycle_images'.DS.$folder)) && ($folder != 'thumb')) {\n\t \t\t\t$cycle_images_folder->delete(WWW_ROOT.'cycle_images'.DS.$folder);\n\t \t\t}\n\t \t}\n \t} else {\n \t\t// Ensure it's a directory, don't let files be removed\n \t\tif(is_dir(WWW_ROOT.'cycle_images'.DS.$folder_name)) {\n \t\t\t$cycle_images_folder->delete(WWW_ROOT.'cycle_images'.DS.$folder_name);\n \t\t}\n \t} \n \tclearCache('cycles', 'views', ''); // Elements need to be cleared too in order to run PHP to regenerate new thumbnails\n \t$this->redirect(array('action' => 'index'));\n }", "public function generate() {\n\t\tif ($this->noSets()) {\n\t\t\treturn;\n\t\t}\n\t\t$this->deleteDbRecords('item');\n\t\ttry {\n\t\t\t$this->files->generateCacheFolder('items');\n\t\t\t$this->generateImages();\n\t\t}\n\t\tcatch (Exception $e) {\n echo 'Image cannot be generated. Caught exception: ', $e->getMessage(), \"\\n\";\n }\n\n\t}", "function maxImageUpload(){\r\n \r\n if (!file_exists($this->baseDir)) {\r\n if (!@mkdir($this->baseDir)){\r\n $this->baseDir = getcwd();\r\n }\r\n }\r\n \r\n $this->originalDir = $this->baseDir.DIRECTORY_SEPARATOR.$this->originalDir.DIRECTORY_SEPARATOR;\r\n if (!file_exists($this->originalDir)) {\r\n mkdir($this->originalDir);\r\n }\r\n $this->normalDir = $this->baseDir.DIRECTORY_SEPARATOR.$this->normalDir.DIRECTORY_SEPARATOR;\r\n if (!file_exists($this->normalDir)) {\r\n mkdir($this->normalDir);\r\n }\r\n $this->thumbDir = $this->baseDir.DIRECTORY_SEPARATOR.$this->thumbDir.DIRECTORY_SEPARATOR;\r\n if (!file_exists($this->thumbDir)) {\r\n mkdir($this->thumbDir);\r\n }\r\n }", "function createParcialBackupFolder_images(){\n $ID_User=$this->session->idusu;\n $Fname=date(\"d:m:Y H:i:s\").\"-\".$ID_User.\"-\".\"images\";\n mkdir(\"./backups/$Fname\");\n\n $this->generateImagesJson($Fname);\n $this->setImagesOnBackup($Fname);\n}", "function cleanUpImagesLocal() {\n\n\tglobal $config;\n\n\ttry {\n\t\t// Indicate the time right now\n\t\t$now = new DateTime();\n\n\t\t// Get all of the items in the local directory\n\t\t$items = scandir($config['CAM_STORAGE_DIRECTORY']);\n\n\t\t// Iterate through all the items\n\t\tforeach ($items as $item) {\n\t\t\n\t\t\t$filename = $config['CAM_STORAGE_DIRECTORY'] . \"/\" . $item;\n\n\t\t\t// Make sure its a jpg file\n\t\t\tif (substr($item,-4) == \".jpg\") {\n\n\t\t\t\t// Calculate the time difference\n\t\t\t\t$timediff = $now->getTimeStamp() - filemtime($filename);\n\t\t\t\tlog_debug(\"Checking item \" . $filename . \" - time difference \" . $timediff);\n\t\t\n\t\t\t\t// If the difference between now and the file's timestamp is more than the retention period hours\n\t\t\t\tif ($timediff > ($config['CAM_RETENTION_TIME_HOURS'] * 60 * 60)) {\n\t\t\t\t\tunlink($filename);\n\t\t\t\t\tlog_info(\"Removed: \" . $filename);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tcatch (Exception $e) {\n\t\tlog_error(\"Could not remove old file from local directory. Error message: \" . $e->getMessage());\n\t}\n}", "public function updateImages()\n\t{\n\t\t$filename = 'option';\n\t\t/* get the sku */\n\t\t$sku = htmlspecialchars($_POST['sku']);\n\n\t\t/* Setting the directory */\n\t\t$directory = \"../img/product-images/$sku\";\n\n\t\t/* Using the method */\n\t\t\t\t\t\n\t\t$this->UploadFileOop($filename, $directory, $sku);\n\t\t\n\t}", "public static function maybe_regenerate_images()\n {\n }", "function cleanUpImages() {\n\n\tglobal $config;\n\tlog_debug(\"Attempting to remove files older than \" . $config['CAM_RETENTION_TIME_HOURS'] . \" hours\");\n\n\tif ($config['CAM_STORAGE_METHOD'] == \"seafile\") {\n\t\tcleanUpImagesSeafile();\n\t}\n\telse {\n\t\tcleanUpImagesLocal();\n\t}\n}", "private function manageProductImages()\n\t{\n\t\t$max = 0;\n\t\tforeach (scandir(_PS_PROD_IMG_DIR_) as $dir)\n\t\t{\n\t\t\t$matches = array();\n\t\t\tpreg_match('/^'.intval($this->_urlSegment[2]).'-(\\d+)\\.jpg*$/Ui', $dir, $matches);\n\t\t\tif (isset($matches[1]))\n\t\t\t\t$max = max($max, (int)($matches[1]));\n\t\t}\n\t\t$this->_productImageDeclinationId = $max++; \n\t\t$this->manageDeclinatedImages(_PS_PROD_IMG_DIR_);\n\t}", "public function deleteImages() {\n\n // Delete all fullsize images for this Sortiment\n foreach (glob( SORTIMENT_IMAGE_PATH . \"/\" . IMG_TYPE_FULLSIZE . \"/\" . $this->id . \".*\") as $filename) {\n if ( !unlink( $filename ) ) trigger_error( \"Sortiment::deleteImages(): Couldn't delete image file.\", E_USER_ERROR );\n }\n \n // Delete all thumbnail images for this Sortiment\n foreach (glob( SORTIMENT_IMAGE_PATH . \"/\" . IMG_TYPE_THUMB . \"/\" . $this->id . \".*\") as $filename) {\n if ( !unlink( $filename ) ) trigger_error( \"Sortiment::deleteImages(): Couldn't delete thumbnail file.\", E_USER_ERROR );\n }\n\n // Remove the image filename extension from the object\n $this->imageExtension = \"\";\n }", "private function addImages( ) {\n\t if( Yii::app( )->user->hasState( 'images' ) ) {\n\t $userImages = Yii::app( )->user->getState( 'images' );\n\t $model = Yii::app( )->user->getState( 'model' );\n\t $foreign_id = Yii::app( )->user->getState( 'foreign_id' );\t//esto está mal porque getState(foreign_id) me da null\n\t \n\t /*Si pongo esto funciona bien con el logo de la empresa pero si estoy \t poniendo una imagen a una promocion, el foreign_id del item me pone el \n\t id de la empresa, en lugar del id de la promocion: */\n\t //$foreign_id = $this->loadUser()->empresa->id; \n\t //$foreign_id = $model->id;\n\t //Resolve the final path for our images\n\t //$path = Yii::app( )->getBasePath( ).\"/../uploads/images/\";\t \n\t \t$path = realpath( Yii::app( )->getBasePath( ).\"/../uploads/images\" ).\"/\";\n\t //Create the folder and give permissions if it doesnt exists\n\t if( !is_dir( $path ) ) {\n\t mkdir( $path );\n\t chmod( $path, 0777 );\n\t }\n\t $image = $userImages[0];\n\t \n\t //Now lets create the corresponding models and move the files\n\t /*foreach( $userImages as $image ) {*/\n\t if( is_file( $image[\"path\"] ) ) {\n\t if( rename( $image[\"path\"], $path.$image[\"filename\"] ) ) {\n\t chmod( $path.$image[\"filename\"], 0777 );\n\t $img = new Item( );\n\t $img->name = $image[\"name\"];\n\t $img->tipo = $image[\"mime\"];\n\t $img->thumb = 1;\n\t $img->filename = $image[\"filename\"];\n\t $img->size = $image[\"size\"];\n\t $img->path = \"/uploads/images/\".$image[\"filename\"];\n\t //$img->path = \"/uploads/images/{$this->id}/\".$image[\"filename\"];\n\t $img->foreign_id = $foreign_id;\n\t $img->model = $model;\n\t $img->attribute = 'file';\n\t /*$objDateTime = new DateTime('NOW');\n\t $img->created = $objDateTime;\n\t $img->modified = $objDateTime;*/\n\t \n\t if( !$img->save(false) ) {\n\t //Its always good to log something\n\t Yii::log( \"Could not save Image:\\n\".CVarDumper::dumpAsString( \n\t $img->getErrors( ) ), CLogger::LEVEL_ERROR,\"\" );\n Yii::trace(CVarDumper::dumpAsString($img->getErrors( )),'vardump');\n\t \n\t //this exception will rollback the transaction\n\t throw new Exception( 'Could not save Image');\n\t }else{\n\t \t//echo \"Imagen guardada\";\n\t }\n\t }\n\t } else {\n\t //You can also throw an execption here to rollback the transaction\n\t Yii::log( $image[\"path\"].\" is not a file\", CLogger::LEVEL_WARNING );\n\t }\n\t //}\n\t //Clear the user's session\n\t Yii::app( )->user->setState( 'images', null );\n\t }\n\t}", "function processImages() {\n\n\tglobal $config, $image_manager, $clean_interval_start_time, $encryption_interval_start_time;\n\n\t// Retrieve all the images into an array\n\t$image_list = retrieveImages();\n\t\n\t// Composite the images together in a grid\n\t$dest_image = compositeImages($image_list);\n\t\n\t// Save the composite image \n\tsaveImage($dest_image);\n\n\t// Remove old files if needed\n\tif ( (microtime(true) - $clean_interval_start_time) > ($config['CAM_CLEAN_TIME_MINS'] * 60) ) {\n\t\tlog_debug(\"Cleaning old files\");\n\t\t$clean_interval_start_time = microtime(true);\n\t\tcleanUpImages();\t\n\t}\n\n\t// If our storage method was seafile, then attempt to renew the decryption according to the configuration\n\tif ($config['CAM_STORAGE_METHOD'] == \"seafile\") {\n\t\tif ( (microtime(true) - $encryption_interval_start_time) > ($config['CAM_SEAFILE_ENCRYPT_TIMEOUT_MINS'] * 60) ) {\n\t\t\tlog_info(\"Requesting library decryption\");\n\t\t\t$encryption_interval_start_time = microtime(true);\n\t\t\tdecryptSeafileLibrary();\t\n\t\t}\n\t}\n}", "function init_new_images(){\n\t\tdie(\"You're not Authorize to access this page\");\n\t\n\t\t$folders = glob('C:/Users/Paulo/Pictures/Additional Pics NCS/*', GLOB_BRACE);\n\n\t\t$data = array();\n\t\t$i=0;\n\t\tforeach($folders as $fdr){\n\t\t\t$folderImages = glob($fdr.'/*.{jpg,JPG}', GLOB_BRACE);\n\t\t\t\n\t\t\tif(!empty($folderImages)){\n\t\t\t\t\n\t\t\t\tforeach($folderImages as $images){\n\t\t\t\t\t$img = explode(\"/\",$images);\n\t\t\t\t\t$data[$i++]['Image']['img_path'] = $img[5].'/'.$img[6];\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t//pr($data);exit;\n\t\t//$this->Image->create();\n\t\tif ($this->Image->saveAll($data)) {\n\t\t\t$data['status'] = 1;\n\t\t\t$data['message'] = 'Saved!';\n\t\t\techo json_encode($data);\n\t\t\texit;\n\t\t}else{\n\t\t\t$data['status'] = 0;\n\t\t\t$data['message'] = 'Error!';\n\t\t\techo json_encode($data);\n\t\t\texit;\n\t\t}\n\t}", "function ExecuteUploadAdminSectionImages(){\n\n\t\t# Set varibles ready to deal with file upload - count, array, basename, temp and final name and path \n\t\t$this->TOTAL \t\t=\tcount($_FILES['ADMIN_PUMP_IMAGE']['name']);\n\t\t$this->IMAGE_ARRAY \t= \tarray();\n\t\t$this->RAND \t\t=\tmt_rand(1,1100000);\n\t\t$this->BASENAME \t=\tbasename($this->RAND);\n\n\t\t# process each $_FILE input and process to upload \n\t\tfor($i=0; $i < $this->TOTAL; $i++) {\n \t\t\t\n \t\t\t# file naming and path\n \t\t\t$this->FILE_PATH \t\t=\t$_FILES['ADMIN_PUMP_IMAGE']['tmp_name'][$i];\n \t\t\t$this->FILE_NAME \t\t= \t$this->BASENAME.$_FILES['ADMIN_PUMP_IMAGE']['name'][$i];\n\t\t\t$this->NEW_FILE_PATH\t=\t$_SERVER['DOCUMENT_ROOT'].\"/images/productImages/\".$this->FILE_NAME;\n\t\t\t$this->IMAGE_ARRAY[] \t= \t$this->FILE_NAME;\n\n \t\t# do file upload\n \t\tmove_uploaded_file($this->FILE_PATH, $this->NEW_FILE_PATH);\n\t\t}\n\n\t\t# execute function to update database with new images - upto 10 images per entry\n\t\t$this->ExecuteInsertAdminSectionImages();\n\t}", "protected final function create_image_tree()\n {\n // Full directory structure for images and thumbs\n $path = $this->get_image_path() . MODEL_THUMBS; \n \n // Creation attemp or die\n if(!is_dir($path))\n if(!FileSystem::create_tree($path)) \n trigger_error('I cannot create '. $path .', please check permissions', E_USER_ERROR);\n }", "public function cleanImagesAction()\n {\n try {\n Mage::getModel('catalog/product_image')->clearCache();\n Mage::dispatchEvent('clean_catalog_images_cache_after');\n $this->_getSession()->addSuccess(\n Mage::helper('adminhtml')->__('The image cache was cleaned.')\n );\n }\n catch (Mage_Core_Exception $e) {\n $this->_getSession()->addError($e->getMessage());\n }\n catch (Exception $e) {\n $this->_getSession()->addException(\n $e,\n Mage::helper('adminhtml')->__('An error occurred while clearing the image cache.')\n );\n }\n $this->_redirectreferer();\n }", "public function deleteImgFiles()\n {\n $original_img_file = $this->url;\n // thumbnail\n $thumbnail_img_file = $this->_getThumbnailUrl($original_img_file);\n if ( file_exists(Yii::getAlias('@webroot') . $thumbnail_img_file) ) {\n unlink(Yii::getAlias('@webroot') . $thumbnail_img_file);\n }\n // poster\n $poster_img_file = $this->_getPosterUrl($original_img_file);\n if ( file_exists(Yii::getAlias('@webroot') . $poster_img_file) ) {\n unlink(Yii::getAlias('@webroot') . $poster_img_file);\n }\n // original\n if ( file_exists(Yii::getAlias('@webroot') . $original_img_file) ) {\n unlink(Yii::getAlias('@webroot') . $original_img_file);\n }\n }", "protected function rollbackOrphanImages()\n {\n $files = glob($this->getBackupdir() . DS . 'catalog' . DS . 'product' . DS . '[A-z0-9]' . DS . '[A-z0-9]' . DS . '*');\n $totalFiles = count($files);\n\n if($totalFiles > 0) {\n // create a new progress bar (50 units)\n $progress = new ProgressBar($this->getOutputInterface(), $totalFiles);\n\n foreach($files as $i => $file) {\n $targetFile = str_replace('var/orphans', 'media', $file);\n\n if(is_file($file)) {\n \\Mage::log(\"Restoring file: \" . $file, null, $this->logfile);\n rename($file, $targetFile);\n }\n $progress->advance();\n }\n\n $progress->finish();\n\n $this->getOutputInterface()->writeLn(PHP_EOL);\n\n } else {\n $this->getOutputInterface()->writeLn('<fg=green;options=bold>Nothing to rollback, the rollback directory contains no files!</>');\n }\n }", "public static function create_images($folder_id, $imagesrcname, $images_dir, $image_settings, $image_name, $delete_source=true, $image_ext=\"jpg\", $col_name=\"photo_src\")\n {\n // vytvorim adresar\n $dirpath=str_replace('\\\\', '/',DOCROOT).self::$photos_resource_dir.$images_dir.\"images-\".$folder_id.\"/\";\n if(!file_exists($dirpath)) mkdir($dirpath);\n \n $uploadfile = $dirpath.$image_name.\".\".$image_ext;\n\n if(strpos($imagesrcname, \"/\")!==false)\n {\n // vyjimka - pokud je nazev souboru cesta jde o obrazek jiz nahrany na disku (rozbaleny z archivu zip) - je nutne ho pouze zkopirovat do prislusneho adresare s prislusnym zmenenym nazvem\n if (!copy($imagesrcname, $uploadfile))\n {\n throw new Kohana_Exception(\"Chyba - nemohu přesunout obrázek!\");\n }\n }\n else\n {\n if (!move_uploaded_file($_FILES[$imagesrcname]['tmp_name'], $uploadfile)) {\n throw new Kohana_Exception(\"Chyba - nemohu uložit obrázek!\");// chybova hlaska\n }\n }\n\n $admin_formats = array();\n foreach (self::$admin_photo_formats as $key=>$format)\n {\n $admin_formats[$key] = $format;\n $admin_formats[$key][\"ext\"] = $image_ext;\n }\n //(print_r($image_settings));\n $image_settings=array_merge($admin_formats, $image_settings);\n //die(print_r($image_settings));\n // zmena velikosti a oriznuti nahraneho obrazku\n foreach($image_settings as $photo_suffix=>$settings){\n $image = Image::factory($uploadfile);\n foreach($settings as $setting=>$values){\n $values=explode(\",\", $values);\n switch($setting){\n case \"resize\":\n $image->$setting(isset($values[0])?$values[0]:NULL,isset($values[1])?$values[1]:NULL,isset($values[2])?(eval(\"return \".$values[2].\";\")):NULL);\n break;\n case \"crop\":\n $image->$setting($values[0],$values[1],isset($values[2])?$values[2]:NULL, isset($values[3])?(eval(\"return \".$values[2].\";\")):NULL);\n break;\n case \"rotate\":\n case \"flip\":\n case \"sharpen\":\n case \"quality\":\n $image->$setting($values);\n break;\n case \"watermark\":\n // pred kopirovanim vodoznaku se obrazek musi ulozit - jinak nefunguje\n// $image->save(str_replace('\\\\', '/',DOCROOT).$resource_directory.\"/\".$images_dir.\"-\".$data[\"photo_category_id\"].\"/img-\".$post[\"id\"].\"-$photo_name\".\".\".(string)(isset($settings[\"ext\"])?$settings[\"ext\"]:$ext));\n// $image = new Image(str_replace('\\\\', '/',DOCROOT).$resource_directory.\"/\".$images_dir.\"-\".$data[\"photo_category_id\"].\"/img-\".$post[\"id\"].\"-$photo_name\".\".\".(string)(isset($settings[\"ext\"])?$settings[\"ext\"]:$ext));\n// $image->watermark(new Image(str_replace('\\\\', '/',DOCROOT).$resource_directory.\"/\".$values),20);\n break;\n case \"ext\": // pripona v nastaveni bere prednost pred priponou uploadnuteho obrazku (jinak pripona uploadu=pripona transformovaneho a ulozeneho)\n $image_ext=$values[0];\n break;\n }\n\n }\n\n // defaultni nastaveni kvality\n $quality=isset($settings[\"quality\"])?$settings[\"quality\"]:self::$default_photo_quality;\n\n $image->save($dirpath.\"/\".$image_name.\"-\".$photo_suffix.\".\".$image_ext, $quality);\n }\n\n\n // smazani zdrojoveho obrazku\n if($delete_source) @unlink($uploadfile);\n\n return true;\n }", "private function uploadDeviceImages(string $uploadPath, $dir) {\n $filePaths = array();\n //Create config for file insertion\n $config['upload_path'] = $uploadPath . $dir['back'] . '/';\n $config['allowed_types'] = 'jpg|png';\n $config['max_size'] = 20000;\n $config['max_width'] = 4000;\n $config['max_height'] = 4000;\n $config['file_name'] = 'back_' . date(\"Y-m-d\") . '_.png'; //Rename dynamically\n\n $this->instance->upload->initialize($config);\n\n try {\n\n //insert file\n if (!$this->instance->upload->do_upload($dir['back'])) {\n $error = $this->instance->upload->display_errors();\n throw new CustomException($error);\n } else {\n $filePaths['back'] = $this->instance->upload->data('full_path'); //full path of saved image\n //create new config for next image\n $config['upload_path'] = $uploadPath . $dir['front'] . '/';\n $config['file_name'] = 'front_' . date(\"Y-m-d\") . '_.png'; //Rename dynamically\n\n $this->instance->upload->initialize($config);\n\n //insert file\n if (!$this->instance->upload->do_upload($dir['front'])) {\n $error = $this->instance->upload->display_errors();\n unlink($filePaths['back']); //remove back image\n throw new CustomException($error);\n } else {\n $filePaths['front'] = $this->instance->upload->data('full_path'); //full path of saved image\n //create new config for next image\n $config['upload_path'] = $uploadPath . $dir['on'] . '/';\n $config['file_name'] = 'on_' . date(\"Y-m-d\") . '_.png'; //Rename dynamically\n $this->instance->upload->initialize($config);\n\n //insert file\n if (!$this->instance->upload->do_upload($dir['on'])) {\n $error = $this->instance->upload->display_errors();\n //remove back and front images\n unlink($filePaths['back']);\n unlink($filePaths['front']);\n throw new CustomException($error);\n } else {\n $filePaths['on'] = $this->instance->upload->data('full_path'); //full path of saved image\n }\n }//End second upload\n } //End first\n\n return $filePaths;\n } catch (CustomException $e) {\n $exception['exception'] = $e->getUploadError(\"Sorry, there was a problem saving the images.\");\n return $exception;\n }\n }", "private function SetImagesFolder() {\n try {\n $this->ImagesFolder = 'comics/' . $this->Id;\n if (!file_exists($this->ImagesFolder)) {\n mkdir($this->ImagesFolder, 0777, true);\n }\n } catch (Exception $e) {\n throw new Exception(\"<br>Error during the creation of the comic image folder : \" . $e->getMessage());\n }\n }", "public function resizeImagesInsideUploadFolder($dir){\n\n \n\n // scan the folder and sub folder using RecursiveDirectoryIterator\n\n $di = new RecursiveDirectoryIterator($dir);\n foreach (new RecursiveIteratorIterator($di) as $filename => $file) {\n echo $filename . ' - ' . $file->getSize() . ' bytes <br/>';\n\n //$this->compress_image($filename, $filename, 80);\n\n if (@getimagesize($filename)) { \n echo \"<br/>file exist\";\n $this->compress_image($filename, $filename, 85);\n }\n\n echo \"STATUS : OK\";\n\n\n }\n\n }", "function genesis_extender_delete_images( $dir )\r\n{\r\n\t$handle = opendir( $dir );\r\n\twhile( false !== ( $file = readdir( $handle ) ) )\r\n\t{\r\n\t\t$ext = strtolower( substr( strrchr( $file, '.' ), 1 ) );\r\n\t\tif( $ext == 'jpg' || $ext == 'jpeg' || $ext == 'gif' || $ext == 'png' )\r\n\t\t{\r\n\t\t\tunlink( $dir . '/' . $file );\r\n\t\t}\r\n\t}\r\n\tclosedir( $handle );\r\n}", "public function deleteImages() {\n \n // Delete all fullsize images for this media\n foreach (glob( MEDIA_IMAGE_PATH . \"/\" . IMG_TYPE_FULLSIZE . \"/\" . $this->mediaId . \".*\") as $filename) {\n if ( !unlink( $filename ) ) trigger_error( \"Media::deleteImages(): Couldn't delete image file.\", E_USER_ERROR );\n }\n \n // Delete all thumbnail images for this media\n foreach (glob( MEDIA_IMAGE_PATH . \"/\" . IMG_TYPE_THUMB . \"/\" . $this->mediaId . \".*\") as $filename) {\n if ( !unlink( $filename ) ) trigger_error( \"Media::deleteImages(): Couldn't delete thumbnail file.\", E_USER_ERROR );\n }\n \n // Remove the image filename extension from the object\n $this->mediaImageExtension = \"\";\n }", "public function afterInsert()\n {\n $galleryId = $this->getGalleryId();\n // We have fill form in this request\n // not for another case insert.\n /** @var GalleryTemp $tempInstance */\n $tempInstance = Yii::createObject($this->tempClass);\n $imageIds = $tempInstance::imageIdsFromTemp($this->type, $this->temporaryIndex);\n if ($imageIds) {\n /** @var GalleryImage $instance */\n $instance = Yii::createObject($this->imageClass);\n $instance::updateAll(['ownerId' => $galleryId], ['id' => $imageIds, 'type' => $this->type]);\n $this->_galleryId = $this->tempDirectory;\n foreach ($imageIds as $imageId) {\n //rename only related ids\n $dirPath1 = $this->directory . DIRECTORY_SEPARATOR . $this->_galleryId . DIRECTORY_SEPARATOR . $imageId;\n $dirPath2 = $this->directory . DIRECTORY_SEPARATOR . $galleryId . DIRECTORY_SEPARATOR . $imageId;\n if (is_dir($dirPath1)) {\n $this->createFolders($dirPath2);\n rename($dirPath1, $dirPath2);\n }\n }\n }\n $this->_lastEvent = 'afterInsert';\n }", "public function updateFileNames()\n\t{\n\t\t\n\t\tsleep(2);\n\t\t/* Post */\n\t\t$sku = $_POST['sku'];\t\t\n\t\t\n\t\t$directory = \"../img/product-images/$sku/\";\n\t\t\n\t\t\n\t\t\n\t\tif(is_dir($directory))\n\t\t{\n\t\t\t/* Scan the directory */\n\t\t\t$scan = scandir($directory);\n\n\t\t\t/* Remove the tow index */\n\t\t\t$rtu = array_splice($scan, 2);\n\n\n\n\t\t\t/* Get the connection */\n\t\t\t$connection = $this->DBConfiguration();\n\n\t\t\t/* select databae */\n\t\t\t$db = $connection->kettyclothing;\n\t\t\t//$dcollection = $db->kettyclothingdb;\n\t\t\t\n\t\t\t//$find1 = $dcollection->find();\n\t\t\t\n\t\t\n\n\t\t\t/* select databae */\n\t\t\t$collection = $db->product_images;\n\t\t\t\n\t\t\t/* Remove old one */\n\t\t\t\n\t\t\t$findimg = $collection->find();\n\t\t\t\n\t\t\t$gii = '';\n\t\t\t/* Get the id by match */\n\t\t\tforeach($findimg as $key => $value)\n\t\t\t{\n\t\t\t\t\n\t\t\t\tforeach($value as $k => $v)\n\t\t\t\t{\n\t\t\t\t\tif($k == $sku)\n\t\t\t\t\t{\n\t\t\t\t\t\t$gii = $value['_id'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t\tif($gii == new MongoId($gii))\n\t\t\t{\t\t\t\t\n\n\t\t\t\t$collection->update(array('_id'=> new MongoId($gii)), array('$set' => array(\"$sku\"=>$rtu)));\n\t\t\t\n\t\t\t\techo \"<div class = 'note alert-success'><p>Product update sucessfully.</p></div>\";\n\t\t\t\n\t\t\t\treturn;\n\t\t\t}\t\t\n\t\t\t\n\t\t\t/* Upload to the server */\n\t\t\t\n\t\t}\n\t}", "function galleryImagePublishProcess($domain_id)\r\n {\r\n global $CFG;\r\n $temp_gallery_val = $this->getGalleryImagesValue($domain_id,$CFG['table']['temp_gallery_images']);\r\n $main_gallery_val = $this->getGalleryImagesValue($domain_id,$CFG['table']['gallery_images']);\r\n \r\n $temp_gallery_imgid=array();\r\n foreach($temp_gallery_val as $temp=>$value)\r\n {\r\n $temp_gallery_imgid[] = $temp_gallery_val[$temp]['gallery_id'];\r\n } \r\n //print_r($temp_gallery_imgid); \r\n #unlink th images\r\n foreach($main_gallery_val as $main=>$value)\r\n {\r\n if( is_array($temp_gallery_imgid) && !in_array($main_gallery_val[$main]['gallery_id'],$temp_gallery_imgid) )\r\n {\r\n $deletimage_id.= $main_gallery_val[$main]['gallery_id'].\",\"; \r\n @unlink($CFG['site']['photo_domain_image_path'].'/'.$main_google_val[$main]['gallery_name']); \r\n }\r\n } \r\n //echo $deletimage_id;die(); \r\n #delete the images \r\n if($deletimage_id != '')\r\n {\r\n $deletimage_id = substr($deletimage_id,0,-1);\r\n $sql_delete=\"DELETE FROM \".$CFG['table']['gallery_images'].\" WHERE domain_id = '\".$this->filterInput($domain_id).\"' AND gallery_id IN (\".$deletimage_id.\") \";\r\n $UpResult = mysql_query($sql_delete) or die($this->mysql_error($sql_delete));\r\n } \r\n #insert temp to main table\r\n foreach($temp_gallery_val as $sub=>$value)\r\n {\r\n if($temp_gallery_val[$sub]['publish_status'] == 'U')\r\n {\r\n $upd_qry = \" INSERT INTO \".$CFG['table']['gallery_images'].\" SET \".\r\n \" gallery_id = '\".$this->filterInput($temp_gallery_val[$sub]['gallery_id']).\"', \".\r\n \" page_id = '\".$this->filterInput($temp_gallery_val[$sub]['page_id']).\"', \".\r\n \" domain_id = '\".$this->filterInput($temp_gallery_val[$sub]['domain_id']).\"',\".\r\n \" page_list_id = '\".$this->filterInput($temp_gallery_val[$sub]['page_list_id']).\"',\".\r\n \" gallery_name = '\".$this->filterInput($temp_gallery_val[$sub]['gallery_name']).\"' ,\".\r\n \" imagelib_id = '\".$this->filterInput($temp_gallery_val[$sub]['imagelib_id']).\"' ,\". \r\n \" gallery_name_thumb = '\".$this->filterInput($temp_gallery_val[$sub]['gallery_name_thumb']).\"' \";\r\n \r\n $res = $this->ExecuteQuery($upd_qry,'insert');\r\n $this->getUpdate($CFG['table']['temp_gallery_images'],\"publish_status = 'N'\",\"gallery_id = '\".$this->filterInput($temp_gallery_val[$sub]['gallery_id']).\"'\");\r\n } \r\n } \r\n }", "function domainImagePublishProcess($domain_id)\r\n {\r\n global $CFG;\r\n $temp_images_val = $this->getDomainImagesValue($domain_id,$CFG['table']['domain_images']);\r\n foreach($temp_images_val as $key=>$value)\r\n {\r\n if($temp_images_val[$key]['temp_image_name']!= $temp_images_val[$key]['image_name'])\r\n { \r\n //@unlink($CFG['site']['photo_domain_image_path'].'/'.$this->filterInput($temp_images_val[$key]['image_name']));\r\n $upd_qry = \" UPDATE \".$CFG['table']['domain_images'].\" SET \".\r\n \" image_name = '\".$this->filterInput($temp_images_val[$key]['temp_image_name']).\"'\".\r\n \" WHERE img_id = '\".$this->filterInput($temp_images_val[$key]['img_id']).\"' \";\r\n $res = $this->ExecuteQuery($upd_qry,'update'); \r\n } \r\n }\r\n }", "function rmgsSavePics(){\r\n\tglobal $xoopsDB, $xoopsUser, $mc;\r\n\t\r\n\t$save_dir = rmgsMakeUserDir($xoopsUser->getVar('uid'));\r\n\t\r\n\tforeach ($_FILES['img']['tmp_name'] as $k => $v){\t\r\n\t\tif ($v != ''){\r\n /**\r\n\t\t * Creamos un nombre nico\r\n\t\t */\r\n\t\t\t$split_name = explode('.',$_FILES['img']['name'][$k]);\r\n\t\t $ext = strrchr($_FILES['img']['name'][$k], \".\");\r\n\t\t\t$ext = strtolower($ext);\r\n\t\t do\r\n\t\t $newname = rmgsRandomWord(5, $split_name[0].'_') . $ext;\r\n\t\t while (file_exists($save_dir . '/' . $newname));\r\n\t\t\r\n\t\t /**\r\n\t\t * Almacenamos la imgen\r\n\t\t */\r\n\t\t if (move_uploaded_file($v, $save_dir . '/' . $newname)){\r\n\t\t //rmgsMakeFormats($save_dir . '/' , $newname);\r\n rmgsImageResize($save_dir . '/' . $newname,$save_dir . '/' . $newname,$mc['imgwidth'],$mc['imgheight']);\r\n //rmgsImageResize($save_dir . '/' . $newname,$save_dir . '/ths/' . $newname,$mc['thwidth'], $mc['thheight']);\r\n\t\t\t\t\t resize_then_crop($save_dir . '/' . $newname,$save_dir . '/ths/' . $newname,$mc['thwidth'],$mc['thheight'],255,255,255);\r\n\r\n\t\t }\r\n\t\t \r\n\t\t\t/**\r\n\t\t\t * Creamos la nueva imgen\r\n\t\t\t */\r\n\t\t $image = new GSImage();\r\n\t\t \r\n\t\t $image->setVar('title','');\r\n\t\t $image->setVar('file', $newname);\r\n\t\t $image->setVar('uid', $xoopsUser->getVar('uid'));\r\n\t\t $image->setVar('date', time());\r\n\t\t\t$image->setVar('update', time());\r\n\t\t $image->setVar('votes',0);\r\n\t\t $image->setVar('downloads',0);\r\n\t\t if (isset($_POST['cat'])){\r\n \t$image->setVar('categos', $_POST['cat']);\r\n }\r\n $image->setVar('stringkeys', $_POST['keys']);\r\n\t\t\t$image->setVar('minkey',$mc['minkey']);\r\n\t\t\t$image->setVar('maxkey',$mc['maxkey']);\r\n\t\t\t$image->save();\r\n\t\t} \r\n\t}\r\n\tredirect_header('categos.php', 1, _AS_RMGS_IMGOK);\r\n\tdie();\r\n}", "function processImageFiles(){\n\t\t\n\t\t$files = glob('/var/www/t/fileadmin/files/profile_pictures/*'); // get all file names\n\t\tforeach($files as $file){ // iterate files\n \t\t\tif(is_file($file))\n\t\t \tunlink($file); // delete file\n\t\t}\n\n $connection = mysql_connect('localhost','goldg','OwO@B@2r') or die (\"Verbindungsversuch fehlgeschlagen\");\n mysql_select_db('T3_B2CAPPT',$connection);\n mysql_query(\"SET NAMES 'utf8'\");\n mysql_query(\"SET CHARACTER SET 'utf8'\");\n foreach($this->imageStorage AS $key => $value){\n\n //Wenn ein Bild fü Ansprechpartner vorhanden ist (ist dann KEIN Array, sondern ein String), dann Verarbeitung.\n //Ansonsten Rüff auf Default-Bild\n if(!is_array($value['Bild']) && strlen($value['Bild'])){\n $data = base64_decode($value['Bild']);\n\t\t\t\t\n\t\t\t\t\n $md5Image = md5($data);\n if($value['Id']){\n $file = '/var/www/t/fileadmin/files/profile_pictures/profile_' . $value['Id'] .'_'. $md5Image . '_l.jpg';\n $fileClean = 'fileadmin/files/profile_pictures/profile_' . $value['Id'] .'_'. $md5Image;\n\n if(imagejpeg(imagecreatefromstring($data), $file)){\n $this->make_thumb($file,'/var/www/t/fileadmin/files/profile_pictures/profile_' . $value['Id'] .'_'. $md5Image . '_m.jpg',200);\n $this->make_thumb($file,'/var/www/t/fileadmin/files/profile_pictures/profile_' . $value['Id'] .'_'. $md5Image . '_s.jpg',100);\n };\n\n\n $updateQuery = 'UPDATE tx_agrarapp_profiles SET picture = \"fileadmin/files/profile_pictures/profile_'. $value['Id'] .'_'. $md5Image .'\" WHERE baywaid = '. $value['Id'];\n\n mysql_query($updateQuery);\n }\n }else{\n\n if($value['Id']){\n $file = '/var/www/t/fileadmin/files/profile_pictures/profile_' . $value['Id'] . '_l.jpg';\n $fileClean = 'fileadmin/files/profile_pictures/profile_' . $value['Id'];\n //unlink($file);\n if(imagejpeg(imagecreatefromjpeg('/var/www/t/fileadmin/files/misc/fallback_contact_image.jpg'), $file)){\n $this->make_thumb($file,'/var/www/t/fileadmin/files/profile_pictures/profile_' . $value['Id'] . '_l.jpg',400);\n $this->make_thumb($file,'/var/www/t/fileadmin/files/profile_pictures/profile_' . $value['Id'] . '_m.jpg',200);\n $this->make_thumb($file,'/var/www/t/fileadmin/files/profile_pictures/profile_' . $value['Id'] . '_s.jpg',100);\n };\n }\n }\n\n }\n\n mysql_close($connection);\n\n }", "function recreateImage()\n {\n $this->watchdog->logBacktraceMessage(\"Recreating image\");\n $thumb=imagecreatetruecolor(IMAGE_WIDTH,IMAGE_HEIGHT);\n $this->watchdog->logBacktraceMessage(\"Canvas created\");\n if($this->mimeType[strtolower($this->mediaData['mime'])]==\"jpeg\")\n {\n $src=imagecreatefromjpeg($this->media['tmp_name']);\n }\n else if($this->mimeType[strtolower($this->mediaData['mime'])]==\"png\")\n {\n $src=imagecreatefrompng($this->media['tmp_name']);\n }\n else if($this->mimeType[strtolower($this->mediaData['mime'])]==\"gif\")\n {\n $src=imagecreatefromgif($this->media['tmp_name']);\n }\n else\n {\n\n $this->watchdog->logBacktraceMessage(\"Incompatible format received for image recreation in module recreateImage\");\n return false;\n }\n\n if(imagecopyresized($thumb,$src,0,0,0,0,IMAGE_WIDTH,IMAGE_HEIGHT,$this->mediaData['width'],$this->mediaData['height'])==TRUE)\n {\n $this->watchdog->logBacktraceMessage(\"Image recreated from specified format\");\n $this->filePath=$this->uploadPath.DS.md5(date(\"Y-m-d H:i:s\")).\"_\".str_replace(' ','',$this->media['name']).'.jpg';\n if(imagejpeg($thumb,$this->filePath)==TRUE)\n {\n $this->watchdog->logBacktraceMessage(\"Image created\");\n return true;\n }\n else\n {\n $this->watchdog->logBacktraceMessage(\"Image saving failed in module recreateImage\");\n $this->error=1;\n return false;\n }\n }\n else\n {\n $this->watchdog->logBacktraceMessage(\"Unable to recreate image in module recreateImage\");\n $this->error=1;\n return false;\n }\n }", "protected final function delete_image_tree()\n {\n // Full directory structure for images and thumbs\n $path = $this->get_image_path(); \n \n // Delete if exists\n if(is_dir($path))\n if(!FileSystem::delete_tree($path)) \n trigger_error('I cannot delete '. $path .', please check permissions', E_USER_ERROR);\n }", "public function index()\n\t{\n\n\t\t/*\n\t\t$items = App\\Items::all();\n\t\tforeach ($items as $item) {\n\t\t\t$result = preg_replace('#<div id=\"pic_holder\">(.*?)</div>#', ' ', $item->description);\n\t\t $data['description'] = $result;\n\t\t $db = App\\Items::find($item->id);\n\t\t\t$db->update($data);\n\t\t}\n\t\t*/\n\n\t\t/*\n\t\t$items = App\\ItemMedia::where('media_id','<',52312)->get();\n\t\tforeach($items as $item) {\n\t\t\t\t$find = App\\News::find($item->media_id);\n\t\t\t\tif ($find) {\n\t\t\t\t\t$find_if_exists = App\\Media::find($item->media_id);\n\t\t\t\t\tif(!$find_if_exists) {\n\t\t\t\t\t\t$db = new App\\Media;\n\t\t\t\t\t\t$db->id = $item->media_id;\n\t\t\t\t\t\t$db->title = $find->title;\n\t\t\t\t\t\t$db->url = $find->url;\n\t\t\t\t\t\t$db->type = \"img\";\n\t\t\t\t\t\t$db->user_id = 1;\n\t\t\t\t\t\t$db->save();\n\t\t\t\t\t} else {\n\t\t\t\t\t\techo \"2\";\n\t\t\t\t\t};\n\t\t\t\t} else {\n\t\t\t\t\techo \"1\";\n\t\t\t\t};\n\t\t};\n\t\t*/\n\n\t\t/*\n\t\t$items = App\\Items::where('language','en')->get();\n\t\tforeach($items as $item) {\n\t\t $data['image_id'] = $item->image_id + 20000;\n\t\t $db = App\\Items::find($item->id);\n\t\t if($db) {\n\t\t\t\t$db->update($data);\n\t\t\t};\n\t\t};\n\t\t*/\n\n\t\t/*\n\t\tini_set('memory_limit', '-1');\n\t\tini_set('max_execution_time', 0);\n\t\tset_time_limit(0);\n\n\t\tif ($handle = opendir('uploads/images_pending/')) {\n\t\t while (false !== ($filename = readdir($handle))) {\n\t\t if($filename <> \".\" && $filename <> \"..\" && $filename <> \".DS_Store\") {\n\n\t\t\t\t\t$sourcePath = 'uploads/images_pending/';\n\t\t\t\t\t$destinationPath = 'uploads/images_resized/';\n\n\t\t\t\t\tImage::make($sourcePath.$filename)->resize(1280, null, function ($constraint) {\n\t\t\t\t\t\t$constraint->aspectRatio();\n\t\t\t\t\t\t$constraint->upsize();\n\t\t\t\t\t})->save($destinationPath.'1_'.$filename, 90);\n\n\t\t\t\t\tImage::make($sourcePath.$filename)->resize(1024, null, function ($constraint) {\n\t\t\t\t\t\t$constraint->aspectRatio();\n\t\t\t\t\t\t$constraint->upsize();\n\t\t\t\t\t})->save($destinationPath.'2_'.$filename, 90);\n\n\t\t\t\t\tImage::make($sourcePath.$filename)->resize(840, null, function ($constraint) {\n\t\t\t\t\t\t$constraint->aspectRatio();\n\t\t\t\t\t\t$constraint->upsize();\n\t\t\t\t\t})->save($destinationPath.'3_'.$filename, 90);\n\n\t\t\t\t\tImage::make($sourcePath.$filename)->resize(400, null, function ($constraint) {\n\t\t\t\t\t\t$constraint->aspectRatio();\n\t\t\t\t\t\t$constraint->upsize();\n\t\t\t\t\t})->save($destinationPath.'4_'.$filename, 90);\n\n\t\t\t\t\tImage::make($sourcePath.$filename)->resize(200, null, function ($constraint) {\n\t\t\t\t\t\t$constraint->aspectRatio();\n\t\t\t\t\t\t$constraint->upsize();\n\t\t\t\t\t})->save($destinationPath.'5_'.$filename, 90);\n\n\n\t\t\t\t\t$destinationPath2 = 'uploads/images_cropped/';\n\t\t\t\t\tImage::make($destinationPath.'4_'.$filename)->crop(265, 199)->save($destinationPath2.'c_'.$filename);\n\t\t\t\t\tImage::make($destinationPath2.'c_'.$filename)->resize(265, null, function ($constraint) {\n\t\t\t\t\t\t$constraint->aspectRatio();\n\t\t\t\t\t\t$constraint->upsize();\n\t\t\t\t\t})->save($destinationPath2.'c_'.$filename, 95);\n\n\t\t\t\t\tImage::make($destinationPath2.'c_'.$filename)->resize(185, null, function ($constraint) {\n\t\t\t\t\t\t$constraint->aspectRatio();\n\t\t\t\t\t\t$constraint->upsize();\n\t\t\t\t\t})->save($destinationPath2.'c2_'.$filename, 99);\n\n\t\t\t\t\tImage::make($destinationPath2.'c2_'.$filename)->resize(85, null, function ($constraint) {\n\t\t\t\t\t\t$constraint->aspectRatio();\n\t\t\t\t\t\t$constraint->upsize();\n\t\t\t\t\t})->save($destinationPath2.'c3_'.$filename, 99);\n\n\t\t };\n\t\t }\n\t\t closedir($handle);\n\n\t\t}\n\t\t*/\n\n\t\tTheme::setLayout('frontend.app');\n\t\t$sliders = App\\Sliders::where('language',Lang::getLocale())->where('status',1)->orderBy('id','DESC')->get();\n\t\tView::share('sliders',$sliders);\n\n\t\tView::share('title',$this->site_settings->site_slogan);\n\t\treturn Theme::view('frontend/index-header-fix');\n\n\t}", "public function rebuildThumbnails()\n\t{\n\t\tif ($this->getOrderingType() == OQ_PICTURES || $this->getOrderingType() == OQ_NESTED_PICTURES)\n\t\t{\n\t\t\tforeach ( $this->getOrderElements() as $orderingElement)\n\t\t\t{\n\t\t\t\t$this->generateThumbForFile($this->getImagePath(), $orderingElement->getContent());\n\t\t\t}\n\t\t}\n\t}", "function deleteFiles() {\n unlink(FS_THUMB_DIR.$this->thumbnail);\t\t\t\n unlink(FS_IMG_DIR.$this->image);\n }", "public function afterUpdate()\n {\n if ($this->_lastEvent == 'afterFind') {\n $galleryId = $this->getGalleryId();\n if ($this->_galleryId && ($this->_galleryId != $galleryId)) {\n $dirPath1 = $this->directory . '/' . $this->_galleryId;\n $dirPath2 = $this->directory . '/' . $galleryId;\n if (is_dir($dirPath1)) {\n rename($dirPath1, $dirPath2);\n }\n }\n }\n $this->_lastEvent = 'afterUpdate';\n }", "function singleImagePublishProcess($domain_id)\r\n {\r\n global $CFG;\r\n $temp_singimg_val = $this->getSingleImagesValue($domain_id,$CFG['table']['temp_single_images']);\r\n $main_singimg_val = $this->getSingleImagesValue($domain_id,$CFG['table']['single_images']);\r\n $temp_singimg_imgid=array();\r\n foreach($temp_singimg_val as $temp=>$value)\r\n {\r\n $temp_singimg_imgid[] = $temp_singimg_val[$temp]['img_id'];\r\n } \r\n \r\n foreach($main_singimg_val as $main=>$value)\r\n {\r\n if( is_array($temp_singimg_imgid) && !in_array($main_singimg_val[$main]['img_id'],$temp_singimg_imgid) )\r\n {\r\n $deletimage_id.= $main_singimg_val[$main]['img_id'].\",\"; \r\n //@unlink($CFG['site']['photo_domain_image_path'].'/'.$main_singimg_val[$main]['image_name']); \r\n }\r\n } \r\n \r\n if($deletimage_id != '')\r\n {\r\n $deletimage_id = substr($deletimage_id,0,-1);\r\n $sql_delete=\"DELETE FROM \".$CFG['table']['single_images'].\" WHERE domain_id = '\".$this->filterInput($domain_id).\"' AND img_id IN (\".$deletimage_id.\") \";\r\n $UpResult = mysql_query($sql_delete) or die($this->mysql_error($sql_delete));\r\n } \r\n \r\n foreach($temp_singimg_val as $sub=>$value)\r\n {\r\n if($temp_singimg_val[$sub]['publish_status'] == 'U')\r\n {\r\n $upd_qry = \" INSERT INTO \".$CFG['table']['single_images'].\" SET \".\r\n \" img_id = '\".$this->filterInput($temp_singimg_val[$sub]['img_id']).\"', \".\r\n \" page_id = '\".$this->filterInput($temp_singimg_val[$sub]['page_id']).\"', \".\r\n \" domain_id = '\".$this->filterInput($temp_singimg_val[$sub]['domain_id']).\"',\".\r\n \" page_list_id = '\".$this->filterInput($temp_singimg_val[$sub]['page_list_id']).\"',\".\r\n \" image_name = '\".$this->filterInput($temp_singimg_val[$sub]['image_name']).\"',\".\r\n \" alignment = '\".$this->filterInput($temp_singimg_val[$sub]['alignment']).\"',\".\r\n \" imagelib_id = '\".$this->filterInput($temp_singimg_val[$sub]['imagelib_id']).\"',\".\r\n \" status = '\".$this->filterInput($temp_singimg_val[$sub]['status']).\"' \";\r\n \r\n $res = $this->ExecuteQuery($upd_qry,'insert');\r\n $this->getUpdate($CFG['table']['temp_single_images'],\"publish_status = 'N'\",\"img_id = '\".$this->filterInput($temp_singimg_val[$sub]['img_id']).\"'\");\r\n } \r\n } \r\n\r\n }", "public function run()\n {\n //\n $images = array(\n array(\"name\" => \"s1.jpg\", \"imageable_id\" => 1, \"imageable_type\" => \"App\\Product\"),\n array(\"name\" => \"s2.jpg\", \"imageable_id\" => 1, \"imageable_type\" => \"App\\Product\"),\n array(\"name\" => \"s3.jpg\", \"imageable_id\" => 1, \"imageable_type\" => \"App\\Product\"),\n array(\"name\" => \"c1.jpg\", \"imageable_id\" => 2, \"imageable_type\" => \"App\\Product\"),\n array(\"name\" => \"c2.jpg\", \"imageable_id\" => 2, \"imageable_type\" => \"App\\Product\"),\n array(\"name\" => \"c3.jpg\", \"imageable_id\" => 2, \"imageable_type\" => \"App\\Product\"),\n );\n\n foreach ($images as $image)\n {\n Images::create($image);\n }\n }", "private function clear(){\n $dir = file_directory_temp();\n \n foreach($this -> tmp_images as $img){\n unlink($dir .'/' . $img);\n }\n \n \n \n }", "private function createImageWorkingDir()\n {\n // Create Temp dir for image\n $pathinfo = pathinfo($this->imagePath);\n $this->imageExtension = $pathinfo['extension'];\n $this->imageTempDirName = $this->tempDir . $pathinfo['basename'];\n $this->preparePathProps();\n\n // @todo Make sure to use Storage while in Laravel.\n mkdir($this->imageTempDirName, 0755, true);\n copy($this->imagePath, $this->imageInitialPath);\n }", "function updateFolder()\n {\n }", "protected function scaleImages() {}", "public function delete_multiple_preview_folder($url)\n { \n $user = Auth::user();\n $username = $user->username;\n $user_id = $user->id;\n\n $dir = public_path().\"/temp/\".$username.'/front';\n \n foreach(glob(\"{$dir}/*\") as $file)\n {\n if(is_dir($file)) { \n recursiveRemoveDirectory($file);\n } else {\n unlink($file);\n }\n\n }\n rmdir($dir);\n\n $dir = public_path().\"/temp/\".$username.'/back';\n\n if(File::exists($dir))\n { \n foreach(glob(\"{$dir}/*\") as $file)\n {\n if(is_dir($file)) { \n recursiveRemoveDirectory($file);\n } else {\n unlink($file);\n }\n\n }\n rmdir($dir);\n } \n\n \n\n rmdir(public_path().\"/temp/\".$username);\n\n $template_data = UserTemplate::where('url',$url)->where('user_id',$user_id)->first();\n $feilds = UserTemplateFeild::where('template_id',$template_data->id)->where('user_id',$user_id)->get();\n \n $user_template_ids = array();\n foreach ($feilds as $feild) {\n $user_template_ids[] = $feild->id;\n }\n\n $images = UserTemplateImage::whereIn('template_feild_id',$user_template_ids)->get();\n \n $imageids = array();\n foreach ($images as $key => $value) {\n array_push($imageids, $value->template_feild_id);\n }\n \n $image_feilds_name = UserTemplateFeild::whereIn('id',$imageids)->lists('name');\n\n $image_feild_name = array();\n foreach ($image_feilds_name as $value) {\n $name = str_replace(\" \",\"_\", $value); \n $name = strtolower($name); \n array_push($image_feild_name, $name);\n }\n\n foreach ($image_feild_name as $name) \n { \n $directory = public_path().\"/user/\".$username.\"/\".$name;\n \n foreach(glob(\"{$directory}/*\") as $file)\n {\n if(is_dir($file)) { \n recursiveRemoveDirectory($file);\n } else {\n unlink($file);\n }\n }\n\n rmdir($directory);\n\n }\n //rmdir(public_path().\"/user/\".$username);\n @unlink(public_path().\"/excelfiles/\".$username.\" \".$url.\".xls\");\n\n return redirect()->back();\n }", "private function handle_images( $item_id ){\n if(!empty($_FILES['images']['name'])){\n $filesCount = count($_FILES['images']['name']);\n for($i = 0; $i < $filesCount; $i++){\n $_FILES['image']['name'] = $_FILES['images']['name'][$i];\n $_FILES['image']['type'] = $_FILES['images']['type'][$i];\n $_FILES['image']['tmp_name'] = $_FILES['images']['tmp_name'][$i];\n $_FILES['image']['error'] = $_FILES['images']['error'][$i];\n $_FILES['image']['size'] = $_FILES['images']['size'][$i];\n\n $uploadPath = 'uploads/images/';\n $config['upload_path'] = $uploadPath;\n $config['allowed_types'] = 'gif|jpg|png';\n\n $this->load->library('upload', $config);\n $this->upload->initialize($config);\n if($this->upload->do_upload('image')){\n $fileData = $this->upload->data();\n $uploadData['guid'] = $fileData['file_name'];\n $uploadData['created_at'] = date(\"Y-m-d H:i:s\");\n $uploadData['updated_at'] = date(\"Y-m-d H:i:s\");\n //Insert file information into the database\n $file_id = $this->admin_model->insert_single_file($uploadData);\n if (is_numeric( $file_id ) && $file_id > 0 ) {\n $tmp['raw_img_'.$_FILES['image']['name']] = $file_id ;\n }\n }\n }\n }\n $new_sorts = array();\n $i = 0 ;\n foreach ( $this->input->post('sorts') as $sort ){\n $new_sorts[$i]['id_eyeglasses'] = $item_id;\n if (is_numeric($sort)){\n $new_sorts[$i]['id_media'] = $sort;\n } else {\n $new_sorts[$i]['id_media'] = $tmp[$sort];\n }\n $i = $i + 1;\n }\n $this->admin_model->delete_eyeglasses_media(array('id_eyeglasses'=>$item_id));\n $this->admin_model->insert_eyeglass_media_batch($new_sorts);\n // delete the existing images that no longer need\n if ( ( $this->input->post('id') != null ) && ! empty( $this->input->post('delete-existing-file') ) ) {\n\t\t\t\t$delete_ids = explode( ',', $this->input->post('delete-existing-file') );\n\t\t\t\tforeach ( $delete_ids as $id ) {\n \n\t\t\t\t\t$this->admin_model->delete_media($id);\n\t\t\t\t}\n\t\t\t}\n \n }", "protected function generateImages() {\n\t\tforeach ($this->sets as $set) {\t\n\t\t\t$img = new rImage(JPATH_ROOT.$this->files->getImage(),\n\t\t\t\t$this->files->getCacheFolder('items'),\n\t\t\t\t$set->name,\n\t\t\t\t$set->width,\n\t\t\t\t$set->height,\n\t\t\t\t$set->quality,\n\t\t\t\t$set->ratio\n\t\t\t);\n\t\t\t$this->generateImage($img);\n\t\t}\t\t\n\t}", "function createResizedImages(){\n\t\t$this->createLarge();\n\t\t$this->createMedium();\n\t\t$this->createSmall();\n\t\t$this->createThumbnail();\n\t\t$this->createSquare();\n\t}", "public function run()\n {\n $categories = ['3d', 'design', 'branding', 'drawing', 'painting', 'photography', 'webdesign'];\n $dest = 'public/img/upload/';\n\n foreach ($categories as $key => $category)\n {\n $path = 'public/img/model/' . $category;\n if(is_dir($path))\n {\n $handle = opendir($path);\n while (($file = readdir($handle)) !== false)\n {\n if ($file != '.' && $file != '..' && $file != '.DS_Store')\n {\n $extension = pathinfo($file, PATHINFO_EXTENSION);\n $options = [\n 'jpg',\n 'JPG',\n 'jpeg',\n 'JPEG',\n 'png',\n 'PNG'\n ];\n\n if (in_array($extension, $options))\n {\n $title = str_slug(basename($file, \".\".$extension));\n $filename = $file;\n\n copy($path . '/' . $filename, $dest . $filename);\n\n DB::table('images')->insert([\n 'user_id' => rand(1, 3),\n 'category_id' => $key+1,\n 'title' => $title,\n 'filename' => $filename,\n 'description' => Str::random(50),\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 }\n }\n }\n closedir($handle);\n }\n }\n }", "private function manageFiles()\n {\n $imagesDirectory = SERVER_PATH_BLOGCMS.'/data/blogs/'.$this->blog['id'].'/images';\n $images = array();\n \n if(is_dir($imagesDirectory))\n {\n $files = scandir($imagesDirectory);\n \n foreach($files as $filename)\n {\n $ext = explode('.', $filename)[1];\n if(strtolower($ext) == 'jpg' or strtolower($ext) == 'png')\n {\n $images[] = array(\n 'name' => $filename,\n 'size' => number_format(filesize($imagesDirectory.'/'.$filename) / 1000, 2),\n 'date' => date(\"F d Y\", filemtime($imagesDirectory.'/'.$filename)),\n 'file' => str_replace('.', '_', $filename)\n );\n }\n }\n }\n \n $this->view->setVar('foldersize', number_format($this->GetDirectorySize($imagesDirectory) / 1000, 2));\n \n $this->view->addScript(CLIENT_ROOT.'/resources/js/rbwindow');\n $this->view->addScript(CLIENT_ROOT.'/resources/js/rbrtf');\n $this->view->addStylesheet(CLIENT_ROOT.'/resources/css/rbwindow');\n $this->view->addStylesheet(CLIENT_ROOT.'/resources/css/rbrtf');\n \n $this->view->setVar('images', $images);\n \n $this->view->setPageTitle('Manage Files - '.$this->blog['name']);\n \n $this->view->render('files/manage.tpl');\n }", "public function run(){\n // Get products dir\n $images = scandir(IMG_PATH_BACK);\n // Insert each images in DB\n foreach($images as $image){\n if($image != '.' && $image != '..'){\n $image = IMG_PATH_BACK.$image;\n $infos = pathinfo($image);\n $size = filesize($image);\n DB::table('pictures')->insert([\n 'filename' => $infos['basename'],\n 'size' => $size,\n 'type' => $infos['extension'],\n 'created_at' => Carbon\\Carbon::now(),\n 'updated_at' => Carbon\\Carbon::now()\n ]);\n }\n }\n }", "public function setUp() { \n\t \n\t\t// Create directory\n\t\t$tmpFolder = 'ai_gallery_test_' . time();\n\t\t$path = PATH_site . 'typo3temp/temp/' . $tmpFolder;\n\t\t\n\t\tmkdir($path);\n\t\t\n\t\t$this->tmpDirectory = $path . '/';\n\t\t\n\t\t// Create files.\n\t\tif(is_dir($this->tmpDirectory)) {\n\t\t\t\n\t\t\tforeach ($this->imageFiles as $file) {\n\t\t\t\ttouch($this->tmpDirectory . $file);\n\t\t\t}\n\t\t\t\n\t\t\tforeach ($this->invalidFiles as $invalidFile) {\n\t\t\t\ttouch($this->tmpDirectory . $invalidFile);\n\t\t\t}\n\t\t}\n\t\t\n\t}", "function cleanupDirectory($dir = null) {\r\n\t\t$path_to_uploads = IMAGES . 'uploads';\r\n\t\t\r\n\t\tif($dir) {\r\n\t\t\t$path_to_uploads .= DS . $dir;\r\n\t\t}\r\n\t\t\r\n\t\t// Encontrar todas la imagenes subidas\r\n\t\t$images = $this -> find('all');\r\n\t\t\r\n\t\t// Rutas de imagenes en la base de datos\r\n\t\t$db_images = array();\r\n\t\t\r\n\t\tforeach ($images as $key => $image) {\r\n\t\t\t$db_images[] = $image['Imagene']['path'];\r\n\t\t}\r\n\t\t\r\n\t\t$dir_images = array();\r\n\t\t\r\n\t\tif ($handle = opendir($path_to_uploads)) {\r\n\t\t\twhile (false !== ($entry = readdir($handle))) {\r\n\t\t\t\t// Raíz de uploads\t\r\n\t\t\t\t$tmp_file = $path_to_uploads . DS . $entry;\r\n\t\t\t\tif ($entry != 'empty' && is_file($tmp_file))\r\n\t\t\t\t\t$dir_images[] = $tmp_file;\r\n\t\t\t}\r\n\t\t\tclosedir($handle);\r\n\t\t}\r\n\t\t\r\n\t\t// Eliminar las imagenes que no esten registradas en la base de datos\r\n\t\tforeach ($dir_images as $file) {\r\n\t\t\t$file = explode('/', $file);\r\n\t\t\t$file = $file[count($file) - 1];\r\n\t\t\tif (!in_array($file, $db_images)) {\r\n\t\t\t\t$tmp_file_path = $path_to_uploads . DS . $file;\r\n\t\t\t\tunlink($tmp_file_path);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "private function _moveAllThumbnails()\n {\n $sql = $this->db->select()\n ->from(array('item'))\n ->where('thumbnail != ?', '');\n $rowset = $this->db->fetchAll($sql);\n foreach ($rowset as $row) {\n $itemId = $row['item_id'];\n $thumbnailBitstream = $this->_moveThumbnailToAssetstore($row['thumbnail']);\n if ($thumbnailBitstream !== null) {\n $this->db->update('item',\n array('thumbnail_id' => $thumbnailBitstream->getKey()),\n array('item_id = ?' => $itemId));\n }\n }\n }", "public function ajaxCallBackCreateDir()\n {\n $path = Tools::getValue('path');\n \n// $domain = strpos($url, _PS_BASE_URL_.__PS_BASE_URI__ );\n// if ($domain === false)\n// {\n// # CHECK NOT SAME DOMAIN\n// # http://localhost/prestashop/ps_1700_RC03_local != http://prestashop/ps_1700_RC03_local\n// die(Tools::jsonEncode(array(\n// 'hasError' => true,\n// 'error' => $this->l('Domain is incorrect. Please type this at first: '),\n// 'img_dir' => _PS_BASE_URL_.__PS_BASE_URI__,\n// )));\n// }\n \n $img_dir = str_replace(_PS_BASE_URL_.__PS_BASE_URI__, '', $path);\n $img_dir = _PS_ROOT_DIR_.'/'.$img_dir;\n $img_dir = str_replace('\\\\', '/', $img_dir);\n $img_dir = str_replace('//', '/', $img_dir);\n \n if (file_exists($img_dir)) {\n # CHECK FOLDER EXIST\n die(Tools::jsonEncode(array(\n 'hasError' => true,\n 'error' => $this->l('Folder is exist'),\n 'img_dir' => $img_dir,\n )));\n }\n \n try {\n $result = mkdir($img_dir, 0755, true);\n if ($result) {\n die(Tools::jsonEncode(array(\n 'success' => true,\n 'information' => $this->l('Create folder successful'),\n 'img_dir' => $img_dir,\n )));\n }\n } catch (Exception $ex) {\n die(Tools::jsonEncode(array(\n 'hasError' => true,\n 'error' => $this->l('Can NOT create folder'),\n 'img_dir' => $img_dir,\n )));\n }\n }", "function rebuild_thumbnails()\n\t{\n\t\trequire_once( KERNEL_PATH.'class_image.php' );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Set up\n\t\t//-----------------------------------------\n\t\t\n\t\t$done = 0;\n\t\t$start = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0;\n\t\t$end = intval( $this->ipsclass->input['pergo'] ) ? intval( $this->ipsclass->input['pergo'] ) : 100;\n\t\t$dis = $end + $start;\n\t\t$output = array();\n\t\t\n\t\t//-----------------------------------------\n\t\t// Got any more?\n\t\t//-----------------------------------------\n\t\t\n\t\t$tmp = $this->ipsclass->DB->simple_exec_query( array( 'select' => 'attach_id', 'from' => 'attachments', 'where' => \"attach_rel_module IN('post','msg')\", 'limit' => array($dis,1) ) );\n\t\t$max = intval( $tmp['attach_id'] );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Avoid limit...\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'attachments', 'where' => \"attach_rel_module IN('post','msg')\", 'order' => 'attach_id ASC', 'limit' => array($start,$end) ) );\n\t\t$outer = $this->ipsclass->DB->simple_exec();\n\t\t\n\t\t//-----------------------------------------\n\t\t// Process...\n\t\t//-----------------------------------------\n\t\t\n\t\twhile( $r = $this->ipsclass->DB->fetch_row( $outer ) )\n\t\t{\n\t\t\tif ( $r['attach_is_image'] )\n\t\t\t{\n\t\t\t\tif ( $r['attach_thumb_location'] and ( $r['attach_thumb_location'] != $r['attach_location'] ) )\n\t\t\t\t{\n\t\t\t\t\tif ( file_exists( $this->ipsclass->vars['upload_dir'].'/'.$r['attach_thumb_location'] ) )\n\t\t\t\t\t{\n\t\t\t\t\t\tif ( ! @unlink( $this->ipsclass->vars['upload_dir'].'/'.$r['attach_thumb_location'] ) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$output[] = \"Could not remove: \".$r['attach_thumb_location'];\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}\n\t\t\t\t\n\t\t\t\t$attach_data = array();\n\t\t\t\t$thumb_data = array();\n\t\t\t\t\n\t\t\t\t$image = new class_image();\n\t\t\t\t\n\t\t\t\t$image->in_type = 'file';\n\t\t\t\t$image->out_type = 'file';\n\t\t\t\t$image->in_file_dir = $this->ipsclass->vars['upload_dir'];\n\t\t\t\t$image->in_file_name = $r['attach_location'];\n\t\t\t\t$image->desired_width = $this->ipsclass->vars['siu_width'];\n\t\t\t\t$image->desired_height = $this->ipsclass->vars['siu_height'];\n\t\t\t\t$image->gd_version = $this->ipsclass->vars['gd_version'];\n\t\t\n\t\t\t\t$thumb_data = $image->generate_thumbnail();\n\t\t\t\t\n\t\t\t\t$attach_data['attach_thumb_width'] = $thumb_data['thumb_width'];\n\t\t\t\t$attach_data['attach_thumb_height'] = $thumb_data['thumb_height'];\n\t\t\t\t$attach_data['attach_thumb_location'] = $thumb_data['thumb_location'];\n\t\t\t\t\n\t\t\t\tif ( count( $attach_data ) )\n\t\t\t\t{\n\t\t\t\t\t$this->ipsclass->DB->do_update( 'attachments', $attach_data, 'attach_id='.$r['attach_id'] );\n\t\t\t\t\t\n\t\t\t\t\t$output[] = \"Resized: \".$r['attach_location'];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tunset($image);\n\t\t\t}\n\t\t\t\n\t\t\t$done++;\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Finish - or more?...\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( ! $done and ! $max )\n\t\t{\n\t\t \t//-----------------------------------------\n\t\t\t// Done..\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$text = \"<b>Rebuild completed</b><br />\".implode( \"<br />\", $output );\n\t\t\t$url = \"{$this->ipsclass->form_code}\";\n\t\t\t$time = 2;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// More..\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$text = \"<b>Up to $dis processed so far, continuing...</b><br />\".implode( \"<br />\", $output );\n\t\t\t$url = \"{$this->ipsclass->form_code}&code=\".$this->ipsclass->input['code'].'&pergo='.$this->ipsclass->input['pergo'].'&st='.$dis;\n\t\t\t$time = 0;\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Bye....\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->admin->redirect( $url, $text, 0, $time );\n\t}", "public function run()\n {\n\n $architectureDirectory = 'C:\\Users\\Manaf\\Desktop\\valeria\\public\\images\\architecture';\n $architectureImages = glob($architectureDirectory . \"/*.*\");\n $this->convertName($architectureImages,$architectureDirectory);\n\n $categoryDirectory = 'C:\\Users\\Manaf\\Desktop\\valeria\\public\\images\\category';\n $categoryImages = glob($categoryDirectory . \"/*.*\");\n $this->convertName($categoryImages,$categoryDirectory);\n\n $interiorDirectory = 'C:\\Users\\Manaf\\Desktop\\valeria\\public\\images\\interior';\n $interiorImages = glob($interiorDirectory . \"/*.*\");\n $this->convertName($interiorImages,$interiorDirectory);\n\n $landscapeDirectory = 'C:\\Users\\Manaf\\Desktop\\valeria\\public\\images\\landscape';\n $landscapeImages = glob($landscapeDirectory . \"/*.*\");\n $this->convertName($landscapeImages,$landscapeDirectory);\n\n $quickConsultingDirectory = 'C:\\Users\\Manaf\\Desktop\\valeria\\public\\images\\quick consulting';\n $quichConsultingImages = glob($quickConsultingDirectory . \"/*.*\");\n $this->convertName($quichConsultingImages,$quickConsultingDirectory);\n\n $this->convertNameInDb();\n\n $categories = Category::all();\n foreach ($categories as $category) {\n if ($category->parent_id == null || $category->parent_id == 2 || $category->parent_id == 124){\n $category->update([\n 'image_icon'=> \"images/interior/\".$category->name . \".png\"\n ]);\n }\n if ($category->parent_id == 3 || $category->parent_id == 8 || $category->parent_id == 13 || $category->parent_id == 17\n || $category->parent_id == 23 || $category->parent_id == 28 || $category->parent_id == 31\n || $category->parent_id == 125 || $category->parent_id == 130 || $category->parent_id == 135 || $category->parent_id == 139 || $category->parent_id == 145\n || $category->parent_id == 150 || $category->parent_id == 153 || $category->parent_id == 160){\n $category->update([\n 'image'=> \"images/interior/\".$category->name .\".jpg\",\n 'image_opacity'=> \"images/interior/\".$category->name .\"-opacity.jpg\"\n ]);\n }\n if ($category->parent_id == 41 || $category->parent_id == 163) {\n $category->update([\n 'image_icon' => \"images/architecture/\" . $category->name . \".png\"\n ]);\n }\n if ($category->parent_id == 70 || $category->parent_id == 67 || $category->parent_id == 52 || $category->parent_id == 47\n || $category->parent_id == 76 || $category->parent_id == 62 || $category->parent_id == 56 || $category->parent_id == 56 || $category->parent_id == 42 ||\n $category->parent_id == 198 || $category->parent_id == 192 || $category->parent_id == 189 || $category->parent_id == 184\n || $category->parent_id == 164 || $category->parent_id == 169 || $category->parent_id == 174 || $category->parent_id == 178\n ) {\n $category->update([\n 'image' => \"images/architecture/\" . $category->name . \".jpg\",\n 'image_opacity' => \"images/architecture/\" . $category->name . \"-opacity.jpg\"\n ]);\n }\n\n if ($category->parent_id == 83 || $category->parent_id == 205) {\n $category->update([\n 'image' => \"images/landscape/\" . $category->name . \".jpg\",\n 'image_opacity' => \"images/landscape/\" . $category->name . \"-opacity.jpg\"\n ]);\n }\n if ($category->parent_id == 239) {\n $category->update([\n 'image' => \"images/quick consulting/\" . $category->name . \".jpg\",\n 'image_opacity' => \"images/quick consulting/\" . $category->name . \"-opacity.jpg\"\n ]);\n }\n if ($category->parent_id == 117 || $category->parent_id == 1){\n $category->update([\n 'image' => \"images/category/\" . $category->name . \".jpg\",\n 'image_opacity' => \"images/category/\" . $category->name . \"-opacity.jpg\"\n ]);\n }\n }\n }", "function getImages() {\n\t\t$dir = $this->_dirs[$this->current_dir];\n\t\t$temps = IMAGE_PATH . $dir;\n\t\tif($this->verbose) echo \"$temps <br>\";\n\t\t//_images has to be reset to prevent problems created by refreshing the page.\n\t\t$this->_images = null;\t\t\t\t\t\n\t\t\n\t\tif (is_dir($temps)) {\n\t \tif ($dh = opendir($temps)) {\n\t \twhile (($file = readdir($dh))) {\n\t\t\t\t\tif(is_file($temps.$file)) {\n\t\t\t\t\t\tif (preg_match(\"/\\.jp(g|eg)$/i\",$file)) {\n\t\t\t\t\t\t $type = \"jpeg\";\n\t\t\t\t\t\t} elseif (preg_match(\"/\\.gif$/i\",$file)) {\n\t\t\t\t\t\t $type = \"gif\";\n\t\t\t\t\t\t} elseif (preg_match(\"/\\.png$/i\",$file)) {\n\t\t\t\t\t\t $type = \"png\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($type){\n\t\t\t\t\t\t\t$s = sizeof($this->_images);\n\t\t\t\t\t\t\t$this->_images[] = new GalleryImage(IMAGE_PATH,$dir,$file,$type,DESC_DIR);\n\t\t\t\t\t\t\t$this->_images[$s]->setImageTool($this->_imageTool);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$type = \"\";\n\t\t\t\t\t}\n\t \t}\n\t \tclosedir($dh);\n\t \t}\n\t\t}\n\t}", "public function run()\n {\n $images_array = ['default_consoles.jpg', 'default_profile.png', 'default_games.png', 'default_furniture.png', 'default_electronics.png', 'default_misc.png'];\n\n foreach($images_array as $image){\n DB::table('images')->insert([\n 'image' => '/img/' . $image\n ]);\n }\n }", "function cleanUpImagesSeafile() {\n\n\tglobal $config, $seafile_client, $seafile_library;\n\n\ttry {\n\t\t// Indicate the time right now\n\t\t$now = new DateTime();\n\n\t\t// Create the new resources needed to get the files\n\t\t$directoryResource = new Directory($seafile_client);\n\t\t$fileResource = new File($seafile_client);\n\n\t\t// Get all of the items in that directory\n\t\t$items = $directoryResource->getAll($seafile_library, $config['CAM_STORAGE_DIRECTORY']);\n\n\t\t// Iterate through all the items\n\t\tforeach ($items as $item) {\n\n\t\t\t// Make sure its a file\n\t\t\tif ($item->type == \"file\") {\n\n\t\t\t\t// Calculate the time difference\n\t\t\t\t$timediff = $now->getTimeStamp() - $item->mtime->getTimeStamp();\n\t\t\t\tlog_debug(\"Checking item \" . $item->name . \" - time difference \" . $timediff);\n\t\t\n\t\t\t\t// If the difference between now and the file's timestamp is more than the retention period hours\n\t\t\t\tif ($timediff > ($config['CAM_RETENTION_TIME_HOURS'] * 60 * 60)) {\n\t\n\t\t\t\t\t// Create the full path for the file\n\t\t\t\t\t$remove_path = $config['CAM_STORAGE_DIRECTORY'] . \"/\" . $item->name;\n\t\t\t\n\t\t\t\t\t// Try to remove the file\n\t\t\t\t\tif ($fileResource->remove($seafile_library, $remove_path)) {\n\t\t\t\t\t\tlog_info(\"Removed: \" . $remove_path);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tlog_warning(\"Could not remove: \" . $remove_path);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tcatch (Exception $e) {\n\t\tlog_error(\"Could not remove old files from Seafile. Error message: \" . $e->getMessage());\n\t}\n}", "public function trashImage()\n\t{\n\t\t$public = 'categories/';\n\t\t$trash = 'trash/categories/';\n\n\t\tif (Storage::exists($public . $this->name))\n\t\t{\n\t Storage::move($public . $this->name, $trash . $this->name);\n\t\t}\n\t}", "public function action() {\n if (empty($this->params[self::PARAM_FOLDER])) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, tweak_error_param_folder_missing));\n return $this->show();\n }\n $images_path = WB_PATH.MEDIA_DIRECTORY.DIRECTORY_SEPARATOR.$this->params[self::PARAM_FOLDER];\n $images_path = $this->addSlash($images_path);\n if (!file_exists($images_path)) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, sprintf(tweak_error_param_folder_invalid, $this->params[self::PARAM_FOLDER])));\n return $this->show();\n }\n\n $temp_path_preview = $this->getTempPath().$this->params[self::PARAM_FOLDER].'/preview/';\n $temp_url_preview = $this->getTempURL().$this->params[self::PARAM_FOLDER].'/preview/';\n if (!file_exists($temp_path_preview)) {\n try {\n mkdir($temp_path_preview, 0755, true);\n }\n catch(ErrorException $ex) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, sprintf(tweak_error_mkdir, $temp_path_preview, $ex->getMessage())));\n return $this->show();\n }\n }\n $temp_path_zoom = $this->getTempPath().$this->params[self::PARAM_FOLDER].'/zoom/';\n $temp_url_zoom = $this->getTempURL().$this->params[self::PARAM_FOLDER].'/zoom/';\n if (!file_exists($temp_path_zoom)) {\n try {\n mkdir($temp_path_zoom, 0755, true);\n }\n catch(ErrorException $ex) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, sprintf(tweak_error_mkdir, $temp_path_zoom, $ex->getMessage())));\n return $this->show();\n }\n }\n\n $first = '';\n $links = '';\n $start = true;\n $description = false;\n $description_array = array();\n $start_file = '';\n $items = array();\n\n if (file_exists($images_path.'images.lst')) {\n if (false === ($fa = file($images_path.'images.lst', FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES))) {\n // error reading file\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, sprintf(tweak_error_reading_file, 'images.lst')));\n return $this->show();\n }\n foreach ($fa as $line) {\n $x = substr_count($line, '|');\n if ($x == 1) {\n list($file, $title) = explode('|', $line);\n $description_array[trim($file)] = trim($title);\n }\n elseif ($x == 2) {\n list($file, $title, $start) = explode('|', $line);\n $description_array[trim($file)] = trim($title);\n if ((strtolower(trim($start)) == 'true') && (file_exists($images_path.$file))) {\n $start_file = trim($file);\n }\n }\n }\n }\n $iterator = new imageExtensionFilter(new RecursiveDirectoryIterator($images_path));\n foreach ($iterator as $fileinfo) {\n if ($fileinfo->isFile()) {\n list($width, $height, $type) = getimagesize($fileinfo->__toString());\n $rewrite = false;\n if (file_exists($temp_path_preview.$fileinfo->getBasename())) {\n // compare size and date\n list($previewWidth, $previewHeight) = getimagesize($temp_path_preview.$fileinfo->getBasename());\n if ($previewWidth != $this->params[self::PARAM_WIDTH]) $rewrite = true;\n if (filemtime($temp_path_preview.$fileinfo->getBasename()) != $fileinfo->getMTime()) $rewrite = true;\n }\n // create preview image\n if (!file_exists($temp_path_preview.$fileinfo->getBasename()) || $rewrite) {\n // create preview image\n if ($width > $this->params[self::PARAM_WIDTH]) {\n // calculate size for icon\n $percent = (int) ($this->params[self::PARAM_WIDTH]/($width/100));\n $previewWidth = $this->params[self::PARAM_WIDTH];\n $previewHeight = (int) ($height/(100)*$percent);\n }\n else {\n // use orginal image dimensions\n $previewWidth = $width;\n $previewHeight = $height;\n }\n if (false == ($tweaked_file = $this->createTweakedFile(\n $fileinfo->getBasename(),\n strtolower(substr($fileinfo->getBasename(), strrpos($fileinfo->getBasename(), '.')+1)),\n $fileinfo->__toString(),\n $previewWidth,\n $previewHeight,\n $width,\n $height,\n $fileinfo->getMTime(),\n $temp_path_preview))) {\n // error creating the tweaked file\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $this->getError()));\n return $this->show();\n }\n }\n // create zoom image\n\n if (!file_exists($temp_path_zoom.$fileinfo->getBasename()) || $rewrite) {\n // create preview image\n if ($width > self::ZOOM_MAX_WIDTH) {\n // calculate size for icon\n $percent = (int) (self::ZOOM_MAX_WIDTH/($width/100));\n $zoomWidth = self::ZOOM_MAX_WIDTH;\n $zoomHeight = (int) ($height/(100)*$percent);\n }\n else {\n // use orginal image dimensions\n $zoomWidth = $width;\n $zoomHeight = $height;\n }\n if (false == ($tweaked_file = $this->createTweakedFile(\n $fileinfo->getBasename(),\n strtolower(substr($fileinfo->getBasename(), strrpos($fileinfo->getBasename(), '.')+1)),\n $fileinfo->__toString(),\n $zoomWidth,\n $zoomHeight,\n $width,\n $height,\n $fileinfo->getMTime(),\n $temp_path_zoom))) {\n // error creating the tweaked file\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $this->getError()));\n return $this->show();\n }\n }\n else {\n // get width and height from zoom image\n list($zoomWidth, $zoomHeight) = getimagesize($temp_path_zoom.$fileinfo->getBasename());\n }\n\n $items[] = array(\n 'is_first' => ($start && (empty($start_file)) || ($fileinfo->getBasename() == $start_file)) ? 1 : 0,\n 'class' => media_filename($this->params[self::PARAM_FOLDER]),\n 'title' => isset($description_array[$fileinfo->getBasename()]) ? $description_array[$fileinfo->getBasename()] : '',\n 'zoom' => array(\n 'url' => $temp_url_zoom.$fileinfo->getBasename(),\n 'width' => $zoomWidth,\n 'height' => $zoomHeight\n ),\n 'preview' => array(\n 'url' => $temp_url_preview.$fileinfo->getBasename(),\n 'width' => $previewWidth,\n 'height' => $previewHeight\n )\n );\n // set start tag to false ...\n if ($start && (empty($start_file))) $start = false;\n }\n }\n\n return $this->show($items);\n }", "private function setImagesOnBackup($Fname){\n //crea una carpeta nueva para imagenes\n mkdir(\"./backups/$Fname/images\");\n $data=$this->BackupSelects->getImages();\n $imgName=$data['imgName'];\n $imgPath=$data['imgPath'];\n for($i=0;$i<count($imgPath);$i++){\n copy($imgPath[$i],'./backups/'.$Fname.'/'.'images/'.$imgName[$i]);\n}\n}", "public function addEventImage(){\n\t\t\t\n\t\t\t//gets the id of the new event added used to label the dir\n\t\t\t$eventID = $_POST['imageID'];\n\t\t\t\n\t\t\tif (!is_dir('./resources/events/'.$eventID)) {\n\t\t\t mkdir('./resources/events/' . $eventID, 0777, TRUE);\n\t\t\t}\n\t\t\t\n\t\t\t//gets the iniformation\n\t\t\t$file = $_FILES['img']['name'];\n\t\t\t$baseURL = $_POST['baseURL'];\n\t\t\t$ext = pathinfo($file, PATHINFO_EXTENSION);\n\t\t\t\n\t\t\t//sets the information for upload\n\t\t\t$newPath = \"./resources/events/\" . $eventID . \"/\" ;\n\t\t\t$path = $newPath;\n\t\t\t$id = 'img';\n\t\t\t\n\t\t\t$mediaCount = 0;\n\t\t\t//used to get the current count of the images\n\t\t\t$query = $this->db->query('SELECT * FROM event_media WHERE eventID = ' . $eventID);\n\t\t\t$mediaCount = $query->num_rows();\n\t\t\t$nameI = $mediaCount++;\n\t\t\t\n\t\t\t//sets the new name of the image depending on the number of entries\n\t\t\t$name = $nameI . '.' . $ext;\t\t\t\n\t\t\t\n\t\t\t//to set the link to the image in the db.\n\t\t\t$dbPath = $baseURL . \"resources/events/\" . $eventID . \"/\" . $name;\n\t\t\t\n\t\t\t//upload\n\t\t\t$stauts = $this->uploadImage($file, $id, $path, $name, 2, 'gif|jpg|png|jpeg' );\n\t\t\t\n\t\t\tif ($stauts) {\n\t\t\t\t//resize\n\t\t\t\t$this->resizeImage($name, $name, $path, $newPath, 400, 300, 'resize');\n\t\t\t\t//add link to db\n\t\t\t\t$this->Admin_model->uploadEventImage($eventID, $dbPath);\n\t\t\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif($stauts == null || $status = \"\") {\n\t\t\t\t\techo \"Error\";\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\techo \"Success\";\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function deconstructImages () {}", "public function addBeforeImages()\n {\n\n $destinationPath = config('app.bid_images_before'); //2\n if (!empty($_FILES)) {\n $data=Request::all();\n $request_id=$data['requested_id'];\n $type=$data['image_type'];\n\n $tempFile = $_FILES['file']['tmp_name']; //3\n $targetPath = $destinationPath; //4\n $originalFile=$_FILES['file']['name'];\n $changedFileName=$request_id.'-'.$originalFile;\n $targetFile = $targetPath . $changedFileName; //5\n $moved=move_uploaded_file($tempFile, $targetFile); //6\n if ($moved) {\n $data['image_name']=$changedFileName;\n unset($data['file']);\n unset($data['_token']);\n\n setcookie('request_id', $request_id);\n setcookie('type', $type);\n $save=AssignRequestBidsImage::create($data);\n if ($save) {\n $image='<img id=\"'.$request_id.'-'.$save->image_name.'\" src=\"'.config('app.url').'/'.config('app.bid_images_before').$save->image_name.'\" width=\"80px\" height=\"80px\" style=\"padding: 10px\" class=\"img-thumbnail\" alt=\"\">';\n echo $image;\n }\n }\n }\n }", "function deleteGalleryImages()\r\n\t\t{\r\n\t\t\tglobal $CFG,$objSmarty;\r\n if($_POST['domain_id'] != '' && $_POST['page_list_id'] != '')\r\n {\r\n //$tempAlreadyImages = $this->getMultiValue(\"gallery_name\",$CFG['table']['temp_gallery_images'],\"domain_id ='\".$this->filterInput($_POST['domain_id']).\"' AND page_list_id ='\".$this->filterInput($_POST['page_list_id']).\"'\");\r\n //$imagesFolderImages = $this->getMultiValue(\"gallery_name\",$CFG['table']['gallery_images'],\"domain_id ='\".$this->filterInput($_POST['domain_id']).\"' AND page_list_id ='\".$this->filterInput($_POST['page_list_id']).\"'\");\r\n /* foreach($tempAlreadyImages as $key=>$value)\r\n {\r\n $arr1[]=$value['gallery_name'];\r\n }\r\n if($arr1 && $imagesFolderImage == '')\r\n {\r\n foreach($arr1 as $key=>$value)\r\n {\r\n @unlink($CFG['site']['photo_domain_image_path'].'/'.$value);\r\n }\r\n } */\r\n \r\n $UpQuery = \"DELETE FROM \".$CFG['table']['temp_gallery_images'].\" WHERE page_list_id ='\".$this->filterInput($_POST['page_list_id']).\"'\";\r\n \t\t\t$UpResult = mysql_query($UpQuery) or die($this->mysql_error($UpQuery));\r\n $UpQuery = \"UPDATE \".$CFG['table']['temp_gallery_images'].\" SET publish_status = 'U' WHERE domain_id ='\".$this->filterInput($_POST['domain_id']).\"'\";\r\n \t\t\t$UpResult = mysql_query($UpQuery) or die($this->mysql_error($UpQuery));\r\n } \r\n\t\t}", "public function updateImages(array $newImages)\n {\n // trim empty values\n $newImageIds = [];\n\n $i = 0;\n foreach ( $newImages as $newImage ) {\n if( ! $newImage ) {\n continue;\n }\n\n $newImageIds[$newImage] = [\n 'position' => $i++,\n ];\n }\n\n // generate thumb images with 85% quality\n $this->generateImageThumbs($newImageIds);\n\n $currentIds = $this->images()->pluck('id', 'position')->all();\n\n // find array differences\n $imagesToRemove = array_diff($currentIds, array_keys($newImageIds));\n\n if( count($imagesToRemove) ) {\n foreach ( $this->combinations()->get() as $combination ) {\n $combination->images()->detach($imagesToRemove);\n }\n }\n\n $this->images()->sync($newImageIds);\n }", "public function deleteImageFiles($leaveOriginal=true)\n {\n mjlog(DEBUG,__METHOD__,\"upname[$upname] metaname[$metaname]\",__LINE__);\n if (file_exists($upname)) unlink($upname);\n\n if ($metaname != '' && file_exists($metaname)) unlink($metaname);\n\n if (is_array($files))\n {\n }\n //unlink($path .\".ths.\". $type);\n }", "public function delete()\n {\n $images = glob($this->getPath().'*');\n if ( sizeof( $images) != 0) {\n foreach ( $images as $i)\n\tunlink( $i);\n }\n parent::delete();\n }", "public function savePhotos()\n {\n if (empty($this->photos)) return;\n\n $kennelName = Yii::$app->user->identity->email;\n $kennelName = substr($kennelName, 0, strpos($kennelName, \"@\"));\n\n $count = 0;\n $path = Yii::getAlias('@common') . '/uploads/animals/' . $kennelName . '/' . $this->name;\n\n\n FileHelper::createDirectory($path);\n foreach ($this->photos as $photo) {\n $photo->saveAs($path . '/' . $count . '.png');\n $count++;\n }\n }", "protected function DeleteImages()\n\t{\t\t\n\t\t//----------------------------------------------------------------------\n\t\t// block if this is a demo mode\n\t\tif(strtolower(SITE_MODE) == 'demo'){\n\t\t\t$this->error = _OPERATION_BLOCKED;\n\t\t\treturn false;\t\t\t\t\n\t\t}\n\n\t\tforeach($this->arrImagesFields as $key => $val){\n\t\t\t@unlink($val);\n\t\t\t$ext = substr($val,strrpos($val,'.')+1);\n\t\t\t@unlink(str_replace('.'.$ext, '_thumb.jpg', $val));\n\t\t}\t\t\t\n\t}", "protected function createFolderPath()\n {\n $this->write(' + Adding folderPath');\n\n $rootFolders = $this->container->get('open_orchestra_media.repository.media_folder')->findBy(array('parent' => null));\n foreach ($rootFolders as $folder) {\n $event = $this->container->get('open_orchestra_media_admin.event.folder_event.factory')->createFolderEvent();\n $event->setFolder($folder);\n $this->container->get('event_dispatcher')->dispatch(FolderEvents::PARENT_UPDATED, $event);\n }\n\n $this->container->get('object_manager')->flush();\n }", "public function createImageWithDifferentSizes ($imageFullPath, $folder)\r\n {\r\n $createdFiles = array();\r\n $imageDirectory = $this->uploadDirectory . DIRECTORY_SEPARATOR . self::PRODUCT_FOLDER . $folder;\r\n $imageSizes = array (\r\n self::PRODUCT_FOLDER_THUMBNAIL => array (\r\n 'width'=> self::SIZE_THUMBNAIL_WIDTH,\r\n 'height'=> self::SIZE_THUMBNAIL_HEIGHT,\r\n ),\r\n self::PRODUCT_FOLDER_SMALL => array (\r\n 'width'=> self::SIZE_SMALL_WIDTH,\r\n 'height'=> self::SIZE_SMALL_HEIGHT,\r\n ),\r\n self::PRODUCT_FOLDER_MEDIUM => array (\r\n 'width'=> self::SIZE_MEDIUM_WIDTH,\r\n 'height'=> self::SIZE_MEDIUM_HEIGHT,\r\n ),\r\n self::PRODUCT_FOLDER_LARGE => array (\r\n 'width'=> self::SIZE_LARGE_WIDTH,\r\n 'height'=> self::SIZE_LARGE_HEIGHT,\r\n ),\r\n );\r\n\r\n $pathParts = pathinfo($imageFullPath);\r\n $imageManipulator = $this->container->get(\"yilinker_core.service.image_manipulation\");\r\n \r\n foreach ($imageSizes as $folderName => $imageSize) {\r\n\r\n if (!file_exists($imageDirectory . DIRECTORY_SEPARATOR . $folderName)) {\r\n mkdir($imageDirectory . DIRECTORY_SEPARATOR . $folderName , 0777);\r\n }\r\n\r\n $newWidth = $imageSize['width'];\r\n $newHeight = $imageSize['height'];\r\n $imageToReSize = $imageDirectory . DIRECTORY_SEPARATOR . $folderName . DIRECTORY_SEPARATOR . $pathParts['basename'];\r\n\r\n $imageManipulator->writeThumbnail(\r\n DIRECTORY_SEPARATOR.ltrim($imageFullPath, 'web/'),\r\n DIRECTORY_SEPARATOR.ltrim($imageToReSize, 'web/'),\r\n array(\r\n \"filters\" => array(\r\n \"relative_resize\" => array(\r\n \"heighten\" => $newHeight,\r\n \"widen\" => $newWidth,\r\n ),\r\n \"background\" => array(\"color\" => \"#fff\")\r\n )\r\n ));\r\n\r\n $createdFiles[] = new File($imageToReSize);\r\n }\r\n foreach ($createdFiles as $file) {\r\n $this->uploadToCloud ($file);\r\n }\r\n\r\n return $createdFiles;\r\n }", "public function run()\n {\n DB::table('images')->delete();\n for($i = 1; $i <= 7; $i++) {\n Image::create([\n 'product_id' => '1',\n 'name' => 'classic-kitchens/elizabeth/' . $i . '.JPG'\n ]);\n }\n for($i = 1; $i <= 7; $i++) {\n Image::create([\n 'product_id' => '2',\n 'name' => 'classic-kitchens/claire/' . $i . '.JPG'\n ]);\n }\n for($i = 1; $i <= 7; $i++) {\n Image::create([\n 'product_id' => '3',\n 'name' => 'modern-kitchens/mircella/' . $i . '.JPG'\n ]);\n }\n for($i = 1; $i <= 7; $i++) {\n Image::create([\n 'product_id' => '4',\n 'name' => 'modern-kitchens/heidi/' . $i . '.JPG'\n ]);\n }\n }", "public function markAllImagesAsProcessed()\n {\n \\XLite\\Core\\Database::getRepo('XLite\\Model\\Image\\Product\\Image')->unmarkAsProcessed();\n }", "private function manageDeclinatedImages($directory)\n\t{\n\t\t$product = ($this->_imageType == 'products');\n\t\t$image_type = $this->_urlSegment[1];\n\t\tif ($product)\n\t\t{\n\t\t\t$image_size = $this->_urlSegment[4];\n\t\t\t$image_id = $this->_urlSegment[3];//TODO\n\t\t}\n\t\t\n\t\t/*\n\t\t *ok GET (bin)\n\t\t *ok images/product (\"product_list\") (N-2)\n\t\t *ok\tGET (xml) (list of image)\n\t\t *ok images/product/[1,+] (\"product_description\") (N-3)\n\t\t * \tGET (xml) (legend, declinations, xlink to images/product/[1,+]/bin)\n\t\t *ok images/product/[1,+]/bin (\"product_bin\") (N-4)\n\t\t *ok \tGET (bin)\n\t\t * POST (bin) (if image does not exists)\n\t\t *ok images/product/[1,+]/[1,+] (\"product_declination\") (N-4)\n\t\t *ok \tGET (bin)\n\t\t * \tPOST (xml) (legend)\n\t\t * \tPUT (xml) (legend)\n\t\t * DELETE\n\t\t *ok images/product/[1,+]/[1,+]/bin (\"product_declination_bin\") (N-5)\n\t\t * \tPOST (bin) (if image does not exists)\n\t\t *ok \tGET (bin)\n\t\t * \tPUT (bin)\n\t\t * images/product/[1,+]/[1,+]/[small,+] (\"product_declination_resized\") (N-5)\n\t\t *ok \tGET (bin)\n\t\t *ok images/product/default (\"product_default\") (N-3)\n\t\t *ok \tGET (bin)\n\t\t *ok images/product/default/[en,+] (\"product_default_i18n\") (N-4)\n\t\t *ok \tGET (bin)\n\t\t * POST (bin)\n\t\t * PUT (bin)\n\t\t * DELETE\n\t\t *ok images/product/default/[en,+]/[small,+] (\"product_default_i18n_resized\") (N-5)\n\t\t *ok\tGET (bin)\n\t\t * \n\t\t * */\n\t\t\n\t\t\n\t\t// Get available image sizes for the current image type\n\t\t$normalImageSizes = ImageType::getImagesTypes($image_type);\n\t\t$normalImageSizeNames = array();\n\t\tforeach ($normalImageSizes as $normalImageSize)\n\t\t\t$normalImageSizeNames[] = $normalImageSize['name'];\n\t\tswitch ($this->_urlSegment[2])\n\t\t{\n\t\t\t// Match the default images\n\t\t\tcase 'default':\n\t\t\t\t$this->_defaultImage = true;\n\t\t\t\t// Get the language iso code list\n\t\t\t\t$langList = Language::getIsoIds(true);\n\t\t\t\t$langs = array();\n\t\t\t\t$defaultLang = Configuration::get('PS_LANG_DEFAULT');\n\t\t\t\tforeach ($langList as $lang)\n\t\t\t\t{\n\t\t\t\t\tif ($lang['id_lang'] == $defaultLang)\n\t\t\t\t\t\t$defaultLang = $lang['iso_code'];\n\t\t\t\t\t$langs[] = $lang['iso_code'];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// Display list of languages\n\t\t\t\tif($this->_urlSegment[3] == '' && $this->_method == 'GET')\n\t\t\t\t{\n\t\t\t\t\t$this->_xmlOutput .= '<languages>'.\"\\n\";\n\t\t\t\t\tforeach ($langList as $lang)\n\t\t\t\t\t\t$this->_xmlOutput .= '<language iso=\"'.$lang['iso_code'].'\" xlink:href=\"'.$this->_wsUrl.'images/'.$image_type.'/default/'.$lang['iso_code'].'\" get=\"true\" put=\"true\" post=\"true\" delete=\"true\" head=\"true\" upload_allowed_mimetypes=\"'.implode(', ', $this->_acceptedImgMimeTypes).'\" />'.\"\\n\";\n\t\t\t\t\t$this->_xmlOutput .= '</languages>'.\"\\n\";\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$lang_iso = $this->_urlSegment[3];\n\t\t\t\t\t$image_size = $this->_urlSegment[4];\n\t\t\t\t\tif ($image_size != '')\n\t\t\t\t\t\t$filename = $directory.$lang_iso.'-default-'.$image_size.'.jpg';\n\t\t\t\t\telse\n\t\t\t\t\t\t$filename = $directory.$lang_iso.'.jpg';\n\t\t\t\t\t$filename_exists = file_exists($filename);\n\t\t\t\t\treturn $this->manageDeclinatedImagesCRUD($filename_exists, $filename, $normalImageSizes, $directory);//TODO\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t// Display the list of images\n\t\t\tcase '':\n\t\t\t\t// Check if method is allowed\n\t\t\t\tif ($this->_method != 'GET')\n\t\t\t\t{\n\t\t\t\t\t$this->setError(405, 'This method is not allowed for listing category images.');\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t$this->_xmlOutput .= '<image_types>'.\"\\n\";\n\t\t\t\tforeach ($normalImageSizes as $imageSize)\n\t\t\t\t\t$this->_xmlOutput .= '<image_type id=\"'.$imageSize['id_image_type'].'\" name=\"'.$imageSize['name'].'\" xlink:href=\"'.$this->_wsUrl.'image_types/'.$imageSize['id_image_type'].'\" />'.\"\\n\";\n\t\t\t\t$this->_xmlOutput .= '</image_types>'.\"\\n\";\n\t\t\t\t$this->_xmlOutput .= '<images>'.\"\\n\";\n\t\t\t\t$nodes = scandir($directory);\n\t\t\t\t$lastId = 0;\n\t\t\t\tforeach ($nodes as $node)\n\t\t\t\t\t// avoid too much preg_match...\n\t\t\t\t\tif ($node != '.' && $node != '..' && $node != '.svn')\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($product)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpreg_match('/^(\\d+)-(\\d+)\\.jpg*$/Ui', $node, $matches);\n\t\t\t\t\t\t\tif (isset($matches[1]) && $matches[1] != $lastId)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$lastId = $matches[1];\n\t\t\t\t\t\t\t\t$id = $matches[1];\n\t\t\t\t\t\t\t\t$this->_xmlOutput .= '<image id=\"'.$id.'\" xlink:href=\"'.$this->_wsUrl.'images/'.$image_type.'/'.$id.'\" />'.\"\\n\";\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\tpreg_match('/^(\\d+)\\.jpg*$/Ui', $node, $matches);\n\t\t\t\t\t\t\tif (isset($matches[1]))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$id = $matches[1];\n\t\t\t\t\t\t\t\t$this->_xmlOutput .= '<image id=\"'.$id.'\" xlink:href=\"'.$this->_wsUrl.'images/'.$image_type.'/'.$id.'\" />'.\"\\n\";\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$this->_xmlOutput .= '</images>'.\"\\n\";\n\t\t\t\treturn true;\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\t// If id is detected\n\t\t\t\t$object_id = $this->_urlSegment[2];\n\t\t\t\tif (Validate::isUnsignedId($object_id))\n\t\t\t\t{\n\t\t\t\t\t// For the product case\n\t\t\t\t\tif ($product)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Get available image ids\n\t\t\t\t\t\t$available_image_ids = array();\n\t\t\t\t\t\t$nodes = scandir($directory);\n\t\t\t\t\t\tforeach ($nodes as $node)\n\t\t\t\t\t\t\t// avoid too much preg_match...\n\t\t\t\t\t\t\tif ($node != '.' && $node != '..' && $node != '.svn')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tpreg_match('/^'.intval($object_id).'-(\\d+)\\.jpg*$/Ui', $node, $matches);\n\t\t\t\t\t\t\t\tif (isset($matches[1]))\n\t\t\t\t\t\t\t\t\t$available_image_ids[] = $matches[1];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/*\n\t\t\t\t\t\tif (!count($available_image_ids))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//$this->setError(400, 'This image id does not exist');\n\t\t\t\t\t\t\td('TODO');\n\t\t\t\t\t\t}*/\n\t\t\t\t\t\t\n\t\t\t\t\t\t// If an image id is specified\n\t\t\t\t\t\tif ($this->_urlSegment[3] != '')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($this->_urlSegment[3] == 'bin')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif ($this->_method == 'POST')\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$orig_filename = $directory.$object_id.'-'.$this->_productImageDeclinationId.'-'.$available_image_ids[0].'.jpg';//TODO get the default one\n\t\t\t\t\t\t\t\t\t$orig_filename_exists = file_exists($orig_filename);\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\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$orig_filename = $directory.$object_id.'-'.$available_image_ids[0].'.jpg';//TODO get the default one\n\t\t\t\t\t\t\t\t\t$orig_filename_exists = file_exists($orig_filename);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn $this->manageDeclinatedImagesCRUD($orig_filename_exists, $orig_filename, $normalImageSizes, $directory);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telseif (!Validate::isUnsignedId($object_id) || !in_array($this->_urlSegment[3], $available_image_ids))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this->setError(400, 'This image id does not exist');\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$image_id = $this->_urlSegment[3];\n\t\t\t\t\t\t\t$orig_filename = $directory.$object_id.'-'.$image_id.'.jpg';\n\t\t\t\t\t\t\t$image_size = $this->_urlSegment[4];\n\t\t\t\t\t\t\t$filename = $directory.$object_id.'-'.$image_id.'-'.$image_size.'.jpg';\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\tif ($available_image_ids)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this->_xmlOutput .= '<image id=\"'.$object_id.'\">'.\"\\n\";\n\t\t\t\t\t\t\t\tforeach ($available_image_ids as $available_image_id)\n\t\t\t\t\t\t\t\t\t$this->_xmlOutput .= '<declination id=\"'.$available_image_id.'\" xlink:href=\"'.$this->_wsUrl.'images/'.$image_type.'/'.$object_id.'/'.$available_image_id.'\" />'.\"\\n\";\n\t\t\t\t\t\t\t\t$this->_xmlOutput .= '</image>'.\"\\n\";\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this->setStatus(404);\n\t\t\t\t\t\t\t\treturn false;\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}\n\t\t\t\t\t// for all other cases\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$orig_filename = $directory.$object_id.'.jpg';\n\t\t\t\t\t\t$image_size = $this->_urlSegment[3];\n\t\t\t\t\t\t$filename = $directory.$object_id.'-'.$image_size.'.jpg';\n\t\t\t\t\t}\n\t\t\t\t\t$orig_filename_exists = file_exists($orig_filename);\n\t\t\t\t\t\t\n\t\t\t\t\t// If a size was given try to display it\n\t\t\t\t\tif ($image_size != '')\n\t\t\t\t\t{\n\t\t\t\t\t\t// Check the given size\n\t\t\t\t\t\tif ($product && $image_size == 'bin')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->_imgToDisplay = $directory.$object_id.'-'.$image_id.'.jpg';\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif (!in_array($image_size, $normalImageSizeNames))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->setErrorDidYouMean(400, 'This image size does not exist', $image_size, $normalImageSizeNames);\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//d($filename);\n\t\t\t\t\t\t// Display the resized specific image\n\t\t\t\t\t\tif (file_exists($filename))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->_imgToDisplay = $filename;\n\t\t\t\t\t\t\treturn true;\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->setError(500, 'This image does not exist on disk');\n\t\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// Management of the original image (GET, PUT, POST, DELETE)\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\treturn $this->manageDeclinatedImagesCRUD($orig_filename_exists, $orig_filename, $normalImageSizes, $directory);\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$this->setError(400, 'The image id is invalid. Please set a valid id or the \"default\" value');\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t}\n\t}", "private function manageImages()\n\t{\n\t\t/*\n\t\t * available cases api/... :\n\t\t * \n\t\t * images (\"types_list\") (N-1)\n\t\t * \tGET (xml)\n\t\t * images/general (\"general_list\") (N-2)\n\t\t * \tGET (xml)\n\t\t * images/general/[header,+] (\"general\") (N-3)\n\t\t * \tGET (bin)\n\t\t * \tPUT (bin)\n\t\t * \n\t\t * \n\t\t * images/[categories,+] (\"normal_list\") (N-2)\n\t\t * \tGET (xml)\n\t\t * images/[categories,+]/[1,+] (\"normal\") (N-3)\n\t\t * \tGET (bin)\n\t\t * \tPUT (bin)\n\t\t * \tDELETE\n\t\t * \tPOST (bin) (if image does not exists)\n\t\t * images/[categories,+]/[1,+]/[small,+] (\"normal_resized\") (N-4)\n\t\t * \tGET (bin)\n\t\t * images/[categories,+]/default (\"display_list_of_langs\") (N-3)\n\t\t * \tGET (xml)\n\t\t * images/[categories,+]/default/[en,+] (\"normal_default_i18n\") (N-4)\n\t\t * \tGET (bin)\n\t\t * \tPOST (bin) (if image does not exists)\n\t\t * PUT (bin)\n\t\t * DELETE (bin)\n\t\t * images/[categories,+]/default/[en,+]/[small,+] (\"normal_default_i18n_resized\") (N-5)\n\t\t * \n\t\t * \n\t\t * \tGET (bin)\n\t\t * images/product (\"product_list\") (N-2)\n\t\t * \tGET (xml) (list of image)\n\t\t * images/product/[1,+] (\"product_description\") (N-3)\n\t\t * \tGET (xml) (legend, declinations, xlink to images/product/[1,+]/bin)\n\t\t * images/product/[1,+]/bin (\"product_bin\") (N-4)\n\t\t * \tGET (bin)\n\t\t * POST (bin) (if image does not exists)\n\t\t * images/product/[1,+]/[1,+] (\"product_declination\") (N-4)\n\t\t * \tGET (bin)\n\t\t * \tPOST (xml) (legend)\n\t\t * \tPUT (xml) (legend)\n\t\t * DELETE\n\t\t * images/product/[1,+]/[1,+]/bin (\"product_declination_bin\") (N-5)\n\t\t * \tPOST (bin) (if image does not exists)\n\t\t * \tGET (bin)\n\t\t * \tPUT (bin)\n\t\t * images/product/[1,+]/[1,+]/[small,+] (\"product_declination_resized\") (N-5)\n\t\t * \tGET (bin)\n\t\t * images/product/default (\"product_default\") (N-3)\n\t\t * \tGET (bin)\n\t\t * images/product/default/[en,+] (\"product_default_i18n\") (N-4)\n\t\t * \tGET (bin)\n\t\t * POST (bin)\n\t\t * PUT (bin)\n\t\t * DELETE\n\t\t * images/product/default/[en,+]/[small,+] (\"product_default_i18n_resized\") (N-5)\n\t\t * \t\tGET (bin)\n\t\t * \n\t\t * */\n\t\t\n\t\t// Pre configuration...\n\t\tif (count($this->_urlSegment) == 1)\n\t\t\t$this->_urlSegment[1] = '';\n\t\tif (count($this->_urlSegment) == 2)\n\t\t\t$this->_urlSegment[2] = '';\n\t\tif (count($this->_urlSegment) == 3)\n\t\t\t$this->_urlSegment[3] = '';\n\t\tif (count($this->_urlSegment) == 4)\n\t\t\t$this->_urlSegment[4] = '';\n\t\tif (count($this->_urlSegment) == 5)\n\t\t\t$this->_urlSegment[5] = '';\n\t\t\n\t\t$this->_imageType = $this->_urlSegment[1];\n\t\t\n\t\tswitch ($this->_urlSegment[1])\n\t\t{\n\t\t\t// general images management : like header's logo, invoice logo, etc...\n\t\t\tcase 'general':\n\t\t\t\treturn $this->manageGeneralImages();\n\t\t\t\tbreak;\n\t\t\t// normal images management : like the most entity images (categories, manufacturers..)...\n\t\t\tcase 'categories':\n\t\t\tcase 'manufacturers':\n\t\t\tcase 'suppliers':\n\t\t\tcase 'stores':\n\t\t\t\tswitch ($this->_urlSegment[1])\n\t\t\t\t{\n\t\t\t\t\tcase 'categories':\n\t\t\t\t\t\t$directory = _PS_CAT_IMG_DIR_;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'manufacturers':\n\t\t\t\t\t\t$directory = _PS_MANU_IMG_DIR_;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'suppliers':\n\t\t\t\t\t\t$directory = _PS_SUPP_IMG_DIR_;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'stores':\n\t\t\t\t\t\t$directory = _PS_STORE_IMG_DIR_;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\treturn $this->manageDeclinatedImages($directory);\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t// product image management : many image for one entity (product)\n\t\t\tcase 'products':\n\t\t\t\treturn $this->manageProductImages();\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t// images root node management : many image for one entity (product)\n\t\t\tcase '':\n\t\t\t\t$this->_xmlOutput .= '<image_types>'.\"\\n\";\n\t\t\t\tforeach ($this->_imageTypes as $imageTypeName => $imageType)\n\t\t\t\t\t$this->_xmlOutput .= '<'.$imageTypeName.' xlink:href=\"'.$this->_wsUrl.$this->_urlSegment[0].'/'.$imageTypeName.'\" get=\"true\" put=\"false\" post=\"false\" delete=\"false\" head=\"true\" upload_allowed_mimetypes=\"'.implode(', ', $this->_acceptedImgMimeTypes).'\" />'.\"\\n\";\n\t\t\t\t$this->_xmlOutput .= '</image_types>'.\"\\n\";\n\t\t\t\treturn true;\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\t$this->setErrorDidYouMean(400, 'Image of type \"'.$this->_urlSegment[1].'\" does not exists', $this->_urlSegment[1], array_keys($this->_imageTypes));\n\t\t\t\treturn false;\n\t\t}\n\t}", "public function refreshPicturesFromLdap()\n {\n\n }", "protected function resizeAndUpload() {\n $this->deleteImage();\n $imgAttribute = $this->imagePathAttribute();\n $image = new Imagick($this->image->tempName);\n $image->resizeImage($this->width(), $this->height(), Imagick::FILTER_LANCZOS, 1, !$this->width() || !$this->height() ? false : true);\n $dir = Yii::getAlias(Yii::$app->params['uploadsPath'] . $this->uploadsPrefix());\n $name = $this->uploadsPrefix() . DIRECTORY_SEPARATOR . $this->getImageBaseName() . '_' . date('YmdHis') . '.' . $this->image->extension;\n if (file_exists($dir) === false && @mkdir($dir, 0777, true) === false) {\n $message = Yii::t('jlorente/modelimage', 'The directory to store the image can not be created [{dir}]. Please check the path and the write permissions of this directory.', [\n 'dir' => $dir\n ]);\n $this->owner()->addError('image', $message);\n throw new ImageUploadException($message);\n }\n if ($image->writeImage(Yii::getAlias(Yii::$app->params['uploadsPath'] . $name)) === false) {\n $message = Yii::t('jlorente/modelimage', 'An error ocurred when writting the image to path [{path}]. Please check the write permission of the directory.', [\n 'path' => Yii::$app->params['uploadsPath'] . $name\n ]);\n $this->owner()->addError('image', $message);\n throw new ImageUploadException($message);\n }\n $image->destroy();\n $this->owner()->$imgAttribute = $name;\n if ($this->owner()->update([$imgAttribute]) === false) {\n throw new SaveException($this);\n }\n }", "function custom_rename_images($image) {\n $info = pathinfo($image);\n $dir = $info['dirname'] . '/';\n $ext = '.' . $info['extension'];\n $name = wp_basename($image, '$ext');\n\n // New Name\n $new_name = $dir . substr($name, 0, -strlen($ext)) .\"-\". $ext;\n\n // Rename the intermediate size\n $did_it = rename($image, $new_name);\n\n // Return if successful\n if ($did_it) return $new_name;\n\n // Return on fail\n return $image;\n}", "public function run()\n {\n // we checkout the demo img resources and\n // populate the database with the images\n // we won't be using the traditional factory method\n $folder = \"demo/imgs/\";\n $resources_path = resource_path($folder);\n\n $filesystem = new Filesystem;\n $images = $filesystem->allFiles($resources_path);\n\n $count = count($images);\n\n if ($count === 0) {\n print(\"No image exists in $resources_path\");\n }\n\n foreach ($images as $image) {\n $attribute = $this->storeImage($image, $folder);\n\n factory(FileManager::class)->create($attribute);\n }\n }", "public function run()\n {\n $indir = array_filter(scandir(public_path('images/carousel/')), function($item) {\n return !is_dir('../pages/' . $item) && $item != '.' && $item != '..';\n });\n\n foreach ($indir as $item) {\n $image = factory(App\\Image::class)->create(['url' => 'images/carousel/'.$item]);\n factory(App\\CarouselItem::class, 1)->create(['image_id' => $image->id]);\n }\n }", "private static function setImgDirectories(string $deviceName, $dir) {\n $deviceDir = str_replace(' ', '', $deviceName);\n $subDirName_Today = date(\"Y-m-d\");\n $uploadPath = './uploads/devicesImg/' . $deviceDir . '/' . $dir['loanorreturn'] . '/' . $subDirName_Today . '/';\n\n //Create directory for saving images. A device may be returned the same day, which means the directory might already exist, don't create again if so.\n\n if (!is_dir($uploadPath)) { //Check to avoid mkdir(): File exist warning\n $dir1Bool = mkdir($uploadPath . $dir['back'] . '/', 0777, true); //where 0777 is for access permission, true is for recursive, for creating a directory tree\n $dir2Bool = mkdir($uploadPath . $dir['front'] . '/', 0777);\n $dir3Bool = mkdir($uploadPath . $dir['on'] . '/', 0777);\n\n try {\n if (!$dir1Bool && !$dir2Bool && !$dir3Bool) {\n self::removeDir($uploadPath); //if error, remove all directories created\n throw new CustomException();\n } else {\n return $uploadPath;\n }\n } catch (CustomException $e) {\n $exception['exception'] = $e->getCustomError(\"Sorry, failed to save the images.\");\n return $exception;\n }\n } else {\n return $uploadPath;\n }\n }", "public function createFolder()\n {\n $path = 'assets/admin/images/profiles';\n if (!file_exists($path)) File::makeDirectory($path, 0775, true, true);\n }", "public function Do_Upload_images($d) {\n\n $data = array(\n \"table\" => \"comp484_parent_dl\",\n \"field\" => \"parent_id\",\n \"value\" => $d['parent_id']\n );\n $get_number_of_images = $this->GetNumberOfImages($data);\n\n $number = $get_number_of_images['row_count'];\n $uniq_num = uniqid();\n\n // Create directory if it does not exist\n $folder_name = \"license_\" . $uniq_num . '/';\n if (!is_dir(ABSOLUTH_PATH_IMAGES . $folder_name)) {\n mkdir(ABSOLUTH_PATH_IMAGES . $folder_name);\n }\n\n\n $upload_file_new_name = preg_replace('/^.*\\.([^.]+)$/D', \"dl_number_\" . ((int) $number + 1) . \".$1\", basename($_FILES[\"uploadimage\"]['name']));\n\n $upload_file = ABSOLUTH_PATH_IMAGES . $folder_name . $upload_file_new_name;\n\n //$path_2 = FE_IMAGES . $logo_name . \"_logo/\";\n //$path = P_IMAGE_PATH . $logo_name . \"_logo/\";\n\n $uploadOk = 1;\n\n $imageFileType = pathinfo($upload_file, PATHINFO_EXTENSION);\n\n\n if (isset($_POST)) {\n \n }\n if (file_exists($upload_file)) {\n $uploadOk = 0;\n }\n if ($_FILES['uploadimage'][\"size\"] > 5000000) {\n \n }\n if ($imageFileType != \"jpg\" && $imageFileType != \"png\" && $imageFileType != \"jpeg\" && $imageFileType != \"gif\" && $imageFileType != \"PNG\" && $imageFileType != \"JPG\" && $imageFileType != \"JPEG\" && $imageFileType != \"GIF\") {\n $uploadOk = 0;\n }\n if ($uploadOk == 0) {\n \n } else {\n if (file_exists(\"$folder_name.$upload_file\")) {\n unlink(\"$folder_name.$upload_file\");\n }\n\n if (move_uploaded_file($_FILES['uploadimage'][\"tmp_name\"], $upload_file)) {\n\n $insert_image = \"INSERT INTO `comp484_parent_dl` (parent_id, other_name, location, image_name, date_added) \"\n . \"VALUES \"\n . \"('\" . $d['parent_id'] . \"', '\" . $d['other_name'] . \"', '\" . $path . \"', \" . $upload_file_new_name . \"', '\" . $date_added . \"')\";\n $insert_result = $this->_mysqli->query($insert_image);\n return true;\n } else {\n return false;\n }\n }\n }", "public function run()\n\t{\n DB::table('images')->delete();\n\n Image::create(array('type' => 'jpg'));\n Image::create(array('type' => 'png'));\n Image::create(array('type' => 'jpg'));\n Image::create(array('type' => 'jpg'));\n Image::create(array('type' => 'jpg'));\n Image::create(array('type' => 'jpg'));\n Image::create(array('type' => 'jpg'));\n Image::create(array('type' => 'jpg'));\n Image::create(array('type' => 'jpg'));\n Image::create(array('type' => 'jpg'));\n Image::create(array('type' => 'jpg'));\n Image::create(array('type' => 'jpg'));\n Image::create(array('type' => 'jpg'));\n Image::create(array('type' => 'jpg'));\n Image::create(array('type' => 'jpg'));\n\t}", "private function cacheImages()\n {\n $prevArgs = $this->readRunfile();\n $fetchList = [];\n\n // Build a list of to be cached dates\n $baseDate = (new \\DateTime())->modify(sprintf('-%d day', $this->args['date'] - 1));\n for ($i = 0; $i < $this->args['n']; $i++) {\n $date = $baseDate->modify('-1 day')->format('Ymd');\n $fetchList[$date] = true;\n }\n\n // Check current cache\n $dirIterator = new \\DirectoryIterator($this->args['cacheDir']);\n foreach ($dirIterator as $image) {\n if ($image->isFile() && $image->getExtension() === 'jpg') {\n $imageShouldBeCached = in_array($image->getBasename('.jpg'), array_keys($fetchList));\n if ($prevArgs === $this->args && $imageShouldBeCached) {\n // Image already present - no need to download it again\n unset($fetchList[$image->getBasename('.jpg')]);\n $this->cachedImages[] = $image->getRealPath();\n } else {\n // Config changed or cache duration expired - remove the file\n unlink($image->getRealPath());\n }\n }\n }\n\n $this->fetchImageFiles($fetchList);\n\n if ($prevArgs !== $this->args) {\n $this->writeRunfile();\n }\n }" ]
[ "0.6724631", "0.6261996", "0.61731404", "0.6106629", "0.6080195", "0.6024589", "0.59907615", "0.59659207", "0.59607124", "0.5942988", "0.59392405", "0.5929395", "0.5920596", "0.5881747", "0.58650184", "0.5835929", "0.58212864", "0.5816803", "0.58081275", "0.5807184", "0.5806895", "0.5802367", "0.5799296", "0.5768973", "0.5726822", "0.568087", "0.5657468", "0.5625933", "0.5603732", "0.5602487", "0.55748713", "0.555557", "0.554906", "0.55232954", "0.5520435", "0.5518926", "0.5492649", "0.5483303", "0.5466678", "0.5449342", "0.5447205", "0.54403394", "0.54370743", "0.5435275", "0.54333645", "0.5431012", "0.5420199", "0.53919184", "0.53872186", "0.538305", "0.5373295", "0.53627986", "0.5357877", "0.5352574", "0.5346834", "0.534459", "0.5326224", "0.5319379", "0.531188", "0.53057635", "0.52921385", "0.52804506", "0.52749074", "0.52643126", "0.5255362", "0.5236258", "0.52327204", "0.52304834", "0.52298826", "0.52266866", "0.5222409", "0.5220093", "0.5213195", "0.52090937", "0.51885265", "0.51876295", "0.51813334", "0.51808816", "0.51799333", "0.5174703", "0.5174529", "0.517218", "0.5170149", "0.5169189", "0.5168229", "0.51643515", "0.5160912", "0.5160082", "0.5144096", "0.513801", "0.51357096", "0.51195854", "0.5119303", "0.5118946", "0.51187503", "0.5106792", "0.5104478", "0.5103518", "0.5096667", "0.5093975" ]
0.77328247
0
Count all images, live and pending (but not offline) used by method recreateImages.
Посчитать все изображения, живые и ожидаемые (но не отключенные), используемые методом recreateImages.
function countImages() { $stmt = $this->dbh->prepare('SELECT count(*) FROM imagesTable'); $stmt->execute(); $imagesCount = $stmt->fetchColumn(); $status = 'offline'; $stmt = $this->dbh->prepare('SELECT count(*) FROM pendingImagesTable LEFT JOIN pendingItemsTable ON pendingImagesTable.pending_id=pendingItemsTable.id WHERE status != "offline"'); $stmt->execute(); $imagesCount = $imagesCount + $stmt->fetchColumn(); return ($imagesCount); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function ImageCount();", "public function countImages()\n {\n $this->db->query('SELECT COUNT(*) AS im \n FROM pd_images WHERE gl_created');\n $results = $this->db->resultSet();\n return $results;\n\n }", "public function getNumberImages () {}", "public function count(): int\n {\n return count($this->images);\n }", "public function getImageCount()\n {\n return count($this->getImageList());\n }", "public function getImagesCount()\n {\n $count = Image::count();\n return $count;\n }", "public function getImagesCount() {\r\n return count($this->images);\r\n }", "function numPics() \t{\treturn $this->getOne(\"select count(*) RES from wf_images\")['RES'];\t}", "function getCountImages() {\n\t\t$SQL = \"SELECT COUNT(id) AS count FROM \". TABLEPREFIX .\"img\";\n\t\t$Count = mysql_fetch_object(mysql_query($SQL));\n\t\treturn $Count->count;\n\t}", "public function numImages() { return $this->_m_numImages; }", "function getCountImagesShow() {\n\t\t\t \t$SQL = \"SELECT COUNT(id) AS count FROM \". TABLEPREFIX .\"img \"\n\t \t\t\t.\" WHERE showimg = 'true'\";\n\t \t$Count = mysql_fetch_object(mysql_query($SQL));\n\t \treturn $Count->count;\t \t\t\n\t }", "public function getImageIterations () {}", "public function imageCount() {\n return number_format($this->Images->count(),0,\",\",\".\");\n }", "public function getUserImagesCount()\n {\n // $count = Image::join('user_datasets','user_datasets.id','=','images.dataset_id')\n // -> where('user_datasets.user_id','!=','1')->count();\n\n $count = ImageClasslabels::join('classlabel','classlabel.id','=','imageclasslabels.class_id')\n -> where('classlabel.dataset_id','!=','1')\n -> count();\n return $count;\n }", "function countPictures(){\n\t\t\t$d_cpics = $this->dbconn->query(\"SELECT COUNT(*) AS count FROM pictures\")->fetch();\n\t\t\t\n\t\t\treturn array(\n\t\t\t\t\"count\" => $d_cpics[\"count\"]\n\t\t\t);\n\t\t}", "function imageCount($id){\n\t Controller::loadModel(\"MagazineImage\");\n\t $count = $this->MagazineImage->find(\"count\", array(\"conditions\" => array(\"MagazineImage.magazine_id\" =>$id)));\n\t $this->set('count', array('count' => $count));\n\t}", "public function getAdminImagesCount()\n {\n // $count = Image::join('user_datasets','user_datasets.id','=','images.dataset_id')\n // -> where('user_datasets.user_id','=','1')->count();\n\n $count = ImageClasslabels::join('classlabel','classlabel.id','=','imageclasslabels.class_id')\n -> where('classlabel.dataset_id','=','1')\n -> count();\n return $count;\n }", "public function getMaxRefreshImages();", "function getCountViews() {\n\t\t$SQL = \"SELECT SUM(views) AS views FROM \". TABLEPREFIX .\"img\";\n\t\t$Count = mysql_fetch_object(mysql_query($SQL));\n\t\treturn $Count->views;\n\t}", "function getCountImagesNotShow() {\n\t\t\t \t$SQL = \"SELECT COUNT(id) AS count FROM \". TABLEPREFIX .\"img \"\n\t \t\t\t.\" WHERE showimg = 'false'\";\n\t \t$Count = mysql_fetch_object(mysql_query($SQL));\n\t \treturn $Count->count;\t \t\t\n\t }", "function sizeOfImages() {\n\t\t$imagefolder = substr(ALBUM_FOLDER_SERVERPATH, 0, -1);\n\t\tif (is_dir($imagefolder)) {\n\t\t\treturn dirsize($imagefolder);\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "function countUnassigned()\r\n {\r\n $db =& eZDB::globalDatabase();\r\n\r\n $db->query_single( $image, \"SELECT COUNT(Image.ID) as Count, Link.ImageID\r\n FROM eZImageCatalogue_Image AS Image\r\n LEFT JOIN eZImageCatalogue_ImageCategoryLink AS Link\r\n ON Image.ID=Link.ImageID\r\n WHERE ImageID IS NULL\r\n GROUP By ImageID\" );\r\n\r\n return $image[$db->fieldName( \"Count\" )];\r\n }", "public static function count() {}", "public function testAlbumImageCount() {\n\n\t\t$user = GalleryTestLib::createUser();\n\t\t$album = GalleryTestLib::createAlbum($user->guid);\n\n\t\t$expected_count = 5;\n\n\t\tfor ($i = 0; $i < $expected_count; $i++) {\n\t\t\tGalleryTestLib::createImage($user->guid, $album->guid);\n\t\t}\n\n\t\t$actual_count = $album->countImages();\n\n\t\t$this->assertEqual($actual_count, $expected_count);\n\n\t\t$user->delete();\n\t}", "public function averageImages () {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "public function count() {}", "function getNumImages($publishedOnly=false) {\n\t\tif ($publishedOnly) {\n\t\t\t$rows = query_full_array(\"SELECT `id` FROM \" . prefix('albums').\" WHERE `show`=0\");\n\t\t\tif (is_array($rows)) {\n\t\t\t\t$exclude = '';\n\t\t\t\tforeach ($rows as $row)\t{\n\t\t\t\t\tif (!empty($row['id'])) {\n\t\t\t\t\t\t$exclude .= \" `albumid`!=\".$row['id'].' AND ';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$exclude = substr($exclude, 0, strlen($exclude)-5);\n\t\t\t} else {\n\t\t\t\t$exclude = '';\n\t\t\t}\n\t\t\tif ($publishedOnly) {\n\t\t\t\tif (empty($exclude)) {\n\t\t\t\t\t$exclude = '`show`=1';\n\t\t\t\t} else {\n\t\t\t\t\t$exclude = ' `show`=1 AND '.$exclude;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!empty($exclude)) {\n\t\t\t\t$exclude = ' WHERE '.$exclude;\n\t\t\t}\n\t\t} else {\n\t\t\t$exclude = '';\n\t\t}\n\t\t$result = query_single_row(\"SELECT count(*) as `image_count` FROM \".prefix('images').$exclude);\n\t\treturn $result['image_count'];\n\t}", "public function count() {}", "public function count() {}", "function countImages($subgalleries = false)\n {\n return count($this->_thumbs);\n }", "public function countAll() {}", "public function countAll() {}", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function count();", "public function countAll() {}", "function handle_image_counter($image_id_ary, $add, $readd = false)\r\n{\r\n\tglobal $config, $gallery_config, $db;\r\n\r\n\tif (!function_exists('gallery_hookup_image_counter'))\r\n\t{\r\n\t\tglobal $gallery_root_path, $phpbb_root_path, $phpEx;\r\n\t\tinclude($phpbb_root_path . $gallery_root_path . 'includes/hookup_gallery.' . $phpEx);\r\n\t}\r\n\r\n\t$num_images = $num_comments = 0;\r\n\t$sql = 'SELECT SUM(image_comments) comments\r\n\t\tFROM ' . GALLERY_IMAGES_TABLE . '\r\n\t\tWHERE image_status ' . (($readd) ? '=' : '<>') . ' ' . IMAGE_UNAPPROVED . '\r\n\t\t\tAND ' . $db->sql_in_set('image_id', $image_id_ary) . '\r\n\t\tGROUP BY image_user_id';\r\n\t$result = $db->sql_query($sql);\r\n\t$num_comments = $db->sql_fetchfield('comments');\r\n\t$db->sql_freeresult($result);\r\n\r\n\t$sql = 'SELECT COUNT(image_id) images, image_user_id\r\n\t\tFROM ' . GALLERY_IMAGES_TABLE . '\r\n\t\tWHERE image_status ' . (($readd) ? '=' : '<>') . ' ' . IMAGE_UNAPPROVED . '\r\n\t\t\tAND ' . $db->sql_in_set('image_id', $image_id_ary) . '\r\n\t\tGROUP BY image_user_id';\r\n\t$result = $db->sql_query($sql);\r\n\r\n\twhile ($row = $db->sql_fetchrow($result))\r\n\t{\r\n\t\t$sql_ary = array(\r\n\t\t\t'user_id'\t\t\t\t=> $row['image_user_id'],\r\n\t\t\t'user_images'\t\t\t=> $row['images'],\r\n\t\t);\r\n\t\tgallery_hookup_image_counter($row['image_user_id'], (($add) ? $row['images'] : 0 - $row['images']));\r\n\r\n\t\t$num_images = $num_images + $row['images'];\r\n\t\t$sql = 'UPDATE ' . GALLERY_USERS_TABLE . '\r\n\t\t\tSET user_images = user_images ' . (($add) ? '+ ' : '- ') . $row['images'] . '\r\n\t\t\tWHERE ' . $db->sql_in_set('user_id', $row['image_user_id']);\r\n\t\t$db->sql_query($sql);\r\n\t\tif ($db->sql_affectedrows() != 1)\r\n\t\t{\r\n\t\t\t$sql = 'INSERT INTO ' . GALLERY_USERS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);\r\n\t\t\t$db->sql_query($sql);\r\n\t\t}\r\n\t}\r\n\t$db->sql_freeresult($result);\r\n\r\n\t// Since phpBB 3.0.5 this is the better solution\r\n\t// If the function does not exist, we load it from gallery/includes/functions_phpbb.php\r\n\tset_config_count('num_images', (($add) ? $num_images : 0 - $num_images), true);\r\n\tset_gallery_config_count('num_comments', (($add) ? $num_comments : 0 - $num_comments), true);\r\n}", "public function countAll();", "function sukelius_get_image_attachment_count() {\r\n\t$images = get_children( array( 'post_parent' => get_the_ID(), 'post_type' => 'attachment', 'post_mime_type' => 'image', 'numberposts' => -1 ) );\r\n\treturn count( $images );\r\n}", "abstract public function count();", "abstract public function count();", "public function getImageChannelStatistics () {}", "function recreateImages()\n {\n header('Content-Type: text/event-stream');\n header('Cache-Control: no-cache');\n $progressPercent = 0;\n $imagesCount = $this->countImages();\n if (empty($imagesCount)) $imagesCount = 1;\n $backupDate = date('Y-m-d-H-i-s');\n\n // backup images file\n $this->eventMessage('Backup in progress', 5);\n $src = CONFIG_DIR.'/content/images';\n $dst = CONFIG_DIR.'/content/backups/images-' . $backupDate;\n if ($this->copyDirectory($src, $dst))\n $this->eventMessage('Backup complete to directory: images-'. $backupDate, 9);\n else\n $this->eventMessage('Backing up images FAILED, did not proceed with recreate images', 100);\n\n // create new folders\n $percentPerImage = floor(90 / $imagesCount);\n $this->eventMessage('Recreating images in progress:', $progressPercent);\n ini_set('max_execution_time', 300); //300 seconds = 5 minutes\n $baseFolder = 'temp-images-' . $backupDate;\n $tempFolder = CONFIG_DIR.'/content/backups/' . $baseFolder;\n if (!mkdir($tempFolder)) {\n $this->reportError('cms/model/edit_update.php recreateImages. Failed to create folder: '. $tempFolder);\n }\n $subFolders = array (\n '/landscape', '/portrait', '/panorama', '/square',\n '/landscape/1x', '/portrait/1x', '/panorama/1x', '/square/1x',\n '/landscape/2x', '/portrait/2x', '/panorama/2x', '/square/2x',\n '/landscape/3x', '/portrait/3x', '/panorama/3x', '/square/3x',\n '/thumbnail', '/uncropped', '/original',);\n foreach ($subFolders as $subFolder) {\n if (!mkdir($tempFolder . $subFolder)) {\n $this->reportError('cms/model/edit_update.php recreateImages. Failed to create folder: '. $tempFolder . $subFolder);\n }\n }\n\n // recreate live images\n $items = $this->edit->getContentItemsList();\n foreach ($items as $item) {\n $images = $this->edit->getContentImages($item);\n foreach ($images as $image) {\n $progressPercent += ($percentPerImage);\n $this->eventMessage('&nbsp;&nbsp; &nbsp;' . $image['src'], $progressPercent);\n if (!copy(CONFIG_DIR.'/content/images/original/'.$image['src'], $tempFolder.'/original/'.$image['src']))\n error_log('model/edit_update recreateImages. copy to original failed');\n if (!copy(CONFIG_DIR.'/content/images/uncropped/'.$image['src'], $tempFolder.'/uncropped/'.$image['src']))\n error_log('model/edit_update recreateImages. copy to uncropped failed');\n if (!copy(CONFIG_DIR.'/content/images/thumbnail/'.$image['src'], $tempFolder.'/thumbnail/'.$image['src']))\n error_log('model/edit_update recreateImages. copy to thumbnail failed');\n $this->editUpdate->createWebsiteImages(array($image), 'backups/'.$baseFolder);\n }\n }\n\n // recreate images for pending items\n $items = $this->edit->getPendingItemsList();\n foreach ($items as $item) {\n $images = $this->edit->getPendingImages($item);\n foreach ($images as $image) {\n $progressPercent += $percentPerImage;\n $this->eventMessage('&nbsp;&nbsp; &nbsp;' . $image['src'], $progressPercent);\n if (!copy(CONFIG_DIR.'/content/images/original/'.$image['src'], $tempFolder.'/original/'.$image['src']))\n error_log('model/edit_update recreateImages. copy to original failed');\n if (!copy(CONFIG_DIR.'/content/images/uncropped/'.$image['src'], $tempFolder.'/uncropped/'.$image['src']))\n error_log('model/edit_update recreateImages. copy to uncropped failed');\n if (!copy(CONFIG_DIR.'/content/images/thumbnail/'.$image['src'], $tempFolder.'/thumbnail/'.$image['src']))\n error_log('model/edit_update recreateImages. copy to thumbnail failed');\n }\n }\n\n // move newly created images to live images directory\n $this->removeDirectory(CONFIG_DIR.'/content/images');\n rename($tempFolder, CONFIG_DIR.'/content/images');\n $this->eventMessage('PROCESS COMPLETE - new images created.', 100);\n }", "public function countPhotos(){\n $countPhotos = $this->base_de_donnee->prepare('SELECT COUNT(*) AS nbr FROM photos');\n $countPhotos->execute();\n \n $retour = $countPhotos->fetch(PDO::FETCH_OBJ);\n $countPhotos->closeCursor();\n \n return $retour;\n }", "public function count() {\n // TODO: Implement count() method.\n }", "public function count() {\n // TODO: Implement count() method.\n }", "public abstract function count();", "function countAll() ;", "function numImages($albumGet) {\n\t\tunset($this->photos);\n\t\n\t\tif (file_exists(dirRoot.\"/\".$albumGet.'/'.imageDir)) {\n\t\t\t$dirimages = opendir(dirRoot.\"/\".$albumGet.\"/\".imageDir) \n\t\t\tor print(\"We can't open the correct directory!\");\n\n\t\t\t$photocount = 0;\n\n\t\t\twhile ($files = readdir($dirimages) ) {\n\t\t\t\tif (preg_match('/.*\\.(jpg|png|gif|JPG|PNG|GIF)/',$files) && !@strstr($files,skipIfContains)) {\n\t\t\t\t\t$photocount = $photocount + 1;\n\t\t\t\t\t$this->photos[$photocount]['name'] = $files;\n\t\t\t\t}\n\t\t\t}\t\t\n\t\t} else {\n\t\t\techo \"<p><strong>The '$albumGet' folder does not exist or is not setup properly.</strong></p>\";\n\t\t}\n\t\t\n\t\treturn count($this->photos);\n\t}", "public function getCount()\n {\n return count($this->getUpload());\n }", "public function countPhoto_article(){\n\t\t\t\t\t $this->db->setTablename($this->tablename);\n return $this->db->getRows(array(\"return_type\"=>\"count\"));\n\t\t\t\t\t }", "public function count() {\n }", "public function markAllImagesAsProcessed()\n {\n \\XLite\\Core\\Database::getRepo('XLite\\Model\\Image\\Product\\Image')->unmarkAsProcessed();\n }", "protected function count_items_to_process() {\n\t\treturn $this->count_attachments_with_legacy_metadata( $this->blog_prefix );\n\t}", "function count() ;", "public function getDateWiseVideoUploadCount();", "private function cacheImages()\n {\n $prevArgs = $this->readRunfile();\n $fetchList = [];\n\n // Build a list of to be cached dates\n $baseDate = (new \\DateTime())->modify(sprintf('-%d day', $this->args['date'] - 1));\n for ($i = 0; $i < $this->args['n']; $i++) {\n $date = $baseDate->modify('-1 day')->format('Ymd');\n $fetchList[$date] = true;\n }\n\n // Check current cache\n $dirIterator = new \\DirectoryIterator($this->args['cacheDir']);\n foreach ($dirIterator as $image) {\n if ($image->isFile() && $image->getExtension() === 'jpg') {\n $imageShouldBeCached = in_array($image->getBasename('.jpg'), array_keys($fetchList));\n if ($prevArgs === $this->args && $imageShouldBeCached) {\n // Image already present - no need to download it again\n unset($fetchList[$image->getBasename('.jpg')]);\n $this->cachedImages[] = $image->getRealPath();\n } else {\n // Config changed or cache duration expired - remove the file\n unlink($image->getRealPath());\n }\n }\n }\n\n $this->fetchImageFiles($fetchList);\n\n if ($prevArgs !== $this->args) {\n $this->writeRunfile();\n }\n }", "public function count () : int\n {\n return count($this->files);\n }" ]
[ "0.7456352", "0.7415533", "0.7392838", "0.7220558", "0.7106606", "0.7104144", "0.6987322", "0.69290996", "0.6894936", "0.6641051", "0.65703", "0.6503849", "0.6389126", "0.6356916", "0.6325245", "0.62836534", "0.6275333", "0.62558055", "0.62552804", "0.6243392", "0.6197889", "0.6148178", "0.61463827", "0.6134747", "0.61330265", "0.61002064", "0.61002064", "0.61002064", "0.61002064", "0.61002064", "0.61002064", "0.61002064", "0.61002064", "0.61002064", "0.61002064", "0.61002064", "0.61002064", "0.61002064", "0.61002064", "0.61002064", "0.61002064", "0.61002064", "0.61002064", "0.61002064", "0.61002064", "0.61002064", "0.60993785", "0.60990477", "0.6098272", "0.6098272", "0.60410106", "0.6030325", "0.6030325", "0.60292435", "0.60292435", "0.60292435", "0.60292435", "0.60292435", "0.60292435", "0.60292435", "0.60292435", "0.60292435", "0.60292435", "0.60292435", "0.60292435", "0.60292435", "0.60292435", "0.60292435", "0.60292435", "0.60292435", "0.60292435", "0.60292435", "0.60292435", "0.60292435", "0.60292435", "0.60292435", "0.60292435", "0.60291624", "0.59903336", "0.5910529", "0.58768296", "0.58588636", "0.58588636", "0.5832769", "0.58228964", "0.5813662", "0.58109814", "0.58109814", "0.5810172", "0.5806408", "0.58029795", "0.57930464", "0.5777458", "0.575761", "0.57523143", "0.57393855", "0.5736228", "0.57238585", "0.57109785", "0.5708658" ]
0.7569045
0
Removes a directory, including its files and subdirectories
Удаляет директорию, включая её файлы и поддиректории
function removeDirectory($dir) { if (is_dir($dir)) { $objects = scandir($dir); foreach ($objects as $object) { if ($object != "." && $object != "..") { if (is_dir($dir."/".$object)) $this->removeDirectory($dir."/".$object); else unlink($dir."/".$object); } } reset($objects); if (!rmdir($dir)) $this->reportError('cms/model/admin.php removeDirectory. FAILED to remove: '. $dir); } else $this->reportError('cms/model/admin.php removeDirectory. not a directory: '. $dir); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function removeDirectory();", "function removeDir($dir)\n{\n\n $files = new RecursiveIteratorIterator(\n new RecursiveDirectoryIterator($dir, RecursiveDirectoryIterator::SKIP_DOTS),\n RecursiveIteratorIterator::CHILD_FIRST\n );\n\n foreach ($files as $fileinfo)\n {\n $todo = $fileinfo->isDir()\n ? 'rmdir'\n : 'unlink';\n\n $todo($fileinfo->getRealPath());\n }\n\n return rmdir($dir);\n}", "function recursiveRemoveDirectory($dir)\n{\n $files = array_diff(scandir($dir), array('.','..')); \n\n foreach ($files as $file) \n\t{ \n (is_dir(\"$dir/$file\")) ? recursiveRemoveDirectory(\"$dir/$file\") : unlink(\"$dir/$file\"); \n }\n\t\n return rmdir($dir);\n}", "function remove_directory(string $path)\n{\n if (file_exists($path)) {\n\n foreach (glob(append_to_url($path, '*')) as $element) {\n\n if (is_dir($element)) {\n\n remove_directory($element);\n } else {\n\n unlink($element);\n }\n }\n\n rmdir($path);\n }\n}", "function recursiveRemoveDirectory($directory) {\n foreach(glob(\"{$directory}/*\") as $file)\n {\n if(is_dir($file)) { \n recursiveRemoveDirectory($file);\n } else {\n unlink($file);\n }\n }\n\n if (is_dir($directory)) {\n \trmdir($directory);\n }\n}", "function removeDirRec($dir){\n if ($objs = glob($dir.\"/*\")) {\n foreach($objs as $obj) {\n is_dir($obj) ? removeDirRec($obj) : unlink($obj);\n }\n }\n rmdir($dir);\n }", "public function remove_directory($dir)\n {\n \n \t\tforeach(glob($dir . '/*') as $file) {\n \t\t\tif(is_dir($file))\n \t\t\t\t$this->remove_directory($file);\n \t\t\telse\n \t\t\t\tunlink($file);\n \t\t}\n \t\t$this->remove_directory($dir);\n }", "function recursivelyRemoveDirectory($directory)\n{\n if (is_dir($directory)) {\n $objects = scandir($directory);\n\n foreach ($objects as $object) {\n if ($object !== '.' && $object !== '..') {\n $filePath = \"{$directory}/{$object}\";\n\n if (is_dir($filePath) && ! is_link($filePath)) {\n recursivelyRemoveDirectory($filePath);\n } else {\n unlink($filePath);\n }\n }\n }\n\n rmdir($directory);\n }\n}", "static function removeDir($dir) {\n\t\tif (is_dir($dir)) {\n\t\t\t$objects = scandir($dir);\n\t\t\tforeach ($objects as $object) {\n\t\t\t\tif ($object != \".\" && $object != \"..\") {\n\t\t\t\t if (filetype($dir.DIR_SEP.$object) == \"dir\") {\n\t\t\t\t\t\tHUS::removeDir($dir.DIR_SEP.$object); \n\t\t\t\t } else {\n\t\t\t\t\t unlink($dir.DIR_SEP.$object);\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t}\n\t\t\treset($objects);\n\t\t\trmdir($dir);\n\t\t}\n }", "function system_remove_directory($dir) { \n if (is_dir($dir)) { \n $objects = scandir($dir); \n foreach ($objects as $object) { \n if ($object != \".\" && $object != \"..\") { \n if (filetype($dir.\"/\".$object) == \"dir\") \n \tsystem_remove_directory($dir.\"/\".$object); \n else \n \tunlink($dir.\"/\".$object); \n } \n } \n reset($objects); \n return rmdir($dir); \n }\n return false;\n }", "function removeDirectory($directory)\n{\n if (!($dir = @opendir($directory))) {\n return;\n }\n\n while (false !== ($file = readdir($dir))) {\n if ($file === '.' || $file === '..') {\n continue;\n }\n\n if (is_dir($directory.'/'.$file)) {\n removeDirectory($directory.'/'.$file);\n\n continue;\n }\n\n unlink($directory.'/'.$file);\n }\n\n closedir($dir);\n\n @rmdir($directory);\n}", "public static function rmDir($dir)\n {\n if (is_dir($dir))\n {\n $objects = scandir($dir);\n foreach ($objects as $object)\n {\n if ($object != \".\" && $object != \"..\")\n {\n if (filetype($dir.DIRECTORY_SEPARATOR.$object) == \"dir\")\n self::rmDir($dir.DIRECTORY_SEPARATOR.$object);\n else\n unlink($dir.DIRECTORY_SEPARATOR.$object);\n }\n }\n reset($objects);\n \n rmdir($dir);\n }\n }", "private function delete_directory($dir) {\n\t\t\t$iterator = new RecursiveDirectoryIterator($dir);\n\t\t\tforeach (new RecursiveIteratorIterator($iterator, RecursiveIteratorIterator::CHILD_FIRST) as $file) {\n\t\t\tif ($file->isDir()) {\n\t\t\t\t@rmdir($file->getPathname());\n\t\t\t } \n\t\t\t else {\n\t\t\t @unlink($file->getPathname());\n\t\t\t }\n\t\t }\n\t\t @rmdir($dir);\n\t }", "function rrmdir($dir) {\n foreach (glob($dir . '/*') as $file) {\n if ( is_dir($file) ) {\n rrmdir($file);\n } else {\n unlink($file);\n }\n }\n rmdir($dir);\n}", "function delTree($dir) {\n $files = glob( $dir . '*', GLOB_MARK );\n foreach( $files as $file ){\n if( substr( $file, -1 ) == '/' )\n delTree( $file );\n else\n unlink( $file );\n }\n rmdir( $dir );\n}", "public function clearDirectory($dir) {\n $directoryIterator = new RecursiveDirectoryIterator($dir, FilesystemIterator::SKIP_DOTS);\n $entriesIterator = new RecursiveIteratorIterator($directoryIterator, RecursiveIteratorIterator::CHILD_FIRST);\n foreach ($entriesIterator as $file) {\n $file->isDir() ? rmdir($file) : unlink($file);\n }\n }", "function rrmdir($dir) {\n if (is_dir($dir)) {\n $files = scandir($dir);\n foreach ($files as $file)\n if ($file != \".\" && $file != \"..\") rrmdir(\"$dir/$file\");\n rmdir($dir);\n }\n else if (file_exists($dir)) unlink($dir);\n}", "public function rmdirDeletesADirectory()\n\t{\n\t\t$dir = WORK_DIR . 'dirToDelete';\n\t\t$file = WORK_DIR . 'dirToDelete/foo.txt';\n\n\t\tif (file_exists($file)) {\n\t\t\tunlink($file);\n\t\t}\n\t\tif (is_dir($dir)) {\n\t\t\trmdir($dir);\n\t\t}\n\t\tmkdir($dir);\n\t\tfile_put_contents($file, 'lorem ipsum');\n\t\t$fsDriver = new FileSystemDriver(WORK_DIR);\n\t\t$fsDriver->rmdir('dirToDelete');\n\n\t\t$this->assertFalse(is_file($file), 'The file should have been deleted.');\n\t\t$this->assertFalse(is_dir($dir), 'The dir should have been deleted');\n\t}", "public function delete_directory($dir)\n\t{\n if(is_dir($dir)) \n {\n \tif($dh = opendir($dir)) \n \t{\n \twhile(($file = readdir($dh)) !== false) \n \t{\n \tif($file != '.' && $file != '..') \n \t{\n \tif(is_dir($dir . '/' . $file)) \n \t{\n \t$this->delete_directory($dir . '/' . $file);\n\t\t\t\t\t\t} \n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n \tunlink($dir . '/' . $file);\n }\n \t}\n\t\t\t\t}\n \t}\n \tclosedir($dh);\n \trmdir($dir);\n }\n\t}", "public static function removeDir($dir) {\n if (is_dir($dir)) { //base case. Returns false if it is not a directory or the directory doesn't exist\n foreach (glob(\"$dir*\", GLOB_MARK) as $file) { //appends slash for new directory to be added after\n self::removeDir($file);\n }\n rmdir($dir); //runs second. Must not be viewing the folder, else won't remove it\n } else if (is_file($dir)) { //runs first. Returns false if the file is not a regular file or it doesn't exist\n unlink($dir);\n }\n }", "protected function removeDir($d) {\n\t\t$i = new \\RecursiveIteratorIterator(\n\t\t\tnew \\RecursiveDirectoryIterator($d, \\FilesystemIterator::SKIP_DOTS),\n\t\t\t\\RecursiveIteratorIterator::CHILD_FIRST\n\t\t);\n\t\tforeach ($i as $path) {\n\t\t\t$path->isDir() && !$path->isLink() ? rmdir($path->getPathname()) : unlink($path->getPathname());\n\t\t}\n\n\t\trmdir($d);\n\t}", "function rrmdir($dir)\n{\n if (is_dir($dir)) {\n $files = scandir($dir);\n foreach ($files as $file) {\n if ($file != \".\" && $file != \"..\") {\n rrmdir(\"$dir/$file\");\n }\n }\n\n rmdir($dir);\n } else if (file_exists($dir)) {\n unlink($dir);\n }\n}", "function removeDir($dir, $deleteDir) {\n if(!$dh = @opendir($dir)) return;\n while (($obj = readdir($dh))) {\n if($obj=='.' || $obj=='..') continue;\n if (!@unlink($dir.'/'.$obj)) removeDir($dir.'/'.$obj, true);\n }\n if ($deleteDir){\n closedir($dh);\n @rmdir($dir);\n }\n}", "function rrmdir($dir) {\n foreach (glob($dir . '/*') as $file) {\n if (is_dir($file))\n rrmdir($file);\n else\n unlink($file);\n }\n rmdir($dir);\n}", "function delTree($dir)\n{\n $files = array_diff(scandir($dir), array('.', '..'));\n foreach ($files as $file) {\n (is_dir(\"$dir/$file\")) ? delTree(\"$dir/$file\") : unlink(\"$dir/$file\");\n }\n return rmdir($dir);\n}", "function rrmdir($dir) {\n if (is_dir($dir)) {\n $files = scandir($dir);\n foreach ($files as $file)\n if ($file != \".\" && $file != \"..\") rrmdir(\"$dir/$file\");\n rmdir($dir);\n }\n else if (file_exists($dir) && $dir != 'github.php') unlink($dir);\n}", "function removeFolder($dir)\n{\n\t//loop on all files\n foreach(glob($dir . '/*') as $file)\n\t{\n\t\t//file/folder\n if(is_dir($file))\n removeFolder($file);\n else\n unlink($file);\n }//eof foreach\n\n\t//delete folder\n rmdir($dir);\n}", "public static function removeDir($dir) {\n if (is_dir($dir)) {\n $objects = scandir($dir);\n foreach ($objects as $object) {\n if ($object != \".\" && $object != \"..\") {\n if (filetype($dir . \"/\" . $object) == \"dir\")\n rrmdir($dir . \"/\" . $object);\n else\n unlink($dir . \"/\" . $object);\n }\n }\n reset($objects);\n rmdir($dir);\n }\n }", "function deleteDir($dir) {\n$it = new RecursiveDirectoryIterator($dir, RecursiveDirectoryIterator::SKIP_DOTS);\n$files = new RecursiveIteratorIterator($it,\nRecursiveIteratorIterator::CHILD_FIRST);\nforeach($files as $file) {\nif ($file->isDir()){\nrmdir($file->getRealPath());\n} else {\nunlink($file->getRealPath());\n}\n}\nrmdir($dir);\n}", "function rmDirRecursive($dir)\n{\n $dir = rtrim($dir, '/');\n if (is_dir($dir)) {\n $dirHandler = opendir($dir);\n if ($dirHandler !== FALSE) {\n while (($item = readdir($dirHandler)) !== FALSE) {\n if ($item == '.' || $item == '..') {\n continue;\n }\n $fullpath = $dir.'/'.$item;\n if (is_file($fullpath)) {\n unlink($fullpath);\n }\n if (is_dir($fullpath)) {\n rmDirRecursive($fullpath);\n }\n }\n closedir($dirHandler);\n }\n rmdir($dir);\n }\n return TRUE;\n}", "private function clearDir($path)\n {\n $iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path), RecursiveIteratorIterator::CHILD_FIRST);\n\n $exclude = array('.htaccess', '..', '.');\n foreach ($iterator as $file) {\n if (in_array($file->getFilename(), $exclude)) {\n continue;\n }\n if ($file->isDir()) {\n rmdir($file->getPathname());\n } else {\n unlink($file->getPathname());\n }\n }\n }", "public static function deleteDirectory($path) {\n $dir = opendir($path);\n while (false !== ($filename = readdir($dir))) {\n if ($filename == '.' || $filename == '..') {\n continue;\n }\n $path = $path . '/' . $filename;\n if (is_dir($path)) {\n $this->deleteDirectory($path);\n } else {\n unlink($path);\n }\n }\n rmdir($path);\n }", "function cleanDirectory($path)\n{\n\tif (is_dir($path)) {\n\t\t$files = (new Finder())->in($path)->depth('== 0');\n\t\t$paths = [];\n\n\t\tforeach ($files as $file) {\n\t\t\t$paths[] = $file->getPathname();\n\t\t}\n\n\t\t(new Filesystem())->remove($paths);\n\t}\n}", "function rrmdir($dir)\n{\n if (is_dir($dir)) {\n $objects = scandir($dir);\n foreach ($objects as $object) {\n if ($object != '.' && $object != '..') {\n $file = \"$dir$slash$object\";\n if (filetype($file) == 'dir') {\n rrmdir($file);\n } else {\n unlink($file);\n }\n }\n }\n reset($objects);\n rmdir($dir);\n }\n}", "function rrmdir($dir) {\n if (is_dir($dir)) {\n $objects = scandir($dir);\n foreach ($objects as $object) {\n if ($object != \".\" && $object != \"..\") {\n if (filetype($dir.\"/\".$object) == \"dir\") rrmdir($dir.\"/\".$object); else unlink($dir.\"/\".$object);\n }\n }\n reset($objects);\n rmdir($dir);\n }\n }", "function rrmdir($dir) {\r\n if (is_dir($dir)) {\r\n $files = scandir($dir);\r\n foreach ($files as $file)\r\n if ($file != \".\" && $file != \"..\") rrmdir(\"$dir/$file\");\r\n rmdir($dir);\r\n }\r\n else if (file_exists($dir)) unlink($dir);\r\n }", "public static function deleteDirectory($path) {\n $files = glob($path.'/*');\n foreach ($files as $file) {\n is_dir($file) ? deleteDirectory($file) : unlink($file);\n }\n rmdir($path);\n return;\n }", "final public static function dirCleanup($dir)\n\t{\n\t\tforeach (scandir($dir) as $name) {\n\t\t\tif ('..' === $name or '.' === $name) continue;\n\n\t\t\t$path = \"$dir/$name\";\n\n\t\t\tif (is_dir($path) and is_writable($path)) {\n\t\t\t\tself::dirCleanup($path);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tunlink($path);\n\t\t}\n\n\t\trmdir($dir);\n\t}", "function rrmdir($dir) {\n if( is_dir($dir) ) {\n $objects = scandir($dir);\n foreach($objects as $obj) {\n if($obj != '.' and $obj != '..') {\n if(filetype($dir.'/'.$obj) == \"dir\")\n rrmdir($dir.'/'.$obj);\n else\n unlink($dir.'/'.$obj);\n }\n }\n reset($objects);\n rmdir($dir);\n }\n}", "public function removeDirRecursive(string $dir): void {\n\t\t$this->rmDir($dir);\n\t}", "public static function removeDirectory($dir, $options = [])\n {\n if (!is_dir($dir)) {\n return;\n }\n if (is_link($dir)) {\n unlink($dir);\n } else {\n rmdir($dir);\n }\n }", "function remove_directory($path) {\n\t\t\tif (is_dir($path)) {\n\t\t\t\t$files = glob( $path . DIRECTORY_SEPARATOR . '*');\n\t\t\t\tforeach( $files as $file ){\n\t\t\t\t\t if($file == '.' || $file == '..'){continue;}\n\t\t\t\t\t if(is_dir($file)){\n\t\t\t\t\t\t remove_directory( $file );\n\t\t\t\t\t }else{\n\t\t\t\t\t\t unlink( $file );\n\t\t\t\t\t }\n\t\t\t\t}\n\t\t\t\trmdir( $path ); \n\t\t\t}\n\t\treturn true;\n}", "function rrmdir($dir) { \n if (is_dir($dir)) { \n $objects = scandir($dir); \n foreach ($objects as $object) { \n if ($object != \".\" && $object != \"..\") { \n\tif (filetype($dir.\"/\".$object) == \"dir\") rrmdir($dir.\"/\".$object); else unlink($dir.\"/\".$object); \n } \n } \n reset($objects); \n rmdir($dir); \n } \n}", "public function remove_dir($path)\n {\n // Correct path\n $path = str_replace(array('/', '\\\\'), DS, $path);\n\n // Make sure we have a path, and not a file\n if(is_dir($path))\n {\n // Make sure our path is correct\n if($path[strlen($path)-1] != DS) $path = $path . DS;\n \n // Open the directory\n $handle = @opendir($path);\n if ($handle === false) return false;\n \n // remove all sub directoires and files\n while(false !== ($f = readdir($handle)))\n {\n // Skip \".\" and \"..\" directories\n if($f == \".\" || $f == \"..\") continue;\n\n // make sure we establish the full path to the file again\n $file = $path . $f;\n \n // If is directory, call this method again to loop and delete ALL sub dirs.\n if(is_dir($file)) \n {\n $this->remove_dir($file);\n }\n else \n {\n $this->delete_file($file);\n }\n }\n \n // Close our path\n closedir($handle);\n \n // Clear stats cache and remove our current directory\n $result = rmdir($path);\n clearstatcache();\n return $result;\n }\n return false;\n }", "function deldir($dir){\r\n\t $current_dir = opendir($dir);\r\n\t while($entryname = readdir($current_dir)){\r\n\t if(is_dir(\"$dir/$entryname\") and ($entryname != \".\" and $entryname!=\"..\")){\r\n\t $this->deldir(\"${dir}/${entryname}\");\r\n\t }elseif($entryname != \".\" and $entryname!=\"..\"){\r\n\t unlink(\"${dir}/${entryname}\");\r\n\t }\r\n\t }\r\n\t closedir($current_dir);\r\n\t rmdir(${dir});\r\n\t}", "function rrmdir($dir) {\n foreach(glob($dir . '/*') as $file) {\n if(is_dir($file))\n rrmdir($file);\n else\n unlink($file);\n }\n rmdir($dir);\n \t}", "function rrmdir($dir) { \n if (is_dir($dir)) { \n $objects = scandir($dir); \n foreach ($objects as $object) { \n if ($object != \".\" && $object != \"..\") { \n if (is_dir($dir.\"/\".$object))\n rrmdir($dir.\"/\".$object);\n else\n unlink($dir.\"/\".$object); \n } \n }\n rmdir($dir); \n } \n }", "private static function clearDirectory($path)\n {\n $files = scandir($path);\n array_shift($files);\n array_shift($files);\n foreach ($files as $file) {\n $file = $path . DIRECTORY_SEPARATOR . $file;\n if (is_dir($file)) {\n self::clearDirectory($file);\n } else {\n unlink($file);\n }\n }\n rmdir($path);\n }", "private static function clearDirectory($path)\n {\n $files = scandir($path);\n array_shift($files);\n array_shift($files);\n foreach ($files as $file) {\n $file = $path . DIRECTORY_SEPARATOR . $file;\n if (is_dir($file)) {\n self::clearDirectory($file);\n } else {\n unlink($file);\n }\n }\n rmdir($path);\n }", "function recursive_remove_directory($directory, $empty = FALSE) {\n if (substr($directory, -1) == '/') {\n $directory = substr($directory, 0, -1);\n }\n\n if (!file_exists($directory) || !is_dir($directory)) {\n return FALSE;\n } else if (is_readable($directory)) {\n $handle = opendir($directory);\n\n while (FALSE !== ($item = readdir($handle))) {\n if ($item != '.' && $item != '..') {\n $path = $directory . '/' . $item;\n if (is_dir($path)) {\n recursive_remove_directory($path);\n } else {\n unlink($path);\n }\n }\n }\n closedir($handle);\n if ($empty == FALSE) {\n if (!rmdir($directory)) {\n return FALSE;\n }\n }\n }\n return TRUE;\n}", "private function removeDirectory($path) {\n //permette di scansionare tutto il contenuto della cartella \n $files = glob($path . '/*');\n foreach ($files as $file) {\n //rimuovo tutti i file e le sotto cartelle\n is_dir($file) ? $this->removeDirectory($file) : unlink($file);\n }\n //elimina la cartella\n rmdir($path);\n }", "function remove_dir ($path) {\n\n\tif (is_dir($path)) {\n\n\t\t$scan = scandir($path);\n\n\t\tforeach ($scan as $value) {\n\t\t\tif ($value != '.' && $value != '..') {\n\t\t\t\tif (filetype($path.'/'.$value) == 'dir') {\n\t\t\t\t\tremove_dir($path.'/'.$value);\n\t\t\t\t} else {\n\t\t\t\t\tunlink($path.'/'.$value);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treset($scan);\n\t\trmdir($path);\n\t\treturn true;\n\t}\n\n\treturn false;\n}", "public static function rmdir($dir) { \n $files = array_diff(scandir($dir), array('.','..')); \n foreach ($files as $file) { \n (is_dir(\"$dir/$file\")) ? Funciones::rmdir(\"$dir/$file\") : unlink(\"$dir/$file\"); \n } \n return rmdir($dir); \n }", "private function deleteRecursive($dir)\n {\n foreach (scandir($dir) as $file) {\n if ('.' === $file || '..' === $file) continue;\n if (is_dir(\"$dir/$file\")) $this->deleteRecursive(\"$dir/$file\");\n else unlink(\"$dir/$file\");\n }\n rmdir($dir);\n }", "function removeDirByDir($dir) {\r\n\t\tif (!file_exists($dir)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t$fileList = $this->getPathsByDir($dir);\r\n\t\tforeach ($fileList as $file) {\r\n\t\t\tif (is_dir($file)) {\r\n\t\t\t\t$this->removeDirByDir($file);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tunlink($file);\r\n\t\t\t}\r\n\t\t}\r\n\t\trmdir($dir);\r\n\t}", "static public function removeDirectory($remove_path)\n {\n\t\tif (!file_exists($remove_path)) {\n\t\t\treturn;\n\t\t}\n if (($path = realpath($remove_path)) !== FALSE) {\n if (@chmod($path, 0777) === FALSE) {\n throw new USVN_Exception(T_(\"Can't delete directory %s. Permission denied.\"), $path);\n }\n try {\n \tif (is_dir($path)) {\n \t$dh = opendir($path);\n \t} else {\n \t\treturn;\n \t}\n }\n catch(Exception $e) {\n return;\n }\n while (($file = readdir($dh)) !== false) {\n\t\t\t\tif ($file != '.' && $file != '..') {\n\t\t\t\t\tif (is_dir($path . DIRECTORY_SEPARATOR . $file)) {\n\t\t\t\t\t\tUSVN_DirectoryUtils::removeDirectory($path . DIRECTORY_SEPARATOR . $file);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n if (chmod($path . DIRECTORY_SEPARATOR . $file, 0777) === FALSE) {\n throw new USVN_Exception(T_(\"Can't delete file %s.\", $path . DIRECTORY_SEPARATOR . $file));\n }\n\t\t\t\t\t\tunlink($path . DIRECTORY_SEPARATOR . $file);\n\t\t\t\t\t}\n\t\t\t\t}\n }\n closedir($dh);\n if (@rmdir($path) === FALSE) {\n throw new USVN_Exception(T_(\"Can't delete directory %s.\"), $path);\n }\n }\n }", "function rrmdir($dir) { \n if (is_dir($dir)) { \n $objects = scandir($dir); \n foreach ($objects as $object) { \n if ($object != \".\" && $object != \"..\") { \n if (filetype($dir.\"/\".$object) == \"dir\") \n rrmdir($dir.\"/\".$object); \n else \n unlink($dir.\"/\".$object); \n } \n } \n reset($objects); \n rmdir($dir); \n } \n }", "function rrmdir($dir) {\n foreach(glob($dir . '/*') as $file) {\n if(is_dir($file))\n rrmdir($file);\n else\n unlink($file);\n }\n @rmdir($dir);\n}", "protected function deleteDirectory($dir)\n {\n if (!file_exists($dir)) {\n return;\n }\n\n $iterator = new \\RecursiveIteratorIterator(\n new \\RecursiveDirectoryIterator($dir, \\RecursiveDirectoryIterator::SKIP_DOTS),\n \\RecursiveIteratorIterator::CHILD_FIRST\n );\n\n /** @var \\SplFileInfo $path */\n foreach ($iterator as $path) {\n if ($path->getFilename() === '.gitkeep') {\n continue;\n }\n if ($path->isDir()) {\n rmdir((string) $path);\n } else {\n if (!$path->isFile()) {\n continue;\n }\n unlink((string) $path);\n }\n }\n }", "public static function removeDirectory($directory) {\n\t\t$items = glob ( $directory . DIRECTORY_SEPARATOR . '{,.}*', GLOB_MARK | GLOB_BRACE );\n\t\tforeach ( $items as $item ) {\n\t\t\tif (basename ( $item ) == '.' || basename ( $item ) == '..')\n\t\t\t\tcontinue;\n\t\t\tif (substr ( $item, - 1 ) == DIRECTORY_SEPARATOR)\n\t\t\t\tself::removeDirectory ( $item );\n\t\t\telse\n\t\t\t\tunlink ( $item );\n\t\t}\n\t\tif (is_dir ( $directory ))\n\t\t\trmdir ( $directory );\n\t}", "static function remove_directory($path)\n {\n if ($path == '/') {\n return false;\n }\n $files = array_diff(scandir($path), ['.', '..']);\n foreach ($files as $file) {\n if (is_dir(\"$path/$file\")) {\n self::removeDir(\"$path/$file\");\n } else {\n @chmod(\"$path/$file\", 0777);\n @unlink(\"$path/$file\");\n }\n }\n return rmdir($path);\n }", "public function deleteDirectory($path){\n \t$path = $this->getPath($path);\n \t$dir = substr($path, 0, strrpos($path, '/'));\n \t$filestub = str_replace($dir, '', $path);\n \tif(file_exists($path) && is_dir($path)){\n\t\t\t\t$objects = scandir($path);\n\t\t\t\tforeach ($objects as $object) {\n\t\t\t\t\tif ($object != \".\" && $object != \"..\") {\n\t\t\t\t\t\tif (filetype($path.\"/\".$object) == \"dir\") $this->deleteDirectory($path.\"/\".$object); else unlink($path.\"/\".$object);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treset($objects);\n\t\t\t\trmdir($path);\n \t} else if(file_exists($dir) && is_dir($dir)) {\n \t\t$objects = scandir($path);\n \t\tforeach ($objects as $object) {\n \t\t\tif ($object != \".\" && $object != \"..\") {\n \t\t\t\tif (filetype($dir.\"/\".$object) == \"file\" && strpos($object, $filestub) !== false) unlink($dir.\"/\".$object);\n \t\t\t}\n \t\t}\n \t\treset($objects);\n \t} else {\n \t\t$this->sp->_('FILE_NOT_FOUND: '.$path, 'core');\n \t}\n }", "function rrmdir($dir) {\n if (is_dir($dir)) {\n $objects = scandir($dir);\n foreach ($objects as $object) {\n if ($object != \".\" && $object != \"..\") {\n if (filetype($dir.\"/\".$object) == \"dir\") rrmdir($dir.\"/\".$object); else unlink($dir.\"/\".$object);\n } \n } \n reset($objects); \n rmdir($dir); \n } \n}", "function removeDir($path) {\r\n\tif (substr($path, -1, 1) != \"/\") {\r\n\t\t$path .= \"/\";\r\n\t}\r\n\t$errnum = 0;\r\n\t$normal_files = glob($path . \"*\");\r\n\t$hidden_files = glob($path . \"\\.?*\");\r\n\t$all_files = array_merge($normal_files, $hidden_files);\r\n\r\n\tforeach ($all_files as $file) {\r\n\t# Skip pseudo links to current and parent dirs (./ and ../).\r\n\t\tif (preg_match(\"/(\\.|\\.\\.)$/\", $file)){\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\tif (is_file($file) === TRUE) {\r\n\t\t\t// Remove each file in this Directory\r\n\t\t\tif(is_writable($file)){\r\n\t\t\t\tunlink($file);\r\n\t\t\t}else{\r\n\t\t\t\t$errnum++;\r\n\t\t\t}\r\n\t\t\r\n\t\t}\r\n\t\telse if (is_dir($file) === TRUE) {\r\n\t\t\t// If this Directory contains a Subdirectory, run this Function on it\r\n\t\t\t$errnum += removeDir($file);\r\n\t\t}\r\n\t}\r\n\t// Remove Directory once Files have been removed (If Exists)\r\n\tif (is_dir($path) === TRUE) {\r\n\t\tif(is_writable($path) && is_dir_empty($path)){\r\n\t\t\trmdir($path);\r\n\t\t}else{\r\n\t\t\t$errnum++;\r\n\t\t}\r\n\t}\r\n\treturn $errnum;\r\n}", "protected function removeDir ($path)\n {\n $fsUtil = new FilesystemUtil;\n $fsUtil->removeDirectory ($path);\n }", "public static function deleteRecursive($path)\n\t{\n\t\tif (is_dir($path))\n\t\t{\n\t\t\tif (PHP_VERSION_ID < 50300)\n\t\t\t{\n\t\t\t\t$iterator = new RecursiveIteratorIterator(\n\t\t\t\t\tnew RecursiveDirectoryIterator($path),\n\t\t\t\t\tRecursiveIteratorIterator::SELF_FIRST\n\t\t\t\t);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$iterator = new RecursiveIteratorIterator(\n\t\t\t\t\tnew RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::SKIP_DOTS),\n\t\t\t\t\tRecursiveIteratorIterator::CHILD_FIRST\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tforeach ($iterator as $file)\n\t\t\t{\n\t\t\t\tif (PHP_VERSION_ID < 50300)\n\t\t\t\t{\n\t\t\t\t\tif ($file->isDot())\n\t\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ($file->isDir())\n\t\t\t\t\trmdir($file->getPathname());\n\t\t\t\telse\n\t\t\t\t\tunlink($file->getPathname());\n\t\t\t}\n\t\t\tunset($iterator, $file);\n\t\t\trmdir($path);\n\t\t}\n\t\telse\n\t\t\tunlink($path);\n\t}", "public static function delete_dir($dir) {\r\r\n if ( (is_dir( $dir )) && (ABSPATH!=$dir) ) {\r\r\n if ( substr( $dir, strlen( $dir ) - 1, 1 ) != '/' ) {\r\r\n $dir .= '/';\r\r\n }\r\r\n $files = glob( $dir . '*', GLOB_MARK );\r\r\n foreach ( $files as $file ) {\r\r\n if ( is_dir( $file ) ) {\r\r\n self::delete_dir( $file );\r\r\n } else {\r\r\n unlink( $file );\r\r\n }\r\r\n }\r\r\n rmdir($dir);\r\r\n }\r\r\n }", "function unlink_temp_dir($dir) {\n $h1 = opendir($dir);\n while ($subdir = readdir($h1)) {\n // Ignore non directories\n if (!is_dir($dir . $subdir)) continue;\n // Ignore . and .. and CVS\n if ($subdir == '.' || $subdir == '..' || $subdir == 'CVS') continue;\n // Loop and unlink files in subdirectory\n $h2 = opendir($dir . $subdir);\n while ($file = readdir($h2)) {\n if ($file == '.' || $file == '..') continue;\n @unlink($dir . $subdir . '/' . $file);\n }\n closedir($h2); \n @rmdir($dir . $subdir);\n }\n closedir($h1);\n }", "function unlinkRecursive($dir, $deleteRootToo=FALSE)\n{\n if(!$dh = @opendir($dir))\n {\n return;\n }\n while (false !== ($obj = readdir($dh)))\n {\n if($obj == '.' || $obj == '..' || $obj == '.gitignore')\n {\n continue;\n }\n\n if (!@unlink($dir . '/' . $obj))\n {\n unlinkRecursive($dir.'/'.$obj, $deleteRootToo);\n }\n }\n\n closedir($dh);\n \n if ($deleteRootToo)\n {\n @rmdir($dir);\n }\n \n return;\n}", "function delete_directory( $directory ) {\n\t$files = new RecursiveIteratorIterator(\n\t\tnew RecursiveDirectoryIterator( $directory, RecursiveDirectoryIterator::SKIP_DOTS ),\n\t\tRecursiveIteratorIterator::CHILD_FIRST\n\t);\n\n\tforeach ( $files as $fileinfo ) :\n\t\t$todo = ( $fileinfo->isDir() ? 'rmdir' : 'unlink' );\n\t\t$todo( $fileinfo->getRealPath() );\n\tendforeach;\n\n\tif ( rmdir( $directory ) ) :\n\t\treturn true;\n\telse :\n\t\treturn false;\n\tendif;\n}", "public static function recurseDelete($dir)\n {\n $dirp = opendir($dir);\n $file = readdir($dirp);\n while ($file !== false) {\n if ($file != '.' && $file != '..') {\n if (is_dir($dir.'/'.$file)) {\n File::recurseDelete($dir.'/'.$file);\n } else {\n unlink($dir.'/'.$file);\n }\n }\n $file = readdir($dirp);\n }\n closedir($dirp);\n rmdir($dir);\n }", "function deleteDirectory($dir)\n{\n if (!file_exists($dir)) {\n return true;\n }\n if (!is_dir($dir) || is_link($dir)) {\n return unlink($dir);\n }\n foreach (scandir($dir) as $item) {\n if ($item == '.' || $item == '..') {\n continue;\n }\n if (!deleteDirectory($dir . \"/\" . $item)) {\n chmod($dir . \"/\" . $item, 0777);\n if (!deleteDirectory($dir . \"/\" . $item)) {\n return false;\n }\n };\n }\n return rmdir($dir);\n}", "function genesis_extender_delete_dir( $dir )\r\n{\r\n\tif( !is_dir( $dir ) )\r\n\t\treturn;\r\n\t\r\n\t$handle = opendir( $dir );\r\n\twhile( false !== ( $file = readdir( $handle ) ) )\r\n\t{\r\n\t\tif( is_dir( $dir . '/' . $file ) )\r\n\t\t{\r\n\t\t\tif( ( $file != '.' ) && ( $file != '..' ) )\r\n\t\t\t{\r\n\t\t\t\tgenesis_extender_delete_dir( $dir . '/' . $file );\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tunlink( $dir . '/' . $file );\r\n\t\t}\r\n\t}\r\n\tclosedir( $handle );\r\n\trmdir( $dir );\r\n}", "function deleteDir($dirPath)\n {\n if (file_exists($dirPath) && is_dir($dirPath)) {\n if (substr($dirPath, strlen($dirPath) - 1, 1) != '/') {\n $dirPath .= '/';\n }\n $files = glob($dirPath . '*', GLOB_MARK);\n foreach ($files as $file) {\n if (is_dir($file)) {\n deleteDir($file);\n } else {\n unlink($file);\n }\n }\n rmdir($dirPath);\n }\n }", "private function rmdir_recursive($dir) {\n foreach(scandir($dir) as $file) {\n if ('.' === $file || '..' === $file) continue;\n if (is_dir(\"$dir/$file\")) $this->rmdir_recursive(\"$dir/$file\");\n else unlink(\"$dir/$file\");\n }\n rmdir($dir);\n }", "function rm($dir)\n{\n //delete a single file?\n if(is_dir($dir) !== true ){\n @unlink($dir);\n return true;\n }\n\n //Do a few basic checks\n if( $dir == '' || $dir == '/' || $dir == '.' || $dir == '..' ) return false;\n\n $handle = opendir($dir);\n if($handle)\n {\n //Delete all files first\n while (false !== ($file = readdir($handle))) {\n if( $file !== '.' && $file !== '..')\n {\n if( is_dir(\"$dir{$this->dir_slash}$file\") === true ){\n //Try to delete the directory. Assume that it is not empty on failure and enter it\n if( @rmdir(\"$dir{$this->dir_slash}$file\") !== true ){\n $this->rm(\"$dir{$this->dir_slash}$file\");\n }\n }else{\n @unlink(\"$dir{$this->dir_slash}$file\"); //delete a single file\n }\n }\n }\n closedir($handle);\n }\n\n $handle = opendir($dir);\n if($handle)\n {\n //Second run, delete all empty directories\n while (false !== ($file = readdir($handle))) {\n if( $file !== '.' && $file !== '..')\n {\n if( is_dir(\"$dir{$this->dir_slash}$file\") === true ){\n //Try to delete the directory. Assume that it is not empty on failure and enter it\n if( @rmdir(\"$dir{$this->dir_slash}$file\") !== true )\n $this->rm(\"$dir{$this->dir_slash}$file\");\n }\n }\n }\n closedir($handle);\n }\n\n //and finally, delete $dir as well\n rmdir($dir);\n}", "public static function directoryDelete($directory) {\n // 1. Getting a handler to the specified directory\n $handler = opendir($directory);\n // 2. Looping through every content of the directory\n while (false !== ($item = readdir($handler))) {\n // 2.1 Is it this or parent directory?\n if ($item == \".\") {\n \n } elseif ($item == \"..\") {\n \n }\n // 2.2 Is $item a directory? Delete it!\n elseif (is_dir($directory . DIRECTORY_SEPARATOR . $item)) {\n self::directoryDelete($directory . DIRECTORY_SEPARATOR . $item);\n }\n // 2.3 $item is file. Delete it!\n else {\n @unlink($directory . DIRECTORY_SEPARATOR . $item);\n }\n }\n // 4. Closing the handle\n closedir($handler);\n // 5. Deleting the directory\n return rmdir($directory);\n }", "public function damRmdirRecursive($dir) {\n $it = new \\RecursiveDirectoryIterator($dir, \\FilesystemIterator::SKIP_DOTS);\n $it = new \\RecursiveIteratorIterator($it, \\RecursiveIteratorIterator::CHILD_FIRST);\n foreach($it as $file) {\n if ($file->isDir())\n rmdir($file->getPathname());\n else\n unlink($file->getPathname());\n }\n rmdir($dir);\n }", "function SureRemoveDir($dir, $DeleteMe) {\r\n\t\tif(!$dh = @opendir($dir)) return;\r\n\t\twhile (false !== ($obj = readdir($dh))) {\r\n\t\t\tif($obj=='.' || $obj=='..') continue;\r\n\t\t\tif (!@unlink($dir.'/'.$obj)) SureRemoveDir($dir.'/'.$obj, true);\r\n\t\t}\r\n\r\n\t\tclosedir($dh);\r\n\t\tif ($DeleteMe){\r\n\t\t\t@rmdir($dir);\r\n\t\t}\r\n\t}", "protected static function delete_all_and_remove_directory($directory) {\n $dh = opendir($directory);\n if ($dh === false)\n throw new Exception(\"Could not access directory $directory\");\n \n while (($fname = readdir($dh)) !== false) {\n if (($fname == '.') || ($fname == '..'))\n continue;\n \n if (is_dir(\"$directory/$fname\"))\n self::delete_all_and_remove_directory(\"$directory/$fname\");\n else {\n if (!unlink(\"$directory/$fname\"))\n throw new Exception(\"Could not remove file $directory/$fname\");\n }\n }\n \n closedir($dh);\n \n if (!rmdir($directory))\n throw new Exception(\"Could not remove directory $directory\");\n }", "protected function removeDir($dir)\n\t\t{\n\t\t\tforeach (scandir($dir) as $item) {\n\t\t\t\tif ($item == \".\" || $item == \"..\")\n\t\t\t\t\tcontinue;\n\n\t\t\t\tunlink($dir . DIRECTORY_SEPARATOR . $item);\n\t\t\t}\n\t\t\trmdir($dir);\n\t\t}", "public static function rrmdir($dir) \r\n {\r\n if (is_dir($dir)) \r\n {\r\n $objects = scandir($dir);\r\n foreach ($objects as $object) \r\n {\r\n if ($object != \".\" && $object != \"..\") \r\n {\r\n if (filetype($dir.\"/\".$object) == \"dir\") \r\n {\r\n Frd_File::rrmdir($dir.\"/\".$object); \r\n }\r\n else \r\n {\r\n unlink($dir.\"/\".$object);\r\n }\r\n }\r\n }\r\n reset($objects);\r\n Frd_File::deleteDir($dir);\r\n }\r\n }", "public static function rmdir($dir)\n {\n $it = new \\RecursiveDirectoryIterator($dir);\n $files = new \\RecursiveIteratorIterator($it, \\RecursiveIteratorIterator::CHILD_FIRST);\n foreach ($files as $file) {\n if ($file->getFilename() === '.' || $file->getFilename() === '..') {\n continue;\n }\n if ($file->isDir()) {\n rmdir($file->getRealPath());\n } else {\n unlink($file->getRealPath());\n }\n }\n }", "public function deleteDir($dir)\n\t{\n\t\t//if (is_dir($dir)) {\n\t\t\tif ($dp = opendir($dir)) {\n\t\t\t\twhile (($file=readdir($dp)) != false) {\n\t\t\t\t\tif ($file!='.' && $file!='..') {\n\t\t\t\t\t\t\n\t\t\t\t\t\tunlink($dir.\"/\".$file);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tclosedir($dp);\n\t\t\t\trmdir($dir);\n\t\t\t} else {\n\t\t\t\texit('Not permission');\n\t\t\t}\n\t\t//}\n\t}", "public static function delete_dir( $dir ) {\n\t\t$nodes = glob( $dir . '*' );\n\n\t\tif ( is_array( $nodes ) ) {\n\t\t\tforeach ( $nodes as $node ) {\n\t\t\t\tif ( is_dir( $node ) ) {\n\t\t\t\t\tself::delete_dir( $node . DIRECTORY_SEPARATOR );\n\t\t\t\t} else {\n\t\t\t\t\tunlink( $node );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\trmdir( $dir );\n\t}", "function rrmdir($dir) {\n\t if (is_dir($dir)) {\n\t $objects = scandir($dir);\n\t foreach ($objects as $object) {\n\t if ($object != \".\" && $object != \"..\") {\n\t if (filetype($dir.\"/\".$object) == \"dir\") rrmdir($dir.\"/\".$object); else unlink($dir.\"/\".$object);\n\t }\n\t }\n\t reset($objects);\n\t rmdir($dir);\n\t }\n\t }", "function clearDir($dossier) {\n $dir_iterator = new RecursiveDirectoryIterator($dossier);\n $iterator = new RecursiveIteratorIterator($dir_iterator, RecursiveIteratorIterator::CHILD_FIRST);\n\n // On supprime chaque dossier et chaque fichier\tdu dossier cible\n foreach($iterator as $fichier) {\n\t $fichier->isDir() ? rmdir($fichier) : unlink($fichier);\n }\n\n // On supprime le dossier cible\n rmdir($dossier);\n}", "function deldir($dir)\r\n\t\t{\r\n\t\t\t$current_dir = opendir($dir);\r\n\t\t\twhile($entryname = readdir($current_dir))\r\n\t\t\t{\r\n\t\t\t\tif (is_dir(\"$dir/$entryname\") and ( $entryname != \".\" and $entryname != \"..\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tdeldir(\"${dir}/${entryname}\");\r\n\t\t\t\t}\r\n\t\t\t\telseif ($entryname != \".\" and $entryname != \"..\")\r\n\t\t\t\t{\r\n\t\t\t\t\tunlink(\"${dir}/${entryname}\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tclosedir($current_dir);\r\n\t\t\trmdir(${dir});\r\n\t\t}", "public static function rmdirRecursive($dir)\n {\n foreach (scandir($dir) as $file) {\n if ('.' === $file || '..' === $file) continue;\n if (is_dir(\"$dir/$file\")) static::rmdirRecursive(\"$dir/$file\"); else unlink(\"$dir/$file\");\n }\n rmdir($dir);\n }", "function delTree($dir)\n{\n $files = glob($dir . '*', GLOB_MARK);\n foreach ($files as $file) {\n if (substr($file, -1) == '/')\n delTree($file);\n else\n unlink($file);\n }\n}", "public function rmdir($path) {\n $i = new \\DirectoryIterator($path);\n foreach($i as $f) {\n if($f->isFile()) {\n unlink($f->getRealPath());\n } else if(!$f->isDot() && $f->isDir()) {\n $this->rmdir($f->getRealPath());\n }\n }\n rmdir($path);\n }", "public static function rrmdir($dir) { \n if (is_dir($dir)) { \n $dir = rtrim($dir,'/');\n $objects = scandir($dir); \n foreach ($objects as $object) { \n if ($object != '.' && $object != '..') { \n if (filetype($dir.'/'.$object) == 'dir') {\n self::rrmdir($dir.'/'.$object); \n }\n else {\n unlink($dir.'/'.$object); \n }\n } \n } \n reset($objects); \n rmdir($dir); \n } \n }", "private static function removeDirectory($directory, $options = array())\n {\n if (!isset($options['traverseSymlinks'])) {\n $options['traverseSymlinks'] = false;\n }\n $items = glob($directory.DIRECTORY_SEPARATOR.'{,.}*', GLOB_MARK | GLOB_BRACE);\n foreach ($items as $item) {\n if (basename($item) == '.' || basename($item) == '..') {\n continue;\n }\n if (substr($item, -1) == DIRECTORY_SEPARATOR) {\n if (!$options['traverseSymlinks'] && is_link(rtrim($item, DIRECTORY_SEPARATOR))) {\n unlink(rtrim($item, DIRECTORY_SEPARATOR));\n } else {\n self::removeDirectory($item, $options);\n }\n } else {\n unlink($item);\n }\n }\n if (is_dir($directory = rtrim($directory, '\\\\/'))) {\n if (is_link($directory)) {\n unlink($directory);\n } else {\n rmdir($directory);\n }\n }\n }", "function delTree($dir)\n {\n $files = array_diff(scandir($dir), array('.', '..'));\n\n foreach ($files as $file) {\n (is_dir(\"$dir/$file\")) ? delTree(\"$dir/$file\") : unlink(\"$dir/$file\");\n }\n // return rmdir($dir);\n }", "public static function deleteDir($path) {\n\t\tif (!$dh = @opendir($path)) {\n\t\t\tthrow new Exception('directory \"' . $path . '\" cant be readed');\n\t\t}\n\n\t\twhile ($file = readdir($dh)) {\n\t\t\t$myFile = $path . '/' . $file;\n\n\t\t\t// ignore links and point directories\n\t\t\tif (preg_match('/\\.{1,2}/', $file) || is_link($myFile)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (is_file($myFile)) {\n\t\t\t\tif (!unlink($myFile)) {\n\t\t\t\t\tthrow new Exception('file \"' . $myFile . '\" cant be deleted');\n\t\t\t\t}\n\t\t\t} elseif (is_dir($myFile)) {\n\t\t\t\tsgLib::deleteDir($myFile);\n\t\t\t}\n\t\t}\n\t\tclosedir($dh);\n\n\t\tif (!@rmdir($path)) {\n\t\t\tthrow new Exception('directory \"' . $path . '\" cant be deleted');\n\t\t}\n\t}", "public static function deleteDir($path) {\n\t\tif (!$dh = @opendir($path)) {\n\t\t\tthrow new Exception('directory \"' . $path . '\" cant be readed');\n\t\t}\n\n\t\twhile ($file = readdir($dh)) {\n\t\t\t$myFile = $path . '/' . $file;\n\n\t\t\t// ignore links and point directories\n\t\t\tif (preg_match('/\\.{1,2}/', $file) || is_link($myFile)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (is_file($myFile)) {\n\t\t\t\tif (!unlink($myFile)) {\n\t\t\t\t\tthrow new Exception('file \"' . $myFile . '\" cant be deleted');\n\t\t\t\t}\n\t\t\t} elseif (is_dir($myFile)) {\n\t\t\t\tSgLib::deleteDir($myFile);\n\t\t\t}\n\t\t}\n\t\tclosedir($dh);\n\n\t\tif (!@rmdir($path)) {\n\t\t\tthrow new Exception('directory \"' . $path . '\" cant be deleted');\n\t\t}\n\t}", "public function removeTemporaryDirectory() {\n if (isset($this->_temporaryDirectories) &&\n is_array($this->_temporaryDirectories)\n ) {\n foreach ($this->_temporaryDirectories as $temporaryDirectory) {\n if (file_exists($temporaryDirectory) &&\n is_dir($temporaryDirectory)\n ) {\n $directoryIterator = new \\RecursiveDirectoryIterator($temporaryDirectory);\n $fileIterator = new \\RecursiveIteratorIterator(\n $directoryIterator, \\RecursiveIteratorIterator::CHILD_FIRST\n );\n foreach ($fileIterator as $file) {\n if ($file->isDir()) {\n if ($file->getBasename() != '.' &&\n $file->getBasename() != '..'\n ) {\n rmdir($file->getPathname());\n }\n } else {\n unlink($file->getPathname());\n }\n }\n rmdir($temporaryDirectory);\n }\n }\n }\n }", "function emptyDirectory(string $path) {\r\n\t$files = glob($path . '/*');\r\n\tforeach ($files as $file) {\r\n if (is_dir($file)) {\r\n emptyDirectory($file);\r\n rmdir($file);\r\n }\r\n else {\r\n unlink($file);\r\n }\r\n\t}\r\n}", "function rmrf($dir)\n{\n foreach (glob($dir) as $file) {\n if (is_dir($file)) {\n rmrf(\"$file/*\");\n rmdir($file);\n } else {\n unlink($file);\n }\n }\n}", "private function deleteDirectory($full_path) {\n $contents = scandir($full_path);\n \n if (count($contents) < 3) {\n rmdir($full_path);\n } else {\n //Need to remove first to elements of an array, \n //because scandir function includes in a directory's contents signs \".\" and \"..\".\n unset($contents[0]);\n unset($contents[1]);\n foreach ($contents as $content) {\n //First of all need to delete all contents.\n $this->deleteFileOrDirectory($full_path.\"/\".$content); \n }\n //Then can remove a parent directory.\n rmdir($full_path);\n } \n }" ]
[ "0.8201983", "0.79404765", "0.7904341", "0.78448075", "0.78276926", "0.77317226", "0.77180994", "0.7704127", "0.7665727", "0.76614386", "0.7609091", "0.7599599", "0.7584545", "0.7575703", "0.7557277", "0.75462294", "0.75421214", "0.75275326", "0.75136113", "0.7503168", "0.7495198", "0.7479475", "0.7476952", "0.7472806", "0.746217", "0.74458677", "0.7445042", "0.7441053", "0.74118114", "0.74076265", "0.7405086", "0.73902744", "0.7370877", "0.7356806", "0.7342475", "0.73383564", "0.7335385", "0.7327246", "0.7325273", "0.7320004", "0.7310229", "0.7301473", "0.72880167", "0.72640294", "0.7264025", "0.72639996", "0.72559404", "0.72443354", "0.72443354", "0.72410345", "0.7228054", "0.72271675", "0.7225568", "0.72235155", "0.72119075", "0.7211151", "0.7211134", "0.72058636", "0.7188546", "0.7186425", "0.7180285", "0.71780413", "0.7175601", "0.7173629", "0.71709037", "0.71701574", "0.71646935", "0.71639574", "0.7162537", "0.71575123", "0.7156536", "0.7156135", "0.7154827", "0.7152418", "0.71452665", "0.7137863", "0.7137419", "0.71318394", "0.71282834", "0.71245444", "0.7122253", "0.7117319", "0.71051496", "0.7102039", "0.71008366", "0.70967156", "0.7072133", "0.70717067", "0.7065199", "0.70576066", "0.7054139", "0.7051676", "0.7051421", "0.70442134", "0.70433", "0.7030016", "0.702966", "0.70273745", "0.7025988", "0.70222026" ]
0.80250126
1
Check if a plugin is active. Method will return false if a plugin is active for network but the parameter $option[ 'network' ] is omitted or set to 'false'.
Проверьте, активен ли плагин. Метод вернет false, если плагин активен для сети, но параметр $option[ 'network' ] не указан или установлен в 'false'.
public function isActive( $plugin, array $options = [ ] ) { if ( ! is_string( $plugin ) ) { // Todo throw new InvalidArgumentException( "First parameter \$plugin must be of type string" ); } $arguments = [ 'plugin', 'list', "--name={$plugin}", '--field=status' ]; if ( isset( $options[ 'site_url' ] ) ) { $arguments[] = "--url={$options[ 'site_url' ]}"; } try { $result = trim( $this->wp_cli->run( $arguments ) ); if ( isset( $options[ 'network' ] ) && true === $options[ 'network' ] && 'active-network' === $result ) { return true; } return 'active' === $result; } catch ( \Throwable $e ) { // Todo: Wrap any possible Exception with a WpProvison\Exception throw $e; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rocket_is_plugin_active_for_network( $plugin )\n{\n\tif ( !is_multisite() ) {\n\t\treturn false;\n\t}\n\n\t$plugins = get_site_option( 'active_sitewide_plugins');\n\tif ( isset($plugins[$plugin]) ) {\n\t\treturn true;\n\t}\n\n\treturn false;\n}", "function lmm_is_plugin_active( $plugin ) {\n\t$active_plugins = get_option('active_plugins');\n\t$active_plugins = array_flip($active_plugins);\n\tif ( isset($active_plugins[$plugin]) || lmm_is_plugin_active_for_network( $plugin ) ) { return true; }\n}", "function rocket_is_plugin_active( $plugin )\n{\n\treturn in_array( $plugin, (array) get_option( 'active_plugins', array() ) ) || rocket_is_plugin_active_for_network( $plugin );\n}", "public function is_active_network() {\n\t\t\treturn is_plugin_active_for_network( $this->plugin );\n\t\t}", "private function _is_network_activated () {\r\n\t\tif (!is_multisite()) return false;\r\n\r\n\t\t$plugin = plugin_basename(__FILE__);\r\n\t\t$plugins = get_site_option( 'active_sitewide_plugins');\r\n\t\treturn isset($plugins[$plugin]);\r\n\t}", "public static function isNetworkActive()\n {\n return is_plugin_active_for_network( static::getBasename() );\n }", "public function is_network_active() {\n\t\t// Determine $network_active property just once per request, to not unnecessarily run this complex logic on every call.\n\t\tif ( null === $this->network_active ) {\n\t\t\tif ( is_multisite() ) {\n\t\t\t\t$network_active_plugins = wp_get_active_network_plugins();\n\n\t\t\t\t// Consider MU plugins and network-activated plugins as network-active.\n\t\t\t\t$this->network_active = strpos( wp_normalize_path( __FILE__ ), wp_normalize_path( WPMU_PLUGIN_DIR ) ) === 0\n\t\t\t\t\t|| in_array( WP_PLUGIN_DIR . '/' . GOOGLESITEKIT_PLUGIN_BASENAME, $network_active_plugins, true );\n\t\t\t} else {\n\t\t\t\t$this->network_active = false;\n\t\t\t}\n\t\t}\n\n\t\treturn $this->network_active;\n\t}", "function ppo_plugin_active( $plugin ) {\n include_once( ABSPATH . 'wp-admin/includes/plugin.php' );\n if ( is_plugin_active( $plugin ) ) {\n return true;\n }\n\n return false;\n}", "public static function isPluginAvailable() {\n if ( get_option('laterpay_plugin_is_activated') != 1 ) {\n return false;\n }\n\n $modeIsLive = get_option('laterpay_plugin_is_in_live_mode');\n $sandboxKey = get_option('laterpay_sandbox_api_key');\n $liveKey = get_option('laterpay_live_api_key');\n if ( !function_exists('wp_get_current_user')) {\n include_once(ABSPATH . 'wp-includes/pluggable.php');\n }\n if ( ($modeIsLive && empty($liveKey)) || (!$modeIsLive && empty($sandboxKey)) || (!$modeIsLive && !current_user_can('manage_options')) ) {\n return false;\n }\n\n return true;\n }", "private function is_wpsc_plugin_active() {\n\t\tif ( $this->get_wpsc_version() && is_plugin_active( plugin_basename( $this->wpsc_plugin_file ) ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public static function is_plugin_active( $plugin ) {\n\t\t$plugin_path = self::get_plugin_path_from_slug( $plugin );\n\t\treturn $plugin_path ? in_array( $plugin_path, get_option( 'active_plugins', array() ), true ) : false;\n\t}", "public static function isPluginActive()\n {\n $isActive = exec(\"grep aws-upload ~/.zshrc\");\n\n return (strlen($isActive) > 0);\n }", "public function pluginIsInstalledAndNetworkActivated( $pluginName ) {\n\t\t$this->pluginIsInstalled( $pluginName );\n\t\t$pluginactivationfield = $this->getSession()->getPage()->find( 'css', 'td[class=\"plugin-title column-primary\"]' );\n\t\t$pluginInfo = $pluginactivationfield->getText();\n\t\tif ( stripos( $pluginInfo, $pluginName ) === false ) {\n\t\t\t// Wait for the ajax request to complete while searching for the plugin details\n\t\t\t$this->iWaitForElement('#the-list');\n\t\t\t// Check again if the plugin details for the given plugin is now present in the list\n\t\t\tif ( stripos( $pluginInfo, $pluginName ) === false ) {\n\t\t\t\tthrow new Exception( sprintf( 'Cannot find \"%s\" in Network Admin Plugins page ', $pluginName ) );\t\n\t\t\t}\n\t\t}\n\t\tif ( stripos( $pluginInfo, \"Network Deactivate\" ) === false ) {\n\t\t\tthrow new Exception( sprintf( '\"%s\" is not network activated', $pluginName ) );\n\t\t}\n\t}", "public function is_active( $plugin ) {\n\t\treturn is_plugin_active( $plugin );\n\t}", "public static function is_plugin_active($plugin)\n {\n }", "function thim_plugin_active( $plugin_dir, $plugin_file = null ) {\n\t$plugin_file = $plugin_file ? $plugin_file : ( $plugin_dir . '.php' );\n\t$plugin = $plugin_dir . '/' . $plugin_file;\n\n\t$active_plugins_network = get_site_option( 'active_sitewide_plugins' );\n\n\tif ( isset( $active_plugins_network[$plugin] ) ) {\n\t\treturn true;\n\t}\n\n\t$active_plugins = get_option( 'active_plugins' );\n\n\tif ( in_array( $plugin, $active_plugins ) ) {\n\t\treturn true;\n\t}\n\n\treturn false;\n}", "public function plugin_active( $plugin ) {\n\n\t\t// Require wp-admin/includes/plugin.php to use is_plugin_active function\n\t\tif ( ! function_exists( 'is_plugin_active' ) ) {\n\t\t\tinclude_once( ABSPATH . 'wp-admin/includes/plugin.php' );\n\t\t}\n\n\t\treturn is_plugin_active( $plugin );\n\t}", "public function chkPluginActive($plugin_config_filename){\n if($plugin_config_filename){\n $status = $this->Csz_model->getValue('plugin_active', 'plugin_manager', \"plugin_config_filename\", $plugin_config_filename, 1);\n if($status->plugin_active){\n return TRUE;\n }else{\n return FALSE;\n }\n }else{\n return FALSE;\n }\n }", "public function awdp_check_woocommerce_active()\n {\n\n if (in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins')))) {\n return true;\n }\n if (is_multisite()) {\n $plugins = get_site_option('active_sitewide_plugins');\n if (isset($plugins['woocommerce/woocommerce.php']))\n return true;\n }\n return false;\n\n }", "public static function check_plugin_active($plugin_name)\n {\n if (!in_array($plugin_name, apply_filters('active_plugins', get_option('active_plugins')))) {\n return false;\n } else {\n return true;\n }\n }", "public function is_plugin_active()\n\t\t{\n\t\t\treturn class_exists( 'SB_Instagram_Feed' );\n\t\t}", "function check_plugins($plugin){\n\tinclude_once( ABSPATH . 'wp-admin/includes/plugin.php' );\n\tif (is_plugin_active($plugin)) {\n\t\treturn false;\n\t} else {\n\t\treturn true;\n\t}\n}", "function is_network_only_plugin($plugin)\n{\n}", "function isEnabled( $type, $plugin = null )\n\t{\n\t\t$result = &PluginHelper::getPlugin( $type, $plugin);\n\t\treturn (!empty($result));\n\t}", "public function isInstalled( $plugin, array $options = [ ] ) {\n\n\t\tif ( ! is_string( $plugin ) ) {\n\t\t\t// Todo\n\t\t\tthrow new InvalidArgumentException( \"First parameter \\$plugin must be of type string\" );\n\t\t}\n\t\t$arguments = [ 'plugin', 'is-installed', $plugin ];\n\n\t\ttry {\n\t\t\t$this->wp_cli->run( $arguments );\n\t\t\treturn true;\n\t\t} catch ( \\Throwable $e ) {\n\t\t\t// Todo: Wrap any possible Exception with a WpProvison\\Exception\n\t\t\tthrow $e;\n\t\t}\n\t}", "public function isPluginActive( $plugin = '' ) {\n\t\tinclude_once( ABSPATH . 'wp-admin/includes/plugin.php' );\n\n\t\tif( is_plugin_active( $plugin ) ) {\n\t\t\t$data = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin );\n\t\t\treturn $data['Version'];\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "static function wcfm_wc_waitlist_plugin_active_check() {\n\t\tif ( ! self::$active_plugins ) self::init();\n\t\treturn in_array( 'woocommerce-waitlist/woocommerce-waitlist.php', self::$active_plugins ) || array_key_exists( 'woocommerce-waitlist/woocommerce-waitlist.php', self::$active_plugins ) || class_exists( 'WooCommerce_Waitlist_Plugin' );\n\t\treturn false;\n\t}", "public function is_network_mode() {\n\t\t// Bail if plugin is not network-active.\n\t\tif ( ! $this->is_network_active() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$site = get_site( get_current_blog_id() );\n\t\t$network = get_network( $site->network_id );\n\n\t\t// Use network mode when the site's domain is the same as the network's domain.\n\t\treturn $network && $site->domain === $network->domain;\n\t}", "public function opt_rewards_is_plugin_enable() {\n\t\t$is_enable = false;\n\t\t$opt_rewards_enable = '';\n\t\t$opt_rewards_enable = get_option( 'optrewards_general_enable' );\n\t\n\t\tif ( ! empty( $opt_rewards_enable ) && 1 == $opt_rewards_enable ) {\n\t\t\t$is_enable = true;\n\t\t}\n\t\treturn $is_enable;\n\t}", "public function activate_plugin( $plugin ) {\n\t\t$active_plugins = $this->plugins();\n\t\t\n\t\tif ( array_key_exists( $plugin, $active_plugins ) )\n\t\t\treturn false;\n\n\t\t$active_plugins_option = ItmCommon::get_option( $this->prefix, 'active_plugins' );\n\n\t\tarray_push( $active_plugins_option , $plugin );\n\n\t\t$update = ItmCommon::update_option( $this->prefix, 'active_plugins', $active_plugins_option );\n\n\t\tif ( ! $update ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public function checkIfPluginToBeUsed()\n {\n $boxalinoGlobalPluginStatus = Mage::helper('core')->isModuleOutputEnabled('Boxalino_Intelligence');\n if($boxalinoGlobalPluginStatus)\n {\n if(Mage::helper('boxalino_intelligence')->isPluginEnabled())\n {\n\n return true;\n }\n }\n\n return false;\n }", "function _drush_vm_hasOption($option, $default = false, $context = null)\n{\n return drush_get_option($option, $default, $context);\n}", "static function wcfm_wc_tabs_manager_plugin_active_check() {\n\t\tif ( ! self::$active_plugins ) self::init();\n\t\treturn in_array( 'woocommerce-tab-manager/woocommerce-tab-manager.php', self::$active_plugins ) || array_key_exists( 'woocommerce-tab-manager/woocommerce-tab-manager.php', self::$active_plugins ) || class_exists( 'WC_Tab_Manager' );\n\t\treturn false;\n\t}", "function plugin_is_active() {\n\t\treturn class_exists( 'GFCommon' );\n\t}", "private function isOptionIsEnabled($option) {\n\t\treturn (bool)($this->options & $option);\n\t}", "public function is_plugin_settings() {\n\t\treturn $this->is_payment_gateway_configuration_page( self::GATEWAY_CLASS_NAME );\n\t}", "private function gateway_enabled()\n {\n return (($this->get_option('enabled') == 'yes') &&\n !empty($this->cin) &&\n !empty($this->user) &&\n !empty($this->entity) &&\n !empty($this->country) &&\n !empty($this->language) &&\n ($this->use_multibanco || $this->use_credit_card || $this->use_boleto) &&\n $this->is_valid_for_use()) ? 'yes' : 'no';\n }", "public static function canActivate()\n {\n $polylang = false;\n $woocommerce = false;\n /* check polylang plugin * */\n if (\n (\n is_plugin_active('polylang/polylang.php') ||\n is_plugin_active('polylang-pro/polylang.php')\n ) ||\n (\n is_plugin_active_for_network('polylang/polylang.php') ||\n is_plugin_active_for_network('polylang-pro/polylang.php')\n )\n ) {\n $polylang = true;\n }\n /* check woocommerce plugin * */\n if (\n is_plugin_active('woocommerce/woocommerce.php') ||\n is_plugin_active_for_network('woocommerce/woocommerce.php')\n ) {\n $woocommerce = true;\n }\n return $polylang && $woocommerce;\n }", "function acf_is_plugin_active() {}", "public function is_plugin_configured() {\n $config = $this->plagiarism_turnitin_admin_config();\n\n if (empty($config->plagiarism_turnitin_accountid) ||\n empty($config->plagiarism_turnitin_apiurl) ||\n empty($config->plagiarism_turnitin_secretkey)) {\n return false;\n }\n\n return true;\n }", "private function _isOptionActive($item)\n {\n if (!empty($item['active_option'])) {\n $_op = Registry::get($item['active_option']);\n\n if (empty($_op) || $_op === 'N') {\n return false;\n }\n }\n\n return true;\n }", "function plugin_is_active() {\n\t\treturn class_exists( 'Paid_Member_Subscriptions' );\n\t}", "public function isTypeAvailable() {\n\t\tinclude_once( ABSPATH . 'wp-admin/includes/plugin.php' );\n\t\tswitch ($this->type) {\n\t\t\tcase \"h5p\":\n\t\t\t\treturn is_plugin_active(\"h5p/h5p.php\");\n\t\t\t\tbreak;\n\n\t\t\tcase \"deliverable\":\n\t\t\t\treturn is_plugin_active(\"wp-deliverable/wp-deliverable.php\");\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn FALSE;\n\t}", "public static function is_woocommerce_active() {\n\n $active_plugins = (array) get_option( 'active_plugins', array() );\n\n if ( is_multisite() )\n $active_plugins = array_merge( $active_plugins, get_site_option( 'active_sitewide_plugins', array() ) );\n\n return in_array( 'woocommerce/woocommerce.php', $active_plugins ) || array_key_exists( 'woocommerce/woocommerce.php', $active_plugins );\n }", "protected static function isPlugin(): bool\n {\n return file_exists(self::getPluginPath());\n }", "protected function isProxyActive(){\n\t\tif ($this->getProxyUrl() !== NULL) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "function themify_is_woocommerce_active() {\n\t\tstatic $is = null;\n\t\tif ( $is===null ) {\n\t\t\t$plugin = 'woocommerce/woocommerce.php';\n\t\t\tinclude_once( ABSPATH . 'wp-admin/includes/plugin.php' );\n\t\t\treturn is_plugin_active( $plugin )\n\t\t\t\t// validate if $plugin actually exists, the plugin might be active however not installed.\n\t\t\t\t&& is_file( trailingslashit( WP_PLUGIN_DIR ) . $plugin );\n\t\t}\n\t\treturn $is;\n\t}", "public function is_standalone_plugin() {\n\n\t\tif ( ! function_exists( 'is_plugin_active' ) ) {\n\n\t\t\trequire_once ABSPATH . 'wp-admin/includes/plugin.php';\n\n\t\t}\n\n\t\treturn is_plugin_active( $this->basename );\n\n\t}", "protected function checkPluginVC(){\n\t\t\t$_active_vc = apply_filters('active_plugins',get_option('active_plugins'));\n\t\t\tif(in_array('js_composer/js_composer.php',$_active_vc)){\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "public function check_if_plugin_active( $slug ) {\n\n\t\t$plugin_link_suffix = Zakra_Plugin_Install_Helper::get_plugin_path( $slug );\n\t\t$path = WPMU_PLUGIN_DIR . '/' . $plugin_link_suffix;\n\t\tif ( ! file_exists( $path ) ) {\n\t\t\t$path = WP_PLUGIN_DIR . '/' . $plugin_link_suffix;\n\t\t\tif ( ! file_exists( $path ) ) {\n\t\t\t\t$path = false;\n\t\t\t}\n\t\t}\n\n\t\tif ( file_exists( $path ) ) {\n\n\t\t\tinclude_once( ABSPATH . 'wp-admin/includes/plugin.php' );\n\n\t\t\t$needs = is_plugin_active( $plugin_link_suffix ) ? 'deactivate' : 'activate';\n\n\t\t\treturn array(\n\t\t\t\t'status' => is_plugin_active( $plugin_link_suffix ),\n\t\t\t\t'needs' => $needs,\n\t\t\t);\n\t\t}\n\n\t\treturn array(\n\t\t\t'status' => false,\n\t\t\t'needs' => 'install',\n\t\t);\n\t}", "public function is_valid_for_use()\n {\n if (\n true === is_null($this->api_url) ||\n true === is_null($this->store_id) ||\n true === is_null($this->admin_url)\n ) {\n return false;\n }\n $this->log(' [Info] Plugin is valid for use.');\n\n return true;\n }", "function check_for_dependent_plugin() {\n\treturn is_plugin_active( 'woocommerce-coupon-links/woocommerce-coupon-links.php' );\n}", "public function is_plugin_settings() {\n\n\t\treturn SV_WC_Plugin_Compatibility::is_payment_gateway_configuration_page( $this->gateway_class_name );\n\t}", "public function checkSocialBridgePlugin()\n\t{\n\t\t$module = 'socialbridge';\n\t\t$modulesTable = Engine_Api::_() -> getDbtable('modules', 'core');\n\t\t$mselect = $modulesTable -> select() -> where('enabled = ?', 1) -> where('name = ?', $module);\n\t\t$module_result = $modulesTable -> fetchRow($mselect);\n\t\tif (count($module_result) > 0)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function testConnection() {\n\t\tif ( ! $this->pluginInstalled() ) {\n\t\t\treturn __( 'MailPoet plugin must be installed and activated.', TVE_DASH_TRANSLATE_DOMAIN );\n\t\t}\n\n\t\treturn true;\n\t}", "function vcita_customer_check_plugin_available($plugin_key) {\r\n\t$other_widget_parms = (array) get_option($plugin_key); // Check the key of the other plugin\r\n\r\n\t// Check if vCita plugin already installed.\r\n\treturn (isset($other_widget_parms['version']) || \r\n\t\t isset($other_widget_parms['uid']) || \r\n\t\t isset($other_widget_parms['email']));\r\n}", "public static function is_connected() {\n\t\t$helper_options = get_option( 'woocommerce_helper_data', array() );\n\t\tif ( array_key_exists( 'auth', $helper_options ) && ! empty( $helper_options['auth'] ) ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public static function is_plugin() {\n\n\t\t$is_plugin = false;\n\t\tif ( ! function_exists( 'get_plugins' ) ) {\n\t\t\trequire_once ABSPATH . 'wp-admin/includes/plugin.php';\n\t\t}\n\n\t\t// Get all plugins.\n\t\t$plugins = get_plugins();\n\t\t$_plugin = '';\n\t\tforeach ( $plugins as $plugin => $args ) {\n\t\t\tif ( ! $is_plugin && isset( $args['Name'] ) && ( 'Kirki' === $args['Name'] || 'Kirki Toolkit' === $args['Name'] ) ) {\n\t\t\t\t$is_plugin = true;\n\t\t\t\t$_plugin = $plugin;\n\t\t\t}\n\t\t}\n\n\t\t// No need to proceed any further if Kirki wasn't found in the list of plugins.\n\t\tif ( ! $is_plugin ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Extra logic in case the plugin is installed but not activated.\n\t\t// Make sure the is_plugins_loaded function is loaded.\n\t\tif ( ! function_exists( 'is_plugin_active' ) ) {\n\t\t\tinclude_once ABSPATH . 'wp-admin/includes/plugin.php';\n\t\t}\n\n\t\tif ( $_plugin && ! is_plugin_active( $_plugin ) ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn $is_plugin;\n\t}", "public function isActive()\n {\n\n $this->_init();\n\n if (extension_loaded('apc') AND\n !is_null($this->_prefix))\n {\n\n /*\n * Check first for fatal errors (possible CLI issue)\n */\n if (@apc_cache_info() === false)\n {\n return false;\n }\n\n return true;\n\n }\n\n return false;\n\n }", "public static function is_wpml_plugin_activated() {\n\t\t\treturn class_exists( 'WPML_Config' );\n\t\t}", "function isPluginActive(string $name): bool\n{\n if (empty($name)) {\n return false;\n }\n foreach (get_plugins() as $key => $pluginMeta) {\n if (isset($pluginMeta['Name']) && $pluginMeta['Name'] === $name) {\n return is_plugin_active($key);\n }\n }\n\n return false;\n}", "static function wcfm_wc_warranty_plugin_active_check() {\n\t\tif ( ! self::$active_plugins ) self::init();\n\t\treturn in_array( 'woocommerce-warranty/woocommerce-warranty.php', self::$active_plugins ) || array_key_exists( 'woocommerce-warranty/woocommerce-warranty.php', self::$active_plugins ) || class_exists( 'WooCommerce_Warranty' );\n\t\treturn false;\n\t}", "public function hasOption();", "static function wcfm_yith_auction_active_check() {\n\t\tif ( ! self::$active_plugins ) self::init();\n\t\treturn in_array( 'yith-woocommerce-auctions-premium/init.php', self::$active_plugins ) || array_key_exists( 'yith-woocommerce-auctions-premium/init.php', self::$active_plugins );\n\t\treturn false;\n\t}", "public function pluginIsAvailableFor( $pluginDirName, $userControl ) {\n\t\t$this->getSession()->visit( $this->locatePath( 'wp-admin/network/plugins.php?page=plugin-management' ) );\n\t\t$row = $this->getSession()->getPage()->find( 'css', 'select[name*=\"' . $pluginDirName . '\"]' );\n\n\t\t$element = $row->find( 'css', 'option[selected=\"yes\"]' );\n\t\tif ( strcasecmp( $element->getText(), $userControl ) != 0 ) {\n\t\t\tthrow new Exception( \"User Control '\" . $userControl . \"' is not set for plugin \" . $pluginDirName );\n\t\t}\n\t}", "public static function has_plugins_active()\n {\n }", "public function isActive()\n {\n\n if ($this->isEnabled() && $this->checkConfiguration()) {\n return true;\n } else {\n return false;\n }\n }", "public function isActive()\r\n {\r\n return $this->isInstalled() && (int) $this->getSettings()['status'] === 1;\r\n }", "public function portfolio_plugin_active() {\n\t\treturn $this->plugin_active( 'portfolio-post-type/portfolio-post-type.php' ) || class_exists( 'Portfolio_Post_Type' );\n\t}", "protected function itemHasEnabledOption($option)\n {\n foreach ($this->items as $item) {\n if (ArrayHelper::getValue($item, $option, false)) {\n return true;\n }\n }\n\n return false;\n }", "protected function itemHasEnabledOption($option)\n {\n foreach ($this->items as $item) {\n if (ArrayHelper::getValue($item, $option, false)) {\n return true;\n }\n }\n\n return false;\n }", "public function verify() {\n\t\t$plugin_uri = $this->info();\n\t\tif ( false === $plugin_uri ) {\n\t\t\t// The plugin is not installed. Display the appropriate message and return false.\n\t\t\t$this->verify_message = $this->install_message();\n\t\t\treturn false;\n\t\t} else {\n\t\t\t// Determine if the plugin is active\n\t\t\tif ( ! is_plugin_active( $plugin_uri ) && ! $this->is_mu_plugin( $plugin_uri ) ) {\n\t\t\t\t// The plugin is not active. Display the appropriate message and return false.\n\t\t\t\t$this->verify_message = $this->activate_message();\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\t// The plugin is installed and active.\n\t\t\t\t$this->verify_message = '';\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}", "function is_vpn_up(){\n $ret = array();\n //exec('/sbin/ip addr show tun0 2>/dev/null', $ret);\n exec('/sbin/ifconfig tun0 2>/dev/null', $ret);\n if( array_key_exists( '0', $ret) !== true ){\n return false;\n }\n\n return true;\n }", "function pluginActivated($pluginClassName)\n{\n global $plugins;\n\n if (isset($plugins['all'][$pluginClassName])) {\n return $plugins['all'][$pluginClassName]->installed();\n }\n return false;\n}", "static function wcfm_wc_addons_active_check() {\n\t\tif ( ! self::$active_plugins ) self::init();\n\t\treturn in_array( 'woocommerce-product-addons/woocommerce-product-addons.php', self::$active_plugins ) || array_key_exists( 'woocommerce-product-addons/woocommerce-product-addons.php', self::$active_plugins );\n\t\treturn false;\n\t}", "public function checkAvailable()\n {\n return $this->is_active == true;\n }", "protected function is_network() {\n\t\treturn ( ! empty( $_REQUEST['network'] ) );\n\t}", "public function isActive() {\n\t\t\treturn $this->doCall($this->getUrl(),false) != '';\n\t\t}", "public function isActive()\n {\n $options = $this->options->get('options');\n\n /** @var \\Illuminate\\Routing\\Route $currentRoute */\n if (!$currentRoute = Route::current()) {\n // No matched route\n return false;\n }\n\n // Route\n if (isset($options['route'])) {\n if ($currentRoute->getName() == $options['route']) {\n if (URL::current() == route($options['route'], $options['route_parameters'])) {\n return true;\n }\n }\n }\n\n // URL\n if (isset($options['url']) && $currentRoute->getUri() == $options['url']) {\n return true;\n }\n\n // Check for active sub page\n if ($this->activeSubPage($this->getPages())) {\n return true;\n }\n\n return false;\n }", "public static function is_active(){\n\t\t$active = false;\n\t\tif(self::jb_exists()){\n\t\t\t$opt = get_option('tp_eg_use_lightbox', 'false');\n\t\t\tif($opt === 'jackbox') $active = true;\n\t\t}\n\t\t\n\t\treturn apply_filters('essgrid_is_active', $active);\n\t}", "public static function isActive()\n\t{\n\t\tglobal $sitepress;\n\t\tif ( !empty($sitepress) && is_object($sitepress) ) {\n\t\t\tif ( method_exists($sitepress,'get_active_languages') ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private function isPluginInstalled(){\n\t\n if (!$this->PluginManager->isInstalled($this->GetPluginName() , $this->company_id )) {\n return false;\n }\n return true;\n }", "public static function enabled()\n {\n return get_option( static::getPrefix() . 'enabled' ) == 1;\n }", "function sb_plugin_status() {\n $plugins = serendipity_plugin_api::enum_plugins('*', false, 'serendipity_plugin_staticpage');\n if(is_array($plugins) && !empty($plugins[0]['name'])) {\n return true;\n }\n return false;\n }", "public static function have_cache_plugin() {\n\n\t\tif ( defined( 'WP_CACHE' ) && WP_CACHE ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Detect Fastest cache\n\t\t$plugins = wp_get_active_and_valid_plugins();\n\n\t\tif ( in_array( WP_PLUGIN_DIR . '/wp-fastest-cache/wpFastestCache.php', $plugins ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "function is_available() {\n\t\tif ( $this->enabled == \"yes\" )\n\t\t\treturn true;\n\t}", "public function deactivate( $plugin, array $options = [ ] ) {\n\n\t\tif ( ! is_array( $plugin ) && ! is_string( $plugin ) ) {\n\t\t\t// Todo\n\t\t\tthrow new InvalidArgumentException( \"First argument \\$plugin must be of type string or array\" );\n\t\t}\n\t\t$arguments = [ 'plugin', 'deactivate' ];\n\t\tif ( isset( $options[ 'all' ] ) && TRUE === $options[ 'all' ] ) {\n\t\t\t$arguments[] = '--all';\n\t\t} else {\n\t\t\tif ( is_string( $plugin ) ) {\n\t\t\t\t$arguments[] = $plugin;\n\t\t\t} else {\n\t\t\t\t$arguments = array_merge( $arguments, $plugin );\n\t\t\t}\n\t\t}\n\n\t\tif ( isset( $options[ 'network' ] ) && TRUE === $options[ 'network' ] ) {\n\t\t\t$arguments[] = '--network';\n\t\t}\n\n\t\tif ( isset( $options[ 'uninstall' ] ) && TRUE == $options[ 'uninstall' ] ) {\n\t\t\t$arguments[] = '--uninstall';\n\t\t}\n\n\t\tif ( isset( $options[ 'site_url' ] ) ) {\n\t\t\t$arguments[] = \"--url={$options[ 'site_url' ]}\";\n\t\t}\n\n\t\ttry {\n\t\t\t$this->wp_cli->run( $arguments );\n\n\t\t\treturn true;\n\t\t} catch ( \\Throwable $e ) {\n\t\t\t// Todo: Wrap any possible Exception with a WpProvison\\Exception\n\t\t\tthrow $e;\n\t\t}\n\t}", "public function is_service_active() {\n\t\treturn strlen( $this->get_url() ) > 0;\n\t}", "public function hasOption($option)\n\t{\n\t\treturn in_array($option, $this->options);\n\t}", "public static function isActive()\n {\n return class_exists(WP_CLI_Login_Server::class, false);\n }", "static function wcfm_wcs_auction_active_check() {\n\t\tif ( ! self::$active_plugins ) self::init();\n\t\treturn in_array( 'woocommerce-simple-auctions/woocommerce-simple-auctions.php', self::$active_plugins ) || array_key_exists( 'woocommerce-simple-auctions/woocommerce-simple-auctions.php', self::$active_plugins );\n\t\treturn false;\n\t}", "function activate_plugin()\n {\n $license = $this->get_license();\n if ($this->is_active() || !$license['license_key']) {\n return false;\n }\n\n $tmp = $this->validate();\n if ($tmp) {\n $this->log('activating plugin, license activated');\n return true;\n } else {\n $this->log('activating plugin, unable to activate license');\n return false;\n }\n }", "public function is_woocommerce_aware_plugin($plugin_file_or_data) : bool\n {\n }", "private static function is_extension_active( $extension ) {\n\n\t\tif ( is_string( $extension ) )\n\t\t\t$extension = static::get_extension( $extension );\n\n\t\t$active = static::get_active_extensions();\n\n\t\tif ( isset( $active[ $extension['slug'] ] ) )\n\t\t\treturn true;\n\n\t\treturn false;\n\t}", "public function is_plugin_settings() {\n\n\t\treturn $this->is_general_configuration_page();\n\t}", "function ssp_is_connected_to_podcastmotor() {\n\t\t$is_connected = false;\n\t\t$podmotor_id = get_option( 'ss_podcasting_podmotor_account_id', '' );\n\t\tif ( ! empty( $podmotor_id ) ) {\n\t\t\t$podmotor_email = get_option( 'ss_podcasting_podmotor_account_email', '' );\n\t\t\t$podmotor_api_token = get_option( 'ss_podcasting_podmotor_account_api_token', '' );\n\t\t\tif ( ! empty( $podmotor_email ) && ! empty( $podmotor_api_token ) ) {\n\t\t\t\t$is_connected = true;\n\t\t\t}\n\t\t}\n\n\t\treturn $is_connected;\n\t}", "function wp_get_active_network_plugins()\n{\n}", "public static function is_wpml_active() {\n \n include_once( ABSPATH . 'wp-admin/includes/plugin.php' );\n \n $wpml_active = is_plugin_active( 'sitepress-multilingual-cms/sitepress.php' );\n \n $string_translation_active = is_plugin_active( 'wpml-string-translation/plugin.php' );\n \n return $wpml_active && $string_translation_active;\n \n }", "private static function is_extension_network( $extension ) {\n\n\t\tif ( is_string( $extension ) )\n\t\t\t$extension = static::get_extension( $extension );\n\n\t\treturn '1' === $extension['network'];\n\t}", "public function gatewayEnabled()\n\t{\n\t\tglobal $modSettings;\n\n\t\treturn !empty($modSettings['2co_id']) && !empty($modSettings['2co_password']);\n\t}" ]
[ "0.7445241", "0.7370895", "0.7199707", "0.70736086", "0.698262", "0.68269366", "0.6677753", "0.6451108", "0.63142747", "0.62831455", "0.6217415", "0.61735725", "0.61672604", "0.6158301", "0.61508614", "0.6131961", "0.61055505", "0.6086733", "0.6075301", "0.6058067", "0.60524565", "0.6039555", "0.60378146", "0.6019598", "0.6001551", "0.59867185", "0.59478897", "0.59066844", "0.58890885", "0.5875865", "0.58605057", "0.5839965", "0.5835431", "0.58213854", "0.5794251", "0.5755168", "0.5751878", "0.57153", "0.57121027", "0.5711897", "0.57049423", "0.56740695", "0.5666464", "0.5645351", "0.5602214", "0.5574251", "0.5570158", "0.5532056", "0.55097115", "0.5502402", "0.55000174", "0.548633", "0.5478631", "0.54617316", "0.5455043", "0.5450295", "0.5447886", "0.54451877", "0.5444085", "0.5434596", "0.5432497", "0.5422076", "0.5397603", "0.5396683", "0.53932136", "0.53904694", "0.53816134", "0.5370164", "0.53578854", "0.53572506", "0.53572506", "0.53570384", "0.5353856", "0.53487223", "0.5336072", "0.5334686", "0.53282523", "0.5326421", "0.5318746", "0.5317083", "0.5313839", "0.5311038", "0.53091365", "0.53069127", "0.52914643", "0.5276764", "0.52745557", "0.52714777", "0.5270228", "0.5269153", "0.52658784", "0.5263224", "0.52534336", "0.5249138", "0.5245553", "0.52302074", "0.5228828", "0.5212003", "0.52109516", "0.52054566" ]
0.7660845
0
Deep copies the given value.
Производит глубокую копию заданного значения.
function deep_copy( $value, $useCloneMethod = FALSE ) { return ( new DeepCopy( $useCloneMethod ) )->copy( $value ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function copy($value)\n {\n return \\is_object($value) ? (clone $value) : $value;\n }", "function copyValue()\n\t{\n\t\t$value = $this->getValue();\n\t\t\n\t\tif (isset($value))\n\t\t{\n\t\t\tif (method_exists($value, \"cloneNode\"))\n\t\t\t{\n\t\t\t\t$value = $value->cloneNode(true);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $value;\n\t}", "function sclone($value) {\n if (is_object($value)) {\n return clone $value;\n }\n\n return $value;\n }", "function copy_value($v) {\n\treturn $v;\n}", "public function __clone() {\n\t\t// Primi value objects, so we need to do deep copy.\n\t\t\\array_walk($this->value, function(&$item) {\n\t\t\t$item = clone $item;\n\t\t});\n\n\t}", "protected function copyAsClone($value) {\n\t\tif ($value instanceof \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage) {\n\t\t\t// objectstorage; copy storage and copy items, return new storage\n\t\t\t$newStorage = $this->objectManager->get('\\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage');\n\t\t\tforeach ($value as $item) {\n\t\t\t\t$newItem = $this->copy($item);\n\t\t\t\t$newStorage->attach($newItem);\n\t\t\t}\n\t\t\treturn $newStorage;\n\t\t} elseif ($value instanceof \\TYPO3\\CMS\\Extbase\\DomainObject\\DomainObjectInterface) {\n\t\t\t// DomainObject; copy and return\n\t\t\t/** @var $value \\TYPO3\\CMS\\Extbase\\DomainObject\\DomainObjectInterface */\n\t\t\treturn $this->copy($value);\n\t\t} elseif (is_object($value)) {\n\t\t\t// fallback case for class copying - value objects and such\n\t\t\treturn clone $value;\n\t\t} else {\n\t\t\t// value is probably a string\n\t\t\treturn $value;\n\t\t}\n\t}", "function u_copy() {\n $a = uv($this->val);\n return v($a);\n }", "public function copy();", "public function deepCopy()\n {\n $serialize = serialize($this);\n return unserialize($serialize);\n }", "public function value($value): self\n {\n $new = clone $this;\n $new->value = $value;\n return $new;\n }", "public function __clone() {\n\t\t$this->set_value_set( clone $this->get_value_set() );\n\t}", "public function setDeepValue($value);", "private function _recursiveCloneIfNecessary($value)\n {\n if (is_array($value)) {\n foreach ($value as $k => $v) {\n $value[$k] = $this->_recursiveCloneIfNecessary($v);\n }\n return $value;\n } else {\n return ($value instanceof Base)\n ? $value->createClone()\n : $value;\n }\n }", "public function copy ()\n\t{\n\t\t$loClone = clone $this;\n\t\t$loClone->_clone = true;\n\t\t\n\t\tif (is_object($loClone))\n\t\t{\n\t\t\tforeach ($loClone as $lsVar => $lmValue)\n\t\t\t{\n\t\t\t\tif (is_array($lmValue) && count($lmValue) != 0)\n\t\t\t\t{\n\t\t\t\t\tforeach ($lmValue as $lsId => $lmObj)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (is_object($lmObj) && method_exists($lmObj, 'copy'))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$loClone->{$lsVar}[$lsId] = $lmObj->copy();\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\treturn $loClone;\n\t}", "public function __clone() {\n foreach ($this as &$value) {\n $value = clone $value;\n }\n }", "public function testDeepCopies()\n {\n $obj = new Immutable([\n 'o' => new class {\n public $prop = 10;\n }\n ]);\n\n $new = $obj->o;\n $new->prop = 11;\n\n $this->assertEquals(10, $obj->o->prop);\n }", "abstract protected function copy();", "abstract protected function copy();", "protected function copyAsReference($value) {\n\t\tif ($value instanceof \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage) {\n\t\t\t// objectstorage; copy storage and attach items to this new storage\n\t\t\t// if 1:n mapping is used, items are detached from their old storage - this is\n\t\t\t// a limitation of this type of reference\n\t\t\t$newStorage = $this->objectManager->get('\\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage');\n\t\t\tforeach ($value as $item) {\n\t\t\t\t$newStorage->attach($item);\n\t\t\t}\n\t\t\treturn $newStorage;\n\t\t}\n\t\telseif ($value instanceof \\TYPO3\\CMS\\Extbase\\DomainObject\\DomainObjectInterface) {\n\t\t\t// 1:1 mapping as reference; return object itself\n\t\t\treturn $value;\n\t\t}\n\t\telseif (is_object($value)) {\n\t\t\t// fallback case for class copying - value objects and such\n\t\t\treturn $value;\n\t\t}\n\t\telse {\n\t\t\t// this case is very unlikely: means someone wished to copy hard type as a reference - so return a copy instead\n\t\t\treturn $value;\n\t\t}\n\t}", "public function copy(): self;", "public function __clone() {\n foreach($this as $key => $val) {\n if (is_object($val) || (is_array($val))) {\n $this->{$key} = unserialize(serialize($val));\n }\n }\n }", "public function testCloneFail() {\n $object = ValueObject::instance(1);\n clone $object;\n }", "public function duplicate($deep = false);", "public function __clone()\n {\n foreach ($this as $key => $value) {\n $this[$key] = clone $value;\n }\n }", "public function __clone()\n {\n $vars = get_object_vars($this);\n foreach ($vars as $key => $value) {\n if ((is_object($value)) && ($key != 'parent')) {\n $this->$key = clone $value;\n } else {\n $this->$key = $value;\n }\n }\n }", "public function __clone()\n {\n $vars = get_object_vars($this);\n foreach ($vars as $key => $value) {\n if (is_object($value)) {\n $this->$key = clone $value;\n } else {\n $this->$key = $value;\n }\n }\n }", "public function __clone()\n {\n foreach ( $this->data as $key => $value )\n {\n if ( $value instanceof self ) $this[$key] = clone $value;\n }\n }", "static function getDeepVariableCopy($input)\r\n\t{\r\n\t\tswitch (gettype($input)) {\r\n\t\t\tcase 'array':\r\n\t\t\t\t// DBR note 2013-09-10: Still not sure if this makes a difference in PHP.\r\n\t\t\t\tif (self::isAssociative($input)) {\r\n\t\t\t\t\t$copy = [];\r\n\t\t\t\t\tforeach ($input as $key => $val) {\r\n\t\t\t\t\t\t$copy[$key] = self::getDeepVariableCopy($val);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn $copy;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t$copy = [];\r\n\t\t\t\t\tforeach ($input as $val) {\r\n\t\t\t\t\t\t$copy[] = self::getDeepVariableCopy($val);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn $copy;\r\n\t\t\t\t}\r\n\t\t\tdefault:\r\n\t\t\t\treturn $input;\r\n\t\t}\r\n\t}", "public function copy($object);", "function __my_sql_db_copy_value($v) {\n\treturn $v;\n}", "public function __clone() {\n\t\t$vars = get_object_vars($this);\n\t\tforeach ($vars as $key => $value) {\n\t\t\tif ($key == '_parent') continue;\n\t\t\t\n\t\t\tif (is_object($value)) {\n\t\t\t\t$this->$key = clone $value;\n\t\t\t} else {\n\t\t\t\t$this->$key = $value;\n\t\t\t}\n\t\t}\n\t}", "function copy();", "public function __clone()\n\t\t{\n\t\t\tif (isset($this->data) && is_object($this->data))\n\t\t\t{\n\t\t\t\t$this->data = clone $this->data;\n\t\t\t}\n\t\t}", "public function __clone();", "public function __clone();", "public function __clone();", "public function __clone();", "public function __clone();", "public function __clone()\n {\n foreach (get_class_vars(get_class($this)) as $attribute => $defaultValue)\n {\n if (is_object($this->$attribute)) {\n $this->$attribute = clone $this->$attribute;\n } elseif (is_array($this->$attribute)) {\n $this->$attribute = \\Yana\\Util\\Hashtable::cloneArray($this->$attribute);\n } else {\n // nothing to do\n }\n }\n }", "public function __clone()\n {\n $array = array();\n foreach ($this->__options as $key => $value)\n {\n if ($value instanceof ObjectConfig || $value instanceof \\stdClass) {\n $array[$key] = clone $value;\n } else {\n $array[$key] = $value;\n }\n }\n\n $this->__options = $array;\n }", "public function copy()\n {\n return clone $this;\n }", "public function copy()\n {\n return clone $this;\n }", "public function copy()\n {\n return clone $this;\n }", "public function getCopy()\n {\n return clone $this;\n }", "public function flatten($value) \n {\n $this->reset();\n $this->walkReferenceSafe($value, $out);\n return $out;\n }", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "private function __clone(){}", "public function __clone() {\n return $this->copy(true);\n }", "public function __clone(){}", "public function __clone(){}", "public function __clone(){}", "public function __clone() {}", "public function __clone() {}", "public function __clone() {}", "public function __clone() {}", "public function __clone() {}", "public function __clone() {}", "public function __clone() {}", "public function __clone() {}", "public function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}", "private function __clone() {}" ]
[ "0.7762658", "0.76087624", "0.74329734", "0.6895284", "0.6865818", "0.66139716", "0.6538725", "0.6365951", "0.6336575", "0.63358414", "0.63332194", "0.630284", "0.62086844", "0.6183397", "0.6180599", "0.61734563", "0.600798", "0.600798", "0.5937692", "0.59373695", "0.5903107", "0.581203", "0.5801438", "0.57868785", "0.5770236", "0.576256", "0.57462454", "0.57448", "0.5734365", "0.5732061", "0.57300687", "0.5726028", "0.5704463", "0.56958526", "0.56958526", "0.56958526", "0.56958526", "0.56958526", "0.56030697", "0.558649", "0.55547804", "0.55547804", "0.55547804", "0.55495244", "0.55477977", "0.55380934", "0.55380934", "0.55380934", "0.55380934", "0.55380934", "0.55380934", "0.55380934", "0.55380934", "0.55380934", "0.55380934", "0.55380934", "0.55380934", "0.55380934", "0.55380934", "0.55380934", "0.55380934", "0.5535773", "0.5532607", "0.5532607", "0.5532607", "0.55154145", "0.55154145", "0.55154145", "0.55154145", "0.55154145", "0.55154145", "0.55154145", "0.55154145", "0.55154145", "0.5508055", "0.5508055", "0.5508055", "0.5508055", "0.5508055", "0.5508055", "0.5508055", "0.5508055", "0.5508055", "0.5508055", "0.5508055", "0.5508055", "0.5508055", "0.5508055", "0.5508055", "0.5508055", "0.5508055", "0.5508055", "0.5508055", "0.5508055", "0.5508055", "0.5508055", "0.5508055", "0.5508055", "0.5508055", "0.5508055" ]
0.8079824
0
format helpers xml2array() will convert the given XML text to an array in the XML structure. Link: Arguments : $contents The XML text $get_attributes 1 or 0. If this is 1 the function will get the attributes as well as the tag values this results in a different array structure in the return value. $priority Can be 'tag' or 'attribute'. This will change the way the resulting array structure. For 'tag', the tags are given more importance. Return: The parsed XML in an array form. Use print_r() to see the resulting array structure. Examples: $array = xml2array(file_get_contents('feed.xml')); $array = xml2array(file_get_contents('feed.xml', 1, 'attribute'));
Помощники форматирования xml2array() преобразуют данный текст XML в массив в структуре XML. Ссылка: Аргументы: $contents Текст XML $get_attributes 1 или 0. Если это 1, функция получает как значения тегов, так и атрибуты, что приводит к различной структуре массива возвращаемого значения. $priority Может быть 'tag' или 'attribute'. Это изменит способ формирования структуры результирующего массива. Для 'tag' теги имеют более высокий приоритет. Возвращаемое значение: XML, проанализированный в виде массива. Используйте print_r(), чтобы увидеть структуру результирующего массива. Примеры: $array = xml2array(file_get_contents('feed.xml')); $array = xml2array(file_get_contents('feed.xml', 1, 'attribute'));
public static function xmlToArray($contents, $get_attributes = 0, $priority = 'tag') { if (empty($contents)) { return null; } if (!function_exists('xml_parser_create')) { //print "'xml_parser_create()' function not found!"; return null; } //Get the XML parser of PHP - PHP must have this module for the parser to work $parser = xml_parser_create(''); xml_parser_set_option( $parser, XML_OPTION_TARGET_ENCODING, "UTF-8" ); # http://minutillo.com/steve/weblog/2004/6/17/php-xml-and-character-encodings-a-tale-of-sadness-rage-and-data-loss xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0); xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1); xml_parse_into_struct($parser, trim($contents), $xml_values); xml_parser_free($parser); if (!$xml_values) { return null; } //Hmm... //Initializations $xml_array = []; $current = &$xml_array; //Reference //Go through the tags. $repeated_tag_index = []; //Multiple tags with same name will be turned into an array foreach ($xml_values as $data) { unset($attributes, $value); //Remove existing values, or there will be trouble //This command will extract these variables into the foreach scope // tag(string) , type(string) , level(int) , attributes(array) . extract($data); //We could use the array by itself, but this cooler. $result = []; $attributes_data = []; if (isset($value)) { if ($priority == 'tag') { $result = $value; } else { $result['value'] = $value; } //Put the value in a assoc array if we are in the 'Attribute' mode } //Set the attributes too. if (isset($attributes) and $get_attributes) { foreach ($attributes as $attr => $val) { if ($priority == 'tag') { $attributes_data[$attr] = $val; } else { $result['attr'][$attr] = $val; } //Set all the attributes in a array called 'attr' } } //See tag status and do the needed. /** @var string $type */ /** @var string $tag */ /** @var string $level */ if ($type == "open") { //The starting of the tag '<tag>' $parent[$level - 1] = &$current; if (!is_array($current) or (!in_array($tag, array_keys($current)))) { //Insert New tag $current[$tag] = $result; if ($attributes_data) { $current[$tag . '_attr'] = $attributes_data; } $repeated_tag_index[$tag . '_' . $level] = 1; $current = &$current[$tag]; } else { //There was another element with the same tag name if (isset($current[$tag][0])) { //If there is a 0th element it is already an array $current[$tag][$repeated_tag_index[$tag . '_' . $level]] = $result; $repeated_tag_index[$tag . '_' . $level]++; } else { //This section will make the value an array if multiple tags with the same name appear together $current[$tag] = [ $current[$tag], $result ]; //This will combine the existing item and the new item together to make an array $repeated_tag_index[$tag . '_' . $level] = 2; if (isset($current[$tag . '_attr'])) { //The attribute of the last(0th) tag must be moved as well $current[$tag]['0_attr'] = $current[$tag . '_attr']; unset($current[$tag . '_attr']); } } $last_item_index = $repeated_tag_index[$tag . '_' . $level] - 1; $current = &$current[$tag][$last_item_index]; } } elseif ($type == "complete") { //Tags that ends in 1 line '<tag />' //See if the key is already taken. if (!isset($current[$tag])) { //New Key $current[$tag] = (is_array($result) && empty($result)) ? '' : $result; $repeated_tag_index[$tag . '_' . $level] = 1; if ($priority == 'tag' and $attributes_data) { $current[$tag . '_attr'] = $attributes_data; } } else { //If taken, put all things inside a list(array) if (isset($current[$tag][0]) and is_array($current[$tag])) { //If it is already an array... // ...push the new element into that array. $current[$tag][$repeated_tag_index[$tag . '_' . $level]] = $result; if ($priority == 'tag' and $get_attributes and $attributes_data) { $current[$tag][$repeated_tag_index[$tag . '_' . $level] . '_attr'] = $attributes_data; } $repeated_tag_index[$tag . '_' . $level]++; } else { //If it is not an array... $current[$tag] = [ $current[$tag], $result ]; //...Make it an array using using the existing value and the new value $repeated_tag_index[$tag . '_' . $level] = 1; if ($priority == 'tag' and $get_attributes) { if (isset($current[$tag . '_attr'])) { //The attribute of the last(0th) tag must be moved as well $current[$tag]['0_attr'] = $current[$tag . '_attr']; unset($current[$tag . '_attr']); } if ($attributes_data) { $current[$tag][$repeated_tag_index[$tag . '_' . $level] . '_attr'] = $attributes_data; } } $repeated_tag_index[$tag . '_' . $level]++; //0 and 1 index is already taken } } } elseif ($type == 'close') { //End of tag '</tag>' $current = &$parent[$level - 1]; } } return $xml_array; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function XmlToArray($contents, $get_attributes = 1, $priority = 'tag') {\n\n if (!$contents)\n return array();\n\n if (!function_exists('xml_parser_create')) {\n return array();\n }\n\n //Get the XML parser of PHP - PHP must have this module for the parser to work\n $parser = xml_parser_create('');\n xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, \"UTF-8\"); # http://minutillo.com/steve/weblog/2004/6/17/php-xml-and-character-encodings-a-tale-of-sadness-rage-and-data-loss\n xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);\n xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);\n xml_parse_into_struct($parser, trim($contents), $xml_values);\n xml_parser_free($parser);\n\n if (!$xml_values) {\n return; //Not XML Values\n }\n\n //Initializations\n $xml_array = array();\n $parents = array();\n $opened_tags = array();\n $arr = array();\n\n $current = &$xml_array; //Refference\n //Go through the tags.\n $repeated_tag_index = array(); //Multiple tags with same name will be turned into an array\n foreach ($xml_values as $data) {\n unset($attributes, $value); //Remove existing values, or there will be trouble\n //This command will extract these variables into the foreach scope\n // tag(string), type(string), level(int), attributes(array).\n extract($data); //We could use the array by itself, but this cooler.\n\n $result = array();\n $attributes_data = array();\n\n if (isset($value)) {\n if ($priority == 'tag')\n $result = $value;\n else\n $result['value'] = $value; //Put the value in a assoc array if we are in the 'Attribute' mode\n }\n\n //Set the attributes too.\n if (isset($attributes) and $get_attributes) {\n foreach ($attributes as $attr => $val) {\n if ($priority == 'tag')\n $attributes_data[$attr] = $val;\n else\n $result['attr'][$attr] = $val; //Set all the attributes in a array called 'attr'\n }\n }\n\n //See tag status and do the needed.\n if ($type == \"open\") {//The starting of the tag '<tag>'\n $parent[$level - 1] = &$current;\n if (!is_array($current) or (!in_array($tag, array_keys($current)))) { //Insert New tag\n $current[$tag] = $result;\n if ($attributes_data)\n $current[$tag . '_attr'] = $attributes_data;\n $repeated_tag_index[$tag . '_' . $level] = 1;\n\n $current = &$current[$tag];\n } else { //There was another element with the same tag name\n if (isset($current[$tag][0])) {//If there is a 0th element it is already an array\n $current[$tag][$repeated_tag_index[$tag . '_' . $level]] = $result;\n $repeated_tag_index[$tag . '_' . $level] ++;\n } else {//This section will make the value an array if multiple tags with the same name appear together\n $current[$tag] = array($current[$tag], $result); //This will combine the existing item and the new item together to make an array\n $repeated_tag_index[$tag . '_' . $level] = 2;\n\n if (isset($current[$tag . '_attr'])) { //The attribute of the last(0th) tag must be moved as well\n $current[$tag]['0_attr'] = $current[$tag . '_attr'];\n unset($current[$tag . '_attr']);\n }\n }\n $last_item_index = $repeated_tag_index[$tag . '_' . $level] - 1;\n $current = &$current[$tag][$last_item_index];\n }\n } elseif ($type == \"complete\") { //Tags that ends in 1 line '<tag />'\n //See if the key is already taken.\n if (!isset($current[$tag])) { //New Key\n $current[$tag] = $result;\n $repeated_tag_index[$tag . '_' . $level] = 1;\n if ($priority == 'tag' and $attributes_data)\n $current[$tag . '_attr'] = $attributes_data;\n } else { //If taken, put all things inside a list(array)\n if (isset($current[$tag][0]) and is_array($current[$tag])) {//If it is already an array...\n // ...push the new element into that array.\n $current[$tag][$repeated_tag_index[$tag . '_' . $level]] = $result;\n\n if ($priority == 'tag' and $get_attributes and $attributes_data) {\n $current[$tag][$repeated_tag_index[$tag . '_' . $level] . '_attr'] = $attributes_data;\n }\n $repeated_tag_index[$tag . '_' . $level] ++;\n } else { //If it is not an array...\n $current[$tag] = array($current[$tag], $result); //...Make it an array using using the existing value and the new value\n $repeated_tag_index[$tag . '_' . $level] = 1;\n if ($priority == 'tag' and $get_attributes) {\n if (isset($current[$tag . '_attr'])) { //The attribute of the last(0th) tag must be moved as well\n $current[$tag]['0_attr'] = $current[$tag . '_attr'];\n unset($current[$tag . '_attr']);\n }\n\n if ($attributes_data) {\n $current[$tag][$repeated_tag_index[$tag . '_' . $level] . '_attr'] = $attributes_data;\n }\n }\n $repeated_tag_index[$tag . '_' . $level] ++; //0 and 1 index is already taken\n }\n }\n } elseif ($type == 'close') { //End of tag '</tag>'\n $current = &$parent[$level - 1];\n }\n }\n //Return asso Array\n return($xml_array);\n }", "function Topline_xml2array($contents, $get_attributes=1, $priority = 'tag', $blnSetAttributesToCustomCode = false) {\n // $get_attributes - 1 or 0. If this is 1 the function will get the attributes as well as the tag values - this results in a different array structure in the return value.\n // $priority - Can be 'tag' or 'attribute'. This will change the way the resulting array sturcture. For 'tag', the tags are given more importance.\n //Return: The parsed XML in an array form. Use print_r() to see the resulting array structure\n if(!$contents) return array();\n if(!function_exists('xml_parser_create')) {\n //print \"'xml_parser_create()' function not found!\";\n \treturn array();\n }\n //Get the XML parser of PHP - PHP must have this module for the parser to work\n $parser = xml_parser_create('');\n xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, \"UTF-8\");\n xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);\n xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);\n xml_parse_into_struct($parser, trim($contents), $xml_values);\n xml_parser_free($parser);\t\n if(!$xml_values) return;//Hmm...\n //Initializations\n $xml_array = array();\n $parents = array();\n $opened_tags = array();\n $arr = array();\n $current = &$xml_array; //Refference\n //Go through the tags.\n $repeated_tag_index = array();//Multiple tags with same name will be turned into an array\n foreach($xml_values as $data) {\n unset($attributes,$value);//Remove existing values, or there will be trouble\n //This command will extract these variables into the foreach scope\n \t// tag(string), type(string), level(int), attributes(array).\n extract($data);//We could use the array by itself, but this cooler.\n \t$result = array();\n\tif($blnSetAttributesToCustomCode == false)\n\t $attributes_data = array();\n \tif(isset($value)) {\n if($priority == 'tag') $result = $value;\n \t else $result['value'] = $value; //Put the value in a assoc array if we are in the 'Attribute' mode\n }\n //Set the attributes too.\n \tif(isset($attributes) and $get_attributes) {\n foreach($attributes as $attr => $val) {\n \tif($priority == 'tag') {\n\t\t\t$attributes_data[$attr] = $val;\n\t\t} else {\n\t\t\t$result['attr'][$attr] = $val; //Set all the attributes in a array called 'attr'\n\t\t}\n \t }\n }\n //See tag status and do the needed.\n \tif($type == \"open\") {//The starting of the tag '<tag>'\n $parent[$level-1] = &$current;\n \t if(!is_array($current) or (!Topline_find_in_array($tag, array_keys($current)))) { //Insert New tag\n $current[$tag] = $result;\n if($attributes_data) {\n\t\t\tif($blnSetAttributesToCustomCode == false)\n\t\t\t\t$current[$tag. '_attr'] = $attributes_data;\n\t\t}\n $repeated_tag_index[$tag.'_'.$level] = 1;\n $current = &$current[$tag];\n \t } else { //There was another element with the same tag name\n if(isset($current[$tag][0])) { //If there is a 0th element it is already an array\n \t $current[$tag][$repeated_tag_index[$tag.'_'.$level]] = $result;\n $repeated_tag_index[$tag.'_'.$level]++;\n \t} else { //This section will make the value an array if multiple tags with the same name appear together\n \t $current[$tag] = array($current[$tag],$result); //This will combine the existing item and the new item together to make an array\n $repeated_tag_index[$tag.'_'.$level] = 2;\n if(isset($current[$tag.'_attr'])) { //The attribute of the last(0th) tag must be moved as well\n \t $current[$tag]['0_attr'] = $current[$tag.'_attr'];\n \t unset($current[$tag.'_attr']);\n }\n }\n \t$last_item_index = $repeated_tag_index[$tag.'_'.$level]-1;\n \t $current = &$current[$tag][$last_item_index];\n }\n } elseif($type == \"complete\") { //Tags that ends in 1 line '<tag />'\n \t //See if the key is already taken.\n if(!isset($current[$tag])) { //New Key\n \t$current[$tag] = $result;\n \t $repeated_tag_index[$tag.'_'.$level] = 1;\n if($priority == 'tag' and $attributes_data) {\n\t\t\t$current[$tag . '_attr'] = $attributes_data;\n \t\t\t\tif($blnSetAttributesToCustomCode != false)\n\t\t \t$attributes_data = array();\n\t\t}\n \t } else { //If taken, put all things inside a list(array)\n if(isset($current[$tag][0]) and is_array($current[$tag])) {//If it is already an array...\n \t // ...push the new element into that array.\n $current[$tag][$repeated_tag_index[$tag.'_'.$level]] = $result;\n \t if($priority == 'tag' and $get_attributes and $attributes_data) {\n \t $current[$tag][$repeated_tag_index[$tag.'_'.$level] . '_attr'] = $attributes_data;\n\t\t\tif($blnSetAttributesToCustomCode != false)\n\t\t \t$attributes_data = array();\n \t }\n $repeated_tag_index[$tag.'_'.$level]++;\n } else { //If it is not an array...\n \t $current[$tag] = array($current[$tag],$result); //...Make it an array using using the existing value and the new value\n \t $repeated_tag_index[$tag.'_'.$level] = 1;\n if($priority == 'tag' and $get_attributes) {\n \tif(isset($current[$tag.'_attr'])) { //The attribute of the last(0th) tag must be moved as well \n \t $current[$tag]['0_attr'] = $current[$tag.'_attr'];\n \t unset($current[$tag.'_attr']);\n } \n if($attributes_data) {\n\t\t\t\t$current[$tag][$repeated_tag_index[$tag.'_'.$level] . '_attr'] = $attributes_data;\n \t\t\t\t\tif($blnSetAttributesToCustomCode != false)\n\t\t\t \t$attributes_data = array();\n \t }\n }\n \t $repeated_tag_index[$tag.'_'.$level]++; //0 and 1 index is already taken\n \t }\n }\n \t} elseif($type == 'close') { //End of tag '</tag>'\n $current = &$parent[$level-1];\n \t}\n }\n return($xml_array);\n}", "function xml2array($contents, $get_attributes = 1, $priority = 'tag')\n{\n \n if (!function_exists('xml_parser_create'))\n {\n return array ();\n }\n $parser = xml_parser_create('');\n \n# if (!($fp = @ fopen($url, 'rb')))\n # {\n # return array ();\n # }\n # while (!feof($fp))\n # {\n # $contents .= fread($fp, 8192);\n # }\n # fclose($fp);\n \n \n \n xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, \"UTF-8\");\n xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);\n xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);\n xml_parse_into_struct($parser, trim($contents), $xml_values);\n xml_parser_free($parser);\n if (!$xml_values)\n return; //Hmm...\n $xml_array = array ();\n $parents = array ();\n $opened_tags = array ();\n $arr = array ();\n $current = & $xml_array;\n $repeated_tag_index = array (); \n foreach ($xml_values as $data)\n {\n unset ($attributes, $value);\n extract($data);\n $result = array ();\n $attributes_data = array ();\n if (isset ($value))\n {\n if ($priority == 'tag')\n $result = $value;\n else\n $result['value'] = $value;\n }\n if (isset ($attributes) and $get_attributes)\n {\n foreach ($attributes as $attr => $val)\n {\n if ($priority == 'tag')\n $attributes_data[$attr] = $val;\n else\n $result['attr'][$attr] = $val; //Set all the attributes in a array called 'attr'\n }\n }\n if ($type == \"open\")\n { \n $parent[$level -1] = & $current;\n if (!is_array($current) or (!in_array($tag, array_keys($current))))\n {\n $current[$tag] = $result;\n if ($attributes_data)\n $current[$tag . '_attr'] = $attributes_data;\n $repeated_tag_index[$tag . '_' . $level] = 1;\n $current = & $current[$tag];\n }\n else\n {\n if (isset ($current[$tag][0]))\n {\n $current[$tag][$repeated_tag_index[$tag . '_' . $level]] = $result;\n $repeated_tag_index[$tag . '_' . $level]++;\n }\n else\n { \n $current[$tag] = array (\n $current[$tag],\n $result\n ); \n $repeated_tag_index[$tag . '_' . $level] = 2;\n if (isset ($current[$tag . '_attr']))\n {\n $current[$tag]['0_attr'] = $current[$tag . '_attr'];\n unset ($current[$tag . '_attr']);\n }\n }\n $last_item_index = $repeated_tag_index[$tag . '_' . $level] - 1;\n $current = & $current[$tag][$last_item_index];\n }\n }\n elseif ($type == \"complete\")\n {\n if (!isset ($current[$tag]))\n {\n $current[$tag] = $result;\n $repeated_tag_index[$tag . '_' . $level] = 1;\n if ($priority == 'tag' and $attributes_data)\n $current[$tag . '_attr'] = $attributes_data;\n }\n else\n {\n if (isset ($current[$tag][0]) and is_array($current[$tag]))\n {\n $current[$tag][$repeated_tag_index[$tag . '_' . $level]] = $result;\n if ($priority == 'tag' and $get_attributes and $attributes_data)\n {\n $current[$tag][$repeated_tag_index[$tag . '_' . $level] . '_attr'] = $attributes_data;\n }\n $repeated_tag_index[$tag . '_' . $level]++;\n }\n else\n {\n $current[$tag] = array (\n $current[$tag],\n $result\n ); \n $repeated_tag_index[$tag . '_' . $level] = 1;\n if ($priority == 'tag' and $get_attributes)\n {\n if (isset ($current[$tag . '_attr']))\n { \n $current[$tag]['0_attr'] = $current[$tag . '_attr'];\n unset ($current[$tag . '_attr']);\n }\n if ($attributes_data)\n {\n $current[$tag][$repeated_tag_index[$tag . '_' . $level] . '_attr'] = $attributes_data;\n }\n }\n $repeated_tag_index[$tag . '_' . $level]++; //0 and 1 index is already taken\n }\n }\n }\n elseif ($type == 'close')\n {\n $current = & $parent[$level -1];\n }\n }\n return ($xml_array);\n \n \n}", "function itslenny_xml2array($url, $get_attributes = 1, $priority = 'tag') {\n\t$contents = \"\";\n\tif (!function_exists('xml_parser_create'))\n\t{\n\t\treturn array ();\n\t}\n\t$parser = xml_parser_create('');\n\tif(!($fp = @ fopen($url, 'rb')))\n\t{\n\t\treturn array ();\n\t}\n\twhile(!feof($fp))\n\t{\n\t\t$contents .= fread($fp, 8192);\n\t}\n\tfclose($fp);\n\txml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, \"UTF-8\");\n\txml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);\n\txml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);\n\txml_parse_into_struct($parser, trim($contents), $xml_values);\n\txml_parser_free($parser);\n\tif(!$xml_values)\n\t{\n\t\treturn; //Hmm...\n\t}\n\t$xml_array = array ();\n\t$parents = array ();\n\t$opened_tags = array ();\n\t$arr = array ();\n\t$current = & $xml_array;\n\t$repeated_tag_index = array ();\n\tforeach ($xml_values as $data)\n\t{\n\t\tunset ($attributes, $value);\n\t\textract($data);\n\t\t$result = array ();\n\t\t$attributes_data = array ();\n\t\tif (isset ($value))\n\t\t{\n\t\t\tif($priority == 'tag')\n\t\t\t{\n\t\t\t\t$result = $value;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$result['value'] = $value;\n\t\t\t}\n\t\t}\n\t\tif(isset($attributes) and $get_attributes)\n\t\t{\n\t\t\tforeach($attributes as $attr => $val)\n\t\t\t{\n\t\t\t\tif($priority == 'tag')\n\t\t\t\t{\n\t\t\t\t\t$attributes_data[$attr] = $val;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$result['attr'][$attr] = $val; //Set all the attributes in a array called 'attr'\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif ($type == \"open\")\n\t\t{\n\t\t\t$parent[$level -1] = & $current;\n\t\t\tif(!is_array($current) or (!in_array($tag, array_keys($current))))\n\t\t\t{\n\t\t\t\t$current[$tag] = $result;\n\t\t\t\tif($attributes_data)\n\t\t\t\t{\n\t\t\t\t\t$current[$tag . '_attr'] = $attributes_data;\n\t\t\t\t}\n\t\t\t\t$repeated_tag_index[$tag . '_' . $level] = 1;\n\t\t\t\t$current = & $current[$tag];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (isset ($current[$tag][0]))\n\t\t\t\t{\n\t\t\t\t\t$current[$tag][$repeated_tag_index[$tag . '_' . $level]] = $result;\n\t\t\t\t\t$repeated_tag_index[$tag . '_' . $level]++;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$current[$tag] = array($current[$tag],$result);\n\t\t\t\t\t$repeated_tag_index[$tag . '_' . $level] = 2;\n\t\t\t\t\tif(isset($current[$tag . '_attr']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$current[$tag]['0_attr'] = $current[$tag . '_attr'];\n\t\t\t\t\t\tunset ($current[$tag . '_attr']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$last_item_index = $repeated_tag_index[$tag . '_' . $level] - 1;\n\t\t\t\t$current = & $current[$tag][$last_item_index];\n\t\t\t}\n\t\t}\n\t\telse if($type == \"complete\")\n\t\t{\n\t\t\tif(!isset ($current[$tag]))\n\t\t\t{\n\t\t\t\t$current[$tag] = $result;\n\t\t\t\t$repeated_tag_index[$tag . '_' . $level] = 1;\n\t\t\t\tif($priority == 'tag' and $attributes_data)\n\t\t\t\t{\n\t\t\t\t\t$current[$tag . '_attr'] = $attributes_data;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (isset ($current[$tag][0]) and is_array($current[$tag]))\n\t\t\t\t{\n\t\t\t\t\t$current[$tag][$repeated_tag_index[$tag . '_' . $level]] = $result;\n\t\t\t\t\tif ($priority == 'tag' and $get_attributes and $attributes_data)\n\t\t\t\t\t{\n\t\t\t\t\t\t$current[$tag][$repeated_tag_index[$tag . '_' . $level] . '_attr'] = $attributes_data;\n\t\t\t\t\t}\n\t\t\t\t\t$repeated_tag_index[$tag . '_' . $level]++;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$current[$tag] = array($current[$tag],$result);\n\t\t\t\t\t$repeated_tag_index[$tag . '_' . $level] = 1;\n\t\t\t\t\tif ($priority == 'tag' and $get_attributes)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (isset ($current[$tag . '_attr']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$current[$tag]['0_attr'] = $current[$tag . '_attr'];\n\t\t\t\t\t\t\tunset ($current[$tag . '_attr']);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($attributes_data)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$current[$tag][$repeated_tag_index[$tag . '_' . $level] . '_attr'] = $attributes_data;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$repeated_tag_index[$tag . '_' . $level]++; //0 and 1 index is already taken\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if($type == 'close')\n\t\t{\n\t\t\t$current = & $parent[$level -1];\n\t\t}\n\t}\n\treturn ($xml_array);\n}", "function timelord_xml2array($url, $get_attributes = 1, $priority = 'tag') {\n\t$contents = \"\";\n\tif (!function_exists('xml_parser_create'))\n\t{\n\t\treturn array ();\n\t}\n\t$parser = xml_parser_create('');\n\tif(!($fp = @ fopen($url, 'rb')))\n\t{\n\t\treturn array ();\n\t}\n\twhile(!feof($fp))\n\t{\n\t\t$contents .= fread($fp, 8192);\n\t}\n\tfclose($fp);\n\txml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, \"UTF-8\");\n\txml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);\n\txml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);\n\txml_parse_into_struct($parser, trim($contents), $xml_values);\n\txml_parser_free($parser);\n\tif(!$xml_values)\n\t{\n\t\treturn; //Hmm...\n\t}\n\t$xml_array = array ();\n\t$parents = array ();\n\t$opened_tags = array ();\n\t$arr = array ();\n\t$current = & $xml_array;\n\t$repeated_tag_index = array ();\n\tforeach ($xml_values as $data)\n\t{\n\t\tunset ($attributes, $value);\n\t\textract($data);\n\t\t$result = array ();\n\t\t$attributes_data = array ();\n\t\tif (isset ($value))\n\t\t{\n\t\t\tif($priority == 'tag')\n\t\t\t{\n\t\t\t\t$result = $value;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$result['value'] = $value;\n\t\t\t}\n\t\t}\n\t\tif(isset($attributes) and $get_attributes)\n\t\t{\n\t\t\tforeach($attributes as $attr => $val)\n\t\t\t{\n\t\t\t\tif($priority == 'tag')\n\t\t\t\t{\n\t\t\t\t\t$attributes_data[$attr] = $val;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$result['attr'][$attr] = $val; //Set all the attributes in a array called 'attr'\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif ($type == \"open\")\n\t\t{\n\t\t\t$parent[$level -1] = & $current;\n\t\t\tif(!is_array($current) or (!in_array($tag, array_keys($current))))\n\t\t\t{\n\t\t\t\t$current[$tag] = $result;\n\t\t\t\tif($attributes_data)\n\t\t\t\t{\n\t\t\t\t\t$current[$tag . '_attr'] = $attributes_data;\n\t\t\t\t}\n\t\t\t\t$repeated_tag_index[$tag . '_' . $level] = 1;\n\t\t\t\t$current = & $current[$tag];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (isset ($current[$tag][0]))\n\t\t\t\t{\n\t\t\t\t\t$current[$tag][$repeated_tag_index[$tag . '_' . $level]] = $result;\n\t\t\t\t\t$repeated_tag_index[$tag . '_' . $level]++;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$current[$tag] = array($current[$tag],$result);\n\t\t\t\t\t$repeated_tag_index[$tag . '_' . $level] = 2;\n\t\t\t\t\tif(isset($current[$tag . '_attr']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$current[$tag]['0_attr'] = $current[$tag . '_attr'];\n\t\t\t\t\t\tunset ($current[$tag . '_attr']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$last_item_index = $repeated_tag_index[$tag . '_' . $level] - 1;\n\t\t\t\t$current = & $current[$tag][$last_item_index];\n\t\t\t}\n\t\t}\n\t\telse if($type == \"complete\")\n\t\t{\n\t\t\tif(!isset ($current[$tag]))\n\t\t\t{\n\t\t\t\t$current[$tag] = $result;\n\t\t\t\t$repeated_tag_index[$tag . '_' . $level] = 1;\n\t\t\t\tif($priority == 'tag' and $attributes_data)\n\t\t\t\t{\n\t\t\t\t\t$current[$tag . '_attr'] = $attributes_data;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (isset ($current[$tag][0]) and is_array($current[$tag]))\n\t\t\t\t{\n\t\t\t\t\t$current[$tag][$repeated_tag_index[$tag . '_' . $level]] = $result;\n\t\t\t\t\tif ($priority == 'tag' and $get_attributes and $attributes_data)\n\t\t\t\t\t{\n\t\t\t\t\t\t$current[$tag][$repeated_tag_index[$tag . '_' . $level] . '_attr'] = $attributes_data;\n\t\t\t\t\t}\n\t\t\t\t\t$repeated_tag_index[$tag . '_' . $level]++;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$current[$tag] = array($current[$tag],$result);\n\t\t\t\t\t$repeated_tag_index[$tag . '_' . $level] = 1;\n\t\t\t\t\tif ($priority == 'tag' and $get_attributes)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (isset ($current[$tag . '_attr']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$current[$tag]['0_attr'] = $current[$tag . '_attr'];\n\t\t\t\t\t\t\tunset ($current[$tag . '_attr']);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($attributes_data)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$current[$tag][$repeated_tag_index[$tag . '_' . $level] . '_attr'] = $attributes_data;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$repeated_tag_index[$tag . '_' . $level]++; //0 and 1 index is already taken\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if($type == 'close')\n\t\t{\n\t\t\t$current = & $parent[$level -1];\n\t\t}\n\t}\n\treturn ($xml_array);\n}", "function xml2array(&$contents, $get_attributes = true, $array_element = true) {\r\n if (!$contents) return array();\r\n if (!function_exists('xml_parser_create')) {\r\n //print \"'xml_parser_create()' function not found!\";\r\n return array();\r\n }\r\n //Get the XML parser of PHP - PHP must have this module for the parser to work\r\n $parser = xml_parser_create();\r\n xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);\r\n xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);\r\n xml_parse_into_struct($parser, $contents, $xml_values);\r\n xml_parser_free($parser);\r\n if (!$xml_values) return; //Hmm...\r\n //Initializations\r\n $xml_array = array();\r\n $parents = array();\r\n $opened_tags = array();\r\n $arr = array();\r\n $current = & $xml_array;\r\n //Go through the tags.\r\n foreach ($xml_values as $data) {\r\n unset($attributes, $value); //value left from last time extract ;Remove existing values, or there will be trouble\r\n //This command will extract these variables into the foreach scope\r\n // tag(string), type(string), level(int), attributes(array).\r\n extract($data); //We could use the array by itself, but this cooler.\r\n $result = '';\r\n if ($get_attributes) { //The second argument of the function decides this.\r\n $result = array();\r\n if (isset($value)) $result['value'] = $value;\r\n //Set the attributes too.\r\n if (isset($attributes)) {\r\n foreach ($attributes as $attr => $val) {\r\n if ($get_attributes == 1) $result[$attr] = $val; //Set all the attributes in a array called 'attr'\r\n \r\n /** :TODO: should we change the key name to '_attr'? Someone may use the tagname 'attr'. Same goes for 'value' too */\r\n }\r\n }\r\n } elseif (isset($value)) {\r\n $result = $value;\r\n }\r\n //See tag status and do the needed.\r\n if ($type == \"open\") { //The starting of the tag '<tag>'\r\n $parent[$level - 1] = & $current;\r\n if (!is_array($current) or (!in_array($tag, array_keys($current)))) { //Insert New tag\r\n $current[$tag] = $result;\r\n $current = & $current[$tag];\r\n } else { //There was another element with the same tag name\r\n if (isset($current[$tag][0])) {\r\n array_push($current[$tag], $result);\r\n } else {\r\n $current[$tag] = array($current[$tag], $result);\r\n }\r\n $last = count($current[$tag]) - 1;\r\n $current = & $current[$tag][$last];\r\n }\r\n } elseif ($type == \"complete\") { //Tags that ends in 1 line '<tag />'\r\n //See if the key is already taken.\r\n if (!isset($current[$tag])) { //New Key\r\n //modified 2009 09 09 : push in array if only one element.\r\n $current[$tag] = $array_element ? array($result) : $result;\r\n } else { //If taken, put all things inside a list(array)\r\n if ((is_array($current[$tag]) and $get_attributes == 0) //If it is already an array...\r\n or (isset($current[$tag][0]) and is_array($current[$tag][0]) and $get_attributes == 1)) {\r\n array_push($current[$tag], $result); // ...push the new element into that array.\r\n \r\n } else { //If it is not an array...\r\n $current[$tag] = array($current[$tag], $result); //...Make it an array using using the existing value and the new value\r\n \r\n }\r\n }\r\n } elseif ($type == 'close') { //End of tag '</tag>'\r\n $current = & $parent[$level - 1];\r\n }\r\n }\r\n return ($xml_array);\r\n }", "function xml2array($contents, $get_attributes=1) {\n if(!$contents) return array();\n\n if(!function_exists('xml_parser_create')) {\n //print \"'xml_parser_create()' function not found!\";\n return array();\n }\n //Get the XML parser of PHP - PHP must have this module for the parser to work\n $parser = xml_parser_create();\n xml_parser_set_option( $parser, XML_OPTION_CASE_FOLDING, 0 );\n xml_parser_set_option( $parser, XML_OPTION_SKIP_WHITE, 1 );\n xml_parse_into_struct( $parser, $contents, $xml_values );\n xml_parser_free( $parser );\n\n if(!$xml_values) return;//Hmm...\n\n //Initializations\n $xml_array = array();\n $parents = array();\n $opened_tags = array();\n $arr = array();\n\n $current = &$xml_array;\n\n //Go through the tags.\n foreach($xml_values as $data) {\n unset($attributes,$value);//Remove existing values, or there will be trouble\n\n //This command will extract these variables into the foreach scope\n // tag(string), type(string), level(int), attributes(array).\n extract($data);//We could use the array by itself, but this cooler.\n\n $result = '';\n if($get_attributes) {//The second argument of the function decides this.\n $result = array();\n if(isset($value)) $result['value'] = $value;\n\n //Set the attributes too.\n if(isset($attributes)) {\n foreach($attributes as $attr => $val) {\n if($get_attributes == 1) $result['attr'][$attr] = $val; //Set all the attributes in a array called 'attr'\n /** :TODO: should we change the key name to '_attr'? Someone may use the tagname 'attr'. Same goes for 'value' too */\n }\n }\n } elseif(isset($value)) {\n $result = $value;\n }\n\n //See tag status and do the needed.\n if($type == \"open\") {//The starting of the tag '<tag>'\n $parent[$level-1] = &$current;\n\n if(!is_array($current) or (!in_array($tag, array_keys($current)))) { //Insert New tag\n $current[$tag] = $result;\n $current = &$current[$tag];\n\n } else { //There was another element with the same tag name\n if(isset($current[$tag][0])) {\n array_push($current[$tag], $result);\n } else {\n $current[$tag] = array($current[$tag],$result);\n }\n $last = count($current[$tag]) - 1;\n $current = &$current[$tag][$last];\n }\n\n } elseif($type == \"complete\") { //Tags that ends in 1 line '<tag />'\n //See if the key is already taken.\n if(!isset($current[$tag])) { //New Key\n $current[$tag] = $result;\n\n } else { //If taken, put all things inside a list(array)\n if((is_array($current[$tag]) and $get_attributes == 0)//If it is already an array...\n or (isset($current[$tag][0]) and is_array($current[$tag][0]) and $get_attributes == 1)) {\n array_push($current[$tag],$result); // ...push the new element into that array.\n } else { //If it is not an array...\n $current[$tag] = array($current[$tag],$result); //...Make it an array using using the existing value and the new value\n }\n }\n\n } elseif($type == 'close') { //End of tag '</tag>'\n $current = &$parent[$level-1];\n }\n }\n\n return($xml_array);\n}", "function xml2array($contents, $get_attributes=1) {\n if(!$contents) return array();\n\n if(!function_exists('xml_parser_create')) {\n //print \"'xml_parser_create()' function not found!\";\n return array();\n }\n //Get the XML parser of PHP - PHP must have this module for the parser to work\n $parser = xml_parser_create();\n xml_parser_set_option( $parser, XML_OPTION_CASE_FOLDING, 0 );\n xml_parser_set_option( $parser, XML_OPTION_SKIP_WHITE, 1 );\n xml_parse_into_struct( $parser, $contents, $xml_values );\n xml_parser_free( $parser );\n\n if(!$xml_values) return;//Hmm...\n\n //Initializations\n $xml_array = array();\n $parents = array();\n $opened_tags = array();\n $arr = array();\n\n $current = &$xml_array;\n\n //Go through the tags.\n foreach($xml_values as $data) {\n unset($attributes,$value);//Remove existing values, or there will be trouble\n\n //This command will extract these variables into the foreach scope\n // tag(string), type(string), level(int), attributes(array).\n extract($data);//We could use the array by itself, but this cooler.\n\n $result = '';\n if($get_attributes) {//The second argument of the function decides this.\n $result = array();\n if(isset($value)) $result['value'] = $value;\n\n //Set the attributes too.\n if(isset($attributes)) {\n foreach($attributes as $attr => $val) {\n if($get_attributes == 1) $result['attr'][$attr] = $val; //Set all the attributes in a array called 'attr'\n /** :TODO: should we change the key name to '_attr'? Someone may use the tagname 'attr'. Same goes for 'value' too */\n }\n }\n } elseif(isset($value)) {\n $result = $value;\n }\n\n //See tag status and do the needed.\n if($type == \"open\") {//The starting of the tag '<tag>'\n $parent[$level-1] = &$current;\n\n if(!is_array($current) or (!in_array($tag, array_keys($current)))) { //Insert New tag\n $current[$tag] = $result;\n $current = &$current[$tag];\n\n } else { //There was another element with the same tag name\n if(isset($current[$tag][0])) {\n array_push($current[$tag], $result);\n } else {\n $current[$tag] = array($current[$tag],$result);\n }\n $last = count($current[$tag]) - 1;\n $current = &$current[$tag][$last];\n }\n\n } elseif($type == \"complete\") { //Tags that ends in 1 line '<tag />'\n //See if the key is already taken.\n if(!isset($current[$tag])) { //New Key\n $current[$tag] = $result;\n\n } else { //If taken, put all things inside a list(array)\n if((is_array($current[$tag]) and $get_attributes == 0)//If it is already an array...\n or (isset($current[$tag][0]) and is_array($current[$tag][0]) and $get_attributes == 1)) {\n array_push($current[$tag],$result); // ...push the new element into that array.\n } else { //If it is not an array...\n $current[$tag] = array($current[$tag],$result); //...Make it an array using using the existing value and the new value\n }\n }\n\n } elseif($type == 'close') { //End of tag '</tag>'\n $current = &$parent[$level-1];\n }\n }\n\n return($xml_array);\n}", "function xml_to_array($xml, $build_type=\"basic\") \n\t{ \n\t\t$values = array(); \n\n\t\t$index = array(); \n\n\t\t$array = array(); \n\n\t\t$parser = xml_parser_create(); \n\n\t\txml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0); \n\n\t\txml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1); \n\n\t\txml_parse_into_struct($parser, $xml, $values, $index); \n\n\t\txml_parser_free($parser); \n\t\t$count = 0; \n\n\t\t$name = $values[$count]['tag']; \n\n\n\t\tif (isset($values[$count]['attributes']))\n\t\t{\n\t\t\t$array[$name] = $values[$count]['attributes'];\n\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$array[$name] = \"\";\t\t\t\n\t\t}\n\t\t$array[$name] = $this->_build_array($values, $count, $build_type); \n\n\t return $array; \n\t}", "function xml2array2($xml){ \n $this->depth=-1; \n $this->xml_parser = xml_parser_create(); \n xml_set_object($this->xml_parser, $this); \n xml_parser_set_option ($this->xml_parser,XML_OPTION_CASE_FOLDING,0);//Don't put tags uppercase \n xml_set_element_handler($this->xml_parser, \"startElement\", \"endElement\"); \n xml_set_character_data_handler($this->xml_parser,\"characterData\"); \n xml_parse($this->xml_parser,$xml,true); \n xml_parser_free($this->xml_parser); \n return $this->arrays[0]; \n \n }", "function xmlToArray($strContent, $getAttributes = 1) {\n if (!$strContent)\n return array();\n\n if (!function_exists('xml_parser_create')) {\n return array();\n }\n\n //Get the XML parser of PHP - PHP must have this module for the parser to work\n $parser = xml_parser_create();\n xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);\n xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);\n xml_parse_into_struct($parser, $strContent, $xmlValues);\n xml_parser_free($parser);\n\n if (!$xmlValues)\n return;\n\n //Initializations\n $xmlArray = array();\n $parents = array();\n // $opened_tags = array();\n $arr = array();\n\n $current = &$xmlArray;\n\n //Go through the tags.\n foreach ($xmlValues as $data) {\n unset($attributes, $value); //Remove existing values, or there will be trouble\n extract($data); //We could use the array by itself, but this cooler.\n\n $result = '';\n if ($getAttributes) {//The second argument of the function decides this.\n $result = array();\n if (true == isset($value))\n $result['value'] = $value;\n\n //Set the attributes too.\n if (true == isset($attributes)) {\n foreach ($attributes as $attr => $val) {\n if (1 == $getAttributes)\n $result['attr'][$attr] = $val; //Set all the attributes in a array called 'attr'\n \n// :TODO: should we change the key name to '_attr'? Someone may use the tagname 'attr'. Same goes for 'value' too\n }\n }\n } elseif (true == isset($value)) {\n $result = $value;\n }\n\n //See tag status and do the needed.\n if ('open' == $type) { //The starting of the tag '<tag>'\n $parent[$level - 1] = &$current;\n\n if (!is_array($current) || (!in_array($tag, array_keys($current)))) { //Insert New tag\n $current[$tag] = $result;\n $current = &$current[$tag];\n } else { //There was another element with the same tag name\n if (true == isset($current[$tag][0])) {\n array_push($current[$tag], $result);\n } else {\n $current[$tag] = array($current[$tag], $result);\n }\n $last = count($current[$tag]) - 1;\n $current = &$current[$tag][$last];\n }\n } elseif ('complete' == $type) { //Tags that ends in 1 line '<tag />'\n //See if the key is already taken.\n if (!isset($current[$tag])) { //New Key\n $current[$tag] = $result;\n } else { //If taken, put all things inside a list(array)\n if (( is_array($current[$tag]) and 0 == $getAttributes )//If it is already an array...\n or ( isset($current[$tag][0]) and is_array($current[$tag][0]) and 1 == $getAttributes )) {\n array_push($current[$tag], $result); // ...push the new element into that array.\n } else { //If it is not an array...\n $current[$tag] = array($current[$tag], $result); //...Make it an array using using the existing value and the new value\n }\n }\n } elseif ('close' == $type) { //End of tag '</tag>'\n $current = &$parent[$level - 1];\n }\n }\n\n return( $xmlArray );\n}", "function xml2array(&$xml, $isnormal = FALSE) {\r\n\t$xml_parser = new XMLparse($isnormal);\r\n\t$data = $xml_parser->parse($xml);\r\n\t$xml_parser->destruct();\r\n\treturn $data;\r\n}", "function xml2array($xml){\r\n\t\t$this->depth=-1;\r\n\t\t$this->xml_parser = xml_parser_create($this->encoding);\r\n\t\txml_set_object($this->xml_parser, $this);\r\n\t\txml_parser_set_option($this->xml_parser, XML_OPTION_CASE_FOLDING, 0);//Don't put tags uppercase\r\n\t\txml_set_element_handler($this->xml_parser, \"startElement\", \"endElement\");\r\n\t\txml_set_character_data_handler($this->xml_parser, \"characterData\");\r\n\t\txml_parse($this->xml_parser, $xml, true);\r\n\t\txml_parser_free($this->xml_parser);\r\n\t\treturn $this->arrays[0]['array'];\r\n\r\n\t}", "function xml2array($text) {\r\n\t $reg_exp = '/<(\\w+)[^>]*>(.*?)<\\/\\\\1>/s';\r\n\t preg_match_all($reg_exp, $text, $match);\r\n\t\t foreach ($match[1] as $key=>$val) {\r\n\t if ( preg_match($reg_exp, $match[2][$key]) ) {\r\n // disabled by duncan - 14th Feb 2010\r\n \t //$array[$val][] = $this->xml2array($match[2][$key]);\r\n\t } else {\r\n \t $array[$val] = $match[2][$key];\r\n\t }\r\n\t }\r\n\t return $array;\r\n\t}", "public function xml_to_array()\n\t{\n\n\t\t// dd($this->_example_file_path);\n\t\t// we will use the Laravel's File class to fetch our JSON file.\n\t\t$file_path = $this->_example_file_path.'example_xml.xml';\n\n\t\tif ( file_exists($file_path))\n\t\t{\n\t\t\t$file = File::get($file_path);\n\n\t\t\tif ( ! empty($file))\n\t\t\t{\n\t\t\t\t$results = Formatter::make($file, 'xml')->to_array();\n\n\t\t\t\tprint_r($results);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo 'Sorry, but the file you requested does not exist.';\n\t\t}\n\t}", "function simplexml2array($xml) {\nif(is_object($xml))\n{\n\tif (get_class($xml) == 'SimpleXMLElement') {\n\t\t$attributes = $xml->attributes();\n\t\tforeach($attributes as $k=>$v) {\n\t\t\tif ($v) $a[$k] = (string) $v;\n\t\t}\n\t\t$x = $xml;\n\t\t$xml = get_object_vars($xml);\n\t}\n}\n\n\n\tif (is_array($xml)) {\n\t\tif (count($xml) == 0) return (string) $x; // for CDATA\n\t\tforeach($xml as $key=>$value) {\n\t\t\t$r[$key] = simplexml2array($value);\n\t\t}\n\t\tif (isset($a)) $r['@'] = $a;// Attributes\n\t\treturn $r;\n\t}\n\treturn (string) $xml;\n}", "function xml_array($xml,$c = NULL) {\n\t\t\t// Error\n\t\t\tif(!$xml) return;\n\t\t\t\n\t\t\t// Config\n\t\t\tif(!x($c[get_attributes])) $c[get_attributes] = 1; // '1' or '0', do you want to include the attributes in the array\n\t\t\tif(!$c['priority']) $c['priority'] = 'tag'; // 'tag' or 'attribute'\n\t\t\tif(!x($c['hard'])) $c['hard'] = 0; // Do you want to return a 'hard' array, numbered keys at every level (not yet supported)\n\t\t\tif(!x($c['debug'])) $c['debug'] = 0; // Debug\n\t\t\t\n\t\t\t// xml_parser_create exists?\n\t\t\tif(!function_exists('xml_parser_create')) {\n\t\t\t\t$payment->debug(\"xml_parser_create() function not found!\",$c['debug']);\n\t\t\t\treturn array();\n\t\t\t}\n\t\t\n\t\t\t// Remove <?xml> declaration\n\t\t\t$xml = preg_replace('/<\\?xml(.*?)>/','',$xml);\n\t\t\n\t\t\t// Wrap // Parser only gets first value if no single parent div\n\t\t\t$xml = \"<____xml____>\".$xml.\"</____xml____>\";\n\t\t\t//debug(\"contents: <xmp>\".$xml.\"</xmp>\",$c['debug']);\n\t\t\n\t\t\t// Get the XML parser of PHP - PHP must have this module for the parser to work\n\t\t\t$parser = xml_parser_create('');\n\t\t\txml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, \"UTF-8\"); \n\t\t\txml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);\n\t\t\txml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);\n\t\t\txml_parse_into_struct($parser, trim($xml), $xml_values);\n\t\t\txml_parser_free($parser);\n\t\t\n\t\t\tif(!$xml_values) {\n\t\t\t\t$payment->debug(\"Wasn't able to find any xml values.\",$c['debug']);\n\t\t\t\treturn; // Hmm...\n\t\t\t}\n\t\t\t//$payment->debug(\"raw values:\",$xml_values,$c['debug']);\n\t\t\n\t\t\t// Initializations\n\t\t\t$xml_array = array();\n\t\t\t$parents = array();\n\t\t\t$opened_tags = array();\n\t\t\t$arr = array();\n\t\t\n\t\t\t$current = &$xml_array; // Refference\n\t\t\n\t\t\t// Go through the tags.\n\t\t\t$repeated_tag_index = array();// Multiple tags with same name will be turned into an array\n\t\t\tforeach($xml_values as $data) {\n\t\t\t\tunset($attributes,$value);// Remove existing values, or there will be trouble\n\t\t\n\t\t\t\t// This command will extract these variables into the foreach scope\n\t\t\t\t// tag(string), type(string), level(int), attributes(array).\n\t\t\t\textract($data);// We could use the array by itself, but this cooler.\n\t\t\n\t\t\t\t$result = array();\n\t\t\t\t$attributes_data = array();\n\t\t\t\t\n\t\t\t\tif(isset($value)) {\n\t\t\t\t\tif($c['priority'] == 'tag') $result = $value;\n\t\t\t\t\telse $result['value'] = $value; // Put the value in a assoc array if we are in the 'Attribute' mode\n\t\t\t\t}\n\t\t\n\t\t\t\t// Set the attributes too.\n\t\t\t\tif(isset($attributes) and $c[get_attributes]) {\n\t\t\t\t\tforeach($attributes as $attr => $val) {\n\t\t\t\t\t\tif($c['priority'] == 'tag') $attributes_data[$attr] = $val;\n\t\t\t\t\t\telse $result['attr'][$attr] = $val; // Set all the attributes in a array called 'attr'\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\n\t\t\t\t// See tag status and do the needed.\n\t\t\t\tif($type == \"open\") {// The starting of the tag '<tag>'\n\t\t\t\t\t$parent[$level-1] = &$current;\n\t\t\t\t\tif((!is_array($current) or !in_array($tag, array_keys($current))) and $c['hard'] == 0) { // Insert New tag\n\t\t\t\t\t\t$current[$tag] = $result;\n\t\t\t\t\t\tif($attributes_data) $current[$tag. '_attr'] = $attributes_data;\n\t\t\t\t\t\t$repeated_tag_index[$tag.'_'.$level] = 1;\n\t\t\n\t\t\t\t\t\t$current = &$current[$tag];\n\t\t\n\t\t\t\t\t} else { // There was another element with the same tag name\n\t\t\n\t\t\t\t\t\tif(isset($current[$tag][0])) {// If there is a 0th element it is already an array\n\t\t\t\t\t\t\t$current[$tag][$repeated_tag_index[$tag.'_'.$level]] = $result;\n\t\t\t\t\t\t\t$repeated_tag_index[$tag.'_'.$level]++;\n\t\t\t\t\t\t} else {// This section will make the value an array if multiple tags with the same name appear together\n\t\t\t\t\t\t\t$current[$tag] = array($current[$tag],$result);// This will combine the existing item and the new item together to make an array\n\t\t\t\t\t\t\t$repeated_tag_index[$tag.'_'.$level] = 2;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(isset($current[$tag.'_attr'])) { // The attribute of the last(0th) tag must be moved as well\n\t\t\t\t\t\t\t\t$current[$tag]['0_attr'] = $current[$tag.'_attr'];\n\t\t\t\t\t\t\t\tunset($current[$tag.'_attr']);\n\t\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$last_item_index = $repeated_tag_index[$tag.'_'.$level]-1;\n\t\t\t\t\t\t$current = &$current[$tag][$last_item_index];\n\t\t\t\t\t}\n\t\n\t\t\n\t\t\t\t} elseif($type == \"complete\") { // Tags that ends in 1 line '<tag />'\n\t\t\t\t\t// See if the key is already taken.\n\t\t\t\t\tif(!x($current[$tag])) { // New Key\n\t\t\t\t\t\t$current[$tag] = $result;\n\t\t\t\t\t\t$repeated_tag_index[$tag.'_'.$level] = 1;\n\t\t\t\t\t\tif($c['priority'] == 'tag' and $attributes_data) $current[$tag. '_attr'] = $attributes_data;\n\t\t\n\t\t\t\t\t} else { // If taken, put all things inside a list(array)\n\t\t\t\t\t\tif(isset($current[$tag][0]) and is_array($current[$tag])) {// If it is already an array...\n\t\t\n\t\t\t\t\t\t\t// ...push the new element into that array.\n\t\t\t\t\t\t\t$current[$tag][$repeated_tag_index[$tag.'_'.$level]] = $result;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif($c['priority'] == 'tag' and $c[get_attributes] and $attributes_data) {\n\t\t\t\t\t\t\t\t$current[$tag][$repeated_tag_index[$tag.'_'.$level] . '_attr'] = $attributes_data;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$repeated_tag_index[$tag.'_'.$level]++;\n\t\t\n\t\t\t\t\t\t} else { // If it is not an array...\n\t\t\t\t\t\t\t$current[$tag] = array($current[$tag],$result); // ...Make it an array using using the existing value and the new value\n\t\t\t\t\t\t\t$repeated_tag_index[$tag.'_'.$level] = 1;\n\t\t\t\t\t\t\tif($c['priority'] == 'tag' and $c[get_attributes]) {\n\t\t\t\t\t\t\t\tif(isset($current[$tag.'_attr'])) { // The attribute of the last(0th) tag must be moved as well\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$current[$tag]['0_attr'] = $current[$tag.'_attr'];\n\t\t\t\t\t\t\t\t\tunset($current[$tag.'_attr']);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif($attributes_data) {\n\t\t\t\t\t\t\t\t\t$current[$tag][$repeated_tag_index[$tag.'_'.$level] . '_attr'] = $attributes_data;\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$repeated_tag_index[$tag.'_'.$level]++; // 0 and 1 index is already taken\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\n\t\t\t\t} elseif($type == 'close') { // End of tag '</tag>'\n\t\t\t\t\t$current = &$parent[$level-1];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Unwrap\n\t\t\t$xml_array = $xml_array[____xml____];\n\t\t\t\n\t\t\t// Return\n\t\t\treturn $xml_array;\n\t\t}", "function xmlToArray($xml)\n{ \n $array_data = json_decode(json_encode(simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA)), true); \n return $array_data;\n}", "function xml2array($fname){\n $sxi = simplexml_load_string($fname, 'SimpleXMLIterator');\n return sxiToArray($sxi);\n }", "function make_array($xml)\r\n{\r\n //convert $xml into an array\r\n $array = array();\r\n \r\n foreach ($xml as $child)\r\n {\r\n $row = array();\r\n foreach ($child as $key => $value)\r\n {\r\n $row[$key] = (string) $value;\r\n }\r\n $array[] = $row;\r\n }\r\n\r\n return $array;\r\n}", "protected function parseXmlToArray()\n {\n $xml = simpleXML_load_file($this->url,\"SimpleXMLElement\",LIBXML_NOCDATA); // parse xml file\n $xml = json_encode($xml); // convert xml to json\n $xmlArray = json_decode($xml, true); // convert json to array\n\n return $xmlArray;\n }", "public static function xmlToArray($xml);", "protected function xml2array($xml, $akey = \"key\")\n {\n $result = (array)$xml;\n\tif (empty($result)) return \"\";\n foreach ($result as $key => $value)\n {\n if ($key === 'comment')\n {\n unset($result[$key]);\n }\n else\n {\n if (is_array($value) or $value instanceof SimpleXMLElement)\n {\n $result[$key] = $this->xml2array($value, $akey);\n if ($result[$key] and ($ikey = $result[$key]['@attributes'][$akey]))\n {\n $result[$ikey] = $result[$key];\n unset($result[$key]);\n }\n }\n }\n }\n return $result;\n }", "function xml2array($input, $callback = null, $recurse = false) {\n $data = ((!$recurse) && is_string($input)) ? simplexml_load_string($input) : $input;\n// Convert SimpleXMLElements to array\n if ($data instanceof SimpleXMLElement || $data instanceof stdClass) {\n $data = (array) $data;\n if (count($data) == 0)\n $data = '';\n }\n\n// Recurse into arrays\n if (is_array($data))\n foreach ($data as &$item)\n $item = xml2array($item, $callback, true);\n// Run callback and return\n return (!is_array($data) && is_callable($callback)) ? call_user_func($callback, $data) : $data;\n}", "function xmlToArray($xml) {\n $array_data = json_decode(json_encode(simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA)), true);\n return $array_data;\n}", "function sumo_xml_toarray($data='', $cache=FALSE)\n{\n\tif($cache)\n\t{\n\t\t$file = SUMO_PATH.\"/tmp/xmlcache_\".md5($data);\n\t\t/*\n\t\t// write cache\n\t\t$fp = @fopen ($file, 'w') OR die (sumo_get_message('E00106X', $file));\n\t \t @fwrite ($fp, sumo_xml_toarray($data, 'FALSE'));\n\t\t\t @fclose ($fp);\n\t\t*/\n\t}\n\telse\n\t{\n\t\t$params = $level = array();\n\t\t$xml_parser = xml_parser_create();\n\n\t\txml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, 0);\n\t\txml_parse_into_struct($xml_parser, $data, $vals, $index);\n\t\txml_parser_free($xml_parser);\n\n\t\tforeach ($vals as $xml_elem)\n\t\t{\n\t\t\tif ($xml_elem['type'] == 'open')\n\t\t\t{\n\t\t\t if (array_key_exists('attributes', $xml_elem))\n\t\t\t \t\tlist($level[$xml_elem['level']], $extra) = array_values($xml_elem['attributes']);\n\t\t\t else\n\t\t\t \t$level[$xml_elem['level']] = $xml_elem['tag'];\n\t\t\t}\n\n\t\t\tif ($xml_elem['type'] == 'complete')\n\t\t\t{\n\t\t\t $start_level = 1;\n\t\t\t $php_stmt = '$params';\n\n\t\t\t while($start_level < $xml_elem['level'])\n\t\t\t {\n\t\t\t \t\t$php_stmt .= '[$level['.$start_level.']]';\n\t\t\t \t$start_level++;\n\t\t\t }\n\n\t\t\t $php_stmt .= '[$xml_elem[\\'tag\\']]=$xml_elem[\\'value\\'];';\n\n\t\t\t @eval($php_stmt);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $params;\n}", "function shopping_xml2array($xml) {\n $arr = array();\n\n foreach ($xml->children() as $r) {\n $t = array();\n if (count($r->children()) == 0) {\n $arr[$r->getName() ] = strval($r);\n }\n else {\n $arr[$r->getName() ][] = xml2array($r);\n }\n }\n return $arr;\n}", "protected function xml2array($originalXML, $attributes=true)\r\n\t{\r\n\t $xmlArray = array();\r\n\t $search = $attributes ? '|<((\\S+)(.*))\\s*>(.*)</\\2>|Ums' : '|<((\\S+)()).*>(.*)</\\2>|Ums';\r\n\t \r\n\t // normalize data\r\n\t $xml = preg_replace('|>\\s*<|', \">\\n<\", $originalXML); // one tag per line\r\n\t $xml = preg_replace('|<\\?.*\\?>|', '', $xml); // remove XML declarations\r\n\t $xml = preg_replace('|<(\\S+?)(.*)/>|U', '<$1$2></$1>', $xml); //Expand singletons\r\n\t \r\n\t if (! preg_match_all($search, $xml, $xmlMatches))\r\n\t return trim($originalXML); // bail out - no XML found\r\n\t \r\n\t foreach ($xmlMatches[1] as $index => $key)\r\n\t {\r\n\t if (! isset($xmlArray[$key])) $xmlArray[$key] = array(); \r\n\t $xmlArray[$key][] = $this->xml2array($xmlMatches[4][$index], $attributes);\r\n\t }\r\n\t return $xmlArray;\r\n\t}", "function createArray()\r\n {\r\n $xml = $this->xml;\r\n\r\n $values = array();\r\n $index = array();\r\n $array = array();\r\n $parser = xml_parser_create();\r\n xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);\r\n xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);\r\n xml_parse_into_struct($parser, $xml, $values, $index);\r\n xml_parser_free($parser);\r\n $i = 0;\r\n $name = $values[$i]['tag'];\r\n $array[$name] = isset($values[$i]['attributes']) ? $values[$i]['attributes'] : '';\r\n $array[$name] = $this->_struct_to_array($values, $i);\r\n return $array;\r\n\r\n }", "public function xmltoArray ($xml){\n\n $reader = new Sabre\\Xml\\Reader();\n $reader->xml($xml);\n return $reader->parse();\n\n }", "private function xml2array($xml) \r\n\t{\r\n\t\t$xmlObj = new XmlToArray($xml);\r\n\t\t//Creating Array\r\n\t\t$arrayData = $xmlObj->createArray();\r\n\t return $arrayData;\r\n\t}", "public static function xmlToArray($xml)\n\t{\n\t\t$returnArray = array();\n\n\t\tif (count($xml) > 0)\n\t\t{\n\t\t\tforeach ($xml as $key=>$value)\n\t\t\t{\n\n\t\t\t\tforeach ($value->attributes() as $attrKey=>$attrValue)\n\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t$returnArray[ strval($key)][\"attributes\"]= array($attrKey => strval($attrValue));\n\t\t\t\t}\n\t\t\t\tif (count($value) == 1)\n\t\t\t\t{\n\t\t\t\t\t$returnArray[$key] = self::xmlToArray($value);\n\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telseif(count($value) > 1)\n\t\t\t\t{\n\t\t\t\t\t$returnArray[] = self::xmlToArray($value);\n\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$returnArray[$key] = strval($value);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $returnArray;\n\t}", "function createArray($xml){\n $values = array();\n $index = array();\n $array = array();\n $parser = xml_parser_create();\n xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);\n xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);\n xml_parse_into_struct($parser, $xml, $values, $index);\n xml_parser_free($parser);\n $i = 0;\n $name = $values[$i]['tag'];\n $array[$name] = isset($values[$i]['attributes']) ? $values[$i]['attributes'] : '';\n $array[$name] = $this->_struct_to_array($values, $i);\n return $array;\n }", "public function toArray($contents){\n\t\tstatic::$contents = explode(\"\\n\", $contents);\n\t\t$this::loop();\n\t\treturn static::$contents;\n\t}", "function xml_to_arr($file)\n\t{\n\t\t$xml=simplexml_load_file($file) or die(\"Error: Cannot create object\");\n\t\t$xml_json = json_encode($xml);\n\t\treturn json_decode($xml_json, true);\n\t}", "private function xmlToarray($xml){\n $xmlIterator = new \\SimpleXmlIterator($xml, null);\n return $this->xmlIteratorToArray($xmlIterator);\n }", "function createArray()\r\n\t{\r\n\t\t$xml = $this->xml;\r\n\t\t$values = array();\r\n\t\t$index = array();\r\n\t\t$array = array();\r\n\t\t$parser = xml_parser_create();\r\n\t\txml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);\r\n\t\txml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);\r\n\t\txml_parse_into_struct($parser, $xml, $values, $index);\r\n\t\txml_parser_free($parser);\r\n\t\t$i = 0;\r\n\t\t$name = $values[$i]['tag'];\r\n\t\t$array[$name] = isset($values[$i]['attributes']) ? $values[$i]['attributes'] : '';\r\n\t\t$array[$name] = $this->_struct_to_array($values, $i);\r\n\t\treturn $array;\r\n\t}", "function Topline_SimpleXML2Array($xmlObject,$out = array())\n{\n\tforeach((array)$xmlObject as $index => $node)\n\t{\n\t\t$out[$index] = ( is_object ( $node ) ) ? xml2array ( $node ) : $node;\n\t}\n\treturn $out;\n}", "function xml2arraySimple($str) {\n\t$xml = loadXML($str);\n\n\t// is it tematres XML\n\t$xml=loadTemaTresServices($xml);\n\n\treturn simplexml2array($xml);\n}", "static function xmlToArray($obj) {\n\t\t$output = self::xmlToArrayHelper($obj);\n\t\tswitch (key($output)){\n\t\t\tcase \"xmldata\": \n\t\t\t\treturn PRE_Util::flat($output);\n\t\t\tcase \"0\":\n\t\t\t\treturn $output;\n\t\t\tdefault:\n\t\t\t\treturn array(PRE_Util::flat($output));\n\t\t}\n\t}", "public function toArrayBelowPriority($priority, bool $inclusive = false): array\n\t{\n\t\t$this->scrubWeakReferences();\n\t\t$items = parent::toArrayBelowPriority($priority, $inclusive);\n\t\t$this->filterItemsForOutput($items);\n\t\treturn $items;\n\t}", "public static function xml2Array( $xml ) {\t\t\n \t$instance = new self( '1.0', 'UTF-8' );\n\t\t$instance->validateOnParse = true;\n\t\tset_error_handler( array(self,'handleXmlError') );\n\t\ttry {\n\t\t\t$instance->loadXML( $xml );\n\t\t} catch( DOMException $e ) {\n\t\t\trestore_error_handler();\n\t\t\treturn false;\n\t\t}\n\t\trestore_error_handler();\n\t\treturn $instance->toArray();\n\t\t\n }", "public static function xml_to_array($xml)\n {\n libxml_use_internal_errors(true);\n\n $xml_document = new DOMDocument();\n $xml_document->loadXML($xml);\n\n return self::dom_node_to_array($xml_document->documentElement);\n }", "function simpleXMLToArray(SimpleXMLElement $xml,$attributesKey=null,$childrenKey=null,$valueKey=null){ \n\n if ($childrenKey && !is_string($childrenKey)) $childrenKey = '@children';\n if ($attributesKey && !is_string($attributesKey)) $attributesKey = '@attributes';\n if ($valueKey && !is_string($valueKey)) $valueKey = '@values';\n \n $return = array(); \n $name = $xml->getName(); \n $_value = trim((string)$xml); \n\n if (!strlen($_value)) $_value = null; \n\n if($_value !== null){ \n if ($valueKey) {\n $return[$valueKey] = $_value;\n } \n else {\n $return = $_value;\n } \n } \n\n $children = array(); \n $first = true; \n foreach($xml->children() as $elementName => $child) { \n\n $value = simpleXMLToArray($child,$attributesKey, $childrenKey,$valueKey); \n \n if(isset($children[$elementName])) { \n if(is_array($children[$elementName])) { \n if($first) { \n $temp = $children[$elementName]; \n unset($children[$elementName]); \n $children[$elementName][] = $temp; \n $first=false; \n } \n $children[$elementName][] = $value; \n }\n else{ \n $children[$elementName] = array($children[$elementName],$value); \n } \n } \n else{ \n $children[$elementName] = $value; \n } \n\n } \n if($children) { \n\n if ($childrenKey) {\n if (is_array($return)) {\n $return = array($return, $childrenKey=>$children);\n }\n else {\n $return[$childrenKey] = $children;\n }\n }\n else {\n $return = array_merge((array)$return,$children);\n } \n\n } \n\n $attributes = array(); \n \n foreach($xml->attributes() as $name=>$value) { \n $attributes[$name] = trim($value); \n } \n\n if($attributes) { \n if ($attributesKey) {\n if (!is_array($return)) {\n $return = array($return, $attributesKey=>$attributes);\n }\n else {\n $return[$attributesKey] = $attributes;\n }\n } \n else {\n $return = array_merge((array)$return, $attributes);\n } \n } \n\n return $return; \n}", "public function xmlToArray(string $xml): ?array;", "public function toArrayAbovePriority($priority, bool $inclusive = true): array\n\t{\n\t\t$this->scrubWeakReferences();\n\t\t$items = parent::toArrayAbovePriority($priority, $inclusive);\n\t\t$this->filterItemsForOutput($items);\n\t\treturn $items;\n\t}", "function toArray($xml) {\n\t\t$xml_parser = xml_parser_create();\n\t\txml_parse_into_struct($xml_parser, $xml, $vals);\n\t\txml_parser_free($xml_parser);\n\t\t// wyznaczamy tablice z powtarzajacymi sie tagami na tym samym poziomie\n\t\t$_tmp = '';\n\t\tforeach ($vals as $xml_elem) {\n\t\t\t$x_tag = $xml_elem['tag'];\n\t\t\t$x_level = $xml_elem['level'];\n\t\t\t$x_type = $xml_elem['type'];\n\t\t\tif ($x_level != 1 && $x_type == 'close') {\n\t\t\t\tif (isset($multi_key[$x_tag][$x_level])) {\n\t\t\t\t\t$multi_key[$x_tag][$x_level] = 1;\n\t\t\t\t} else {\n\t\t\t\t\t$multi_key[$x_tag][$x_level] = 0;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tif ($x_level != 1 && $x_type == 'complete') {\n\t\t\t\tif ($_tmp == $x_tag) {\n\t\t\t\t\t$multi_key[$x_tag][$x_level] = 1;\n\t\t\t\t}\n\n\t\t\t\t$_tmp = $x_tag;\n\t\t\t}\n\t\t}\n\n\t\tforeach ($vals as $xml_elem) {\n\t\t\t$x_tag = $xml_elem['tag'];\n\t\t\t$x_level = $xml_elem['level'];\n\t\t\t$x_type = $xml_elem['type'];\n\t\t\tif ($x_type == 'open') {\n\t\t\t\t$level[$x_level] = $x_tag;\n\t\t\t}\n\n\t\t\t$start_level = 1;\n\t\t\t$php_stmt = '$xml_array';\n\t\t\tif ($x_type == 'close' && $x_level != 1) {\n\t\t\t\t$multi_key[$x_tag][$x_level]++;\n\t\t\t}\n\n\t\t\twhile ($start_level < $x_level) {\n\t\t\t\t$php_stmt .= '[$level[' . $start_level . ']]';\n\t\t\t\tif (isset($multi_key[$level[$start_level]][$start_level]) && $multi_key[$level[$start_level]][$start_level]) {\n\t\t\t\t\t$php_stmt .= '[' . ($multi_key[$level[$start_level]][$start_level] - 1) . ']';\n\t\t\t\t}\n\n\t\t\t\t$start_level++;\n\t\t\t}\n\t\t\t$add = '';\n\t\t\tif (isset($multi_key[$x_tag][$x_level]) && $multi_key[$x_tag][$x_level] && ($x_type == 'open' || $x_type == 'complete')) {\n\t\t\t\tif (!isset($multi_key2[$x_tag][$x_level])) {\n\t\t\t\t\t$multi_key2[$x_tag][$x_level] = 0;\n\t\t\t\t} else {\n\t\t\t\t\t$multi_key2[$x_tag][$x_level]++;\n\t\t\t\t}\n\n\t\t\t\t$add = '[' . $multi_key2[$x_tag][$x_level] . ']';\n\t\t\t}\n\t\t\tif (isset($xml_elem['value']) && trim($xml_elem['value']) != '' && !array_key_exists('attributes', $xml_elem)) {\n\t\t\t\tif ($x_type == 'open') {\n\t\t\t\t\t$php_stmt_main = $php_stmt . '[$x_type]' . $add . '[\\'content\\'] = $xml_elem[\\'value\\'];';\n\t\t\t\t} else {\n\t\t\t\t\t$php_stmt_main = $php_stmt . '[$x_tag]' . $add . ' = $xml_elem[\\'value\\'];';\n\t\t\t\t}\n\n\t\t\t\teval($php_stmt_main);\n\t\t\t}\n\t\t\tif (array_key_exists('attributes', $xml_elem)) {\n\t\t\t\tif (isset($xml_elem['value'])) {\n\t\t\t\t\t$php_stmt_main = $php_stmt . '[$x_tag]' . $add . '[\\'content\\'] = $xml_elem[\\'value\\'];';\n\t\t\t\t\teval($php_stmt_main);\n\t\t\t\t}\n\t\t\t\tforeach ($xml_elem['attributes'] as $key => $value) {\n\t\t\t\t\t$php_stmt_att = $php_stmt . '[$x_tag]' . $add . '[$key] = $value;';\n\t\t\t\t\teval($php_stmt_att);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $xml_array;\n\t}", "public static function xml2array($xml) {\n return (array) simplexml_load_string($xml);\n }", "public function toArray($extend=false) {\n if(!$root = $this->xml) {\n throw new Exception('Cannot parse an Array on NULL',1);\n }\n $output = [\n $root->tagName => $this->DOMDocumentToArray($root,$extend),\n ];\n return $output;\n }", "function xmlObj2array($xml){\n $arr = array();\n foreach ($xml->children() as $r){\n $t = array();\n if(count($r->children()) == 0){\n $arr[$r->getName()] = strval($r);\n }\n else{\n $arr[$r->getName()][] = xml2array($r);\n }\n }\n return $arr;\n }", "private static function convertXMLToArray($xml) {\n\t\t$array = array();\n\t\tforeach ((array) $xml as $key => $value) {\n\t\t\t$array[$key] = is_object($value) ? SimpleConfig::convertXMLToArray($value) : $value;\n\t\t}\n\t\treturn $array;\n\t}", "function element_to_array($element) {\n $array = array(\n 'name' => $element->nodeName,\n 'attributes' => array(),\n 'text' => $element->textContent,\n 'children' =>elements_to_array($element->childNodes)\n );\n if ($element->attributes->length)\n foreach($element->attributes as $key => $attr)\n $array['attributes'][$key] = $attr->value;\n return $array;\n}", "public function wpp_xml_2array($xml) {\n\n\t\t\t$arr = array();\n\n\t foreach ( $xml->children() as $r ) {\n\t $t = array();\n\t if ( count( $r->children() ) == 0 ) {\n\t $arr[ $r->getName() ] = strval( $r );\n\t } else {\n\t $arr[ $r->getName() ][] = $this->wpp_xml_2array( $r );\n\t }\n\t }\n\n\t return $arr;\n\t\t}", "public function xml2array($xml) {\r\n\r\n $arr = array();\r\n foreach ($xml->children() as $r) {\r\n $t = array();\r\n if (count($r->children()) == 0) {\r\n $arr[$r->getName()] = strval($r);\r\n } else {\r\n $arr[$r->getName()][] = $this->xml2array($r);\r\n }\r\n }\r\n return $arr;\r\n }", "public static function xml2array($xml)\n\t\t{\n\t\t\t$document = new self::$class();\n\n\t\t\treturn $document->loadXML($xml) ? self::dom2array($document) : array();\n\t\t}", "function XMLtoArray($obj) {\n\t\t$obj = is_string($obj) ? simplexml_load_string($obj) : $obj;\n\t\t$_arr = is_object($obj) ? get_object_vars($obj) : $obj;\n\t\t\n\t\tif(!empty($_arr)) {\n\t\t\tforeach ($_arr as $key => $val) {\n\t\t\t\t$val = (is_array($val) || is_object($val)) ? $this->XMLtoArray($val) : $val;\n\t\t\t\t$arr[$key] = $val;\n\t\t\t}\n\t\t\n\t\t\treturn $arr;\n\t\t}\n\t}", "public static function XMLtoArr($xml)\n {\n $json = self::XMLtoJSON($xml);\n\n return json_decode($json, true);\n }", "public function toArray($xml)\n \t{ \t\n\t\t$xml = $xml ?: $this->xml;\n\t\t//$array = json_decode(str_replace('{\"0\":\" \"}','null', json_encode(simplexml_load_string($xml),JSON_NUMERIC_CHECK)), true);\n\t\t$array = json_decode(str_replace('{\"0\":\" \"}', 'null', json_encode(simplexml_load_string($xml))), true);\n\t\t$this->filterEmptyArray($array);\n\n\t\treturn $array;\n \t}", "private function xmlToArray($xml)\n {\n return (new Parser())->xml($xml);\n }", "function xml2array($file_name, $index_base=0, $value_key=null) {\n\t//read file content\n\t$content=file_get_contents($file_name);\n\tif (!$content) return array(); \n\t\n\t//init parser and parse\n\t$parser = xml_parser_create(''); \n xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, \"UTF-8\"); \n xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0); \n xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1); \n xml_parse_into_struct($parser, trim($content), $xml_values); \n xml_parser_free($parser); \n\t\n\tif(!$xml_values) return array();//file does not contain valid xml\n\n //initializations \n $parents = array(); //output xml tree traverse\n\t\n\t//iteration......\n foreach($xml_values as $data) { \n\t\t$tag = $data['tag']; //always exists\n\t\t\n\t\tswitch ($data['type']) \t{\n\t\tcase 'open':\n\t\t\t//create new node\n\t\t\t$current = array();\n\t\t\t//insert attributes\n\t\t\tif (isset($data['attributes'])) { //complete or open\n\t\t\t\tforeach($data['attributes'] as $attr => $val) { \n\t\t\t\t\t$current[$attr] = $val; \n\t\t\t\t} \n\t\t\t}\n\t\t\t//push\n\t\t\tarray_push($parents, $current);\n\t\t\tbreak;\n\t\tcase 'close':\n\t\t\t//pop \n\t\t\t$current = array_pop($parents);\n\t\t\t//add to parrent\n\t\t\t$pnode = array_pop($parents);\n\t\t\tif (isset($pnode[$tag])) { //if sibiling appeared before\n\t\t\t\tarray_push($pnode[$tag], $current);\n\t\t\t} else { //create an array as the child of current write head\n\t\t\t\t$pnode[$tag] = array($index_base => $current);\n\t\t\t}\n\t\t\tarray_push($parents, $pnode);\n\t\t\tbreak;\n\t\tcase 'complete':\n\t\t\t//create onode\n\t\t\t$current = array();\n\t\t\t//value\n\t\t\tif (isset($data['value'])) { //complete or cdata\n\t\t\t\t$__value_key = $tag;\n\t\t\t\tif ($value_key!=null) $__value_key = $value_key;\n\t\t\t\t$current[$__value_key] = $data['value'];\n\t\t\t}\n\t\t\t//attributes\n\t\t\tif (isset($data['attributes'])) { //complete or open\n\t\t\t\tforeach($data['attributes'] as $attr => $val) { \n\t\t\t\t\t$current[$attr] = $val; \n\t\t\t\t} \n\t\t\t}\n\t\t\t//add to parent\n\t\t\t$pnode = array_pop($parents);\n\t\t\tif (isset($pnode[$tag])) { //if sibiling appeared before\n\t\t\t\tarray_push($pnode[$tag], $current);\n\t\t\t} else { //create an array as the child of current write head\n\t\t\t\t$pnode[$tag] = array($index_base => $current);\n\t\t\t}\n\t\t\tarray_push($parents, $pnode);\n\t\t\tbreak;\n\t\tcase 'cdata':\n\t\t\t//pop \n\t\t\t$current = array_pop($parents);\n\t\t\t//value\n\t\t\tif (isset($data['value'])) { //complete or cdata\n\t\t\t\t$__value_key = $tag;\n\t\t\t\tif ($value_key!=null) $__value_key = $value_key;\n\t\t\t\t$current[$__value_key] = $data['value'];\n\t\t\t}\n\t\t\t//push for the close tag...\n\t\t\tarray_push($parents, $current);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t\n\t\t}\n\n\t}//foreach $xml_value\n\t\n\t\n\tdebug_print('xml2array');\n\tdebug_print($parents[0]);\n\treturn($parents[0]);\n}", "public function read() : array\n {\n return $this->xml->fetchToArray();\n }", "private function xmlToArray($xml){\n $movies = array();\n foreach ($xml->children() as $movie) {\n $child = $movie->children();\n $id = $child->movie_id->__toString();\n $title = $child->film_title->__toString();\n $time = $child->event_time->__toString();\n $version = $child->version_name->__toString();\n $reservation_link = $child->direct_link->__toString();\n $cinemaId = $child->ig_cinema_id->__toString();\n $release = $child->release_date->__toString();\n $movies[] = (new Movie($id, $title, $time, $version, $reservation_link, $cinemaId, $release))->toArray();\n }\n return $movies;\n }", "protected function asArray()\n {\n $array = [];\n $iterator = new \\SimpleXMLIterator($this->asXML());\n\n // Iterate over the XML nodes and build a formated array.\n for ($iterator->rewind(); $iterator->valid(); $iterator->next()) {\n\n $key = $iterator->key();\n $element = $iterator->current();\n\n // Build an array of the current node data. Some limitations due\n // exist since outputting more than an two-dimensional array is\n // not currently supported. We'll need to build a recursive method\n // to help accomplish this task if we experience any issues!\n if ($iterator->hasChildren()) {\n static $index = 0;\n foreach ($iterator->getChildren() as $name => $childIterator) {\n $array[$key][$index][$name] = trim((string) $childIterator);\n }\n $index++;\n } else {\n $array[$key] = trim((string) $element);\n }\n }\n\n return $array;\n }", "function xml_to_object($xml, $val) {\n\n\n $steps = array();\n $apparatus = array ();\n $data = array();\n\n\n\n $parser = xml_parser_create();\n xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);\n xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);\n xml_parse_into_struct($parser, $xml, $tags);\n xml_parser_free($parser);\n\n //Initializing counter for parsing purposes\n $counter = 0;\n $check = 0;\n\n foreach ($tags as $tag) {\n\n \n if($tag['tag']=='step' || $tag['tag']=='num_steps'){\n array_push($steps,$tag['value']);\n\n }\n else if($tag['tag']=='num_app'){\n\n array_push($apparatus,$tag['value']);\n //$check = $tag['value'];\n //echo $tag['tag'];\n\n }\n\n else if($tag['tag']=='language' || $tag['tag']=='aim' || $tag['tag']=='src'){\n array_push($data,$tag['value']);\n }\n\n if($tag['type'] == \"open\"){\n //echo $tag['tag'];\n if($tag['level']==4){\n array_push($apparatus,$tag['tag']);\n }\n }\n }\n\n //debug_array($steps);\n return array($data, $apparatus, $steps);\n}", "private function xml2array($xmlstr)\n\t{\n\t\t$children = array();\n\t\t$i = 0;\n\t\t\n\t\t$xml = simplexml_load_string($xmlstr);\n\t\tforeach($xml->children() as $child) {\n\t\t\tforeach($child->attributes() as $key=>$val) {\n\t\t\t\t$children[$i][$key] = (string)$val;\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\t\treturn($children);\n\t}", "function sxml2Array(SimpleXMLElement $sxmlo)\n{\n\t$values = ((array) $sxmlo);\n\tforeach ($values as $index => $value) {\n\t\tif (!is_string($value)) {\n\t\t\t$values[$index] = sxml2Array($value);\n\t\t}\n\t\telse {\n\t\t\t$values[$index] = $value;\n\t\t}\n\t}\n\t\n\treturn $values;\n}", "public function toArray(): array\n\t{\n\t\t$this->flattenPriorities();\n\t\t$items = $this->_fd;\n\t\t$this->filterItemsForOutput($items);\n\t\treturn $items;\n\t}", "public static function toArray(string $xml): array\n\t{\n\t\t$data = [];\n\n\t\t$xml = static::stripXMLWhitespace($xml);\n\n\t\t$dom = new DOMDocument();\n\t\t$hasLoaded = @$dom->loadXML($xml);\n\n\t\tif ( ! $hasLoaded)\n\t\t{\n\t\t\tthrow new InvalidArgumentException('Failed to load XML');\n\t\t}\n\n\t\t$root = $dom->documentElement;\n\n\t\t$data[$root->tagName] = [];\n\n\t\tif ($root->hasChildNodes())\n\t\t{\n\t\t\tstatic::childNodesToArray($data[$root->tagName], $root->childNodes);\n\t\t}\n\n\t\treturn $data;\n\t}", "public static function &createArray($input_xml) {\r\n $xml = self::getXMLRoot();\r\n\t\tif(is_string($input_xml)) {\r\n\t\t\t$parsed = $xml->loadXML($input_xml);\r\n\t\t\tif(!$parsed) {\r\n\t\t\t\tthrow new Exception('[XML2Array] Error parsing the XML string.');\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif(get_class($input_xml) != 'DOMDocument') {\r\n\t\t\t\tthrow new Exception('[XML2Array] The input XML object should be of type: DOMDocument.');\r\n\t\t\t}\r\n\t\t\t$xml = self::$xml = $input_xml;\r\n\t\t}\r\n\t\t$array[$xml->documentElement->tagName] = self::convert($xml->documentElement);\r\n self::$xml = null; // clear the xml node in the class for 2nd time use.\r\n return $array;\r\n }", "public static function &createArray($input_xml) {\n $xml = self::getXMLRoot();\n if(is_string($input_xml)) {\n $parsed = $xml->loadXML($input_xml);\n if(!$parsed) {\n throw new \\Exception('[XML2Array] Error parsing the XML string.');\n }\n } else {\n if(get_class($input_xml) != 'DOMDocument') {\n throw new \\Exception('[XML2Array] The input XML object should be of type: DOMDocument.');\n }\n $xml = self::$xml = $input_xml;\n }\n $array[$xml->documentElement->tagName] = self::convert($xml->documentElement);\n self::$xml = null; // clear the xml node in the class for 2nd time use.\n return $array;\n }", "function elements_to_array($elements) {\n $array = array();\n for ($i = 0, $length = $elements->length; $i < $length; ++$i)\n if ($elements->item($i)->nodeType == XML_ELEMENT_NODE)\n array_push($array, element_to_array($elements->item($i)));\n return $array;\n}", "function xmlVocabulary2array($url){\n\t$url= str_replace(' ','%',$url);\n\t$xml=file_get_contents($url) or die (\"Could not open a feed called: \" . $url);\n\treturn xml2arraySimple($xml);\n\t}", "private function xmlObjectToArray($xml) {\n $arXML=array();\n $arXML['name']=trim($xml->getName());\n $arXML['value']=trim((string)$xml);\n $t=array();\n foreach($xml->attributes() as $name => $value){\n $t[$name]=trim($value);\n }\n $arXML['attributes']=$t;\n $t=array();\n foreach($xml->children() as $name => $xmlchild) {\n $t[]=$this->xmlObjectToArray($xmlchild); //FIX : For multivalued node\n }\n $arXML['children']=$t;\n return $arXML;\n }", "public function xmlToArray($inputXml) : array\n {\n $xml = $this->_getXMLRoot();\n\n $error = false;\n\n if (is_string($inputXml)) {\n if (is_file($inputXml) && is_readable($inputXml)) {\n if (!$xml->load($inputXml)) {\n trigger_error('Error parsing the XML file.', E_USER_WARNING);\n $error = true;\n }\n } elseif (!$xml->loadXML($inputXml)) {\n trigger_error('Error parsing the XML string.', E_USER_WARNING);\n $error = true;\n }\n } else {\n if (!is_a($inputXml, 'DOMDocument')) {\n trigger_error('The input XML object should be descendant of DOMDocument', E_USER_WARNING);\n $error = true;\n }\n\n $xml = $this->_xml = $inputXml;\n }\n\n if (!$error) {\n $output = [];\n\n $output[$xml->documentElement->tagName] =\n $this->_convertXmlToArray($xml->documentElement);\n\n return $output;\n } else {\n return null;\n }\n }", "public function xmlStringToArray($xmlstr, $root = false) {\r\n\t \r\n\t if($root) {\r\n\t \r\n\t $simpleXmlElementObject = simplexml_load_string($xmlstr);\r\n\t \r\n\t if ($simpleXmlElementObject == null) {\r\n\t return false;\r\n\t }\r\n\t \r\n\t $simpleXmlRootElementName = $simpleXmlElementObject->getName();\r\n\t \r\n\t //Convert the XML element to a PHP array\r\n\t $array = $this->xmlElementObjectToArray($simpleXmlElementObject);\r\n\t \r\n\t if (($array != null) && (sizeof($array) > 0)) {\r\n\t return $array;\r\n\t }\r\n\t \r\n\t return false; \r\n\t \r\n\t } \r\n\t \r\n\t $doc = new \\DOMDocument();\r\n\t libxml_use_internal_errors(true);\r\n\t \r\n\t if(!$doc->loadXML($xmlstr)){\r\n\t return false;\r\n\t } \r\n\t \r\n\t return $this->domnodeToArray($doc->documentElement);\r\n\t \r\n\t}", "function fileToArray($path) {\n\t\tif (file_exists($path)) {\n\t\t\treturn $this->toArray(file_get_contents($path));\n\t\t} else {\n\t\t\ttrigger_error(\"Unable to open XML file '{$path}', file not found.\");\n\t\t}\n\t\treturn false;\n\t}", "public static function xml2array($file) {\n \n if(file_exists($file)){\n \n $content = file_get_contents($file);\n $xml = simplexml_load_string($content);\n $json = json_encode($xml);\n $array_data = json_decode($json, 1);\n \n return $array_data;\n }\n }", "function xmlToArray($rootTag, $sXml)\r\n\t{\r\n\t\t$aArray = array();\r\n\t\t$sXml = str_replace(\"<$rootTag>\",\"<$rootTag>|~|\",$sXml);\r\n\t\t$sXml = str_replace(\"</$rootTag>\",\"</$rootTag>|~|\",$sXml);\r\n\t\t$sXml = str_replace(\"<e>\",\"<e>|~|\",$sXml);\r\n\t\t$sXml = str_replace(\"</e>\",\"</e>|~|\",$sXml);\r\n\t\t$sXml = str_replace(\"<k>\",\"<k>|~|\",$sXml);\r\n\t\t$sXml = str_replace(\"</k>\",\"|~|</k>|~|\",$sXml);\r\n\t\t$sXml = str_replace(\"<v>\",\"<v>|~|\",$sXml);\r\n\t\t$sXml = str_replace(\"</v>\",\"|~|</v>|~|\",$sXml);\r\n\t\t$sXml = str_replace(\"<q>\",\"<q>|~|\",$sXml);\r\n\t\t$sXml = str_replace(\"</q>\",\"|~|</q>|~|\",$sXml);\r\n\t\t\r\n\t\t$this->aObjArray = explode(\"|~|\",$sXml);\r\n\t\t\r\n\t\t$this->iPos = 0;\r\n\t\t$aArray = $this->parseObjXml($rootTag);\r\n\t\t\r\n\t\treturn $aArray;\r\n\t}", "public function itemsAtPriority($priority = null): ?array\n\t{\n\t\t$this->scrubWeakReferences();\n\t\t$items = parent::itemsAtPriority($priority);\n\t\t$this->filterItemsForOutput($items);\n\t\treturn $items;\n\t}", "public function parseXMLtoArray($xmlString) {\n\t\t$xml = simplexml_load_string($xmlString);\n\t\t$json = json_encode($xml);\n\t\t$array = json_decode($json,TRUE);\n\n\t\treturn $array;\n\t}", "function globallink_taxonomy_get_arr_items($xml) {\r\n if (is_null($xml) || !is_string($xml) || $xml == '') {\r\n return array();\r\n }\r\n\r\n $dom = new DomDocument;\r\n $dom->preserveWhiteSpace = FALSE;\r\n $dom->loadXML($xml);\r\n\r\n $contents = $dom->getElementsByTagName('content');\r\n $bid = '';\r\n\r\n foreach ($contents as $content) {\r\n if (!is_null($content->attributes)) {\r\n foreach ($content->attributes as $attr_name => $attr_node) {\r\n if ($attr_name == 'bid') {\r\n $bid = $attr_node->value;\r\n }\r\n }\r\n }\r\n }\r\n\r\n if ($bid == '') {\r\n return array();\r\n }\r\n\r\n $block_arr = array();\r\n $block_arr['bid'] = $bid;\r\n $blocks = $dom->getElementsByTagName('taxonomy');\r\n\r\n foreach ($blocks as $block) {\r\n if (!is_null($block->attributes)) {\r\n $b_arr = array();\r\n\r\n foreach ($block->attributes as $attr_name => $attr_node) {\r\n $b_arr[$attr_name] = $attr_node->value;\r\n }\r\n\r\n $block_arr[$b_arr['name']] = $block->nodeValue;\r\n }\r\n }\r\n\r\n return $block_arr;\r\n}", "function createArrayfromXML( $xmlDoc )\n {\n $result = array();\n $xml = new eZXML();\n $dom = $xml->domTree( $xmlDoc );\n if ( is_object( $dom ) )\n {\n $node = $dom->get_root();\n $children = $node->children();\n foreach ( $children as $child )\n {\n $contentnode = $child->firstChild();\n if ( $contentnode->type === EZ_XML_NODE_TEXT )\n {\n $result[$child->name()] = $contentnode->textContent();\n }\n else\n {\n $result[$child->name()] = XROWRecurringordersCommonFunctions::createArrayfromDOMNODE( $child );\n }\n }\n }\n return $result;\n }", "protected function xmlToArrays($string, $tag)\n {\n if (!isset($this->open_tag) || !isset($this->close_tag)) {\n $this->setTags($tag);\n }\n\n if ($this->convert_entities) {\n $string = $this->handleEntities($string);\n }\n\n $string = html_entity_decode($string, ENT_QUOTES, 'utf-8');\n\n if (!$this->isElement($string)) {\n return;\n }\n\n if (strpos($string, $this->open_tag) !== false) {\n $this->xml_base_open = true;\n }\n\n if ($this->xml_base_open) {\n $this->xml_string .= trim($string);\n\n if (strpos($string, $this->close_tag) !== false) {\n $array = $this->buildArray($this->xml_string);\n\n $this->xml_string = '';\n\n return $array;\n }\n }\n }", "public static function toArray($xml) {\n if (is_string($xml))\n $xml = new SimpleXMLElement($xml);\n $children = $xml->children();\n if (!$children)\n return (string) $xml;\n $arr = array();\n foreach ($children as $key => $node) {\n $node = self::toArray($node);\n\n // support for 'anon' non-associative arrays\n if ($key == 'anon')\n $key = count($arr);\n\n // if the node is already set, put it into an array\n if (isset($arr[$key])) {\n if (!is_array($arr[$key]) || $arr[$key][0] == null)\n $arr[$key] = array($arr[$key]);\n $arr[$key][] = $node;\n } else {\n $arr[$key] = $node;\n }\n }\n return $arr;\n }", "public function parse(): array\n\t{\n\t\t$xml = $this->getXML();\n\t\t$data = static::toArray($xml);\n\t\treturn $this->setData($data)->getData();\n\t}", "function toArray($useAttr = true)\n {\n $array[$this->name] = array();\n switch ($this->type) {\n case 'directive':\n if ($useAttr && count($this->attributes) > 0) {\n $array[$this->name]['#'] = $this->content;\n $array[$this->name]['@'] = $this->attributes;\n } else {\n $array[$this->name] = $this->content;\n }\n break;\n case 'section':\n if ($useAttr && count($this->attributes) > 0) {\n $array[$this->name]['@'] = $this->attributes;\n }\n if (count($this->children) > 0) {\n for ($i = 0; $i < count($this->children); $i++) {\n $newArr = $this->children[$i]->toArray($useAttr);\n if (!is_null($newArr)) {\n foreach ($newArr as $key => $value) {\n if (isset($array[$this->name][$key])) {\n // duplicate name/type\n if (!is_array($array[$this->name][$key]) ||\n !isset($array[$this->name][$key][0])) {\n $old = $array[$this->name][$key];\n unset($array[$this->name][$key]);\n $array[$this->name][$key][0] = $old;\n }\n $array[$this->name][$key][] = $value;\n } else {\n $array[$this->name][$key] = $value;\n }\n }\n }\n }\n }\n break;\n default:\n return null;\n }\n return $array;\n }", "function element_to_array(DOMElement $element)\n{\n $page = array();\n // Loop the children\n foreach($element->childNodes as $child) {\n if($child instanceof DOMElement) {\n $page[$child->nodeName] = $child->nodeValue;\n }\n }\n // Loop the attributes\n foreach($element->attributes as $attribute) {\n $page[$attribute->name] = $attribute->value;\n }\n return $page;\n}", "public function toArray()\n\t{\n\t\t$array = $this->btree;\n\t\tarray_shift($array);\n $array = array_map(function($i) {\n return array($i->data->priority,\n $i->data->value);}, $array);\n\t\treturn $array;\n\t}", "public function attributesToArray()\n {\n $array = parent::attributesToArray();\n \n if ($this->getFieldManager()) {\n $array = $this->getFieldManager()->transformToFrontName($array);\n }\n \n /*$array = array(\n 'uri' => $this->getResourceData()\n ) + $array;*/\n \n return $array;\n }", "private function _xmlToArray($string )\n {\n try {\n $obj = simplexml_load_string( $string );\n $data = json_decode( json_encode( $obj ), true );\n } catch( Exception $e ) {\n $data = false;\n }\n \n return $data;\n }", "protected function convertXmlToArray($xml)\n {\n if (is_string($xml)) {\n $xml = simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA);\n }\n $result = (array)$xml;\n foreach ($result as $key => $value) {\n if (!is_scalar($value)) {\n $result[$key] = $this->convertXmlToArray($value);\n }\n }\n return $result;\n }", "protected function XMLStringToArray(string $data, array $context = []): array\n {\n $encoder = new XmlEncoder();\n\n return $encoder->decode($data, 'xml', $context);\n }", "function globallink_taxonomy_get_translated_items($xml) {\r\n if (is_null($xml) || !is_string($xml) || $xml == '') {\r\n return array();\r\n }\r\n\r\n $dom = new DomDocument;\r\n $dom->preserveWhiteSpace = FALSE;\r\n $dom->loadXML($xml);\r\n\r\n $contents = $dom->getElementsByTagName('content');\r\n\r\n $bid = '';\r\n\r\n foreach ($contents as $content) {\r\n if (!is_null($content->attributes)) {\r\n foreach ($content->attributes as $attr_name => $attr_node) {\r\n if ($attr_name == 'bid') {\r\n $bid = $attr_node->value;\r\n }\r\n }\r\n }\r\n }\r\n\r\n if ($bid == '') {\r\n return array();\r\n }\r\n\r\n $taxonomy_arr = array();\r\n $taxonomy_arr['bid'] = $bid;\r\n\r\n $taxonomies = $dom->getElementsByTagName('taxonomy');\r\n\r\n foreach ($taxonomies as $taxonomy) {\r\n if (!is_null($taxonomy->attributes)) {\r\n $b_arr = array();\r\n\r\n foreach ($taxonomy->attributes as $attr_name => $attr_node) {\r\n $b_arr[$attr_name] = $attr_node->value;\r\n }\r\n\r\n $b_arr['translation'] = $taxonomy->nodeValue;\r\n $taxonomy_arr[$b_arr['name']] = $b_arr;\r\n }\r\n }\r\n\r\n return $taxonomy_arr;\r\n}", "private function _convertXmlToArray(DOMNode $node)\n {\n $output = [];\n\n switch ($node->nodeType) {\n case XML_CDATA_SECTION_NODE:\n $output['@cdata'] = trim($node->textContent);\n break;\n\n case XML_TEXT_NODE:\n $output = trim($node->textContent);\n break;\n\n case XML_ELEMENT_NODE:\n // for each child node, call the covert function recursively\n for ($i = 0, $m = $node->childNodes->length; $i < $m; $i++) {\n $child = $node->childNodes->item($i);\n $v = $this->_convertXmlToArray($child);\n if (isset($child->tagName)) {\n $t = $child->tagName;\n\n // assume more nodes of same kind are coming\n if (!isset($output[$t])) {\n $output[$t] = [];\n }\n $output[$t][] = $v;\n } else {\n //check if it is not an empty text node\n if ($v !== '') {\n $output = $v;\n }\n }\n }\n\n if (is_array($output)) {\n // if only one node of its kind, assign it directly instead if array($value);\n foreach ($output as $t => $v) {\n if (is_array($v) && count($v) == 1) {\n $output[$t] = $v[0];\n }\n }\n if (empty($output)) {\n //for empty nodes\n $output = '';\n }\n }\n\n // loop through the attributes and collect them\n if ($node->attributes->length) {\n $a = array();\n foreach ($node->attributes as $attrName => $attrNode) {\n $a[$attrName] = (string)$attrNode->value;\n }\n // if its an leaf node, store the value in @value instead of directly storing it.\n if (!is_array($output)) {\n $output = ['@value' => $output];\n }\n $output['@attributes'] = $a;\n }\n break;\n\n default:\n $output = '';\n }\n\n return $output;\n }", "function _namecheap_xmlattr2array($response, $sxml_obj, $attributes, $index = NULL) {\n $data = array();\n\n if (!$sxml_obj) {\n // On some errors the CommandResponse paramater won't be set\n watchdog('registrar_api', 'Invalid CommandResponse passed to _namecheap_xmlattr2array', array(), WATCHDOG_ERROR);\n return $data;\n }\n\n foreach ($sxml_obj as $xrecord) {\n $record = array();\n foreach ($attributes as $attribute) {\n $record[$attribute] = (string) $xrecord[$attribute];\n }\n if (!$index) {\n $data[] = $record;\n }\n else {\n $data[$record[$index]] = $record;\n }\n }\n\n return ($data);\n}", "function extractElements($file, &$array){\n $xml = new DOMDocument();\n $source = parse($file);\n $xml->loadXML($source);\n $children = $xml->documentElement->childNodes;\n for($i0 = 0; $i0 < $children->length; ++$i0){\n $child = $children->item($i0);\n if($child->hasAttributes() || findCData($child) != NULL){\n $name = strtoupper($child->tagName);\n if(array_key_exists($name, $array)){\n if(is_array($array[$name])){\n array_push($array[$name], $child);\n }else{\n $array[$name] = array($array[$name], $child);\n }\n }else{\n $array[$name] = $child;\n }\n }\n }\n return $xml;\n}", "public static function xmlToArray($xml)\r\n\t{\r\n\t\tlibxml_use_internal_errors(true);\r\n\t\t\r\n\t\tif ($xml = simplexml_load_string($xml))\r\n\t\t{\r\n\t\t\treturn json_decode(json_encode((array)$xml), true);\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}", "public function toArray(SimpleXMLElement $xml = null)\n\t{\n\t\tif ($xml === null) {\n\t\t\t$xml = $this->xml;\n\t\t}\n\n\t\tif (!$xml->children()) {\n\t\t\treturn (string) $xml;\n\t\t}\n\n\t\t$arr = array();\n\t\tforeach ($xml->children() as $tag => $child) {\n\t\t\tif (count($xml->$tag) === 1) {\n\t\t\t\t$arr[$tag] = $this->toArray($child);\n\t\t\t} else {\n\t\t\t\t$arr[$tag][] = $this->toArray($child);\n\t\t\t}\n\t\t}\n\n\t\treturn $arr;\n\t}", "public function toArray( $xml, $firstCall=true) {\n\t\tif ( is_string( $xml ) ) $xml = new SimpleXMLElement( $xml );\n\t\t$children = $xml->children();\n\t\tif ( !$children ) {\n\t\t\t$r = (string) $xml;\n\t\t\tif($r=='true' || $r=='false')$r=$r=='true';\n\t\t\treturn $r;\n\t\t}\n\t\t$arr = array();\n\n\t\tif($firstCall){\n\t\t\t//reset the attribute names list\n\t\t\tself::$attribute_names=array();\n\t\t\tself::$root_name = $xml->getName();\n\t\t\tif (self::$parse_namespaces){\n\t\t\t\tforeach($xml->getDocNamespaces(TRUE) as $namepace => $uri) {\n\t\t\t\t\t$arr[$namepace=='' ? 'xmlns' :\n\t\t\t\t\t'xmlns:'.$namepace] = (string)$uri;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(self::$parse_attributes){\n\t\t\tforeach($xml->attributes() as $attName => $attValue) {\n\t\t\t\t$arr[$attName] = (string)$attValue;\n\t\t\t\t//add to attribute list for round trip support\n\t\t\t\tself::$attribute_names[]=$attName;\n\t\t\t}\n\t\t}\n\t\tforeach ($children as $key => $node) {\n\t\t\t$node = $this->toArray($node, false);\n\t\t\t// support for 'anon' non-associative arrays\n\t\t\tif ($key == 'anon') $key = count($arr);\n\n\t\t\t// if the node is already set, put it into an array\n\t\t\tif (isset($arr[$key])) {\n\t\t\t\tif ( !is_array($arr[$key]) || @$arr[$key][0] == null )\n\t\t\t\t$arr[$key] = array($arr[$key]);\n\t\t\t\t$arr[$key][] = $node;\n\t\t\t} else {\n\t\t\t\t$arr[$key] = $node;\n\t\t\t}\n\t\t}\n\t\treturn $arr;\n\t}", "private function FileToArray($contents)\n {\n //Ubha Data Menjadi Array\n $rows = explode(\"\\n\", $contents);\n $i = 0;\n $row_data_ = explode(',', $rows[0]);\n $jumlahdata = count($row_data_);\n\n foreach ($rows as $row => $data) {\n //get row data\n $row_data = explode(',', $data);\n if (isset($row_data[$jumlahdata - 1])) {\n\n } else {\n continue;\n }\n for ($label = 0; $label <= $jumlahdata - 1; $label++) {\n $info['data_' . $label][$i] = $row_data[$label];\n }\n $i++;\n }\n return $info;\n }" ]
[ "0.8443696", "0.7891439", "0.74505895", "0.7273027", "0.7246974", "0.7144865", "0.67033243", "0.67033243", "0.60186243", "0.5971132", "0.592775", "0.5775268", "0.5759006", "0.57438916", "0.5667504", "0.56235236", "0.55755365", "0.5565565", "0.5558983", "0.55047816", "0.54792017", "0.54553634", "0.54507464", "0.54383713", "0.5380084", "0.53599626", "0.5328319", "0.5320864", "0.53149134", "0.5299984", "0.5293052", "0.52807677", "0.52778256", "0.52618074", "0.5252455", "0.5246598", "0.5246566", "0.52323663", "0.5227855", "0.51823604", "0.515506", "0.5154246", "0.51446396", "0.5121663", "0.5099766", "0.50951403", "0.5078253", "0.506659", "0.50631595", "0.5057182", "0.5009594", "0.4994878", "0.49938968", "0.49712765", "0.49625328", "0.49546495", "0.49499136", "0.49289727", "0.49223506", "0.49083728", "0.49062935", "0.49054343", "0.48998705", "0.48911276", "0.48825592", "0.48453638", "0.4825005", "0.48171127", "0.481118", "0.4794505", "0.4789256", "0.47858235", "0.47853756", "0.47845468", "0.4769301", "0.4764839", "0.47640646", "0.47636962", "0.4733529", "0.47279915", "0.47265664", "0.47228324", "0.47211465", "0.47020417", "0.46951416", "0.46949708", "0.46932954", "0.46826503", "0.46745166", "0.46683258", "0.46638876", "0.46593654", "0.46550947", "0.4637249", "0.46357718", "0.46258813", "0.4615585", "0.46076173", "0.46018133", "0.45954815" ]
0.85275936
0
Checks to see if a string is printable or not. Considers tab, carriage return, linefeed as printable.
Проверяет, является ли строка печатаемой или нет. Рассматривает табуляцию, возврат каретки, перевод строки как печатаемые.
public static function isPrintable($string) { // Using regex here for more control. Could have used ctype_print but that // does not consider tab, carriage return, and linefeed as printable. return preg_match('/^[A-Za-zàèìòùÀÈÌÒÙáéíóúýÁÉÍÓÚÝâêîôûÂÊÎÔÛãñõÃÑÕäëïöüÿÄËÏÖÜŸçÇߨøÅ寿œ0-9_~\-!@#\$%\^&\*\(\)\/\\\,=\"\'\.\s\[\]\(\)\{\}\+\-\?\<\>]+$/', $string); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ctype_print($text) {\n if (is_int($text) && $text >= -128 && $text <= 255) {\n if ($text < 0) {\n $text += 256;\n }\n return ($text >= 32 && $text <= 126);\n } elseif (is_string($text) || is_int($text)) {\n return ((int)preg_match('/^[[:print:]]+$/', (string)$text) > 0);\n } else {\n return false;\n }\n }", "public function isPrintableText() {\n $nonPrintableWords = array(\n 'aftncn','aftnsep','aftnsepc','annotation','atnauthor','atndate','atnicn','atnid',\n 'atnparent','atnref','atntime','atrfend','atrfstart','author','background',\n 'bkmkend','bkmkstart','blipuid','buptim','category','colorschememapping',\n 'colortbl','comment','company','creatim','datafield','datastore','defchp','defpap',\n 'do','doccomm','docvar','dptxbxtext','ebcend','ebcstart','factoidname','falt',\n 'fchars','ffdeftext','ffentrymcr','ffexitmcr','ffformat','ffhelptext','ffl',\n 'ffname','ffstattext','field','file','filetbl','fldinst','fldrslt','fldtype',\n 'fname','fontemb','fontfile','fonttbl','footer','footerf','footerl','footerr',\n 'footnote','formfield','ftncn','ftnsep','ftnsepc','g','generator','gridtbl',\n 'header','headerf','headerl','headerr','hl','hlfr','hlinkbase','hlloc','hlsrc',\n 'hsv','htmltag','info','keycode','keywords','latentstyles','lchars','levelnumbers',\n 'leveltext','lfolevel','linkval','list','listlevel','listname','listoverride',\n 'listoverridetable','listpicture','liststylename','listtable','listtext',\n 'lsdlockedexcept','macc','maccPr','mailmerge','maln','malnScr','manager','margPr',\n 'mbar','mbarPr','mbaseJc','mbegChr','mborderBox','mborderBoxPr','mbox','mboxPr',\n 'mchr','mcount','mctrlPr','md','mdeg','mdegHide','mden','mdiff','mdPr','me',\n 'mendChr','meqArr','meqArrPr','mf','mfName','mfPr','mfunc','mfuncPr','mgroupChr',\n 'mgroupChrPr','mgrow','mhideBot','mhideLeft','mhideRight','mhideTop','mhtmltag',\n 'mlim','mlimloc','mlimlow','mlimlowPr','mlimupp','mlimuppPr','mm','mmaddfieldname',\n 'mmath','mmathPict','mmathPr','mmaxdist','mmc','mmcJc','mmconnectstr',\n 'mmconnectstrdata','mmcPr','mmcs','mmdatasource','mmheadersource','mmmailsubject',\n 'mmodso','mmodsofilter','mmodsofldmpdata','mmodsomappedname','mmodsoname',\n 'mmodsorecipdata','mmodsosort','mmodsosrc','mmodsotable','mmodsoudl',\n 'mmodsoudldata','mmodsouniquetag','mmPr','mmquery','mmr','mnary','mnaryPr',\n 'mnoBreak','mnum','mobjDist','moMath','moMathPara','moMathParaPr','mopEmu',\n 'mphant','mphantPr','mplcHide','mpos','mr','mrad','mradPr','mrPr','msepChr',\n 'mshow','mshp','msPre','msPrePr','msSub','msSubPr','msSubSup','msSubSupPr','msSup',\n 'msSupPr','mstrikeBLTR','mstrikeH','mstrikeTLBR','mstrikeV','msub','msubHide',\n 'msup','msupHide','mtransp','mtype','mvertJc','mvfmf','mvfml','mvtof','mvtol',\n 'mzeroAsc','mzeroDesc','mzeroWid','nesttableprops','nextfile','nonesttables',\n 'objalias','objclass','objdata','object','objname','objsect','objtime','oldcprops',\n 'oldpprops','oldsprops','oldtprops','oleclsid','operator','panose','password',\n 'passwordhash','pgp','pgptbl','picprop','pict','pn','pnseclvl','pntext','pntxta',\n 'pntxtb','printim','private','propname','protend','protstart','protusertbl','pxe',\n 'result','revtbl','revtim','rsidtbl','rxe','shp','shpgrp','shpinst',\n 'shppict','shprslt','shptxt','sn','sp','staticval','stylesheet','subject','sv',\n 'svb','tc','template','themedata','title','txe','ud','upr','userprops',\n 'wgrffmtfilter','windowcaption','writereservation','writereservhash','xe','xform',\n 'xmlattrname','xmlattrvalue','xmlclose','xmlname','xmlnstbl',\n 'xmlopen');\n\n $controlWords = array_map(function($obj) {\n return $obj->getName();\n }, $this->controls);\n\n $dest = array_intersect($nonPrintableWords, $controlWords);\n return count($dest) == 0;\n }", "public static function isCharPrintable(string $char): bool\n {\n return 1 <= static::getCharWidth($char);\n }", "public static function filterNonPrintable($string)\n {\n // Note on Error Reporting\n // -----------------------\n // The iconv function causes notice-level error messages in some circumstances.\n //\n // Eg. Notice: iconv(): Detected an incomplete multibyte character in input string in <file>\n //\n // Therefore E_NOTICE level errors are temporarily disabled.\n $oldErrorLevel = error_reporting();\n error_reporting($oldErrorLevel & ~E_NOTICE);\n\n $string = iconv('UTF-8', 'ASCII//IGNORE', $string);\n $string = str_replace(\"\\n\", '_{_NEWLINE_}_', $string);\n $string = preg_replace( '/[^[:print:]]/', '', $string);\n $string = str_replace('_{_NEWLINE_}_', \"\\n\", $string);\n $string = trim($string);\n\n // Reset error reporting level to old value.\n error_reporting($oldErrorLevel);\n\n return $string;\n }", "public function isPrinted()\n\t{\n\t\treturn ( $this->printed == 0 );\n\t}", "abstract public function should_print();", "function quoted_printable_decode($in)\n{\n\treturn '';\n}", "protected static function is_ascii($string)\n {\n }", "function quoted_printable_decode($in)\n{\n return '';\n}", "protected function filter_print( $style )\r\n {\r\n return true === $style['print'];\r\n }", "function check_char(){\n\t\tif(ereg('[^[[:print:]]]',$this->inhalt)){\n\t\t\t$this->fehlerfarbe();\n\t\t\t$this->fehlerzaehler();\n\t\t}\n\t}", "public static function remove_invisible_characters($str) {\n static $non_displayables;\n if (!isset($non_displayables)) {\n // every control character except newline (dec 10), carriage return (dec 13), and horizontal tab (dec 09),\n $non_displayables = array('/%0[0-8bcef]/',\n // url encoded 00-08, 11, 12, 14, 15\n '/%1[0-9a-f]/',\n // url encoded 16-31\n '/[\\x00-\\x08]/',\n // 00-08\n '/\\x0b/', '/\\x0c/',\n // 11, 12\n '/[\\x0e-\\x1f]/'\n // 14-31\n );\n }\n do {\n $cleaned = $str;\n $str = preg_replace($non_displayables, '', $str);\n } while ($cleaned != $str);\n return $str;\n }", "function is_ascii($string)\n{\n\treturn!preg_match('/[^\\x00-\\x7F]/S',$string);\n}", "protected function check_ascii($string)\n {\n }", "public function canPrint()\n {\n return Mage::getSingleton('customer/session')->isLoggedIn() && $this->isOrderVisible();\n }", "private function isValidText($string)\r\n {\r\n $search = array(\" \", \" \", \"\\n\", \"\\r\", \"\\t\");\r\n $replace = array(\"\", \"\", \"\", \"\", \"\");\r\n return str_replace($search, $replace, $string) !== '';\r\n }", "function quoted_printable_encode($string) {\n return preg_replace('/[^\\r\\n]{73}[^=\\r\\n]{2}/', \"$0=\\r\\n\", str_replace(\"%\",\"=\",str_replace(\"%20\",\" \",rawurlencode($string))));\n }", "function quoted_printable_encode($string) {\n return preg_replace('/[^\\r\\n]{73}[^=\\r\\n]{2}/', \"$0=\\n\", str_replace(array('%20', '%0D%0A', '%'), array(' ', \"\\r\\n\", '='), rawurlencode($string)));\n }", "public static function is_ascii($str, $control_chars = true)\n {\n $regexp = $control_chars ? '/[^\\x00-\\x7F]/' : '/[^\\x20-\\x7E]/';\n return preg_match($regexp, $str) ? false : true;\n }", "protected function isStringSafe($string) {\n $string = preg_replace('/\\[[a-z0-9_-]+(:[a-z0-9_-]+)+\\]/i', '', $string);\n return Html::decodeEntities($string) == Html::decodeEntities(Xss::filter($string, ['a', 'abbr', 'acronym', 'address', 'b', 'bdo', 'big', 'blockquote', 'br', 'caption', 'cite', 'code', 'col', 'colcategory', 'dd', 'del', 'dfn', 'dl', 'dt', 'em', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'i', 'ins', 'kbd', 'li', 'ol', 'p', 'pre', 'q', 'samp', 'small', 'span', 'strong', 'sub', 'sup', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'tr', 'tt', 'ul', 'var']));\n }", "public static function is_ascii($str)\n {\n if (is_array($str)) {\n $str = implode($str);\n }\n\n return !preg_match('/[^\\x00-\\x7F]/S', $str);\n }", "function IsSafe($string)\n {\n if (preg_match('/[^a-zA-Z0-9_]/', $string) == 0) {\n return true;\n } else {\n return false;\n }\n }", "function IsSafe($string)\n {\n if (preg_match('/[^a-zA-Z0-9_]/', $string) == 0) {\n return true;\n } else {\n return false;\n }\n }", "function isASCII( string $text ) : bool {\n\treturn missing( 'mb_check_encoding' ) ? \n\t\t( bool ) !\\preg_match( '/[^\\x20-\\x7e]/' , $text ) : \n\t\t\\mb_check_encoding( $text, 'ASCII' );\n}", "public static function isASCII( string $text ) : bool {\n\t\treturn \n\t\tstatic::missing( 'mb_check_encoding' ) ? \n\t\t\t( bool ) !\\preg_match( '/[^\\x20-\\x7e]/' , $text ) : \n\t\t\t\\mb_check_encoding( $text, 'ASCII' );\n\t}", "public function canPrintLabel();", "protected function _printText(string $text)\n {\n print $text;\n }", "protected static function isShellSafe($string)\n {\n }", "function quoted_printable_encode ( $string ) {\n $string = preg_replace_callback (\n '/[^\\x21-\\x3C\\x3E-\\x7E\\x09\\x20]/',\n 'quoted_printable_encode_character',\n $string\n );\n $newline = \"=\\r\\n\"; // '=' + CRLF (rule #4)\n // make sure the splitting of lines does not interfere with escaped characters\n // (chunk_split fails here)\n $string = preg_replace ( '/(.{73}[^=]{0,3})/', '$1'.$newline, $string);\n return $string;\n}", "static function isAscii($str) {\n\t\treturn (preg_match ( '/[^\\x00-\\x7F]/S', $str ) == 0);\n\t}", "public function isSafe($string)\n {\n return preg_replace('/[^a-z0-9]/i', '', $string) == $string;\n }", "function ctype_space($text) {\n if (is_int($text) && $text >= -128 && $text <= 255) {\n if ($text < 0) {\n $text += 256;\n }\n return $text==32 || ($text >=9 && $text <=13);\n } else {\n return ((int)preg_match('/^[\\s\\v]+$/', (string)$text) > 0);\n }\n }", "public static function checkPlain($string) {\n return htmlspecialchars(trim($string), ENT_QUOTES, 'UTF-8');\n }", "protected static function escapeNonPrintable(string $value): string\n {\n return (string) preg_replace_callback('/([\\x00-\\x1F\\x7F])/', function ($matches) {\n return '\\\\' . bin2hex($matches[1]);\n }, $value);\n }", "public static function isPcreUtf8Enabled() {\r\n\t\treturn preg_match('/a/u', 'a') !== false;\r\n\t}", "function utf8_isASCII($str)\n {\n return (preg_match('/(?:[^\\x00-\\x7F])/', $str) !== 1);\n }", "function isBinary($str) {\n\t\treturn preg_match('~[^\\x20-\\x7E\\t\\r\\n]~', $str) > 0;\n\t}", "function check_space($string) {\r\n $space = FALSE;\r\n $asciiArray = string_to_ascii($string);\r\n foreach ($asciiArray as $ascii) {\r\n if ($ascii == 32) {\r\n $space = TRUE;\r\n }\r\n }\r\n return $space;\r\n}", "function remove_invisible_characters($str, $url_encoded = TRUE)\n\t{\n\t\t$non_displayables = array();\n\n\t\t// every control character except newline (dec 10),\n\t\t// carriage return (dec 13) and horizontal tab (dec 09)\n\t\tif ($url_encoded)\n\t\t{\n\t\t\t$non_displayables[] = '/%0[0-8bcef]/';\t// url encoded 00-08, 11, 12, 14, 15\n\t\t\t$non_displayables[] = '/%1[0-9a-f]/';\t// url encoded 16-31\n\t\t}\n\n\t\t$non_displayables[] = '/[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F]+/S';\t// 00-08, 11, 12, 14-31, 127\n\n\t\tdo\n\t\t{\n\t\t\t$str = preg_replace($non_displayables, '', $str, -1, $count);\n\t\t}\n\t\twhile ($count);\n\n\t\treturn $str;\n\t}", "public function isPrintableScalar() : bool\n {\n return Config::get_null_casts_as_any_type();\n }", "function is_binary($str)\n {\n return preg_match('~[^\\x20-\\x7E\\t\\r\\n]~', $str) > 0;\n }", "static public function canEncode ( $string )\n {\n return preg_match('/[^\\x20-\\x7E]/', $string) ? FALSE : TRUE;\n }", "public function getPrinted()\n {\n return true;\n }", "function my_quoted_printable_encode($str, $level = 1, $splitlines = true)\r\n{\r\n\t// strip CR\r\n\t$str = preg_replace(\"~[\\r]*~\", \"\", $str);\r\n\r\n\t// encode characters according to selected level\r\n\tswitch ($level)\r\n\t{\r\n\t\tcase 3:\r\n\t\t\t$str = preg_replace(\"~([\\x01-\\x08\\x0B-\\x0C\\x0E-\\x1F\\x21-\\x2F\\x3A-\\x40\\x5B-\\x60\\x7B-\\xFF])~e\", \"sprintf('=%02X', ord('\\\\1'))\", $str);\r\n\t\t\t$str = preg_replace(\"~[\\x20]~\", \"_\", $str);\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\t$str = preg_replace(\"~([\\x01-\\x08\\x0B-\\x0C\\x0E-\\x1F\\x21-\\x24\\x3C-\\x40\\x5B-\\x60\\x7B-\\xFF])~e\", \"sprintf('=%02X', ord('\\\\1'))\", $str);\r\n\t\t\t$str = preg_replace(\"~[\\x20]~\", \"_\", $str);\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\t$str = preg_replace(\"~([\\x01-\\x08\\x0B-\\x0C\\x0E-\\x1F\\x3D\\x7F-\\xFF])~e\", \"sprintf('=%02X', ord('\\\\1'))\", $str);\r\n\t}\r\n\r\n\t// encode blanks and tabs at the end of lines\r\n\t$str = preg_replace(\"~([\\x09\\x20])\\n~e\", \"sprintf('=%02X\\n', ord('\\\\1'))\", $str);\r\n\r\n\t$parts = explode(\"\\n\", $str);\r\n\r\n\tif ($splitlines)\r\n\t{\r\n\t\t// split string\r\n\t\t$lines = count($parts);\r\n\t\tfor ($i = 0; $i < $lines; $i++)\r\n\t\t{\r\n\t\t\t// if longer than 76, add a line break\r\n\t\t\tif (strlen($parts[$i]) > 76)\r\n\t\t\t\t$parts[$i] = preg_replace(\"~((.){73,76}((=[0-9A-Fa-f]{2})|([^=]{0,3})))~\", \"\\\\1=\\n\", $parts[$i]);\r\n\t\t}\r\n\t}\r\n\r\n\treturn (implode(\"\\r\\n\", $parts));\r\n}", "function check($string){\n $string = htmlspecialchars($string);\n $string = strip_tags($string);\n $string = trim($string);\n $string = stripslashes($string);\n return $string;\n }", "function quoted_printable_decode2($str, $spaceconv = true)\r\n{\r\n\tif ($spaceconv) $str = str_replace(\"_\", \" \", $str);\r\n\t$str = quoted_printable_decode($str);\r\n\treturn $str;\r\n}", "function detectASCII($str)\n{\n return (preg_match(\"/^[\\\\x00-\\\\x7F]*$/\", $str) === 1);\n}", "private function skipNonprintableData()\n {\n $this->process->readFrom();\n }", "public function getCanPrint()\n {\n if (! isset($this->canPrint)) {\n $this->canPrint = null;\n\n $decodedResults = $this->getDecodedResults();\n\n if (array_key_exists('sizes', $decodedResults) && ((boolean)$sizes = $decodedResults['sizes']) && (is_array($sizes))) {\n $this->canPrint = ( array_key_exists('canprint', $sizes) && (is_string($sizes['canprint']) || is_int($sizes['canprint'])) )\n ? $sizes['canprint']\n : null;\n }\n }\n return $this->canPrint;\n }", "public function printPage() {\n\t\t$data = $this->fetchPage();\n\t\tif ($data === false) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\tprint $data;\n\t\t\treturn true;\n\t\t}\n\t}", "private function checkCharASCIIFormat($data, $field, $id)\n\t{\n\t\tglobal $herr;\n\n\t\t$regex = '/^[\\t\\n\\r\\x20-\\x7E]*$/';\n\t\t$result = preg_match($regex, $data);\n\t\tif ($result != 1)\n\t\t{\n\t\t\t$herr->errorPutMessage($this->etype,\n\t\t\t\t'Invalid characters detected.<br>Only ASCII characters with' .\n\t\t\t\t'<br>SPACE, CR, LF, and TAB are allowed.',\n\t\t\t\t$this->estate, $field, $id);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "function check ($string)\n{\n\tglobal $isSubmission;\n\treturn ($isSubmission && strlen($string) == 0) ? 'true' : 'false';\n}", "function ctype_cntrl($text) {\n if (is_int($text) && $text >= -128 && $text <= 255) {\n if ($text < 0) {\n $text += 256;\n }\n return (($text >= 0 && $text < 32) || $text == 127);\n } elseif (is_int($text) || is_string($text)) {\n return ((int)preg_match('/^[[:cntrl:]]+$/', (string)$text) > 0);\n } else {\n return false;\n }\n }", "private function is_stringy($text) {\n\t\treturn (is_string($text) || (is_object($text) && method_exists($text, '__toString' )));\n\t}", "public static function isAscii($value)\n {\n }", "public static function sanitize($string){\n return htmlspecialchars($string); // make this ASCII only characters\n }", "function ctype_alnum($text) {\n if (is_int($text) && $text >= -128 && $text <= 255) {\n if ($text < 0) {\n $text += 256;\n }\n return ((int)preg_match('/^[[:alnum:]]+$/', chr($text)) > 0);\n } elseif (is_int($text) || is_string($text)) {\n return ((int)preg_match('/^[[:alnum:]]+$/', (string)$text) > 0);\n } else {\n return false;\n }\n }", "function is_html($string)\n\t{\n\t\treturn strlen(strip_tags($string)) < strlen($string);\n\t}", "public function forPrinting( $bool=true ){\n\t\t\t$this->printable = $bool;\n\t\t}", "public static function sanitise(string $string): string\n {\n // Only allow Tab (9), LF (10), CR (13), Space (32) - 55295, 57344 - 65533, 65536 - 1114111.\n return preg_replace('/[^\\x{0009}\\x{000A}\\x{000D}\\x{0020}-\\x{D7FF}\\x{E000}-\\x{FFFD}\\x{10000}-\\x{10FFFF}]/u', ' ', $string);\n }", "protected function stringLooksLikeHtml(string $string)\n {\n return substr(trim($string), 0, 1) === '<';\n }", "protected function hasStdoutSupport()\n {\n return ('OS400' != php_uname('s'));\n }", "protected function containsUnicode($string)\n {\n return max(array_map('ord', str_split($string))) > 127;\n }", "public function iPrint($message = false, $print = true, $autoWidth = false)\r\n\t{\r\n\t\tif ($message)\r\n\t\t{\r\n\t\t\t$errors = '';\r\n\t\t\tif (is_array($message))\r\n\t\t\t{\r\n\t\t\t\t//handle array\r\n\t\t\t\tforeach($message as $val)\r\n\t\t\t\t{\r\n\t\t\t\t\t$errors .= $val . '<br>';\r\n\t\t\t\t}\t\r\n\t\t\t\t$message = $errors;\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$errors = '<div class=\"container_3 red\" align=\"left\" '.($autoWidth ? 'style=\"width: auto;\"' : '').'><span class=\"error_icons atention\"></span><p>'.$message.'</p></div>';\t\t\t\r\n\t\t\t\r\n\t\t\tif ($print)\r\n\t\t\t{\r\n\t\t\t\techo $errors;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn $errors;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public static function isUsingMbString();", "public static function escAscii($string) {\n\t\t$string = preg_replace('/[\\x00-\\x08\\x0B-\\x1F]/', '', $string);\n\t\treturn filter_var($string, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH|FILTER_FLAG_STRIP_BACKTICK);\n\t}", "public static function isHtml(string $string): bool\n\t{\n\t\treturn ($string !== strip_tags($string));\n\t}", "public static function ascii($string) {\n $foreign = static::$ascii;\n $string = preg_replace(array_keys($foreign), array_values($foreign), $string);\n return preg_replace('/[^\\x09\\x0A\\x0D\\x20-\\x7E]/', '', $string);\n }", "function qprint($string){\n\t\tif (!QUIET){\n\t\t\tprint $string.PHP_EOL;\n\t\t}\t\n\t}", "function pf($str, $webonly=false)\n{\n\tif (php_sapi_name() == 'cli') {\n\t\tif ($webonly) return;\n\t\techo strip_tags($str) .\"\\n\";\n\t} else {\n\t\tif (!preg_match('#<br />#i', $str)) $str .= '<br />';\n\t\techo $str;\n\t\t@ob_flush(); flush();\n\t}\n}", "private function is_white_space($string) {\n $whitespace = array(' ', \"\\t\", \"\\n\", \"\\r\", \"f\", \"\\v\");\n $unboxedstring = $string;\n if (is_object($string)) {\n $unboxedstring = $string->string();\n }\n return in_array($unboxedstring[0], $whitespace);\n }", "protected function check($str)\n {\n $temp = $str;\n $temp = trim($temp);\n $temp = htmlspecialchars($temp);\n $temp = strip_tags($temp);\n if ($temp == $str)\n return true;\n else\n return false;\n }", "static function isValidValue($value)\n {\n $value = (string) $value;\n\n // Look for:\n // \\n not preceded by \\r, OR\n // \\r not followed by \\n, OR\n // \\r\\n not followed by space or horizontal tab; these are all CRLF attacks\n if (preg_match(\"#(?:(?:(?<!\\r)\\n)|(?:\\r(?!\\n))|(?:\\r\\n(?![ \\t])))#\", $value))\n // TODO with parsed headers \\r\\n not available here\n VOID;//return false;\n\n $length = strlen($value);\n for ($i = 0; $i < $length; $i += 1) {\n $ascii = ord($value[$i]);\n\n // Non-visible, non-whitespace characters\n // 9 === horizontal tab\n // 10 === line feed\n // 13 === carriage return\n // 32-126, 128-254 === visible\n // 127 === DEL\n // 255 === null byte\n if (($ascii < 32 && ! in_array($ascii, [9, 10, 13], true))\n || $ascii === 127\n || $ascii > 254\n ) {\n return false;\n }\n }\n\n return true;\n }", "public function onProcess(IPrintable $printable);", "function check_utf8( $in ) {\n $str = \"$in\"; // grr...\n $len = strlen( $str );\n $i = 0;\n while( $i < $len ) {\n $c = ord( $str[ $i ] );\n if( $c < 128 ) {\n // disallow most control characters:\n if( $c < 32 ) {\n switch( $c ) {\n case 9: // tab\n case 10: // lf \n case 13: // cr\n break;\n default:\n return false;\n }\n }\n } else {\n if( $c > 247 ) return false;\n elseif( $c > 239 ) $bytes = 4;\n elseif( $c > 223 ) $bytes = 3;\n elseif( $c > 191 ) $bytes = 2;\n else return false;\n if( $i + $bytes > $len ) return false;\n while( $bytes > 1 ) {\n $i++;\n $c = ord( $str[ $i ] );\n if( ( $c < 128 ) || ( $c > 191 ) ) return false;\n $bytes--;\n }\n }\n $i++;\n }\n return true;\n}", "function replace_non_display_chars( $text ) {\n\t// replace non-display characters\n\t// EXCEPT NEW LINES! \\x0A\n\t$text = preg_replace( '/[\\x00-\\x09\\x0B\\x1F\\x7F]/u', '', $text );\n\treturn $text;\n}", "function has_header_injection($str)\r\n\t\t{\r\n\t\t\t# code...\r\n\t\t\treturn preg_match(\"/[\\r\\n]/\", $str);\r\n\t\t}", "function has_header_injection($str) {\r\n\t\t\treturn preg_match( \"/[\\r\\n]/\", $str );\r\n\t\t}", "function empty_content($str) {\n\t return trim(str_replace('&nbsp;','',strip_tags($str))) == '';\n\t}", "function print_badline($line_binary, $line_index, $line_count, $input_type, $input_file)\n{\n // don't fuck up the terminal with 'special characters' (binary)\n $line_ascii = preg_replace('/[^(\\x20-\\x7E)]*/', '', $line_binary);\n printf(\"\\r\");\n for ($char = 0; $char <= 45 + strlen($input_file) + strlen($line_count); $char++)\n printf(\" \");\n printf(\"\\r[#] Line '%d' crippled or not of type '%s':\\n '%s'\\n\", $line_index, $input_type, $line_ascii);\n}", "public static function printAll(Printable $printable)\n {\n return $printable->toString(self::$_db->getAll());\n }", "private static function iso7816Strip(&$text)\n\t{\n\t\t$c = chr(0x80);\n\t\t$text = preg_replace('/'.preg_quote($c).'\\0*$/', '', $text);\n\t\treturn true;\n\t}", "function ocp_is_escaped($var)\n{\n\treturn true;\n}", "public function is_valid_cpt_name($string='') {\n\t return (strlen($string)>0 && strlen($string)<=20) && !preg_match('/[A-Z\\ ]/', $string);\n\t }", "function ctype_graph($text) {\n if (is_int($text) && $text >= -128 && $text <= 255) {\n if ($text < 0) {\n $text += 256;\n }\n return ($text >= 33 && $text <= 126);\n } elseif (is_string($text) || is_int($text)) {\n return ((int)preg_match('/^[[:alnum:][:punct:]]+$/', (string)$text) > 0);\n } else {\n return false;\n }\n }", "function makeOutputSafe($unsafeString)\n{\n\t$safeOutput = htmlspecialchars($unsafeString, ENT_QUOTES,\"UTF-8\");\n\treturn $safeOutput;\n}", "public function hasStr(){\n return $this->_has(16);\n }", "function format_for_printing($string, $access_credentials, $issuer_profilename, $completer_profilename, $profiles) {\n\t//if(!is_string($string)) {\n\t//\tprint('$string: ');var_dump($string);\n\t//\tfatal_error('!is_string($string) in format_for_printing');\n\t//}\n\t//$string = xml_dec($string);\n\t$string = htmlize_newline_characters($string);\n//\t$string = process_private_content($string, $access_credentials, $issuer_profilename, $completer_profilename, $profiles); // takes a LONG time!\n\treturn $string;\n}", "public function canBeString()\n {\n if ($this->isNull() || $this->isScalar() || $this->hasMethod('__toString')) {\n return true;\n }\n\n return false;\n }", "function check_for_symbols($string, $space_check = 0){\n $len=strlen($string);\n $allowed_chars=\"abcdefghijklmnopqrstuvwxyz���ABCDEFGHIJKLMNOPQRSTUVWXYZ���0123456789\";\n if(!$space_check) {\n $allowed_chars .= \" \";\n }\n for($i=0;$i<$len;$i++)\n if(strstr($allowed_chars,$string[$i]) == FALSE)\n return TRUE;\n return FALSE;\n}", "function sanitize( $styles ) {\n return sanitize_text_field( preg_replace( '/[^[:print:]]|[\\{\\}].*/', '', $styles ) );\n }", "public function phpPrint($string) {\n print($string);\n }", "public static function isAscii(string $value): bool\n {\n if (function_exists('mb_detect_encoding')) {\n return mb_detect_encoding($value, 'ASCII', true) !== false;\n }\n\n return preg_match('/[^\\x00-\\x7F]/S', $value) === 0;\n }", "function check($string)\n{\n\t$postfilter = \"#(\\s)|(/\\*.*\\*/)|file|insert|<|and|floor|ord|char|ascii|mid|left|right|hex|sleep|benchmark|substr|@|`|delete|like#i\";\n\tif(preg_match($postfilter, $string,$matches))\n\t{\n\t\techo \"<script>alert('invalid string!')</script>\";\n\t\tdie();\n\t}\n\telse\n\t\treturn $string;\n}", "public static function recii($string) {\n // no displayables\n $noyables = array('/\\x0b/','/\\x0c/','/%1[0-9a-f]/','/[\\x00-\\x08]/','/[\\x0e-\\x1f]/','/%0[0-8bcef]/');\n \n do {\n $clean = $string;\n $string = preg_replace($noyables, \"\", $string);\n } while ($clean != $string);\n\n return $string;\n }", "protected function assertHtmlEscaped($string) {\n $this->assertRaw(Html::escape($string));\n $this->assertNoRaw(Html::escape(Html::escape($string)));\n $this->assertNoRaw($string);\n }", "function _s_has_special_chars( $string ) {\n\treturn preg_match('/[^a-zA-Z\\d]/', $string);\n}", "private function checkCharASCII($data, $field, $id)\n\t{\n\t\tglobal $herr;\n\n\t\t$regex = '/^[\\x20-\\x7E]*$/';\n\t\t$result = preg_match($regex, $data);\n\t\tif ($result != 1)\n\t\t{\n\t\t\t$herr->errorPutMessage($this->etype,\n\t\t\t\t'Invalid characters detected.<br>Only ASCII characters allowed.',\n\t\t\t\t$this->estate, $field, $id);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "private function protect_display($texte)\r\n\t{\r\n\t\t$texte = str_replace('\\\\','\\\\\\\\',$texte);\r\n\t\t$texte = str_replace('\"','\\\\\"',$texte);\r\n\t\t$texte = str_replace(chr(13),\"<br />\",$texte);\r\n\t\t$texte = str_replace(chr(10),\"\",$texte);\r\n\t\treturn $texte;\r\n\t}", "private static function containsEscapeCharacters($string)\n {\n $escapeCodePattern = '#' . static::ANSI_ESCAPE_CODE_REGEX . '#';\n $result = preg_match($escapeCodePattern, $string);\n\n return (boolean) $result;\n }" ]
[ "0.69814116", "0.6955593", "0.6413914", "0.60123885", "0.5747919", "0.5738153", "0.5716062", "0.56726944", "0.5672233", "0.56553257", "0.5576441", "0.5557064", "0.54960775", "0.5432639", "0.5398123", "0.531894", "0.530706", "0.52895325", "0.5283399", "0.5278065", "0.5277495", "0.5264509", "0.5264509", "0.5235144", "0.5229497", "0.52048856", "0.5204658", "0.5167663", "0.51094955", "0.5101835", "0.50759715", "0.5056131", "0.50495756", "0.50352216", "0.5026865", "0.5020258", "0.5013163", "0.5008516", "0.4992046", "0.49842983", "0.49719664", "0.4960441", "0.49445203", "0.49270585", "0.49258777", "0.48519886", "0.48260322", "0.48230714", "0.48228934", "0.48194942", "0.4787079", "0.47351027", "0.4731096", "0.4707249", "0.4705063", "0.46998373", "0.46986496", "0.46946922", "0.4690529", "0.46772793", "0.46728334", "0.4664154", "0.4659604", "0.46508053", "0.46486366", "0.46441793", "0.4642177", "0.46392646", "0.46324292", "0.463194", "0.4631361", "0.4621542", "0.46133843", "0.46122345", "0.45784822", "0.45782834", "0.45743942", "0.45695177", "0.45594943", "0.45562372", "0.45476866", "0.45474452", "0.45465595", "0.45359084", "0.4528358", "0.45259592", "0.45176893", "0.4517588", "0.45156333", "0.4513285", "0.45126963", "0.45069483", "0.45068043", "0.45063022", "0.45057386", "0.44969568", "0.4488145", "0.44826758", "0.44805837", "0.44761586" ]
0.83686966
0
Get field factory class
Получить класс фабрики полей
public function getFactory() { return new FieldFactory($this->customFields); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static function fieldsFactory(): FieldsFactory\n {\n return self::$factory;\n }", "public function getFieldTypeFactory();", "public function getFactory();", "public function getFactory() {}", "private function getFieldClass(string $type)\n {\n $file = basePath('src/Alxarafe/Core/Database/Fields/' . ucfirst($type) . 'Field.php');\n $class = 'Alxarafe\\\\Core\\\\Database\\\\Fields\\\\' . ucfirst($type) . 'Field';\n if (!file_exists($file)) {\n $params = ['%type%' => $type];\n trigger_error($this->trans->trans('class-does-not-exists', $params));\n $class = 'Alxarafe\\\\Core\\\\Database\\\\Fields\\\\StringField';\n }\n return new $class();\n }", "protected function getClassField() {}", "public function formFields(): FormFieldsFactoryInterface\n {\n return $this->formFieldsFactory;\n }", "function &Factory($element, $moduleID)\n{\n return new RecordMetaField($element, $moduleID);\n}", "public function factory()\n {\n return $this->factory;\n }", "public function factory()\n {\n return $this->factory;\n }", "function &Factory($element, $moduleID)\n{\n return new RemoteField($element, $moduleID);\n}", "public function getFactory()\n {\n return $this->factory; \n }", "public function getFactory()\n {\n return $this->factory; \n }", "protected static function factory() {\n\t\tstatic $factory = null;\n\n\t\tif ( ! $factory ) {\n\t\t\t$factory = new Factory();\n\t\t}\n\n\t\treturn $factory;\n\t}", "public function getFactory()\n {\n return $this->factory;\n }", "public function getFactory()\n {\n return $this->factory;\n }", "public function getFactory()\n {\n return $this->factory;\n }", "public function getFactory()\n {\n return $this->factory;\n }", "public function getFactory()\n {\n return $this->factory;\n }", "public function getFactory()\n {\n return $this->factory;\n }", "public function getFactory()\n {\n return $this->factory;\n }", "public function getFactory()\n {\n return $this->factory;\n }", "public function getFactory()\n {\n return $this->factory;\n }", "public function getFactory()\n {\n return $this->factory;\n }", "public function getFactory()\n {\n return $this->factory;\n }", "public function getFactory()\n\t{\n\t\treturn $this->factory;\n\t}", "public function getFactory()\n\t{\n\t\treturn $this->factory;\n\t}", "abstract public function getFactory();", "public function form()\n {\n return Factory::create('field');\n }", "public function classcreatefieldprovider() {\n return array(array('idnumber', 101, null));\n }", "public function get_create_field_instance() {\n\n\t\t// Populate the values (i.e. properties) of this field\n\t\t$this->id = str_replace(array('[',']',' '), '_', $this->name);\n\n $upload_dir = wp_upload_dir();\n $file = $upload_dir['basedir'] .'/'.CCTM::base_storage_dir.'/fields/'.$this->id.'/oncreate.php';\n\n\t\tif (file_exists($file)) {\n\t\t\t$this->value = include $file;\n\t\t}\n\t\telse {\n\t\t\t$this->value = $this->default_value;\n\t\t}\n\n\t\t$fieldtpl = CCTM::load_tpl(\n\t\t\tarray('fields/elements/'.$this->name.'.tpl'\n\t\t\t\t, 'fields/elements/_hidden.tpl'\n\t\t\t\t, 'fields/elements/_default.tpl'\n\t\t\t)\n\t\t);\n // Add this flag so we can distinguish between create and edit events\n\t\treturn CCTM::parse($fieldtpl, $this->get_props()) \n\t\t\t. '<input type=\"hidden\" name=\"_cctm_is_create\" value=\"1\" />';\n\t}", "public function field() {\n static $field;\n if(is_null($field)) {\n get_template_part('functions/hooks/field');\n $field = new jazzweb_field();\n }\n return $field;\n }", "protected function getField(): BundleFieldContract\n {\n if (is_null($this->field)) {\n $type = $this->requireParameter('_field');\n $field = \\Field::getRegisteredBundleField($type);\n $this->field = new $field;\n }\n return $this->field;\n }", "protected function getField(): BundleFieldContract\n {\n if (is_null($this->field)) {\n $type = $this->requireParameter('_field');\n $field = \\Field::getRegisteredBundleField($type);\n $this->field = new $field;\n }\n return $this->field;\n }", "function &Factory($element, $moduleID)\n{\n return new TableField($element, $moduleID);\n}", "public static function factory($mimeType, ...$args): AssetField\n {\n $class = self::guesser($mimeType);\n if ($class === null) {\n return null;\n }\n $class = __NAMESPACE__ . '\\\\' . $class;\n return new $class(... $args);\n }", "public static function loadFieldClass($type)\r\n\t{\r\n\t\treturn self::loadClass('field', $type);\r\n\t}", "public static function factory($type, $name, $options = array())\n\t{\n\t\t$className = 'Atomik_Model_Field_' . ucfirst($type);\n\t\tif (!class_exists($className)) {\n\t\t\t$className = $type;\n\t\t\tif (!class_exists($className)) {\n\t\t\t\trequire_once 'Atomik/Model/Field.php';\n\t\t\t\treturn new Atomik_Model_Field($name, $type, $options);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn new $className($name, $options);\n\t}", "protected function factory()\n\t{\n\t\tif ($this->factory === NULL)\n\t\t{\n\t\t\t$this->factory = new Factory($this->config('factory'));\n\t\t}\n\n\t\treturn $this->factory;\n\t}", "abstract protected function getFactory();", "public function getDefinitionOfField();", "function new_field($name) {\n\n return new Acf\\Fields\\Field($name);\n\n}", "abstract public function main_field_class();", "protected function getValidationFactory()\n {\n return Container::getInstance()->make(Factory::class);\n }", "protected function getClassInfoFactory() {}", "private function createClass()\n {\n return new ReflectionClass($this->class);\n }", "public function getFormFactory()\n {\n return $this->factory;\n }", "function &_instantiate_handler($field_type)\n\t{\n\t\t$class\t\t= $this->field_types[$field_type];\n\t\t$_ft_path\t= $this->ft_paths[$field_type];\n\n\t\tee()->load->add_package_path($_ft_path);\n\n\t\t$obj = new $class();\n\n\t\tee()->load->remove_package_path();\n\n\t\treturn $obj;\n\t}", "public function getField(): FieldInterface;", "public function getInputFactory() {\n if (!$this->oInputFactory) {\n $this->oInputFactory = new InputFactory();\n }\n return $this->oInputFactory;\n }", "public static function get_instance() {\n\t\tstatic $inst;\n\t\tif ( ! $inst ) {\n\t\t\t$inst = new Modula_Field_Builder();\n\t\t}\n\t\treturn $inst;\n\t}", "public function getFactory(): CustomLightUserDataApiFactory\n {\n return $this->factory;\n }", "public function getEntityFactory()\n {\n return $this->factory;\n }", "public function getBaseFactory()\n\t{\n\t\treturn $this->fnode ;\n\t}", "public static function autoFactory(string $key): self {\n $field = static::findByKey($key);\n if (!$field) {\n $field = static::factory($key);\n $field->save();\n }\n return $field;\n }", "public function GetFieldDefinition($fieldName)\n {\n $cacheName = $fieldName.'_'.$this->id;\n static $internalCache = array();\n if (array_key_exists($cacheName, $internalCache)) {\n $fieldDefinition = $internalCache[$cacheName];\n } else {\n $query = \"SELECT * FROM `cms_field_conf`\n WHERE `name`='\".MySqlLegacySupport::getInstance()->real_escape_string($fieldName).\"'\n AND `cms_tbl_conf_id` = '\".MySqlLegacySupport::getInstance()->real_escape_string($this->id).\"'\";\n $fieldDefinition = null;\n if ($row = MySqlLegacySupport::getInstance()->fetch_assoc(MySqlLegacySupport::getInstance()->query($query))) {\n $fieldDefinition = TdbCmsFieldConf::GetNewInstance();\n // fallback to base class - needed during DB autoClass generation\n if (is_null($fieldDefinition)) {\n $fieldDefinition = new TCMSFieldDefinition();\n }\n $fieldDefinition->SetLanguage($this->iLanguageId);\n $fieldDefinition->LoadFromRow($row);\n }\n $internalCache[$cacheName] = $fieldDefinition;\n }\n\n return $fieldDefinition;\n }", "function create_field($field) {}", "private static function instantiate(array $declaration)\n {\n $fieldType = array_shift($declaration);\n\n $class = \"\\\\Zerg\\\\Field\\\\\" . ucfirst(strtolower($fieldType));\n if (class_exists($class)) {\n $reflection = new \\ReflectionClass($class);\n return $reflection->newInstanceArgs($declaration);\n }\n\n throw new ConfigurationException(\"Field {$fieldType} doesn't exist\");\n }", "public function getFactory()\n {\n if ($this->factory == NULL)\n {\n $this->factory = Factory::factory();\n $this->factory->registerType('resource', 'ResourceController');\n $this->factory->registerType('service', 'ServiceController');\n $this->factory->registerType('users', 'UserController');\n $this->factory->registerType('apps', 'ClientAppController');\n }\n return $this->factory;\n }", "public function modelFactory()\n {\n return $this->modelFactory;\n }", "function factory($factory, string $className = null) : FactoryDefinitionHelper\n {\n return new FactoryDefinitionHelper($factory, $className);\n }", "public function getFormFactory()\n {\n if ($this->formFactory) {\n return $this->formFactory;\n }\n\n $this->formFactory = new Factory();\n return $this->formFactory;\n }", "public static function create($fieldID) {\n\t\t$db = new DB();\n\t\t$statement = $db->prepare(SQL_FIELD_FETCH);\n\t\t$statement->bind_param(\"i\", $fieldID);\n\t\t$statement->execute();\n\t\t$statement->bind_result($fieldID, $fieldLabel, $fieldType, $fieldRequired);\n\t\t$statement->fetch();\n\t\t$db->close();\n\t\treturn new Field($fieldID, $fieldLabel, $fieldType, $fieldRequired);\n\t}", "function register_field_type($class)\n {\n }", "public function getFactory(): FactoryInterface;", "protected function createFactory() {\n\t\treturn new Factory($this);\n\t}", "public static function newFactory()\n {\n return EntryModelFactory::new();\n }", "public static function factory( $raw_type, $name, $label = null ) {\n\t\t$type = Helper::normalize_type( $raw_type );\n\n\t\t// stop hidden symbol support when the end user is creating fields ][\n\t\t// @see Field::set_name()\n\t\tif ( ! Helper::is_valid_entity_id( $name ) ) {\n\t\t\tIncorrect_Syntax_Exception::raise( 'Field names can only contain lowercase alphanumeric characters, dashes and underscores (\"' . $name . '\" passed).' );\n\t\t\treturn null;\n\t\t}\n\n\t\tif ( Carbon_Fields::has( $type, 'fields' ) ) {\n\t\t\treturn Carbon_Fields::resolve_with_arguments( $type, array(\n\t\t\t\t'type' => $type,\n\t\t\t\t'name' => $name,\n\t\t\t\t'label' => $label,\n\t\t\t), 'fields' );\n\t\t}\n\n\t\t// Fallback to class name-based resolution\n\t\t$class = Helper::type_to_class( $type, __NAMESPACE__, '_Field' );\n\t\tif ( ! class_exists( $class ) ) {\n\t\t\tIncorrect_Syntax_Exception::raise( 'Unknown field type \"' . $raw_type . '\".' );\n\t\t\t$class = __NAMESPACE__ . '\\\\Broken_Field';\n\t\t}\n\n\t\t$field = new $class( $type, $name, $label );\n\t\treturn $field;\n\t}", "function getClass($def) {\n\t$class = $def['class'];\n\t\n\tif ($class == '') {\n\t\t// see if required is conditional\n\t\tif (($def['required'] !== true) && ($def['required'] !== false) && ($def['required'] != '')) {\n\t\t\teval('$required = '.$def['required'].';');\n\t\t}\n\t\t\n\t\t$class .= 'field';\n\t}\n\t\n\treturn $class;\n}", "public static function factory(string $key): self {\n $field = new static();\n $field->setFieldKey($key);\n\n return $field;\n }", "public function getFieldDefinition();", "private function getCookieMetadataFactory()\n {\n if (!isset($this->cookieMetadataFactory)) {\n $this->cookieMetadataFactory = \\Magento\\Framework\\App\\ObjectManager::getInstance()->get(\n \\Magento\\Framework\\Stdlib\\Cookie\\CookieMetadataFactory::class\n );\n }\n return $this->cookieMetadataFactory;\n }", "private function getCookieMetadataFactory()\n {\n if (!$this->cookieMetadataFactory) {\n $this->cookieMetadataFactory = \\Magento\\Framework\\App\\ObjectManager::getInstance()->get(\n \\Magento\\Framework\\Stdlib\\Cookie\\CookieMetadataFactory::class\n );\n }\n return $this->cookieMetadataFactory;\n }", "public function factory()\n {\n return $this->manager->getPayloadFactory();\n }", "static public function make_field($type, $args) {\n return self::field($type, $args);\n }", "public function createField()\n {\n return new \\Ip\\Form\\Field\\File([\n 'label' => $this->label,\n 'name' => $this->field,\n 'required' => $this->required\n ]);\n }", "public function getPayloadFactory(): Factory\n {\n return $this->payload_factory;\n }", "public function getFormFactory() \n\t{\n\t\treturn $this->formFactory;\n\t}", "public static function newFactory()\n {\n return PickupPersonFactory::new();\n }", "public function getFieldDefinition(): FieldDefinitionInterface {\n return $this->fieldDefinition;\n }", "public static function create() { return new get_called_class(); }", "protected function getApiPlatform_JsonSchema_TypeFactoryService()\n {\n $this->privates['api_platform.json_schema.type_factory'] = $instance = new \\ApiPlatform\\Core\\JsonSchema\\TypeFactory(($this->privates['api_platform.resource_class_resolver'] ?? $this->getApiPlatform_ResourceClassResolverService()));\n\n $instance->setSchemaFactory(($this->privates['api_platform.hydra.json_schema.schema_factory'] ?? $this->getApiPlatform_Hydra_JsonSchema_SchemaFactoryService()));\n\n return $instance;\n }", "public function getFormFactory()\n {\n return $this->formFactory;\n }", "protected function createFieldInstance($tag)\n\t{\n\t\t$field = $this->DvsField->newInstance();\n\n\t\t$field->collection_instance_id = null;\n\t\t$field->page_version_id = $this->pageVersionId;\n\t\t$field->type = $tag['type'];\n\t\t$field->human_name = $tag['humanName'];\n\t\t$field->key = $tag['key'];\n\t\t$field->json_value = $tag['defaults'] ?: '{}';\n\t\t$field->content_requested = false;\n\t\t$field->save();\n\n\t\treturn $field;\n\t}", "public function fields(): FieldsService\n {\n return resolve(FieldsService::class);\n }", "private function getCookieMetadataFactory()\n {\n if (!$this->CookieMetadataFactory) {\n $this->CookieMetadataFactory = \\Magento\\Framework\\App\\ObjectManager::getInstance()->get(\n \\Magento\\Framework\\Stdlib\\Cookie\\CookieMetadataFactory::class\n );\n }\n return $this->CookieMetadataFactory;\n }", "public function getFieldInstanceByName($name)\n\t{\n\t\t$moduleName = $this->getModule()->getName(true);\n\t\t$fields = $this->getModule()->getFormFields();\n\t\t$params = [\n\t\t\t'label' => $fields[$name]['label'],\n\t\t\t'fieldvalue' => $this->get($name) ?? $fields[$name]['default'] ?? '',\n\t\t\t'typeofdata' => $fields[$name]['required'] ? 'V~M' : 'V~O',\n\t\t\t'maximumlength' => $fields[$name]['maximumlength'] ?? ''\n\t\t];\n\t\tswitch ($name) {\n\t\t\tcase 'url':\n\t\t\t\t$params['uitype'] = 17;\n\t\t\t\tbreak;\n\t\t\tcase 'status':\n\t\t\t\t$params['uitype'] = 56;\n\t\t\t\t$params['typeofdata'] = 'C~O';\n\t\t\t\tbreak;\n\t\t\tcase 'secret':\n\t\t\t\t$params['uitype'] = 99;\n\t\t\t\tbreak;\n\t\t}\n\t\treturn \\Vtiger_Field_Model::init($moduleName, $params, $name);\n\t}", "public function getField();", "public function getField();", "public function getField();", "public function getField();", "public function getField();", "protected static function newFactory(): \\Parents\\Factories\\Factory\n {\n $reflect = new \\ReflectionClass(new static());\n $resourceKey = Pluralizer::plural($reflect->getShortName());\n $namespace = '\\Domains\\\\' . $resourceKey . '\\Factories\\\\' . $reflect->getShortName() . 'Factory';\n return call_user_func(array($namespace, 'new'));\n }", "protected static function newFactory()\n {\n return \\Kusikusi\\Database\\Factories\\EntityFactory::new();\n }", "static function getDotbField($field, $returnNullIfBase=false) {\n static $dotbFieldObjects = array();\n static $fixupField = array();\n\n if (!isset($fixupField[$field])) {\n $fixupField[$field] = static::fixupFieldType($field);\n }\n $field = $fixupField[$field];\n\n if(!isset($dotbFieldObjects[$field])) {\n \t//check custom directory\n \t$file = DotbAutoLoader::existingCustomOne(\"include/DotbFields/Fields/{$field}/DotbField{$field}.php\");\n\n \tif($file) {\n $type = $field;\n \t} else {\n // No direct class, check the directories to see if they are defined\n \t\tif( $returnNullIfBase &&\n \t\t !DotbAutoLoader::existing('include/DotbFields/Fields/'.$field)) {\n return null;\n }\n \t\t$file = 'include/DotbFields/Fields/Base/DotbFieldBase.php';\n $type = 'Base';\n \t}\n\t\t\trequire_once($file);\n\n\t\t\t$class = DotbAutoLoader::customClass('DotbField' . $type);\n\t\t\t//could be a custom class check it\n \t\t$dotbFieldObjects[$field] = new $class($field);\n }\n return $dotbFieldObjects[$field];\n }", "public function getFieldManager()\n {\n /* Verifica se existe Field Manager com prefixo igual a controller */\n if (! $this->fieldManager) {\n $pathClassExploded = explode('\\\\', get_class($this));\n $namespace = array_first($pathClassExploded);\n $resourceName = array_last($pathClassExploded);\n \n /* Verifica se existe o Field Manager para o recurso */\n if (! class_exists(\"{$namespace}\\\\FieldManagers\\\\{$resourceName}FieldManager\")) {\n return null;\n echo \"Crie o Field Manager {$resourceName}FieldManager em {$namespace}\\\\FieldManagers\";\n exit();\n }\n \n $this->fieldManager = $namespace . \"\\\\FieldManagers\\\\{$resourceName}FieldManager\";\n }\n \n /* Ainda precisa instanciar o objeto */\n if (is_string($this->fieldManager)) {\n return new $this->fieldManager();\n }\n \n /* Objeto já instanciado, só retornar */\n return $this->fieldManager;\n }", "function fieldClass($f)\n\t{\n\t\tif( $this->pSet->getEditFormat($f) == FORMAT_LOOKUP_WIZARD )\n\t\t\treturn '';\n\t\t\t\n\t\t$format = $this->pSet->getViewFormat($f);\n\t\t\n\t\tif( $format == FORMAT_FILE ) \n\t\t\treturn ' rnr-field-file';\n\t\tif( $format == FORMAT_AUDIO )\n\t\t\treturn ' rnr-field-audio';\n\t\tif( $format == FORMAT_CHECKBOX )\n\t\t\treturn ' rnr-field-checkbox';\n\t\tif( $format == FORMAT_NUMBER || IsNumberType( $this->pSet->getFieldType($f) ) )\n\t\t\treturn ' rnr-field-number';\n\t\t\t\n\t\treturn \"rnr-field-text\";\n\t}", "public function getField($name) {\n if (!$this->class->hasField($name)) return NULL;\n \n with ($field= $this->class->getField($name)); {\n $f= new xp·compiler·types·Field();\n $f->name= $field->getName();\n $f->modifiers= $field->getModifiers();\n $f->type= $this->typeNameOf($field->getType());\n $f->holder= $this;\n return $f;\n }\n }", "protected function getForm_FactoryService()\n {\n include_once \\dirname(__DIR__, 4).'/vendor/symfony/form/FormFactoryInterface.php';\n include_once \\dirname(__DIR__, 4).'/vendor/symfony/form/FormFactory.php';\n\n return $this->services['form.factory'] = new \\Symfony\\Component\\Form\\FormFactory(($this->privates['form.registry'] ?? $this->getForm_RegistryService()));\n }", "public function getFactoryName();" ]
[ "0.7830868", "0.77586925", "0.66211706", "0.65676165", "0.6555431", "0.6554349", "0.6482763", "0.64640665", "0.64315045", "0.64315045", "0.6340983", "0.6287916", "0.6287916", "0.62837666", "0.62787265", "0.62787265", "0.62787265", "0.62787265", "0.62787265", "0.62787265", "0.62787265", "0.62787265", "0.62787265", "0.62787265", "0.62787265", "0.62321866", "0.62321866", "0.6229934", "0.62128496", "0.61975807", "0.6195367", "0.6191065", "0.61821586", "0.61821586", "0.6178171", "0.61514235", "0.61486197", "0.6132325", "0.61256474", "0.60989255", "0.6090013", "0.6001214", "0.5997173", "0.59636605", "0.5951499", "0.59490216", "0.5921854", "0.58981943", "0.58908767", "0.5887532", "0.5873308", "0.5868342", "0.58617043", "0.58568776", "0.58534026", "0.58525014", "0.5842452", "0.58404636", "0.5840027", "0.58373773", "0.5785389", "0.57847327", "0.57783115", "0.57676744", "0.57518864", "0.5741935", "0.57414716", "0.57341146", "0.57339257", "0.572394", "0.56791884", "0.56719", "0.5667667", "0.56647736", "0.56641966", "0.5659283", "0.56552625", "0.5652798", "0.5652372", "0.56516874", "0.564575", "0.5643397", "0.56428385", "0.5635886", "0.56340784", "0.56262016", "0.56248194", "0.562276", "0.562276", "0.562276", "0.562276", "0.562276", "0.5621402", "0.5611013", "0.5603703", "0.56006974", "0.5593573", "0.55918765", "0.55866766", "0.55834067" ]
0.8099263
0
Saves a shukkairai_dt edited
Сохраняет отредактированный shukkairai_dt
public function saveAction() { if (!$this->request->isPost()) { $this->dispatcher->forward(array( 'controller' => "shukkairai_dts", 'action' => 'index' )); return; } $id = $this->request->getPost("id"); $shukkairai_dt = ShukkairaiDts::findFirstByid($id); if (!$shukkairai_dt) { $this->flash->error("出荷依頼データが見つからなくなりました。" . $id); $this->dispatcher->forward(array( 'controller' => "shukkairai_dts", 'action' => 'index' )); return; } if ($shukkairai_dt->updated !== $this->request->getPost("updated")) { $this->flash->error("他のプロセスから出荷依頼データが変更されたため更新を中止しました。" . $id . ",uid=" . $shukkairai_dt->kousin_user_id . " tb=" . $shukkairai_dt->updated ." pt=" . $this->request->getPost("updated")); $this->dispatcher->forward(array( 'controller' => "shukkairai_dts", 'action' => 'edit', 'params' => array($id) )); return; } $post_flds = []; $post_flds = ["cd", "tekiyou", "iraibi", "irai_kbn_cd", "juchuu_dt_id", "hacchuu_dt_id", "souko_mr_cd", "gotantou", "hassousaki_kbn_cd", "hassousaki_mr_cd", "hassousaki", "kidukesaki_mr_cd", "kiduke", "shukkabi", "nouki_memo", "tantou_mr_cd", "assistant", "shounin_joutai_flg", "shounin_sha_mr_cd", "updated", ]; $meisai_flds = [ "id", "cd", "utiwake_kbn_cd", "shukka_kbn_cd", "shouhin_mr_cd", "tanni_mr_cd", "irisuu", "keisu", "tekiyou", "lot", "kobetucd", "hinsitu_kbn_cd", "souko_mr_cd", "kikaku", "iro", "iromei", "size", "suuryou", "suuryou1", "tanni_mr1_cd", "suuryou2", "tanni_mr2_cd", "tanka_kbn", "gentanka", "genkagaku", "nouki", "bikou", ]; $meisai_nums = [ "irisuu", "suuryou1", "suuryou2", "gentanka", "genkagaku", ]; if ($shukkairai_dt->updated !== $this->request->getPost("updated")) { $this->flash->error("他のプロセスから出荷依頼伝票が変更されたため更新を中止しました。" . $id . ",uid=" . $shukkairai_dt->kousin_user_id . " tb=" . $shukkairai_dt->updated ." pt=" . $this->request->getPost("updated")); $this->dispatcher->forward(array( 'controller' => "shukkairai_dts", 'action' => 'index' )); return; } $meisai = $this->request->getPost("data"); $i = 0; foreach ($meisai["shukkairai_meisai_dts"] as $shukkairai_meisai_dt) { if ((int)$shukkairai_meisai_dt["id"] !== 0) { if ((int)$shukkairai_dt->ShukkairaiMeisaiDts[$i]->id !== (int)$shukkairai_meisai_dt["id"] || $shukkairai_dt->ShukkairaiMeisaiDts[$i]->updated !== $shukkairai_meisai_dt["updated"]) { $this->flash->error("他のプロセスから出荷依頼伝票明細が変更されたため中止しました。" . $id . ",id=" . $shukkairai_dt->ShukkairaiMeisaiDts[$i]->id . ",uid=" . $shukkairai_dt->ShukkairaiMeisaiDts[$i]->kousin_user_id . " tb=" . $shukkairai_dt->ShukkairaiMeisaiDts[$i]->updated ." pt=" . $shukkairai_meisai_dt["updated"]); $this->dispatcher->forward(array( 'controller' => "shukkairai_dts", 'action' => 'index' )); return; } } $i++; } $thisPost=[]; $chg_flg = 0; foreach ($post_flds as $post_fld) { if ((array_key_exists($post_fld, $thisPost)?$thisPost[$post_fld]:$this->request->getPost($post_fld)) !== $shukkairai_dt->$post_fld) { // echo $post_fld.'/'.$this->request->getPost($post_fld).'/'.(array_key_exists($post_fld, $thisPost)?$thisPost[$post_fld]:$this->request->getPost($post_fld)). '!=' . $shukkairai_dt->$post_fld;//型不明のため試行錯誤 $chg_flg = 1; break; } } $meisaicnv = array(); $chg_flgs = array(); $i = 0; foreach ($meisai["shukkairai_meisai_dts"] as $shukkairai_meisai_dt) { $meisaicnv[$i] = []; foreach ($meisai_nums as $meisai_num) { $meisaicnv[$i][$meisai_num]=(double)str_replace(',','',$shukkairai_meisai_dt[$meisai_num]);//カンマ除去 } $chg_flgs[$i] = 0;//変更ないかも if ((int)$shukkairai_meisai_dt["cd"] === 0 && (int)$shukkairai_meisai_dt["id"] !== 0) { // 削除の条件 $chg_flg = 1; $chg_flgs[$i] = 2;//削除 } else if ((int)$shukkairai_meisai_dt["id"] === 0) { // echo ($shukkairai_meisai_dt["id"] === "")?"null":"0";//nullの伝わり方 if ((int)$shukkairai_meisai_dt["cd"] !== 0 && (int)$shukkairai_meisai_dt["utiwake_kbn_cd"] !== 0) { $chg_flg = 1; $chg_flgs[$i] = 1; // $this->flash->error("追加!" . $i); } } else if ((int)$shukkairai_meisai_dt["cd"] !== 0) { foreach ($meisai_flds as $meisai_fld) { if ((array_key_exists($meisai_fld, $meisaicnv[$i])?$meisaicnv[$i][$meisai_fld]:$shukkairai_meisai_dt[$meisai_fld]).'' !== $shukkairai_dt->ShukkairaiMeisaiDts[$i]->$meisai_fld) { // echo $meisai_fld.'/'.$shukkairai_meisai_dt[$meisai_fld].'/'.(array_key_exists($meisai_fld, $meisaicnv[$i])?$meisaicnv[$i][$meisai_fld]:$shukkairai_meisai_dt[$meisai_fld]).'!=='.$shukkairai_dt->ShukkairaiMeisaiDts[$i]->$meisai_fld;//型不明のため試行錯誤 $chg_flg = 1; $chg_flgs[$i] = 1; // $this->flash->error("変化!" . $i.' '.$meisai_fld); break; } } } $i++; } $chouhyou_mr_id=$this->request->getPost('chouhyou_mr_id'); // 帳票マスタのid if ($chg_flg === 0) { if ($chouhyou_mr_id) { $this->flash->success("印刷データを出力します。" . $id); $this->dispatcher->forward(array( "controller" => "shukkairai_dts", "action" => "edit", "params" => array($shukkairai_dt->id, $chouhyou_mr_id) )); return; } $this->flash->error("変更がありません。" . $id); $this->dispatcher->forward(array( "controller" => "shukkairai_dts", "action" => "edit", "params" => array($shukkairai_dt->id) )); return; } $this->_bakOut($shukkairai_dt, 0, $chg_flgs); foreach ($post_flds as $post_fld) { $shukkairai_dt->$post_fld = array_key_exists($post_fld, $thisPost)?$thisPost[$post_fld]:$this->request->getPost($post_fld); } /* 伝票番号付番または再設定 */ $den_ban_ctrl = new DenpyouBangouMrsController(); //伝票番号マスタコントローラ $nendo_ban = $den_ban_ctrl->countup('shukkairai', $shukkairai_dt->cd, $shukkairai_dt->iraibi, $shukkairai_dt->nendo); if (!$nendo_ban['nendo']) { $this->flash->error("エラー:年度が未登録(日付が今年か昨年以外は不可)。" . $shukkairai_dt->iraibi); $this->dispatcher->forward(array( 'controller' => "shukkairai_dts", 'action' => 'edit', 'params' => array($id) )); } $shukkairai_dt->cd = $nendo_ban['bangou']; $shukkairai_dt->nendo = $nendo_ban['nendo']; $i = 0; foreach ($meisai["shukkairai_meisai_dts"] as $shukkairai_meisai_dt) { if ($chg_flgs[$i] === 2) { // 削除でないとき $meisai_ctlr = new ShukkairaiMeisaiDtsController(); $meisai_ctlr->deleteAction($shukkairai_meisai_dt["id"]); } else { if ((int)$shukkairai_meisai_dt["id"] !== 0) { $ShukkairaiMeisaiDts[$i] = $shukkairai_dt->ShukkairaiMeisaiDts[$i]; } if ($chg_flgs[$i] === 1) { // 更新なら if ((int)$shukkairai_meisai_dt["id"] === 0) { $ShukkairaiMeisaiDts[$i] = new ShukkairaiMeisaiDts(); } foreach ($meisai_flds as $meisai_fld) { $ShukkairaiMeisaiDts[$i]->$meisai_fld = array_key_exists($meisai_fld, $meisaicnv[$i])?$meisaicnv[$i][$meisai_fld]:$shukkairai_meisai_dt[$meisai_fld]??''; //更新日時や更新者はModelに定義してある } } } $i++; } $shukkairai_dt->ShukkairaiMeisaiDts = $ShukkairaiMeisaiDts; // 明細データをドッキング /** デバッグ echo "<pre>"; var_dump($shukkairai_dt->cd); echo "</pre>"; return; */ //2019/9/13 発注番号idが残ると発注番号を引っ張るため if ($this->request->getPost('hacchuu_dt_cd') === '') { $shukkairai_dt->hacchuu_dt_id = ''; } if (!$shukkairai_dt->save()) { foreach ($shukkairai_dt->getMessages() as $message) { $this->flash->error($message); } $this->dispatcher->forward(array( 'controller' => "shukkairai_dts", 'action' => 'edit', 'params' => array($shukkairai_dt->id) )); return; } $this->flash->success("出荷依頼伝票の情報を更新しました。".$chouhyou_mr_id); $this->dispatcher->forward(array( 'controller' => "shukkairai_dts", 'action' => 'edit', 'params' => array($shukkairai_dt->id, $chouhyou_mr_id) )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function saveAction()\n {\n\n if (!$this->request->isPost()) {\n $this->dispatcher->forward(array(\n 'controller' => \"shiiresaki_sime_naiyou_dts\",\n 'action' => 'index'\n ));\n\n return;\n }\n\n $id = $this->request->getPost(\"id\");\n $shiiresaki_sime_naiyou_dt = ShiiresakiSimeNaiyouDts::findFirstByid($id);\n\n if (!$shiiresaki_sime_naiyou_dt) {\n $this->flash->error(\"仕入先締内容データが見つからなくなりました。\" . $id);\n\n $this->dispatcher->forward(array(\n 'controller' => \"shiiresaki_sime_naiyou_dts\",\n 'action' => 'index'\n ));\n\n return;\n }\n\n if ($shiiresaki_sime_naiyou_dt->updated !== $this->request->getPost(\"updated\")) {\n $this->flash->error(\"他のプロセスから仕入先締内容データが変更されたため更新を中止しました。\"\n . $id . \",uid=\" . $shiiresaki_sime_naiyou_dt->kousin_user_id . \" tb=\" . $shiiresaki_sime_naiyou_dt->updated .\" pt=\" . $this->request->getPost(\"updated\"));\n\n $this->dispatcher->forward(array(\n 'controller' => \"shiiresaki_sime_naiyou_dts\",\n 'action' => 'edit',\n 'params' => array($id)\n ));\n\n return;\n }\n\n $post_flds = [];\n $post_flds = [\"cd\",\n \"name\",\n \"shiharai_kbn_cd\",\n \"kingaku\",\n \"updated\",\n ];\n \n\n $thisPost=[]; // カンマ編集を消すとか日付編集0000-00-00を入れるとか$thisPost[]で行う\n $chg_flg = 0;\n foreach ($post_flds as $post_fld) {\n if ((array_key_exists($post_fld, $thisPost)?$thisPost[$post_fld]:$this->request->getPost($post_fld)) !== $shiiresaki_sime_naiyou_dt->$post_fld) {\n $chg_flg = 1;\n break;\n }\n }\n if ($chg_flg === 0) {\n $this->flash->error(\"変更がありません。\" . $id);\n\n $this->dispatcher->forward(array(\n \"controller\" => \"shiiresaki_sime_naiyou_dts\",\n \"action\" => \"edit\",\n \"params\" => array($shiiresaki_sime_naiyou_dt->id)\n ));\n\n return;\n }\n\n $this->_bakOut($shiiresaki_sime_naiyou_dt);\n\n foreach ($post_flds as $post_fld) {\n $shiiresaki_sime_naiyou_dt->$post_fld = array_key_exists($post_fld, $thisPost)?$thisPost[$post_fld]:$this->request->getPost($post_fld);\n }\n\n if (!$shiiresaki_sime_naiyou_dt->save()) {\n\n foreach ($shiiresaki_sime_naiyou_dt->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n $this->dispatcher->forward(array(\n 'controller' => \"shiiresaki_sime_naiyou_dts\",\n 'action' => 'edit',\n 'params' => array($id)\n ));\n\n return;\n }\n\n $this->flash->success(\"仕入先締内容データの情報を更新しました。\");\n\n $this->dispatcher->forward(array(\n 'controller' => \"shiiresaki_sime_naiyou_dts\",\n 'action' => 'edit',\n 'params' => array($shiiresaki_sime_naiyou_dt->id)\n ));\n }", "public function saveAction()\n {\n\n if (!$this->request->isPost()) {\n $this->dispatcher->forward(array(\n 'controller' => \"kakou_nagare_dts\",\n 'action' => 'index'\n ));\n\n return;\n }\n\n $id = $this->request->getPost(\"id\");\n $kakou_nagare_dt = KakouNagareDts::findFirstByid($id);\n\n if (!$kakou_nagare_dt) {\n $this->flash->error(\"加工流れ詳細データが見つからなくなりました。\" . $id);\n\n $this->dispatcher->forward(array(\n 'controller' => \"kakou_nagare_dts\",\n 'action' => 'index'\n ));\n\n return;\n }\n\n if ($kakou_nagare_dt->updated !== $this->request->getPost(\"updated\")) {\n $this->flash->error(\"他のプロセスから加工流れ詳細データが変更されたため更新を中止しました。\"\n . $id . \",uid=\" . $kakou_nagare_dt->kousin_user_id . \" tb=\" . $kakou_nagare_dt->updated .\" pt=\" . $this->request->getPost(\"updated\"));\n\n $this->dispatcher->forward(array(\n 'controller' => \"kakou_nagare_dts\",\n 'action' => 'edit',\n 'params' => array($id)\n ));\n\n return;\n }\n\n $post_flds = [];\n $post_flds = [\"cd\",\n \"name\",\n \"hacchuu_dt_id\",\n \"kakou_nagare_kbn_id\",\n \"naiyou_cd\",\n \"bikou\",\n \"kakunin_kbn\",\n \"updated\",\n ];\n \n\n $thisPost=[]; // カンマ編集を消すとか日付編集0000-00-00を入れるとか$thisPost[]で行う\n $chg_flg = 0;\n foreach ($post_flds as $post_fld) {\n if ((array_key_exists($post_fld, $thisPost)?$thisPost[$post_fld]:$this->request->getPost($post_fld)) !== $kakou_nagare_dt->$post_fld) {\n $chg_flg = 1;\n break;\n }\n }\n if ($chg_flg === 0) {\n $this->flash->error(\"変更がありません。\" . $id);\n\n $this->dispatcher->forward(array(\n \"controller\" => \"kakou_nagare_dts\",\n \"action\" => \"edit\",\n \"params\" => array($kakou_nagare_dt->id)\n ));\n\n return;\n }\n\n $this->_bakOut($kakou_nagare_dt);\n\n foreach ($post_flds as $post_fld) {\n $kakou_nagare_dt->$post_fld = array_key_exists($post_fld, $thisPost)?$thisPost[$post_fld]:$this->request->getPost($post_fld);\n }\n\n if (!$kakou_nagare_dt->save()) {\n\n foreach ($kakou_nagare_dt->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n $this->dispatcher->forward(array(\n 'controller' => \"kakou_nagare_dts\",\n 'action' => 'edit',\n 'params' => array($id)\n ));\n\n return;\n }\n\n $this->flash->success(\"加工流れ詳細データの情報を更新しました。\");\n\n $this->dispatcher->forward(array(\n 'controller' => \"kakou_nagare_dts\",\n 'action' => 'edit',\n 'params' => array($kakou_nagare_dt->id)\n ));\n }", "public function saveAction()\n {\n\n if (!$this->request->isPost()) {\n $this->dispatcher->forward(array(\n 'controller' => \"h_calendar_patan_dts\",\n 'action' => 'index'\n ));\n\n return;\n }\n\n $id = $this->request->getPost(\"id\");\n $h_calendar_patan_dt = HCalendarPatanDts::findFirstByid($id);\n\n if (!$h_calendar_patan_dt) {\n $this->flash->error(\"カレンダーパタンが見つからなくなりました。\" . $id);\n\n $this->dispatcher->forward(array(\n 'controller' => \"h_calendar_patan_dts\",\n 'action' => 'index'\n ));\n\n return;\n }\n\n if ($h_calendar_patan_dt->updated !== $this->request->getPost(\"updated\")) {\n $this->flash->error(\"他のプロセスからカレンダーパタンが変更されたため更新を中止しました。\"\n . $id . \",uid=\" . $h_calendar_patan_dt->kousin_user_id . \" tb=\" . $h_calendar_patan_dt->updated .\" pt=\" . $this->request->getPost(\"updated\"));\n\n $this->dispatcher->forward(array(\n 'controller' => \"h_calendar_patan_dts\",\n 'action' => 'edit',\n 'params' => array($id)\n ));\n\n return;\n }\n\n $post_flds = [];\n $post_flds = [\"cd\",\n \"name\",\n \"bikou\",\n \"updated\",\n ];\n \n\n $chg_flg = 0;\n foreach ($post_flds as $post_fld) {\n if ($this->request->getPost($post_fld) !== $h_calendar_patan_dt->$post_fld) {\n $chg_flg = 1;\n break;\n }\n }\n if ($chg_flg === 0) {\n $this->flash->error(\"変更がありません。\" . $id);\n\n $this->dispatcher->forward(array(\n \"controller\" => \"h_calendar_patan_dts\",\n \"action\" => \"edit\",\n \"params\" => array($h_calendar_patan_dt->id)\n ));\n\n return;\n }\n\n $this->_bakOut($h_calendar_patan_dt, 0);\n\n foreach ($post_flds as $post_fld) {\n $h_calendar_patan_dt->$post_fld = $this->request->getPost($post_fld);\n }\n\n if (!$h_calendar_patan_dt->save()) {\n\n foreach ($h_calendar_patan_dt->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n $this->dispatcher->forward(array(\n 'controller' => \"h_calendar_patan_dts\",\n 'action' => 'edit',\n 'params' => array($id)\n ));\n\n return;\n }\n\n $this->flash->success(\"カレンダーパタンの情報を更新しました。\");\n\n $this->dispatcher->forward(array(\n 'controller' => \"h_calendar_patan_dts\",\n 'action' => 'edit',\n 'params' => array($h_calendar_patan_dt->id)\n ));\n }", "public function saveAction()\n {\n\n if (!$this->request->isPost()) {\n $this->dispatcher->forward(array(\n 'controller' => \"zaiko_henkan_kbns\",\n 'action' => 'index'\n ));\n\n return;\n }\n\n $id = $this->request->getPost(\"id\");\n $zaiko_henkan_kbn = ZaikoHenkanKbns::findFirstByid($id);\n\n if (!$zaiko_henkan_kbn) {\n $this->flash->error(\"在庫変換区分が見つからなくなりました。\" . $id);\n\n $this->dispatcher->forward(array(\n 'controller' => \"zaiko_henkan_kbns\",\n 'action' => 'index'\n ));\n\n return;\n }\n\n if ($zaiko_henkan_kbn->updated !== $this->request->getPost(\"updated\")) {\n $this->flash->error(\"他のプロセスから在庫変換区分が変更されたため更新を中止しました。\"\n . $id . \",uid=\" . $zaiko_henkan_kbn->kousin_user_id . \" tb=\" . $zaiko_henkan_kbn->updated .\" pt=\" . $this->request->getPost(\"updated\"));\n\n $this->dispatcher->forward(array(\n 'controller' => \"zaiko_henkan_kbns\",\n 'action' => 'edit',\n 'params' => array($id)\n ));\n\n return;\n }\n\n $post_flds = [];\n $post_flds = [\"cd\",\n \"name\",\n \"denpyou_mr_cd\",\n \"shiire_flg\",\n \"nyuuko_flg\",\n \"uriage_flg\",\n \"shukko_flg\",\n \"azuchou_flg\",\n \"updated\",\n ];\n \n\n $thisPost=[]; // カンマ編集を消すとか日付編集0000-00-00を入れるとか$thisPost[]で行う\n $chg_flg = 0;\n foreach ($post_flds as $post_fld) {\n if ((array_key_exists($post_fld, $thisPost)?$thisPost[$post_fld]:$this->request->getPost($post_fld)) !== $zaiko_henkan_kbn->$post_fld) {\n $chg_flg = 1;\n break;\n }\n }\n if ($chg_flg === 0) {\n $this->flash->error(\"変更がありません。\" . $id);\n\n $this->dispatcher->forward(array(\n \"controller\" => \"zaiko_henkan_kbns\",\n \"action\" => \"edit\",\n \"params\" => array($zaiko_henkan_kbn->id)\n ));\n\n return;\n }\n\n $this->_bakOut($zaiko_henkan_kbn);\n\n foreach ($post_flds as $post_fld) {\n $zaiko_henkan_kbn->$post_fld = array_key_exists($post_fld, $thisPost)?$thisPost[$post_fld]:$this->request->getPost($post_fld);\n }\n\n if (!$zaiko_henkan_kbn->save()) {\n\n foreach ($zaiko_henkan_kbn->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n $this->dispatcher->forward(array(\n 'controller' => \"zaiko_henkan_kbns\",\n 'action' => 'edit',\n 'params' => array($id)\n ));\n\n return;\n }\n\n $this->flash->success(\"在庫変換区分の情報を更新しました。\");\n\n $this->dispatcher->forward(array(\n 'controller' => \"zaiko_henkan_kbns\",\n 'action' => 'edit',\n 'params' => array($zaiko_henkan_kbn->id)\n ));\n }", "public function editSave()\n {\n \t$schedule_model = $this->loadModel('Schedule');\n \t$exam = new Exam();\n \t$exam->setId($_POST['examId']); \t\n \t$exam->setLocation($_POST['textLocation']);\n \t$exam->setDate($_POST['textDate']);\n \t$exam->setTime($_POST['textTime']);\n \t$schedule_model->editExam($exam); \n \t\t\n }", "public function save()\n {\n if (empty($this->id))\n {\n $sql =\n \"INSERT INTO time_event(id, start, \\\"end\\\")\n VALUES (DEFAULT,\" .\n DateConvert::SKDateTime2DBTimestamp(\"$1\").\", \".\n DateConvert::SKDateTime2DBTimestamp(\"$2\").\")\";\n $this->dbh->query($sql, array(\n $this->zaciatok, $this->koniec\n ));\n $id_time_event = $this->dbh->GetLastInsertID();\n\n $sql =\n \"INSERT INTO event(id, id_semester)\n VALUES (DEFAULT, $1)\";\n $this->dbh->query($sql, array($this->id_semester));\n $id_event = $this->dbh->GetLastInsertID();\n\n $sql =\n \"INSERT INTO event_time_event(id_event, id_time_event)\n VALUES ($1, $2)\";\n $this->dbh->query($sql, array($id_event, $id_time_event));\n }else\n {\n // save after edit\n $sql =\n \"UPDATE event SET\n id_semester=$1\n\t\t WHERE id=$2\";\n $this->dbh->query($sql, array($this->id, $this->id_semester));\n $sql =\n \"UPDATE time_event SET\n start = $1,\n \\\"end\\\" = $2\n WHERE EXISTS(\n SELECT 1\n FROM event JOIN event_time_event e2t ON event.id = e2t.id_event\n WHERE e2t.id_time_event = time_event.id\n AND event.id = $3)\";\n $this->dbh->query($sql, array($this->zaciatok, $this->koniec, $this->id));\n }\n }", "public function save()\n {\n // Sinon update dynamique\n $this->id = 1;\n $this->lastname = 'test';\n\n if ($this->id == -1) {\n $data = [];\n unset($this->columns['id']);\n\n $sqlCol = null;\n $sqlKey = null;\n foreach ($this->columns as $column => $value) {\n $data[$column] = $this->$column;\n $sqlCol .= ',' . $column;\n $sqlKey .= ',:' . $column;\n }\n $sqlCol = ltrim($sqlCol, ',');\n $sqlKey = ltrim($sqlKey, ',');\n\n $query = $this->db->prepare(\n \"INSERT INTO \" . $this->table .\n \" (\" . $sqlCol . \")\" .\n \" VALUES \" .\n \"(\" . $sqlKey . \");\"\n );\n\n $query->execute($data);\n } else {\n\n $data = [];\n $sqlSet = [];\n foreach ($this->columns as $column => $key) {\n $data[$column] = $this->$column;\n $sqlSet[] = $column . '=:' . $column;\n }\n\n $query = $this->db->prepare(\n \"UPDATE \" . $this->table . ' SET date_updated = sysdate(), ' . implode(',',\n $sqlSet) . ' WHERE id = :id;'\n );\n $query->execute($data);\n }\n }", "function date_save( $post_id ) {\n\t\t// If this is an autosave, our form has not been submitted, so we don't want to do anything\n\t\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;\n\t\t// Check if our nonce is set AND if that the nonce is valid\n\t\tif ( ! isset( $_POST['date_nonce'] ) || ! wp_verify_nonce( $_POST['date_nonce'], '_date_nonce' ) ) return;\n\t\t// Check the user's permissions\n\t\tif ( ! current_user_can( 'equipeer_edit_equine', $post_id ) ) return;\n\t\t\n\t\t// Update the meta field\n\t\t// ---------------------------------------------\n\t\tif ( isset( $_POST['veterinaire_date'] ) )\n\t\t\tupdate_post_meta( $post_id, 'veterinaire_date', esc_attr( $_POST['veterinaire_date'] ) );\n\t\t// ---------------------------------------------\n\t\tif ( isset( $_POST['veterinaire_document'] ) )\n\t\t\tupdate_post_meta( $post_id, 'veterinaire_document', esc_attr( $_POST['veterinaire_document'] ) );\n\t\t// ---------------------------------------------\n\t\tif ( isset( $_POST['misc_bilan'] ) )\n\t\t\tupdate_post_meta( $post_id, 'misc_bilan', esc_attr( $_POST['misc_bilan'] ) );\n\t\t// ---------------------------------------------\n\t}", "public function save()\n {\n $editFormData = Yii::$app->request->post('editFormData');\n $langs = $editFormData['langs'];\n \n $saveData = $this->getEditParam($langs);\n /*\n * if attribute is date or date time , db storage format is int ,by frontend pass param is int ,\n * you must convert string datetime to time , use strtotime function.\n */\n // 设置 bdmin_user_id 为 当前的user_id\n $this->_service->saveConfig($saveData);\n \n $errors = Yii::$service->helper->errors->get();\n if (!$errors) {\n echo json_encode([\n 'statusCode' => '200',\n 'message' => Yii::$service->page->translate->__('Save Success'),\n ]);\n exit;\n } else {\n echo json_encode([\n 'statusCode' => '300',\n 'message' => $errors,\n ]);\n exit;\n }\n }", "public function saveAction()\n {\n\n if (!$this->request->isPost()) {\n $this->dispatcher->forward(array(\n 'controller' => \"zaiko_kakunin_vws\",\n 'action' => 'index'\n ));\n\n return;\n }\n\n $shouhin_mr_cd = $this->request->getPost(\"shouhin_mr_cd\");\n $zaiko_kakunin_vw = ZaikoKakuninVws::findFirstByshouhin_mr_cd($shouhin_mr_cd);\n\n if (!$zaiko_kakunin_vw) {\n $this->flash->error(\"VIEWが見つからなくなりました。\" . $shouhin_mr_cd);\n\n $this->dispatcher->forward(array(\n 'controller' => \"zaiko_kakunin_vws\",\n 'action' => 'index'\n ));\n\n return;\n }\n\n if ($zaiko_kakunin_vw->updated !== $this->request->getPost(\"updated\")) {\n $this->flash->error(\"他のプロセスからVIEWが変更されたため更新を中止しました。\"\n . $shouhin_mr_cd . \",uid=\" . $zaiko_kakunin_vw->kousin_user_id . \" tb=\" . $zaiko_kakunin_vw->updated .\" pt=\" . $this->request->getPost(\"updated\"));\n\n $this->dispatcher->forward(array(\n 'controller' => \"zaiko_kakunin_vws\",\n 'action' => 'edit',\n 'params' => array($shouhin_mr_cd)\n ));\n\n return;\n }\n\n $post_flds = [];\n $post_flds = [\"shouhin_mr_cd\",\n \"tantou_mr_cd\",\n \"tanni_mr1_cd\",\n \"tanni_mr2_cd\",\n \"iro\",\n \"iromei\",\n \"lot\",\n \"kobetucd\",\n \"hinsitu_kbn_cd\",\n \"hinsitu_hyouka_kbn_cd\",\n \"souko_mr_cd\",\n \"zaiko_ryou1\",\n \"zaiko_ryou2\",\n \"hacchuuzan_ryou1\",\n \"hacchuuzan_ryou2\",\n \"juchuuzan_ryou1\",\n \"juchuuzan_ryou2\",\n \"denpyou_mr_cd\",\n \"meisai_id\",\n \"meisai_cd\",\n \"utiwake_kbn_cd\",\n \"id\",\n \"cd\",\n \"tokuisaki_mr_cd\",\n \"shiiresaki_mr_cd\",\n \"nounyuu_kijitu\",\n \"nouki\",\n \"hacchuu_dt_id\",\n \"juchuu_dt_id\",\n ];\n \n\n $thisPost=[]; // カンマ編集を消すとか日付編集0000-00-00を入れるとか$thisPost[]で行う\n $chg_flg = 0;\n foreach ($post_flds as $post_fld) {\n if ((array_key_exists($post_fld, $thisPost)?$thisPost[$post_fld]:$this->request->getPost($post_fld)) !== $zaiko_kakunin_vw->$post_fld) {\n $chg_flg = 1;\n break;\n }\n }\n if ($chg_flg === 0) {\n $this->flash->error(\"変更がありません。\" . $shouhin_mr_cd);\n\n $this->dispatcher->forward(array(\n \"controller\" => \"zaiko_kakunin_vws\",\n \"action\" => \"edit\",\n \"params\" => array($zaiko_kakunin_vw->shouhin_mr_cd)\n ));\n\n return;\n }\n\n $this->_bakOut($zaiko_kakunin_vw);\n\n foreach ($post_flds as $post_fld) {\n $zaiko_kakunin_vw->$post_fld = array_key_exists($post_fld, $thisPost)?$thisPost[$post_fld]:$this->request->getPost($post_fld);\n }\n\n if (!$zaiko_kakunin_vw->save()) {\n\n foreach ($zaiko_kakunin_vw->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n $this->dispatcher->forward(array(\n 'controller' => \"zaiko_kakunin_vws\",\n 'action' => 'edit',\n 'params' => array($shouhin_mr_cd)\n ));\n\n return;\n }\n\n $this->flash->success(\"VIEWの情報を更新しました。\");\n\n $this->dispatcher->forward(array(\n 'controller' => \"zaiko_kakunin_vws\",\n 'action' => 'edit',\n 'params' => array($zaiko_kakunin_vw->shouhin_mr_cd)\n ));\n }", "public function saveAction()\n {\n\n if (!$this->request->isPost()) {\n $this->dispatcher->forward(array(\n 'controller' => \"shiiresaki_bunrui2_kbns\",\n 'action' => 'index'\n ));\n\n return;\n }\n\n $id = $this->request->getPost(\"id\");\n $shiiresaki_bunrui2_kbn = ShiiresakiBunrui2Kbns::findFirstByid($id);\n\n if (!$shiiresaki_bunrui2_kbn) {\n $this->flash->error(\"仕入先分類2が見つからなくなりました。\" . $id);\n\n $this->dispatcher->forward(array(\n 'controller' => \"shiiresaki_bunrui2_kbns\",\n 'action' => 'index'\n ));\n\n return;\n }\n\n if ($shiiresaki_bunrui2_kbn->updated !== $this->request->getPost(\"updated\")) {\n $this->flash->error(\"他のプロセスから仕入先分類2が変更されたため更新を中止しました。\"\n . $id . \",uid=\" . $shiiresaki_bunrui2_kbn->kousin_user_id . \" tb=\" . $shiiresaki_bunrui2_kbn->updated .\" pt=\" . $this->request->getPost(\"updated\"));\n\n $this->dispatcher->forward(array(\n 'controller' => \"shiiresaki_bunrui2_kbns\",\n 'action' => 'edit',\n 'params' => array($id)\n ));\n\n return;\n }\n\n $post_flds = [];\n $post_flds = [\"cd\",\n \"name\",\n \"updated\",\n ];\n \n\n $thisPost=[]; // カンマ編集を消すとか日付編集0000-00-00を入れるとか$thisPost[]で行う\n $chg_flg = 0;\n foreach ($post_flds as $post_fld) {\n if ((array_key_exists($post_fld, $thisPost)?$thisPost[$post_fld]:$this->request->getPost($post_fld)) !== $shiiresaki_bunrui2_kbn->$post_fld) {\n $chg_flg = 1;\n break;\n }\n }\n if ($chg_flg === 0) {\n $this->flash->error(\"変更がありません。\" . $id);\n\n $this->dispatcher->forward(array(\n \"controller\" => \"shiiresaki_bunrui2_kbns\",\n \"action\" => \"edit\",\n \"params\" => array($shiiresaki_bunrui2_kbn->id)\n ));\n\n return;\n }\n\n $this->_bakOut($shiiresaki_bunrui2_kbn);\n\n foreach ($post_flds as $post_fld) {\n $shiiresaki_bunrui2_kbn->$post_fld = array_key_exists($post_fld, $thisPost)?$thisPost[$post_fld]:$this->request->getPost($post_fld);\n }\n\n if (!$shiiresaki_bunrui2_kbn->save()) {\n\n foreach ($shiiresaki_bunrui2_kbn->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n $this->dispatcher->forward(array(\n 'controller' => \"shiiresaki_bunrui2_kbns\",\n 'action' => 'edit',\n 'params' => array($id)\n ));\n\n return;\n }\n\n $this->flash->success(\"仕入先分類2の情報を更新しました。\");\n\n $this->dispatcher->forward(array(\n 'controller' => \"shiiresaki_bunrui2_kbns\",\n 'action' => 'edit',\n 'params' => array($shiiresaki_bunrui2_kbn->id)\n ));\n }", "public static function save() {\n\t\tself::edit();\n\t}", "public function saveEdit() {\n\t\t\t\n\t\t\t$this->load->helper('form');\n\t\t\t\n\t\t\t$id = $this->uri->segment(3); \n\t\t\t\n\t\t\t$save=array(\n\t\t\t\t\t\t\t'userstory' => $this->input->post('userstoryarea'),\n\t\t\t\t\t\t\t'datetocomplete' => $this-> input->post('datecomplete'),\n\t\t\t\t\t\t 'name'=> $this->input->post('developer')\n\t\t\t);\n \n\t\t\t$this->load_userStory->saveEdited($id,$save);\n\t\t\t$this->viewUStory();\n\n\n\t\t}", "public function save() {\n\t\t$formValues = $this->_form->getSubmitValues();\n\t\t$startTime = (\"{$formValues['start_time']['Y']}-\" . str_pad($formValues['start_time']['M'], 2, '0', STR_PAD_LEFT) . '-' . str_pad($formValues['start_time']['d'], 2, '0', STR_PAD_LEFT) . ' ' . date('H:i:s'));\n\t\t$endTime = (isset($formValues['never_expire']) || !is_numeric($formValues['end_time']['Y']) ? '2100-01-01 00:00:00' : (\"{$formValues['end_time']['Y']}-\" . str_pad($formValues['end_time']['M'], 2, '0', STR_PAD_LEFT) . '-' . str_pad($formValues['end_time']['d'], 2, '0', STR_PAD_LEFT) . ' ' . date('H:i:s')));\n $consumer_club_id = $this->_distributor->get_consumer_account_id($this->_distributor->id);\n\t\t\n\t\tif (NULL == $this->_dinId) {\n\t\t\t$this->_distributorIdentification->updateDistributorIdentificationNumber($this->_distributor->distributor_id, $formValues['din_type'], $formValues['din_number'], $formValues['country_id'], $_SESSION['user']['user_id'], (isset($formValues['validated']) ? 1 : NULL), $startTime, $endTime);\n if (!empty($consumer_club_id)) {\n $this->_distributorIdentification->updateDistributorIdentificationNumber($consumer_club_id, $formValues['din_type'], $formValues['din_number'], $formValues['country_id'], $_SESSION['user']['user_id'], (isset($formValues['validated']) ? 1 : NULL), $startTime, $endTime);\n }\n\t\t} else {\n\t\t\t$this->_distributorIdentification->updateDistributorIdentificationNumber($this->_distributor->distributor_id, $this->_din['distributor_identification_number_type_id'], $formValues['din_number'], $this->_din['country_id'], $_SESSION['user']['user_id'], (isset($formValues['validated']) ? 1 : NULL), $startTime, $endTime);\n if (!empty($consumer_club_id)) {\n $this->_distributorIdentification->updateDistributorIdentificationNumber($consumer_club_id, $this->_din['distributor_identification_number_type_id'], $formValues['din_number'], $this->_din['country_id'], $_SESSION['user']['user_id'], (isset($formValues['validated']) ? 1 : NULL), $startTime, $endTime);\n }\n\t\t}\n\t\t\n\t\treturn TRUE;\n\t}", "public function updateSave()\n {\n date_default_timezone_set('America/Sao_Paulo');\n \t\t$date_update_at = date('Y-m-d H:i:s');\n\n $clientesTable = TableRegistry::get('clientes');\n $cliente = $clientesTable->newEntity();\n $cliente->cliente_id = $this->request->data('cliente_id');\n $cliente->cliente_nome = $this->request->data('cliente_nome');\n $cliente->cliente_sobrenome = $this->request->data('cliente_sobrenome');\n $cliente->cliente_updated_at = $date_update_at;\n\n if($clientesTable->save($cliente))\n {\n $msg = \"Dados alterados com sucesso!\";\n }\n else\n {\n $msg = \"Erro ao alterar dados!\";\n }\n $this->set('msg', $msg);\n }", "public function saveAction()\n {\n\n if (!$this->request->isPost()) {\n $this->dispatcher->forward(array(\n 'controller' => \"shiharai_bunrui_kbns\",\n 'action' => 'index'\n ));\n\n return;\n }\n\n $id = $this->request->getPost(\"id\");\n $shiharai_bunrui_kbn = ShiharaiBunruiKbns::findFirstByid($id);\n\n if (!$shiharai_bunrui_kbn) {\n $this->flash->error(\"入金分類が見つからなくなりました。\" . $id);\n\n $this->dispatcher->forward(array(\n 'controller' => \"shiharai_bunrui_kbns\",\n 'action' => 'index'\n ));\n\n return;\n }\n\n if ($shiharai_bunrui_kbn->updated !== $this->request->getPost(\"updated\")) {\n $this->flash->error(\"他のプロセスから入金分類が変更されたため更新を中止しました。\"\n . $id . \",uid=\" . $shiharai_bunrui_kbn->kousin_user_id . \" tb=\" . $shiharai_bunrui_kbn->updated .\" pt=\" . $this->request->getPost(\"updated\"));\n\n $this->dispatcher->forward(array(\n 'controller' => \"shiharai_bunrui_kbns\",\n 'action' => 'edit',\n 'params' => array($id)\n ));\n\n return;\n }\n\n $post_flds = [];\n $post_flds = [\"cd\",\n \"name\",\n \"updated\",\n ];\n \n\n $thisPost=[]; // カンマ編集を消すとか日付編集0000-00-00を入れるとか$thisPost[]で行う\n $chg_flg = 0;\n foreach ($post_flds as $post_fld) {\n if ((array_key_exists($post_fld, $thisPost)?$thisPost[$post_fld]:$this->request->getPost($post_fld)) !== $shiharai_bunrui_kbn->$post_fld) {\n $chg_flg = 1;\n break;\n }\n }\n if ($chg_flg === 0) {\n $this->flash->error(\"変更がありません。\" . $id);\n\n $this->dispatcher->forward(array(\n \"controller\" => \"shiharai_bunrui_kbns\",\n \"action\" => \"edit\",\n \"params\" => array($shiharai_bunrui_kbn->id)\n ));\n\n return;\n }\n\n $this->_bakOut($shiharai_bunrui_kbn);\n\n foreach ($post_flds as $post_fld) {\n $shiharai_bunrui_kbn->$post_fld = array_key_exists($post_fld, $thisPost)?$thisPost[$post_fld]:$this->request->getPost($post_fld);\n }\n\n if (!$shiharai_bunrui_kbn->save()) {\n\n foreach ($shiharai_bunrui_kbn->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n $this->dispatcher->forward(array(\n 'controller' => \"shiharai_bunrui_kbns\",\n 'action' => 'edit',\n 'params' => array($id)\n ));\n\n return;\n }\n\n $this->flash->success(\"入金分類の情報を更新しました。\");\n\n $this->dispatcher->forward(array(\n 'controller' => \"shiharai_bunrui_kbns\",\n 'action' => 'edit',\n 'params' => array($shiharai_bunrui_kbn->id)\n ));\n }", "public function save()\n\t{\n\t\t$table = $this->table();\n\t\tif ($this->exists()) {\n\t\t\t$table->update($this->toArray(), $this->where());\n\t\t} else {\n\t\t\t$this->_row['skenario_id'] = $this->_skenario->getId();\n\t\t\t$table->insert($this->toArray());\n\t\t\t$this->_id = $table->getAdapter()->lastSequenceId('latihan.kekuatan_musuh_id_seq'); // hardcoded!\n\t\t}\n\t}", "public function save()\n {\n $this->getProject();\n $values = $this->request->getJson();\n\n $result = $this->taskModificationModel->update(array(\n 'id' => $values['id'],\n 'date_started' => strtotime($values['start']),\n 'date_due' => strtotime($values['end']),\n ));\n\n if (! $result) {\n $this->response->json(array('message' => 'Unable to save task'), 400);\n } else {\n $this->response->json(array('message' => 'OK'), 201);\n }\n }", "public function save()\n {\n if ($this->thema_id != \"\" && $this->titel != \"\") {\n //vorhanden Artikel updaten\n if ($this->artikel_id != \"\") {\n $query = \"UPDATE sb_artikel \"\n . \"SET titel= ?, beschreibung= ?, visible= ?, publishable= ?, thema_id= ? \"\n . \"WHERE artikel_id = ?\";\n DBManager::get()\n ->prepare($query)\n ->execute(array(\n $this->titel, $this->beschreibung, $this->visible,\n $this->publishable, $this->thema_id, $this->artikel_id\n ));\n }\n //Neuen Artikel speichern\n else {\n $id = md5(uniqid(time()));\n\n $query = \"INSERT INTO sb_artikel \"\n . \" (artikel_id, thema_id, titel, user_id, mkdate, beschreibung, visible, publishable) \"\n . \"VALUES (?, ?, ?, ?, UNIX_TIMESTAMP(), ?, ?, ?)\";\n DBManager::get()\n ->prepare($query)\n ->execute(array(\n $id, $this->thema_id, $this->titel,\n $GLOBALS['auth']->auth['uid'], $this->beschreibung,\n $this->visible, $this->publishable\n ));\n }\n }\n }", "public function save_edit_schedul($savedata,$s_id)\n {\n \t \t$this->db->where('schedul_id',$s_id);\n $this->db->update('schedul_setup_tbl',$savedata);\n \t }", "public function saveCS()\n {\n //mengubah format tanggal dari html( <input type=\"date\")\n //menjadi format tanggal yang diterima MySQL\n $tanggal = $this->request->getVar('tgl-perolehan');\n $formattedDate = date(\"Y-m-d H:i:s\", strtotime($tanggal));\n\n $data = [\n 'nama_barang' => $this->request->getVar('nama-barang'),\n 'tanggal_perolehan' => $formattedDate,\n 'keterangan' => $this->request->getVar('keterangan-kondisi'),\n 'kondisi_id' => $this->request->getVar('kondisi'),\n 'ruangan_id' => $this->request->getVar('keterangan-ruangan'),\n ];\n\n $Inventaris = model('App\\Models\\InventarisModel');\n $Inventaris->save($data);\n session()->setFlashData('pesan', 'Data berhasil ditambahkan!');\n return redirect()->to('/Inventarisasi/customerService');\n }", "function date_by_id_put(){\n $this->validate_user_sesssion(); \n $id_evento = $this->put(\"evento\"); \n $nuevo_inicio = $this->put(\"nuevo_inicio\");\n $nuevo_termino = $this->put(\"nuevo_termino\");\n $id_usuario = $this->sessionclass->getidusuario(); \n $param = $this->put(); \n $this->response($this->eventmodel->update_date($id_evento , $nuevo_inicio , $nuevo_termino , $id_usuario , $param ));\n }", "Public Function save();", "public function saveAcct()\n {\n\n\n //mengubah format tanggal dari html( <input type=\"date\")\n //menjadi format tanggal yang diterima MySQL\n $tanggal = $this->request->getVar('tgl-perolehan');\n $formattedDate = date(\"Y-m-d H:i:s\", strtotime($tanggal));\n\n\n\n $data = [\n 'nama_barang' => $this->request->getVar('nama-barang'),\n 'tanggal_perolehan' => $formattedDate,\n 'keterangan' => $this->request->getVar('keterangan-kondisi'),\n 'kondisi_id' => $this->request->getVar('kondisi'),\n 'ruangan_id' => $this->request->getVar('keterangan-ruangan'),\n ];\n\n $Inventaris = model('App\\Models\\InventarisModel');\n $Inventaris->save($data);\n session()->setFlashData('pesan', 'Data berhasil ditambahkan!');\n return redirect()->to('/Inventarisasi/akuntansi');\n }", "public function update(){\n $id = $_POST['id'];\n $title = $_POST['title'];\n $start = $_POST['start'];\n $end = $_POST['end'];\n $allDay = $_POST['allday'];\n $back = $_POST['background'];\n\n $evento=Fullcalendarevento::find($id);\n if($end=='NULL'){\n $evento->fechaFin=NULL;\n }else{\n $evento->fechaFin=$end;\n }\n $evento->fechaIni=$start;\n $evento->todoeldia=$allDay;\n $evento->color=$back;\n $evento->titulo=$title;\n //$evento->fechaFin=$end;\n\n $evento->save();\n }", "public function saveAction()\n {\n if (!$this->request->isPost()) {\n $this->flash->error('POSTリクエストしか更新処理を行えません。');\n $this->dispatcher->forward([\n 'controller' => \"kakou_irais\",\n 'action' => 'index'\n ]);\n return;\n }\n $id = $this->request->getPost(\"id\");\n $h_id = $this->request->getPost('h_id');\n $h_meisai_id = $this->request->getPost('h_meisai_id');\n // リダイレクト時に必要\n $h_cd = $this->request->getPost('h_cd');\n $meisaiRow = $this->request->getPost('meisai_row');\n $genryouCds = $this->request->getPost('genryou_cds');\n $genryouNames = $this->request->getPost('genryou_names');\n $konritsu = $this->request->getPost('konritsu');\n $koutin = $this->request->getPost('koutin');\n $tankaTanni = $this->request->getPost('tanka_tani');\n\n $kakou_irai = KakouIrais::findFirstByid($id);\n if (!$kakou_irai) {\n // idで見つからない場合、新規登録\n $kakou_irai = new KakouIrais();\n }\n $kakou_irai->h_id = $h_id;\n $kakou_irai->h_meisai_id = $h_meisai_id;\n $kakou_irai->meisai_row = $meisaiRow;\n $kakou_irai->nouki_memo2 = $this->request->getPost(\"nouki_memo2\");\n $kakou_irai->naiyou_1 = $this->request->getPost(\"naiyou_1\");\n $kakou_irai->naiyou_2 = $this->request->getPost(\"naiyou_2\");\n $kakou_irai->naiyou_3 = $this->request->getPost(\"naiyou_3\");\n $kakou_irai->naiyou_4 = $this->request->getPost(\"naiyou_4\");\n $kakou_irai->naiyou_5 = $this->request->getPost(\"naiyou_5\");\n $kakou_irai->naiyou_6 = $this->request->getPost(\"naiyou_6\");\n $kakou_irai->naiyou_7 = $this->request->getPost(\"naiyou_7\");\n $kakou_irai->naiyou_8 = $this->request->getPost(\"naiyou_8\");\n $kakou_irai->naiyou_9 = $this->request->getPost(\"naiyou_9\");\n $kakou_irai->naiyou_10 = $this->request->getPost(\"naiyou_10\");\n $kakou_irai->naiyou_11 = $this->request->getPost(\"naiyou_11\");\n $kakou_irai->naiyou_12 = $this->request->getPost(\"naiyou_12\");\n $kakou_irai->naiyou_13 = $this->request->getPost(\"naiyou_13\");\n $kakou_irai->memo_1 = $this->request->getPost(\"memo_1\");\n $kakou_irai->memo_2 = $this->request->getPost(\"memo_2\");\n $kakou_irai->meisai = $this->request->getPost(\"meisai\");\n $kakou_irai->gen_nyuukasaki = $this->request->getPost(\"gen_nyuukasaki\");\n $kakou_irai->gen_nyuukabi = $this->request->getPost(\"gen_nyuukabi\");\n $kakou_irai->sai_fax_memo = $this->request->getPost(\"sai_fax_memo\");\n $kakou_irai->asistant = $this->request->getPost(\"asistant\");\n $kakou_irai->kishumei = $this->request->getPost(\"kishumei\");\n $kakou_irai->kakou_kbn = $this->request->getPost(\"kakou_kbn\");\n $kakou_irai->sfn_cd = $this->request->getPost(\"sfn_cd\");\n $kakou_irai->nouki_hensin = $this->request->getPost(\"nouki_hensin\");\n $kakou_irai->gen_hensin = $this->request->getPost(\"gen_hensin\");\n $kakou_irai->gen_nyuuka_honsuu = $this->request->getPost(\"gen_nyuuka_honsuu\");\n $kakou_irai->gen_nyuuka_tanni = $this->request->getPost(\"gen_nyuuka_tanni\");\n $kakou_irai->gen_nyuukabi = $this->request->getPost(\"gen_nyuukabi\");\n $kakou_irai->synai_memo1 = $this->request->getPost(\"synai_memo1\");\n $kakou_irai->synai_memo2 = $this->request->getPost(\"synai_memo2\");\n $kakou_irai->sfn_cd = $this->request->getPost(\"sfn_cd\");\n $kakou_irai->shouhin_mr_cd = $this->request->getPost(\"shouhin_mr_cd\");\n $kakou_irai->gotantousha = $this->request->getPost('gotantousha');\n if (!$kakou_irai->save()) {\n foreach ($kakou_irai->getMessages() as $message) {\n $this->flash->error($message);\n }\n $this->flash->error('データ保存時にエラーが発生しました。');\n $this->dispatcher->forward([\n 'controller' => \"kakou_irais\",\n 'action' => 'index',\n ]);\n return;\n }\n\n $message = \"加工依頼データを更新しました。\";\n $params = [];\n $params['h_id'] = $h_id;\n $params['h_cd'] = $h_cd;\n $params['h_meisai_id'] = $h_meisai_id;\n $params['meisai_row'] = $meisaiRow;\n $params['genryou_cd'] = $genryouCds;\n $params['genryou_name'] = $genryouNames;\n $params['konritsu'] = $konritsu;\n $params['koutin'] = $koutin;\n $params['tanka_tani'] = $tankaTanni;\n $params['message'] = $message;\n $getParams = http_build_query($params);\n header(\n \"Location: http://192.168.11.199/demo/kakou_irais/edit?{$getParams}\"\n );\n }", "function _saveDo() {\n\t\tdefined('_JEXEC') or die( 'Invalid Token' );\n\t\t// Task\n\t\t$task = clm_core::$load->request_string('task');\n\t\t$tid = clm_core::$load->request_string('tid');\n\t\t$sid = clm_core::$load->request_string('sid');\n\t\t\n\t\t\n\t\t$query\t= \"DELETE FROM #__clm_turniere_teams\"\n\t\t\t. \" WHERE tid = \".$tid;\n\t\tclm_core::$db->query($query);\t\n\t\t\n\t\tfor ($y=1; $y< 100; $y++){\n\t\t\t$tln_nr\t= clm_core::$load->request_int( 'tln_nr'.$y, 100);\n\t\t\t$name\t= clm_core::$load->request_string( 'name'.$y);\n\t\t\tif ($tln_nr == 100) break;\n\t\t\tif ($tln_nr == 0) continue;\n\t\t\t$query\t= \"REPLACE INTO #__clm_turniere_teams\"\n\t\t\t\t.\" ( `tid`, `name`, `sid`, `tln_nr`, `zps`, `man_nr`, `published`) \"\n\t\t\t\t. \" VALUES (\".$tid.\",'\".$name.\"',\".$sid.\",\".$tln_nr.\", NULL, NULL, 1 )\";\n\t\t\tclm_core::$db->query($query);\t\n\t\t}\n\t\t// Log schreiben\n\t\t$clmLog = new CLMLog();\n\t\t$clmLog->aktion = JText::_('TOURNAMENT_TEAMS_EDITED');\n\t\t$clmLog->params = array('sid' => $sid, 'tid' => $tid); \n\t\t$clmLog->write();\n\t\t\n\t\t// wenn 'apply', weiterleiten in form\n\t\tif ($task == 'apply') {\n\t\t\t// Weiterleitung bleibt im Formular\n\t\t\t$this->adminLink->view = \"turteams\"; // WL in Liste\n\t\t\t$this->adminLink->more = array('turnierid' => $tid);\n\t\t} else {\n\t\t\t// Weiterleitung in Liste\n\t\t\t$this->adminLink->view = \"turplayers\"; // WL in Liste\n\t\t\t$this->adminLink->more = array('id' => $tid);\n\t\t}\n\t\n\t\treturn array(true);\n\t\n\t}", "public function save() {\n // Do not automatically set a created values for already existing entities.\n if (empty($this->created) && (!empty($this->is_new) || !$this->id)) {\n $this->created = REQUEST_TIME;\n }\n //$this->login = 'new new new';\n\n $yapdd_domain = $this->type();\n if ($yapdd_domain->supportsRevisions()) {\n $this->is_new_revision = isset($this->options) && !empty($this->options['create_revision']);\n }\n $this->changed = REQUEST_TIME;\n\n parent::save();\n }", "function Save(){\r\n\t\t//ltxt::print_r($_POST);\r\n\t\t//$this->db->debug(2);\r\n\t\tif($pk = $this->db->arecSave('tblbudget_init_year',$_POST)){\t\r\n\t\t\tLTXT::_( '?mod='.LURL::dotPage($this->RedirectPage), 'redirect' );\r\n\t\t}else{\r\n\t\t\techo ltxt::_('Error!','jalert');\r\n\t\t}\r\n\r\n\t}", "public function save(){\n\t\t$post = Zend_Registry::get('post');\n\t\tif(isset($post->pk_aluno)){\n\t\t\t$where = $this->getAdapter()->quoteInto('pk_aluno = ?', $post->pk_aluno);\n\t\t\t$data = array();\n\t\t\t$this->update($data,$where);\n\t\t}else{\n\t\t\t\t$data = array();\n\t\t\t\t$this->insert($data);\n\t\t\t};\n\t}", "public function saveAction()\n {\n\n if (!$this->request->isPost()) {\n $this->dispatcher->forward(array(\n 'controller' => \"report_jouken_meisai_mrs\",\n 'action' => 'index'\n ));\n\n return;\n }\n\n $id = $this->request->getPost(\"id\");\n $report_jouken_meisai_mr = ReportJoukenMeisaiMrs::findFirstByid($id);\n\n if (!$report_jouken_meisai_mr) {\n $this->flash->error(\"レポート条件明細が見つからなくなりました。\" . $id);\n\n $this->dispatcher->forward(array(\n 'controller' => \"report_jouken_meisai_mrs\",\n 'action' => 'index'\n ));\n\n return;\n }\n\n if ($report_jouken_meisai_mr->updated !== $this->request->getPost(\"updated\")) {\n $this->flash->error(\"他のプロセスからレポート条件明細が変更されたため更新を中止しました。\"\n . $id . \",uid=\" . $report_jouken_meisai_mr->kousin_user_id . \" tb=\" . $report_jouken_meisai_mr->updated .\" pt=\" . $this->request->getPost(\"updated\"));\n\n $this->dispatcher->forward(array(\n 'controller' => \"report_jouken_meisai_mrs\",\n 'action' => 'edit',\n 'params' => array($id)\n ));\n\n return;\n }\n\n $post_flds = [];\n $post_flds = [\"cd\",\n \"name\",\n \"report_jouken_mr_id\",\n \"jun\",\n \"koumoku_mr_cd\",\n \"sortkeys\",\n \"grouping_kbn\",\n \"siyou_kbn\",\n \"henshuu_cd\",\n \"shousuu\",\n \"zero_flg\",\n \"align\",\n \"updated\",\n ];\n \n\n $thisPost=[]; // カンマ編集を消すとか日付編集0000-00-00を入れるとか$thisPost[]で行う\n $chg_flg = 0;\n foreach ($post_flds as $post_fld) {\n if ((array_key_exists($post_fld, $thisPost)?$thisPost[$post_fld]:$this->request->getPost($post_fld)) !== $report_jouken_meisai_mr->$post_fld) {\n $chg_flg = 1;\n break;\n }\n }\n if ($chg_flg === 0) {\n $this->flash->error(\"変更がありません。\" . $id);\n\n $this->dispatcher->forward(array(\n \"controller\" => \"report_jouken_meisai_mrs\",\n \"action\" => \"edit\",\n \"params\" => array($report_jouken_meisai_mr->id)\n ));\n\n return;\n }\n\n $this->_bakOut($report_jouken_meisai_mr);\n\n foreach ($post_flds as $post_fld) {\n $report_jouken_meisai_mr->$post_fld = array_key_exists($post_fld, $thisPost)?$thisPost[$post_fld]:$this->request->getPost($post_fld);\n }\n\n if (!$report_jouken_meisai_mr->save()) {\n\n foreach ($report_jouken_meisai_mr->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n $this->dispatcher->forward(array(\n 'controller' => \"report_jouken_meisai_mrs\",\n 'action' => 'edit',\n 'params' => array($id)\n ));\n\n return;\n }\n\n $this->flash->success(\"レポート条件明細の情報を更新しました。\");\n\n $this->dispatcher->forward(array(\n 'controller' => \"report_jouken_meisai_mrs\",\n 'action' => 'edit',\n 'params' => array($report_jouken_meisai_mr->id)\n ));\n }", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "function update()\n {\n\t$mtnWorkOrderType = Doctrine_Core::getTable('MtnWorkOrderType')->find($this->input->post('mtn_work_order_type_id'));\n\n\t$mtnWorkOrderType['mtn_work_order_type_name'] = $this->input->post('mtn_work_order_type_name');\n\t$mtnWorkOrderType['mtn_work_order_type_duration'] = $this->input->post('mtn_work_order_type_duration');\n\t$mtnWorkOrderType->save();\n\techo '{\"success\": true}';\n }", "public function editSaveSortir($data) {\n\t $postData2 = array('idpt' => '0' );\n $this->db->update('lit', $postData2, \"id = \".$this->numlit($data['id']).\"\");\n\t\t\t\n\t\t\t$postData = array(\n\t\t\t'SORT' => $this->dateFR2US($data['SORT']),\n\t\t\t'HSORT' => $data['HSORT'], \n\t\t\t'MSORT' => $data['MSORT']\n );\n // echo '<pre>';print_r ($postData);echo '<pre>'; \n $this->db->update('naissance', $postData, \"id =\" . $data['id'] . \"\");\n\t return $last_id = $data['id'];\n\t\n\t}", "function save()\n\t{\n\t\tif($this->_modified)\n\t\t\t$this->_update();\n\t}", "public function save() {\r\n //daca NU se face INSERT\r\n if($this->getId() == true){\r\n $this->update();\r\n }else {\r\n $this->insert();\r\n }\r\n }", "public function save()\n {\n $data = $this->getLoadedData($this);\n $setData = [];\n foreach ($data as $key => $value) {\n if(!is_null($value)) {\n $setData[] = \"{$key} = '$value'\";\n }\n else{\n $setData[] = \"{$key} = NULL\";\n }\n }\n if($this->editable) {\n $this->sql = \"UPDATE {$this->table} SET \".implode(', ', $setData).\" WHERE {$this->pk} = {$this->{$this->pk}}\";\n }\n else {\n $this->sql = \"INSERT INTO {$this->table} SET \".implode(', ', $setData);\n }\n\n $this->db->query($this->sql);\n\n if(!$this->editable) {\n $this->{$this->pk} = $this->db->insert_id();\n $this->editable = true;\n }\n\n $this->resetVars();\n return true;\n }", "public function save_edit($ID)\r\n {\r\n\r\n unset($_POST['public_date']);\r\n $_POST['public_date_act'] = \"\";\r\n\r\n $toke = $this -> confi['admin']['private']['toke']['db'];\r\n \r\n return \"UPDATE \" . $this -> table . \" SET \" . rtrim($this -> make_query(), \",\") . \" WHERE \" . $toke . \"=$ID\";\r\n }", "public function alterarDadoAtividade(){\n\t\t$codigoAtividade = $this->post(\"codigoAtividade\");\n\t\t$nome = $this->post(\"nome\");\n\t\t$cargaHoraria = $this->post(\"cargaHoraria\");\n\t\t$horarioInicio = $this->post(\"horarioInicio\");\n\t\t$horarioTermino = $this->post(\"horarioTermino\");\n\t\t$local = $this->post(\"local\");\n\t\tif($local == 1){\n\t\t\t$local = \"Campus Santo Antônio\";\n\t\t}else{\n\t\t\t$local = \"SENAI\";\n\t\t}\n\t\t$preponente = $this->post(\"preponente\");\n\t\t$descricao = $this->post(\"descricao\");\n\t\t$dataNova = explode(\"/\", $this->post(\"dataInicio\"));\n\t\t$dataInicio = $dataNova[2].\"-\".$dataNova[1].\"-\".$dataNova[0];\t//Data yyyy-mm-dd\n\t\t$dataNova = explode(\"/\", $this->post(\"dataTermino\"));\n\t\t$dataTermino = $dataNova[2].\"-\".$dataNova[1].\"-\".$dataNova[0];\t//Data yyyy-mm-dd\n\t\t$vagas = $this->post(\"vagas\");\n\t\t$set = \"nome = '\".$nome.\"',horario_inicio ='\".$horarioInicio.\"',horario_termino ='\".$horarioTermino.\"',local ='\".$local.\"',descricao ='\".$descricao.\"',carga_horaria ='\".$cargaHoraria.\"',nome_preponente ='\".$preponente.\"',data_inicio ='\".$dataInicio.\"',data_termino ='\".$dataTermino.\"',n_vagas ='\".$vagas.\"'\";\n\t\t$tabela = \"atividades\";\n\t\t$condicao = \"id_atividade = '\".$codigoAtividade.\"' \";\n\t\t$this->update($tabela,$set,$condicao);\n\t\t$set = \"fila_de_espera = 0\";\n\t\t$tabela = \"participante_atividade\";\n\t\t$condicao = \"fid_atividade = '\".$codigoAtividade.\"' ORDER BY data_cadastro,id_relacao_inscrito_atividade LIMIT \".$vagas;\n\t\tif ($this->update($tabela,$set,$condicao)){\n\t\t\treturn 1;\n\t\t}else{\n\t\t\treturn 0;\n\t\t}\n\t}", "public function newSave(){\n\t\t\n\t\t$state = false;\n\t\t$theData = $this->newData;\n\t\t$theUpdateData = $this->newUpdateData;\n\n\t\t$isExist = $this->newExists();\n\t\tif ($isExist){\n\t\t\t$setString = \"\";\n\t\t\t$isFirst = true;\n\t\t\tforeach ($theUpdateData as $key=>$value){\n\t\t\t\t$space = \",\";\n\t\t\t\tif ($isFirst){\n\t\t\t\t\t$isFirst = false;\n\t\t\t\t\t$space = \"\";\n\t\t\t\t}\n\t\t\t\t$setValueStr = $value;\n\t\t\t\tif ($key == 'auditorname' || $key == 'contentauditnote'){\n\t\t\t\t\t$setValueStr = \"'\".$value.\"'\";\n\t\t\t\t}\n\t\t\t\telseif ($key == 'taskauditdate'){\n\t\t\t\t\t//$setValueStr = \"to_timestamp('\".$value.\"','yyyy-mm-dd hh24:mi:ss.ff')\";\n\t\t\t\t\t$setValueStr= \"timestamp(char('$value'))\";\n\t\t\t\t}\n\n\t\t\t\t$setString = $setString.$space.$key.\"=\".$setValueStr;\n\t\t\t}\n\n\t\t\t$sqlStr = \"update et_nmpgmauditliststep\n\t\t\t\t\t set \".$setString.\"\t\t\t\t\t \n\t\t\t\t\t where taskid=\".$theData['taskid'].\" and auditlevel=\".$theData['auditlevel'];\n\t\t\t$state = $this->newSetData(ChangeEncode::changeEncodeFromUTF8($sqlStr));\n\t\t}\n\t\telse {\n\t\t\t$keyString = \"\";\n\t\t\t$valueString = \"\";\n\t\t\t$isFirst = true;\n\t\t\tforeach ($theData as $key=>$value){\n\t\t\t\t$space = \",\";\n\t\t\t\tif ($isFirst){\n\t\t\t\t\t$isFirst = false;\n\t\t\t\t\t$space = \"\";\n\t\t\t\t}\n\t\t\t\t$keyString = $keyString.$space.$key;\n\n\t\t\t\t$valueStr=$value;\n\t\t\t\tif ($key == 'auditorname' || $key == 'contentauditnote'){\n\t\t\t\t\t$valueStr = \"'\".$value.\"'\";\n\t\t\t\t}\n\t\t\t\telseif ($key == 'taskauditdate'){\n\t\t\t\t\t//$valueStr = \"to_timestamp('\".$value.\"','yyyy-mm-dd hh24:mi:ss.ff')\";\n\t\t\t\t\t$valueStr = \"timestamp(char('$value'))\";\n\t\t\t\t}\n\t\t\t\t$valueString = $valueString.$space.$valueStr;\n\t\t\t}\n\t\t\t$sqlStr = \"insert into\n\t\t\t\t\t et_nmpgmauditliststep(\".$keyString.\") \n\t\t\t\t\t values(\".$valueString.\")\";\n\t\t\t$state = $this->newSetData(ChangeEncode::changeEncodeFromUTF8($sqlStr));\n\t\t}\n\t\treturn $state;\n\t}", "public function Save(){\n\tif ($this->id == NULL){ \t\t//new schedule\n\t\t// SQL INSERT\n\t\t$query = \"INSERT INTO shelter(name, info, did) VALUES('$this->name','$this->info','$this->day');\";\n\t\t// echo $query;\n\t\t$result = mysql_query($query);\n\n\t}else{ \t\t\t\t\t\t//existing schedule\n\t\t// SQL UPDATE\n\t\t$query = \"UPDATE shelter SET name='$this->name', info='$this->info', did='$this->day'WHERE shid='$this->id';\";\n\t\t$result = mysql_query($query);\n\t}\n\tif(!$result){\n\t\treturn false;\t\n\t}else{\n\t\t$this->id = mysql_insert_id();\n\t\treturn true;\n\t}\n }", "function saveEditUtilizacion(){\r\n\t\t$r = $this->dr->updateUtilizacion($this->id,$this->operador,$this->fecha,$this->condicion,$this->aprobado,$this->autorizacion,\r\n\t\t\t\t\t\t\t\t\t\t$this->comunicado,$this->comentarios);\r\n\t\tif($r=='true'){\r\n\t\t\t$msg = UTILIZACION_EDITADO;\r\n\t\t}else{\r\n\t\t\t$msg = ERROR_EDIT_UTILIZACION;\r\n\t\t}\r\n\t\treturn $msg;\r\n\t}", "public function save_edit_essay($data)\n {\n $id=$data['id'];\n $data=$this->input->post();\n $que=$this->input->post('question');\n $Name = array(\n 'branch' => $data['branch'],\n 'class' => $data['class'],\n 'subject' => $data['subject'],\n 'chapter' => $data['chapter'],\n 'level' => $data['level'],\n 'essay' => $que,\n );\n $this->db->where('id',$id);\n return $this->db->update('general_questions',$Name);\n }", "public function saveEditCliente($datos){\n $util = new Utilitarios();\n date_default_timezone_set('America/La_Paz');\n $fecha_actual = date(\"y-m-d H:i:s\");\n $valor['vent_cli_usr_baja'] = $_SESSION['login'];\n $valor['vent_cli_fch_hr_baja'] = $fecha_actual;\n $condicion = \"vent_cli_cod_unico='\".$datos['id_unico_cliente'].\"'\";\n $this->mysql->update('vent_cliente', $valor, $condicion);\n //print_r($datos);\n $valores['vent_cli_id']=NULL;\n $valores['vent_cli_cod_unico']=$datos['id_unico_cliente'];\n $valores['vent_cli_codigo_cliente']=$datos['codigo_cliente'];\n $valores['vent_cli_nombre']=strtoupper($datos['txt_vent_nombre_cliente_edit']);\n $valores['vent_cli_apellido_pat']=strtoupper($datos['txt_vent_apellido_pat_cliente_edit']);\n $valores['vent_cli_apellido_mat']=strtoupper($datos['txt_vent_apellido_mat_cliente_edit']);\n $valores['vent_cli_empresa_trab']=strtoupper($datos['txt_vent_empresa_cliente_edit']);\n $fecha_nueva = $util->cambiaf_a_mysql($datos['txt_vent_cliente_fecha_nac_edit']);\n $valores['vent_cli_fch_nac'] = $fecha_nueva;\n $valores['vent_cli_direccion']=strtoupper($datos['txt_area_vent_dirrecion_cliente_edit']);\n $valores['vent_cli_persona_cont']=strtoupper($datos['txt_vent_cliente_persona_contacto_edit']);\n $valores['vent_cli_cargo']=strtoupper($datos['txt_vent_cargo_cliente_edit']);\n $valores['vent_cli_departamento_cargo']=strtoupper($datos['txt_vent_departamento_cliente_edit']);\n $valores['vent_cli_telefono']=$datos['txt_vent_telefono_cliente_edit'];\n $valores['vent_cli_interno']=$datos['txt_vent_numero_interno_edit'];\n $valores['vent_cli_celular']=$datos['txt_vent_celular_cliente_edit'];\n $valores['vent_cli_correo']=$datos['txt_vent_cliente_correo_edit'];\n $valores['vent_cli_nit']=$datos['txt_vent_nit_cliente_edit'];\n $valores['vent_cli_razon_fact']=strtoupper($datos['txt_vent_razon_social_cliente_edit']);\n $valores['vent_cli_usr_alta']=$_SESSION['login'];\n // print_r($valores);\n // echo $util->cambiaf_a_mysql($datos['txt_vent_cliente_fecha_nac_edit']);\n return $this->mysql->insert('vent_cliente', $valores);\n }", "public function saveAction()\n {\n\n if (!$this->request->isPost()) {\n $this->dispatcher->forward(array(\n 'controller' => \"zaiko_hyouka_kbns\",\n 'action' => 'index'\n ));\n\n return;\n }\n\n $id = $this->request->getPost(\"id\");\n $zaiko_hyouka_kbn = ZaikoHyoukaKbns::findFirstByid($id);\n\n if (!$zaiko_hyouka_kbn) {\n $this->flash->error(\"在庫評価方法が見つからなくなりました。\" . $id);\n\n $this->dispatcher->forward(array(\n 'controller' => \"zaiko_hyouka_kbns\",\n 'action' => 'index'\n ));\n\n return;\n }\n\n $post_flds = [\"cd\",\"name\",\"updated\",];\n $chg_flg = 0;\n foreach ($post_flds as $post_fld) {\n if ($zaiko_hyouka_kbn->$post_fld != $this->request->getPost($post_fld)) {$chg_flg = 1; break;}\n }\n if ($chg_flg === 0) {\n $this->flash->error(\"変更がありません。\" . $id);\n\n $this->dispatcher->forward(array(\n \"controller\" => \"zaiko_hyouka_kbns\",\n \"action\" => \"edit\",\n \"params\" => array($zaiko_hyouka_kbn->id)\n ));\n\n return;\n }\n\n $this->_bakOut($zaiko_hyouka_kbn);\n\n foreach ($post_flds as $post_fld) {\n $zaiko_hyouka_kbn->$post_fld = $this->request->getPost($post_fld);\n }\n \n\n if (!$zaiko_hyouka_kbn->save()) {\n\n foreach ($zaiko_hyouka_kbn->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n $this->dispatcher->forward(array(\n 'controller' => \"zaiko_hyouka_kbns\",\n 'action' => 'edit',\n 'params' => array($id)\n ));\n\n return;\n }\n\n $this->flash->success(\"在庫評価方法の情報を更新しました。\");\n\n $this->dispatcher->forward(array(\n 'controller' => \"zaiko_hyouka_kbns\",\n 'action' => 'edit',\n 'params' => array($zaiko_hyouka_kbn->id)\n ));\n }", "function saveEditRiesgo(){\r\n\t\t$r = $this->cc->updateRiesgo($this->id,$this->descripcion,$this->fecha_deteccion,$this->estrategia,$this->impacto,$this->probabilidad,$this->categoria,$this->alcance,$this->estado);\r\n\t\tif($r=='true'){\r\n\t\t\t$msg = RIESGO_EDITADO;\r\n\t\t}else{\r\n\t\t\t$msg = ERROR_EDIT_RIESGO;\r\n\t\t}\r\n\t\treturn $msg;\t\r\n\t}", "public function putUpdateData()\n\t{\n\t\t$sDate = str_replace(\"/\",\"-\", Input::get('saved_date'));\n\t\t$sDate = date('Y-m-d', strtotime($sDate));\n\n\t\t$date = date('Y-m-d');\n\n\t\t$timezone = 'Europe/Oslo';\n\t\tdate_default_timezone_set($timezone);\n\t\t$time = strftime('%H:%M:%S');\n\n\t\t$chlog = new ChangeLog;\n\t\t$chlog->routine_id = Input::get('id');\n\t\t$chlog->title = Input::get('title');\n\t\t$chlog->value_old = Input::get('value_old');\n\t\t$chlog->value_new = Input::get('value');\n\t\t$chlog->action = 'Redigert';\n\t\t$chlog->changed_at = $date;\n\t\t$chlog->date = $sDate;\n\t\t$chlog->time = $time;\n\t\t$chlog->changed_by = Input::get('changed_by');\n\t\t$chlog->save();\n\n\t\tRoutine::find(Input::get('id'))->update(array(\n\t\t\t'value' => Input::get('value'),\n\t\t\t'date' => date('Y-m-d', strtotime(str_replace('/','-', Input::get('date')))),\n\t\t\t'time' => Input::get('time'),\n\t\t\t'emp_id' => Input::get('emp')\n\t\t));\n\n\t\treturn Redirect::route('sok')\n\t\t->with('message', 'Endringer er lagret!');\n\t}", "function save() {\n\t\tglobal $ACCESS, $UUID, $USER;\n\t\t$expt = strtotime($this->obj->exp_date);\n\t\tif( !$ACCESS && ($expt === FALSE || $expt > strtotime($USER->exp_date)) ) $this->obj->exp_date = $USER->exp_date;\n\t\t$sql = \"update opportunities set `o_facility`=\".chknul($this->obj->o_facility).\", `o_city`=\".chknul($this->obj->o_city).\n\t\t\t\", `o_state`='\".$this->obj->o_state.\"', `o_zip`=\".chknul($this->obj->o_zip).\n\t\t\t\", `practice_type`=\".chknul($this->obj->practice_type).\", `status`=\".$this->obj->status.\n\t\t\t\", `o_commu2`=\".chknul($this->obj->o_commu2).\", `o_underserved`=\".$this->obj->o_underserved.\n\t\t\t\", `description`=\".chknul($this->obj->description).\", `o_name`=\".chknul($this->obj->o_name).\n\t\t\t\", `show_state`=\".$this->obj->show_state.\", `specialty`='\".$this->obj->specialty.\n\t\t\t\"', `avail_date`=\".chknul($this->obj->avail_date).\", `o_salaryother`=\".chknul($this->obj->o_salaryother).\n\t\t\t\", `partnership`=\".$this->obj->partnership.\", `partner_other`=\".chknul($this->obj->partner_other).\n\t\t\t\", `buy_in`=\".$this->obj->buy_in.\", `bonus_sign`=\".$this->obj->bonus_sign.\n\t\t\t\", `bonus_prod`=\".$this->obj->bonus_prod.\", `relocation`=\".$this->obj->relocation.\n\t\t\t\", `vacation_wks`=\".chknul($this->obj->vacation_wks).\", `benefits`=\".chknul($this->obj->benefits).\n\t\t\t\", `malpractice`=\".chknul($this->obj->malpractice).\", `notifications`=\".$this->obj->notifications.\n\t\t\t\", `o_email`=\".chknul($this->obj->o_email).\", `o_contact`=\".chknul($this->obj->o_contact).\n\t\t\t\", `o_phone`=\".chknul($this->obj->o_phone).\", `o_title`=\".chknul($this->obj->o_title).\n\t\t\t\", `o_fax`=\".chknul($this->obj->o_fax).\", `exp_date`=\".chknul($this->obj->exp_date).\n\t\t\t\", `o_lid`=\".$this->obj->o_lid.\n\t\t\t\", `o_usermod`= $UUID where oid = \".$this->obj->oid;\n\t\t$result = $this->cdb->query($sql);\n\t\tif( !$result ) throw new Exception(DEBUG?\"{$this->cdb->error}: $sql\":'Can not update record',__LINE__);\n\t\t// now do ratingop\n\t\tif( $this->obj->status == 1 ) {\n\t\t\t$res1 = $this->cdb->query(\"select * from ratings where r_oid = \".$this->obj->oid.\" LIMIT 0,1\");\n\t\t\tif( $res1->num_rows == 0 ) {\n\t\t\t\t$this->cdb->query(\"insert ratingop (roid,ro_spec) values(\".$this->obj->oid.\",'\".$this->obj->specialty.\"') ON DUPLICATE KEY UPDATE ro_spec='\".$this->obj->specialty.\"'\");\n\t\t\t\t// no error check\n\t\t\t\t$this->cdb->query(\"insert ratings select rdid,\".$this->obj->oid.\", 0 from ratingdoc where rd_spec = '\".$this->obj->specialty.\"'\");\n\t\t\t}\n\t\t\t$res1->free();\n\t\t\t$this->ratecalc();\n\t\t\t$this->rerate();\n\t\t} // status == 1\n\t\telse $this->specswap(); // delete ratings for all other statuses\n\t}", "function save(){\n\t\tif (isset($this->id) && !$this->_new) {\n\t\t\t$sql = \"UPDATE `tour_poi` set \";\n\t\t\t$i = 0;\n\t\t\tforeach($this->UPDATE as $u){\n\t\t\t\tif ($i>0) $sql = $sql.\" , \";\n\t\t\t\t$sql = $sql.$u;\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t$sql = $sql.\" WHERE `id`='\".addslashes($this->id).\"'\";\n\t\t}else{\n\t\t\t$sql = \"INSERT into `tour_poi` values('\".addslashes($this->id).\"' , '\".addslashes($this->tid).\"' , '\".addslashes($this->lid).\"' , '\".addslashes($this->order).\"')\";\n\t\t}\n\t\t$this->connection->send_query($sql);\n\t}", "function save(){\n $this->data['last_change'] = db_Wrap::getTimestampTz();\n if(parent::save(\"sotf_programmes\",\"id\")) {\n return $this->saveMetadataFile();\n } else\n return false;\n }", "public function save()\n {\n parent::save();\n\n $checked = isset($_POST['iHotOffer']);\n $this->setEntry((int)$checked);\n }", "private function _saveSubmitDemI()\n\t{\n\t\t\t// si on a un envois valide, on lance la sauvegarde\n\t\tif( $this->_checkSubmitDemI())\n\t\t{\n\t\t\t\t// on traite la date\n\t\t\t$dateDemande = date_create();\n\n\t\t\t$_POST['dateDemande'] = $dateDemande->format('Y-m-d');\n\n\t\t\t$uneNewDemande = $this->odbDemandeInter->creerUneDemande(\n\t\t\t\t$_POST['vel_num'],\n\t\t\t\t$_POST['dateDemande'],\n\t\t\t\t$_SESSION['user']->getMatricule(),\n\t\t\t\t$_POST['cpteRendu']\n\t\t\t\t);\n\n\t\t\t\t/** si on a un nombre de ligne >0 et donc TRUE */\n\t\t\tif ($uneNewDemande)\n\t\t\t{\n\t\t\t\t$idDemande = $this->odbDemandeInter->getIdLastDemandeInter();\n\t\t\t\t$_SESSION['tampon']['success'][] =\n\t\t\t\t\t'Ajout de la demande n°'.$idDemande.' r&eacute;ussie !';\n\t\t\t\t\t// on redirige vers la page d'affichage des demandes\n\t\t\t\theader('Location:index.php?page=intervention&action=unedemandeinter&valeur='.$idDemande);\n\t\t\t\tdie; // on stop le chargement de la page\n\t\t\t}\n\t\t\telse // sinon on charge une erreur\n\t\t\t\tthrowError('Erreur avec l\\'ajout de la demande sur le v&eacute; n°'.$_POST['vel_num']);\n\n\t\t}\n\n\t}", "public function editSave()\n {\n oeuvreModel::updateOeuvre();\n Redirect::to('oeuvre');\n }", "public function save(){}", "public function update(Request $ii)\n {\n if (isset($_POST['btnActualizarSopoTipo'])) {\n $ii = $_REQUEST['ii'];\n $nuevoNombreSoporteTipo = $_POST['txtEditNombreSoporteTipo'];\n $Actualizado = date(\"Y-m-d H:i:s\");\n\n $affected = DB::table('soportetipo')\n ->where('soportetipoid', $ii)\n ->update(['soportetipo_name' => $nuevoNombreSoporteTipo,'updated_at' => $Actualizado]);\n\n echo \"<script>\n alert('EXITO: Los datos ya fueron actualizados');\n window.location.href='/st';\n </script>\"; \n } else {\n echo \"<script>\n alert('ERROR: favor intentarlo de nuevo');\n window.location.href='/st';\n </script>\";\n }\n }", "public function saveAction()\n {\n\n if (!$this->request->isPost()) {\n $this->dispatcher->forward(array(\n 'controller' => \"table_mrs\",\n 'action' => 'index'\n ));\n\n return;\n }\n\n $id = $this->request->getPost(\"id\");\n $table_mr = TableMrs::findFirstByid($id);\n\n if (!$table_mr) {\n $this->flash->error(\"テーブルマスタが見つからなくなりました。\" . $id);\n\n $this->dispatcher->forward(array(\n 'controller' => \"table_mrs\",\n 'action' => 'index'\n ));\n\n return;\n }\n\n if ($table_mr->updated !== $this->request->getPost(\"updated\")) {\n $this->flash->error(\"他のプロセスからテーブルマスタが変更されたため更新を中止しました。\"\n . $id . \",uid=\" . $table_mr->kousin_user_id . \" tb=\" . $table_mr->updated .\" pt=\" . $this->request->getPost(\"updated\"));\n\n $this->dispatcher->forward(array(\n 'controller' => \"table_mrs\",\n 'action' => 'edit',\n 'params' => array($id)\n ));\n\n return;\n }\n\n $post_flds = [];\n $post_flds = [\"cd\",\n \"name\",\n \"database_cd\",\n \"jun\",\n \"menu_group_mr_cd\",\n \"updated\",\n ];\n \n\n $thisPost=[];\n $chg_flg = 0;\n foreach ($post_flds as $post_fld) {\n if ((array_key_exists($post_fld, $thisPost)?$thisPost[$post_fld]:$this->request->getPost($post_fld)) !== $table_mr->$post_fld) {\n $chg_flg = 1;\n break;\n }\n }\n if ($chg_flg === 0) {\n $this->flash->error(\"変更がありません。\" . $id);\n\n $this->dispatcher->forward(array(\n \"controller\" => \"table_mrs\",\n \"action\" => \"edit\",\n \"params\" => array($table_mr->id)\n ));\n\n return;\n }\n\n $this->_bakOut($table_mr);\n\n foreach ($post_flds as $post_fld) {\n $table_mr->$post_fld = array_key_exists($post_fld, $thisPost)?$thisPost[$post_fld]:$this->request->getPost($post_fld);\n }\n\n if (!$table_mr->save()) {\n\n foreach ($table_mr->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n $this->dispatcher->forward(array(\n 'controller' => \"table_mrs\",\n 'action' => 'edit',\n 'params' => array($id)\n ));\n\n return;\n }\n\n $this->flash->success(\"テーブルマスタの情報を更新しました。\");\n\n $this->dispatcher->forward(array(\n 'controller' => \"table_mrs\",\n 'action' => 'edit',\n 'params' => array($table_mr->id)\n ));\n }", "private function save()\n {\n if (!isset($_REQUEST['episode_asset'])) {\n return;\n }\n\n $episode_asset = \\Podlove\\Model\\EpisodeAsset::find_by_id($_REQUEST['episode_asset']);\n $episode_asset->update_attributes($_POST['podlove_episode_asset']);\n\n if (isset($_POST['submit_and_stay'])) {\n $this->redirect('edit', $episode_asset->id);\n } else {\n $this->redirect('index', $episode_asset->id);\n }\n }", "function hsk_save( $post_id ) {\n \n // Checks save status - overcome autosave, etc.\n $is_autosave = wp_is_post_autosave( $post_id );\n $is_revision = wp_is_post_revision( $post_id );\n $is_valid_nonce = ( isset( $_POST[ 'hsk-talent-nonce' ] ) && wp_verify_nonce( $_POST[ 'hsk-talent-nonce' ], basename( __FILE__ ) ) ) ? 'true' : 'false';\n // Exits script depending on save status\n if ( $is_autosave || $is_revision || !$is_valid_nonce ) {\n return;\n } \n\t// Checks for input and saves - save checked as yes and unchecked at no\n\tif( isset( $_POST[ 'featured-talent' ] ) ) {\n\t update_post_meta( $post_id, 'featured-talent', 'yes' );\n\t} else {\n\t update_post_meta( $post_id, 'featured-talent', 'no' );\n\t}\n \n}", "public function save() {}", "public function save() {}", "public function save() {}", "public function save() {}", "public function save() {}", "public function save() {}", "public function save() {}", "public function save() {}", "public function save() {}", "public function save() {}", "public function save() {}", "public function save() {}", "public function save() {}", "public function save() {}", "public function save() {}", "public function save() {}", "public function save() {}", "public function save() {}", "public function save() {}", "public function save() {}", "public function save() {}", "public function save() {}", "public function save() {}", "public function save() {}" ]
[ "0.7359927", "0.7008147", "0.6988485", "0.6497525", "0.6470089", "0.6374668", "0.63636273", "0.63527966", "0.6346124", "0.63358676", "0.6332851", "0.63045454", "0.6301596", "0.62954235", "0.6268004", "0.62421846", "0.61994153", "0.6196336", "0.6193997", "0.6185865", "0.61820406", "0.6166491", "0.61533517", "0.6103074", "0.6074767", "0.60415906", "0.6009578", "0.60083544", "0.5989409", "0.5981336", "0.5980211", "0.5971666", "0.5971666", "0.5971666", "0.5971666", "0.5971666", "0.5971666", "0.5971666", "0.5971666", "0.5971666", "0.5971666", "0.5971666", "0.5971666", "0.5971666", "0.5971666", "0.5971666", "0.5971666", "0.5971666", "0.5971666", "0.5971666", "0.59673667", "0.59644914", "0.5959555", "0.5957796", "0.59566945", "0.5952774", "0.59525836", "0.59433305", "0.5941786", "0.5925555", "0.5922421", "0.59181684", "0.5915605", "0.5914936", "0.5913975", "0.5908133", "0.5907715", "0.5900832", "0.58962154", "0.58907586", "0.5887715", "0.58855605", "0.58780926", "0.5869142", "0.5864853", "0.58640003", "0.5855488", "0.5855488", "0.5855488", "0.5855488", "0.5855488", "0.5855488", "0.5855488", "0.5855488", "0.5855488", "0.5855488", "0.5855488", "0.5855488", "0.5855488", "0.5855488", "0.5855488", "0.5855488", "0.5855488", "0.5855488", "0.5855488", "0.5855488", "0.5855488", "0.5855488", "0.5855488", "0.5855488" ]
0.7407638
0
Get the list of application bootstraps
Получить список загрузок приложения
protected function bootstrap() : array { $bootstrap = [ \Roots\Acorn\Bootstrap\SageFeatures::class, \Roots\Acorn\Bootstrap\LoadConfiguration::class, \Roots\Acorn\Bootstrap\RegisterGlobals::class, \Roots\Acorn\Bootstrap\LoadBindings::class, \Roots\Acorn\Bootstrap\RegisterProviders::class, \Roots\Acorn\Bootstrap\Console::class, ]; return \apply_filters('acorn/bootstrap', $bootstrap); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBootstrap();", "public function getApplications()\n {\n $definitions = $this->container->getParameter('applications');\n $applications = array();\n foreach ($definitions as $slug => $def) {\n $application = $this->getApplication($slug);\n if ($application !== null) {\n $applications[] = $application;\n }\n }\n\n return $applications;\n }", "public static function getBootLoaders()\r\n {\r\n return self::$bootLoaders;\r\n }", "public function list_apps() {\n\t\t\treturn $this->run( 'apps' );\n\t\t}", "public static function get_app_list() {\n\t\tif (isset(ConfigManager::$cache[\"int_app_list\"]))\n\t\t\treturn ConfigManager::$cache[\"int_app_list\"];\n\t\tglobal $app_paths, $apps_list;\n\t\t$apps = array();\n\t\tforeach ($app_paths as $app_path) {\n\t\t\tforeach ($apps_list as $app) {\n\t\t\t\t$path = home_dir . $app_path . '/' . $app . '/';\n\t\t\t\tif (file_exists($path)) {\n\t\t\t\t\t$apps[] = $app_path . '/' . $app;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tConfigManager::$cache[\"int_app_list\"] = $apps;\n\t\treturn $apps;\n\t}", "public function getExecutedBootstraps()\n\t{\n\t\treturn $this->_bootstrapedModules;\n\t}", "public function getBootstrap()\n {\n return $this->_bootstrap;\n }", "protected function _getBootstrap()\n {\n $frontController = Zend_Controller_Front::getInstance();\n $bootstrap = $frontController->getParam('bootstrap');\t//deb($bootstrap);\n return $bootstrap;\n }", "public function getAppList()\n {\n return $this->adapter->get('app/list');\n }", "protected function bootstrappers()\n {\n return $this->bootstrappers;\n }", "protected function bootstrappers()\n {\n return $this->bootstrappers;\n }", "public static function getApps();", "protected static function getConfiguredApps() {}", "function get_application_list() {\n\t\t$application_list = array();\n\t\t$plugin = new plugin();\n\t\t$enabled_plugins = $plugin->enabled();\n\t\tforeach ($enabled_plugins as $index => $plugin_name) {\n\t\t\t$plugin_cloud_application_hook = $this->webdir.\"/plugins/\".$plugin_name.\"/htvcenter-\".$plugin_name.\"-cloud-application-hook.php\";\n\t\t\tif (file_exists($plugin_cloud_application_hook)) {\n\t\t\t\t$this->event->log(\"get_application_list\", $_SERVER['REQUEST_TIME'], 5, \"cloudapplication.class.php\", \"Found plugin \".$plugin_name.\" providing a Cloud-application hook.\", \"\", \"\", 0, 0, 0);\n\t\t\t\trequire_once $plugin_cloud_application_hook;\n\t\t\t\t$application_function=\"htvcenter_\".\"$plugin_name\".\"_get_cloud_applications\";\n\t\t\t\t$application_function=str_replace(\"-\", \"_\", $application_function);\n\t\t\t\t$application_array = $application_function();\n\t\t\t\tforeach ($application_array as $index => $app) {\n\t\t\t\t\t$application_list[] .= $app;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $application_list;\n\t}", "public function get_app_list() {\n\t\treturn apply_filters( 'wpcd_app_list', $this->app_list );\n\t}", "function get_mu_apps() {\n\t$mu_app = array();\n\tif ( !is_dir( application_path ) )\n\t\treturn $mu_app;\n\tif ( ! $dh = opendir( application_path ) )\n\t\treturn $mu_app;\n\twhile ( ( $app = readdir( $dh ) ) !== false ) {\t\t\n\t\tif ( !is_dir( $app ) && substr( $app, -4 ) != '.php' )\n\t\t\t$mu_app[] = application_path . '/' . $app .'/'. $app .'.php';\n\t}\n\tclosedir( $dh );\n\tsort( $mu_app );\n\t\n\treturn $mu_app;\n}", "public function getApps()\n {\n $result = [];\n foreach ($this->getNginxFiles() as $vhostFile) {\n $appname = $this->getAppName($vhostFile);\n if (!$appname) {\n continue;\n }\n\n $appdir = $this->getAppBase($vhostFile);\n if (!$appdir) {\n continue;\n }\n\n $framework = $this->getFrameworkName($appdir);\n $frameworkVersion = $this->getFrameworkVersion($appdir);\n $frameworkHuman = Inflector::humanize($framework);\n if ($frameworkHuman == 'Cakephp') {\n $frameworkHuman = 'CakePHP';\n }\n\n $result[] = [\n 'name' => $appname,\n 'framework' => $framework,\n 'framework_human' => $frameworkHuman,\n 'framework_major_version' => CakeboxUtility::getMajorVersion($frameworkVersion),\n 'framework_version' => $frameworkVersion,\n 'appdir' => $appdir,\n 'webroot' => $this->getWebrootFromSite($vhostFile)\n ];\n }\n\n return $result;\n }", "public function getBootstrap()\n {\n if( null === $this->_bootstrap ) {\n throw new Engine_Application_Exception('No bootstrap registered');\n }\n\n return $this->_bootstrap;\n }", "protected function getBootable()\r\n\t{\r\n\t\treturn array(new \\example\\ExamplePackage());\r\n\t}", "abstract public function getLaunchers();", "public function getApps()\n {\n if (array_key_exists(\"apps\", $this->_propDict)) {\n return $this->_propDict[\"apps\"];\n } else {\n return null;\n }\n }", "public function getApps()\n {\n if (array_key_exists(\"apps\", $this->_propDict)) {\n return $this->_propDict[\"apps\"];\n } else {\n return null;\n }\n }", "public function getApps()\n {\n if (array_key_exists(\"apps\", $this->_propDict)) {\n return $this->_propDict[\"apps\"];\n } else {\n return null;\n }\n }", "public function listApplications()\n {\n $runtime = new RuntimeOptions([]);\n\n return $this->listApplicationsWithOptions($runtime);\n }", "public function getWebApps() \r\n\t{\t\r\n\t\t$apps = array();\r\n\r\n\t\t$adminApp = new WebAppDefinition();\r\n\t\t$adminApp->IconUrl = 'webapps/lock.gif';\r\n\t\t$adminApp->IconCaption = 'Authorizations Import/Export';\r\n\t\t$adminApp->WebAppId = 'Admin';\r\n\t\t$adminApp->ShowWhenUnplugged = true;\r\n\t\t$apps[] = $adminApp;\r\n\r\n\r\n\t\t$adminApp = new WebAppDefinition();\r\n\t\t$adminApp->IconUrl = 'webapps/profile_32.gif';\r\n\t\t$adminApp->IconCaption = 'Access Profiles Import/Export';\r\n\t\t$adminApp->WebAppId = 'AccessProfiles';\r\n\t\t$adminApp->ShowWhenUnplugged = true;\r\n\t\t$apps[] = $adminApp;\r\n\r\n\t\treturn $apps;\r\n\t}", "function getApplicationConfigs()\n\t{\n\t\tself::verifyInitialized();\n\t\t$Config = $this->configurations['APPLICATION'];\n\t\treturn $Config;\n\t}", "public function getApplicationNames()\n {\n if (!$this->_applicationNames) {\n $this->_applicationNames = array_keys($this->getApplicationsConfig());\n }\n return $this->_applicationNames;\n }", "public function init()\n {\n $front = Zend_Controller_Front::getInstance();\n $request = new Zend_Controller_Request_Http();\n $router = $front->getRouter();\n $router->route($request);\n\n $bootstrapClass = $this->_formatModuleName($request->getModuleName()) . '_Bootstrap';\n\n require_once $front->getModuleDirectory($request->getModuleName()) . '/Bootstrap.php';\n\n $moduleBootstrap = new $bootstrapClass($this->getBootstrap());\n $moduleBootstrap->bootstrap();\n $this->_bootstraps[$request->getModuleName()] = $moduleBootstrap;\n\n return $this->_bootstraps;\n }", "public function getAppsRoots() {\n\t\treturn \\OC::$APPSROOTS;\n\t}", "function get_installed_applications() {\n $aResults = array();\n\n exec(\"/share/Apps/AppInit/appinit.cgi info\", $aInfo);\n\n $sOutput = '';\n foreach($aInfo as $sInfo) {\n $sItem = preg_replace('/(\\s+)\\\"?([^\\\",]+)\\\"?\\s*[=:]\\s*(.*)\\s*/', '$1\"$2\":$3', $sInfo);\n $sItem = preg_replace('/(.*)[=:]\\\"?([^\\\",}]+)\\\"?([^\\\"]*)/', '$1:\"$2\"$3', $sItem);\n $sOutput .= $sItem;\n }\n $sOutput = substr($sOutput, strpos($sOutput, '{'), (strrpos($sOutput, '}') + 1) - strpos($sOutput, '{'));\n\n $bFound = TRUE;\n while ($bFound) {\n $bFound = FALSE;\n $sSection = substr($sOutput, strpos($sOutput, '{'), (strpos($sOutput, '}') + 1) - strpos($sOutput, '{'));\n $sOutput = substr($sOutput, strpos($sOutput, '}') + 1);\n\n if (strlen($sSection) > 0) {\n $bFound = TRUE;\n $sJson = json_decode($sSection, true);\n\n if (!empty($sJson['name'])) {\n $oItem = new stdClass();\n $oItem->Name = $sJson['name'];\n $oItem->Version = $sJson['version'];\n $oItem->Enabled = $sJson['enabled'];\n $oItem->Started = $sJson['started'];\n\n $aResults[$oItem->Name] = $oItem;\n }\n }\n }\n\n uksort($aResults, 'strcasecmp');\n return $aResults;\n}", "function get_app_list() {\n\tglobal $_app_list_path;\n\treturn json_decode(file_get_contents($_app_list_path),true);\n}", "public function make(): array\n {\n return array_map(\n function ($bootstrapper) {\n return function (ApplicationContract $application) use ($bootstrapper) {\n return (new $bootstrapper($application))->bootstrap();\n };\n },\n $this->bootstrappers\n );\n }", "function get_bootstrap_steps() {\n\treturn array(\n\t\t'EE\\Bootstrap\\LoadUtilityFunctions',\n\t\t'EE\\Bootstrap\\LoadDispatcher',\n\t\t'EE\\Bootstrap\\DeclareMainClass',\n\t\t'EE\\Bootstrap\\DeclareAbstractBaseCommand',\n\t\t'EE\\Bootstrap\\IncludeFrameworkAutoloader',\n\t\t'EE\\Bootstrap\\ConfigureRunner',\n\t\t'EE\\Bootstrap\\InitializeColorization',\n\t\t'EE\\Bootstrap\\InitializeLogger',\n\t\t'EE\\Bootstrap\\DefineProtectedCommands',\n\t\t'EE\\Bootstrap\\LoadRequiredCommand',\n\t\t'EE\\Bootstrap\\IncludePackageAutoloader',\n\t\t'EE\\Bootstrap\\IncludeBundledAutoloader',\n\t\t'EE\\Bootstrap\\RegisterFrameworkCommands',\n\t\t'EE\\Bootstrap\\IncludeFallbackAutoloader',\n\t\t'EE\\Bootstrap\\RegisterDeferredCommands',\n\t\t'EE\\Bootstrap\\LaunchRunner',\n\t);\n}", "protected function bootstrap(): Bootstrap\n {\n return $this->di()->getBootstrap();\n }", "public function applications()\n {\n return $this->andWhere([\n Route::tableName() . '.type' => Route::TYPE_APPLICATION,\n ]);\n }", "public function &getApplications()\n {\n return $this->applications;\n }", "public function bootstrappers(): array\n {\n return array(\n LoadConfiguration::class,\n ThemeSupport::class,\n RegisterProviders::class,\n RegisterFeatures::class,\n );\n }", "public function getHomeApps() {\n\t\t// todo: security check: does this user have this role?\n\n\t\t$apps = array();\n\t\tif ($this->contextUser->type == UserTypes::Admin) {\n\t\t\t$a = $this->manager->getRoleApps(UserTypes::Student);\n\t\t\t$apps = array_merge($apps, $a);\n\t\t\t$a = $this->manager->getRoleApps(UserTypes::Teacher);\n\t\t\t$apps = array_merge($apps, $a);\n\t\t\t$a = $this->manager->getRoleApps(UserTypes::Admin);\n\t\t\t$apps = array_merge($apps, $a);\n\t\t}\n\t\telse if ($this->contextUser->type == UserTypes::Teacher) {\n\t\t\t$a = $this->manager->getRoleApps(UserTypes::Student);\n\t\t\t$apps = array_merge($apps, $a);\n\t\t\t$a = $this->manager->getRoleApps(UserTypes::Teacher);\n\t\t\t$apps = array_merge($apps, $a);\n\t\t}\n\t\telse if ($this->contextUser->type == UserTypes::Student) {\n\t\t\t$a = $this->manager->getRoleApps(UserTypes::Student);\n\t\t\t$apps = array_merge($apps, $a);\n\t\t}\n\t\t\n\t\treturn $apps;\n\t}", "final static public function listRunnableApps() {\n\t\t$incList = Container::getParsedIncludePath();\n\n\t\t$result = array();\n\t\tforeach($incList as $incItem) {\n\t\t\tif( is_readable($incItem) ) {\n\t\t\t\t$iterator = new RecursiveIteratorIterator(\n\t\t\t\tnew RecursiveDirectoryIterator($incItem),\n\t\t\t\tRecursiveIteratorIterator::LEAVES_ONLY );\n\n\t\t\t\tforeach($iterator as $item ) {\n\t\t\t\t\t//echo \"checking: $item\\n\";\n\t\t\t\t\t$className = self::getFullClassNameFromFile($item);\n\t\t\t\t\tif($className != null && Container::isClassRunnable($className)) {\n\t\t\t\t\t\t$result[] = $className;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "public function getAppLinks()\n {\n global $conf, $registry;\n\n $out = array();\n\n if (isset($conf['menu']['apps']) && is_array($conf['menu']['apps'])) {\n foreach ($conf['menu']['apps'] as $app) {\n if (!$registry->isInactive($app) &&\n $registry->hasPermission($app, Horde_Perms::SHOW)) {\n $out[] = $app;\n }\n }\n }\n\n return $out;\n }", "public function getClientsList(): array\n {\n $configDir = $this->rootDir.'/..'.\\AppKernel::CLIENTS_CONFIG_FOLDER;\n $finder = new Finder();\n $finder->in($configDir)->files()->name('*.env');\n $clients = [];\n foreach ($finder as $fileInfo) {\n $clients[] = $fileInfo->getBasename('.env');\n }\n\n return $clients;\n }", "public function getApps() {\n\n $apps = array();\n\n $app = new PcaeProyectosApps();\n $rows = $app->cargaCondicion(\"IdApp\", \"IdProyecto='{$this->Id}'\");\n unset($app);\n\n foreach ($rows as $row)\n $apps[] = new PcaeApps($row['IdApp']);\n\n return $apps;\n }", "public function getYamlApplicationEntities()\n {\n return $this->yamlMapper->getApplications();\n }", "public function getConfigurationList()\n {\n return Functions::apiClient(API_CONFIG_DOMAIN . \"/ciam/appInfo\", '', array('authentication' => 'key'));\n }", "public function getApplicationsConfig()\n {\n if (!$this->_applicationsConfig) {\n $this->_applicationsConfig = $this->getConfig()->getConfigValue(self::XPATH_APPLICATIONS);\n }\n return $this->_applicationsConfig;\n }", "public function viewApplications()\n {\n\n $url = $this->base.'applications';\n\n return self::makeAPICall('GET', $url);\n\n }", "protected function bootstrapApp()\n {\n $folder = $this->paths->getUserlandPath();\n if (!$this->files->has($folder)) {\n return;\n }\n\n $namespace = ucfirst($this->config->get('application_name'));\n\n // Load main namespace\n $classloader = new Psr4ClassLoader();\n $classloader->addPrefix($namespace.'\\\\', $folder);\n $classloader->register();\n\n // Load service provider\n $serviceProvider = $namespace.'\\\\'.$namespace.'ServiceProvider';\n if (class_exists($serviceProvider)) {\n $this->container->addServiceProvider($serviceProvider);\n }\n }", "public static function get_all_app_configs() {\n\t\t$configs = ConfigManager::$app_vars;\n\t\t$objs = App_Config::objects();\n\t\tforeach ($objs as $obj) {\n\t\t\t$app = $obj->_app->__toString();\n\t\t\tif (isset($configs[$app]) && isset($configs[$app][$obj->key])) {\n\t\t\t\t$configs[$app][$obj->key] = ConfigManager::get_app_config($app, $obj->key);\n\t\t\t}\n\t\t}\n\t\treturn $configs;\n\t}", "public function runGetListApp(){\n $list = array_diff(scandir(Constant::DIR_SRC), array('..', '.'));\n $a = 0;\n $valor=false;\n foreach ($list AS $key => $value){\n $valor[$a]=$value;\n $a++;\n }\n $dataJson['seleApps']=$valor;\n $this->json($dataJson);\n }", "public function getBoilerplates();", "public function _initBootstrap(){\n $this->_config = Yaf_Application::app()->getConfig();\n Yaf_Registry::set('application', $this->_config);\n\t\t//var_dump($this->_config['application']['rest']);\n //exit;\n }", "public function GetAllApps()\n\t{\n\t\t$result = array();\n\t\t$sql = \"Select * from languageapp where status='Active' \";\n\t\t$query = $this->db->query($sql);\n\t\tif ($query->num_rows() > 0) {\n\t\t\t$result = $query->result_array();\n\t\t}\n\t\treturn $result;\n\t}", "protected function readApplications() {\n\t\t$sql = \"SELECT\t\tusergroup.*, application.*\n\t\t\tFROM \t\twcf\".WCF_N.\"_group_application application\n\t\t\tLEFT JOIN \twcf\".WCF_N.\"_group usergroup\n\t\t\tON \t\t(usergroup.groupID = application.groupID)\n\t\t\tWHERE \t\tapplication.userID = \".WCF::getUser()->userID.\"\n\t\t\t\t\tAND application.groupID NOT IN (\".implode(',', WCF::getUser()->getGroupIDs()).\")\n\t\t\tORDER BY\tgroupName ASC\";\n\t\t$result = WCF::getDB()->sendQuery($sql);\n\t\twhile ($row = WCF::getDB()->fetchArray($result)) {\n\t\t\t$this->applications[] = $row;\n\t\t}\n\t}", "protected function kernels()\n {\n return $this->injectedKernels;\n }", "public function bootstrap(Application $application)\n {\n $application->isInstalled() && $this->manager->repository()->each(function (Extension $extension) use ($application) {\n $providers = collect($application->make('config')->get('app.providers'));\n $providers->push($extension->service());\n $application->make('config')->set('app.providers', $providers->toArray());\n });\n }", "public function getAppDatabases()\n {\n try {\n $stmt = $this->_conn->execute('SHOW DATABASES');\n $rows = Hash::extract($stmt->fetchall(), '{n}.{n}');\n $stripped = array_diff($rows, $this->databaseMeta['mysql']['system_databases']);\n $result = [];\n foreach ($stripped as $databaseName) {\n $result[] = ['name' => $databaseName];\n }\n } catch (\\Exception $e) {\n throw new \\Exception(\"Error generating database list: \" . $e->getMessage());\n }\n\n return $result;\n }", "public function getShowConfigurationManagerApps()\n {\n if (array_key_exists(\"showConfigurationManagerApps\", $this->_propDict)) {\n return $this->_propDict[\"showConfigurationManagerApps\"];\n } else {\n return null;\n }\n }", "public static function bootstrapAll()\r\n {\r\n if ($items = (new static())->getItems())\r\n {\r\n foreach ($items as $item)\r\n {\r\n $item->getClass()->bootstrap();\r\n }\r\n }\r\n \r\n return true;\r\n }", "public function index()\n {\n return $this->testService->getApps(request()->input());\n }", "public static function getAll()\n {\n $object = DB::select()->from('applications')->order_by('last_name', 'ASC')->as_object('Application');\n return $object->execute();\n }", "public function Bootstrap()\n {\n if (!$this->_bootstrap) {\n $class = $this->App() . '_Bootstrap';\n $this->_bootstrap = Enlight_Class::Instance($class, array($this));\n }\n return $this->_bootstrap;\n }", "function scan_for_new_apps() {\n $dir = scandir($this->_config->dirroot);\n $newapps = array();\n foreach($dir as $i) {\n if ($i[0] == \".\") {\n continue;\n }\n if (!in_array($i,$this->_excluded) && is_dir($i)) {\n $app = $this->_config->em->getRepository(\"App\")->findOneBy(array('path' => $i));\n if ($app) {\n //already registered\n } else {\n $newapps[] = $i;\n }\n //find out if registered already\n }\n }\n if (count($newapps) ==0 ) {\n return false;\n }\n //var_dump($newapps);\n return $newapps;\n }", "public function getApplications($repositoryRoot)\n {\n $finder = new Finder();\n $finder->in($repositoryRoot)\n ->ignoreDotFiles(false)\n ->notPath('builds')\n ->name('.platform.app.yaml')\n ->depth('> 0')\n ->depth('< 5');\n if ($finder->count() == 0) {\n return array('default' => $repositoryRoot);\n }\n $applications = array();\n /** @var \\Symfony\\Component\\Finder\\SplFileInfo $file */\n foreach ($finder as $file) {\n $filename = $file->getRealPath();\n $appRoot = dirname($filename);\n $identifier = ltrim(str_replace($repositoryRoot, '', $appRoot), '/');\n $applications[$identifier] = $appRoot;\n }\n\n return array_unique($applications);\n }", "protected function getFreshApplication()\n {\n return tap(require $this->laravel->bootstrapPath().'/app.php', function ($app) {\n $app->make(ConsoleKernelContract::class)->bootstrap();\n });\n }", "function get_registered_widgets()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $cache = new File(CLEAROS_CACHE_DIR . '/' . Dashboard_Helper::FILE_CACHE_USER_DASHBOARD_WIDGETS);\n\n if ($cache->exists())\n $lastmod = $cache->last_modified();\n else\n $lastmod = 0;\n\n if ($lastmod && (time() - $lastmod < Dashboard_Helper::CACHE_TIME_SECONDS)) {\n $raw_list = $cache->get_contents_as_array();\n\n // Don't return empty line as widget entry\n if (empty($raw_list[0]))\n return [];\n else\n return $raw_list;\n }\n\n $app_list = clearos_get_apps();\n $widget_list = [];\n\n foreach ($app_list as $meta) {\n unset($app);\n $info_file = clearos_app_base($meta['basename']) . '/deploy/info.php';\n if (!file_exists($info_file))\n continue;\n\n include($info_file);\n\n // Re-init array\n if (!isset($app['user_dashboard_widgets']))\n continue;\n\n // Check that the UI package is installed (containing widget controller)\n $software = new Software(\"app-\" . preg_replace(\"/_/\", \"-\", $app['basename']));\n\n if (!$software->is_installed())\n continue;\n\n $widget_list = array_merge_recursive($widget_list, $app['user_dashboard_widgets']);\n }\n\n if (!$cache->exists())\n $cache->create('webconfig', 'webconfig', 644);\n\n $cache->dump_contents_from_array($widget_list);\n\n return $widget_list;\n }", "abstract public function bootstrapComponents();", "public function settings_components_and_apps_list() {\n \n // Gets components and apps\n (new MidrubBaseAdminCollectionUserHelpers\\Components)->settings_components_and_apps_list();\n \n }", "public function getBundles()\n {\n return $this->bundles;\n }", "public function getBundles()\n {\n return $this->bundles;\n }", "public function getAvailableBundles() : array {}", "public function getEnvironments();", "public function apps(){\r\n\t\t$this->navigationBar();\r\n\t\t$this->display(apps);\r\n\t}", "protected function getBootstrapSassJavascripts()\n {\n $process = new Process(\"gem which bootstrap-sass\");\n $process->run();\n if (!$process->isSuccessful()) {\n throw new WatcherCompileException(\n \"`bootstrap-sass` gem was not found\\n\\n\" . $process->getOutput()\n );\n }\n\n $gemPath = trim($process->getOutput());\n $bjsRootPath = dirname(dirname($gemPath)) . \"/assets/javascripts\";\n $bjsPath = $bjsRootPath . \"/bootstrap-sprockets.js\";\n $bjs = file_get_contents($bjsPath);\n\n $inputs = array();\n $matches = array();\n if (preg_match_all(\"/\\/\\/= require (.*)/i\", $bjs, $matches)) {\n foreach ($matches[1] as $asset) {\n $inputs[] = $bjsRootPath . \"/\" . $asset . \".js\";\n }\n } else {\n $inputs[] = $bjsPath;\n }\n return $inputs;\n }", "public function getBundles() {\n\t\trequire_once 'NimbusecAPI.php';\n\t\t$api = new NimbusecAPI($this->key, $this->secret, $this->server);\n\t\t$bundles = $api->findBundles();\n\t\t\n\n\t\treturn $bundles;\n\t}", "protected function getInstalledWidgets()\n {\n $installedWidgets = [];\n $widgetManager = Artificer::widgetManager();\n $widgets = $this->getOption('widgets', []);\n\n foreach ($widgets as $widget) {\n if ($widgetManager->isInstalled($widget)) {\n $installedWidgets[] = $widget;\n }\n }\n\n return $installedWidgets;\n }", "public function getApplications()\n {\n return $this->hasMany(Application::class, ['job_id' => 'id']);\n }", "public function list_apps (){\n $dirs = scandir(PRIVATE_DIRECTORY);\n $all_apps = array();\n\n foreach( $dirs as $dir )\n if ( is_dir(PRIVATE_DIRECTORY.DIRECTORY_SEPARATOR.\"$dir\") and $dir{0} != \".\" )\n $all_apps[] = $dir;\n\n sort( $all_apps, SORT_STRING );\n\n return $all_apps;\n } // end list_apps\n\n /**\n * Bulds a list with all existing objects for given app\n *\n * @name list_objects\n * @param string $app_name\n *\n * @return array list with app names\n *\n */\n public function list_objects ( $app_name ){\n $file = PRIVATE_DIRECTORY . DIRECTORY_SEPARATOR . $app_name . DIRECTORY_SEPARATOR . \"bin\" . DIRECTORY_SEPARATOR . \"$app_name.{$this->environment}.php\";\n if( file_exists( $file ) ) $content = file_get_contents($file);\n\n preg_match_all(\"|function( +){$app_name}_(.*?)( *)\\\\(|\", $content, $m );\n\n sort($m[2]);\n\n return $m[2];\n } // end list_objects\n\n }", "public function get_app($name) : array\n {\n $apps = new Collection($this->all_apps);\n return $apps->firstWhere('name', $name) ?? [];\n }", "private function getBundlesFromConfig() : array {}", "public function getAppConfig()\n {\n $ret = [\n \"appName\" => \"Mobile News App\",\n \"key1\" => 123,\n \"key2\" => \"Test value\"\n ];\n\n return $ret;\n }", "function get_deployment_plugins($application_array) {\n\t\t$deployment_plugin_list = array();\n\t\tforeach ($application_array as $index => $app) {\n\t\t\t$deployment_arr = explode(\"/\", $app);\n\t\t\tif (!in_array($deployment_arr[0], $deployment_plugin_list)) {\n\t\t\t\t$deployment_plugin_list[] .= $deployment_arr[0];\n\t\t\t}\n\t\t}\n\t\treturn $deployment_plugin_list;\n\t}", "protected function getConfigs()\n {\n return config(static::CONFIG_NAME);\n }", "protected static function system_configs() {\n return [];\n }", "public function applications()\n {\n return view('admin_applications');\n }", "function bootstrap(){\n $real_stages = [\n 'set_globals',\n 'load_database',\n 'load_modules',\n 'load_variables',\n 'load_theme',\n 'call_hook_bootstrap'\n ];\n \n $stages = ['load_files', 'set_globals', 'load_modules','set_menu', 'call_hook_bootstrap'];\n foreach($stages as $stage)\n {\n if(function_exists($stage))\n {\n $stage();\n }else{\n echo 'not found '.$stage;\n exit;\n }\n }\n}", "protected static function scInit() {\n return [];\n }", "public function getExpireApplications()\n\t{\n\t\treturn $this->expire_apps;\n\t}", "public function getExpireApplications()\n\t{\n\t\treturn $this->expire_apps;\n\t}", "static public function getAppCommands()\n {\n \\Yii::beginProfile('Scan all controllers');\n\n $commands = static::getModuleCommands(\\Yii::$app);\n sort($commands);\n $result = array_unique($commands);\n\n \\Yii::endProfile('Scan all controllers');\n\n return $result;\n }", "public function getLoadedModuleNames();", "public function getapp(){\n\t\t$this->error ='';\n\t\t$apps = array();\n\t\t\n\t\t\n\t}", "protected function _getBootstrap()\n {\n if (null === $this->_bootstrap)\n {\n $this->_bootstrap = Zend_Controller_Front::getInstance()->getParam('bootstrap');\n if (!$this->_bootstrap instanceof Zend_Application_Bootstrap_BootstrapAbstract)\n {\n throw new Glitch_Controller_Exception('Class is not a valid bootstrap instance');\n }\n }\n return $this->_bootstrap;\n }", "public function getApplication()\n {\n $app = new Application;\n foreach (Setup::getCommandClasses() as $class) {\n $app->add(new $class);\n }\n return $app;\n }", "public function appVersions()\n {\n if(empty($this->_publicPropertyArray['app_versions']))\n return array();\n else\n return $this->_publicPropertyArray['app_versions'];\n }", "public function findBundles() {}", "public static function boot()\n {\n parent::boot();\n static::bootListify();\n \n }", "public function getAll(): array\n {\n $request = $this->createRequest('GET', '/apps');\n $request = $request->withHeader('Authorization', \"Basic {$this->client->getConfig()->getUserAuthKey()}\");\n\n return $this->client->sendRequest($request);\n }", "function runApplications()\n {\n foreach ($this->applications as $appName=>$app)\n {\n if (!$this->runApplication($appName))\n {\n break;\n }\n }\n }", "public function getBootStrapPath(){\r\n\t\treturn $this->strBootStrapPath;\r\n\t}", "protected function findActiveDatabaseApplications(): array\n {\n $dbApps = [];\n\n foreach ($this->databaseApplicationDefinitions() as $appKey => $appInfo) {\n if ($appInfo['os'] === PHP_OS && isset($appInfo['locations'])) {\n $locations = $appInfo['locations'];\n\n if (!is_array($locations)) {\n $locations = [$locations];\n }\n $location = $this->getDatabaseApplicationLocation($locations);\n\n if (!isset($location)) {\n continue;\n }\n\n $dbApps[$appKey] = [\n 'label' => $appInfo['label'],\n 'execute' => $appInfo['execute'],\n 'location' => $location\n ];\n }\n }\n\n return $dbApps;\n }" ]
[ "0.7139772", "0.70901173", "0.68948233", "0.6831693", "0.6816377", "0.6769854", "0.65794414", "0.6563127", "0.6525915", "0.65220994", "0.65220994", "0.65195477", "0.651232", "0.6482783", "0.64581615", "0.6349795", "0.6340644", "0.62301755", "0.6215179", "0.62072253", "0.618117", "0.618117", "0.618117", "0.61685324", "0.61330664", "0.60415846", "0.60245806", "0.60205984", "0.597932", "0.5978235", "0.5960842", "0.59484965", "0.5928564", "0.5904069", "0.58692235", "0.58676785", "0.58513355", "0.58025587", "0.5785772", "0.5782148", "0.5777035", "0.5765409", "0.57495606", "0.5748058", "0.57432777", "0.57274395", "0.5719168", "0.5694128", "0.5672707", "0.5663776", "0.5613795", "0.5602561", "0.5596668", "0.55914694", "0.55448985", "0.55387396", "0.55258685", "0.55245197", "0.55144167", "0.55119836", "0.5509399", "0.54960454", "0.54699403", "0.5467751", "0.54659843", "0.5465917", "0.5462693", "0.545837", "0.545837", "0.54533863", "0.5445614", "0.54445326", "0.54442245", "0.54331833", "0.54291326", "0.54251695", "0.54231185", "0.5420667", "0.5414525", "0.54111296", "0.5406276", "0.5403335", "0.5398029", "0.53899175", "0.5380256", "0.5376399", "0.5374971", "0.5374971", "0.536291", "0.5361113", "0.5358529", "0.53563005", "0.5355256", "0.5351049", "0.5346904", "0.5341911", "0.53412575", "0.53408843", "0.5334048", "0.5327363" ]
0.7096404
1
/ Register User Block Types
/ Регистрация типов блоков пользователя
function register_user_block_types(){ $settings = apply_filters('acfe/block_type/prepare_register', acfe_get_settings($this->settings)); if(empty($settings)) return; foreach($settings as $name => $args){ // Bail early if(empty($name) || acf_has_block_type('acf/' . $name)) continue; // Filters $args = apply_filters("acfe/block_type/register", $args, $name); $args = apply_filters("acfe/block_type/register/name={$name}", $args, $name); if($args === false) continue; // Register acf_register_block_type($args); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register_block_type() {\n\t\tregister_block_type(\n\t\t\t$this->namespace . '/' . $this->block_name,\n\t\t\tarray(\n\t\t\t\t'editor_script' => 'wc-' . $this->block_name,\n\t\t\t\t'editor_style' => 'wc-block-editor',\n\t\t\t\t'style' => 'wc-block-style',\n\t\t\t)\n\t\t);\n\t}", "function register_acf_block_types() {\n\n // register a typeit block.\n acf_register_block_type(array(\n 'name' => 'typeit',\n 'title' => __('Type It Block'),\n 'description' => __('A custom type it style block.'),\n 'render_template' => 'views/blocks/typeit.php',\n 'category' => 'formatting',\n 'icon' => 'editor-strikethrough',\n 'keywords' => array( 'typeit', 'type-writer' ),\n ));\n\n // register a ck module block.\n acf_register_block_type(array(\n 'name' => 'ck_module',\n 'title' => __('CK Module'),\n 'description' => __('A custom CK get to know me bill block.'),\n 'render_template' => 'views/blocks/ck.php',\n 'category' => 'common',\n 'icon' => 'welcome-widgets-menus',\n 'keywords' => array( 'Clayton', 'Kreisel' ),\n ));\n\n }", "function register_acf_block_types_userpage() {\n acf_register_block_type(array(\n 'name' => 'sedoo_userpage',\n 'title' => __('Userpage'),\n 'description' => __('Ajoute un élément userpage'),\n 'render_callback' => 'sedoo_blocks_userpage_render_callback',\n 'category' => 'widgets',\n 'icon' => 'admin-comments',\n 'keywords' => array( 'userpage', 'sedoo' ),\n ));\n}", "public function registerBlocks()\n {\n foreach ($this->customBlocks as $blockName) {\n register_block_type('theme/' . $blockName, []);\n }\n }", "function register_block() {\n\tregister_block_type(\n\t\tBLOCK_NAME,\n\t\t[\n\t\t\t'apiVersion' => 2,\n\t\t\t'render_callback' => __NAMESPACE__ . '\\\\render_block',\n\t\t\t'attributes' => [\n\t\t\t\t'post_id' => [\n\t\t\t\t\t'type' => 'integer',\n\t\t\t\t],\n\t\t\t\t'is_featured' => [\n\t\t\t\t\t'type' => 'boolean',\n\t\t\t\t\t'default' => false,\n\t\t\t\t],\n\t\t\t],\n\t\t]\n\t);\n}", "function add_block_type( $block ) {\n\t\t\n\t\t// Validate block type settings.\n\t\t$block = $this->validate_block_type( $block );\n\t\t\n\t\t// Bail early if already exists.\n\t\tif( $this->has_block_type($block['name']) ) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Add to storage.\n\t\t$this->blocks[ $block['name'] ] = $block;\n\t\t\n\t\t// Check function exists.\n\t\tif( function_exists('register_block_type') ) {\n\t\t\t\n\t\t\t// Register block type.\n\t\t\tregister_block_type($block['name'], array(\n\t\t\t\t'attributes'\t\t=> $this->get_block_type_default_attributes(),\n\t\t\t\t'render_callback'\t=> array( $this, 'render_callback' ),\n\t\t\t));\n\t\t}\n\t\t\n\t\t// Return block.\n\t\treturn $block;\n\t}", "public function register($user, $type)\n {\n }", "public function add(BlockType $blocktype);", "public function registerBlock() {\n\t\tif ( ! function_exists( 'register_block_type' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tregister_block_type( 'guten/post-listing', [\n\t\t\t'render_callback' => array( $this, 'renderBlock' ),\n\t\t] );\n\t}", "public static function register_blocks() {\n\t\tglobal $wp_version;\n\t\t$blocks = [\n\t\t\t'AllReviews',\n\t\t\t'FeaturedCategory',\n\t\t\t'FeaturedProduct',\n\t\t\t'HandpickedProducts',\n\t\t\t'ProductBestSellers',\n\t\t\t'ProductCategories',\n\t\t\t'ProductCategory',\n\t\t\t'ProductNew',\n\t\t\t'ProductOnSale',\n\t\t\t'ProductsByAttribute',\n\t\t\t'ProductTopRated',\n\t\t\t'ReviewsByProduct',\n\t\t\t'ReviewsByCategory',\n\t\t\t'ProductSearch',\n\t\t\t'ProductTag',\n\t\t];\n\t\t// Note: as a part of refactoring dynamic block registration, this will be moved\n\t\t// to block level config.\n\t\tif ( version_compare( $wp_version, '5.2', '>' ) ) {\n\t\t\t$blocks[] = 'AllProducts';\n\t\t\t$blocks[] = 'PriceFilter';\n\t\t\t$blocks[] = 'AttributeFilter';\n\t\t\t$blocks[] = 'ActiveFilters';\n\n\t\t\tif ( Package::is_feature_plugin_build() ) {\n\t\t\t\t$blocks[] = 'Checkout';\n\t\t\t\t$blocks[] = 'Cart';\n\t\t\t}\n\t\t}\n\t\tif ( Package::is_experimental_build() ) {\n\t\t\t$blocks[] = 'SingleProduct';\n\t\t}\n\t\tforeach ( $blocks as $class ) {\n\t\t\t$class = __NAMESPACE__ . '\\\\BlockTypes\\\\' . $class;\n\t\t\t$instance = new $class();\n\t\t\t$instance->register_block_type();\n\t\t}\n\t\tself::register_atomic_blocks();\n\t}", "public function register_block_resources() {\r\n\t\t$l10n = Maps_Marker_Pro::get_instance('MMP\\L10n');\r\n\r\n\t\twp_register_style('mmp-gb-block', plugins_url('css/block.css', __DIR__), array('wp-edit-blocks'), Maps_Marker_Pro::$version);\r\n\r\n\t\twp_register_script('mmp-gb-block', plugins_url('js/block.js', __DIR__), array('wp-blocks', 'wp-element'), Maps_Marker_Pro::$version, true);\r\n\t\twp_localize_script('mmp-gb-block', 'mmpGbVars', $this->gb_vars());\r\n\t\twp_localize_script('mmp-gb-block', 'mmpGbL10n', $l10n->gb_strings());\r\n\r\n\t\tregister_block_type('mmp/map', array(\r\n\t\t\t'editor_style' => 'mmp-gb-block',\r\n\t\t\t'editor_script' => 'mmp-gb-block'\r\n\t\t));\r\n\t}", "function review_register_block() {\n\n\tif ( ! function_exists( 'register_block_type' ) ) {\n\t\treturn;\n\t}\n\n\twp_register_script(\n\t\t'review-block',\n\t\tplugins_url( 'block.js', __FILE__ ),\n\t\tarray( 'wp-blocks', 'wp-element', 'wp-editor', 'underscore' ),\n\t\tfilemtime( plugin_dir_path( __FILE__ ) . 'block.js' )\n\t);\n\n\twp_register_style(\n\t\t'review-block',\n\t\tplugins_url( 'style.css', __FILE__ ),\n\t\tarray( ),\n\t\tfilemtime( plugin_dir_path( __FILE__ ) . 'style.css' )\n\t);\n\n\tregister_block_type( 'gutenberg-examples/review-card', array(\n\t\t'style' => 'review-block',\n\t\t'editor_script' => 'review-block',\n\t) );\n\n}", "public function getBlockPrefix()\n {\n return 'UserType';\n }", "public static function _register()\n {\n self::assignElements([\n 'BotBlockToken' => [],\n 'BotBlockUserInput' => []\n ], parent::NAME);\n\n self::assignAttributes([]);\n }", "public function getBlockPrefix()\n {\n return 'register_type';\n }", "function register_acf_block_types() {\n\t// Register Blocks\n\t\n\t// Home Header block\n\tacf_register_block_type(array(\n\t\t'name' => 'home_header',\n\t\t'title' => __('Home Header'),\n\t\t'description' => __('Header block for the homepage'),\n\t\t'render_template' => 'template-parts/blocks/home-header.php',\n\t\t'category' => 'layout',\n\t\t'icon' => 'align-center',\n\t\t'mode' => 'preview',\n\t\t'keywords' => array( 'home', 'header' ),\n\t\t'post_types'\t\t=> array('page'),\n\t\t'supports'\t\t\t=> array(\n\t\t\t'multiple'\t=> false,\n\t\t\t'align'\t\t=> false,\n\t\t\t'anchor'\t=> true,\n\t\t\t'html'\t\t=> true,\n\t\t)\n\t));\n\t\n\t// Footer CTA block\n\tacf_register_block_type(array(\n\t\t'name' => 'footer_cta',\n\t\t'title' => __('Footer CTA'),\n\t\t'description' => __('CTA Section to be placed above footer.'),\n\t\t'render_template' => 'template-parts/blocks/footer-cta.php',\n\t\t'category' => 'layout',\n\t\t'icon' => 'align-center',\n\t\t'mode' => 'preview',\n\t\t'keywords' => array( 'footer', 'cta', 'call-to-action' ),\n\t\t'post_types'\t\t=> array('page'),\n\t\t'supports'\t\t\t=> array(\n\t\t\t'align'\t\t=> false,\n\t\t\t'anchor'\t=> true,\n\t\t\t'html'\t\t=> true,\n\t\t)\n\t));\n\t\n\t// Intro Header block\n\tacf_register_block_type(array(\n\t\t'name' => 'intro_header',\n\t\t'title' => __('Intro Header'),\n\t\t'description' => __('An Introductory Header block.'),\n\t\t'render_template' => 'template-parts/blocks/intro-header.php',\n\t\t'category' => 'layout',\n\t\t'icon' => 'align-center',\n\t\t'mode' => 'preview',\n\t\t'keywords' => array( 'intro', 'header' ),\n\t\t'post_types'\t\t=> array('page'),\n\t\t'supports'\t\t\t=> array(\n\t\t\t'multiple'\t=> false,\n\t\t\t'align'\t\t=> false,\n\t\t\t'anchor'\t=> true,\n\t\t\t'html'\t\t=> true,\n\t\t)\n\t));\n\t\n\t// Reversible Image Content block\n\tacf_register_block_type(array(\n\t\t'name' => 'rev_image_content',\n\t\t'title' => __('Reversible Image Content'),\n\t\t'description' => __('Block that switches the content and image side per iteration.'),\n\t\t'render_template' => 'template-parts/blocks/reverse-image-content.php',\n\t\t'category' => 'layout',\n\t\t'icon' => 'align-left',\n\t\t'mode' => 'preview',\n\t\t'keywords' => array( 'content', 'repeat' ),\n\t\t'post_types'\t\t=> array('page'),\n\t\t'supports'\t\t\t=> array(\n\t\t\t'align'\t\t=> false,\n\t\t\t'anchor'\t=> true,\n\t\t\t'html'\t\t=> true,\n\t\t\t'mode'\t\t=> false,\n\t\t)\n\t));\n\t\n\t// Icons - 6 Column block\n\tacf_register_block_type(array(\n\t\t'name' => 'icons_six_col',\n\t\t'title' => __('Icons - 6 Column'),\n\t\t'description' => __('Six column with Icons'),\n\t\t'render_template' => 'template-parts/blocks/icons-six-col.php',\n\t\t'category' => 'layout',\n\t\t'icon' => 'grid-view',\n\t\t'mode' => 'preview',\n\t\t'keywords' => array( 'content', 'icon' ),\n\t\t'post_types'\t\t=> array('page'),\n\t\t'supports'\t\t\t=> array(\n\t\t\t'align'\t\t=> false,\n\t\t\t'anchor'\t=> true,\n\t\t\t'html'\t\t=> true,\n\t\t\t'mode'\t\t=> false,\n\t\t)\n\t));\n\t\n\t// Recent News + Ad block\n\tacf_register_block_type(array(\n\t\t'name' => 'recent_news_ad',\n\t\t'title' => __('Recent News + Ad'),\n\t\t'description' => __('Block with 2 most recent news and an ad area'),\n\t\t'render_template' => 'template-parts/blocks/recent-news-ad.php',\n\t\t'category' => 'layout',\n\t\t'icon' => 'grid-view',\n\t\t'mode' => 'preview',\n\t\t'keywords' => array( 'ad', 'news', 'posts' ),\n\t\t'post_types'\t\t=> array('page'),\n\t\t'supports'\t\t\t=> array(\n\t\t\t'multiple'\t=> false,\n\t\t\t'align'\t\t=> false,\n\t\t\t'anchor'\t=> true,\n\t\t\t'html'\t\t=> true,\n\t\t\t'mode'\t\t=> false,\n\t\t)\n\t));\n\t\n\t// Special Heading block\n\tacf_register_block_type(array(\n\t\t'name' => 'special_heading',\n\t\t'title' => __('Special Heading'),\n\t\t'description' => __('A stylized heading'),\n\t\t'render_template' => 'template-parts/blocks/special-heading.php',\n\t\t'category' => 'layout',\n\t\t'icon' => 'editor-italic',\n\t\t'mode' => 'preview',\n\t\t'keywords' => array( 'heading', 'style' ),\n\t\t'supports'\t\t\t=> array(\n\t\t\t'anchor'\t=> true,\n\t\t\t'html'\t\t=> true,\n\t\t\t'mode'\t\t=> false,\n\t\t)\n\t));\n\t\n\t// Contact Methods (Icon + Link) block\n\tacf_register_block_type(array(\n\t\t'name' => 'contact_method',\n\t\t'title' => __('Contact Methods (Icon + Link)'),\n\t\t'description' => __('A contact block which can add multiple emails/telephone/fax.'),\n\t\t'render_template' => 'template-parts/blocks/contact-methods.php',\n\t\t'category' => 'layout',\n\t\t'icon' => 'id',\n\t\t'mode' => 'preview',\n\t\t'keywords' => array( 'contact', 'email', 'fax', 'telephone' ),\n\t\t'post_types'\t\t=> array('page'),\n\t\t'supports'\t\t\t=> array(\n\t\t\t'align'\t\t=> false,\n\t\t\t'anchor'\t=> true,\n\t\t\t'html'\t\t=> true,\n\t\t\t'mode'\t\t=> false,\n\t\t)\n\t));\n\t\n\t// Contact Form block\n\tacf_register_block_type(array(\n\t\t'name' => 'contact_form',\n\t\t'title' => __('Contact Form'),\n\t\t'render_template' => 'template-parts/blocks/contact-form.php',\n\t\t'category' => 'layout',\n\t\t'icon' => 'phone',\n\t\t'mode' => 'preview',\n\t\t'keywords' => array( 'contact', 'email', 'question', 'telephone', 'call' ),\n\t\t'post_types'\t\t=> array('page'),\n\t\t'supports'\t\t\t=> array(\n\t\t\t'multiple'\t=> false,\n\t\t\t'align'\t\t=> false,\n\t\t\t'anchor'\t=> true,\n\t\t\t'html'\t\t=> true,\n\t\t\t'mode'\t\t=> false,\n\t\t)\n\t));\n\t\n\t// Multi Image & Text block\n\tacf_register_block_type(array(\n\t\t'name' => 'multi_image_text',\n\t\t'title' => __('Multi Image & Text'),\n\t\t'render_template' => 'template-parts/blocks/multi-image-text.php',\n\t\t'category' => 'layout',\n\t\t'icon' => 'align-left',\n\t\t'mode' => 'preview',\n\t\t'keywords' => array( 'media', 'image', 'text', 'multi' ),\n\t\t'post_types'\t\t=> array('page'),\n\t\t'supports'\t\t\t=> array(\n\t\t\t'align'\t\t=> false,\n\t\t\t'anchor'\t=> true,\n\t\t\t'html'\t\t=> true,\n\t\t\t'mode'\t\t=> false,\n\t\t)\n\t));\n\t\n\t// Icon Repeater - 3 Columns\n\tacf_register_block_type(array(\n\t\t'name' => 'icon-repeater-3-col',\n\t\t'title' => __('Icon Repeater - 3 Columns'),\n\t\t'description' => __('Repeater that goes up to a maximum of 3 columns'),\n\t\t'render_template' => 'template-parts/blocks/icon-repeater-3-col.php',\n\t\t'category' => 'layout',\n\t\t'icon' => 'grid-view',\n\t\t'mode' => 'preview',\n\t\t'keywords' => array( 'content', 'repeater', 'icon' ),\n\t\t'post_types'\t\t=> array('page'),\n\t\t'supports'\t\t\t=> array(\n\t\t\t'align'\t\t=> false,\n\t\t\t'anchor'\t=> true,\n\t\t\t'html'\t\t=> true,\n\t\t\t'mode'\t\t=> false,\n\t\t)\n\t));\n\t\n\t// Logo Columns\n\tacf_register_block_type(array(\n\t\t'name' => 'logo-columns',\n\t\t'title' => __('Logo Columns'),\n\t\t'description' => __('Columns with a Logo and other text content.'),\n\t\t'render_template' => 'template-parts/blocks/logo-columns.php',\n\t\t'category' => 'layout',\n\t\t'icon' => 'grid-view',\n\t\t'mode' => 'preview',\n\t\t'keywords' => array( 'content', 'logo', 'icon' ),\n\t\t'post_types'\t\t=> array('page'),\n\t\t'supports'\t\t\t=> array(\n\t\t\t'align'\t\t=> false,\n\t\t\t'anchor'\t=> true,\n\t\t\t'html'\t\t=> true,\n\t\t\t'mode'\t\t=> false,\n\t\t)\n\t));\n\t\n\t// Gallery Modal Slider\n\tacf_register_block_type(array(\n\t\t'name' => 'gallery-modal-slider',\n\t\t'title' => __('Gallery Modal Slider'),\n\t\t'description' => __('A gallery slider with video/image popups.'),\n\t\t'render_template' => 'template-parts/blocks/gallery-modal-slider.php',\n\t\t'category' => 'layout',\n\t\t'icon' => 'images-alt',\n\t\t'mode' => 'edit',\n\t\t'keywords' => array( 'gallery', 'popup', 'modal', 'video', 'image', 'photo' ),\n\t\t'post_types'\t\t=> array('page'),\n\t\t'enqueue_assets'\t=> function(){\n\t\t\twp_enqueue_style( 'slick-slider-styles', '//cdn.jsdelivr.net/npm/slick-carousel@1.8.1/slick/slick.css', array(), false );\n\t\t\twp_enqueue_script( 'slick-slider-scripts', '//cdn.jsdelivr.net/npm/slick-carousel@1.8.1/slick/slick.min.js', array('jquery'), '', true );\n\t\t\twp_enqueue_script( 'gallery-modal-slider-scripts', get_stylesheet_directory_uri() . '/template-parts/blocks/gallery-modal-slider.js', array('jquery'), false, true );\n\t\t },\n\t\t'supports'\t\t\t=> array(\n\t\t\t'align'\t\t=> false,\n\t\t\t'anchor'\t=> true,\n\t\t\t'html'\t\t=> true,\n\t\t\t'mode'\t\t=> false,\n\t\t)\n\t));\n\t\n\t// News Feed\n\tacf_register_block_type(array(\n\t\t'name' => 'news-feed',\n\t\t'title' => __('News Feed'),\n\t\t'description' => __('Shows the selected news feed.'),\n\t\t'render_template' => 'template-parts/blocks/news-feed.php',\n\t\t'category' => 'widgets',\n\t\t'icon' => 'editor-table',\n\t\t'mode' => 'preview',\n\t\t'keywords' => array( 'feed' , 'news', 'posts', 'articles' ),\n\t\t'post_types'\t\t=> array('page'),\n\t\t'supports'\t\t\t=> array(\n\t\t\t'align'\t\t=> false,\n\t\t\t'anchor'\t=> true,\n\t\t\t'html'\t\t=> true,\n\t\t\t'mode'\t\t=> false,\n\t\t\t'multiple'\t=> false,\n\t\t)\n\t));\n\t\n\t// Capabilities\n\tacf_register_block_type(array(\n\t\t'name' => 'capabilities',\n\t\t'title' => __('Capabilities'),\n\t\t'description' => __('Shows the different capabilities.'),\n\t\t'render_template' => 'template-parts/blocks/capabilities.php',\n\t\t'category' => 'widgets',\n\t\t'icon' => 'screenoptions',\n\t\t'mode' => 'preview',\n\t\t'keywords' => array( 'capabilities' ),\n\t\t'post_types'\t\t=> array('page'),\n\t\t'supports'\t\t\t=> array(\n\t\t\t'align'\t\t=> false,\n\t\t\t'anchor'\t=> true,\n\t\t\t'html'\t\t=> true,\n\t\t\t'mode'\t\t=> false,\n\t\t\t'multiple'\t=> false,\n\t\t)\n\t));\n\t\n\t// Capabilities Map\n\tacf_register_block_type(array(\n\t\t'name' => 'capabilities-map',\n\t\t'title' => __('Capabilities Map'),\n\t\t'description' => __('Shows the capabilities map.'),\n\t\t'render_template' => 'template-parts/blocks/capabilities-map.php',\n\t\t'category' => 'widgets',\n\t\t'icon' => 'screenoptions',\n\t\t'mode' => 'preview',\n\t\t'keywords' => array( 'capabilities', 'map' ),\n\t\t'post_types'\t\t=> array('page'),\n\t\t'supports'\t\t\t=> array(\n\t\t\t'align'\t\t=> false,\n\t\t\t'anchor'\t=> true,\n\t\t\t'html'\t\t=> true,\n\t\t\t'mode'\t\t=> false,\n\t\t\t'multiple'\t=> false,\n\t\t)\n\t));\n\t\n\t// Enews + Subscribe Form Block\n\tacf_register_block_type(array(\n\t\t'name' => 'enews-sub-form-block',\n\t\t'title' => __('Enews + Subscribe Form'),\n\t\t'description' => __('Shows the Enews Form Block'),\n\t\t'render_template' => 'template-parts/blocks/enews-sub-form-block.php',\n\t\t'category' => 'common',\n\t\t'icon' => 'email-alt2',\n\t\t'mode' => 'preview',\n\t\t'keywords' => array( 'enews', 'subscribe', 'form' ),\n\t\t'post_types'\t\t=> array('page'),\n\t\t'supports'\t\t\t=> array(\n\t\t\t'align'\t\t=> false,\n\t\t\t'anchor'\t=> true,\n\t\t\t'html'\t\t=> true,\n\t\t\t'mode'\t\t=> false,\n\t\t\t'multiple'\t=> false,\n\t\t)\n\t));\n\t\n\t// Background Text Block\n\tacf_register_block_type(array(\n\t\t'name' => 'background-text-block',\n\t\t'title' => __('Background Text'),\n\t\t'description' => __('Shows a centered typed text that blends behind elements.'),\n\t\t'render_template' => 'template-parts/blocks/background-text.php',\n\t\t'category' => 'common',\n\t\t'icon' => 'editor-textcolor',\n\t\t'mode' => 'preview',\n\t\t'keywords' => array( 'background', 'text' ),\n\t\t'post_types'\t\t=> array('page'),\n\t\t'supports'\t\t\t=> array(\n\t\t\t'align'\t\t=> false,\n\t\t\t'anchor'\t=> true,\n\t\t\t'html'\t\t=> true,\n\t\t\t'mode'\t\t=> false,\n\t\t\t'multiple'\t=> false,\n\t\t)\n\t));\n}", "function block_init()\n{\n\tregister_block_type_from_metadata(__DIR__, [\n\t\t\"render_callback\" => __NAMESPACE__ . '\\render_callback',\n\t\t'attributes' => [\n\t\t\t'total' => [\n\t\t\t\t'type' => 'number',\n\t\t\t\t'default' => '5',\n\t\t\t],\n\t\t\t'categories' => [\n\t\t\t\t'type' => \"array\",\n\t\t\t\t'items' => [\n\t\t\t\t\t'type' => 'number',\n\t\t\t\t],\n\t\t\t\t'default' => []\n\t\t\t],\n\t\t\t'blocTitle' => [\n\t\t\t\t'type' => \"string\",\n\t\t\t\t'default' => \"Les produits\"\n\t\t\t]\n\t\t]\n\t]);\n}", "private function register_block($block_name)\n {\n }", "public function setTypeOfBlock(string $type): void;", "function bitcoincore_register_block()\n{\n $asset_file = include(plugin_dir_path(__FILE__) . 'build/index.asset.php');\n\n wp_register_script(\n 'block-bitcoincore',\n plugins_url('build/index.js', __FILE__),\n $asset_file['dependencies'],\n $asset_file['version']\n );\n\n wp_register_style(\n 'block-bitcoincore-editor',\n plugins_url( 'src/editor.css', __FILE__ ),\n array( 'wp-edit-blocks' ),\n filemtime( plugin_dir_path( __FILE__ ) . 'src/editor.css' )\n );\n\n wp_register_style(\n 'block-bitcoincore-style',\n plugins_url( 'src/style.css', __FILE__ ),\n array(),\n filemtime( plugin_dir_path( __FILE__ ) . 'src/style.css' )\n );\n\n register_block_type('bitcoincore/block-bitcoincore', array(\n 'style' => 'block-bitcoincore-style',\n 'editor_style' => 'block-bitcoincore-editor',\n 'editor_script' => 'block-bitcoincore'\n ));\n}", "function unregister_block_type($name)\n{\n}", "private function register_product_blocks()\n {\n }", "public static function _register()\n {\n self::assignElements([\n 'BotBlockToken' => [],\n 'BotBlockUrl' => [],\n 'BotBlockAudioUrl' => []\n ], parent::NAME);\n\n self::assignAttributes([]);\n }", "public static function get_block_types() {\n return array();\n }", "public function setTypeUser($typeUser){\n \t$this->typeUser = $typeUser;\n }", "public function regbreederTypes($user_id, $breeder_id, $poultry_type){\n $hptuid = uniqid('', true);\n $stmt = $this->con->prepare(\"INSERT INTO hatching_poultry_types (poultry_types_unique_id, user_id,\n breeder_id, breeder_poultry_type, created_at)VALUES(?, ?, ?, ?, NOW())\");\n $stmt->bind_param(\"ssss\", $hptuid, $user_id, $breeder_id, $poultry_type);\n $result = $stmt->execute();\n $stmt->close();\n\n }", "public function registerNodeTypes($types, $allowUpdate);", "function register_user_type( $user_type = null )\n\t{\n\t\t//initializing variables\n\t\tstatic $user_types;\n\t\t$default = array(\n\t\t\t'role' => get_option('default_role'),\n\t\t\t'name' => ucfirst(get_option('default_role')),\n\t\t\t'registration' => false,\n\t\t\t'user_meta' => false,\n\t\t);\n\t\t\n\t\tif (!isset($user_types))\n\t\t{\n\t\t\t$user_types = array();\n\t\t}\n\t\t\n\t\tif (is_null($user_type)) return $user_types;\n\t\t\n\t\t$user_type = wp_parse_args($user_type, $default);\n\t\t\n\t\t//set the registration page if we have one\n\t\tif ($user_type['registration'])\n\t\t{\n\t\t\t$user_type['registration']['role'] = $user_type['role'];\n\t\t\t$user_type['registration']['name'] = $user_type['name'];\n\t\t\tregistration_page( $user_type['registration'] );\n\t\t}\n\t\t\n\t\tif ($user_type['user_meta'])\n\t\t{\n\t\t\tregister_user_metas($user_type['role'], $user_type['user_meta']);\n\t\t}\n\t\t\n\t\t$user_types[$user_type['role']] = $user_type;\n\t\treturn true;\n\t}", "public function register_gutenberg_block(){\n $block = array(\n 'ywfbt-blocks' => array(\n 'title' => _x( 'Frequently Bought Form', '[gutenberg]: block name', 'yith-woocommerce-frequently-bought-together' ),\n 'description' => _x( 'With this block you can print a product \"frequently bought together\" form.', '[gutenberg]: block description', 'yith-woocommerce-frequently-bought-together' ),\n 'shortcode_name' => 'ywfbt_form',\n 'do_shortcode' => false,\n 'attributes' => array(\n 'product_id' => array(\n 'type' => 'text',\n 'label' => _x( 'Add the product id (leave blank to get global product value)', '[gutenberg]: attributes description', 'yith-woocommerce-frequently-bought-together' ),\n 'default' => '',\n )\n ),\n ),\n );\n\n yith_plugin_fw_gutenberg_add_blocks( $block );\n }", "abstract protected function fillRegistrationType();", "public function getBlockPrefix()\n {\n return 'registration_type';\n }", "function register_acf_block_types() {\n acf_register_block_type(array(\n 'name' => 'hero',\n 'title' => __('Hero'),\n 'render_template' => '/blocks/hero.php',\n 'category' => 'formatting',\n 'icon' => 'admin-comments',\n 'keywords' => array( 'hero', 'top' ),\n ));\n\n acf_register_block_type(array(\n 'name' => 'items',\n 'title' => __('Items'),\n 'render_template' => '/blocks/items.php',\n 'category' => 'formatting',\n 'icon' => 'admin-comments',\n 'keywords' => array( 'items', 'cream' ),\n ));\n\n acf_register_block_type(array(\n 'name' => 'about',\n 'title' => __('About'),\n 'render_template' => '/blocks/about.php',\n 'category' => 'formatting',\n 'icon' => 'admin-comments',\n 'keywords' => array( 'about', 'text' ),\n ));\n\n acf_register_block_type(array(\n 'name' => 'gallery',\n 'title' => __('Gallery'),\n 'render_template' => '/blocks/gallery.php',\n 'category' => 'formatting',\n 'icon' => 'admin-comments',\n 'keywords' => array( 'gallery', 'images' ),\n ));\n\n acf_register_block_type(array(\n 'name' => 'services',\n 'title' => __('Services'),\n 'render_template' => '/blocks/services.php',\n 'category' => 'formatting',\n 'icon' => 'admin-comments',\n 'keywords' => array( 'services' ),\n ));\n\n acf_register_block_type(array(\n 'name' => 'parallax',\n 'title' => __('Parallax'),\n 'render_template' => '/blocks/parallax.php',\n 'category' => 'formatting',\n 'icon' => 'admin-comments',\n 'keywords' => array( 'parallax' ),\n ));\n\n acf_register_block_type(array(\n 'name' => 'hours',\n 'title' => __('Hours'),\n 'render_template' => '/blocks/hours.php',\n 'category' => 'formatting',\n 'icon' => 'admin-comments',\n 'keywords' => array( 'hours' ),\n ));\n\n acf_register_block_type(array(\n 'name' => 'stylist',\n 'title' => __('Stylist'),\n 'render_template' => '/blocks/stylist.php',\n 'category' => 'formatting',\n 'icon' => 'admin-comments',\n 'keywords' => array( 'hours' ),\n ));\n\n acf_register_block_type(array(\n 'name' => 'book',\n 'title' => __('Book'),\n 'render_template' => '/blocks/book.php',\n 'category' => 'formatting',\n 'icon' => 'admin-comments',\n 'keywords' => array( 'hours' ),\n ));\n\n acf_register_block_type(array(\n 'name' => 'places',\n 'title' => __('Places'),\n 'render_template' => '/blocks/video.php',\n 'category' => 'formatting',\n 'icon' => 'admin-comments',\n 'keywords' => array( 'hours' ),\n ));\n\n }", "function register_theme_blocks() {\n\t// Filter the plugins URL to allow us to have blocks in themes with linked assets. i.e editorScripts\n\tadd_filter( 'plugins_url', __NAMESPACE__ . '\\filter_plugins_url', 10, 2 );\n\n\n\t// Require custom blocks.\n\trequire_once PORCHYUP_THEME_BLOCK_DIR . '/example-block/register.php';\n\n\t// Call block register functions for each block.\n\tExample\\register();\n\n\t// Remove the filter after we register the blocks\n\tremove_filter( 'plugins_url', __NAMESPACE__ . '\\filter_plugins_url', 10, 2 );\n}", "function register_acf_block_types()\n{\n if (function_exists('acf_register_block_type')) {\n // register a sell more block.\n acf_register_block_type(array(\n 'name' => 'sell_more',\n 'title' => __('Sell More'),\n 'description' => __('A block for Sell More content'),\n 'render_template' => '/lib/gutenberg/blocks/sell-more.php',\n //'render_callback' => 'srl_sell_more_block',\n 'category' => 'srl-blocks',\n 'icon' => 'megaphone',\n 'keywords' => array('sell', 'more', 'srl'),\n ));\n\n acf_register_block_type(array(\n 'name' => 'drip_form',\n 'title' => __('Drip form'),\n 'description' => __('A block for Drip form content'),\n 'render_template' => '/lib/gutenberg/blocks/drip-form.php',\n 'category' => 'srl-blocks',\n 'icon' => 'megaphone',\n 'keywords' => array('drip', 'form', 'srl'),\n ));\n\n acf_register_block_type(array(\n 'name' => 'drip_form_version2',\n 'title' => __('Drip form for team page'),\n 'description' => __('The version of the Drip form for the team page'),\n 'render_template' => '/lib/gutenberg/blocks/drip-form2.php',\n 'category' => 'srl-blocks',\n 'icon' => 'megaphone',\n 'keywords' => array('drip', 'form', 'srl'),\n ));\n\n acf_register_block_type(array(\n 'name' => 'three-col',\n 'title' => __('Three column layout'),\n 'description' => __('Three columns including image and text'),\n 'render_template' => '/lib/gutenberg/blocks/three-col.php',\n 'category' => 'srl-blocks',\n 'icon' => 'megaphone',\n 'keywords' => array('three', 'column', 'srl'),\n ));\n\n acf_register_block_type(array(\n 'name' => 'large-graphic',\n 'title' => __('Large graphic and header'),\n 'description' => __('Block for header, intro and large graphic'),\n 'render_template' => '/lib/gutenberg/blocks/graphic-large.php',\n 'category' => 'srl-blocks',\n 'icon' => 'megaphone',\n 'keywords' => array('large', 'graphic', 'srl'),\n ));\n\n acf_register_block_type(array(\n 'name' => 'large-graphic-service',\n 'title' => __('Services page graphic and header'),\n 'description' => __('Block for header, intro and large graphic for services page'),\n 'render_template' => '/lib/gutenberg/blocks/graphic-large-services.php',\n 'category' => 'srl-blocks',\n 'icon' => 'megaphone',\n 'keywords' => array('large', 'graphic', 'srl'),\n ));\n\n acf_register_block_type(array(\n 'name' => 'resource-list',\n 'title' => __('Latest resources block'),\n 'description' => __('Block for highlighting three resource posts'),\n 'render_template' => '/lib/gutenberg/blocks/resource-list.php',\n 'category' => 'srl-blocks',\n 'icon' => 'megaphone',\n 'keywords' => array('latest', 'resource', 'srl'),\n ));\n\n acf_register_block_type(array(\n 'name' => 'testimonial-slider',\n 'title' => __('Testimonial slider block'),\n 'description' => __('Block for loading testimonial slides'),\n 'render_template' => '/lib/gutenberg/blocks/testimonial-slider.php',\n 'category' => 'srl-blocks',\n 'icon' => 'megaphone',\n 'keywords' => array('testimonial', 'slide', 'srl'),\n ));\n\n acf_register_block_type(array(\n 'name' => 'headed-numbers',\n 'title' => __('Numbered list with headers'),\n 'description' => __('Block for loading a numbered list with headers'),\n 'render_template' => '/lib/gutenberg/blocks/headed-numbers.php',\n 'category' => 'srl-blocks',\n 'icon' => 'megaphone',\n 'keywords' => array('numbers', 'list', 'srl'),\n ));\n\n acf_register_block_type(array(\n 'name' => 'image-text',\n 'title' => __('Image and text block'),\n 'description' => __('Block for image on left and text on right'),\n 'render_template' => '/lib/gutenberg/blocks/image-text.php',\n 'category' => 'srl-blocks',\n 'icon' => 'megaphone',\n 'keywords' => array('image', 'text', 'srl'),\n ));\n\n acf_register_block_type(array(\n 'name' => 'biog-card',\n 'title' => __('Team biog cards'),\n 'description' => __('Block for team member biographical information'),\n 'render_template' => '/lib/gutenberg/blocks/biog-card.php',\n 'category' => 'srl-blocks',\n 'icon' => 'megaphone',\n 'keywords' => array('biog', 'card', 'srl'),\n ));\n\n acf_register_block_type(array(\n 'name' => 'callout-box',\n 'title' => __('Grey callout box'),\n 'description' => __('Block for callout box on blog post'),\n 'render_template' => '/lib/gutenberg/blocks/callout-box.php',\n 'category' => 'srl-blocks',\n 'icon' => 'megaphone',\n 'keywords' => array('callout', 'box', 'srl'),\n ));\n acf_register_block_type(array(\n 'name' => 'pullquote-left',\n 'title' => __('Left aligned pullquote'),\n 'description' => __('Block for pullquote which floats to the left'),\n 'render_template' => '/lib/gutenberg/blocks/pullquote-left.php',\n 'category' => 'srl-blocks',\n 'icon' => 'megaphone',\n 'keywords' => array('pullquote', 'left', 'srl'),\n ));\n acf_register_block_type(array(\n 'name' => 'fullwidth-image',\n 'title' => __('Full width image'),\n 'description' => __('Full width image for blog post'),\n 'render_template' => '/lib/gutenberg/blocks/fullwidth-image.php',\n 'category' => 'srl-blocks',\n 'icon' => 'megaphone',\n 'keywords' => array('fullwidth', 'image', 'srl'),\n ));\n acf_register_block_type(array(\n 'name' => 'pullquote-full',\n 'title' => __('Full width pullquote'),\n 'description' => __('Full width pullquote for blog post'),\n 'render_template' => '/lib/gutenberg/blocks/fullwidth-pullquote.php',\n 'category' => 'srl-blocks',\n 'icon' => 'megaphone',\n 'keywords' => array('fullwidth', 'pullquote', 'srl'),\n ));\n acf_register_block_type(array(\n 'name' => 'services-boxes',\n 'title' => __('Service offer boxes'),\n 'description' => __('Three boxes to display the service offers'),\n 'render_template' => '/lib/gutenberg/blocks/service-boxes.php',\n 'category' => 'srl-blocks',\n 'icon' => 'megaphone',\n 'keywords' => array('service', 'boxes', 'srl'),\n ));\n acf_register_block_type(array(\n 'name' => 'packages-list',\n 'title' => __('Customer packages'),\n 'description' => __('Blocks to display customer package options'),\n 'render_template' => '/lib/gutenberg/blocks/packages-list.php',\n 'category' => 'srl-blocks',\n 'icon' => 'megaphone',\n 'keywords' => array('packages', 'list', 'srl'),\n ));\n acf_register_block_type(array(\n 'name' => 'contact-drip',\n 'title' => __('Contact page form'),\n 'description' => __('Blocks to display Drip form on contact page'),\n 'render_template' => '/lib/gutenberg/blocks/contact-drip.php',\n 'category' => 'srl-blocks',\n 'icon' => 'megaphone',\n 'keywords' => array('contact', 'form', 'srl'),\n ));\n acf_register_block_type(array(\n 'name' => 'workshop-signup',\n 'title' => __('Workshop sign-up'),\n 'description' => __('Block to display sign up cta on workshop page'),\n 'render_template' => '/lib/gutenberg/blocks/workshop-drip.php',\n 'category' => 'srl-blocks',\n 'icon' => 'businesswoman',\n 'keywords' => array('workshop', 'form', 'srl'),\n ));\n acf_register_block_type(array(\n 'name' => 'workshop-logos',\n 'title' => __('Workshop logos'),\n 'description' => __('Block to display logos on workshop page'),\n 'render_template' => '/lib/gutenberg/blocks/workshop-logos.php',\n 'category' => 'srl-blocks',\n 'icon' => 'businesswoman',\n 'keywords' => array('workshop', 'logos', 'srl'),\n ));\n acf_register_block_type(array(\n 'name' => 'workshop-biogs',\n 'title' => __('Workshop biogs'),\n 'description' => __('Block to display biogs on workshop page'),\n 'render_template' => '/lib/gutenberg/blocks/workshop-biogs.php',\n 'category' => 'srl-blocks',\n 'icon' => 'businesswoman',\n 'keywords' => array('workshop', 'biog', 'srl'),\n ));\n acf_register_block_type(array(\n 'name' => 'workshop-cta-card',\n 'title' => __('Workshop cta card'),\n 'description' => __('Block to display cta card on workshop page'),\n 'render_template' => '/lib/gutenberg/blocks/workshop-cta.php',\n 'category' => 'srl-blocks',\n 'icon' => 'businesswoman',\n 'keywords' => array('card', 'cta', 'srl'),\n ));\n acf_register_block_type(array(\n 'name' => 'workshop-testimonials',\n 'title' => __('Workshop testimonials section'),\n 'description' => __('Block to display of testimonials on workshop page'),\n 'render_template' => '/lib/gutenberg/blocks/workshop-testimonials.php',\n 'category' => 'srl-blocks',\n 'icon' => 'businesswoman',\n 'keywords' => array('testimonials', 'workshop', 'srl'),\n ));\n acf_register_block_type(array(\n 'name' => 'book-slot',\n 'title' => __('Book a slot'),\n 'description' => __('Block to display book a slot CTA'),\n 'render_template' => '/lib/gutenberg/blocks/book-slot.php',\n 'category' => 'srl-blocks',\n 'icon' => 'megaphone',\n 'keywords' => array('form', 'book', 'srl'),\n ));\n acf_register_block_type(array(\n 'name' => 'workshop-interest-form',\n 'title' => __('Workshop interest form'),\n 'description' => __('Form to register interest in workshops'),\n 'render_template' => '/lib/gutenberg/blocks/workshop-interest.php',\n 'category' => 'srl-blocks',\n 'icon' => 'businesswoman',\n 'keywords' => array('form', 'register', 'srl'),\n ));\n }\n}", "function gutenberg_examples_01_register_block() {\n $asset_file = include( plugin_dir_path( __FILE__ ) . 'build/index.asset.php');\n\n wp_register_script(\n 'member-card-block',\n plugins_url( 'build/index.js', __FILE__ ),\n $asset_file['dependencies'],\n $asset_file['version']\n );\n\n\n wp_register_style(\n 'member-card-block-editor',\n plugins_url( 'editor.css', __FILE__ ),\n array( 'wp-edit-blocks' ),\n filemtime( plugin_dir_path( __FILE__ ) . 'editor.css' )\n );\n\n wp_register_style(\n 'member-card-block',\n plugins_url( 'style.css', __FILE__ ),\n array( ),\n filemtime( plugin_dir_path( __FILE__ ) . 'style.css' )\n );\n\n register_block_type( 'member-card/member-card-block', array(\n 'style' => 'member-card-block',\n 'editor_style' => 'member-card-block-editor',\n 'editor_script' => 'member-card-block',\n ) );\n\n}", "function services_block(){\n wp_register_script(\n 'services-script',\n get_template_directory_uri() . '/js/block-services.js',\n array( 'wp-blocks', 'wp-element', 'wp-editor', 'wp-components' )\n );\n\n wp_register_style(\n 'services-editor-style',\n get_template_directory_uri() . '/css/block-services-editor-style.css',\n array( 'wp-edit-blocks' )\n );\n\n wp_register_style(\n 'services-style',\n get_template_directory_uri() . '/css/block-services-style.css',\n array( 'wp-edit-blocks' )\n );\n\n register_block_type('childress/services', array(\n 'editor_script' => 'services-script',\n 'editor_style' => 'services-editor-style',\n 'style' => 'services-style',\n ) );\n}", "function register_block() {\n\tBlocks::jetpack_register_block(\n\t\tBLOCK_NAME,\n\t\tarray( 'render_callback' => __NAMESPACE__ . '\\render_block' )\n\t);\n}", "function wp_register_colors_support( $block_type ) {\n\t$color_support = property_exists( $block_type, 'supports' ) ? _wp_array_get( $block_type->supports, array( 'color' ), false ) : false;\n\t$has_text_colors_support = true === $color_support || ( is_array( $color_support ) && _wp_array_get( $color_support, array( 'text' ), true ) );\n\t$has_background_colors_support = true === $color_support || ( is_array( $color_support ) && _wp_array_get( $color_support, array( 'background' ), true ) );\n\t$has_gradients_support = _wp_array_get( $color_support, array( 'gradients' ), false );\n\t$has_link_colors_support = _wp_array_get( $color_support, array( 'link' ), false );\n\t$has_color_support = $has_text_colors_support ||\n\t\t$has_background_colors_support ||\n\t\t$has_gradients_support ||\n\t\t$has_link_colors_support;\n\n\tif ( ! $block_type->attributes ) {\n\t\t$block_type->attributes = array();\n\t}\n\n\tif ( $has_color_support && ! array_key_exists( 'style', $block_type->attributes ) ) {\n\t\t$block_type->attributes['style'] = array(\n\t\t\t'type' => 'object',\n\t\t);\n\t}\n\n\tif ( $has_background_colors_support && ! array_key_exists( 'backgroundColor', $block_type->attributes ) ) {\n\t\t$block_type->attributes['backgroundColor'] = array(\n\t\t\t'type' => 'string',\n\t\t);\n\t}\n\n\tif ( $has_text_colors_support && ! array_key_exists( 'textColor', $block_type->attributes ) ) {\n\t\t$block_type->attributes['textColor'] = array(\n\t\t\t'type' => 'string',\n\t\t);\n\t}\n\n\tif ( $has_gradients_support && ! array_key_exists( 'gradient', $block_type->attributes ) ) {\n\t\t$block_type->attributes['gradient'] = array(\n\t\t\t'type' => 'string',\n\t\t);\n\t}\n}", "public function register_hooks() {\n\t\tif ( ! function_exists( 'register_block_type' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tregister_block_type( 'yoast/how-to-block', array(\n\t\t\t'render_callback' => array( $this, 'render' ),\n\t\t) );\n\t}", "function allowed_block_types( $allowed_blocks, $editor_context ) {\n if ( ! isset( THEME_SETTINGS['allowed_blocks'] ) || 'all' === THEME_SETTINGS['allowed_blocks'] ) {\n return $allowed_blocks;\n }\n\n // Add the default allowed blocks\n $allowed_blocks = isset( THEME_SETTINGS['allowed_blocks']['default'] ) ? THEME_SETTINGS['allowed_blocks']['default'] : [];\n\n // If there is post type specific blocks, add them to the allowed blocks list\n if ( isset( $editor_context->post->post_type ) && isset( THEME_SETTINGS['allowed_blocks'][ $editor_context->post->post_type ] ) ) {\n $allowed_blocks = array_merge( $allowed_blocks, THEME_SETTINGS['allowed_blocks'][ $editor_context->post->post_type ] );\n }\n\n // Add custom blocks\n if ( isset( THEME_SETTINGS['acf_blocks'] ) ) {\n foreach ( THEME_SETTINGS['acf_blocks'] as $custom_block ) {\n $allowed_blocks[] = 'acf/' . $custom_block['name'];\n }\n }\n\n return $allowed_blocks;\n}", "function register_block_categories() {\n\tregister_taxonomy( 'wp_block_category', 'wp_block', [\n\t\t'label' => __( 'Block Categories', 'altis' ),\n\t\t'labels' => [\n\t\t\t'name' => _x( 'Block Categories', 'taxonomy general name', 'altis' ),\n\t\t\t'singular_name' => _x( 'Block Category', 'taxonomy singular name', 'altis' ),\n\t\t\t'search_items' => __( 'Search Block Categories', 'altis' ),\n\t\t\t'popular_items' => __( 'Popular Block Categories', 'altis' ),\n\t\t\t'all_items' => __( 'All Writers', 'altis' ),\n\t\t\t'parent_item' => null,\n\t\t\t'parent_item_colon' => null,\n\t\t\t'edit_item' => __( 'Edit Block Category', 'altis' ),\n\t\t\t'update_item' => __( 'Update Block Category', 'altis' ),\n\t\t\t'add_new_item' => __( 'Add New Block Category', 'altis' ),\n\t\t\t'new_item_name' => __( 'New Block Category Name', 'altis' ),\n\t\t\t'separate_items_with_commas' => __( 'Separate block categories with commas', 'altis' ),\n\t\t\t'add_or_remove_items' => __( 'Add or remove block categories', 'altis' ),\n\t\t\t'choose_from_most_used' => __( 'Choose from the most used block categories', 'altis' ),\n\t\t\t'not_found' => __( 'No block categories found.', 'altis' ),\n\t\t\t'menu_name' => __( 'Categories', 'altis' ),\n\t\t],\n\t\t'public' => false,\n\t\t'publicly_queryable' => false,\n\t\t'show_ui' => true,\n\t\t'show_in_nav_menus' => false,\n\t\t'show_in_rest' => true,\n\t\t'hierarchical' => true,\n\t\t'show_admin_column' => true,\n\t\t'rewrite' => false,\n\t] );\n}", "function register_post_type(){\n \n $capability = acf_get_setting('capability');\n \n if(!acf_get_setting('show_admin'))\n $capability = false;\n \n register_post_type($this->post_type, array(\n 'label' => 'Block Type',\n 'description' => 'Block Type',\n 'labels' => array(\n 'name' => 'Block Types',\n 'singular_name' => 'Block Type',\n 'menu_name' => 'Block Types',\n 'edit_item' => 'Edit Block Type',\n 'add_new_item' => 'New Block Type',\n ),\n 'supports' => array('title'),\n 'hierarchical' => false,\n 'public' => false,\n 'show_ui' => true,\n 'show_in_menu' => 'edit.php?post_type=acf-field-group',\n 'menu_icon' => 'dashicons-layout',\n 'show_in_admin_bar' => false,\n 'show_in_nav_menus' => false,\n 'can_export' => false,\n 'has_archive' => false,\n 'rewrite' => false,\n 'exclude_from_search' => true,\n 'publicly_queryable' => false,\n 'capabilities' => array(\n 'publish_posts' => $capability,\n 'edit_posts' => $capability,\n 'edit_others_posts' => $capability,\n 'delete_posts' => $capability,\n 'delete_others_posts' => $capability,\n 'read_private_posts' => $capability,\n 'edit_post' => $capability,\n 'delete_post' => $capability,\n 'read_post' => $capability,\n ),\n 'acfe_admin_orderby' => 'title',\n 'acfe_admin_order' => 'ASC',\n 'acfe_admin_ppp' => 999,\n ));\n \n }", "function register_block_assets() {\n wp_register_script(\n 'block-js',\n plugins_url( '/build/index.js' , __FILE__ ),\n ['wp-blocks']\n );\n\n // register our block styles\n wp_register_style(\n 'block-style',\n plugins_url( '/style.css' , __FILE__ ),\n [] \n );\n\n // register our editor styles\n wp_register_style(\n 'block-editor-style',\n plugins_url( '/editor.css' , __FILE__ ),\n []\n );\n\n // register our block\n register_block_type( 'jsadvancers/basic-block', array(\n 'editor_script' => 'block-js',\n 'editor_style' => 'block-editor-style',\n 'style' => 'block-style'\n ));\n\n\n}", "function lets_start_block(){\n wp_register_script(\n 'lets-start-script',\n get_template_directory_uri() . '/js/block-lets-start.js',\n array( 'wp-blocks', 'wp-element', 'wp-editor', 'wp-components' )\n );\n\n wp_register_style(\n 'lets-start-editor-style',\n get_template_directory_uri() . '/css/block-lets-start-editor-style.css',\n array( 'wp-edit-blocks' )\n );\n\n wp_register_style(\n 'lets-start-style',\n get_template_directory_uri() . '/css/block-lets-start-style.css',\n array( 'wp-edit-blocks' )\n );\n\n register_block_type('childress/lets-start', array(\n 'editor_script' => 'lets-start-script',\n 'editor_style' => 'lets-start-editor-style',\n 'style' => 'lets-start-style',\n ) );\n}", "function validate_block_type( $block ) {\n\t\t\n\t\t// Add default settings.\n\t\t$block = wp_parse_args($block, array(\n\t\t\t'name'\t\t\t\t=> '',\n\t\t\t'title'\t\t\t\t=> '',\n\t\t\t'description'\t\t=> '',\n\t\t\t'category'\t\t\t=> 'common',\n\t\t\t'icon'\t\t\t\t=> '',\n\t\t\t'mode'\t\t\t\t=> 'preview',\n\t\t\t'align'\t\t\t\t=> '',\n\t\t\t'keywords'\t\t\t=> array(),\n\t\t\t'supports'\t\t\t=> array(),\n\t\t\t'post_types'\t\t=> array(),\n\t\t\t'render_template'\t=> '',\n\t\t\t'render_callback'\t=> false\n\t\t));\n\t\t\n\t\t// Restrict keywords to 3 max to avoid JS error.\n\t\t$block['keywords'] = array_slice($block['keywords'], 0, 3);\n\t\t\n\t\t// Generate name with prefix.\n\t\t$block['name'] = acf_slugify( 'acf/' . $block['name'] );\n\t\t\n\t\t// Add default 'supports' settings.\n\t\t$block['supports'] = wp_parse_args($block['supports'], array(\n\t\t\t'align'\t\t=> true,\n\t\t\t'html'\t\t=> false,\n\t\t\t'mode'\t\t=> true,\n\t\t));\n\t\t\n\t\t// Return block.\n\t\treturn $block;\n\t}", "public function actionBlock() {\n $user_id = $_POST['blockUserId'];\n json_decode($user_id);\n\n $block = new Blocks;\n\n $block->block_from = Yii::$app->user->identity->Id;\n $block->block_to = $user_id;\n $block->save();\n }", "function register_user_types( $user_types )\n\t{\n\t\t//reasons to fail\n\t\tif (!is_array($user_types)) return false;\n\t\t\n\t\tforeach ($user_types as $user_type)\n\t\t{\n\t\t\tregister_user_type( $user_type );\n\t\t}\n\t\treturn true;\n\t}", "public function add_blacklist(request $request, $type)\n {\n $user_id = APIController::get_APIUserID($request);\n $user_id_blocked = $request->get('user_id');\n if(empty($user_id_blocked))\n {\n return APIController::json_error(8, 'Blocked user id empty');\n }\n\n $blacklist = Blacklist::where('user_id', $user_id)\n ->where('user_id_blocked', $user_id_blocked)\n ->first();\n\n if(count($blacklist)==0)\n {\n $bl = new Blacklist();\n $user_blocked = User::where('id', $user_id_blocked)->first();\n if(count($user_blocked)!=0) {\n $bl->user_id = $user_id;\n $bl->user_id_blocked = $user_id_blocked;\n $bl->save();\n return APIController::json_empty_success();\n }\n }\n else\n {\n return APIController::json_error(17, 'You already add this user to blacklist');\n }\n }", "function subject_areas_register_block() {\r\n wp_register_script(\r\n 'subject_areas/editor-scripts',\r\n plugins_url( '/../../../build/index.js', __FILE__ ),\r\n [ 'wp-blocks', 'wp-element', 'wp-editor', 'wp-components']\r\n );\r\n\r\n register_block_type('techtrails/subject-areas', array(\r\n 'editor_script' => 'subject_areas/editor-scripts', \r\n ));\r\n}", "public function block_add($itemid,$itemtype,$blockdesc,$blocktype,$uid=\"Unknown\")\r\n\t{\r\n\t\t$uiobj=new ta_uifriend();\r\n\t\t$blockid=$uiobj->randomstring(40,tbl_block_info::dbname,tbl_block_info::tblname,tbl_block_info::col_blockid);\r\n\t\t$dbobj=new ta_dboperations();\r\n\t\tif($dbobj->dbinsert(\"INSERT INTO \".tbl_block_info::tblname.\" (\".tbl_block_info::col_blockid.\",\".tbl_block_info::col_blocktype.\",\".tbl_block_info::col_blockdesc.\",\".tbl_block_info::col_itemid.\",\".tbl_block_info::col_itemtype.\",\".tbl_block_info::col_blockuid.\")\r\n\t\t\t\tVALUES ('$blockid','$blocktype','$blockdesc','$itemid','$itemtype','$uid')\",tbl_block_info::dbname)==SUCCESS)\r\n\t\t{\r\n\t\t\treturn $blockid;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn FAILURE;\r\n\t\t}\r\n\t}", "function template_preprocess_block_content_add_list(&$variables) {\n $variables['types'] = [];\n $query = \\Drupal::request()->query->all();\n foreach ($variables['content'] as $type) {\n $variables['types'][$type->id()] = [\n 'link' => Link::fromTextAndUrl($type->label(), Url::fromRoute('block_content.add_form', ['block_content_type' => $type->id()], ['query' => $query]))->toString(),\n 'description' => [\n '#markup' => $type->getDescription(),\n ],\n 'title' => $type->label(),\n 'localized_options' => [\n 'query' => $query,\n ],\n ];\n }\n}", "function get_block_types( $args = array() ) {\n\t\treturn $this->blocks;\n\t}", "public function init()\n {\n SecurityUtil::registerPermissionSchema('Weather::Weatherblock', 'Block ID::');\n }", "public static function _register()\n {\n self::assignElements([\n 'UserID' => ['type' => 'UserIDType', 'xmlns' => self::XMLNS],\n 'FeedbackID' => [],\n 'ItemID' => ['type' => 'ItemIDType', 'xmlns' => self::XMLNS],\n 'TransactionID' => [],\n 'CommentType' => ['type' => 'CommentTypeCodeType', 'enum' => true, 'xmlns' => self::XMLNS, 'cardinality' => '0..*'],\n 'FeedbackType' => ['type' => 'FeedbackTypeCodeType', 'enum' => true, 'xmlns' => self::XMLNS],\n 'Pagination' => ['type' => 'PaginationType', 'xmlns' => self::XMLNS],\n 'OrderLineItemID' => []\n ], parent::NAME);\n\n self::assignAttributes([]);\n }", "function register_block_core_categories()\n{\n}", "function bvodola_register_gutenberg_blocks() {\n\n $blocks_dir = array_slice(scandir(get_template_directory() . '/js/blocks/'), 2);\n\n function get_block_full_name($block_file_name) {\n $exploded_block_name_array = explode('.', $block_file_name);\n $block_name = $exploded_block_name_array[0];\n return ('bvodola/' . $block_name);\n }\n\n // Block names\n $blocks = array_map('get_block_full_name', $blocks_dir);\n\n // Blocks registration\n foreach ($blocks as $block) {\n register_block_type($block, array(\n 'editor_script' => 'bundle'\n ));\n }\n \n}", "function UserDashBoard_Sideblock_info()\n{\n // block informations\n return array('module' => 'UserDashBoard',\n 'text_type' => 'Sideblock',\n 'text_type_long' => __('Customizable Sideblock'),\n 'allow_multiple' => true,\n 'form_content' => false,\n 'form_refresh' => false,\n 'show_preview' => false,\n 'admin_tableless' => true);\n}", "function indieweb_blocks_allowed( $allowed_block_types, $post ) {\n if ( $post->post_type !== 'post' ) {\n return $allowed_block_types;\n }\n return array(\n\t\t// Top Level Items\n\t\t'indieweb/url',\n\t\t'indieweb/e-content',\n\t\t'indieweb/post',\n\t\t'core/image',\n\t\t'core/video',\n\t\t'core/audio',\n\t\t'core/gallery',\n\t\t// e-content items\n\t\t\"core/paragraph\",\n\t\t\"core/heading\",\n\t\t\"core/list\",\n\t\t\"core/image\",\n\t\t\"core/audio\",\n\t\t\"core/block\",\n\t\t\"core/buttons\",\n\t\t\"core/code\",\n\t\t\"core/gallery\",\n\t\t\"core/group\",\n\t\t\"core/preformatted\",\n\t\t\"core/quote\",\n\t\t\"core/separator\",\n\t\t\"core/table\",\n\t\t\"core/video\",\n\t);\n}", "function register_block() {\n\t// Only load this block on WordPress.com.\n\tif ( ( defined( 'IS_WPCOM' ) && IS_WPCOM ) || jetpack_is_atomic_site() ) {\n\t\t// Determine required `context` key based on Gutenberg version.\n\t\t$deprecated = function_exists( 'gutenberg_get_post_from_context' );\n\t\t$provides = $deprecated ? 'providesContext' : 'provides_context';\n\n\t\tBlocks::jetpack_register_block(\n\t\t\tFEATURE_NAME,\n\t\t\tarray(\n\t\t\t\t'render_callback' => __NAMESPACE__ . '\\render_block',\n\t\t\t\t'plan_check' => true,\n\t\t\t\t'attributes' => array(\n\t\t\t\t\t'isPremiumContentChild' => array(\n\t\t\t\t\t\t'type' => 'boolean',\n\t\t\t\t\t\t'default' => true,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t$provides => array(\n\t\t\t\t\t'premium-content/planId' => 'selectedPlanId',\n\t\t\t\t\t'isPremiumContentChild' => 'isPremiumContentChild',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t}\n}", "function register_block() {\n\tBlocks::jetpack_register_block(\n\t\tBLOCK_NAME,\n\t\tarray(\n\t\t\t'plan_check' => true,\n\t\t)\n\t);\n}", "function hero_box_block(){\n wp_register_script(\n 'hero-box-script',\n get_template_directory_uri() . '/js/block-hero-box.js',\n array( 'wp-blocks', 'wp-element', 'wp-editor', 'wp-components' )\n );\n\n wp_register_style(\n 'hero-box-editor-style',\n get_template_directory_uri() . '/css/block-hero-box-editor-style.css',\n array( 'wp-edit-blocks' )\n );\n\n wp_register_style(\n 'hero-box-style',\n get_template_directory_uri() . '/css/block-hero-box-style.css',\n array( 'wp-edit-blocks' )\n );\n\n register_block_type('childress/hero-box', array(\n 'editor_script' => 'hero-box-script',\n 'editor_style' => 'hero-box-editor-style',\n 'style' => 'hero-box-style',\n ) );\n}", "function blocks_admin_create()\n{ \n // Get parameters\n list($title,\n $blockid,\n $language,\n $collapsable,\n $defaultstate,\n $position) = pnVarCleanFromInput('title',\n 'blockid',\n 'language',\n 'collapsable',\n 'defaultstate',\n 'position');\n\n list($mid, $bkey) = split(':', $blockid); \n\n // Fix for null language\n if (!isset($language)) {\n $language = '';\n } \n\n // Confirm authorisation code\n if (!pnSecConfirmAuthKey()) {\n pnSessionSetVar('errormsg', _BADAUTHKEY);\n pnRedirect(pnModURL('Blocks', 'admin', 'view'));\n return true;\n } \n\n // Pass to API\n $bid = pnModAPIFunc('Blocks',\n 'admin',\n 'create', array('bkey' => $bkey,\n 'title' => $title,\n 'mid' => $mid,\n 'language' => $language,\n 'collapsable' => $collapsable,\n 'defaultstate' => $defaultstate,\n 'position' => $position));\n if ($bid != false) {\n // Success\n pnSessionSetVar('statusmsg', _BLOCKCREATED); \n\n // Send to modify page to update block specifics\n pnRedirect(pnModURL('Blocks', 'admin', 'modify', array('bid' => $bid)));\n\n return true;\n } \n\n pnRedirect(pnModURL('Blocks', 'admin', 'view'));\n\n return true;\n}", "function tabs_block(){\n wp_register_script(\n 'tabs-script',\n get_template_directory_uri() . '/js/block-tabs.js',\n array( 'wp-blocks', 'wp-element', 'wp-editor', 'wp-components' )\n );\n\n wp_register_style(\n 'tabs-editor-style',\n get_template_directory_uri() . '/css/block-tabs-editor-style.css',\n array( 'wp-edit-blocks' )\n );\n\n wp_register_style(\n 'tabs-style',\n get_template_directory_uri() . '/css/block-tabs-style.css',\n array( 'wp-edit-blocks' )\n );\n\n register_block_type('childress/tabs', array(\n 'editor_script' => 'tabs-script',\n 'editor_style' => 'tabs-editor-style',\n 'style' => 'tabs-style',\n ) );\n}", "public function register() {\n\n // Editor only script.\n add_action( 'enqueue_block_editor_assets', [ $this, 'enqueue_block_editor_script' ] );\n\n // Editor only style.\n add_action( 'enqueue_block_editor_assets', [ $this, 'enqueue_block_editor_style' ], 50 );\n\n // Editor and frontend style.\n add_action( 'enqueue_block_assets', [ $this, 'enqueue_block_style' ], 50 );\n\n // Frontend only script.\n add_action( 'wp_enqueue_scripts', [ $this, 'enqueue_block_script' ] );\n }", "public function setUserType($userType) {\n $this->userType = $userType;\n }", "public function setUserType($userType) {\n $this->userType = $userType;\n }", "function icon_row_block(){\n wp_register_script(\n 'icon-row-script',\n get_template_directory_uri() . '/js/block-icon-row.js',\n array( 'wp-blocks', 'wp-element', 'wp-editor', 'wp-components' )\n );\n\n wp_register_style(\n 'icon-row-editor-style',\n get_template_directory_uri() . '/css/block-icon-row-editor-style.css',\n array( 'wp-edit-blocks' )\n );\n\n wp_register_style(\n 'icon-row-style',\n get_template_directory_uri() . '/css/block-icon-row-style.css',\n array( 'wp-edit-blocks' )\n );\n\n register_block_type('childress/icon-row', array(\n 'editor_script' => 'icon-row-script',\n 'editor_style' => 'icon-row-editor-style',\n 'style' => 'icon-row-style',\n ) );\n}", "function installBlockPlugins() {\n\t\t$pluginSettingsDao =& DAORegistry::getDAO('PluginSettingsDAO');\n\t\t$conferenceDao =& DAORegistry::getDAO('ConferenceDAO');\n\t\t$conferences =& $conferenceDao->getConferences();\n\n\t\t// Get conference IDs for insertion, including 0 for site-level\n\t\t$conferenceIds = array(0);\n\t\twhile ($conference =& $conferences->next()) {\n\t\t\t$conferenceIds[] = $conference->getId();\n\t\t\tunset($conference);\n\t\t}\n\n\t\t$pluginNames = array(\n\t\t\t'DevelopedByBlockPlugin',\n\t\t\t'HelpBlockPlugin',\n\t\t\t'UserBlockPlugin',\n\t\t\t'RoleBlockPlugin',\n\t\t\t'LanguageToggleBlockPlugin',\n\t\t\t'NavigationBlockPlugin',\n\t\t\t'FontSizeBlockPlugin',\n\t\t\t'InformationBlockPlugin'\n\t\t);\n\t\tforeach ($conferenceIds as $conferenceId) {\n\t\t\t$i = 0;\n\t\t\tforeach ($pluginNames as $pluginName) {\n\t\t\t\t$pluginSettingsDao->updateSetting($conferenceId, 0, $pluginName, 'enabled', 'true', 'bool');\n\t\t\t\t$pluginSettingsDao->updateSetting($conferenceId, 0, $pluginName, 'seq', $i++, 'int');\n\t\t\t\t$pluginSettingsDao->updateSetting($conferenceId, 0, $pluginName, 'context', BLOCK_CONTEXT_RIGHT_SIDEBAR, 'int');\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "public static function im_ui_block()\n {\n wp_enqueue_script(\n 'im-ui-block-js',\n plugin_dir_url(__FILE__) . '/js/map-ui.js',\n array('wp-blocks', 'wp-element')\n );\n\n register_block_type('layouts/im-ui-block', [\n 'editor_script' => 'im-ui-block-js'\n ]);\n\n // wp_enqueue_style(\n // 'im-ui-block-css',\n // plugins_url('/css/map-styles.css', dirname(__FILE__)),\n // array('wp-edit-blocks')\n // );\n }", "public static function register($class, $type){\n switch($type){\n case 'UserMod':\n self::$_usermod[] = $class;\n break;\n default:\n throw new Exception('Unknown type \"'.$type.'\" can not be registered in CMS::register. Caller: '.$class);\n }\n }", "function pj_block_image_block_init() {\n register_block_type_from_metadata(__DIR__, [\n 'render_callback' => 'pj_block_image_dynamic_render',\n ]);\n}", "function profile2_create_add($type) {\n global $user;\n\n $types = profile2_get_types();\n $profile = profile2_create(array('type' => $types[$type]));\n drupal_set_title(t('Create @name', array('@name' => $types[$type]->label)), PASS_THROUGH);\n $output = drupal_get_form('profile2_create_form', $profile);\n\n\n return $output;\n}", "public function register_widgets() {\n // Its is now safe to include Widgets files\n $client=is_admin()?1:0;\n $wordpress=Factory::getOpenSource();\n $list_block_front_end=$wordpress->get_list_layout_block_frontend();\n\n foreach($list_block_front_end as $key=> $block){\n $file_widget=WPBOOKINGPRO_ROOT_PATH_PLUGIN.\"/blocks/block_$key/{$key}Widget.php\";\n if(file_exists($file_widget)) {\n require_once $file_widget;\n $class_block_widget = \"{$key}Widget\";\n \\Elementor\\Plugin::instance()->widgets_manager->register_widget_type(new $class_block_widget());\n }\n\n }\n }", "public function __construct($userType)\n {\n $this->userType = $this->userType;;\n }", "public function createBuilder($type = 'Uneak\\AssetsBundle\\Block\\Extension\\Core\\Type\\BlockType', $data = null, array $options = array());", "function OnAfterUserRegisterHandler(&$arFields){\n\t//$arFields[\"USER_ID\"]\n\tif($arFields[\"RESULT_MESSAGE\"][\"TYPE\"] != \"ERROR\" && CModule::IncludeModule(\"iblock\") && (int)$_GET[\"code\"] > 0){\n\n \t$ob = CIBlockElement::GetList( Array(\"SORT\"=>\"ASC\"), Array(\"IBLOCK_ID\" => PASS_ID, \"PROPERTY_code_number\" => $_GET[\"code\"]), false, false, Array(\"ID\"));\n \tif($rez = $ob->GetNextElement()){\n \t\t$arResult = $rez->GetFields();\n \t\t$ID = $arResult[\"ID\"];\n \t\tCIBlockElement::SetPropertyValuesEx( $ID, PASS_ID, array(\"USER_ID\" => $arFields[\"USER_ID\"]));\n \t}\n \tLocalRedirect(\"/lk/\");\n\t}\n}", "public function add_attributes_to_blocks() {\n\t\t$registered_blocks = \\WP_Block_Type_Registry::get_instance()->get_all_registered();\n\n\t\tforeach( $registered_blocks as $name => $block ) {\n\t\t\t$block->attributes['hasCustomCSS'] = array(\n\t\t\t\t'type' => 'boolean',\n\t\t\t\t'default' => false\n\t\t\t);\n\n\t\t\t$block->attributes['customCSS'] = array(\n\t\t\t\t'type' => 'string',\n\t\t\t\t'default' => ''\n\t\t\t);\n\t\t}\n\t}", "public function block_users_comments($type = \"\", $uid = \"\")\n\t{\n\t\tif($this->user_type != 1)\n\t\t{\n\t\t\tcommon::message(-1, $this->Lang[\"YOU_CAN_NOT_MODULE\"]); \n\t\t\turl::redirect(PATH.\"admin.html\");\n\t\t}\n\t\t$status = $this->merchant->blockunblockusercomments($type, $uid);\n\t\tif($status == 1){\n\t\t\tif($type == 1){\n\t\t\t\tcommon::message(1, $this->Lang[\"COMM_UNB\"]);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tcommon::message(1, $this->Lang[\"COMM_B\"]);\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tcommon::message(-1, $this->Lang[\"NO_RECORD_FOUND\"]);\n\t\t}\n\t\turl::redirect(PATH.\"admin/manage-store-comments.html\");\n\t}", "public function load_registered_blocks()\n {\n trigger_notify('blockmanager_register_blocks', array($this));\n }", "public function installIblock()\n {\n\t\t\n\t\t$db_iblock_type = CIBlockType::GetList(array(), array('=ID'=>CODE_IBLOCK_TYPE));\n\t\tif(!$ar_iblock_type = $db_iblock_type->Fetch())\n\t\t{\n\t\t\tglobal $DB;\n\t\t\t$obBlocktype = new CIBlockType;\n\t\t\t$DB->StartTransaction();\n\t\t\t$res = $obBlocktype->Add(\n\t\t\t\tarray(\n\t\t\t\t\t'ID'=>CODE_IBLOCK_TYPE,\n\t\t\t\t\t'SECTIONS'=>'Y',\n\t\t\t\t\t'IN_RSS'=>'N',\n\t\t\t\t\t'SORT'=>500,\n\t\t\t\t\t'LANG'=>Array(\n\t\t\t\t\t\t'ru'=>Array(\n\t\t\t\t\t\t\t'NAME'=>'Сервисы',\n\t\t\t\t\t\t\t'SECTION_NAME'=>'Разделы',\n\t\t\t\t\t\t\t'ELEMENT_NAME'=>'Страницы'),\n\t\t\t\t\t\t'en'=>Array(\n\t\t\t\t\t\t\t'NAME'=>'Servies',\n\t\t\t\t\t\t\t'SECTION_NAME'=>'Sections',\n\t\t\t\t\t\t\t'ELEMENT_NAME'=>'Pages'),\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\t\t\tif(!$res)\n\t\t\t{\n\t\t\t $DB->Rollback();\n\t\t\t echo 'Error: '.$obBlocktype->LAST_ERROR.'<br>';\n\t\t\t}\n\t\t\telse\n\t\t\t $DB->Commit();\n\t\t}\n\n\t\t$idBlock = 0;\n\t\t$res = CIBlock::GetList(Array(),Array('TYPE'=>CODE_IBLOCK_TYPE,'SITE_ID'=>SITE_ID,'ACTIVE'=>'Y',\"CODE\"=>CODE_IBLOCK_CODE), true);\n\t\tif(!$ar_res = $res->Fetch())\n\t\t{\n\t\t\t$ib = new CIBlock;\n\t\t\t$arFields = Array(\n\t\t\t\t\"ACTIVE\" => 'Y',\n\t\t\t\t\"NAME\" => 'СЕО страницы',\n\t\t\t\t\"CODE\" => CODE_IBLOCK_CODE,\n\t\t\t\t\"LIST_PAGE_URL\" => \"\",\n\t\t\t\t\"DETAIL_PAGE_URL\" => \"\",\n\t\t\t\t\"IBLOCK_TYPE_ID\" => CODE_IBLOCK_TYPE,\n\t\t\t\t\"SITE_ID\" => Array(SITE_ID),\n\t\t\t\t\"SORT\" => '500',\n\t\t\t\t\"GROUP_ID\" => Array(\"2\"=>\"R\")\n\t\t\t);\n\t\t\t$idBlock = $ib->Add($arFields);\n\t\t}else{\n\t\t\t$idBlock = $ar_res['ID'];\n\t\t}\n\n\t\t$PropID = 0;\n\t\t$properties = CIBlockProperty::GetList(Array(\"sort\"=>\"asc\"), Array(\"ACTIVE\"=>\"Y\", \"IBLOCK_ID\"=>$idBlock, \"CODE\"=>CODE_PROP_IBLOCK));\n\t\tif(!$prop_fields = $properties->GetNext())\n\t\t{\n\t\t\t$arFieldsProps = Array(\n\t\t\t\t\"NAME\" => \"URL копия\",\n\t\t\t\t\"ACTIVE\" => \"Y\",\n\t\t\t\t\"SORT\" => \"500\",\n\t\t\t\t\"CODE\" => CODE_PROP_IBLOCK,\n\t\t\t\t\"PROPERTY_TYPE\" => \"S\",\n\t\t\t\t\"IS_REQUIRED\"=>'Y',\n\t\t\t\t\"IBLOCK_ID\" => $idBlock,\n\t\t\t);\n\t\t\t$ibp = new CIBlockProperty;\n\t\t\t$PropID = $ibp->Add($arFieldsProps);\n\t\t\t\n\t\t}else{\n\t\t\t$PropID = $prop_fields['ID'];\n\t\t}\n\n\t\tglobal $DB;\n\t\t$DB->PrepareFields(\"b_citfact_uservars_group\");\n\t\t$arFieldsDB = array(\n\t\t\t'NAME'=>\"'СЕО Страницы'\",\n\t\t\t'CODE'=>\"'\".CODE_GROUP_USER_VARS.\"'\",\n\t\t);\n\n\t\t$IDGroup = $DB->Insert(\"b_citfact_uservars_group\", $arFieldsDB, $err_mess.__LINE__);\n\t\t$IDGroup = intval($IDGroup);\n\t\t$arFieldsDB = array(\n\t\t\t'GROUP_ID'=>\"'\".$IDGroup.\"'\",\n\t\t\t'NAME'=>\"'ID свойства в SEO'\",\n\t\t\t'CODE'=>\"'\".CODE_PROPS_SEO_BLOCK_USER_VARS.\"'\",\n\t\t\t'VALUE'=>\"'\".$PropID.\"'\",\n\t\t\t'DESCRIPTION'=>\"'Символьный код свойства в инфоблоке SEO Страниц'\",\n\t\t);\n\t\t$DB->Insert(\"b_citfact_uservars\", $arFieldsDB, $err_mess.__LINE__);\n\t\t$arFieldsDB = array(\n\t\t\t'GROUP_ID'=>\"'\".$IDGroup.\"'\",\n\t\t\t'NAME'=>\"'Инфоблок SEO'\",\n\t\t\t'CODE'=>\"'\".CODE_ID_SEO_BLOCK_USER_VARS.\"'\",\n\t\t\t'VALUE'=>\"'\".$idBlock.\"'\",\n\t\t\t'DESCRIPTION'=>\"'Инфоблок SEO'\",\n\t\t);\n\t\t$DB->Insert(\"b_citfact_uservars\", $arFieldsDB, $err_mess.__LINE__);\n\t\t$arFieldsDB = array(\n\t\t\t'GROUP_ID'=>\"'\".$IDGroup.\"'\",\n\t\t\t'NAME'=>\"'Редирект'\",\n\t\t\t'CODE'=>\"'\".CODE_IS_REDIRECT_SEO.\"'\",\n\t\t\t'VALUE'=>\"'N'\",\n\t\t\t'DESCRIPTION'=>\"'Если установлен данный параметр, будет работать редирект из обычной страницы на сео-страницу'\",\n\t\t);\n\t\t$DB->Insert(\"b_citfact_uservars\", $arFieldsDB, $err_mess.__LINE__);\n\n return true;\n }", "private function createTypes()\n {\n $this->makeType('Post Types', 'Permission', 'format_align_left');\n $this->makeType('Permissions', 'Permission', 'supervised_user_circle');\n $this->makeType('Task Types', 'Permission', 'rowing');\n $this->makeType('Tasks', 'Permission', 'rowing');\n $this->makeType('Groups', 'Permission', 'group');\n $this->makeType('Users', 'Permission', 'person');\n $this->makeType('Reports', 'Permission', 'bar_chart');\n $this->makeType('Clients', 'Permission', 'assignment_ind');\n $this->makeType('Posts', 'Permission', 'chrome_reader_mode');\n $this->makeType('Files', 'Permission', 'folder_shared');\n\n $this->makeType('Documentation', 'Post', 'chrome_reader_mode');\n $this->makeType('Announcements', 'Post', 'chrome_reader_mode');\n $this->makeType('Sprint', 'Task', 'directions_run');\n $this->makeType('Task', 'Task', 'rowing');\n $this->makeType('Team', 'Task', 'group');\n $this->makeType('Project', 'Task', 'timeline');\n }", "function icon_grid_block(){\n wp_register_script(\n 'icon-grid-script',\n get_template_directory_uri() . '/js/block-icon-grid.js',\n array( 'wp-blocks', 'wp-element', 'wp-editor', 'wp-components' )\n );\n\n wp_register_style(\n 'icon-grid-editor-style',\n get_template_directory_uri() . '/css/block-icon-grid-editor-style.css',\n array( 'wp-edit-blocks' )\n );\n\n wp_register_style(\n 'icon-grid-style',\n get_template_directory_uri() . '/css/block-icon-grid-style.css',\n array( 'wp-edit-blocks' )\n );\n\n register_block_type('childress/icon-grid', array(\n 'editor_script' => 'icon-grid-script',\n 'editor_style' => 'icon-grid-editor-style',\n 'style' => 'icon-grid-style',\n ) );\n}", "public function registerFieldTypes() {}", "public static function _register()\n {\n self::assignElements([\n 'RightsOwnerID' => ['type' => 'UserIDType', 'xmlns' => self::XMLNS],\n 'ReportItems' => ['type' => 'VeROReportItemsType', 'xmlns' => self::XMLNS]\n ], parent::NAME);\n\n self::assignAttributes([]);\n }", "function newspack_blocks_register_iframe() {\n\t$block_json = json_decode(\n\t\tfile_get_contents( __DIR__ . '/block.json' ), // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents\n\t\ttrue\n\t);\n\n\tregister_block_type(\n\t\t'newspack-blocks/' . $block_json['name'],\n\t\t[\n\t\t\t'attributes' => $block_json['attributes'],\n\t\t\t'render_callback' => 'newspack_blocks_render_block_iframe',\n\t\t]\n\t);\n}", "function lapizzeria_block_register() {\n # Valida si Gutenberg NO esta disponible\n if( ! function_exists( 'register_block_type' ) ) {\n return;\n }\n\n # Registra archivo de acceso a bloques en Gutenberg\n wp_register_script(\n 'lapizzeria-editor-script', # Handle: Debe tener un nombre unico\n plugins_url( 'build/index.js' , __FILE__ ), # File: Archivo que contiene los bloques\n [ # Dependencies: Librerias requeridas para la creacion de bloques\n 'wp-blocks', # Para definir nuestros bloques\n 'wp-i18n', # Para traducir nuestros bloques\n 'wp-element', # Contiene elementos de Gutenberg\n 'wp-editor' # Editor Gutenberg \n ],\n filemtime( plugin_dir_path( __FILE__ ). 'build/index.js' ) # Version: Ultima version generada el archivo\n );\n\n # Registra archivo de acceso a Hoja de Estilos para Gutenberg (unicamente para el editor)\n wp_register_style(\n 'lapizzeria-editor-style', # Handle: Debe tener un nombre unico\n plugins_url( 'build/editor.css' , __FILE__ ), # File: Archivo que contiene hojas de estilo para los bloques en el editor\n [ # Dependencies: Librerias requeridas para la creacion de bloques\n 'wp-edit-blocks', # Exclusivamente para el editor de bloques\n ],\n filemtime( plugin_dir_path( __FILE__ ). 'build/editor.css' ) # Version: Ultima version generada el archivo\n );\n\n # Registra archivo de acceso a Hoja de Estilos (BackEnd & FrontEnd)\n wp_register_style(\n 'lapizzeria-backfront-style', # Handle: Debe tener un nombre unico\n plugins_url( 'build/styles.css' , __FILE__ ), # File: Archivo que contiene hojas de estilo para los bloques en el BackEnd y el en FrontEnd\n [], # Dependencies: Librerias requeridas (Ej: jQuery entre muchas otras)\n filemtime( plugin_dir_path( __FILE__ ). 'build/styles.css' ) # Version: Ultima version generada el archivo\n );\n\n /** Define listado de bloques del Plugin */\n $blocks = [\n 'lapizzeria/block-boxes'\n ];\n\n /** Recorre listado de bloques para agregar scritps y hojas de estilo registradas a WordPress */\n foreach( $blocks as $block ) {\n /** Registra un tipo de bloque.\n * Equivale al wp_enqueue_style o wp_enqueue_script de un bloque */\n register_block_type(\n $block, # Block name\n [ # Argumentos del tipo de bloque\n 'editor_script' => 'lapizzeria-editor-script', # Scripts para el editor\n 'editor_style' => 'lapizzeria-editor-style', # Hoja de Estilos para el editor\n 'style' => 'lapizzeria-backfront-style' # Hoja de Estilos compartida para el FrontEnd y el BackEnd\n ]\n );\n }\n\n /** Registra un bloque dinámico \n * Equivale al wp_enqueue_style o wp_enqueue_script de un bloque */\n register_block_type(\n 'lapizzeria/menu', # Block name\n [ # Argumentos del tipo de bloque\n 'editor_script' => 'lapizzeria-editor-script', # Scripts para el editor\n 'editor_style' => 'lapizzeria-editor-style', # Hoja de Estilos para el editor\n 'style' => 'lapizzeria-backfront-style', # Hoja de Estilos compartida para el FrontEnd y el BackEnd\n 'render_callback' => 'lapizzeria_specialties_frontend' # Funcion consulta API para mostrar en el FrontEnd (CallBack)\n ]\n );\n\n\n}", "function my_custom_block() {\n\twp_register_script(\n\t\t\"first-es6-block-editor\",\n\t\tplugins_url(\"build/index.js\", __FILE__),\n\t\tarray(\"wp-blocks\", \"wp-element\", \"wp-editor\"),\n\t\tfilemtime(plugin_dir_path(__FILE__) . \"build/index.js\")\n\t);\n\n\twp_register_style(\n\t\t\"first-es6-block-style\",\n\t\tplugins_url(\"src/style.css\", __FILE__),\n\t\tarray(),\n\t\tfilemtime(plugin_dir_path(__FILE__ . \"src/style.css\"))\n\t);\n\n\twp_register_style(\n\t\t\"first-es6-block-editor-style\",\n\t\tplugins_url(\"src/editor.css\", __FILE__, ),\n\t\tarray(\"wp-edit-blocks\"),\n\t\tfilemtime(plugin_dir_path(__FILE__ . \"src/editor.css\"))\n\t);\n\n\tregister_block_type(\"first-es6-block/test-block\", array(\n\t\t\"style\" => \"first-es6-block-style\",\n\t\t\"editor_style\" => \"first-es6-block-editor-style\",\n\t\t\"editor_script\"=> \"first-es6-block-editor\"\n\t));\n }", "function Register($type, $handler)\n\t\t{\n\t\t\t$this->databaseTypes[$type] = $handler;\n\t\t}", "function ep_load_usertype_message() {\n register_widget( 'ep_usertype_message' );\n }", "function rmc_blocks_new(){\n $db = XoopsDatabaseFactory::getDatabaseConnection();\n \n $blocks = RMBlocksFunctions::get_available_list($modules);\n \n // Get intalled modules\n $result = $db->query(\"SELECT * FROM \".$db->prefix(\"modules\").\" WHERE isactive=1 ORDER BY `name`\");\n while($row = $db->fetchArray($result)){\n $modules[] = array('dir'=>$row['dirname'], 'name'=>$row['name']);\n }\n \n // Cargamos los grupos\n $sql = \"SELECT groupid, name FROM \" . $db->prefix(\"groups\") . \" ORDER BY name\";\n $result = $db->query($sql);\n $groups = array();\n while ($row = $db->fetchArray($result)) {\n $groups[] = array('id' => $row['groupid'], 'name' => $row['name']);\n }\n \n $widget['title'] = 'Add Block';\n $widget['icon'] = '';\n ob_start();\n include RMTemplate::get()->get_template('widgets/rmc_aw_bknew.php');\n $widget['content'] = ob_get_clean();\n return $widget;\n}", "function laskins_register_user_profile_metabox() {\n\n\t// Start with an underscore to hide fields from custom fields list\n\t$prefix = '_laskins_user_';\n\n\t/**\n\t * Metabox for the user profile screen\n\t */\n\t$cmb_user = new_cmb2_box( array(\n\t\t'id' => $prefix . 'edit',\n\t\t'title' => __( 'User Profile Metabox', 'cmb2' ),\n\t\t'object_types' => array( 'user' ), // Tells CMB to use user_meta vs post_meta\n\t\t'show_names' => true,\n\t\t'new_user_section' => 'add-new-user', // where form will show on new user page. 'add-existing-user' is only other valid option.\n\t) );\n\n\t$cmb_user->add_field( array(\n\t\t'name' => __( 'Extra Info', 'cmb2' ),\n\t\t'desc' => __( 'field description (optional)', 'cmb2' ),\n\t\t'id' => $prefix . 'extra_info',\n\t\t'type' => 'title',\n\t\t'on_front' => false,\n\t) );\n\n\t$cmb_user->add_field( array(\n\t\t'name' => __( 'Avatar', 'cmb2' ),\n\t\t'desc' => __( 'field description (optional)', 'cmb2' ),\n\t\t'id' => $prefix . 'avatar',\n\t\t'type' => 'file',\n\t) );\n\n\t$cmb_user->add_field( array(\n\t\t'name' => __( 'Facebook URL', 'cmb2' ),\n\t\t'desc' => __( 'field description (optional)', 'cmb2' ),\n\t\t'id' => $prefix . 'facebookurl',\n\t\t'type' => 'text_url',\n\t) );\n\n\t$cmb_user->add_field( array(\n\t\t'name' => __( 'Twitter URL', 'cmb2' ),\n\t\t'desc' => __( 'field description (optional)', 'cmb2' ),\n\t\t'id' => $prefix . 'twitterurl',\n\t\t'type' => 'text_url',\n\t) );\n\n\t$cmb_user->add_field( array(\n\t\t'name' => __( 'Google+ URL', 'cmb2' ),\n\t\t'desc' => __( 'field description (optional)', 'cmb2' ),\n\t\t'id' => $prefix . 'googleplusurl',\n\t\t'type' => 'text_url',\n\t) );\n\n\t$cmb_user->add_field( array(\n\t\t'name' => __( 'Linkedin URL', 'cmb2' ),\n\t\t'desc' => __( 'field description (optional)', 'cmb2' ),\n\t\t'id' => $prefix . 'linkedinurl',\n\t\t'type' => 'text_url',\n\t) );\n\n\t$cmb_user->add_field( array(\n\t\t'name' => __( 'User Field', 'cmb2' ),\n\t\t'desc' => __( 'field description (optional)', 'cmb2' ),\n\t\t'id' => $prefix . 'user_text_field',\n\t\t'type' => 'text',\n\t) );\n\n}", "public function run()\n {\n $types = [\n ['name' => 'Системный'],\n ['name' => 'Пользовательский'],\n ];\n\n Type::insert($types);\n }", "public static function register_gutenberg_blocks() {\n\t\t\t$blocks = array(\n\t\t\t\t'yith-wcwl-add-to-wishlist' => array(\n\t\t\t\t\t'style' => 'yith-wcwl-main',\n\t\t\t\t\t'script' => 'jquery-yith-wcwl',\n\t\t\t\t\t'title' => _x( 'YITH Add to Wishlist', '[gutenberg]: block name', 'yith-woocommerce-brands-add-on' ),\n\t\t\t\t\t'description' => _x( 'Shows Add to Wishlist button', '[gutenberg]: block description', 'yith-woocommerce-brands-add-on' ),\n\t\t\t\t\t'shortcode_name' => 'yith_wcwl_add_to_wishlist',\n\t\t\t\t\t'attributes' => array(\n\t\t\t\t\t\t'product_id' => array(\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t'label' => __( 'ID of the product to add to wishlist (leave empty to use global product)', 'yith-woocommerce-brands-add-on' ),\n\t\t\t\t\t\t\t'default' => '',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'wishlist_url' => array(\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t'label' => __( 'Url of wishlist page (leave empty to use default)', 'yith-woocommerce-brands-add-on' ),\n\t\t\t\t\t\t\t'default' => '',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'label' => array(\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t'label' => __( 'Button label (leave empty to use default)', 'yith-woocommerce-brands-add-on' ),\n\t\t\t\t\t\t\t'default' => '',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'browse_wishlist_text' => array(\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t'label' => __( '\"Browse wishlist\" label (leave empty to use default)', 'yith-woocommerce-brands-add-on' ),\n\t\t\t\t\t\t\t'default' => '',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'already_in_wishslist_text' => array(\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t'label' => __( '\"Product already in wishlist\" label (leave empty to use default)', 'yith-woocommerce-brands-add-on' ),\n\t\t\t\t\t\t\t'default' => '',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'product_added_text' => array(\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t'label' => __( '\"Product added to wishlist\" label (leave empty to use default)', 'yith-woocommerce-brands-add-on' ),\n\t\t\t\t\t\t\t'default' => '',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'icon' => array(\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t'label' => __( 'Icon for the button (use any FontAwesome valid class, or leave empty to use default)', 'yith-woocommerce-brands-add-on' ),\n\t\t\t\t\t\t\t'default' => '',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'link_classes' => array(\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t'label' => __( 'Additional css classes for the button (leave empty to use default)', 'yith-woocommerce-brands-add-on' ),\n\t\t\t\t\t\t\t'default' => '',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'yith-wcwl-wishlist' => array(\n\t\t\t\t\t'style' => 'yith-wcwl-main',\n\t\t\t\t\t'script' => 'jquery-yith-wcwl',\n\t\t\t\t\t'title' => _x( 'YITH Wishlist', '[gutenberg]: block name', 'yith-woocommerce-brands-add-on' ),\n\t\t\t\t\t'description' => _x( 'Shows list of products in wishlist', '[gutenberg]: block description', 'yith-woocommerce-brands-add-on' ),\n\t\t\t\t\t'shortcode_name' => 'yith_wcwl_wishlist',\n\t\t\t\t\t'attributes' => array(\n\t\t\t\t\t\t'pagination' => array(\n\t\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t\t'label' => __( 'Choose whether to paginate items in the wishlist or show them all', 'yith-woocommerce-brands-add-on' ),\n\t\t\t\t\t\t\t'default' => 'no',\n\t\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t\t'yes' => __( 'Paginate', 'yith-woocommerce-wishlist' ),\n\t\t\t\t\t\t\t\t'no' => __( 'Do not paginate', 'yith-woocommerce-wishlist' )\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'per_page' => array(\n\t\t\t\t\t\t\t'type' => 'number',\n\t\t\t\t\t\t\t'label' => __( 'Number of items to show for each page', 'yith-woocommerce-brands-add-on' ),\n\t\t\t\t\t\t\t'default' => '5',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'wishlist_id' => array(\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t'label' => __( 'ID of the wishlist to show (EG: K6EOWXB888ZD)', 'yith-woocommerce-brands-add-on' ),\n\t\t\t\t\t\t\t'default' => '',\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\tyith_plugin_fw_gutenberg_add_blocks( $blocks );\n\t\t}", "function userTypeList() {\r\n $list = array(\r\n '0' => '-- Select user --',\r\n 'TYPE_SUP' => 'Super User',\r\n 'TYPE_IT' => 'Assistant',\r\n 'TYPE_ACC' => 'Accountant'\r\n );\r\n return $list;\r\n }", "public static function register_public(): void {\n\t\tstatic::remove_default_block_theme();\n\n\t\tforeach ( static::public() as $asset ) {\n\t\t\t$asset->register( static::$theme_class::get_version() );\n\t\t}\n\n\t\tforeach ( static::get_styled_blocks() as $name => $shortname ) {\n\t\t\tif ( str_starts_with( $name, 'bm' ) ) {\n\t\t\t\t$handle = \"bm-block-$shortname\";\n\t\t\t} else {\n\t\t\t\t$handle = \"wp-block-$shortname\";\n\t\t\t}\n\n\t\t\twp_register_style( $handle, get_theme_file_uri( 'assets/styles/dist/blocks/' . $shortname . '.css' ), [], static::$theme_class::get_version(), 'all' );\n\t\t\twp_style_add_data( $handle, 'path', get_theme_file_path( \"assets/styles/dist/blocks/$shortname.css\" ) );\n\n\t\t\t// Add editor styles.\n\t\t\tadd_editor_style( \"assets/styles/dist/blocks/$shortname.css\" );\n\n\t\t\tif ( file_exists( get_theme_file_path( \"assets/styles/dist/blocks/$shortname-editor.css\" ) ) ) {\n\t\t\t\tadd_editor_style( \"assets/styles/dist/blocks/$shortname-editor.css\" );\n\t\t\t}\n\t\t}\n\t}", "function setTypes( $types ){ $this->types = $types; }", "public function types()\n {\n return [\n 'id' => [\n 'type' => 'number',\n 'label' => 'Id',\n 'regex' => '',\n 'overview' => false,\n 'create' => false,\n 'edit' => false,\n ],\n 'image' => [\n 'type' => 'image',\n 'label' => trans('hack::modules.users.image'),\n 'regex' => '',\n 'width' => 240,\n 'height' => 240,\n ],\n 'email' => [\n 'type' => 'text',\n 'label' => trans('hack::modules.users.email'),\n 'regex' => 'required',\n ],\n 'first_name' => [\n 'type' => 'text',\n 'label' => trans('hack::modules.users.first_name'),\n 'regex' => '',\n ],\n 'last_name' => [\n 'type' => 'text',\n 'label' => trans('hack::modules.users.last_name'),\n 'regex' => '',\n ],\n 'language' => [\n 'type' => 'select',\n 'label' => trans('hack::modules.users.language'),\n 'regex' => '',\n 'values' => config('cms.cms-languages'),\n ],\n 'password' => [\n 'type' => 'password',\n 'label' => trans('hack::modules.users.password'),\n 'regex' => 'confirmed',\n 'placeholder' => trans('hack::modules.users.password_placeholder'),\n 'confirmation_label' => 'Password again',\n 'confirmation_placeholder' => trans('hack::modules.users.password_confirm'),\n ],\n ];\n }", "function register_block_core_shortcode() {\n\tregister_block_type_from_metadata(\n\t\t__DIR__ . '/shortcode',\n\t\tarray(\n\t\t\t'render_callback' => 'render_block_core_shortcode',\n\t\t)\n\t);\n}", "function newaccount($type='',$user_type='business')\n\t{\n\t\tif(is_loggedin())\n\t\t{\n\t\t\tredirect(base_url());\n\t\t}\n\n\t\tif(get_settings('business_settings','enable_signup','Yes')=='No')\n\t\t{\n\t\t\tredirect(base_url());\n\t\t}\n\n\t\tif($user_type=='business')\n\t\t$this->session->set_userdata('signup_user_type',2);\n\t\telse\n\t\t$this->session->set_userdata('signup_user_type',3);\n\n\t\tif($type=='fb')\n\t\t\tredirect(base_url('user/fbauth'));\n\n\t\telse if($type=='google_plus')\n\t\t{\n\t\t\tredirect(base_url('user/google_plus_auth'));\n\t\t}\n\t}", "function wckochi_gutenberg_register_block() {\n\n\t// automatically load dependencies and version\n\t$asset_file = include( plugin_dir_path( __FILE__ ) . 'build/index.asset.php');\n\n\twp_register_script(\n\t\t'wckochi-gutenberg',\n\t\tplugins_url( 'build/index.js', __FILE__ ),\n\t\t$asset_file['dependencies'],\n\t\t$asset_file['version']\n\t);\n\n\twp_register_style(\n\t\t'wckochi-gutenberg-editor',\n\t\tplugins_url( 'editor.css', __FILE__ ),\n\t\tarray( 'wp-edit-blocks' ),\n\t\tfilemtime( plugin_dir_path( __FILE__ ) . 'editor.css' )\n\t);\n\n\twp_register_style(\n\t\t'wckochi-gutenberg',\n\t\tplugins_url( 'style.css', __FILE__ ),\n\t\tarray( ),\n\t\tfilemtime( plugin_dir_path( __FILE__ ) . 'style.css' )\n\t);\n\n\tregister_block_type( 'wckochi/wckochi-gutenberg', array(\n\t\t'style' => 'wckochi-gutenberg',\n\t\t'editor_style' => 'wckochi-gutenberg-editor',\n\t\t'editor_script' => 'wckochi-gutenberg',\n\t) );\n\n if ( function_exists( 'wp_set_script_translations' ) ) {\n /**\n * May be extended to wp_set_script_translations( 'my-handle', 'my-domain',\n * plugin_dir_path( MY_PLUGIN ) . 'languages' ) ). For details see\n * https://make.wordpress.org/core/2018/11/09/new-javascript-i18n-support-in-wordpress/\n */\n wp_set_script_translations( 'wckochi-gutenberg', 'wckochi' );\n }\n\n}" ]
[ "0.74068683", "0.7282186", "0.72431725", "0.69129205", "0.6737098", "0.65908945", "0.6574033", "0.6538787", "0.6455486", "0.6413193", "0.63864326", "0.6369298", "0.634554", "0.63448966", "0.6334039", "0.6309945", "0.6301082", "0.61765426", "0.6170125", "0.61281574", "0.60920084", "0.6039311", "0.6031612", "0.59706855", "0.5966617", "0.5894041", "0.5883054", "0.587829", "0.5868275", "0.5841009", "0.58397967", "0.5838639", "0.5823148", "0.581289", "0.5805624", "0.57933617", "0.5792714", "0.5755247", "0.57440495", "0.57434684", "0.5734879", "0.57328415", "0.5711704", "0.57102764", "0.57004905", "0.5699396", "0.5696537", "0.56896996", "0.5660117", "0.56527144", "0.5642091", "0.56397617", "0.5634047", "0.56299925", "0.56223553", "0.56204367", "0.56133205", "0.56097347", "0.56095636", "0.5609477", "0.55964535", "0.55906093", "0.55707985", "0.553931", "0.5529516", "0.5529516", "0.5527259", "0.5525013", "0.5517786", "0.5500294", "0.5491239", "0.5488657", "0.5479162", "0.54769146", "0.54766524", "0.54758537", "0.5469992", "0.5467798", "0.54662", "0.5438457", "0.54363704", "0.54340833", "0.542736", "0.5420016", "0.54168934", "0.5413984", "0.5398855", "0.5395435", "0.53936285", "0.5385781", "0.53776926", "0.53746986", "0.53629667", "0.5355344", "0.53506166", "0.53491086", "0.5348705", "0.53440934", "0.5337565", "0.5331766" ]
0.8470343
0
/ Edit Columns HTML
/ Редактировать столбцы HTML
function edit_columns_html($column, $post_id){ switch($column){ // Name case 'name': echo '<code style="font-size: 12px;">' . $this->get_name($post_id) . '</code>'; break; // Category case 'category': $cat = '—'; $category = get_field('category', $post_id); if(!empty($category)) $cat = ucfirst($category); echo $cat; break; // Post Types case 'post_types': $pt = '—'; $get_post_types = acf_get_array(get_field('post_types', $post_id)); if(!empty($get_post_types)){ $post_types = array(); foreach($get_post_types as $post_type){ if(!post_type_exists($post_type)) continue; $post_types[] = $post_type; } if(!empty($post_types)){ $post_types_labels = acf_get_pretty_post_types($post_types); if(!empty($post_types_labels)){ $pt = implode(', ', $post_types_labels); } } } echo $pt; break; // Render case 'render': // vars $render = '—'; $render_template = get_field('render_template', $post_id); $render_callback = get_field('render_callback', $post_id); if(!empty($render_template)){ $render = '<code style="font-size: 12px;">' . $render_template . '</code>'; }elseif(!empty($render_callback)){ $render = '<code style="font-size: 12px;">' . $render_callback . '</code>'; } echo $render; break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function featured_content_edit_columns($columns) {\n $columns = array(\n 'cb' => '<input type=\"checkbox\" />',\n 'thumbnail' => 'Image',\n 'title' => 'feature Title',\n 'intro' => 'Introduction',\n 'author' => 'Author',\n );\n\n if ( $this->options['use-comments'] ) {\n $columns['comments'] = '<img src=\"' . get_option('siteurl') . '/wp-admin/images/comment-grey-bubble.png\" alt=\"Comments\">';\n }\n\n $columns['date'] = 'Date';\n\n return $columns;\n }", "function field_group_columns_html($column, $post_id)\n {\n }", "function expub_edit_columns($columns){\n\t$columns = array(\n\t\t\"cb\" => \"<input type=\\\"checkbox\\\" />\",\n\t\t\"title\" => \"eBook Title\",\n\t\t\"authors\" => \"Author(s)\",\n\t\t\"category\" => \"Category\",\n\t\t\"start\" => \"Start date\",\n\t\t\"end\" => \"End date\",\n\t\t\"postids\" => \"Post IDs\"\n\t);\n \n\treturn $columns;\n}", "function edit_columns($columns)\n {\n $columns = array(\n \"cb\" => \"<input type=\\\"checkbox\\\" />\",\n \"title\" => __(\"Widget Title\", 'widgetwrangler'),\n \"ww_type\" => __(\"Type\", 'widgetwrangler'),\n \"ww_description\" => __(\"Description\", 'widgetwrangler'),\n \"ww_rewrite_output\" => __(\"Rewrite Output\", 'widgetwrangler'),\n\t\t\t\"ww_shortcode\" => __(\"Shortcode\", 'widgetwrangler'),\n );\n\n return $columns;\n }", "function event_edit_columns($columns) {\n $columns = array(\n 'cb' => '<input type=\"checkbox\" />',\n 'thumbnail' => __('Image', 'calendar-press'),\n 'title' => __('Event Title', 'calendar-press'),\n 'intro' => __('Introduction', 'calendar-press'),\n 'category' => __('Categories', 'calendar-press'),\n 'tag' => __('Tags', 'calendar-press'),\n 'signups' => __('Signups', 'calendar-press'),\n 'overflow' => __('Overflow', 'calendar-press'),\n 'featured' => __('Featured', 'calendar-press'),\n 'author' => __('Author', 'calendar-press')\n );\n\n if ( $this->options['use-comments'] ) {\n $columns['comments'] = '<img src=\"' . get_option('siteurl') . '/wp-admin/images/comment-grey-bubble.png\" alt=\"Comments\">';\n }\n\n $columns['date'] = 'Date';\n\n\n return $columns;\n }", "function hys_edit_columns($columns) {\n\t\t$columns = array(\n\t\t\t\"cb\" \t\t=> \"<input type=\\\"checkbox\\\" />\",\n\t\t\t\"title\" \t=> \"Event Title\",\n\t\t\t\"hys_inuse\" => \"heyyou\"\n\t\t\t/* \"date\" \t\t=> \"Date\" */\n\t\t);\n\t\treturn $columns;\n\t}", "function px_pb_column($die = 0){\n\tglobal $px_node, $px_count_node, $post;\n\tif ( isset($_POST['action']) ) {\n\t\t$name = $_POST['action'];\n\t\t$px_counter = $_POST['counter'];\n\t\t$column_element_size = '25';\n\t\t$column_text = '';\n\t}\n\telse {\n\t\t$name = $px_node->getName();\n\t\t\t$px_count_node++;\n\t\t\t$column_element_size = $px_node->column_element_size;\n\t\t\t$column_text = $px_node->column_text;\n\t\t\t\t$px_counter = $post->ID.$px_count_node;\n}\n?> \n\t<div id=\"<?php echo $name.$px_counter?>_del\" class=\"column parentdelete column_<?php echo $column_element_size?>\" item=\"column\" data=\"<?php echo element_size_data_array_index($column_element_size)?>\" >\n \t<?php px_element_setting($name,$px_counter,$column_element_size);?>\n\t\t<div class=\"poped-up\" id=\"<?php echo $name.$px_counter?>\" style=\"border:none; background:#f8f8f8;\" >\n <div class=\"opt-head\">\n <h5>Edit Column Options</h5>\n <a href=\"javascript:show_all('<?php echo $name.$px_counter?>')\" class=\"closeit\">&nbsp;</a>\n </div>\n <div class=\"opt-conts\">\n \t<ul class=\"form-elements\">\n <li class=\"to-label\"><label>Column Text</label></li>\n <li class=\"to-field\">\n \t<textarea name=\"column_text[]\"><?php echo $column_text?></textarea>\n <p>Shortcodes and HTML tags allowed.</p>\n </li> \n </ul>\n <ul class=\"form-elements noborder\">\n <li class=\"to-label\"></li>\n <li class=\"to-field\">\n \t<input type=\"hidden\" name=\"px_orderby[]\" value=\"column\" />\n <input type=\"button\" value=\"Save\" style=\"margin-right:10px;\" onclick=\"javascript:show_all('<?php echo $name.$px_counter?>')\" />\n </li>\n </ul>\n </div>\n </div>\n </div>\n<?php\n\tif ( $die <> 1 ) die();\n}", "function slgf_gallery_manage_columns( $column, $post_id ){\n global $post;\n switch( $column ) {\n case 'shortcode' :\n echo '<input type=\"text\" value=\"[Photoswip_ id='.$post_id.']\" readonly=\"readonly\" />';\n break;\n default :\n break;\n }\n }", "function cs_pb_column($die = 0){\n\tglobal $cs_node, $count_node, $post;\n\tif ( isset($_POST['action']) ) {\n\t\t$name = $_POST['action'];\n\t\t$counter = $_POST['counter'];\n\t\t$column_element_size = '100';\n\t\t$column_text = '';\n\t}\n\telse {\n\t\t$name = $cs_node->getName();\n\t\t\t$count_node++;\n\t\t\t$column_element_size = $cs_node->column_element_size;\n\t\t\t$column_text = $cs_node->column_text;\n\t\t\t\t$counter = $post->ID.$count_node;\n}\n?> \n\t<div id=\"<?php echo $name.$counter?>_del\" class=\"column parentdelete column_<?php echo $column_element_size?>\" item=\"column\" data=\"<?php echo cs_element_size_data_array_index($column_element_size)?>\" >\n \t<div class=\"column-in\">\n <h5><?php echo ucfirst(str_replace(\"cs_pb_\",\"\",$name))?></h5>\n <input type=\"hidden\" name=\"column_element_size[]\" class=\"item\" value=\"<?php echo $column_element_size?>\" >\n <a href=\"javascript:hide_all('<?php echo $name.$counter?>')\" class=\"options\">Options</a> &nbsp; \n <a href=\"#\" class=\"delete-it btndeleteit\">Del</a> &nbsp; \n \t\t</div>\n \t<div class=\"poped-up\" id=\"<?php echo $name.$counter?>\" style=\"border:none; background:#f8f8f8;\" >\n <div class=\"opt-head\">\n <h5>Edit Column Options</h5>\n <a href=\"javascript:show_all('<?php echo $name.$counter?>')\" class=\"closeit\">&nbsp;</a>\n </div>\n <div class=\"opt-conts\">\n \t<ul class=\"form-elements\">\n <li class=\"to-label\"><label>Column Text</label></li>\n <li class=\"to-field\">\n \t<textarea name=\"column_text[]\"><?php echo $column_text?></textarea>\n <p>Shortcodes and HTML tags allowed.</p>\n </li> \n </ul>\n <ul class=\"form-elements noborder\">\n <li class=\"to-label\"></li>\n <li class=\"to-field\">\n \t<input type=\"hidden\" name=\"cs_orderby[]\" value=\"column\" />\n <input type=\"button\" value=\"Save\" style=\"margin-right:10px;\" onclick=\"javascript:show_all('<?php echo $name.$counter?>')\" />\n </li>\n </ul>\n </div>\n </div>\n </div>\n<?php\n\tif ( $die <> 1 ) die();\n}", "function ctrl_post_edit_columns($columns) {\n\n $columns['image'] = \"Image\";\n $columns = array(\n \"cb\" => '<input type=\"checkbox\" />',\n \"image\" => '',\n \"title\" => __('Title'),\n \"categories\" => __('Categories'),\n \"date\" => __('Date'),\n );\n\n return $columns;\n }", "function admin_post_columns_content( $column_key ) {\n global $post;\n //Get the ID of that post\n $post_id = $post->ID;\n $html = '';\n\n foreach ($this->settings['admin_columns'] as $key => $col) {\n if ($column_key != $key)\n continue;\n\n if (isset($col['post'])) {\n $arr_post = (array)$post;\n $html = isset($arr_post[$col['post']]) ? esc_html($arr_post[$col['post']]) : '';\n } elseif (isset($col['acf'])) {\n $field = get_field_object($col['acf'], $post_id, false);\n\n if (isset($field)) {\n switch ($field['type']) {\n case 'image':\n $image_size = isset($col['image_size']) ? $col['image_size'] : 'thumbnail';\n $html = wp_get_attachment_image(\n $field['value'],\n $image_size\n );\n break;\n default:\n $html = get_field($col['acf'], $post_id);\n }\n }\n } elseif (isset($col['callback'])) {\n $html = call_user_func($col['callback'], $column_key );\n } elseif ( $key == 'featured_image' ) {\n $image_size = isset($col['image_size']) ? $col['image_size'] : 'thumbnail';\n $html = apply_filters('unity3/post/column/featured_image', get_the_post_thumbnail( $post, $image_size ), $key, $col, $post_id );\n }\n\n if ( !empty($html) && isset($col['link']) ) {\n switch ($col['link']) {\n case 'POST_EDIT':\n $edit_label = sprintf(__('Edit %s'), $this->GetPostTypeLabel());\n $html = (\n '<a href=\"' . get_edit_post_link($post_id, null) .\n '\" aria-label=\"'. $edit_label .\n '\" title=\"'. $edit_label . '\">' . $html .\n '</a>');\n break;\n }\n }\n\n echo apply_filters('unity3/post/column/content', $html, $column_key, $post_id);\n }\n }", "public function edit_columns( $columns ) {\n global $wp_properties;\n\n unset( $columns );\n\n $columns[ 'cb' ] = \"<input type=\\\"checkbox\\\" />\";\n $columns[ 'title' ] = __( 'Title', $this->text_domain );\n $columns[ 'property_type' ] = __( 'Type', $this->text_domain );\n\n if( is_array( $wp_properties[ 'property_stats' ] ) ) {\n foreach( (array) $wp_properties[ 'property_stats' ] as $slug => $title )\n $columns[ $slug ] = $title;\n } else {\n $columns = $columns;\n }\n\n $columns[ 'city' ] = __( 'City', $this->text_domain );\n $columns[ 'overview' ] = __( 'Overview', $this->text_domain );\n $columns[ 'featured' ] = __( 'Featured', $this->text_domain );\n $columns[ 'menu_order' ] = __( 'Order', $this->text_domain );\n $columns[ 'thumbnail' ] = __( 'Thumbnail', $this->text_domain );\n\n $columns = apply_filters( 'wpp_admin_overview_columns', $columns );\n\n //\n return $columns;\n }", "public function manage_edit_columns($columns) {\n $first_columns = array_splice($columns, 0, 3);\n $columns = array_merge($first_columns, array('votes' => __('Votes')), $columns);\n return $columns;\n }", "public function columnSetting()\n {\n ?>\n <div class=\"isc-main-title\">\n <h3><?php _e( 'Column Setting' ); ?></h3>\n </div>\n <div class=\"isc-main-content\">\n <form class=\"isc-form\" action=\"\" method=\"post\">\n <table class=\"form-table\">\n <tbody>\n <tr valign=\"top\">\n <th scope=\"row\">\n <label for=\"isc-input-size\"><?php _e( 'Column Size' ); ?></label>\n </th>\n <td>\n <select name=\"isc_size\" id=\"isc-input-size\">\n <option value=\"1/2\">1/2</option>\n <option value=\"1/3\">1/3</option>\n <option value=\"1/4\">1/4</option>\n <option value=\"1/5\">1/5</option>\n <option value=\"2/3\">2/3</option>\n <option value=\"3/4\">3/4</option>\n <option value=\"2/5\">2/5</option>\n <option value=\"3/5\">3/5</option>\n <option value=\"4/5\">4/5</option>\n </select>\n </td>\n </tr>\n <tr valign=\"top\">\n <th scope=\"row\">\n </th>\n <td>\n <label for=\"isc-input-last\">\n <input type=\"checkbox\" id=\"isc-input-last\" name=\"isc_last\" value=\"1\" />\n <?php _e( 'Last Column' ); ?>\n </label>\n </td>\n </tr>\n <tr valign=\"top\">\n <th scope=\"row\">\n <label for=\"isc-input-content\"><?php _e( 'Content' ); ?></label>\n </th>\n <td>\n <textarea id=\"isc-input-content\" name=\"isc_content\"></textarea>\n </td>\n </tr>\n </tbody>\n </table>\n <?php \n $this->buttonInsert( 'column' );\n ?>\n </form>\n </div>\n <?php\n }", "function ap_edit_testimonials_columns( $columns ) {\n\t$columns = array(\n\t\t'cb' => '<input type=\"checkbox\" />',\n\t\t'testimonial_author' => __( 'Testimonial','products' ),\n\t\t'date' => __( 'Date','products' )\n\t);\n\treturn $columns; // yeah, that one's important *smacks forehead*\n}", "function PMA_displayHtmlForColumnChange($db, $table, $selected, $action)\n{\n // $selected comes from mult_submits.inc.php\n if (empty($selected)) {\n $selected[] = $_REQUEST['field'];\n $selected_cnt = 1;\n } else { // from a multiple submit\n $selected_cnt = count($selected);\n }\n\n /**\n * @todo optimize in case of multiple fields to modify\n */\n $fields_meta = array();\n for ($i = 0; $i < $selected_cnt; $i++) {\n $fields_meta[] = $GLOBALS['dbi']->getColumns(\n $db, $table, $selected[$i], true\n );\n }\n $num_fields = count($fields_meta);\n // set these globals because tbl_columns_definition_form.inc.php\n // verifies them\n // @todo: refactor tbl_columns_definition_form.inc.php so that it uses\n // function params\n $GLOBALS['action'] = $action;\n $GLOBALS['num_fields'] = $num_fields;\n\n /**\n * Form for changing properties.\n */\n include_once 'libraries/check_user_privileges.lib.php';\n include 'libraries/tbl_columns_definition_form.inc.php';\n}", "function staff_edit_columns( $staff_columns ) {\r\n\t\t$staff_columns = array(\r\n\t\t\t\"cb\" => \"<input type=\\\"checkbox\\\" />\",\r\n\t\t\t\"title\" => _x('Name', 'column name'),\r\n\t\t\t\"staff_thumbnail\" => __('Photo', 'symple'),\r\n\t\t\t\"department\" => __('Department', 'symple'),\r\n\t\t\t\"author\" => __('Author', 'symple'),\r\n\t\t\t\"comments\" => __('Comments', 'symple'),\r\n\t\t\t\"date\" => __('Date', 'symple'),\r\n\t\t);\r\n\t\t$staff_columns['comments'] = '<div class=\"vers\"><img alt=\"Comments\" src=\"' . esc_url( admin_url( 'images/comment-grey-bubble.png' ) ) . '\" /></div>';\r\n\t\treturn $staff_columns;\r\n\t}", "function columns( $columns ) {\n\t$columns['title'] = 'Title';\n\t$columns['featured'] = 'Featured';\n\t$columns['description'] = 'Description';\n\t$columns['thumbnail'] = 'Marquee Image';\n\n\treturn $columns;\n}", "public function edit_columns( $columns ) {\n\t\t$columns['testimonial_author'] = esc_html__( 'By', 'total-theme-core' );\n\t\t$columns['testimonial_rating'] = esc_html__( 'Rating', 'total-theme-core' );\n\t\tif ( taxonomy_exists( 'testimonials_category' ) ) {\n\t\t\t$columns['testimonial_category'] = esc_html__( 'Category', 'total-theme-core' );\n\t\t}\n\t\treturn $columns;\n\t}", "function my_multi_col_v2($content){\n $content = apply_filters('the_content', $content);\n $content = str_replace(']]>', ']]&gt;', $content);\n\n // the first \"more\" is converted to a span with ID\n $columns = preg_split('/(<span id=\"more-\\d+\"><\\/span>)|(<!--more-->)<\\/p>/', $content);\n $col_count = count($columns);\n\n if($col_count > 1) {\n for($i=0; $i<$col_count; $i++) {\n // check to see if there is a final </p>, if not add it\n if(!preg_match('/<\\/p>\\s?$/', $columns[$i]) ) {\n $columns[$i] .= '</p>';\n }\n // check to see if there is an appending </p>, if there is, remove\n $columns[$i] = preg_replace('/^\\s?<\\/p>/', '', $columns[$i]);\n // now add the div wrapper\n $columns[$i] = '<div class=\"dynamic-col-'.($i+1).'\">'.$columns[$i].'</div>';\n }\n $content = join($columns, \"\\n\").'<div class=\"clear\"></div>';\n }\n else {\n // this page does not have dynamic columns\n $content = wpautop($content);\n }\n // remove any left over empty <p> tags\n $content = str_replace('<p></p>', '', $content);\n return $content;\n }", "public function product_edit_columns($columns) {\n $columns = array(\n 'cb' => '<input type=\"checkbox\" />',\n 'title' => 'Product',\n 'category' => 'Category',\n 'post_tag' => 'Tags',\n\t\t\t/* 'p_imgs' => 'Product Images', */\n 'thumbnail' => ''\n );\n return $columns;\n }", "function columns();", "function cr_column($attr,$text=null)\n\t{\n\t\textract(shortcode_atts(array(\n\t\t'width' =>'30%',\n\t\t'position' =>''\n\t\t), $attr));\n\t\t$width = $width ? \"width:$width\" : '';\n\t\t$position = $position ? ' ' . $position : '';\n\t\t$out .= \"<div class='cr-columns\". $position .\"' style=\".$width. \">\" . $text . \"</div>\";\n\t\treturn do_shortcode(wptexturize($out));\n\t}", "public function html()\n {\n return $this->builder()\n ->columns($this->getColumns())\n ->minifiedAjax()\n // ->addAction(['width' => '80px'])\n ->parameters($this->getBuilderParameters())\n ->parameters([\n 'order' => [\n 5, // here is the column number\n 'desc'\n ]\n ]);\n }", "function _projects_edit_columns($columns){\r\n\t\t\n\t\t//set new name for date\r\n\t\t$columns['date'] = __('Created',WPIU_LANG);\n\t\t\n\t\t//take date off array for order\n\t\t$date = array_pop($columns);\n\t\t//add new cols and re-add date to the end of stack\n\t\t$columns['invoice_details'] = __('Invoice Details',WPIU_LANG);\n\t\t$columns['invoice_client'] = __('Client',WPIU_LANG);\n\t\t$columns['invoice_due'] = __('Due Date',WPIU_LANG);\r\n\t\t$columns['invoice_paid'] = __('Status',WPIU_LANG);\n\t\t$columns['date'] = $date;\r\n\t\t//return the columns\r\n\t\treturn $columns;\r\n\t}", "function luxe_manage_portfolio_columns( $column, $post_id ) {\n\n\tglobal $post;\n\n\tswitch ( $column ) {\n\n\t\tcase 'thumbnail':\n\n\t\t\techo '<a href=\"' . get_edit_post_link( $post_id ) . '\">' . get_the_post_thumbnail( $post_id, array(50, 50), array( 'title' => get_the_title( $post_id ) ) ) . '</a>';\n\n\t\t\tbreak;\n\n\t\tcase 'menu_order':\n\t\t\t\n\t\t\t$order = $post->menu_order;\n \t\techo $order;\n\n\t\t\tbreak;\n\t\t\n\t\tdefault:\n\t\t\tbreak;\n\t}\n\n}", "function custom_columns($column)\n {\n global $post;\n \n switch ($column){\n case \"ww_type\":\n $widget_type = get_post_meta($post->ID, 'ww-widget-type', true);\n print ($widget_type) ? $widget_type : \"standard\";\n break;\n case \"ww_description\":\n the_excerpt();\n break;\n case \"ww_rewrite_output\":\n $rewrite = get_post_meta($post->ID, 'ww-adv-enabled', true);\n print ($rewrite) ? $rewrite : \"&nbsp;\";\n break;\n\t\t\tcase \"ww_shortcode\":\n\t\t\t\tprint \"[ww_widget id=\".$post->ID.\"]<hr />[ww_widget slug=\\\"\".$post->post_name.\"\\\"]\";\n\t\t\t\tbreak;\n }\n }", "function supiat_display_column_caption( $columns ) {\n\t\t\t$new_columns = array(\n\t\t\t\t'at_caption_text-alt-column' => '<div class=\"div-header\">\n <div class=\"div-caption\">\n <span style=\"padding-right: 10px; display: inline-block;\">Caption Text</span>\n </div>\n <div class=\"div-button-save\">\n <input type=\"button\" id=\"pid-all\" value=\"Save\" class=\"button-primary supiat-update\" style=\"width: 50px;margin:0;\">\n <img class=\"waiting-save-all\" style=\"display: none\" src=\"http://test.my/wp-admin/images/wpspin_light.gif\">\n </div>\n </div>'\n\t\t\t);\n\n\t\t\treturn array_merge( $columns, $new_columns );\n\t\t}", "public static function edit_columns( $columns ) {\n\t\tif ( taxonomy_exists( 'portfolio_category' ) ) {\n\t\t\t$columns['portfolio_category'] = esc_html__( 'Category', 'total' );\n\t\t}\n\t\tif ( taxonomy_exists( 'portfolio_tag' ) ) {\n\t\t\t$columns['portfolio_tag'] = esc_html__( 'Tags', 'total' );\n\t\t}\n\t\treturn $columns;\n\t}", "function frl_common_columns_content($column_name, $post_id) {\n\t\n\t$cpost = get_post($post_id);\n\tif($column_name == 'id'){\n\t\techo intval($cpost->ID);\n\t\t\n\t}\n\telseif($column_name == 'thumbnail') {\n\t\t$img = get_the_post_thumbnail($cpost->ID, 'thumbnail');\n\t\tif(empty($img))\n\t\t\techo \"&ndash;\";\n\t\telse\n\t\t\techo \"<div class='admin-tmb'>{$img}</div>\";\n\t\t\t\n\t\t//format\n\t\tif(in_array($cpost->post_type, array('material', 'post'))){\n\t\t\t$format = apl_get_media_format($post_id); \n\t\t\t$format_label = $format; //@to_do get label here\n\t\t\techo \"<div class='format-label'><small>{$format_label}</small></div>\";\n\t\t}\t\n\t}\n\tif($column_name == 'menu_order'){\n\t\techo intval($cpost->menu_order);\n\t}\n}", "public function render_game_columns( $column ) {\n global $post;\n\n switch ( $column ) {\n\n case 'thumb' :\n echo '<a href=\"' . get_edit_post_link( $post->ID ) . '\"><img src=\"'.$this->get_thumbnail().'\" width=\"45\" height=\"45\" /></a>';\n break;\n\n case 'name' :\n $edit_link = get_edit_post_link( $post->ID );\n $title = _draft_or_post_title();\n $post_type_object = get_post_type_object( $post->post_type );\n $can_edit_post = current_user_can( $post_type_object->cap->edit_post, $post->ID );\n\n echo '<strong><a class=\"row-title\" href=\"' . esc_url( $edit_link ) .'\">' . $title.'</a>';\n\n _post_states( $post );\n\n echo '</strong>';\n\n if ( $post->post_parent > 0 ) {\n echo '&nbsp;&nbsp;&larr; <a href=\"'. get_edit_post_link( $post->post_parent ) .'\">'. get_the_title( $post->post_parent ) .'</a>';\n }\n\n // Excerpt view\n if ( isset( $_GET['mode'] ) && 'excerpt' == $_GET['mode'] ) {\n echo $this->get_excerpt(); //apply_filters( 'the_excerpt', $post->post_excerpt );\n }\n\n // Get actions\n $actions = array();\n\n if ( $can_edit_post && 'trash' != $post->post_status ) {\n $actions['edit'] = '<a href=\"' . get_edit_post_link( $post->ID, true ) . '\" title=\"' . esc_attr( __( 'Edit this item', 'mapti' ) ) . '\">' . __( 'Edit', 'mapti' ) . '</a>';\n }\n if ( current_user_can( $post_type_object->cap->delete_post, $post->ID ) ) {\n if ( 'trash' == $post->post_status ) {\n $actions['untrash'] = '<a title=\"' . esc_attr( __( 'Restore this item from the Trash', 'mapti' ) ) . '\" href=\"' . wp_nonce_url( admin_url( sprintf( $post_type_object->_edit_link . '&amp;action=untrash', $post->ID ) ), 'untrash-post_' . $post->ID ) . '\">' . __( 'Restore', 'mapti' ) . '</a>';\n } elseif ( EMPTY_TRASH_DAYS ) {\n $actions['trash'] = '<a class=\"submitdelete\" title=\"' . esc_attr( __( 'Move this item to the Trash', 'mapti' ) ) . '\" href=\"' . get_delete_post_link( $post->ID ) . '\">' . __( 'Trash', 'mapti' ) . '</a>';\n }\n\n if ( 'trash' == $post->post_status || ! EMPTY_TRASH_DAYS ) {\n $actions['delete'] = '<a class=\"submitdelete\" title=\"' . esc_attr( __( 'Delete this item permanently', 'mapti' ) ) . '\" href=\"' . get_delete_post_link( $post->ID, '', true ) . '\">' . __( 'Delete Permanently', 'mapti' ) . '</a>';\n }\n }\n if ( $post_type_object->public ) {\n if ( in_array( $post->post_status, array( 'pending', 'draft', 'future' ) ) ) {\n if ( $can_edit_post )\n $actions['view'] = '<a href=\"' . esc_url( add_query_arg( 'preview', 'true', get_permalink( $post->ID ) ) ) . '\" title=\"' . esc_attr( sprintf( __( 'Preview &#8220;%s&#8221;', 'mapti' ), $title ) ) . '\" rel=\"permalink\">' . __( 'Preview', 'mapti' ) . '</a>';\n } elseif ( 'trash' != $post->post_status ) {\n $actions['view'] = '<a href=\"' . get_permalink( $post->ID ) . '\" title=\"' . esc_attr( sprintf( __( 'View &#8220;%s&#8221;', 'mapti' ), $title ) ) . '\" rel=\"permalink\">' . __( 'View', 'mapti' ) . '</a>';\n }\n }\n\n $actions = apply_filters( 'post_row_actions', $actions, $post );\n\n echo '<div class=\"row-actions\">';\n\n $i = 0;\n $action_count = sizeof($actions);\n\n foreach ( $actions as $action => $link ) {\n ++$i;\n ( $i == $action_count ) ? $sep = '' : $sep = ' | ';\n echo '<span class=\"' . $action . '\">' . $link . $sep . '</span>';\n }\n echo '</div>';\n break;\n\n case 'game_cat' :\n case 'game_tag' :\n if ( ! $terms = get_the_terms( $post->ID, $column ) ) {\n echo '<span class=\"na\">&ndash;</span>';\n } else {\n $termlist = array();\n\n foreach ( $terms as $term ) {\n $termlist[] = '<a href=\"' . admin_url( 'edit.php?' . $column . '=' . $term->slug . '&post_type=game' ) . ' \">' . $term->name . '</a>';\n }\n\n if ( ! empty( $termlist ) ) {\n echo implode( ', ', $termlist );\n }\n }\n break;\n\n default :\n break;\n }\n }", "function your_post_edit_columns ($columns){\r\n\t\r\n\t\tglobal $post; \r\n\t\t$meta = get_post_meta( $post->ID, 'your_fields', true );\r\n\t\r\n\t\t\t $columns = array(\r\n\t\t\t\t\"cb\" => \"<input type=\\\"checkbox\\\" />\",\r\n\t\t\t\t\"title\" => \"Event\",\r\n\t\t\t\t\"your_fields_ev_desc\" => \"Description\",\r\n\t\t\t\t\"your_fields_ev_cat\" => \"Event Category\", \r\n\t\t\t\t\"your_fields_ev_date\" => \"Event Dates\",\r\n\t\t\t \t\"your_fields_tk_price\" => \"Ticket Price\",\r\n\t\t\t\t\"your_fields_tk_avail\" => \"Tickets Available\",\r\n\t\t \t);\r\n\r\n \t\treturn $columns;\r\n\t\r\n}", "function iron_manage_video_columns ($columns)\n{\n\t$iron_cols = array(\n\t\t'icon' => ''\n\t);\n\n\tif ( function_exists('array_insert') )\n\t\t$columns = array_insert($columns, $iron_cols, 'title', 'before');\n\telse\n\t\t$columns = array_merge($columns, $iron_cols);\n\n\t$columns['date'] = __('Published');\t// Renamed date column\n\n\treturn $columns;\n}", "public function columnAction ()\n {\n\n $grid = $this->grid();\n $grid->setSource(new Bvb_Grid_Source_Zend_Select($this->_db->select()->from(array('c' => 'Country'), array('Country' => 'Name', 'Continent', 'Population', 'GovernmentForm', 'HeadOfState'))->join(array('ct' => 'City'), 'c.Capital = ct.ID', array('Capital' => 'Name'))));\n $grid->setRecordsPerPage(15);\n\n $cap = new Bvb_Grid_Column('Country');\n $cap->title('Country (Capital)')->class('width_150')->decorator('{{Country}} <em>({{Capital}})</em>');\n\n $name = new Bvb_Grid_Column('Name');\n $name->title('Capital')->hidden(1);\n\n $continent = new Bvb_Grid_Column('Continent');\n $continent->title('Continent');\n\n $population = new Bvb_Grid_Column('Population');\n $population->title('Population')->class('width_80');\n\n $governmentForm = new Bvb_Grid_Column('GovernmentForm');\n $governmentForm->title('Government Form');\n\n $headState = new Bvb_Grid_Column('HeadOfState');\n $headState->title('Head Of State');\n\n $grid->updateColumns($cap, $name, $continent, $population, $governmentForm, $headState);\n\n $this->view->pages = $grid->deploy();\n $this->render('index');\n }", "function _projects_edit_columns($columns){\r\n\t\t\r\n\t\t$columns['date'] = __('Created',WPPM_LANG);\n\t\t\r\n\t\t$newcolumns = array(\n\t\t\t'details' => __('Job Details',WPPM_LANG),\n\t\t\t'users' => __('Users',WPPM_LANG),\r\n\t\t\t'start_date' => __('Start Date',WPPM_LANG),\r\n\t\t\t'end_date' => __('End Date',WPPM_LANG),\r\n\t\t\t'completed' => __('Completed',WPPM_LANG),\n\t\t\t'paid' => __('Paid',WPPM_LANG)\r\n\t\t\t);\r\n\t\t\r\n\t\t\r\n\t\t$this->array_insert($columns, $newcolumns, 2);\r\n\t\t\t\t\r\n\t\treturn $columns;\r\n\t}", "function set_custom_edit_columns($columns) {\n// $date_label = _x('Create Date', 'suite');\n unset($columns['author']);\n// unset($columns['categories']);\n unset($columns['tags']);\n unset($columns['comments']);\n unset($columns['date']);\n $columns['content'] = __('Content', 'your_text_domain');\n//$columns['publisher'] = __('Publisher', 'your_text_domain');\n\n\n $columns['date'] = __('Create Date', 'suite');\n return $columns;\n}", "function flo_admin_table_columns() {\n\tif (function_exists('flotheme_get_post_types')) {\n\t\tforeach (flotheme_get_post_types() as $type => $config) {\n\t\t\tif (isset($config['columns']) && count($config['columns'])) {\n\t\t\t\tforeach ($config['columns'] as $column) {\n\t\t\t\t\tif (function_exists('flo_admin_posts_' . $column . '_column_head') && function_exists('flo_admin_posts_' . $column . '_column_content')) {\n\t\t\t\t\t\tadd_filter('manage_' . $type . '_posts_columns', 'flo_admin_posts_' . $column . '_column_head', 10); \n\t\t\t\t\t\tadd_action('manage_' . $type . '_posts_custom_column', 'flo_admin_posts_' . $column . '_column_content', 10, 2);\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}", "function slgf_gallery_columns( $columns ){\n $columns = array(\n 'cb' => '<input type=\"checkbox\" />',\n 'title' => __( 'Gallery' ),\n 'shortcode' => __( 'Gallery Shortcode' ),\n 'date' => __( 'Date' )\n );\n return $columns;\n }", "function tt_media_display_column( $columns ) {\n $columns['tt_media-column'] = 'Alternative Text';\n return $columns;\n}", "function populate_custom_columns($column, $post_id) {\n\n // http://andrewnorcross.com/tutorials/modified-date-display/\n // popluates the modified column to provide the name of the last editor, date and time.\n if ($column == 'modified') {\n $m_orig = get_post_field('post_modified', $post_id, 'raw');\n $m_stamp = strtotime($m_orig);\n $modified = date('n/j/y @ g:i a', $m_stamp);\n $modr_id = get_post_meta($post_id, '_edit_last', true);\n $auth_id = get_post_field('post_author', $post_id, 'raw');\n $user_id = !empty($modr_id) ? $modr_id : $auth_id;\n $user_info = get_userdata($user_id);\n echo '<p class=\"mod-date\">';\n echo '<em>' . $modified . '</em><br />';\n echo 'by <strong>' . $user_info->display_name . '<strong>';\n echo '</p>';\n }\n if ($column == 'order') {\n $order = get_post_field('menu_order', $post_id, 'raw');\n echo '<p>' . $order . '</p>';\n }\n}", "public function modify_table_content( $column_name, $post_id )\n {\n if( $column_name == 'width' )\n echo get_post_meta( $post_id, $this->cpt_prefix . '_width', true ) . 'm';\n\n if( $column_name == 'height' )\n echo get_post_meta( $post_id, $this->cpt_prefix . '_height', true ) . 'm';\n\n if( $column_name == 'length' )\n echo get_post_meta( $post_id, $this->cpt_prefix . '_length', true ) . 'm';\n\n if( $column_name == 'capacity' )\n echo get_post_meta( $post_id, $this->cpt_prefix . '_capacity', true ) . 'mt';\n\n if( $column_name == 'price' )\n echo '£' . get_post_meta( $post_id, $this->cpt_prefix . '_price', true );\n\n }", "function carton_shipping_class_columns( $columns ) {\n\t$columns['edit'] = '&nbsp;';\n\treturn $columns;\n}", "function build_columns() {\n\n\t\t$html = \"\";\n\n\t\t// add the columns\n\t\tif (is_array($this->columns)) {\n\n\t\t\t// sort columns\n\t\t\tksort($this->columns);\n\n\t\t\t$html .= \"<tr>\";\n\n\t\t\t// add checkbox\n\t\t\tif (is_array($this->checkbox)) {\n\t\t\t\tif ($this->rows) {\n\t\t\t\t\t$html .= \"<td width=\\\"10px\\\"><input type=\\\"checkbox\\\" name=\\\"allbox\\\" onclick=\\\"checkall(this.form, /^doaction/);\\\" /></td>\";\n\t\t\t\t} else {\n\t\t\t\t\t$html .= \"<td width=\\\"10px\\\"></td>\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// add 2nd lince\n\t\t\tif ($this->usingsecondline) {\n\t\t\t\t// rand is so we can more than one of these per page\n\t\t\t\tif ($this->rows) {\n\t\t\t\t\t$html .= \"<td width=\\\"10px\\\"><img style=\\\"display: none\\\" align=\\\"center\\\" id=\\\"mass_vis_\" . $this->name . \"\\\" src=\\\"\" . constant('LOC_IMAGES') . \"tech/bul101.gif\\\" onclick=\\\"mass_invisible_\" . $this->name . \"();\\\"><img align=\\\"center\\\" id=\\\"mass_invis_\" . $this->name . \"\\\" src=\\\"\" . constant('LOC_IMAGES') . \"tech/bul100.gif\\\" onclick=\\\"mass_visible_\" . $this->name . \"();\\\"></td>\";\n\t\t\t\t} else {\n\t\t\t\t\t$html .= \"<td width=\\\"10px\\\"></td>\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($this->showrowtips) {\n\t\t\t\t$html .= \"<td width=\\\"10px\\\"></td>\";\n\t\t\t}\n\n\t\t\tforeach ($this->columns AS $key => $var) {\n\t\t\t\t$html .= \"<td nowrap=\\\"nowrap\\\" $attributes class=\\\"$class\\\">$var</td>\";\n\t\t\t}\n\t\t\t$html .= \"</tr>\";\n\t\t}\n\n\t\treturn $html;\n\n\t}", "public function change_overview_columns( $cols ) {\n\n\t\t$cols = array(\n\t\t\t'cb' => '<input type=\"checkbox\">',\n\t\t\t'title' => __( 'Title', 'flexible-faqs' ),\n\t\t\t'faq-number' => __( 'FAQs', 'flexible-faqs' ),\n\t\t\t'faq-author' => __( 'Author', 'flexible-faqs' ),\n\t\t\t//'company' => __( 'Company', 'flexible-faqs' ),\n\t\t\t'image' => __( 'Image', 'flexible-faqs' ),\n\t\t\t'topic' => __( 'FAQ Topic', 'flexible-faqs' ),\n\t\t\t'id' => __( 'ID', 'flexible-faqs' ),\n\t\t\t'date' => __( 'Date', 'flexible-faqs' )\n\t\t);\n\n\t\treturn $cols;\n\t}", "function customColumnContent($column_name, $post_ID)\n\t{\n\n\t\tswitch ($column_name)\n\t\t{\n\n case \"shortcode\":\n echo '[agreed-marking id='.$post_ID.']';\n\t\t\t\t//echo '<a href=\"options.php?page=as-pfeedack-project-groups&projectID='.$post_ID.'\">View / Edit Groups</a>';\n\t\t\tbreak;\n\n case \"users\":\n echo '<a href=\"options.php?page=agreed-marking-users&id='.$post_ID.'\">Edit Markers and Students</a>';\n break;\n\n case \"criteria\":\n echo '<a href=\"options.php?page=agreed-marking-criteria&id='.$post_ID.'\">Edit Criteria</a>';\n break;\n\n case \"assessmentDate\":\n $assessmentDate = get_post_meta( $post_ID, 'assessmentDate', true );\n echo $assessmentDate;\n break;\n\n case \"status\":\n $archived = get_post_meta( $post_ID, 'archived', true );\n if($archived==true)\n {\n echo 'Archived';\n }\n else\n {\n echo 'Active';\n }\n break;\n\n\t\t}\n\t}", "function luxe_edit_portfolio_columns() {\n\n\t$columns = array(\n\t\t'cb' => '<input type=\"checkbox\" />',\n\t\t'title' => __( 'Name', 'themeluxe' ),\n\t\t'thumbnail' => __( 'Photo', 'themeluxe' ),\n\t\t'menu_order' => __( 'Order', 'themeluxe' ),\n\t);\n\n\treturn $columns;\n\n}", "function custom_columns() {\n\t\t// Ticket columns\n\t\tadd_filter( 'manage_edit-tix_ticket_columns', array( $this, 'manage_columns_ticket_filter' ) );\n\t\tadd_action( 'manage_tix_ticket_posts_custom_column', array( $this, 'manage_columns_ticket_action' ), 10, 2 );\n\n\t\t// Attendee columns\n\t\tadd_filter( 'manage_edit-tix_attendee_columns', array( $this, 'manage_columns_attendee_filter' ) );\n\t\tadd_action( 'manage_tix_attendee_posts_custom_column', array( $this, 'manage_columns_attendee_action' ), 10, 2 );\n\n\t\t// Coupon columns\n\t\tadd_filter( 'manage_edit-tix_coupon_columns', array( $this, 'manage_columns_coupon_filter' ) );\n\t\tadd_action( 'manage_tix_coupon_posts_custom_column', array( $this, 'manage_columns_coupon_action' ), 10, 2 );\n\n\t\t// E-mail columns\n\t\tadd_filter( 'manage_edit-tix_email_columns', array( $this, 'manage_columns_email_filter' ) );\n\t\tadd_action( 'manage_tix_email_posts_custom_column', array( $this, 'manage_columns_email_action' ), 10, 2 );\n\n\t\t// Maybe hide some columns.\n\t\tadd_action( 'load-edit.php', array( $this, 'update_hidden_columns' ) );\n\t}", "function customColumnContent($column_name, $post_ID)\n\t{\n\t\t\n\t\tswitch ($column_name)\n\t\t{\n\t\t\tcase \"shortcode\":\t\t\t\n\t\t\t\techo '[imperial-data id='.$post_ID.']';\n\t\t\tbreak;\n\n\n\t\t\tcase \"submissions\":\n\t\t\t\n\t\t\t\t// Get the parent ID i.e the pot ID\n\t\t\t\t//echo '<a href=\"\">Results</a>';\n\t\t\t\techo '<a href=\"options.php?page=imperial-data-submissions&ID='.$post_ID.'\"><i class=\"fas fa-chart-bar\"></i> Submission Data</a>';\n\n\t\t\t\n\t\t\tbreak;\n\t\t\t\n\t\t}\n\t\t\n\t\t\t\n\t}", "function postrating_admin_column_content( $column_name ) {\n\n\t\tglobal $post;\n\n\t\tif ( $column_name == 'ratings' ) {\n\t\t\tif ( function_exists( 'the_ratings' ) ) {\n\t\t\t\t$template = str_replace( '%RATINGS_IMAGES_VOTE%', '%RATINGS_IMAGES%<br />', stripslashes( get_option( 'postratings_template_vote' ) ) );\n\t\t\t\techo expand_ratings_template( $template, $post, null, 0, false );\n\t\t\t}\n\t\t}\n\n\t}", "function my_custom_post_columns( $columns )\n\t{\n\t \t// Remove Date\n\t\tunset(\n $columns['date']\n\t\t);\n\t\t// Remove Checkbox\n\t\tunset(\n $columns['cb']\n\t\t);\n\n // $columns['shortcode'] = 'Shortcode';\n $columns['criteria'] = 'Marking Criteria';\n\n $columns['users'] = 'Markers and Students';\n $columns['assessmentDate'] = 'Assessment Date';\n $columns['status'] = 'Status';\n\n\t\treturn $columns;\n\t}", "function my_custom_post_columns( $columns )\n\t{\n\t\tunset(\n\t\t\t$columns['date']\n\t\t);\t\t\t\n\t\t//$columns['qType'] = 'Type';\t\n\t\t$columns['shortcode'] = 'Shortcode';\n\t\t$columns['submissions'] = 'Submissions';\t\n\t\t\n\t\t \n\t return $columns;\n\t}", "private function defineColumnEditForm($grid)\n { \n\n $column = new GridCustomColumn();\n $link = '';\n $link .= ' <a class=\"kgrLinkEdit\" href=\"regAgencia.php?regId={agenciaId}\">Editar</a>';\n \n $column->ItemTemplate = $link; \n $column->Align = \"center\";\n $column->HeaderText = \"Acciones\";\n $column->Width = \"120px\";\n $grid->MasterTable->AddColumn($column);\n }", "function nothing_custom_html() {\n\t\t\t$columns_count = 0;\n\t\t\tfor($i = 1; $i < 5; $i++) {\n\t\t\t\t(is_active_sidebar('sidebar-nothing-col'.$i)) ? $columns_count++ : 0;\n\t\t\t}\n\t\t\t$columns_number = Dfd_Theme_Helpers::dfd_num_to_string($columns_count);\n\n\t\t\tif ( $columns_count > 0 ) : ?>\n\t\t\t\t<div class=\"row\">\n\t\t\t\t\t<?php\n\t\t\t\t\t$counter = 0;\n\t\t\t\t\tfor ($i = 1; $i < $columns_count + 1; $i++) {\n\t\t\t\t\t\t$counter++;\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<div class=\"<?php echo esc_attr($columns_number); ?> columns\">\n\t\t\t\t\t\t\t<?php dynamic_sidebar('sidebar-nothing-col' . $i); ?>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t<?php\n\t\t\t\t\t}\n\t\t\t\t?>\n\t\t\t\t</div>\n\t\t\t<?php endif;\n\t\t}", "public function magniffic_gallery_shortcodes_posts_columns(){\n\t\tglobal $post;\n\t\techo '[magniffic_gallery id=\"'.$post->ID.'\"]'; \n\t}", "function iron_manage_iosslider_columns ($columns)\n{\n\tunset($columns['date']);\n\tunset($columns['title']);\n\t\n\t$columns['title'] = __('Title');\n\t$columns['count'] = __('Count');\n\t$columns['shortcode'] = __('Shortcode');\n\t$columns['date'] = __('Published');\t// Renamed date column\n\n\treturn $columns;\n}", "function majal_alumni_custom_column( $column, $post_id ) {\n\t\t\t\n\t\t\tswitch ( $column ) {\n\t\t\t\tcase 'majal_alumnus_photo' :\n\t\t\t\t\tif( function_exists( 'the_post_thumbnail' ) ) {\n\t\t\t\t\t\tif( has_post_thumbnail( $post_id ) ) {\n\t\t\t\t\t\t\t// Get post thumb URL without link\n\t\t\t\t\t\t\t$thumb = wp_get_attachment_image_src( get_post_thumbnail_id( $post_id ), 'Alumnus Admin Thumbnail');\n\t\t\t\t\t\t\t// Add thumb and link thumb to alumni edit page\n\t\t\t\t\t\t\techo '<a href=\"' . get_edit_post_link( $post_id ) . '\"><img src=\"' . $thumb[0] . '\" width=\"60\" height=\"60\" alt=\"' . get_the_title() . '\" /></a>';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Return 'no photo' thumb linked to edit page\n\t\t\t\t\t\t\techo '<a href=\"' . get_edit_post_link( $post_id ) . '\"><img src=\"' . plugins_url( '../img/majal_nophoto_60x60.png' , __FILE__ ) . '\" width=\"60\" height=\"60\" alt=\"No Photo\" /></a>';\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\techo 'Not supported in this theme';\n\t\t\t\t\t}\n\t\t\t\t\tbreak; \n\t\t\t\tcase 'majal_alumnus_namefirst' :\n\t\t\t\t\techo get_post_meta( $post_id, '_majal_alumni_alumnus_namefirst', true );\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'majal_alumnus_namesecond' :\n\t\t\t\t\techo get_post_meta( $post_id, '_majal_alumni_alumnus_namesecond', true ); \n\t\t\t\t\tbreak;\n\t\t\t\tcase 'majal_alumnus_interviewer_namefirst' :\n\t\t\t\t\techo get_post_meta( $post_id, '_majal_alumni_alumnus_interviewer_namefirst', true ) . ' ';\n\t\t\t\t\techo get_post_meta( $post_id, '_majal_alumni_alumnus_interviewer_namesecond', true );\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'modified' :\n\t\t\t\t\techo get_the_modified_date() . '<br />' . get_the_modified_time(). '<br />' . get_the_modified_author();\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "public function columnTitle() {\n\t\t?>\n\t\t<th scope=\"col\" class=\"manage-column column-slug\">Slug</th>\n\t\t<th scope=\"col\" class=\"manage-column column-type\">Type</th>\n\t\t<th scope=\"col\" class=\"manage-column column-notes\">Notes</th>\n\t\t<th scope=\"col\" class=\"manage-column column-date-created\">Date Created</th>\n\t\t<th scope=\"col\" class=\"manage-column column-date-modified\">Date Modified</th>\n\t\t<?php\n\t}", "function column_options($item)\n{\n $actions = array(\n 'edit' => sprintf('<a href=\"?page=zlecenia_form&id=%s\">%s</a>', $item['id'], __('Edit', 'simple_service_support')),\n 'delete' => sprintf('<a href=\"?page=%s&action=delete&id=%s\">%s</a>', $_REQUEST['page'], $item['id'], __('Delete', 'simple_service_support')),\n );\n return sprintf('%s %s',\n '<a href=\"?page=zlecenia_form&id='.$item['id'].'\"></a>', // pokazuje name po kliknięciu możliwość edycji\n $this->row_actions($actions) // po najechaniu dodaje 2 opcje ze zmienej $actions : edytuj albo usuń.\n );\n}", "public function manage_edit_document_columns( $columns ) {\n\t\tglobal $pado;\n\n\t\t$new_columns['cb'] = $columns['cb'];\n\t\t$new_columns['title'] = __('Title','pressapps-document');\n\t\t$new_columns['category'] = __('Categories','pressapps-document');\n\t\t$new_columns['document_slug'] = __(\"Slug\",'pressapps-document');\n\t\t$new_columns['date'] = $columns['date'];\n\t\tif ( $pado->get( 'voting' ) >= 1 ) {\n\t\t\t$new_columns['likes'] = __(\"Likes\", 'pressapps-document');\n\t\t\tif ( $pado->get( 'dislike_btn' ) ) {\n\t\t\t\t$new_columns['dislikes'] = __(\"Dislikes\", 'pressapps-document');\n\t\t\t}\n\t\t\t$new_columns['reset'] \t\t= __( 'Reset', 'pressapps-document' );\n\t\t}\n\t\treturn $new_columns;\n\t}", "function page_columns( $columns ) {\n\t\t\n\t\t$columns['custom_fields'] = __( 'Custom Fields', 'wp-quick-bulk-edit' );\n\t\treturn $columns;\n\n\t}", "function about_edit_columns_child($columns){ \r\n\r\n $columns = array( \r\n \"cb\" => \"<input type=\\\"checkbox\\\" />\", \r\n \"title\" => __( 'Member Name' ),\r\n \"about_category\" => __( 'Member Title' ),\r\n \"about_thumbnail\" => __( 'Member Picture' ),\r\n ); \r\n \r\n return $columns; \r\n}", "function iron_manage_iosslider_custom_column ($column, $post_id)\n{\n\tswitch ($column)\n\t{\n\t\t\t\n\t\tcase 'count':\n\t\t\n\t\t\t$photos = get_field('slider_photos', $post_id);\n\t\t\techo '<a href=\"'.get_edit_post_link( $post_id, true ).'\"><b>'.count($photos).'</b></a>';\n\t\t\tbreak;\n\n\t\tcase 'shortcode':\n\t\t\n\t\t\t$photos = get_field('album_photos', $post_id);\n\t\t\techo '<input type=\"text\" readonly value=\"[iron_iosslider id='.$post_id.']\" />';\n\t\t\tbreak;\t\t\t\t\t\t\n\t}\n\n}", "function wp_nav_menu_manage_columns()\n{\n}", "public function html()\n {\n return $this->builder()\n ->columns($this->getColumns())\n \n ->parameters([\n 'buttons' => ['excel', 'reset', 'reload'],\n \n 'dom' => '<\"row\"<\"col-sm-4\"l><\"col-sm-5\"B><\"col-sm-3\"f>><\"row\"<\"col-sm-12\"tr>><\"row\"<\"col-sm-5\"i><\"col-sm-7\"p>>',\n ]);\n\n }", "protected function columns(): array\n {\n return [\n TD::make('id','ID')\n ->width('100px')\n ->sort()->filter(TD::FILTER_NUMERIC)\n\n ->render(function ($post) {\n return Link::make($post->id)\n ->route('platform.posts.edit',[$post->id]);\n }),\n\n TD::make('title','Post title')\n ->width('100px')\n ->sort()->filter(TD::FILTER_TEXT)\n\n ->render(function ($post) {\n return Link::make($post->title)\n ->route('platform.posts.edit',[$post->id]);\n }),\n\n TD::make('img','Post image')\n ->width('200px')\n ->align('center')\n ->render(function ($object){\n return view('image',[\n 'object'=>$object\n ]);\n }),\n\n TD::make('description', 'Post description')\n ->width('100px')\n ->sort()->filter(TD::FILTER_TEXT)\n ->render(function ($post) {\n return Link::make(\\Str::limit($post->description,30))\n ->route('platform.posts.edit', [$post->id]);\n }),\n\n\n ];\n }", "function wpse_77532_cat_edit_columns( $columns )\n{\n $in = array( \"cat_id\" => \"ID\" );\n $columns = wpse_77532_array_push_after( $columns, $in, 0 );\n return $columns;\n}", "protected function columns(): array{\n return [\n TD::make('title', 'Başlık')\n ->render(function (Page $page) {\n return Link::make($page->title)\n ->route('platform.page.edit', $page);\n }),\n TD::make('slug', 'Kısa Bağlantı'),\n ];\n }", "protected static function columns()\n\t\t{\n\t\t\tparent::columns();\n\n\t\t\tstatic::removeColumn(\"Name\");\n\n\t\t\tstatic::addColumn(new Column(\"Name\", function($category)\n\t\t\t{\n\t\t\t\t/** @var Category $category */\n\t\t\t\tif (count($category->getContents()) > 0)\n\t\t\t\t{\n\t\t\t\t\t$subitemName = count($category->getContents()) > 1 ? \"Items\" : \" Item\";\n\t\t\t\t\treturn static::nameColumn($category) . ' (' . count($category->getContents()) . ' ' . $subitemName . ')';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn static::nameColumn($category);\n\t\t\t\t}\n\t\t\t}), 'Edit');\n\n\t\t\tstatic::removeColumn(\"Active\");\n\n\t\t\tstatic::addColumn(new Column(\"Active\", function($object)\n\t\t\t{\n\t\t\t\tif($object->id === null)\n\t\t\t\t{\n\t\t\t\t\treturn \"\";\n\t\t\t\t}\n\n\t\t\t\t/** @var static $object */\n\t\t\t\treturn $object->getActiveToggle();\n\t\t\t}), 'Edit');\n\t\t}", "function wprss_show_custom_columns( $column, $post_id ) {\n\n switch ( $column ) {\n case 'errors':\n $errors = get_post_meta( $post_id, 'wprss_error_last_import', true );\n $showClass = ( $errors !== '' )? 'wprss-show' : '';\n $default_msg = __( \"This feed source experienced an error during the last feed fetch or validation check. Re-check the feed source URL or check the Error Log in the Debugging page for more details.\", WPRSS_TEXT_DOMAIN );\n $msg = strlen( $errors ) > 0 ? $errors : $default_msg;\n echo sprintf('<i title=\"%1$s\" class=\"fa fa-warning fa-fw wprss-feed-error-symbol %2$s\"></i>', esc_attr($msg), $showClass);\n break;\n case 'state':\n $active = wprss_is_feed_source_active( $post_id );\n $text = ( $active )? 'Active' : 'Paused';\n $button = ( $active )? 'Pause this feed source' : 'Activate this feed source';\n $icon = ( $active )? 'pause' : 'play';\n $value = ( $active )? 'paused' : 'active';\n $indicator = ( $active )? 'green' : 'grey';\n\n ?>\n <p>\n <span class=\"wprss-indicator-<?php echo $indicator; ?>\" title=\"<?php _e( $text, WPRSS_TEXT_DOMAIN ) ?>\">\n <i class=\"fa fa-circle\"></i>\n </span>\n <input type=\"hidden\" name=\"wprss-redirect\" value=\"1\" />\n <button type=\"submit\" class='button-secondary' title=\"<?php _e( $button, WPRSS_TEXT_DOMAIN ) ?>\" name=\"wprss-feed-id\" value=\"<?php echo $post_id; ?>\">\n <i class='fa fa-<?php echo $icon; ?>'></i>\n </button>\n </p>\n <?php\n\n break;\n\n case 'updates':\n // Get the update interval\n $update_interval = get_post_meta( $post_id, 'wprss_update_interval', TRUE );\n // Get the last updated and next update data\n $last_update = get_post_meta( $post_id, 'wprss_last_update', TRUE );\n $last_update_items = get_post_meta( $post_id, 'wprss_last_update_items', TRUE );\n $next_update = wprss_get_next_feed_source_update( $post_id );\n\n // If using the global interval, get the timestamp of the next global update\n if ( $update_interval === wprss_get_default_feed_source_update_interval() || $update_interval === '' ) {\n $next_update = wp_next_scheduled( 'wprss_fetch_all_feeds_hook', array() );\n }\n\n\t\t \t// Update the meta field\n\t\t \tif ( wprss_is_feed_source_active( $post_id ) ) {\n\t\t\t\t$next_update_text = $next_update === FALSE ? __( 'None', WPRSS_TEXT_DOMAIN ) : human_time_diff( $next_update, time() );\n\t\t\t} else {\n\t\t\t\t$next_update_text = __( 'Paused', WPRSS_TEXT_DOMAIN );\n\t\t\t}\n\t\t \tupdate_post_meta( $post_id, 'wprss_next_update', $next_update_text );\n\n ?>\n\n <p>\n <?php _e( 'Next update:', WPRSS_TEXT_DOMAIN ) ?>\n <code class=\"next-update\">\n \t<?php echo $next_update_text; ?>\n </code>\n </p>\n\n <?php if ( $last_update !== '' ): ?>\n <p class=\"last-update-container\">\n <?php _e( 'Last updated:', WPRSS_TEXT_DOMAIN ) ?>\n <code class=\"last-update\"><?php echo sprintf( __( '%1$s ago', WPRSS_TEXT_DOMAIN ), human_time_diff( $last_update, time() ) ) ?></code>\n <?php if ( $last_update_items !== '' ): ?>\n <span class=\"last-update-imported-container\"><br/><?php echo sprintf( __( 'Last update imported: <code class=\"last-update-imported\">%1$d</code> items', WPRSS_TEXT_DOMAIN ), $last_update_items ) ?></span>\n <?php endif; ?>\n </p>\n <?php endif;\n\n break;\n\n case 'feed-count':\n $items = wprss_get_feed_items_for_source( $post_id );\n $seconds_for_next_update = wprss_get_next_feed_source_update( $post_id ) - time();\n $showClass = ( ( $seconds_for_next_update < 10 && $seconds_for_next_update > 0 ) || wprss_is_feed_source_deleting( $post_id ) )? 'wprss-show' : '';\n\n ?>\n\t\t\t\t<p>\n\t\t\t\t\t<span class=\"items-imported\"><?php echo $items->post_count ?></span>\n\t\t\t\t\t<i class=\"fa fa-fw fa-refresh fa-spin wprss-updating-feed-icon <?php echo $showClass ?>\" title=\"<?php _e( 'Updating feed source', WPRSS_TEXT_DOMAIN ) ?>\"></i>\n\t\t\t\t</p>\n\t\t\t<?php\n\n\t\t \t// Set meta field for items imported\n\t\t \tupdate_post_meta( $post_id, 'wprss_items_imported', $items->post_count );\n\n break;\n }\n }", "public function modifyColumns(){\n return $this;\n }", "function sizes_column( $cols ) {\n $cols[\"sizes\"] = \"Sizes\";\n return $cols;\n}", "public function html()\n {\n return $this->builder()\n ->columns($this->getColumns())\n ->minifiedAjax()\n ->addAction(['width' => '120px', 'printable' => false])\n ->parameters([\n 'stateSave' => false,\n 'order' => [[($this->columnsLength-1), 'desc']],\n ]);\n }", "public function html()\n {\n return $this->builder()\n ->columns($this->getColumns())\n ->minifiedAjax()\n ->addAction(['width' => '120px', 'printable' => false])\n ->parameters([\n 'stateSave' => false,\n 'order' => [[($this->columnsLength-1), 'desc']],\n ]);\n }", "function column($length, $i){\n\t\tif($i==intval($length/2)){\n\t\t\t$str=\"</div>\\n<div class='columns'>\";\n\t\t} else {\n\t\t\t$str=\"\";\n\t\t}\n\t\treturn $str;\n\t}", "protected static function draw_cols($colData, $columns) {\n if ($colData['page_content_id']) :\n $widget_path = '';\n if (isset(self::$widgets[$colData['page_widget']]['widget_icon'])) {\n $widget_path = WIDGETS.$colData['page_widget'].'/'.self::$widgets[$colData['page_widget']]['widget_icon'];\n }\n $widget_img_path = self::get_widget_icon($widget_path);\n $edit_link = clean_request('compose=configure_col&col_id='.$colData['page_content_id'].'&row_id='.$colData['page_grid_id'].'&widget_type='.$colData['page_widget'], self::$composer_exclude, FALSE);\n $copy_link = clean_request('compose=copy_col&col_id='.$colData['page_content_id'].'&row_id='.$colData['page_grid_id'], self::$composer_exclude, FALSE);\n $delete_link = clean_request('compose=del_col&col_id='.$colData['page_content_id'].'&row_id='.$colData['page_grid_id'], self::$composer_exclude, FALSE);\n ?>\n <div class='<?php echo self::calculateSpan($colData['page_grid_column_count'], count($columns)) ?>'>\n <div class='list-group-item m-t-5 m-b-5' style='border:1px solid #ddd; background: #fff;'>\n <?php if (!empty($colData['page_widget'])) : ?>\n <div class='pull-left m-r-10' style='width:40px;'>\n <img class='img-responsive' alt='widget' src='<?php echo $widget_img_path ?>'/>\n </div>\n <div class='pull-right m-l-10'>\n <div class='btn-group btn-group-sm'>\n <a class='btn btn-default' href='<?php echo $edit_link ?>' title='<?php echo self::$locale['page_0356'] ?>'><i class='fa fa-cog'></i></a>\n <a class='btn btn-default' href='<?php echo $copy_link ?>' title='<?php echo self::$locale['page_0357'] ?>'><i class='fa fa-copy'></i></a>\n <a class='btn btn-default' href='<?php echo $delete_link ?>' title='<?php echo self::$locale['page_0358'] ?>'><i class='fa fa-minus-circle'></i></a>\n </div>\n </div>\n <div class='overflow-hide'>\n <h5 class='m-0' style='font-size:110%;'><?php\n if ($colData['page_content_type'] == 'content') {\n echo self::$locale['page_0441'];\n echo \"</h5>\\n\";\n } else {\n echo ucfirst($colData['page_content_type']).\"</h5>\\n<i class='text-lighter'>\";\n $current_widget = self::$widgets[$colData['page_widget']]['display_instance'];\n if (method_exists($current_widget, 'display_info')) {\n echo $current_widget->display_info($colData);\n } else {\n echo fusion_get_locale('na');\n }\n echo \"</i>\\n\";\n }\n ?>\n </div>\n <?php endif; ?>\n </div>\n </div>\n <?php endif;\n }", "public function AddEditRemoveColumn() {\n\n $articles = Article::select(['id', 'title', 'body', 'created_at', 'updated_at']);\n\n return Datatables::of($articles)->addColumn('action', 'edit')->make();\n\n //return Datatables::of(Article::query())->make();\n }", "function iron_manage_video_custom_column ($column, $post_id)\n{\n\tswitch ($column)\n\t{\n\t\tcase 'icon':\n\t\t\t$att_title = _draft_or_post_title();\n?>\n\t\t\t\t<a href=\"<?php echo get_edit_post_link( $post_id, true ); ?>\" title=\"<?php echo esc_attr( sprintf( __( 'Edit &#8220;%s&#8221;' ), $att_title ) ); ?>\"><?php\n\t\t\t\t\tif ( $thumb = get_the_post_thumbnail( $post_id, array(80, 60) ) )\n\t\t\t\t\t\techo $thumb;\n\t\t\t\t\telse\n\t\t\t\t\t\techo '<img width=\"46\" height=\"60\" src=\"' . wp_mime_type_icon('image/jpeg') . '\" alt=\"\">';\n\t\t\t\t?></a>\n<?php\n\t\t\tbreak;\n\t}\n}", "public function limit_municipality_column_width() {\n\n\t\techo '<style> .column-kommun { width: 200px; }</style>';\n\n }", "public function wp_nav_menu_manage_columns()\n {\n }", "function cs_shortcode_pb_column($atts, $content = \"\") {\n if (!isset($atts['size'])){ $atts['size'] = '';}\n list($top, $bottom) = explode('/', $atts['size']);\n $width = $top / $bottom * 100;\n $html = '<div class=\"shortgrid\" style=\"width:' . $width . '%\">'.$content.'</div>';\n return do_shortcode(htmlspecialchars_decode($html));\n}", "function hys_custom_columns($column) {\n\t\tglobal $hys, $post;\n\t\t$custom = get_post_custom($post->ID);\n\t\t\t// get the id and the META for that page\n\t\t\t$thispagesid \t\t= $post->ID;\n\t\t\t//get custom \"hys_page_config\" fields\n\t\t\t$custom_fields \t\t= get_post_meta($thispagesid, 'hys_page_config');\n\t\t\t$hys_page_config = ($custom_fields) ? $custom_fields[0] : 0;\n\t\t\t\n\t\t\tswitch ($column) {\n\t\t\tcase \"hys_inuse\":\n\t\t\t\techo (!empty($hys_page_config['preset'])) ? \"<span style='color:#999'>*</span>\" : '';\n\t\t\tbreak;\n\t\t}\n\t}", "function my_custom_post_columns( $columns )\n\t{\n\t\tunset(\n\t\t\t$columns['date']\n\t\t);\t\t\t\n\t\t//$columns['qType'] = 'Type';\t\n\t\t$columns['shortcode'] = 'Shortcode';\n\t\t//$columns['responses'] = 'Responses';\t\n\t\t\n\t\t \n\t return $columns;\n\t}", "function carton_edit_coupon_columns($columns){\n\n\t$columns = array();\n\n\t$columns[\"cb\"] \t\t\t= \"<input type=\\\"checkbox\\\" />\";\n\t$columns[\"coupon_code\"] = __( 'Code', 'carton' );\n\t$columns[\"type\"] \t\t= __( 'Coupon type', 'carton' );\n\t$columns[\"amount\"] \t\t= __( 'Coupon amount', 'carton' );\n\t$columns[\"description\"] = __( 'Description', 'carton' );\n\t$columns[\"products\"]\t= __( 'Product IDs', 'carton' );\n\t$columns[\"usage\"] \t\t= __( 'Usage / Limit', 'carton' );\n\t$columns[\"expiry_date\"] = __( 'Expiry date', 'carton' );\n\n\treturn $columns;\n}", "function ajax_updateColumDropDowns()\n\t{\n\t\t$cnnId = JRequest::getInt('cid', 1);\n\t\t$tbl\t= JRequest::getVar('table', '');\n\t\t$model = JModel::getInstance('List', 'FabrikFEModel');\n\t\t$fieldDropDown \t= $model->getFieldsDropDown($cnnId, $tbl, '-', false, 'order_by');\n\t\t$fieldDropDown2 = $model->getFieldsDropDown($cnnId, $tbl, '-', false, 'group_by');\n\t\t$fieldDropDown3 = $model->getFieldsDropDown($cnnId, $tbl, '-', false, 'params[group_by_order]');\n\t\techo \"$('orderByTd').innerHTML = '$fieldDropDown';\";\n\t\techo \"if($('groupByTd')){\n\t\t\t$('groupByTd').innerHTML = '$fieldDropDown2';\n\t\t}\";\n\t\techo \"if($('groupByOrderTd')){\n\t\t\t$('groupByOrderTd').innerHTML = '$fieldDropDown3';\n\t\t}\";\n\t}", "public function tista_col( $atts, $content = null ){\n\t\t$args = array(\n\t\t\t\t\"col\"=>'6',\n\t\t\t\t\"title\"=>'title',\n\t\t\t);\n\t\t\textract( shortcode_atts( $args, $atts ) );\n\t\t\t$title = $atts['col'];\n\t\t\t$title = $atts['title'];\n\t\t\t\n\t\t\t$html ='';\n\t\t\t$html .=\t$this->tista_col_start( $col,$title );\n\t\t\t$html .= \tdo_shortcode($content);\n\t\t\t$html .= \t$this->tista_col_end( $col );\n\t\t\treturn $html;\t\t\t\t \n\t}", "public function modify_table_content( $column_name, $post_id )\n {\n if( $column_name == 'duration' )\n echo get_post_meta( $post_id, $this->cpt_prefix . '_duration', true ) . ' days';\n\n if( $column_name == 'process' )\n echo get_post_meta( $post_id, $this->cpt_prefix . '_process_time', true ) . ' days';\n\n if( $column_name == 'price' )\n echo '£' . get_post_meta( $post_id, $this->cpt_prefix . '_price', true );\n }", "protected function columns(): array\n {\n return [\n TD::make(\"title\", \"Название\")\n ->render(function(Project $project){\n return Link::make($project->title)\n ->route(\"platform.project.edit\", $project);\n }),\n ];\n }", "public function html()\n {\n $columns = $this->getColumns();\n unset($columns[0]);\n return $this->builder()\n ->columns($columns)\n ->minifiedAjax('')\n ->addAction(['width' => '80px'])\n ->parameters([\n 'dom' => 'Bflrtip',\n 'order' => [[0, 'desc']],\n 'buttons' => [\n ['extend'=>'csv','className'=>'btn btn-default'],\n ['extend'=>'excel','className'=>'btn btn-default'],\n ['extend'=>'print','className'=>'btn btn-default']\n ],\n 'columnDefs' => [\n ['width'=>'15%','targets'=>[0]],\n ['width'=>'12%','targets'=>[1]],\n ['width'=>'15%','targets'=>[2]],\n ['width'=>'15%','targets'=>[3]]\n\n ],\n 'responsive' => true,\n 'fixedHeader' => true,\n // 'keys' => true,\n 'select' => true,\n 'autoFill' => true,\n 'colReorder' => true\n // 'rowReorder' => true\n ]);\n }", "public function majal_alumni_custom_columns() {\n\n\t\t////////////////////////////////\n\t\t// Add/Remove/Reorder columns //\n\t\t////////////////////////////////\n\t\t\n\t\tfunction majal_alumni_posts_columns( $columns ) {\n \t\t$columns['majal_alumnus_photo']\t\t\t\t\t= __( 'Photo' );\n \t\t$columns['majal_alumnus_namefirst']\t\t\t\t= __( 'First Name' );\n \t\t$columns['majal_alumnus_namesecond']\t\t\t= __( 'Second Name' );\n \t\t$columns['majal_alumnus_interviewer_namefirst']\t= __( 'Interviewed By' );\n \t\t$columns['modified']\t\t\t\t\t\t\t= __( 'Last Modified' );\n \t\t\n \t\t// http://wordpress.stackexchange.com/questions/8427/change-order-of-custom-columns-for-edit-panels\n \t\t$customOrder = array(\t'cb',\n \t\t\t\t\t\t\t\t'majal_alumnus_photo',\n \t\t\t\t\t\t\t\t'title',\n \t\t\t\t\t\t\t\t'majal_alumnus_namefirst',\n \t\t\t\t\t\t\t\t'majal_alumnus_namesecond',\n \t\t\t\t\t\t\t\t'taxonomy-majal_graduationyear',\t\t// WP-generated column name for custom taxonomy with 'show_admin_column' option enabled\n \t\t\t\t\t\t\t\t'taxonomy-majal_employmentindustry',\t// As above\n \t\t\t\t\t\t\t\t'majal_alumnus_interviewer_namefirst',\n \t\t\t\t\t\t\t\t'modified'\n \t\t\t\t\t\t\t);\n \t\t\n \t\tforeach ( $customOrder as $colname )\n \t\t\t$newcolumns[$colname] = $columns[$colname]; \n \t\t\n \t\treturn $newcolumns;\n\t\t}\t\n\t\tadd_filter( 'manage_edit-majal_alumni_columns' , 'majal_alumni_posts_columns' );\n\t\t\n\t\t/////////////////////////\n\t\t// Fill custom columns //\n\t\t/////////////////////////\n\t\t\n\t\tfunction majal_alumni_custom_column( $column, $post_id ) {\n\t\t\t\n\t\t\tswitch ( $column ) {\n\t\t\t\tcase 'majal_alumnus_photo' :\n\t\t\t\t\tif( function_exists( 'the_post_thumbnail' ) ) {\n\t\t\t\t\t\tif( has_post_thumbnail( $post_id ) ) {\n\t\t\t\t\t\t\t// Get post thumb URL without link\n\t\t\t\t\t\t\t$thumb = wp_get_attachment_image_src( get_post_thumbnail_id( $post_id ), 'Alumnus Admin Thumbnail');\n\t\t\t\t\t\t\t// Add thumb and link thumb to alumni edit page\n\t\t\t\t\t\t\techo '<a href=\"' . get_edit_post_link( $post_id ) . '\"><img src=\"' . $thumb[0] . '\" width=\"60\" height=\"60\" alt=\"' . get_the_title() . '\" /></a>';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Return 'no photo' thumb linked to edit page\n\t\t\t\t\t\t\techo '<a href=\"' . get_edit_post_link( $post_id ) . '\"><img src=\"' . plugins_url( '../img/majal_nophoto_60x60.png' , __FILE__ ) . '\" width=\"60\" height=\"60\" alt=\"No Photo\" /></a>';\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\techo 'Not supported in this theme';\n\t\t\t\t\t}\n\t\t\t\t\tbreak; \n\t\t\t\tcase 'majal_alumnus_namefirst' :\n\t\t\t\t\techo get_post_meta( $post_id, '_majal_alumni_alumnus_namefirst', true );\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'majal_alumnus_namesecond' :\n\t\t\t\t\techo get_post_meta( $post_id, '_majal_alumni_alumnus_namesecond', true ); \n\t\t\t\t\tbreak;\n\t\t\t\tcase 'majal_alumnus_interviewer_namefirst' :\n\t\t\t\t\techo get_post_meta( $post_id, '_majal_alumni_alumnus_interviewer_namefirst', true ) . ' ';\n\t\t\t\t\techo get_post_meta( $post_id, '_majal_alumni_alumnus_interviewer_namesecond', true );\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'modified' :\n\t\t\t\t\techo get_the_modified_date() . '<br />' . get_the_modified_time(). '<br />' . get_the_modified_author();\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tadd_action( 'manage_majal_alumni_posts_custom_column', 'majal_alumni_custom_column', 10, 2 );\n\t\t\n\t\t///////////////////////////\n\t\t// Make columns sortable //\n\t\t///////////////////////////\n\t\t\n\t\tfunction majal_alumni_custom_column_sortable( $columns ) {\n\t\t\t// http://scribu.net/wordpress/custom-sortable-columns.html\n\t\t\t$columns['majal_alumnus_namefirst']\t\t\t\t= '_majal_alumni_alumnus_namefirst';\n\t\t\t$columns['majal_alumnus_namesecond']\t\t\t= '_majal_alumni_alumnus_namesecond';\n\t\t\t$columns['taxonomy-majal_graduationyear']\t\t= 'taxonomy-majal_graduationyear';\n\t\t\t$columns['taxonomy-majal_employmentindustry']\t= 'taxonomy-majal_employmentindustry';\t\n\t\t\t$columns['majal_alumnus_interviewer_namefirst']\t= '_majal_alumni_alumnus_interviewer_namefirst';\n\t\t\treturn $columns;\n\t\t}\n\t\tadd_filter( 'manage_edit-majal_alumni_sortable_columns', 'majal_alumni_custom_column_sortable' );\n\t\t\n\t\t////////////////////////////////////\n\t\t// Add filters for column sorting //\n\t\t////////////////////////////////////\n\t\t\n\t\t// Sort by custom columns\n\t\tfunction majal_alumni_custom_column_sortable_order( $vars ) {\n\t\t\t// Order by first name\n\t\t\tif ( isset( $vars['orderby'] ) && '_majal_alumni_alumnus_namefirst' == $vars['orderby'] ) {\n\t\t\t\t$vars = array_merge( $vars, array(\n\t\t\t\t\t'meta_key' => '_majal_alumni_alumnus_namefirst',\n\t\t\t\t\t'orderby' => 'meta_value'\n\t\t\t\t) );\n\t\t\t}\n\t\t\t// Order by second name\n\t\t\tif ( isset( $vars['orderby'] ) && '_majal_alumni_alumnus_namesecond' == $vars['orderby'] ) {\n\t\t\t\t$vars = array_merge( $vars, array(\n\t\t\t\t\t'meta_key' => '_majal_alumni_alumnus_namesecond',\n\t\t\t\t\t'orderby' => 'meta_value'\n\t\t\t\t) );\n\t\t\t}\n\t\t\t// Order by first name of interviewer\n\t\t\tif ( isset( $vars['orderby'] ) && '_majal_alumni_alumnus_interviewer_namefirst' == $vars['orderby'] ) {\n\t\t\t\t$vars = array_merge( $vars, array(\n\t\t\t\t\t'meta_key' => '_majal_alumni_alumnus_interviewer_namefirst',\n\t\t\t\t\t'orderby' => 'meta_value'\n\t\t\t\t) );\n\t\t\t}\n\t\t\t\n\t\t\treturn $vars;\n\t\t}\n\t\tadd_filter( 'request', 'majal_alumni_custom_column_sortable_order' );\n\t\t\n\t\t/////////////////////////////////////\n\t\t// Sort by custom taxonomy columns //\n\t\t/////////////////////////////////////\n\t\t\n\t\tfunction majal_alumni_tax_columns_sort_order( $orderby, $wp_query ) {\n\t\t\t// http://scribu.net/wordpress/sortable-taxonomy-columns.html\n\t\t\t// This method is supposedly very inefficient, but seems to work OK. Can't get the more efficient method to work...\n\t\t\tglobal $wpdb;\n\n\t\t\tif ( isset( $wp_query->query['orderby'] ) && 'taxonomy-majal_graduationyear' == $wp_query->query['orderby'] ) {\n\t\t\t\t$orderby = \"(\n\t\t\t\t\tSELECT GROUP_CONCAT(name ORDER BY name ASC)\n\t\t\t\t\tFROM $wpdb->term_relationships\n\t\t\t\t\tINNER JOIN $wpdb->term_taxonomy USING (term_taxonomy_id)\n\t\t\t\t\tINNER JOIN $wpdb->terms USING (term_id)\n\t\t\t\t\tWHERE $wpdb->posts.ID = object_id\n\t\t\t\t\tAND taxonomy = 'majal_graduationyear'\n\t\t\t\t\tGROUP BY object_id\n\t\t\t\t) \";\n\t\t\t\t$orderby .= ( 'ASC' == strtoupper( $wp_query->get('order') ) ) ? 'ASC' : 'DESC';\n\t\t\t}\n\t\t\t\n\t\t\tif ( isset( $wp_query->query['orderby'] ) && 'taxonomy-majal_employmentindustry' == $wp_query->query['orderby'] ) {\n\t\t\t\t$orderby = \"(\n\t\t\t\t\tSELECT GROUP_CONCAT(name ORDER BY name ASC)\n\t\t\t\t\tFROM $wpdb->term_relationships\n\t\t\t\t\tINNER JOIN $wpdb->term_taxonomy USING (term_taxonomy_id)\n\t\t\t\t\tINNER JOIN $wpdb->terms USING (term_id)\n\t\t\t\t\tWHERE $wpdb->posts.ID = object_id\n\t\t\t\t\tAND taxonomy = 'majal_employmentindustry'\n\t\t\t\t\tGROUP BY object_id\n\t\t\t\t) \";\n\t\t\t\t$orderby .= ( 'ASC' == strtoupper( $wp_query->get('order') ) ) ? 'ASC' : 'DESC';\n\t\t\t}\n\n\t\t\treturn $orderby;\n\t\t}\n\t\tadd_filter( 'posts_orderby', 'majal_alumni_tax_columns_sort_order', 10, 2 );\n\t\t\n\t\t////////////////////////////\n\t\t// Set default post order //\n\t\t////////////////////////////\n\t\t\n\t\tfunction majal_alumni_column_sortorder( $query ) {\n\t\t\t // http://wordpress.stackexchange.com/questions/66455/how-to-change-order-of-posts-in-admin\n\t\t\t /* \n\t\t\t\tSet post types.\n\t\t\t\t_builtin => true returns WordPress default post types. \n\t\t\t\t_builtin => false returns custom registered post types. \n\t\t\t*/\n\t\t\t$post_types = get_post_types( array( '_builtin' => false ), 'names' );\n\t\t\t/* The current post type. */\n\t\t\t$post_type = $query->get( 'post_type' );\n\t\t\t/* Check post types. */\n\t\t\tif( in_array( $post_type, $post_types ) && $post_type == 'majal_alumni' ) {\n\t\t\t\t/* Post Column: e.g. title */\n\t\t\t\tif( $query->get( 'orderby' ) == '' ) {\n\t\t\t\t\t$query->set( 'orderby', 'modified' );\n\t\t\t\t}\n\t\t\t\t/* Post Order: ASC / DESC */\n\t\t\t\tif( $query->get( 'order' ) == '' ){ \n\t\t\t\t\t$query->set( 'order', 'DESC' );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n \tadd_action( 'pre_get_posts', 'majal_alumni_column_sortorder' );\n\n \t////////////////////////////////////\n \t// Remove Quick Edit from Columns //\n \t////////////////////////////////////\n \t\n\t\t// https://wordpress.org/support/topic/remove-quick-edit-from-custom-post-type\n\t\tfunction majal_alumni_column_remove_quickedit( $actions ) {\n\t\t\tif( is_admin() ) {\n\t\t\t\tglobal $post;\n\t\t\t if( $post->post_type == 'majal_alumni' ) {\n\t\t\t\t\tunset( $actions['inline hide-if-no-js'] );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $actions;\n\t\t}\n\t\tadd_filter( 'post_row_actions','majal_alumni_column_remove_quickedit', 10, 2 );\n \t\n \t////////////////////////////////////////////////////\n \t// Add custom post filter Quicklink above columns //\n \t////////////////////////////////////////////////////\n \t\n \t// Adapted from https://github.com/pjhoberman/Featured---Published-Posts\n\n\t\tfunction majal_alumni_column_add_filter( $query ) {\n\t\t if( is_admin() ) {\n\t\t add_filter( 'views_edit-majal_alumni', 'majal_alumni_column_featured_quicklink' );\n\t\t }\n\t\t if( isset( $_GET['adminfilter'] ) && $_GET['adminfilter'] == 'featured' ) {\n\t\t\t\t$query->set( 'meta_key', '_majal_alumni_alumnus_isfeatured' );\n\t\t\t\t$query->set( 'meta_value', 'on' );\n\t\t\t}\n\t\t}\n\t\tadd_action( 'pre_get_posts', 'majal_alumni_column_add_filter' );\n\t\t\n\t\t// add filter\n\t\tfunction majal_alumni_column_featured_quicklink( $views ) {\n\t\t global $wp_query;\n\t\t $query = array(\n\t\t 'post_type'\t\t=> 'majal_alumni',\n\t\t 'meta_key'\t\t=> '_majal_alumni_alumnus_isfeatured',\n\t\t 'meta_value'\t=> 'on'\n\t\t );\n\t\t $result = new WP_Query( $query );\n\t\t $class = ( $wp_query->query_vars['meta_key'] == '_majal_alumni_alumnus_isfeatured' ) ? ' class=\"current\"' : '';\n\t\t $views[ 'featured' ] = sprintf(\n\t\t \t__( '<a href=\"%s\"'. $class .'>Featured <span class=\"count\">(%d)</span></a>', 'Featured' ),\n\t\t\t\tadmin_url( 'edit.php?post_type=majal_alumni&adminfilter=featured' ),\n\t\t\t\t$result->found_posts\n\t\t\t);\n\t\t return $views;\n\t\t}\n\t}", "public function display()\n\t\t{\n\t\t\t$type = 'column';\n\t\t\t$column = $this->object;\n\n\t\t\tadd_action( 'chef_sections_before_'.$this->type.'_template', $this->object );\n\n\t\t\tinclude( $this->located );\n\n\t\t\tadd_action( 'chef_sections_after_'.$this->type.'_template', $this->object );\t\t\n\t\t}", "function manage_columns_for_movie($columns){\n //remove columns\n //unset($columns['title']);\n unset($columns['taxonomy-movie-years']);\n\t unset($columns['gadwp_stats']);\n unset($columns['tags']);\n unset($columns['taxonomy-movie-type']);\n unset($columns['date']);\n unset($columns['comments']);\n unset($columns['author']);\n\n //add new columns\n $columns['page_featured_image'] \t= 'Featured Image';\n $columns['title'] \t\t\t\t\t= 'Movie Title';\t\n $columns['page_content'] \t\t= 'Movie Content';\n $columns['taxonomy-movie-years'] \t= 'Year Screened';\t\t\t\n $columns['taxonomy-movie-type'] \t= 'Movie Category';\n $columns['date'] \t\t\t\t= 'Date';\n // $columns['Author'] = 'Author';\n // $columns['gadwp_stats'] = 'Stats'; - a plugin that adds a column. I removed it above and did not add it back in.\n return $columns;\n}", "public function html()\n {\n\n return $this->builder()\n ->columns($this->getColumns())\n ->minifiedAjax()\n // ->addAction(['width' => '80px'])\n //->parameters($this->getBuilderParameters());\n ->parameters([\n 'dom' => 'Blfrtip',\n\n 'lengthMenu' => [\n [9, 25, 50], [9, 25, 50, 'All Data'],\n ],\n 'buttons' => [\n ],\n\n 'initComplete' => \" function () {\n this.api().columns([]).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 'language' => self::lang(),\n\n ]);\n }", "function css_columns($columns, $header_row='', $footer_row='', $classes='', $js='', $glue='__none') {\n if($glue == '__none') $glue = html_break();\n $output = html_div($header_row, \"header_row \".($classes && !is_array($classes) ? \" $classes\" : \"\"), $js);\n $count = count($columns);\n\n if($columns) {\n $class = is_array($classes) ? array_shift($classes) : $classes;\n $output .= html_div(smart_implode(array_shift($columns), $glue), \"left_column \".($class ? \" $class\" : \"\"), $js);\n\n $class = is_array($classes) ? array_shift($classes) : $classes;\n $output .= html_div(smart_implode(array_shift($columns), $glue), \"middle_column \".($class ? \" $class\" : \"\"), $js); // always at least one middle column for left alignment\n \n while(count($columns) > 1) {\n $class = is_array($classes) ? array_shift($classes) : $classes;\n $output .= html_div(smart_implode(array_shift($columns), $glue), \"middle_column \".($class ? \" $class\" : \"\"), $js);\n }\n\n $class = is_array($classes) ? array_pop($classes) : $classes;\n $output .= html_div(smart_implode(array_pop($columns), $glue), \"right_column \".($class ? \" $class\" : \"\"), $js); // always a right column, even if empty\n }\n $output .= html_div($footer_row, \"footer_row \".($classes && !is_array($classes) ? \" $classes\" : \"\"), $js);\n //return html_div($output, 'border');\n return $output;\n}", "function cp_column_shortcode($atts, $content = null)\n\t{\n\t\t\t//Fetch Parameters\n\t\t\textract(shortcode_atts(array(\n\t\t\t\"col\" => '1/1'\n\t\t), $atts));\n\t\t//Switch For Selecting the Layout\n\t\tswitch ($col) {\n\t\t\tcase '1/4':\n\t\t\t\treturn '<div class=\"shortcode1-4\">' . do_shortcode($content) . '</div>';\n\t\t\tcase '1/3':\n\t\t\t\treturn '<div class=\"shortcode1-3\">' . do_shortcode($content) . '</div>';\n\t\t\tcase '1/2':\n\t\t\t\treturn '<div class=\"shortcode1-2\">' . do_shortcode($content) . '</div>';\n\t\t\tcase '2/3':\n\t\t\t\treturn '<div class=\"shortcode2-3\">' . do_shortcode($content) . '</div>';\n\t\t\tcase '3/4':\n\t\t\t\treturn '<div class=\"shortcode3-4\">' . do_shortcode($content) . '</div>';\n\t\t\tdefault:\n\t\t\tcase '1/1':\n\t\t\t\treturn '<div class=\"shortcode1\">' . do_shortcode($content) . '</div>';\n\t\t}\n\t}", "private function __setColumns() {\n\n\t\t// pega todos as colunas\n\t\t$args = array_filter($this->_fields, function ( $value ){\n\t\t\treturn ( !isset( $value['display'] ) || $value['display'] ) ? $value['column'] : false;\n\t\t});\n\n\t\t// pega a coluna\n\t\t$args = array_column( $args, 'column' );\n\n\t\t// seta as colunas no grocey model\n\t\tcall_user_func_array( array($this->_crud, 'columns' ), $args );\n\n\t\t// seta a exibição das colunas\n\t\t$this->__setDisplay();\n\n\t\t// seta as relacoes\n\t\t$this->__setRelations();\n\t}", "function bimber_post_list_custom_columns( $columns ) {\n\t$columns['featured_image'] = esc_html__( 'Featured Image', 'bimber' );\n\n\treturn $columns;\n}", "function featured_content_custom_columns($column) {\n global $post, $featuredContentPlugin;\n\n if ( $post->post_type != 'feature' ) {\n return;\n }\n\n switch ($column) {\n case 'thumbnail':\n if ( function_exists('has_post_thumbnail') && has_post_thumbnail() ) {\n the_post_thumbnail('featured-content-thumb');\n }\n break;\n case 'intro':\n echo $featuredContentPlugin->trim_excerpt($post->post_excerpt, 25);\n break;\n }\n }", "public function quick_edit($column_name, $post_type)\n {\n }", "function majal_alumni_posts_columns( $columns ) {\n \t\t$columns['majal_alumnus_photo']\t\t\t\t\t= __( 'Photo' );\n \t\t$columns['majal_alumnus_namefirst']\t\t\t\t= __( 'First Name' );\n \t\t$columns['majal_alumnus_namesecond']\t\t\t= __( 'Second Name' );\n \t\t$columns['majal_alumnus_interviewer_namefirst']\t= __( 'Interviewed By' );\n \t\t$columns['modified']\t\t\t\t\t\t\t= __( 'Last Modified' );\n \t\t\n \t\t// http://wordpress.stackexchange.com/questions/8427/change-order-of-custom-columns-for-edit-panels\n \t\t$customOrder = array(\t'cb',\n \t\t\t\t\t\t\t\t'majal_alumnus_photo',\n \t\t\t\t\t\t\t\t'title',\n \t\t\t\t\t\t\t\t'majal_alumnus_namefirst',\n \t\t\t\t\t\t\t\t'majal_alumnus_namesecond',\n \t\t\t\t\t\t\t\t'taxonomy-majal_graduationyear',\t\t// WP-generated column name for custom taxonomy with 'show_admin_column' option enabled\n \t\t\t\t\t\t\t\t'taxonomy-majal_employmentindustry',\t// As above\n \t\t\t\t\t\t\t\t'majal_alumnus_interviewer_namefirst',\n \t\t\t\t\t\t\t\t'modified'\n \t\t\t\t\t\t\t);\n \t\t\n \t\tforeach ( $customOrder as $colname )\n \t\t\t$newcolumns[$colname] = $columns[$colname]; \n \t\t\n \t\treturn $newcolumns;\n\t\t}", "function ws_sortable_manufacturer_column( $columns ) {\n $columns['post_views'] = 'post_views';\n return $columns;\n}" ]
[ "0.68906146", "0.6828128", "0.67610997", "0.67407465", "0.6738951", "0.6728189", "0.67228985", "0.66895807", "0.66873556", "0.664902", "0.66134155", "0.6508316", "0.64196485", "0.6408753", "0.63958055", "0.6376305", "0.6360049", "0.6291111", "0.6286386", "0.62755734", "0.62754965", "0.6273004", "0.62728345", "0.6262359", "0.6259654", "0.62449133", "0.6217163", "0.6216543", "0.62097853", "0.6194238", "0.6185433", "0.6179211", "0.61736834", "0.6164648", "0.6161951", "0.6156833", "0.6154214", "0.6154143", "0.6140689", "0.61267495", "0.6121948", "0.61147946", "0.6086225", "0.6069866", "0.6048305", "0.6038571", "0.6037524", "0.603022", "0.60127574", "0.6000173", "0.59994835", "0.59987384", "0.5996227", "0.5983519", "0.5978327", "0.59719074", "0.59645706", "0.596065", "0.5958753", "0.595733", "0.59471554", "0.5944094", "0.59306484", "0.5925303", "0.592462", "0.592331", "0.5912893", "0.5911537", "0.5910934", "0.5907392", "0.5904172", "0.5898909", "0.5898909", "0.58937323", "0.58847", "0.5884388", "0.58819735", "0.5879346", "0.58763033", "0.58743644", "0.5869547", "0.58635736", "0.58615035", "0.58611214", "0.585967", "0.5858006", "0.5857423", "0.584335", "0.58424675", "0.58410674", "0.58363765", "0.5832806", "0.5831433", "0.5830314", "0.5827377", "0.58204013", "0.58190304", "0.5818928", "0.58180684", "0.5814633" ]
0.72427666
0
Specify that the plan is on a yearly interval.
Укажите, что план действует ежегодно.
public function yearly() { $this->interval = 'yearly'; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isYearly()\n {\n return $this->interval === 'yearly';\n }", "public function yearly($value) {\n return $this->setProperty('yearly', $value);\n }", "public function setScheduleYear($year = 0);", "function setInc(){\n\t\tif($this->period==\"monthly\")\n\t\t\t$this->inc=1;\n\t\tif($this->period==\"quarterly\")\n\t\t\t$this->inc=3;\n\t\treturn $this->from_year;\n\t}", "public function years($start = false, $end = false);", "public function start_year ($year)\n {\n $this->_year_pending = true;\n }", "public abstract function get_min_year();", "public function setYearPeriod($year) {\r\n if (!isset(self::$_databaseCriteria)) {\r\n self::$_databaseCriteria=array();\r\n }\r\n //$dbCrit = self::$_databaseCriteria;\r\n //if(array_key_exists('year', $dbCrit)) {\r\n self::$_databaseCriteria['year'] = $year;\r\n //}\r\n }", "public function modelYear()", "private function setYears(){\n // Years\n $now = new DateTime();\n $this->years[] = $now->format('Y');\n\n for ($i = 0; $i < 5; $i++) {\n $this->years[] = $this->years[$i] - 1;\n }\n }", "public function yearsInOperation($value)\n {\n $this->setProperty('yearsInOperation', $value);\n return $this;\n }", "public function yearPasses(){\n $this->age++;\n \n }", "public function set_expiry_year($year)\n {\n }", "public function setExpYear(int $year) : self;", "public function is_year()\n {\n }", "public function setAutoYear($autoYear) { $this->autoYear = $autoYear ; }", "function year($year_or_datepoint): Period\n{\n if (is_int($year_or_datepoint)) {\n return Period::fromYear($year_or_datepoint);\n }\n\n return Datepoint::create($year_or_datepoint)->getYear();\n}", "function ercore_change_reporting_year($form, $form_state) {\n $ranges = ercore_get_reporting_ranges();\n $selected = $form_state['input']['reporting-year']['range'] - 1;\n if ($selected == -1) {\n unset($_SESSION['ercore_start_date']);\n unset($_SESSION['ercore_end_date']);\n }\n else {\n $_SESSION['ercore_start_date'] = $ranges[$selected][0];\n $_SESSION['ercore_end_date'] = $ranges[$selected][1];\n $ranges = array($ranges[$selected]);\n }\n $form['table']['#ranges'] = $ranges;\n return $form['table'];\n}", "public function yearPasses(){\n $this->age++;\n }", "public function isNextYear()\n {\n return $this->year === static::now($this->getTimezone())->addYear()->year;\n }", "public function yearPasses(){\n $this->age++;\n }", "public function selectYear()\n {\n return call_user_func_array([$this, 'selectRange'], func_get_args());\n }", "private function computeYears()\n {\n $this->years = intval(intval($this->delta) / self::SECONDS_PER_YEAR);\n return $this;\n }", "public function getYearlyStatistics()\n\t{\n\t\treturn '2016';\n\t}", "function setYear($value) {\n $this->year = (integer) $year;\n $this->setTimestampFromAttributes();\n }", "static function getServiceYearRange ()\r\n\t{\r\n\t\t$year = date(\"Y\");\r\n\r\n\t\treturn range($year-1,$year+10);\r\n\t}", "public function startYear()\n {\n return $this->setDateTime($this->year, 1, 1, 0, 0, 0);\n }", "public function setYear($year)\n {\n $this->year = (int)$year;\n }", "public function endYear()\n {\n $day = $this->format('L') ? 30 : 29;\n\n return $this->setDateTime($this->year, 12, $day, 23, 59, 59);\n }", "private function validatorYearStart(): Closure\n {\n return static fn (int $year): int => $year < self::YEAR_MIN || $year > self::YEAR_MAX\n ? throw new InvalidArgumentException(\n sprintf(\n 'Start year must be between %d and %d',\n self::YEAR_MIN,\n self::YEAR_MAX,\n ),\n )\n : $year;\n }", "public function set_year($year)\n {\n $this->year = $year;\n }", "public function setYear($year)\n {\n $this->year = $year;\n }", "public function setYear($year)\n {\n $this->year = $year;\n }", "public function finish_year ($year)\n {\n }", "public function setMinYear($minYear) {\n $this->minYear = $minYear;\n }", "public function get_total_premium_this_year(){\n $constraint_id=\" AND (agent_id=\".$_SESSION['id'].\")\";\n\n $crud=new Crud();\n $year = date(\"Y\");\n $date1=$year.'-01-01';\n $date2=($year+1).'-01-01';\n $policy_result_set=$this->read_selective_policy(\"WHERE (NOT comission_percentage=0) AND (od_policy_start_date BETWEEN '\".$date1.\"' AND '\".$date2.\"')\".$constraint_id);\n $premium=0;\n if($policy_result_set){\n while($policy_result=$policy_result_set->fetch_assoc()){\n $premium+=$policy_result['total_premium'];\n }\n }\n return $premium;\n }", "public function setStartYear($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "public function year($name){\n\t\t$this->name = $name;\n\t\t$this->type = 'year';\n\t\treturn $this;\n\t}", "function ShowYear($Show) {\r\n\t\t$this->_ShowYear = $Show;\r\n\t}", "public function setGraduationYear($val)\n {\n $this->_propDict[\"graduationYear\"] = $val;\n return $this;\n }", "public function getTransactionActivityYear();", "public function addYears($value) {\r\n\t\t\t$this->year += $value;\r\n\t\t}", "function setStartingYear( $year )\n\t{\n\t\tif ( $year < $this->today_info[\"year\"] && $year >= 1600 )\n\t\t{\n\t\t\t$this->starting_year = $year;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function get_total_premium_this_year(){\n $crud=new Crud();\n $year = date(\"Y\");\n $date1=$year.'-01-01';\n $date2=($year+1).'-01-01';\n $policy_result_set=$this->read_selective_policy(\"WHERE (NOT comission_percentage=0) AND (od_policy_start_date BETWEEN '\".$date1.\"' AND '\".$date2.\"')\");\n $premium=0;\n if($policy_result_set){\n while($policy_result=$policy_result_set->fetch_assoc()){\n $premium+=$policy_result['total_premium'];\n }\n }\n return $premium;\n }", "public function get_total_premium_this_year(){\n $crud=new Crud();\n $year = date(\"Y\");\n $date1=$year.'-01-01';\n $date2=($year+1).'-01-01';\n $policy_result_set=$this->read_selective_policy(\"WHERE (NOT comission_percentage=0) AND (od_policy_start_date BETWEEN '\".$date1.\"' AND '\".$date2.\"')\");\n $premium=0;\n if($policy_result_set){\n while($policy_result=$policy_result_set->fetch_assoc()){\n $premium+=$policy_result['total_premium'];\n }\n }\n return $premium;\n }", "public function yearlyRevenue($value)\n {\n $this->setProperty('yearlyRevenue', $value);\n return $this;\n }", "public function withYear($year) {\n\t\t$year = \\Bronto\\Util\\Preconditions::requireInt($year, '$year');\n\t\t\n\t\t$thisYear = $this->getYear();\n\t\tif ($year == $thisYear) {\n\t\t\treturn $this;\n\t\t}\n\n\t\t$delta = $year - $thisYear;\n\t\treturn $this->plusYears($delta);\n\t}", "public function get_year_permastruct()\n {\n }", "public function returnYearlyTracker()\n {\n\n }", "public function setYearAttribute($year)\n {\n $this->attributes['year'] = Carbon::createFromFormat('Y-m-d', $year);\n }", "public function isCurrentYear()\n {\n return $this->isSameYear();\n }", "public function calculateNewYearsDay(): void\n {\n if ($this->year >= 1950) {\n $this->addHoliday($this->newYearsDay($this->year, $this->timezone, $this->locale));\n if ($this->year <= 1998) {\n $this->addHoliday(new Holiday(\n 'dayAfterNewYearsDay',\n [],\n new DateTime(\"$this->year-1-2\", DateTimeZoneFactory::getDateTimeZone($this->timezone)),\n $this->locale\n ));\n }\n if ($this->year <= 1990) {\n $this->addHoliday(new Holiday(\n 'twoDaysLaterNewYearsDay',\n ['en' => 'Two Days Later New Year’s Day', 'ko' => '새해 연휴'],\n new DateTime(\"$this->year-1-3\", DateTimeZoneFactory::getDateTimeZone($this->timezone)),\n $this->locale\n ));\n }\n }\n }", "public function setYearAttribute($input)\n {\n $this->attributes['year'] = $input ? $input : null;\n }", "public function setYearAttribute(int $value): void\n {\n $this->attributes['year'] = $value;\n }", "private function yearFilter($selected)\n {\n\n $start_year = 2015;\n $current_year = date('Y') + 1;\n\n $years = array($current_year);\n\n for ($i = 1; $i <= ($current_year - $start_year); $i++) {\n $append = $current_year - $i;\n array_push($years, $append);\n }\n\n $html = label_filter(array('object'=>$this->datatable,'column'=>2,'function_name'=>'FilterYr',\n 'wrapper_class'=>'filter_year','selector'=>'year','title'=>'Year',\n 'selected'=>array(0,1),'info_array'=>$years,'map'=>true,'fieldname'=>'start'));\n\n return $html;\n }", "function setActYear($year)\n\t{\n\t\t$this->actyear = $year;\n\t}", "public function started_schedules_yearly()\n {\n $startedSchedulesYearly = $this->yearly_scope('pickupdate', $this->started_schedules());\n\n return $startedSchedulesYearly;\n }", "public abstract function get_max_year();", "public function testHolidayInYear(): void\n {\n $this->assertHoliday(\n self::REGION,\n self::HOLIDAY,\n self::YEAR,\n new \\DateTime(self::YEAR.'-05-08', new \\DateTimeZone(self::TIMEZONE))\n );\n }", "function getRange()\n {\n return $this->year.'-'.($this->year+1);\n }", "function iso_year($year_or_datepoint): Period\n{\n if (is_int($year_or_datepoint)) {\n return Period::fromIsoYear($year_or_datepoint);\n }\n\n return Datepoint::create($year_or_datepoint)->getIsoYear();\n}", "public function yearAction() {\n $request = $this->getRequest();\n $request->setParam(\"exact_type\", \"year\");\n $this->_forward(\"exact\");\n }", "function addyears($numberofyears)\n {\n $this->c_Year += $numberofyears;\n }", "public function year($value)\n {\n $this->year = $value;\n\n return $this;\n }", "public function asYearIntervals($years=1){\n\n\t\t$intervals = array();\n\t\t$period = $this->getDatePeriod(\"P{$years}Y\", $this->firstOfYear());\n\t\t\n\t\tforeach($period as $k => $date){\n\t\t\t$start = $date->format('Y-m-d');\n\t\t\t$end = $date->add(new DateInterval(\"P{$years}Y\"))->sub(new DateInterval('P1D'))->format('Y-m-d');\n\t\t\tif($start < $this->start) $start = $this->start;\n\t\t\tif($end > $this->end ) $end = $this->end;\n\t\t\t$dateframe = new DateFrame($start, $end);\n\t\t\t$dateframe->interval = \"{$years}Y\";\n\t\t\t$intervals[] = $dateframe;\n\t\t}\n\t\treturn $intervals;\n\t}", "function model_year($p){\n\t\t\t$y = $this->model_year_extract($p);\n\t\t\t$p = preg_replace('/[^0-9]/','',$y);\n\t\t\t$p = (int) $p;\n\t\t\t\n\t\t\tforeach($this->year as $key=>$ps){\n\t\t\t\t$price_range = preg_replace('/[^0-9-]/','',$ps);\n\t\t\t\t$ranges = explode('-',$price_range);\n\t\t\t\tif($p>=$ranges[0] && $p<$ranges[1]) return $this->year[$key]; \n\t\t\t}\t\t\t\t\t\t\t\n\t\t}", "public function year(?int $year) : Holiday {\n $this->year = $year ? $year : $this->year ?? date('Y');\n\n return $this;\n }", "public function testHolidayAfterYear(): void\n {\n $this->assertNotHoliday(\n self::REGION,\n self::HOLIDAY,\n $this->generateRandomYear(self::YEAR + 1)\n );\n }", "public function testAddYear()\n {\n $this->assertEquals('2015-05-01', $this->date->addYears(2)->toDateString());\n }", "public function testHolidayBeforeYear(): void\n {\n $this->assertNotHoliday(\n self::REGION,\n self::HOLIDAY,\n $this->generateRandomYear(1000, self::YEAR - 1)\n );\n }", "function erp_hr_get_financial_year_from_date_range( $start_date, $end_date ) {\n global $wpdb;\n\n if ( ! is_numeric( $start_date ) ) {\n $start_date = erp_current_datetime()->modify( $start_date )->getTimestamp();\n }\n\n if ( ! is_numeric( $end_date ) ) {\n $end_date = erp_current_datetime()->modify( $end_date )->getTimestamp();\n }\n\n /**\n * select wp_erp_hr_leave_requests.id, st.approval_status_id from wp_erp_hr_leave_requests\n * left join wp_erp_hr_leave_approval_status as st on st.leave_request_id = wp_erp_hr_leave_requests.id\n * where (start_date <= 1578441600 and end_date >= 1578441600 and user_id = 23)\n * or (start_date <= 1579046399 and end_date >= 1579046399 and user_id = 23)\n * or (start_date >= 1578441600 and start_date <= 1579046399 and user_id = 23)\n * or (end_date >= 1578441600 and end_date <= 1579046399 and user_id = 23)\n */\n\n return $wpdb->get_col(\n $wpdb->prepare(\n \"SELECT id FROM {$wpdb->prefix}erp_hr_financial_years\n WHERE (start_date <= %d AND end_date >= %d)\n OR (start_date <= %d AND end_date >= %d)\n OR (start_date >= %d and start_date <= %d)\n OR (end_date >= %d and end_date <= %d)\n \",\n array(\n $start_date, $start_date,\n $end_date, $end_date,\n $start_date, $end_date,\n $start_date, $end_date\n )\n )\n );\n}", "function year()\n\t{\n\t\t?>\n\t\t<tr>\n\t\t\t<td bgcolor=\"<?=$this->pg->color('table-label');?>\"><b>Year:</b></td>\n\t\t\t<td bgcolor=\"<?=$this->pg->color('table-cell2');?>\">\n\t\t\t\t<select name=\"yearID\" size=\"1\" style=\"vertical-align:middle\"><option value=\"\"></option><?php\n\t\t\t\t\t$yr = new years();\n\t\t\t\t\twhile (list($a,$arr) = each($yr->years))\n\t\t\t\t\t{\n\t\t\t\t\t\t?><option value=\"<?=$arr['yer_yearID'];?>\"><?=$arr['yer_year'];?></option><?php\n\t\t\t\t\t}\n\t\t\t\t?></select>\n\t\t\t</td>\n\t\t</tr>\n\t\t<?php\n\t}", "public function isCurrentYear(): bool\n {\n return ((int) date('Y')) === $this->year;\n }", "public function ranges()\n {\n return [\n 'YTD' => '2019年',\n ];\n }", "public function getInsuredYearsNext4Years()\n {\n return isset($this->InsuredYearsNext4Years) ? $this->InsuredYearsNext4Years : null;\n }", "public function testRespectForTheAgedDayBetween1996And2003(): void\n {\n $year = 1998;\n $this->assertHoliday(\n self::REGION,\n self::HOLIDAY,\n $year,\n new \\DateTime(\"{$year}-9-15\", new \\DateTimeZone(self::TIMEZONE))\n );\n }", "public function testYearlyRecurrence()\n {\n $blob = <<<ICS\nBEGIN:VCALENDAR\nBEGIN:VEVENT\nUID:foobar13\nDTSTART:20100101T220000Z\nDTEND:20100101T230000Z\nRRULE:FREQ=YEARLY\nEND:VEVENT\nEND:VCALENDAR\nICS;\n\n $this->assertFreeBusyReport(\n 'FREEBUSY:20110101T220000Z/20110101T230000Z',\n $blob\n );\n }", "function update_survey_years($sid, $start_year, $end_year)\r\n\t{\t\t\r\n\t\t//remove existing dates if any\r\n\t\t$this->db->delete('survey_years',array('sid' => $sid));\r\n\r\n\t\t$start=(integer)$start_year;\r\n\t\t$end=(integer)$end_year;\r\n\r\n\t\tif ( ($start_year > 0 && $start_year < 1600) || $start_year > 3000 || ($end_year >0 && $end_year < 1600) || $end_year > 3000){\r\n\t\t\tthrow new Exception(\"INVALID_YEAR_RANGE\");\r\n\t\t}\r\n\r\n\t\tif ($start==0){\r\n\t\t\t$start=$end;\r\n\t\t}\r\n\r\n\t\tif($end==0){\r\n\t\t\t$start=$end;\r\n\t\t}\r\n\r\n\t\t//build an array of years range\r\n\t\t$years=range($start,$end);\r\n\r\n\t\t//insert dates into database\r\n\t\tforeach($years as $year){\r\n\t\t\t$options=array(\r\n\t\t\t\t\t\t'sid' => $sid,\r\n\t\t\t\t\t\t'data_coll_year' => $year);\r\n\t\t\t//insert\r\n\t\t\t$result=$this->db->insert('survey_years',$options);\r\n\r\n\t\t\tif ($result===false){\r\n\t\t\t\tthrow new Exception($this->db->error('message'));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function overrideFinancialYear() {\n $sql = null;\n if ($this->getVendor() == self::MYSQL) {\n $sql = \"\n SELECT `financeYearId`,\n `isOddPeriod`\n FROM `financesetting`\n WHERE `companyId`='\" . $this->getCompanyId() . \"'\n \";\n } else {\n if ($this->getVendor() == self::MSSQL) {\n $sql = \"\n SELECT `financeYearId`,\n `isOddPeriod`\n FROM `financeSetting`\n WHERE `companyId`='\" . $this->getCompanyId() . \"'\n \";\n } else {\n if ($this->getVendor() == self::ORACLE) {\n $sql = \"\n SELECT FINANCEYEARID AS \\\"financeYearId\\\",\n ISODDPERIOD AS \\\"isOddPeriod\\\"\n FROM FINANCESETTING\n WHERE COMPANYID='\" . $this->getCompanyId() . \"'\n \";\n }\n }\n }\n try {\n $result = $this->q->fast($sql);\n } catch (\\Exception $e) {\n echo json_encode(array(\"success\" => false, \"message\" => $e->getMessage()));\n exit();\n }\n if ($result) {\n $row = $this->q->fetchArray($result);\n $this->setFinanceYearId($row['financeYearId']);\n $this->setIsOddPeriod($row['isOddPeriod']);\n }\n }", "public function test_year_method()\n {\n $this->assertTrue(Validation::year(2017));\n $this->assertTrue(Validation::year(1917));\n $this->assertFalse(Validation::year(0));\n $this->assertFalse(Validation::year(20018));\n $this->assertFalse(Validation::year('nothing'));\n }", "function selectYear()\n{\n return call_user_func_array([$this, 'selectRange'], func_get_args());\n}", "function get_entitlement_financial_years() {\n $db = \\WeDevs\\ORM\\Eloquent\\Facades\\DB::instance();\n $prefix = $db->db->prefix;\n\n $min_max_dates = $db->table( 'erp_hr_leave_entitlements' )\n ->select( $db->raw( 'min( `from_date` ) as min' ), $db->raw( 'max( `to_date` ) max' ) )\n ->first();\n\n $start_year = $end_year = current_time( 'Y' );\n\n if ( ! empty( $min_max_dates->min ) ) {\n $min_date_fy_year = get_financial_year_from_date( $min_max_dates->min );\n\n $start_year = $min_date_fy_year['start'];\n $end_year = date( 'Y', strtotime( $min_max_dates->max ) );\n\n } else {\n return [];\n }\n\n $start_month = erp_get_option( 'gen_financial_month', 'erp_settings_general', 1 );\n\n $years = [];\n\n for ( $i = $start_year; $i <= $end_year; $i ++ ) {\n if ( 1 === absint( $start_month ) ) {\n $years[] = $i;\n\n } else if ( ! ( ( $i + 1 ) > $end_year ) ) {\n $years[] = $i . '-' . ( $i + 1 );\n\n } else if ( $start_year === $end_year ) {\n $years[] = ( $i - 1 ) . '-' . $i;\n }\n }\n\n return $years;\n}", "function generate_year_options($savedValue) {\n\t$date = new DateTime(); // Today\n\t$yearint = new DateInterval(\"P1Y\"); // Represents one year\n\n\tif(!is_null($savedValue))\n\t\t$savedValue = (int) $savedValue;\n\n\t// 25 years is a guestimation\n\tfor($i = 0; $i <= 25; $i++) {\n\t\t$year = $date->format(\"Y\");\n\t\t$date->add($yearint);\n\n\t\tif($savedValue === (int) $year)\n\t\t\techo \"<option value='$year' selected='selected'>\".$year.\"</option>\";\n\t\telse\n\t\t\techo \"<option value='$year'>\".$year.\"</option>\";\n\t}\n}", "private function validatorYearEnd(int $yearStart): Closure\n {\n return static fn (int $year): int => $year < self::YEAR_MIN || $year > self::YEAR_MAX || $year < $yearStart\n ? throw new InvalidArgumentException(\n sprintf(\n 'End year must be between %d and %d and after given start year %d',\n self::YEAR_MIN,\n self::YEAR_MAX,\n $yearStart,\n ),\n )\n : $year;\n }", "public function getMinYear() {\n return $this->minYear;\n }", "public function testRespectForTheAgedDayBefore1996(): void\n {\n $this->assertNotHoliday(\n self::REGION,\n self::HOLIDAY,\n $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1)\n );\n }", "public function testSubYear()\n {\n $this->assertEquals('2011-05-01', $this->date->subYears(2)->toDateString());\n }", "public function getYear()\n {\n return floor($this->convertToDateElement(Phpr_DateTime::elementYear));\n }", "public function setGraduationYear(?string $value): void {\n $this->getBackingStore()->set('graduationYear', $value);\n }", "public function get_expiry_year($context = 'view')\n {\n }", "public function addYear($value = 1)\n {\n return $this->addYears($value);\n }", "public function getYear()\n {\n return $this->year;\n }", "public function year($date);", "public function getStartDateYear()\n {\n return $this->startDateYear;\n }", "function nextExpirationYear($today)\r\n{\r\n\treturn nextExpiration_($today, 12);\r\n}", "function isCurrentYear(){\r\n $start_map = $this->start();\r\n $current_map = $this->current();\r\n return ($start_map['year'] == $current_map['year']);\r\n }", "public function subYear($value = 1)\n {\n return $this->subYears($value);\n }", "public function getCompensaInsuredYearsNext4Years()\n {\n return isset($this->CompensaInsuredYearsNext4Years) ? $this->CompensaInsuredYearsNext4Years : null;\n }" ]
[ "0.73250073", "0.64983606", "0.61455095", "0.6076342", "0.60606873", "0.60402846", "0.6038417", "0.6007038", "0.59377956", "0.58675754", "0.58383244", "0.5797606", "0.5792328", "0.5760876", "0.5739309", "0.5716659", "0.5715989", "0.5707469", "0.57040024", "0.5703244", "0.5700024", "0.5689993", "0.56787294", "0.5641477", "0.56382203", "0.5635577", "0.5593298", "0.5567622", "0.5553429", "0.55184686", "0.549563", "0.54758745", "0.54758745", "0.54745126", "0.54629713", "0.545085", "0.544763", "0.5441568", "0.5435879", "0.5433653", "0.5390865", "0.539072", "0.53614354", "0.5354314", "0.5354314", "0.5349663", "0.5347002", "0.5346723", "0.5339427", "0.5336196", "0.52933586", "0.52855736", "0.5273623", "0.52723056", "0.52570546", "0.5249018", "0.52468914", "0.5244841", "0.5233295", "0.5228225", "0.5218638", "0.5197891", "0.5194509", "0.5189344", "0.5188901", "0.5187987", "0.51849043", "0.5179032", "0.5177044", "0.5172361", "0.51599836", "0.51462775", "0.51281434", "0.51193124", "0.51184267", "0.5115773", "0.5115235", "0.5114849", "0.5113716", "0.5112004", "0.5109742", "0.5108873", "0.51072097", "0.51051784", "0.5092375", "0.5083869", "0.50821906", "0.5079878", "0.5079551", "0.50765735", "0.5076497", "0.5075958", "0.5071006", "0.50591475", "0.50569946", "0.5053468", "0.5052471", "0.50466394" ]
0.73831815
1
the maximum length of a single message (will truncate) set a user to online by creating an entry in the ChatOnlineUsers table if the user is already online, the LastActive field will be updated to NOW() Params: User_Id the user id of who to set online returns: true on success, or an errormsg string on error
максимальная длина одного сообщения (будет обрезано) установить пользователя в режиме онлайн, создав запись в таблице ChatOnlineUsers, если пользователь уже онлайн, поле LastActive будет обновлено до NOW() Параметры: User_Id идентификатор пользователя, которого нужно установить в режиме онлайн Возвращает: true при успехе, или строку с сообщением об ошибке при ошибке
function SetUserOnline( $User_Id ){ if( empty( $User_Id ) || ! is_int( $User_Id ) ) return( "Param error" ); $Sql = "UPDATE User SET IsOnlineChat = 1, LastActiveChat = NOW() WHERE Id = $User_Id LIMIT 1"; mysql_query( $Sql ); $errno = mysql_errno(); if( 0 != $errno ) return( "mysql error: $errno" ); // user is now online return( true ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SetUserOffline( $User_Id ){\n\n\tif( empty( $User_Id ) || ! is_int( $User_Id ) )\n\t\treturn( \"Param error: User_Id - wrong type or empty.\" );\n\t$Sql = \"UPDATE User SET IsOnlineChat = 0, LastActiveChat = NOW() WHERE Id = $User_Id LIMIT 1\";\n\tmysql_query( $Sql );\n\t$errno = mysql_errno();\n\tif( 0 != $errno )\n\t\treturn( \"mysql error: $errno\" );\n\t// user is now offline\n\treturn( true );\n}", "public function setLastOnline()\n {\n $user = $this->getUser(false);\n \n if ($user === null) {\n return;\n }\n \n // 1 hour timeout so we are not constantly updating this user\n $timeout = time() - (60 * 60);\n \n if ($user->getLastOnline() < $timeout) {\n $user->setLastOnline(time());\n $this->em->persist($user);\n $this->em->flush();\n }\n }", "public function setOnline(){\n\t\t\t$time = time() + 900;\n\t\t\tif(\\Auth::check())\n\t\t\t\tUser::find(\\Auth::user()->id_user)->update([\n\t\t\t\t\t'time_online' => $time\n\t\t\t\t]);\n\t\t}", "function UserOnlineUpdate()\r\n\t{\r\n\t\t$expire = time() + (60 * 10);\r\n\t\t$sql = $GLOBALS['db']->Query(\"DELETE FROM \" . PREFIX . \"_modul_forum_useronline WHERE expire <= '\" . time() . \"'\");\r\n\r\n\t\tif(isset($_SESSION['cp_benutzerid']))\r\n\t\t{\r\n\t\t\t$sql = $GLOBALS['db']->Query(\"SELECT Id FROM \" . PREFIX . \"_modul_forum_userprofile WHERE BenutzerId = '\".$_SESSION['cp_benutzerid'].\"'\");\r\n\t\t\t$num = $sql->numrows();\r\n\r\n\t\t\t// Wenn der Benutzet noch nicht im Forum-Profil gespeichert wurde,\r\n\t\t\t// wird dies hier getan\r\n\t\t\tif(!$num)\r\n\t\t\t{\r\n\t\t\t\t$sql = $GLOBALS['db']->Query(\"SELECT * FROM \" . PREFIX . \"_users WHERE Id = '\".$_SESSION['cp_benutzerid'].\"'\");\r\n\t\t\t\t$row = $sql->fetchrow();\r\n\r\n\t\t\t\t$q = \"INSERT INTO \" . PREFIX . \"_modul_forum_userprofile\r\n\t\t\t\t(\r\n\t\t\t\t\tId,\r\n\t\t\t\t\tBenutzerId,\r\n\t\t\t\t\tBenutzerName,\r\n\t\t\t\t\tGroupIdMisc,\r\n\t\t\t\t\tBeitraege,\r\n\t\t\t\t\tZeigeProfil,\r\n\t\t\t\t\tSignatur,\r\n\t\t\t\t\tIcq,\r\n\t\t\t\t\tAim,\r\n\t\t\t\t\tSkype,\r\n\t\t\t\t\tEmailempfang,\r\n\t\t\t\t\tPnempfang,\r\n\t\t\t\t\tAvatar,\r\n\t\t\t\t\tAvatarStandard,\r\n\t\t\t\t\tWebseite,\r\n\t\t\t\t\tUnsichtbar,\r\n\t\t\t\t\tInteressen,\r\n\t\t\t\t\tEmail,\r\n\t\t\t\t\tRegistriert,\r\n\t\t\t\t\tGeburtsTag\r\n\t\t\t\t) VALUES (\r\n\t\t\t\t\t'',\r\n\t\t\t\t\t'$row->Id',\r\n\t\t\t\t\t'\". (($row->UserName!='') ? $row->UserName : substr($row->Vorname,0,1) . '. ' . $row->Nachname) . \"',\r\n\t\t\t\t\t'',\r\n\t\t\t\t\t'',\r\n\t\t\t\t\t'1',\r\n\t\t\t\t\t'',\r\n\t\t\t\t\t'',\r\n\t\t\t\t\t'',\r\n\t\t\t\t\t'',\r\n\t\t\t\t\t'1',\r\n\t\t\t\t\t'1',\r\n\t\t\t\t\t'',\r\n\t\t\t\t\t'',\r\n\t\t\t\t\t'',\r\n\t\t\t\t\t'0',\r\n\t\t\t\t\t'',\r\n\t\t\t\t\t'$row->Email',\r\n\t\t\t\t\t'$row->Registriert',\r\n\t\t\t\t\t'$row->GebTag'\r\n\t\t\t\t)\";\r\n\t\t\t\t$GLOBALS['db']->Query($q);\r\n\t\t\t\theader(\"Location:index.php?module=forums\");\r\n\t\t\t}\r\n\r\n\t\t\t$sql = $GLOBALS['db']->Query(\"SELECT ip FROM \" . PREFIX . \"_modul_forum_useronline WHERE ip='\" . $_SERVER['REMOTE_ADDR'] . \"' limit 1\");\r\n\t\t\t$num = $sql->numrows();\r\n\r\n\t\t\tif ($num < 1)\r\n\t\t\t\t$sql = $GLOBALS['db']->Query(\"INSERT INTO \" . PREFIX . \"_modul_forum_useronline (ip,expire,uname,invisible) VALUES ('\" . $_SERVER['REMOTE_ADDR'] . \"','$expire','\" . (defined(\"USERNAME\") ? USERNAME : \"UNAME\") . \"','\" . (defined(\"USERNAME\") ? $this->getInvisibleStatus($_SESSION['cp_benutzerid']) : \"INVISIBLE\") . \"')\");\r\n\t\t\t else\r\n\t\t\t\t$sql = $GLOBALS['db']->Query(\"UPDATE \" . PREFIX . \"_modul_forum_useronline set uid = '\" . $_SESSION['cp_benutzerid']. \"', uname='\" . (defined(\"USERNAME\") ? USERNAME : \"UNAME\") . \"', invisible = '\" . (defined(\"USERNAME\") ? $this->getInvisibleStatus($_SESSION['cp_benutzerid']) : \"INVISIBLE\") . \"' WHERE ip='\" . $_SERVER['REMOTE_ADDR'] . \"'\");\r\n\t\t} else {\r\n\t\t\t$sql = $GLOBALS['db']->Query(\"SELECT ip FROM \" . PREFIX . \"_modul_forum_useronline WHERE ip='\" . $_SERVER['REMOTE_ADDR'] . \"' limit 1\");\r\n\t\t\t$num = $sql->numrows();\r\n\t\t\tif ($num < 1)\r\n\t\t\t\t$sql = $GLOBALS['db']->Query(\"INSERT INTO \" . PREFIX . \"_modul_forum_useronline (ip,expire,uname,invisible) VALUES ('\" . $_SERVER['REMOTE_ADDR'] . \"','$expire','UNAME','0')\");\r\n\t\t}\r\n\t}", "function SetUser_OnLine_LastLogin($UserId){\n\t\t\t$updateUseronline = array ('last_login'=> strtotime(date('Y-m-d H:i:s')));\n\t\t\t$this->db->where('user_id',$UserId);\n\t\t\t$this->db->update('Registration',$updateUseronline);\n\t\t}", "public function actionSetOnlineStatus() {\n header('Content-Type: text/event-stream');\n header('Cache-Control: no-cache');\n\n if (Yii::$app->user->isGuest) {\n echo \"data: \\n\\n\";\n flush();\n return 0;\n }\n\n $user = Users::findIdentity(Yii::$app->user->identity->Id);\n $user->last_connection = date('Y-m-d H:i:s');\n $user->save();\n\n echo \"data: saved\\n\\n\";\n flush();\n }", "function update_online_status() {\n if( ! isset($_GET['id'])) {\n throw \"Error: User id not found in the request.\";\n exit();\n }\n\n global $db_connection;\n // Get the current time in UNIX Timestamp format,\n // and update the recent_ping of the user with it.\n $current_time = time();\n $id = $_GET['id'];\n $query = \"UPDATE users SET recent_ping=$current_time WHERE id=$id\";\n mysqli_query($db_connection, $query);\n if(mysqli_errno($db_connection) != 0) {\n echo mysqli_error($db_connection);\n exit();\n }\n }", "function updateLastOnline($id) {\n R::exec( 'update user set last_online=NOW() where id = :id', [':id' => $id]);\n }", "function setUsersOffline() {\n\t\t$this->mdb->query(\"UPDATE gameUser SET isOnline = 0, lobbyId = 0 WHERE lastOnline < (NOW() - INTERVAL 10 MINUTE) AND isOnline != 0\");\n\t}", "function saveMessage($message)\r\n{\r\n\tglobal $con;\r\n\tif (isset($_SESSION['username'])) {\r\n\t\t$username = $_SESSION['username'];\r\n\t\tif (strlen($message) > 8 && strlen($message) < 512) {\r\n\t\t\t$escaped = escape($message);\r\n\t\t\t$userid_array = mysqli_fetch_array(mysqli_query($con, \"SELECT id FROM users WHERE username='{$username}'\"));\r\n\t\t\t$userid = $userid_array['id'];\r\n\t\t\tquery(\"INSERT INTO messages (userid, message) VALUES ('{$userid}', '{$escaped}')\");\r\n\t\t} else echo \"<p>Az üzenet maximum 512 karakter hosszú lehet, és minimum 8 karakterből kell álljon.</p>\";\r\n\t} else echo \"<p>Kérem jelentkezzen be, mielőtt üzenetet küldene!</p>\";\r\n}", "public function user_online($user_id) {\n global $db;\n /* first -> check if the target user enable the chat */\n $get_user_status = $db->query(sprintf(\"SELECT * FROM users WHERE users.user_chat_enabled = '1' AND users.user_id = %s\", secure($user_id, 'int'))) or _error(SQL_ERROR_THROWEN);\n if($get_user_status->num_rows == 0) {\n /* if no > return false */\n return false;\n }\n /* second -> check if the target user is friend to the viewer */\n if(!in_array($user_id, $this->_data['friends_ids'])) {\n /* if no > return false */\n return false;\n }\n /* third > check if the target user is online */\n $check_user_online = $db->query(sprintf(\"SELECT * FROM users_online WHERE users_online.user_id = %s\", secure($user_id, 'int'))) or _error(SQL_ERROR_THROWEN);\n if($check_user_online->num_rows == 0) {\n /* if no > return false */\n return false;\n } else {\n /* if yes > return false */\n return true;\n }\n }", "function chkuserlog() {\n $uid = $this->Session->read('User.id');\n $inactive = 1440;\n if(isset($_SESSION['timeout'])) {\n $session_life = time() - $_SESSION['timeout'];\n if($session_life > $inactive)\n {\n if($this->Session->check('User')) {\n $this->User->updateAll(array('User.login_status' => 0),array('User.id'=>$uid));\n $this->Session->delete('User');\n }\n $this->redirect(array('controller'=>'users', 'action'=>'index'));\n }\n else {\n $curdatetime = date('Y-m-d H:i:s');\n $this->User->updateAll(array('User.lastvisit_date' => \"'$curdatetime'\"),array('User.id'=>$uid));\n /* CHECK TO SEE IF USER IS IDLE FOR MORE THAN 1440sec (OR 24min) AFETR LAST LOGIN TIME then removed them from chat window */\n $chatUserList = $this->User->find('all', array(\n 'conditions' => array('TIMESTAMPDIFF(SECOND,User.lastvisit_date, \"'.date('Y-m-d H:i:s').'\") >' => 1440, 'User.login_status' => 1),\n 'fields' => 'User.id',\n 'order' => 'User.id ASC',\n ));\n for($i=0; $i<count($chatUserList); $i++) {\n $this->User->updateAll(array('User.login_status' => 0),array('User.id'=>$chatUserList[$i]['User']['id']));\n }\n\n }\n }\n $this->Session->write('timeout',time());\n}", "function ChangePublishMember($Id)\n {\n $this->db->where('id_user', $Id);\n $query = $this->db->get('user');\n if ($query->num_rows() > 0) {\n $row = $query->row_array();\n if ($row['status'] == '1') {\n $val = 0;\n } else {\n $val = 1;\n }\n\n $this->db->where('id_user', $row['id_user']);\n $this->db->update('user', array('status' => $val));\n\n if ($val == 1) {\n return 'Active';\n } else {\n return 'Not Active';\n }\n }\n }", "public function setStatusMessage($idMessage, $data){\n $this->db->where('id', $idMessage);\n $this->db->update('xref_message_user', $data);\n return 1;\n\t}", "function addOnline(){\n //tiempo en minutos de usuairo activo\n $time = 20;\n $ip = $_SERVER['REMOTE_ADDR'];\n $date = time();\n $limite = $date-$time*60;\n\n if(!empty($_SESSION['usuario'])){\n $nickclean = $this->getNickClean($_SESSION['usuario']);\n $w = \"SELECT u.usuario_nick AS nick, u.usuario_nick_clean AS nickclean, u.usuario_grupo AS grupo FROM usuarios AS u WHERE u.usuario_nick_clean = ?\";\n $t = $this->con->prepare($w);\n $t->bindParam(1,$nickclean,PDO::PARAM_STR);\n $t->execute();\n while($rws = $t->fetch(PDO::FETCH_ASSOC)){\n $dts[] = $rws;\n }\n $grupo = $dts[0]['grupo'];\n $nickclean = $dts[0]['nickclean'];\n $nick = $dts[0]['nick'];\n } else {\n $_SESSION['invitado'] = \"Invitado\";\n $nickclean = $_SESSION['invitado'];\n $nick = $_SESSION['invitado'];\n $grupo = 4;\n }\n //borramos usuarios que han exedido del tiempo maximo\n $l = \"DELETE FROM online WHERE online_last < ?\";\n $x = $this->con->prepare($l);\n $x->bindParam(1,$limite,PDO::PARAM_INT);\n $x->execute();\n\n $sql = \"SELECT * FROM online AS o WHERE o.online_ip = ?\";\n $res = $this->con->prepare($sql);\n $res->bindParam(1,$ip,PDO::PARAM_STR);\n\n $res->execute();\n $rc = $res->rowCount();\n\n if($rc != 0){\n //actualizar visitante\n $s = \"UPDATE online SET online_grupo = ?, online_nick = ?, online_nick_clean = ?, online_last = ? WHERE online_ip = ?\";\n $r = $this->con->prepare($s);\n $r->bindParam(1,$grupo,PDO::PARAM_STR);\n $r->bindParam(2,$nick,PDO::PARAM_STR);\n $r->bindParam(3,$nickclean,PDO::PARAM_STR);\n $r->bindParam(4,$date,PDO::PARAM_INT);\n $r->bindParam(5,$ip,PDO::PARAM_STR);\n $r->execute();\n } else {\n $q = \"INSERT INTO online (online_grupo, online_nick, online_nick_clean, online_ip, online_last) VALUES (?,?,?,?,?)\";\n $e = $this->con->prepare($q);\n $e->bindParam(1,$grupo,PDO::PARAM_STR);\n $e->bindParam(2,$nick,PDO::PARAM_STR);\n $e->bindParam(3,$nickclean,PDO::PARAM_STR);\n $e->bindParam(4,$ip,PDO::PARAM_STR);\n $e->bindParam(5,$date,PDO::PARAM_INT);\n $e->execute();\n }\n\n }", "function updateOnlineUser( $session, $time, $id, $role ){\n global $connection;\n\n $query = \"UPDATE users_online SET time = '$time', online_user_id = '$id', online_user_role = '$role' WHERE session = '$session'\";\n \n $result = mysqli_query( $connection, $query );\n\n confirmQuery( $result );\n }", "public function online_status($user_id) {\n $updated = ['online_status' => 1];\n\n DB::table('users')->where('id', $user_id)->update($updated);\n }", "function cek_active(){\n session_start();\n if(!isset($_SESSION['USER'])){\n $this->db->update(\"pengguna\", \n array(\n 'IS_ONLINE' => '0'\n ), \n array(\n 'USERNAME' => $this->username\n )\n );\n echo \"0\";\n }else{\n echo \"1\";\n }\n }", "function ChatStatusMessage()\n {\n if (Chat_tbl_app_chat_Max_Counter() <= Chat_tbl_shifa_log_Chat_Counter())\n {\n $UnReadChatMsg = \"No New\";\n }\n \n else\n {\n $UnReadChatMsg = (Chat_tbl_app_chat_Max_Counter() - Chat_tbl_shifa_log_Chat_Counter() ) . \" <font color='green'>New</font>\";\n }\n $ChatOnlineStatus = $UnReadChatMsg . \" <br> \" . Chat_tbl_app_reg_lastvisit_recent_Counter();\n return $ChatOnlineStatus;\n }", "private function touchUserLastActive()\n {\n if (WebRequest::getSessionUserId() !== null) {\n $query = 'UPDATE user SET lastactive = CURRENT_TIMESTAMP() WHERE id = :id;';\n $this->getDatabase()->prepare($query)->execute(array(\":id\" => WebRequest::getSessionUserId()));\n }\n }", "public function setLastLogin()\n\t{\n\t\t// Not a valid user\n\t\tif ($this->id == null)\n\t\t\treturn false;\n\t\t\t\n\t\t$this->last_login = date('Y-m-d H:i:s');\n\n\t\ttry {\n\t\t\t$stmt = $GLOBALS['db']->prepare(\"UPDATE user SET last_login=now() WHERE id=:id\");\n\t\t\t$stmt->bindValue(':id', $this->id);\n\t\t\t\t\n\t\t\tif ($stmt->execute()) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} catch (Exception $e) {\n\t\t\t$this->log->logError($e);\n\t\t\treturn false;\n\t\t}\n\t}", "public function online($user_id){\n\t\tglobal $base;\n\t\t$clean_user = $this->user_id = $base->clear_string($user_id);\n\t\t$ip = getenv('HTTP_CLIENT_IP') ? : getenv('HTTP_X_FORWARDED_FOR') ? : getenv('HTTP_X_FORWARDED') ? : getenv('HTTP_FORWARDED_FOR') ? : getenv('HTTP_FORWARDED') ? : getenv('REMOTE_ADDR');\n\t\t$sql = \"UPDATE users SET status = '1', current_ip_address ='{$ip}' WHERE user_id = '{$clean_user}'\"; \n\t\t$base->select_table($sql);\n\t}", "function usersOnline() {\n\n if(isset($_GET['onlineusers'])) {\n global $connection;\n\n if(!$connection) {\n session_start(); //start the session\n include(\"../includes/database.php\");\n\n $session_id = session_id(); //get the id of the current session\n $time = time(); //the current time\n $timeout_seconds = 5;//the amount of time until the user is marked as offline\n $timeout = $time - $timeout_seconds; //the time the user is timed out\n\n /*See if anyone is online */\n $query = \"SELECT * FROM users_online WHERE session_id = '$session_id'\";\n $send_query = mysqli_query($connection, $query);\n $count = mysqli_num_rows($send_query);\n\n if($count == NULL) {\n $query = \"INSERT INTO users_online (session_id, time) VALUES ('$session_id', '$time')\";\n mysqli_query($connection, $query);\n } else {\n $query = \"UPDATE users_online SET time = '$time' WHERE session_id = '$session_id'\";\n mysqli_query($connection, $query);\n }\n\n $query = \"SELECT * FROM users_online WHERE time > '$timeout'\";\n $users_online_query = mysqli_query($connection, $query);\n echo $users_online_count = mysqli_num_rows($users_online_query);\n } //if(!$connection)\n } //if(isset($_GET['onlineusers']))\n}", "public function updateUserIsOnline($id, $status){\n\t\tif (empty($id) || !is_numeric($id) || !is_bool($status)){\n\t\t\treturn false;\n\t\t}\n\t\t$res = $this->db->query('UPDATE users SET `IsOnline` = ?i WHERE id=?i', $status, $id);\n\t\treturn $res;\n\t}", "public function LoginUpdate()\n\t{\n\t\t$time = time();\n\t\t$uid = $this->user['loggedin'] ? $this->user['id'] : 0;\n\t\t\n\t\t//Build UPDATE Query for existing entry\n\t\t$query = new MMQueryBuilder();\n\t\t$query->Update(\"`online`\")->Where(\"`uid` = '%s' AND `ip` = '%s'\", $uid, GetIp())\n\t\t->Columns(array(\n\t\t\t'`lastvisit`'\t=> \"'%s'\",\n\t\t\t'`online`'\t\t=> \"'1'\",\t\n\t\t), time());\n\t\t\n\t\tif($this->firstvisit) //If firstvisit\n\t\t{\n\t\t\t$query->AddColumns(array('`firstvisit`' => \"CURRENT_TIMESTAMP\"));\n\t\t}\n\t\tif($GLOBALS['AJAX_PAGE'] != true) //If it is not an ajax page, add extra columns\n\t\t{\n\t\t\t$query->AddColumns(array(\n\t\t\t\t'`request_uri`' => \"'%s'\",\n\t\t\t\t'`visits`' => \"`visits` + 1\",\n\t\t\t\t'`header_host`'\t\t\t=> \"'%s'\",\n\t\t\t\t'`header_connection`'\t=> \"'%s'\",\n\t\t\t\t'`header_user_agent`'\t=> \"'%s'\",\n\t\t\t\t'`header_cache_control`'=> \"'%s'\",\n\t\t\t\t'`header_accept`'\t\t=> \"'%s'\",\n\t\t\t\t'`header_accept_encoding`'=>\"'%s'\",\n\t\t\t\t'`header_accept_language`'=>\"'%s'\",\n\t\t\t\t'`header_accept_charset`'=> \"'%s'\",\n\t\t\t), $_SERVER['REQUEST_URI'], $_SERVER['HTTP_HOST'], $_SERVER['HTTP_CONNECTION'], $_SERVER['HTTP_USER_AGENT'], $_SERVER['HTTP_CACHE_CONTROL'], $_SERVER['HTTP_ACCEPT'], $_SERVER['HTTP_ACCEPT_ENCODING'], $_SERVER['HTTP_ACCEPT_LANGUAGE'], $_SERVER['HTTP_ACCEPT_CHARSET']);\n\t\t}\n\t\t$query->Build();\n\t\t$result = $this->db->query($query, DBNAME);\n\t\t\n\t\t//Build INSERT Query for new entry\n\t\tif($this->db->affected_rows < 1 && $GLOBALS['AJAX_PAGE'] != true)\n\t\t{\n\t\t\t$query = new MMQueryBuilder();\n\t\t\t$query->Insert(\"`online`\")\n\t\t\t->Columns(array(\n\t\t\t\t'`uid`'\t\t\t\t\t=> \"'%s'\",\n\t\t\t\t'`ip`'\t\t\t\t\t=> \"'%s'\",\n\t\t\t\t'`lastvisit`'\t\t\t=> \"'%s'\",\n\t\t\t\t'`online`'\t\t\t\t=> \"'1'\",\n\t\t\t\t'`visits`'\t\t\t\t=> \"'1'\",\n\t\t\t\t'`request_uri`'\t\t\t=> \"'%s'\",\n\t\t\t\t'`header_host`'\t\t\t=> \"'%s'\",\n\t\t\t\t'`header_connection`'\t=> \"'%s'\",\n\t\t\t\t'`header_user_agent`'\t=> \"'%s'\",\n\t\t\t\t'`header_cache_control`'=> \"'%s'\",\n\t\t\t\t'`header_accept`'\t\t=> \"'%s'\",\n\t\t\t\t'`header_accept_encoding`'=>\"'%s'\",\n\t\t\t\t'`header_accept_language`'=>\"'%s'\",\n\t\t\t\t'`header_accept_charset`'=> \"'%s'\",\t\n\t\t\t),\n\t\t\t$uid, GetIp(), time(), $_SERVER['REQUEST_URI'], $_SERVER['HTTP_HOST'], $_SERVER['HTTP_CONNECTION'], $_SERVER['HTTP_USER_AGENT'], $_SERVER['HTTP_CACHE_CONTROL'], $_SERVER['HTTP_ACCEPT'], $_SERVER['HTTP_ACCEPT_ENCODING'], $_SERVER['HTTP_ACCEPT_LANGUAGE'], $_SERVER['HTTP_ACCEPT_CHARSET']);\n\t\n\t\t\tif($this->firstvisit)\n\t\t\t{\n\t\t\t\t$query->AddColumns(array('`firstvisit`' => \"CURRENT_TIMESTAMP\"));\n\t\t\t}\n\t\t\t$query->Build();\n\t\t\t$result = $this->db->query($query, DBNAME);\n\t\t}\n\t}", "function online($name, $time)\n{\n\n for ($i = 0; $i < count($GLOBALS['users']); $i++) {\n if ($GLOBALS['users'][$i]['name'] == $name) {\n $GLOBALS['users'][$i]['online'] = true;\n $GLOBALS['users'][$i]['time'] = $time;\n return true;\n }\n }\n\n add_user($name, true, $time);\n}", "function isOnline($user_id){\n\n $sql = \"SELECT * from user WHERE user_id ='$user_id' AND `last_activity`<DATE_SUB(NOW(), INTERVAL 5 SECOND)\";\n\n $result = mysqli_fetch_assoc(mysqli_query(self::$db, $sql));\n\n return $result;\n\n }", "public function handleChat(PusherHookEvent $event) {\n $user = $event->user;\n\n if ($event->name === 'member_added') {\n $user->fill(['is_online' => true])->save();\n } else {\n $user->fill(['is_online' => false])->save();\n }\n }", "function check_online($session_id, $location) {\n global $TABLE_PREFIX, $CURUSER;\n\n $location = sqlesc($location);\n $ip = getip();\n $uid = max(1,(int)$CURUSER['uid']);\n $suffix = sqlesc($CURUSER['suffixcolor']);\n $prefix = sqlesc($CURUSER['prefixcolor']);\n $uname = sqlesc($CURUSER['username']);\n $ugroup = sqlesc($CURUSER['level']);\n $warn = sqlesc($CURUSER['warn']);\n if ($uid == 1)\n $where = \"WHERE session_id='$session_id'\";\n else\n $where = \"WHERE user_id='$uid' OR session_id='$session_id'\";\n\n @quickQuery(\"UPDATE {$TABLE_PREFIX}online SET session_id='$session_id', user_name=$uname, user_group=$ugroup, prefixcolor=$prefix, suffixcolor=$suffix, location=$location, user_id=$uid, warn=$warn, lastaction=UNIX_TIMESTAMP() $where\");\n // record don't already exist, then insert it\n if (mysql_affected_rows() == 0) { \n @quickQuery(\"UPDATE {$TABLE_PREFIX}users SET lastconnect=NOW() WHERE id=$uid AND id>1\");\n @quickQuery(\"INSERT INTO {$TABLE_PREFIX}online SET session_id='$session_id', user_name=$uname, user_group=$ugroup, prefixcolor=$prefix, suffixcolor=$suffix, user_id=$uid, user_ip='$ip', location=$location, warn=$warn, lastaction=UNIX_TIMESTAMP()\");\n }\n\n $timeout = time() - 900; // 15 minutes\n// @quickQuery(\"UPDATE {$TABLE_PREFIX}users SET lastconnect=NOW() WHERE id IN (SELECT user_id FROM {$TABLE_PREFIX}online ol WHERE ol.lastaction<$timeout AND ol.user_id>1)\");\n @quickQuery(\"UPDATE {$TABLE_PREFIX}users u INNER JOIN {$TABLE_PREFIX}online ol ON ol.user_id = u.id SET u.lastconnect=NOW(), u.cip=ol.user_ip, u.lip=INET_ATON(ol.user_ip) WHERE ol.lastaction<$timeout AND ol.user_id>1\");\n @quickQuery(\"DELETE FROM {$TABLE_PREFIX}online WHERE lastaction<$timeout\");\n}", "public function active_chat_box($id)\n {\n $check_chat = get_row('tbl_private_chat', array('private_chat_id' => $id));\n if (empty($check_chat)) {\n // check the private_chat_id is exist\n $data = array(\n \"chatid\" => $id,\n \"error\" => lang('invalid') . ' ' . lang('chat'),\n );\n } else {\n // check user validation is the user who chat to other\n $check_user = get_row('tbl_private_chat_users', array('private_chat_id' => $id, 'user_id' => $this->session->userdata('user_id')));\n\n if (empty($check_user)) {\n $data = array(\n \"chatid\" => $id,\n \"error\" => lang('something_wrong'),\n );\n } else {\n $uc_data['active'] = 1;\n $this->chat_model->_table_name = 'tbl_private_chat_users';\n $this->chat_model->_primary_key = 'private_chat_users_id';\n $this->chat_model->save($uc_data, $check_user->private_chat_users_id);\n\n if (!empty($check_chat->chat_title)) {\n $check_user->title = $check_chat->chat_title;\n }\n\n $data = array(\n \"chatid\" => $id,\n \"title\" => $check_user->title,\n );\n }\n\n }\n echo json_encode($data);\n exit();\n }", "function userLastOnline($username, $timestamp) {\n\t\t$this->mdb->query(\"UPDATE gameUser SET lastOnline = %t, isOnline = 1 WHERE username = %s\", $timestamp, $username);\n\t}", "function update_statuts(){\n\n\n\n $conn = open_cnxn();\n global $log;\n\n // Check connection\n if (!$conn) {\n\n $log->error(\"Connection failed: \" . mysqli_connect_error());\n\n\n }\n $id=$_SESSION['id'];\n if ($conn) {\n $sql =\"UPDATE users SET status='online' WHERE id='$id' \";\n\n if ($result= mysqli_query($conn, $sql)) {\n\n\n }else{\n $log->error(\"Error while login \" . $sql . \"\\n\" . mysqli_error($conn));\n\n }\n }\n\n\nreturn\"\";\n}", "function Users_Online()\r\n{\r\n if(isset($_GET['onlineusers']))\r\n {\r\n global $sqlconnection;\r\n if(!$sqlconnection)\r\n {\r\n session_start();\r\n include(\"../includes/Db.php\"); \r\n $session =Escape(session_id());// Get current session's id\r\n $time = time();\r\n $timeoutsecs = 05;\r\n $timeout = $time - $timeoutsecs;\r\n $usersessionquery =mysqli_prepare($sqlconnection,\"SELECT * FROM USERS_ONLINE WHERE SESSION = ?\");\r\n mysqli_stmt_bind_param($usersessionquery,\"s\",$session);\r\n mysqli_stmt_execute($usersessionquery);\r\n mysqli_stmt_store_result($usersessionquery);\r\n $rowcount = mysqli_stmt_num_rows($usersessionquery);\r\n if($rowcount == NULL){\r\n $insertonlinequery = mysqli_prepare($sqlconnection,\"INSERT INTO USERS_ONLINE (SESSION,TIME) VALUES (?,?) \");\r\n $bindparam= mysqli_stmt_bind_param($insertonlinequery,\"si\",$session,$time);\r\n $result =mysqli_stmt_execute($insertonlinequery);\r\n }\r\n else{\r\n $updateonlinequery = mysqli_prepare($sqlconnection,\"UPDATE USERS_ONLINE SET TIME=? WHERE SESSION = ?\");\r\n mysqli_stmt_bind_param($updateonlinequery,\"is\",$time,$session);\r\n mysqli_stmt_execute($updateonlinequery);\r\n } \r\n $useronlinequery = mysqli_prepare($sqlconnection,\"SELECT * FROM USERS_ONLINE WHERE TIME > ?\");\r\n mysqli_stmt_bind_param($useronlinequery,\"i\",$timeout);\r\n mysqli_stmt_execute($useronlinequery);\r\n mysqli_stmt_store_result($useronlinequery);\r\n echo $usersonline = mysqli_stmt_num_rows($useronlinequery);\r\n }\r\n }\r\n}", "public function chatBonusMsg($partnerMember,$textMsg) { \n //$this->ChatCache=new ChatCacheComponent(null); \n //$this->ChatCache->initialize($this->Controller);\n \n $memBig = 90644;\n $partnerBig = $partnerMember;\n $text = $textMsg;\n $relId = null;\n $checkinBig = null;\n $xfoto = null;\n \n $newerThan = null;\n \n \n \n // Find relationship in member_rels table\n $memRel = $this->ChatMessage->MemberRel->findRelationships ( $memBig, $partnerBig );\n \n if (empty ( $memRel )) {\n // Create a new one\n $query=\"INSERT INTO member_rels(member1_big,member2_big) \".\n \"VALUES ($memBig,$partnerBig) \"; \n \n try {\n $res=$this->MemberRel->query($query);\n //$relId = $memRel ['MemberRel'] ['id'];\n \n \n \n } catch ( Exception $e ) {\n $this->_apiEr ( __('Errore. Relazione non creata.') );\n }\n $memRel = $this->ChatMessage->MemberRel->findRelationships ( $memBig, $partnerBig );\n \n } \n \n $relId = $memRel ['MemberRel'] ['id'];\n \n // Create chat message record\n \n $relation=$relId;\n \n $message = array (\n 'rel_id' => $relation,\n 'from_big' => $memBig,\n 'to_big' => $partnerBig,\n 'checkin_big' => $checkinBig,\n 'text' => $text,\n 'from_status' => 1, // from status = 1 (not deleted)\n 'to_status' => 1, // tp status = 1 (not deleted)\n 'created' => 'NOW()',\n 'status' => 1 \n );\n \n $this->ChatMessage->create();\n $this->ChatMessage->set( $message );\n $msgId = null;\n $chatMsg = null;\n try {\n $res = $this->ChatMessage->save();\n $result = ($res) ? true : false;\n \n $msgId = $res ['ChatMessage'] ['id'];\n $pars = array (\n 'conditions' => array (\n 'ChatMessage.id' => $msgId \n ),\n 'fields' => array (\n 'ChatMessage.id',\n 'ChatMessage.rel_id',\n 'ChatMessage.created' \n ),\n 'recursive' => - 1 \n );\n \n \n $chatMsg = $this->ChatMessage->find ( 'first', $pars );\n \n \n } catch ( Exception $e ) {\n $this->_apiEr ( __('Errore. Messaggio non creato.') );\n }\n \n //$this->ChatCache->write ( $partnerBig . '_last_msg', strtotime ( $chatMsg ['ChatMessage'] ['created'] ) );\n \n // Determine number of unread messages\n $unreadCount = $this->ChatMessage->getUnreadMsgCount ( $partnerBig );\n \n // Send push notifications\n $privacySettings=$this->PrivacySetting->getPrivacySettings($partnerBig);\n $privacySettings=$privacySettings[0]['PrivacySetting'];\n $notifyChatMessages=$privacySettings['notifychatmessages'];\n \n $goonPrivacy=true;\n \n if (count($privacySettings)>0 AND $notifyChatMessages == 0)\n {\n $goonPrivacy=false;\n \n }\n //$this->log(\"goonPrivacy \".intval($goonPrivacy));\n if ($goonPrivacy)\n {\n $strLen = 50;\n \n $name = 'Haamble';\n \n $msg = (strlen ( $text ) > $strLen + 4) ? substr ( $text, 0, $strLen ) . ($text [$strLen + 1] == ' ' ? ' ...' : '...') : $text;\n $this->PushToken->sendNotification ( $name, $msg, array (\n 'partner_big' => $memBig,\n 'created' => $chatMsg ['ChatMessage'] ['created'],\n 'rel_id' => $chatMsg ['ChatMessage'] ['rel_id'],\n 'msg_id' => $chatMsg ['ChatMessage'] ['id'],\n 'unread' => $unreadCount \n ), array ($partnerBig), 'chat', 'new' );\n \n }\n // return chat messages like in the receive call with refresh enabled\n $newMsgs = $this->ChatMessage->findConversations ( $memBig, $partnerBig, null, $newerThan, 0, true );\n \n // Mark mesaages as read\n if (! empty ( $newMsgs ['chat_messages'] )) {\n $updated = $this->ChatMessage->markAsRead ( $memBig, $partnerBig );\n if (! $updated)\n CakeLog::warning ( 'Messages not marked as read. Membig ' . $memBig . ' Partner big ' . $partnerBig );\n \n }\n \n //$newMsgs['chat_messages'][count($newMsgs['chat_messages'])-1]['photo']=$this->FileUrl->chatmsg_picture($msgId);\n \n \n return($relId);\n }", "function add_chat_message($data){\n $this->db->insert('chat_message', $data);\n if ($this->db->affected_rows()) { return 1;} else { return 0; }\n }", "private function loadOnlineUser() {\r\n $user = User::find('online = 1');\r\n if($user !== false) {\r\n $this->view->onlineUser = $user;\r\n }\r\n }", "static function count_new_messages($id_user){\n if(!is_int($id_user))\n return false;\n return self::$PDO->prepare('SELECT '.self::$prefix.'count_new_messages(:id_user)')->execute(array(':id_user'=>$id_user));\n }", "static function updateOnline($channel, $userId) {\n if ($userId !== 94) {\n $sql = 'INSERT INTO `chat_users_online`\n (user,timestamp,channel)\n VALUES (?,UNIX_TIMESTAMP(),?)\n ON DUPLICATE KEY UPDATE timestamp=UNIX_TIMESTAMP()';\n DB::statement($sql, array($userId, $channel));\n }\n }", "function userLiveStatusUpdate($Input = array(), $ContestID, $UserID, $SeriesID) {\n\n /** to update other user offline * */\n $UpdateDatas = array(\n \"DraftUserLive\" => \"No\"\n );\n $this->db->where('ContestID', $ContestID);\n $this->db->where('SeriesID', $SeriesID);\n $this->db->update('sports_contest_join', $UpdateDatas);\n\n /* user status update . */\n $UpdateData = array(\n \"DraftUserLive\" => $Input['UserStatus'],\n \"DraftUserLiveTime\" => date('Y-m-d H:i:s'),\n );\n $this->db->where('ContestID', $ContestID);\n $this->db->where('UserID', $UserID);\n $this->db->where('SeriesID', $SeriesID);\n $this->db->limit(1);\n $this->db->update('sports_contest_join', $UpdateData);\n return $Rows = $this->db->affected_rows();\n }", "private function update_last_seen() {\n Trace::add_trace('update user last seen',__METHOD__);\n if (!is_array($this->sess_save)) { return false; }\n self::$conn->update(\n 'users', \n '`last_seen` = NOW(), `seen` = `seen`+1', \n array(\n array('username',\"=\",self::$conn->filter($this->sess_save['uname'])),\n array('session',\"=\",self::$conn->filter($this->sess_save['sess']))\n ) \n );\n }", "public function Login() {\n\t\t $message = parent::Login();\n\t\treturn $message . '..set online flag for the member class';\n\t}", "function smfapi_isOnline($username='')\n{\n\tglobal $smcFunc;\n\n $user_data = smfapi_getUserData($username);\n\n if (!$user_data) {\n return false;\n }\n\n $request = $smcFunc['db_query']('', '\n\t\tSELECT lo.id_member\n\t\tFROM {db_prefix}log_online AS lo\n\t\tWHERE lo.id_member = {int:id_member}',\n\t\tarray(\n\t\t\t'id_member' => $user_data['id_member'],\n\t\t)\n\t);\n\n if ($smcFunc['db_num_rows']($request) == 0) {\n return false;\n\t} else {\n $smcFunc['db_free_result']($request);\n return true;\n\t}\n}", "public function isOnline(): bool\n {\n return Cache::has('user-is-online-' . $this->id);\n }", "public function chatMsgBonus($partnerMember,$textMsg) { \n \n $memBig = ID_HAAMBLE_USER;\n $partnerBig = $partnerMember;\n $text = $textMsg;\n $relId = null;\n $checkinBig = null;\n $xfoto = null;\n //$pollo=$this->api['photo']; \n $newerThan = null;\n \n /*\n * Check if user is not in partners ignore list Find checkins -> because of status and checkin big Find ,potentially create member_rel If users are not checked in at the same place, they have to have a memberRel record (chat started based on previous conversation) Save to DB\n */\n \n // Check if user is not on partners ignore list\n $isIgnored = $this->ChatMessage->Sender->MemberSetting->isOnIgnoreListDual ( $partnerBig, $memBig );\n if ($isIgnored) {\n $this->_apiEr ( __('Non posso inviare il messaggio chat. L\\'utente è stato bloccato.'), false, false, array (\n 'error_code' => '510' \n ) );\n }\n \n // Find valid checkin for member and partner\n //$memCheckin = $this->ChatMessage->Checkin->getCheckedinEventFor ( $memBig, TRUE );\n \n //$partnerCheckin = $this->ChatMessage->Checkin->getCheckedinEventFor ( $partnerBig, TRUE );\n \n // Find relationship in member_rels table\n $memRel = $this->ChatMessage->MemberRel->findRelationships ( $memBig, $partnerBig );\n \n //$frieRel = $this->Friend->FriendsRelationship ( $memBig, $partnerBig, 'A' );\n \n if (empty ( $memRel )) {\n // Create a new one\n $relationship = array (\n 'member1_big' => $memBig,\n 'member2_big' => $partnerBig \n );\n $this->ChatMessage->MemberRel->create();\n $this->ChatMessage->MemberRel->set( $relationship );\n try {\n $memRel = $this->ChatMessage->MemberRel->save();\n $relId = $memRel ['MemberRel'] ['id'];\n \n } catch ( Exception $e ) {\n $this->_apiEr ( __('Errore. Relazione non creata.') );\n }\n } else {\n $relId = $memRel ['MemberRel'] ['id'];\n }\n \n // Create chat message record\n $message = array (\n 'rel_id' => $relId,\n 'from_big' => $memBig,\n 'to_big' => $partnerBig,\n 'checkin_big' => $checkinBig,\n 'text' => $text,\n 'from_status' => 1, // from status = 1 (not deleted)\n 'to_status' => 1, // tp status = 1 (not deleted)\n 'created' => 'NOW()',\n 'status' => 1 \n // 'photo' => $hasphoto,\n );\n \n // $this->Model->getLastInsertId();\n $this->ChatMessage->create();\n $this->ChatMessage->set( $message );\n $msgId = null;\n $chatMsg = null;\n try {\n $res = $this->ChatMessage->save ();\n $result = ($res) ? true : false;\n /* $this->log(\"-------ChatMessages CONTROLLER-api_receive-----\");\n $this->log(\"id messaggio inserito = \".serialize($res[ChatMessage][id]));\n $this->log(\"--------------close api_receive----------------\");\n */ \n $msgId = $res ['ChatMessage'] ['id'];\n $pars = array (\n 'conditions' => array (\n 'ChatMessage.id' => $msgId \n ),\n 'fields' => array (\n 'ChatMessage.id',\n 'ChatMessage.rel_id',\n 'ChatMessage.created' \n ),\n 'recursive' => - 1 \n );\n \n \n $chatMsg = $this->ChatMessage->find ( 'first', $pars );\n \n \n } catch ( Exception $e ) {\n $this->_apiEr ( __('Errore. Messaggio non creato.') );\n }\n //$this->log(\"link photo = $photolink\");\n $this->ChatCache->write ( $partnerBig . '_last_msg', strtotime ( $chatMsg ['ChatMessage'] ['created'] ) );\n \n // Determine number of unread messages\n $unreadCount = $this->ChatMessage->getUnreadMsgCount ( $partnerBig );\n // debug($unreadCount);\n \n // Send push notifications\n $privacySettings=$this->PrivacySetting->getPrivacySettings($partnerBig);\n $privacySettings=$privacySettings[0]['PrivacySetting'];\n $notifyChatMessages=$privacySettings['notifychatmessages'];\n \n $goonPrivacy=true;\n $this->log(\"-------chatmessages----------\");\n $this->log(\"Settings \".serialize($privacySettings));\n $this->log(\"notifychatmessages \".intval($notifyChatMessages));\n if (count($privacySettings)>0)\n {\n if ($notifyChatMessages == 0)\n {\n $goonPrivacy=false;\n }\n }\n $this->log(\"goonPrivacy \".intval($goonPrivacy));\n if ($goonPrivacy)\n {\n $strLen = 50;\n \n $name = 'Haamble';\n \n $msg = (strlen ( $text ) > $strLen + 4) ? substr ( $text, 0, $strLen ) . ($text [$strLen + 1] == ' ' ? ' ...' : '...') : $text;\n $this->PushToken->sendNotification ( $name, $msg, array (\n 'partner_big' => $memBig,\n 'created' => $chatMsg ['ChatMessage'] ['created'],\n 'rel_id' => $chatMsg ['ChatMessage'] ['rel_id'],\n 'msg_id' => $chatMsg ['ChatMessage'] ['id'],\n // 'timestamp' => time(),\n 'unread' => $unreadCount \n ), array (\n $partnerBig \n ), 'chat', 'new' );\n \n }\n // return chat messages like in the receive call with refresh enabled\n $newMsgs = $this->ChatMessage->findConversations ( $memBig, $partnerBig, null, $newerThan, 0, true );\n \n // Mark mesaages as read\n if (! empty ( $newMsgs ['chat_messages'] )) {\n $updated = $this->ChatMessage->markAsRead ( $memBig, $partnerBig );\n if (! $updated)\n CakeLog::warning ( 'Messages not marked as read. Membig ' . $memBig . ' Partner big ' . $partnerBig );\n /* $this->log(\"-------ChatMessages CONTROLLER-api_send-----\");\n $this->log(\"updated = $updated \");\n $this->log(\"WWWROOT =\".WWW_ROOT);\n $this->log(\"--------------close api_send----------------\");*/\n }\n \n $newMsgs['chat_messages'][count($newMsgs['chat_messages'])-1]['photo']=$this->FileUrl->chatmsg_picture($msgId);\n //print_r($newMsgs);\n /*if ($result !== false) {\n $this->Util->transform_name ( $chatMsg );\n $this->Util->transform_name ( $newMsgs );\n $this->_apiOk ( $chatMsg );\n $this->_apiOk ( $newMsgs );\n \n \n } else {\n $this->_apiEr ( __('Error occured. Message not sent.') );\n }\n */\n }", "public function login(){\r\n \r\n return '...Set a flag in the online Members table. ';\r\n }", "function Extend($UserID,$Email)\n\t{\n\t\tif (!jf::$User->UserIDExists($UserID)) return null;\n\t\tif ($this->UserIDExists($UserID)) return false;\n\t\t$IID=jf::SQL(\"INSERT INTO {$this->TablePrefix()}xuser (ID,Email,CreateTimestamp,PasswordChangeTimestamp) VALUES (?,?,?,?)\"\n\t\t\t\t,$UserID,$Email,jf::time(),jf::time()+self::$PasswordLifeTime);\n\t\treturn $IID>0;\n\t}", "function TakeOnline()\n\t{\n\t\t$query = \"UPDATE sysmenue SET activ = '1' WHERE id = '\" . $this -> getMenuId() . \"'\";\n\t\t$insert = @mysql_query($query) OR functions::output_fehler('MySQL-Error: Nr. 129');\n\t\tif($insert == true)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public function isOnline()\n {\n return Cache::has('user-online-' . $this->id);\n }", "function status_moderador()\n {\n $usuario=new Usuario($this->session->userdata('logged_user'));\n $usuario->status_chat=0;\n $usuario->skip_validation()->save();\n }", "function online_set_user_offline($userid, $flag){\n\t\t$pri_msg=pack(\"Ll\",$userid ,$flag );\n\t\t$sendbuf=$this->park(\"EA61\", 0 , $pri_msg);\n\t\treturn $this->unpark($this->sock->sendmsg($sendbuf),\"\");\n\t}", "function update_last_online($id)\n\t{\n\t\t$data = array('date_lastonline' => date('Y-m-d H:i:s'));\n\t\t$this->db->update($this->table_name, $data, \"id = '\" . $id . \"'\");\n\t}", "function smfapi_logOnline($username='')\n{\n global $smcFunc, $modSettings;\n\n $user_data = smfapi_getUserData($username);\n\n if (!$user_data) {\n return false;\n }\n \n if (!$user_data['show_online']) {\n return false;\n }\n\n if (smfapi_isOnline($username)) {\n $do_delete = true;\n } else {\n $do_delete = false;\n }\n\n $smcFunc['db_query']('', '\n DELETE FROM {db_prefix}log_online\n WHERE ' . ($do_delete ? 'log_time < {int:log_time}' : '')\n . ($do_delete && !empty($user_data['id_member']) ? ' OR ' : '')\n . (empty($user_data['id_member']) ? '' : 'id_member = {int:current_member}'),\n array(\n 'current_member' => $user_data['id_member'],\n 'log_time' => time() - $modSettings['lastActive'] * 60,\n )\n );\n\n $smcFunc['db_insert']($do_delete ? 'ignore' : 'replace',\n '{db_prefix}log_online',\n array('session' => 'string',\n 'id_member' => 'int',\n 'id_spider' => 'int',\n 'log_time' => 'int',\n 'ip' => 'raw',\n 'url' => 'string'),\n array(session_id(),\n $user_data['id_member'],\n 0,\n time(),\n 'IFNULL(INET_ATON(\\'' . $user_data['ip'] . '\\'), 0)',\n ''),\n array('session')\n );\n\n\t// Mark the session as being logged.\n\t$_SESSION['log_time'] = time();\n\n\t// Well, they are online now.\n\tif (empty($_SESSION['timeOnlineUpdated'])) {\n\t\t$_SESSION['timeOnlineUpdated'] = time();\n }\n\n return true;\n}", "public function enableUser($id){\n global $db;\n $query = \"UPDATE tbl_user SET status = '0' WHERE id = '$id'\";\n $update_row = $db->update($query);\n if ($update_row) {\n $msg = \"<span class='success'>User Enabled !</span>\";\n return $msg;\n }else{\n $msg = \"<span class='error'>User Not Enable !</span>\";\n return $msg;\n }\n }", "public function isOnline()\n {\n return Cache::has('user-is-online-' . $this->id);\n }", "public function isOverLimit($uID){\n\t\tif(Config::get('concrete.user.private_messages.throttle_max') == 0) { return false; }\n\t\tif(Config::get('concrete.user.private_messages.throttle_max_timespan') == 0) { return false; }\n\t\t$db = Loader::db();\n\t\t$dt = new DateTime();\n\t\t$dt->modify('-'.Config::get('concrete.user.private_messages.throttle_max_timespan').' minutes');\n\t\t$v = array($uID, $dt->format('Y-m-d H:i:s'));\n\t\t$q = \"SELECT COUNT(msgID) as sent_count FROM UserPrivateMessages WHERE uAuthorID = ? AND msgDateCreated >= ?\";\n\t\t$count = $db->getOne($q,$v);\n\n\t\tif($count > Config::get('concrete.user.private_messages.throttle_max')) {\n\t\t\tself::notifyAdmin($uID);\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function set_mensaje_panel()\n {\n $this->acceso->valida('chat', 'editar', 1);\n if(substr($this->input->post('mensaje'),0,1)==\":\"){\n $respuesta=new Respuesta();\n $respuesta->get_by_snipet(substr($this->input->post('mensaje'),1));\n if($respuesta->exists()) $_POST['mensaje']=$respuesta->respuesta;\n else {\n return false;\n }\n }\n\n $usuario=new Usuario($this->session->userdata('logged_user'));\n $mensaje=new Mensaje();\n $mensaje->visitante_id=$this->input->post('conversacion');\n $mensaje->fecha=date('Y-m-d H:i:s');\n $mensaje->usuario=$usuario->nombre;\n $mensaje->mensaje=$this->input->post('mensaje');\n $mensaje->save();\n }", "function create_new_chat($add_usernames, $active_user_id, $db) {\n\t// get all chats of active users\n\t$query = \"SELECT chat_id FROM chats_has_users WHERE user_id = :active_user_id\";\n\t$query_params = array(\n\t\t':active_user_id' => $active_user_id\n\t);\n\n\t$stmt = exec_query($db, $query, $query_params);\n\t$active_chats_resultset = $stmt->fetchAll();\n\tforeach ($active_chats_resultset as $i_row_chat_id => $row_chat_id) {\n\t\t// check if chat members equal input members\n\t\t$query = \"SELECT user_id FROM chats_has_users WHERE chat_id = :chat_id\";\n\t\t$query_params = array(\n\t\t\t'chat_id' => $row_chat_id['chat_id']\n\t\t);\n\n\t\t$stmt = exec_query($db, $query, $query_params);\n\t\t$chat_members_resultset = $stmt->fetchAll();\n\t\t// count corresponding users\n\t\t$equal_users = 0;\n\t\tforeach ($chat_members_resultset as $i_row_user_id => $row_user_id) {\n\t\t\t$member_username = get_username_by_id($row_user_id['user_id'], $db);\n\t\t\tif($member_username != NULL) {\n\t\t\t\t// username found\n\t\t\t\tif(string_exists_in_strings($member_username, $add_usernames)) {\n\t\t\t\t\t$equal_users++;\n\t\t\t\t}\n\t\t\t\t// username not found -> chat doesn't already exists\n\t\t\t\telse {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif($equal_users == count($add_usernames)) {\n\t\t\t$chat_already_exists = true;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif(!$chat_already_exists) {\n\t\t// create new chat\n\n\t\tif($active_user_id != -1) {\n\t\t\t// put active username in list if not done yet\n\t\t\t$active_username = get_username_by_id($active_user_id, $db);\n\t\t\tif(!string_exists_in_strings($active_username, $add_usernames)) {\n\t\t\t\tarray_push($add_usernames, $active_username);\n\t\t\t}\n\t\t}\n\n\t\t// insert in table chats\n\t\t$query = \"INSERT INTO chats () VALUES ()\";\n\t\t$query_params = array();\n\n\t\t$stmt = exec_query($db, $query, $query_params);\n\t\t$new_chat_id = $db->lastInsertId();\n\t\tforeach ($add_usernames as $i => $add_username) {\n\t\t\t$user_id = get_id_by_username($add_username, $db);\n\n\t\t\t$query = \"INSERT INTO chats_has_users (chat_id, user_id) VALUES (:chat_id, :user_id)\";\n\t\t\t$query_params = array(\n\t\t\t\t':chat_id' => $new_chat_id,\n\t\t\t\t':user_id' => $user_id\n\t\t\t);\n\n\t\t\t$stmt = exec_query($db, $query, $query_params);\n\t\t}\n\t}\n\n\treturn $chat_already_exists;\n}", "public function active_user($id)\n {\n $this->db->set('active', 1)->where('id', $id);\n\n if($this->db->update('user'))\n {\n return TRUE;\n }\n\n return $this->db->error();\n }", "function notifyOnNewOnlineContacts()\n\t{\n\t\tglobal $lng;\n\n \n /*\n\t\t$ts = ilSession::get(\"awr_online_user_ts\");\n\n\t\t$data = ilAwarenessData::getInstance($this->user_id);\n\t\t$data->setRefId($this->getRefId());\n\t\t$d = $data->getOnlineUserData($ts);\n\n\t\t$new_online_users = array();\n\t\t$no_ids = array();\n\t\tforeach ($d as $u)\n\t\t{\n\t\t\t$uname = \"[\".$u->login.\"]\";\n\t\t\tif ($u->public_profile)\n\t\t\t{\n\t\t\t\t$uname = \"<a href='./goto.php?target=usr_\".$u->id.\"'>\".$u->lastname.\", \".$u->firstname.\" \".$uname.\"</a>\";\n\t\t\t}\n\t\t\tif (!in_array($u->id, $no_ids))\n\t\t\t{\n\t\t\t\t$new_online_users[] = $uname;\n\t\t\t\t$no_ids[] = $u->id;\n\t\t\t}\n\t\t}\n */\n \n $new_online_users = array();\n\t\t$no_ids = array();\n\n\t\tif (count($new_online_users) == 0)\n\t\t{\n\t\t\treturn;\n\t\t}\n//var_dump($d); exit;\n\t\t$lng->loadLanguageModule('mail');\n\n\t\tinclude_once(\"./Services/Object/classes/class.ilObjectFactory.php\");\n\t\t//$recipient = ilObjectFactory::getInstanceByObjId($this->user_id);\n\t\t$bodyParams = array(\n\t\t\t'online_user_names' => implode(\"<br />\", $new_online_users)\n\t\t);\n//var_dump($bodyParams); exit;\n\t\trequire_once 'Services/Notifications/classes/class.ilNotificationConfig.php';\n\t\t$notification = new ilNotificationConfig('osd_main');\n\t\t$notification->setTitleVar('awareness_now_online', $bodyParams, 'awrn');\n\t\t$notification->setShortDescriptionVar('awareness_now_online_users', $bodyParams, 'awrn');\n\t\t$notification->setLongDescriptionVar('', $bodyParams, '');\n\t\t$notification->setAutoDisable(false);\n\t\t//$notification->setLink();\n\t\t$notification->setIconPath('templates/default/images/icon_usr.svg');\n\t\t$notification->setValidForSeconds(ilNotificationConfig::TTL_SHORT);\n\t\t$notification->setVisibleForSeconds(ilNotificationConfig::DEFAULT_TTS);\n\n\t\t//$notification->setHandlerParam('mail.sender', $sender_id);\n\n\t\tilSession::set(\"awr_online_user_ts\", date(\"Y-m-d H:i:s\", time()));\n\n\t\t$notification->notifyByUsers(array($this->user_id));\n\t}", "function userOnline($uid = 0) \n\t{\n\t\t$this->timestamp = time();\n\t\t$this->ip = $this->ipCheck();\n\t\tif ($uid != 0)\n\t\t{\n\t\t\t$this->new_user($uid);\n\t\t}\n\t\t$this->delete_user();\n\t\t$cnt = $this->count_users();\n\t\treturn $cnt;\n\t}", "function NewMessage($from,$to,$title,$message,$ClientID = null){\n\n if ($ClientID !=null){\n //INSERT INTO `CRM_internal_messages` (`ID`, `UserID`, `Titel`, `Message`, `Send_Date`, `ISRead`, `Type`, `Message_Type`, `Client_ID`) VALUES (NULL, '60', 'asd', 'asd', Now(), '0', '0', '0', NULL)\n $Query= \"INSERT INTO `CRM_internal_messages` (`ID`, `UserID`, `From_User`, `To_User`, `Titel`, `Message`, `Send_Date`, `ISRead`, `Type`, `Message_Type`, `Client_ID`) VALUES (NULL, '\".$from.\"','\".$from.\"','\".$to.\"', '\".$title.\"', '\".$message.\"', Now(), '0', '0', '0', '\".$ClientID.\"')\";\n // insert\n $this->db->query( $Query);\n $Query= \"INSERT INTO `CRM_internal_messages` (`ID`, `UserID`, `From_User`, `To_User`, `Titel`, `Message`, `Send_Date`, `ISRead`, `Type`, `Message_Type`, `Client_ID`) VALUES (NULL, '\".$to.\"','\".$from.\"','\".$to.\"', '\".$title.\"', '\".$message.\"', Now(), '0', '1', '0', '\".$ClientID.\"')\";\n // insert\n $this->db->query( $Query);\n }else{\n $Query= \"INSERT INTO `CRM_internal_messages` (`ID`, `UserID`, `From_User`, `To_User`, `Titel`, `Message`, `Send_Date`, `ISRead`, `Type`, `Message_Type`, `Client_ID`) VALUES (NULL, '\".$from.\"','\".$from.\"','\".$to.\"', '\".$title.\"', '\".$message.\"', Now(), '0', '0', '0', NULL)\";\n // insert\n $this->db->query($Query);\n $Query= \"INSERT INTO `CRM_internal_messages` (`ID`, `UserID`, `From_User`, `To_User`, `Titel`, `Message`, `Send_Date`, `ISRead`, `Type`, `Message_Type`, `Client_ID`) VALUES (NULL, '\".$to.\"','\".$from.\"','\".$to.\"', '\".$title.\"', '\".$message.\"', Now(), '0', '1', '0', NULL)\";\n // insert\n $this->db->query($Query);\n }\n }", "function sendMessage()\n {\n $query = \"INSERT INTO \" . $this->table_name . \"\n SET chat=:chat, date=:date, time=:time, user=:user, body=:body, readed=:readed, edited=:edited, created_at=:created_at\";\n\n // prepare query\n $stmt = $this->conn->prepare($query);\n\n // sanitize\n $this->chat = htmlspecialchars(strip_tags($this->chat));\n $this->date = htmlspecialchars(strip_tags($this->date));\n $this->time = htmlspecialchars(strip_tags($this->time));\n $this->user = htmlspecialchars(strip_tags($this->user));\n $this->body = htmlspecialchars(strip_tags($this->body));\n $this->readed = htmlspecialchars(strip_tags($this->readed));\n $this->edited = htmlspecialchars(strip_tags($this->edited));\n $this->created_at = htmlspecialchars(strip_tags($this->created_at));\n \n // bind values\n $stmt->bindParam(\":chat\", $this->chat);\n $stmt->bindParam(\":date\", $this->date);\n $stmt->bindParam(\":time\", $this->time);\n $stmt->bindParam(\":user\", $this->user);\n $stmt->bindParam(\":body\", $this->body);\n $stmt->bindParam(\":readed\", $this->readed);\n $stmt->bindParam(\":edited\", $this->edited);\n $stmt->bindParam(\":created_at\", $this->created_at);\n\n // execute query\n if ($stmt->execute()) {\n\n $message_id = Q(\"SELECT `id` FROM `#_mdd_messages` ORDER BY `id` DESC LIMIT 1\")->row('id');\n $chat_id = $this->chat;\n\n $query = \"UPDATE db_mdd_chats SET last_msg = :last_msg WHERE id = :chat_id\";\n\n // prepare query statement\n $stmt = $this->conn->prepare($query);\n\n // bind new values\n $stmt->bindParam(':last_msg', $message_id);\n $stmt->bindParam(':chat_id', $chat_id);\n $stmt->execute();\n\n return true;\n }\n return false;\n }", "public function setIsOnline($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (int) $v;\n\t\t}\n\n\t\tif ($this->is_online !== $v) {\n\t\t\t$this->is_online = $v;\n\t\t\t$this->modifiedColumns[] = UserPeer::IS_ONLINE;\n\t\t}\n\n\t\treturn $this;\n\t}", "static function banUser($channel, $bannedId, $time) {\n $query = 'UPDATE `ginden_rept`.`chat_access`\n SET\n `banned` = (UNIX_TIMESTAMP()+?)\n WHERE\n `chat_access`.`userid` = ?\n AND `chat_access`.`access` < 2\n AND `chat_access`.`channel` = ?';\n $result = DB::update($query, array($time, $bannedId, $time));\n if ($result == 1) {\n $query = 'SELECT `name` FROM `chat_accounts` WHERE `id` = ?';\n $result = DB::select($query, array($bannedId));\n $name = $result->name;\n $info_string = \"Użytkownik \".$name.\" został zbanowany na okres \".Chat::secondsToNatural($time).'.';\n Chat::addMessage($channel, Chat::BOT_USER, $info_string);\n return true;\n }\n else {\n return true;\n }\n }", "function chat_msg($o_id, $u_id, $u_name, $u_farbe, $admin, $r_id, $text, $typ)\n{\n // User, u_id, Farbe, Raum und Typ der Nachricht werden übergeben\n // Vor Schreiben wird der Text geparsed und die Aktionen ausgeführt\n // Art: N: Normal\n //\t S: Systemnachricht\n // P: Privatnachticht\n // H: Versteckte Nachricht\n // $raum_einstellungen und $ist_moderiert wurde von raum_ist_moderiert() gesetzt\n \n global $mainchat_version, $akdbase, $conn, $dbase, $user_farbe, $hilfstext, $system_farbe, $moderationsmodul;\n global $chat, $timeout, $chat_url, $datei_spruchliste, $t, $id, $ak, $check_name, $f1, $f2, $raumstatus1;\n global $u_farbe_alle, $u_farbe_sys, $u_farbe_priv, $u_farbe_noise, $u_farbe_bg, $u_clearedit, $raum_max;\n global $u_nick, $id, $http_host, $lobby, $o_raum, $o_js, $o_knebel, $r_status1, $u_level, $leveltext, $max_user_liste;\n global $communityfeatures, $o_punkte, $beichtstuhl, $raum_einstellungen, $ist_moderiert, $userdata, $lustigefeatures;\n global $punkte_ab_user, $punktefeatures, $whotext, $knebelzeit, $nickwechsel, $raumanlegenpunkte, $o_dicecheck;\n global $einstellungen_aendern, $single_room_verhalten, $eingabe_light_farbe, $eingabe_light_hilfe;\n \n // Text $text parsen, Befehle ausführen, Texte im Chat ausgeben\n \n // Voreinstellung für Nachrichtenfilter\n $privat = FALSE;\n \n // N als Voreinstellung setzen\n $typ OR $typ = \"N\";\n \n // Farbe voreinstellen\n $u_farbe OR $u_farbe = $user_farbe;\n \n // Verbotene Zeichen filtern\n $text = preg_replace(\"/[\" . chr(1) . \"-\" . chr(31) . \"]/\", \"\", $text);\n $text = str_replace(chr(173), \"\", $text);\n \n // autoknebel - ist text unerwünscht? Falls ja, User automatisch knebeln\n $text = auto_knebel($text);\n \n // Eingabe parsen\n $chatzeile = explode(\" \", $text, 4);\n if (!isset($chatzeile[1]))\n $chatzeile[1] = \"\";\n if (!isset($chatzeile[2]))\n $chatzeile[2] = \"\";\n if (!isset($chatzeile[3]))\n $chatzeile[3] = \"\";\n \n switch (strtolower($chatzeile[0])) {\n \n case \"/besitze\":\n case \"/besitzeraum\":\n // Übernimmt Besitzrechte eines Raums\n if (!$admin) {\n system_msg(\"\", 0, $u_id, $system_farbe,\n \"<B>He $u_name!</B> \"\n . str_replace(\"%chatzeile%\", $chatzeile[0],\n $t['chat_msg1']));\n } else {\n $query = \"SELECT r_id,o_name,r_name FROM raum,online \"\n . \"WHERE r_besitzer=o_user AND \"\n . ($chatzeile[1] ? \"r_name LIKE '\" . mysql_real_escape_string($chatzeile[1]) . \"'\"\n : \"r_id=$r_id\");\n \n $result = mysql_query($query, $conn);\n $rows = mysql_num_rows($result);\n \n if ($rows == 0) {\n // nix gefunden. Besitzer evtl. nicht mehr existent?\n // neue query ohne r_besitzer\n $keinbesitzer = 1;\n $query = \"SELECT r_id,r_name FROM raum WHERE \"\n . ($chatzeile[1] ? \"r_name LIKE '\" . mysql_real_escape_string($chatzeile[1]) . \"'\"\n : \"r_id=$r_id\");\n $result = mysql_query($query, $conn);\n $rows = mysql_num_rows($result);\n }\n \n if ($rows == 1) {\n if (!$keinbesitzer) {\n $uu_name = mysql_result($result, 0, \"o_name\");\n } else {\n $uu_name = \"Nobody\";\n }\n $rr_id = mysql_result($result, 0, \"r_id\");\n $rr_name = mysql_result($result, 0, \"r_name\");\n \n // Raum ändern\n $f['r_besitzer'] = $u_id;\n schreibe_db(\"raum\", $f, $r_id, \"r_id\");\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%rr_name%\", $rr_name,\n str_replace(\"%uu_name%\", $uu_name,\n str_replace(\"%u_name%\", $u_name,\n $t['chat_msg2']))));\n } else {\n system_msg(\"\", 0, $u_id, $system_farbe, $t['chat_msg3']);\n }\n }\n break;\n \n case \"/oplist\":\n // Admins auflisten\n if ($admin || $u_level == \"A\") {\n $query = \"SELECT o_userdata,o_userdata2,o_userdata3,o_userdata4,o_level,r_name, \"\n . \"UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(o_login) AS online \"\n . \"FROM online left join raum on r_id=o_raum \"\n . \"WHERE (o_level='S' OR o_level='C' OR o_level='A') \"\n . \"ORDER BY r_name\";\n $result = mysql_query($query, $conn);\n if ($result AND mysql_num_rows($result) > 0) {\n while ($row = mysql_fetch_object($result)) {\n $userdaten = unserialize(\n $row->o_userdata . $row->o_userdata2\n . $row->o_userdata3 . $row->o_userdata4);\n $txt = \"\";\n if ($row->r_name && $row->r_name != \"NULL\") {\n $raumname = $row->r_name;\n } else {\n $raumname = \"[\" . $whotext[2] . \"]\";\n }\n if (!$userdaten[u_away]) {\n $txt .= \"<B>\" . $raumname . \":</B> \"\n . user($userdaten[u_id], $userdaten, TRUE,\n TRUE, \"&nbsp;\", $row->online, \"\", FALSE);\n } else {\n $txt .= $raumname . \": \"\n . user($userdaten[u_id], $userdaten, TRUE,\n FALSE, \"&nbsp;\", \"\", \"\", FALSE) . \" -> \"\n . $userdaten[u_away];\n }\n system_msg(\"\", 0, $u_id, $system_farbe, $txt);\n }\n mysql_free_result($result);\n }\n }\n break;\n \n case \"/op\":\n // Nachrichten zwischen den Admins austauschen\n case \"/int\":\n // Admin um Hilfe rufen.\n if ($u_level == \"G\") {\n system_msg(\"\", 0, $u_id, $system_farbe, $t['chat_msg55']);\n } else {\n \n if ($o_knebel > 0) {\n // user ist geknebelt...\n $zeit = gmdate(\"H:i:s\", $o_knebel);\n $txt = str_replace(\"%zeit%\", $zeit, $t['knebel6']);\n system_msg(\"\", 0, $u_id, $system_farbe, $txt);\n break;\n }\n // Smilies parsen\n $privat = TRUE;\n \n $query = \"SELECT r_name FROM raum WHERE r_id=$o_raum\";\n $result = mysql_query($query, $conn);\n $r_name = mysql_result($result, 0, \"r_name\");\n $tempadm = \"\";\n if (strtolower($chatzeile[0] != \"/int\"))\n $tempadm = \" OR o_level='A'\";\n \n $query = \"SELECT o_user FROM online WHERE (o_level='S' OR o_level='C'$tempadm)\";\n $result = mysql_query($query, $conn);\n if ($result > 0) {\n $nums = mysql_num_rows($result);\n if ($nums > 0) {\n // die Nachricht wurde weitergeleitet.\n $txt = html_parse($privat,\n htmlspecialchars(\n $chatzeile[1] . \" \" . $chatzeile[2] . \" \"\n . $chatzeile[3]));\n if (!($admin || $u_level == \"A\")) {\n // Admins wissen, daß das an alle Admins geht. daher nicht nötig.\n system_msg(\"\", 0, $u_id, $system_farbe,\n $t['chat_msg47']);\n $txt = \"<b>\" . $txt . \"</b>\";\n }\n if (strtolower($chatzeile[0]) == \"/int\") {\n $txt2 = \"<b>[=====$t[chat_msg52]&nbsp;\"\n . $t['chat_msg51'] . \"=====]</b> \" . $txt;\n } else {\n $txt2 = \"<b>[\" . $t['chat_msg52'] . \"&nbsp;\"\n . $t['chat_msg50'] . \"]</b> \" . $txt;\n }\n while ($row = mysql_fetch_array($result)) {\n $text = str_replace(\"%user%\",\n user($u_id, $userdata, TRUE, FALSE, \"&nbsp;\",\n \"\", \"\", FALSE), $t['chat_msg49']);\n $text = str_replace(\"%raum%\", $r_name, $text);\n if (!($admin || $u_level == \"A\")) {\n // User aus Raum... ruft um hilfe\n system_msg(\"\", $u_id, $row['o_user'],\n $system_farbe, $text);\n }\n if (($admin || $u_level == \"A\")\n && $row['o_user'] == $u_id) {\n // falls eigener nick:\n if (strtolower($chatzeile[0]) == \"/int\") {\n system_msg(\"\", $u_id, $u_id, $system_farbe,\n \"<B>\"\n . user($u_id, $userdata, TRUE,\n FALSE, \"&nbsp;\", \"\", \"\", FALSE)\n . \"&nbsp; ===== $t[chat_msg24] $t[chat_msg51]: =====</B> $txt\");\n } else {\n system_msg(\"\", $u_id, $u_id, $system_farbe,\n \"<B>\"\n . user($u_id, $userdata, TRUE,\n FALSE, \"&nbsp;\", \"\", \"\", FALSE)\n . \"&nbsp; $t[chat_msg24] $t[chat_msg50]: </B> $txt\");\n }\n } else {\n priv_msg($u_name, $u_id, $row['o_user'],\n $u_farbe, $txt2, $userdata);\n }\n }\n } else {\n // kein Admin im Chat :-(\n system_msg(\"\", $u_id, $u_id, $system_farbe,\n $t['chat_msg48']);\n }\n mysql_free_result($result);\n }\n }\n break;\n \n case \"/dupes\":\n // sucht nach doppelten IPs\n if ($admin) {\n $query = \"SELECT o_ip,o_user,o_raum,o_browser,r_name,o_name \"\n . \"FROM online left join raum on o_raum=r_id \"\n . \"WHERE (UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(o_aktiv)) <= $timeout \"\n . \"ORDER BY o_ip\";\n $result = mysql_query($query, $conn);\n if ($result > 0) {\n while ($row = mysql_fetch_array($result)) {\n if ($row['o_ip'] == $alt['o_ip']) {\n $hostname = htmlspecialchars(\n @gethostbyaddr($row['o_ip']));\n if (!$shown) {\n $dupecount++;\n unset($userdaten);\n $userdaten = ARRAY(u_id => $alt[o_user],\n u_nick => $alt[o_name]);\n $txt = \"<BR><b>\" . $hostname . \"(\"\n . $alt['o_ip'] . \"):</b>\";\n $txt .= \"<br><b>\" . $alt['r_name'] . \" \"\n . user($alt[o_user], $userdaten, $o_js,\n FALSE, \"&nbsp;\", \"\", \"\", FALSE)\n . \"</b> \"\n . htmlspecialchars($alt[o_browser])\n . \"<br>\";\n $shown = true;\n }\n unset($userdaten);\n $userdaten = ARRAY(u_id => $row[o_user],\n u_nick => $row[o_name]);\n $txt .= \"<b>\" . $row['r_name'] . \" \"\n . user($row[o_user], $userdaten, $o_js, FALSE,\n \"&nbsp;\", \"\", \"\", FALSE) . \"</b> \"\n . htmlspecialchars($row[o_browser]);\n system_msg(\"\", 0, $u_id, $system_farbe, $txt);\n $txt = \"\";\n } else {\n $shown = false;\n }\n $alt = $row;\n }\n if ($dupecount > 0) {\n system_msg(\"\", 0, $u_id, $system_farbe,\n \"<BR>\\n\" . $t['chat_msg45']);\n } else {\n system_msg(\"\", 0, $u_id, $system_farbe,\n $t['chat_msg46']);\n }\n }\n }\n break;\n \n case \"/pp\":\n case \"/ip\":\n if (!$admin) {\n system_msg(\"\", 0, $u_id, $system_farbe,\n \"<B>He $u_name!</B> \"\n . str_replace(\"%chatzeile%\", $chatzeile[0],\n $t['chat_msg1']));\n break;\n }\n \n unset($onlineip);\n unset($onlinedatum);\n \n if (!$chatzeile[1]) {\n system_msg(\"\", 0, $u_id, $system_farbe, $t['chat_msg119']);\n break;\n }\n \n if ($admin\n && preg_match(\n \"/^[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}$/\",\n $chatzeile[1])) {\n $onlineip = $chatzeile[1];\n } else if ($admin) {\n $nick = nick_ergaenze($chatzeile[1], \"online\", 1);\n \n if ($nick['u_nick'] != \"\") {\n $query = \"SELECT o_ip FROM online WHERE o_user = $nick[u_id]\";\n $result = mysql_query($query, $conn);\n if ($result && mysql_num_rows($result) == 1) {\n $o_nick = mysql_fetch_array($result);\n $onlineip = $o_nick[o_ip];\n unset($o_nick);\n }\n @mysql_free_result($result);\n } else {\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%u_name%\", $chatzeile[1],\n $t['chat_msg120']));\n \n // Nick nich Online - Hole IP aus History der Usertabelle\n $query = \"SELECT u_nick,u_id,u_ip_historie FROM user \"\n . \"WHERE u_nick='\"\n . mysql_real_escape_string(coreCheckName($chatzeile[1], $check_name)) . \"'\";\n $result = mysql_query($query, $conn);\n if ($result && mysql_num_rows($result) == 1) {\n $nick = mysql_fetch_array($result);\n $uu_ip_historie = unserialize($nick['u_ip_historie']);\n \n if (is_array($uu_ip_historie)) {\n while (list($onlinedatum, $onlineip) = each(\n $uu_ip_historie)) :\n break;\n endwhile;\n $temp = $t['chat_msg123'];\n $temp = str_replace(\"%datum%\",\n date(\"d.m.y H:i\", $onlinedatum), $temp);\n $temp = str_replace(\"%ip%\", $onlineip, $temp);\n system_msg(\"\", 0, $u_id, $system_farbe, $temp);\n }\n }\n @mysql_free_result($result);\n \n }\n }\n \n if ($admin && $onlineip) {\n $temp = $t['chat_msg122'];\n $temp = str_replace(\"%datum%\", strftime('%d.%m.%Y'), $temp);\n $temp = str_replace(\"%uhrzeit%\", strftime('%H:%M:%S'), $temp);\n $temp = str_replace(\"%ip%\", $onlineip, $temp);\n system_msg(\"\", 0, $u_id, $system_farbe, $temp);\n \n $query = \"SELECT o_ip,o_user,o_raum,o_browser,r_name,o_name \"\n . \"FROM online left join raum on o_raum=r_id \"\n . \"WHERE (UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(o_aktiv)) <= $timeout \"\n . \"AND o_ip = '\" . mysql_real_escape_string($onlineip) . \"' \" . \"ORDER BY o_user\";\n \n $result = mysql_query($query, $conn);\n \n if ($result && mysql_num_rows($result) >= 1) {\n $txt = \"\";\n while ($row = mysql_fetch_array($result)) {\n $userdaten = ARRAY(u_id => $row[o_user],\n u_nick => $row[o_name]);\n $txt .= \"<b>\" . $row['r_name'] . \" \"\n . user($row[o_user], $userdaten, $o_js, FALSE,\n \"&nbsp;\", \"\", \"\", FALSE) . \"</b> \"\n . htmlspecialchars($row[o_browser]) . \"<br>\";\n }\n system_msg(\"\", 0, $u_id, $system_farbe, $txt);\n } else {\n system_msg(\"\", 0, $u_id, $system_farbe, $t['chat_msg121']);\n }\n @mysql_free_result($result);\n }\n \n break;\n \n case \"/edithistory\":\n case \"/edithistorie\":\n if ($admin) {\n \n $nick = nick_ergaenze($chatzeile[1], \"online\", 1);\n \n // Falls keinen Empfänger gefunden, in Usertabelle nachsehen\n if ($nick['u_nick'] == \"\") {\n $query = \"SELECT u_nick,u_id from user WHERE u_nick='\"\n . mysql_real_escape_string(coreCheckName($chatzeile[1], $check_name)) . \"'\";\n $result = mysql_query($query, $conn);\n if ($result && mysql_num_rows($result) == 1) {\n $nick = mysql_fetch_array($result);\n }\n @mysql_free_result($result);\n }\n \n if ($nick['u_nick'] != \"\") {\n $query = \"SELECT u_profil_historie FROM user WHERE u_nick = '$nick[u_nick]'\";\n $result = mysql_query($query);\n $bla = mysql_fetch_array($result);\n $uu_profil_historie = unserialize($bla[u_profil_historie]);\n } else {\n system_msg(\"\", 0, $u_id, $system_farbe,\n \"Es konnte kein eindeutiger Nick gefunden werden!\");\n }\n \n if (is_array($uu_profil_historie)) {\n system_msg(\"\", 0, $u_id, $system_farbe,\n \"Das Profil von <b>$nick[u_nick]</b> wurde zuletzt geändert von: \");\n while (list($datum, $nick) = each($uu_profil_historie)) :\n $zeile = $nick . \"&nbsp;(\"\n . str_replace(\" \", \"&nbsp;\",\n date(\"d.m.y H:i\", $datum)) . \")\" . $f4;\n system_msg(\"\", 0, $u_id, $system_farbe, $zeile);\n endwhile;\n }\n \n } else {\n system_msg(\"\", 0, $u_id, $system_farbe,\n \"<B>He $u_name!</B> \"\n . str_replace(\"%chatzeile%\", $chatzeile[0],\n $t['chat_msg1']));\n }\n \n break;\n \n case \"/knebel\":\n case \"/gag\":\n case \"/gaga\":\n // /gag - zeige alle geknebelten user\n // /gag user - sperre user für 5 min\n // /gag user x - sperre user für x min \n // /gag user 0 - freigabe...\n \n if (!$admin AND $u_level != \"A\") {\n system_msg(\"\", 0, $u_id, $system_farbe,\n \"<B>He $u_name!</B> \"\n . str_replace(\"%chatzeile%\", $chatzeile[0],\n $t['chat_msg1']));\n break;\n }\n \n if (!isset($chatzeile[1]) || $chatzeile[1] == \"\") {\n // \tKurzhilfe ausgeben.\n $temp = $t['knebel2'];\n $temp = str_replace(\"%chatzeile%\", $chatzeile[0], $temp);\n system_msg(\"\", 0, $u_id, $system_farbe, \"<b>$chat</b>: $temp\");\n \n } else {\n \n // knebel setzen, default=5 min...\n if (!$knebelzeit)\n $knebelzeit = 5;\n \n // knebelzeit übergeben? dann setzen, absolut, vorzeichen ignorieren\n if (isset($chatzeile[2]) && $chatzeile[2] != \"\")\n $knebelzeit = abs(intval($chatzeile[2]));\n \n // maximal 1440 Minuten\n if ($knebelzeit > 1440)\n $knebelzeit = 1440;\n \n // User finden, zuerst im aktuellen Raum, dann global\n $nick = nick_ergaenze($chatzeile[1], \"raum\", 1);\n if (!$nick['u_nick'])\n $nick = nick_ergaenze($chatzeile[1], \"online\", 0);\n \n // Admins dürfen,\n if ($nick['u_nick'])\n switch ($nick['u_level']) {\n case \"C\":\n case \"S\":\n case \"M\":\n case \"A\":\n $txt = str_replace(\"%admin%\", $nick['u_nick'],\n $t['knebel5']);\n system_msg(\"\", 0, $u_id, $system_farbe, $txt);\n break;\n default:\n $query = \"update online set o_knebel=FROM_UNIXTIME(UNIX_TIMESTAMP(NOW())+\" . intval($knebelzeit) . \"*60) \"\n . \"where o_user=$nick[u_id]\";\n mysql_query($query, $conn);\n $txt = ($knebelzeit ? $t['knebel4'] : $t['knebel3']);\n $txt = str_replace(\"%admin%\", $u_nick, $txt);\n $txt = str_replace(\"%user%\", $nick['u_nick'], $txt);\n $txt = str_replace(\"%zeit%\", $knebelzeit, $txt);\n global_msg($u_id, $o_raum, $txt);\n }\n }\n \n // \tknebel listen \n if ($chatzeile[0] == \"/gaga\" && $admin) {\n $query = \"select o_id,o_raum,o_user,o_userdata,o_userdata2,o_userdata3,o_userdata4,\"\n . \"UNIX_TIMESTAMP(o_knebel)-UNIX_TIMESTAMP(NOW()) as knebel from online \"\n . \"where o_knebel>NOW()\";\n } else {\n $query = \"select o_id,o_raum,o_user,o_userdata,o_userdata2,o_userdata3,o_userdata4,\"\n . \"UNIX_TIMESTAMP(o_knebel)-UNIX_TIMESTAMP(NOW()) as knebel from online \"\n . \"where o_raum=$o_raum AND o_knebel>NOW()\";\n }\n $result = mysql_query($query, $conn);\n $txt = \"\";\n if ($result > 0) {\n $rows = mysql_num_rows($result);\n for ($i = 0; $i < $rows; $i++) {\n $row = mysql_fetch_object($result);\n if ($txt != \"\")\n $txt .= \", \";\n $userdaten = unserialize(\n $row->o_userdata . $row->o_userdata2\n . $row->o_userdata3 . $row->o_userdata4);\n $txt .= user($row->o_user, $userdaten, TRUE, FALSE,\n \"&nbsp;\", \"\", \"\", FALSE) . \" \"\n . gmdate(\"H:i:s\", $row->knebel);\n }\n mysql_free_result($result);\n } else {\n system_msg(\"\", 0, $u_id, $system_farbe,\n \"Fehler beim Zugriff auf die Datenbank. <!--\"\n . mysql_errno() . \" \" . mysql_error() . \"-->\");\n }\n if ($txt != \"\")\n system_msg(\"\", 0, $u_id, $system_farbe,\n \"<b>$chat</b>:$t[knebel1]: \" . $txt);\n break;\n \n case \"/einlad\":\n case \"/invite\":\n // Einladen in Räume... darf nur Admin oder Raumbesitzer\n // Besitzer des aktuellen Raums ermitteln\n $query = \"SELECT r_besitzer,r_name from raum WHERE r_id=$r_id \";\n $result = mysql_query($query, $conn);\n if ($result > 0) {\n $rows = mysql_num_rows($result);\n if ($rows == 1) {\n $r_besitzer = mysql_result($result, 0, \"r_besitzer\");\n $r_name = mysql_result($result, 0, \"r_name\");\n }\n mysql_free_result($result);\n }\n if ($admin || $r_besitzer == $u_id) {\n if ($chatzeile[1] != \"\") {\n // user eintragen oder löschen\n \n // schaue zuerst, ob online ein User ist, der genauso heisst wie angegeben\n $nick = nick_ergaenze($chatzeile[1], \"online\", 1);\n if ($nick['u_nick'] == $chatzeile[1]) {\n } else {\n $nick['u_nick'] == \"\";\n }\n \n if ($nick['u_nick'] == \"\")\n $nick = nick_ergaenze($chatzeile[1], \"raum\", 1);\n if ($nick['u_nick'] == \"\")\n $nick = nick_ergaenze($chatzeile[1], \"online\", 1);\n if ($nick['u_nick'] == \"\")\n $nick = nick_ergaenze($chatzeile[1], \"chat\", 0);\n if ($nick['u_nick'] != \"\") {\n // nick gefunden. jetzt eintragen oder löschen...\n $query = \"SELECT inv_user FROM invite WHERE inv_raum=$r_id AND inv_user=$nick[u_id]\";\n $result = mysql_query($query, $conn);\n if ($result > 0) {\n if (mysql_num_rows($result) > 0) {\n $query = \"DELETE FROM invite WHERE inv_raum=$r_id AND inv_user=$nick[u_id]\";\n $result2 = mysql_query($query, $conn);\n $msg = $t['invite4'];\n } else {\n $f['inv_id'] = 0;\n $f['inv_user'] = $nick['u_id'];\n $f['inv_raum'] = $r_id;\n schreibe_db(\"invite\", $f, $f['inv_id'],\n \"inv_id\");\n if (!$beichtstuhl) {\n $msg = str_replace(\"%admin%\", $u_nick,\n $t['invite5']);\n } else {\n $msg = str_replace(\"%admin%\", $u_nick,\n $t['invite6']);\n }\n ;\n $msg = str_replace(\"%raum%\", $r_name, $msg);\n system_msg($u_nick, $u_id, $nick['u_id'],\n $system_farbe, $msg);\n $msg = $t['invite3'];\n }\n // altes result löschen.\n mysql_free_result($result);\n \n $msg = str_replace(\"%admin%\", $u_nick, $msg);\n $msg = str_replace(\"%raum%\", $r_name, $msg);\n $msg = str_replace(\"%user%\", $nick['u_nick'], $msg);\n global_msg($u_id, $o_raum, \"$msg\");\n }\n } else {\n // Nick nicht gefunden, d.h. nicht Online, aber vielleicht doch eingeladen zum runterwerfen?\n $query = \"SELECT u_nick,u_id from user,invite \"\n . \"WHERE inv_raum=$r_id AND inv_user=u_id AND u_nick='\" . mysql_real_escape_string($chatzeile[1]) . \"'\"\n . \"ORDER BY u_nick\";\n $result = mysql_query($query, $conn);\n if ($result && mysql_num_rows($result) == 1) {\n $row = mysql_fetch_object($result);\n $query2 = \"DELETE FROM invite WHERE inv_raum=$r_id AND inv_user=$row->u_id\";\n $result2 = mysql_query($query2, $conn);\n $msg = $t['invite4'];\n $msg = str_replace(\"%admin%\", $u_nick, $msg);\n $msg = str_replace(\"%raum%\", $r_name, $msg);\n $msg = str_replace(\"%user%\", $row->u_nick, $msg);\n global_msg($u_id, $o_raum, \"$msg\");\n @mysql_free_result($result2);\n }\n @mysql_free_result($result);\n }\n }\n // Invite-Liste ausgeben...\n $query = \"SELECT u_id,u_nick,u_level,u_punkte_gesamt,u_punkte_gruppe,inv_id \"\n . \"FROM invite LEFT JOIN user ON u_id=inv_user \"\n . \"WHERE inv_raum=$r_id\";\n $result = mysql_query($query, $conn);\n $txt = \"\";\n if ($result && mysql_num_rows($result) > 0) {\n while ($row = mysql_fetch_object($result)) {\n if ($row->u_id && $row->u_id != \"NULL\") {\n if ($txt != \"\")\n $txt .= \", \";\n $txt .= user($row->u_id, $row, TRUE, FALSE,\n \"&nbsp;\", \"\", \"\", FALSE);\n } else {\n $query = \"DELETE FROM invite WHERE inv_id=$row->inv_id\";\n $result2 = mysql_query($query, $conn);\n }\n }\n }\n if ($txt == \"\")\n $txt = $t['invite2'];\n else $txt = $t['invite1'] . \" \" . $txt;\n system_msg(\"\", 0, $u_id, $system_farbe, \"<b>$chat:</b> $txt\");\n }\n break;\n \n case \"/such\":\n case \"/suche\":\n // Gibt Spruchliste aus\n if (!isset($chatzeile[1]))\n $chatzeile[1] = \"\";\n $suchtext = preg_replace(\"/[*%$!?.,;:\\\\/]/i\", \"\", $chatzeile[1]);\n if (strlen($suchtext) > 2) :\n // Sprüche in Array lesen\n $spruchliste = file(\"conf/$datei_spruchliste\");\n \n // Treffer ausgeben\n reset($spruchliste);\n $anzahl = count($spruchliste);\n $i = 0;\n while ($i < $anzahl) :\n $spname = key($spruchliste);\n if (preg_match(\"/\" . $suchtext . \"/i\",\n $spruchliste[$spname])) :\n $spruchtmp = preg_split(\"/\\t/\",\n substr($spruchliste[$spname], 0,\n strlen($spruchliste[$spname]) - 1), 3);\n \n $spruchtmp[2] = str_replace(\"<\", \"&lt;\", $spruchtmp[2]);\n $spruchtmp[2] = str_replace(\">\", \"&gt;\", $spruchtmp[2]);\n $spruchtmp[2] = preg_replace('|\\*(.*?)\\*|',\n '<i>\\1</i>',\n preg_replace('|_(.*?)_|', '<b>\\1</b>',\n $spruchtmp[2]));\n \n $txt = \"<B>$t[chat_msg4] <I>\" . $spruchtmp[0] . \" \"\n . $spruchtmp[1] . \"</I></B> &lt;\" . $spruchtmp[2]\n . \"&gt;\";\n system_msg(\"\", 0, $u_id, $system_farbe, $txt);\n endif;\n next($spruchliste);\n $i++;\n endwhile;\n \n else :\n // Fehler ausgeben\n system_msg(\"\", 0, $u_id, $system_farbe, $t['chat_msg5']);\n endif;\n break;\n \n case \"/ende\":\n case \"/exit\":\n case \"/quit\":\n case \"/bye\":\n // Ende-Nachricht absetzen?\n if (strlen($chatzeile[1]) > 0) :\n hidden_msg($u_name, $u_id, $u_farbe, $r_id,\n $u_name . \"$t[chat_msg6] \"\n . html_parse($privat,\n htmlspecialchars(\n $chatzeile[1] . \" \" . $chatzeile[2] . \" \"\n . $chatzeile[3])));\n endif;\n \n // Logoff\n verlasse_chat($u_id, $u_name, $r_id);\n sleep(2);\n logout($o_id, $u_id, \"/quit\");\n \n echo \"<HTML><BODY onLoad='javascript:parent.location.href=\\\"index.php?http_host=$http_host\\\";'>\\n\";\n echo \"</BODY></HTML>\\n\";\n exit;\n break;\n \n case \"/ig\":\n case \"/ignore\":\n case \"/ignoriere\":\n // User ignorieren oder freigeben\n \n if (!$beichtstuhl && strlen($chatzeile[1]) > 0 && $u_level != \"G\") {\n // Username angegeben -> ignorieren oder aufheben\n \n // versuchen, den namen zu ergänzen.\n // wenn geschafft, dann ist User auch online. Somit kann er ignoriert werden.\n // sonst evtl. DB Probs weil der expire evtl. user löscht, die hier gerade \n // eingetragen werden.\n $nick = nick_ergaenze($chatzeile[1], \"online\", 0);\n if ($nick['u_nick'] != \"\") {\n $i_user_passiv = $nick['u_id'];\n $i_user_name_passiv = $nick['u_nick'];\n \n // testen, ob nicht DAU sich selbst ignoriert...\n if ($i_user_passiv != $u_id) {\n ignore($o_id, $u_id, $u_name, $i_user_passiv,\n $i_user_name_passiv);\n } else {\n system_msg(\"\", 0, $u_id, $u_farbe, $t['chat_msg7']);\n }\n } else {\n // user nicht gefunden oder nicht online? dann testen, ob ignoriert, damit man das \n // ignore auch wieder raus bekommt.\n $query = \"SELECT u_nick,u_id from user,iignore \"\n . \"WHERE i_user_aktiv=$u_id AND i_user_passiv=u_id AND u_nick='\" . mysql_real_escape_string($chatzeile[1]) . \"'\"\n . \"ORDER BY u_nick\";\n $result = mysql_query($query, $conn);\n if ($result && mysql_num_rows($result) == 1) {\n $row = mysql_fetch_object($result);\n ignore($o_id, $u_id, $u_name, $row->u_id, $row->u_nick);\n }\n @mysql_free_result($result);\n }\n }\n \n // Prüfung sollte nach dem Einfügen sein, denn sonst können 17 User drauf sein\n // Prüfung, ob bereits mehr als 16 user ignoriert werden\n // Alle ignorierten user > 16 werden gelöscht\n // Wenn mehr als 16 gebraucht werden, grössere Änderung in Tabelle online Feld o_ignore\n // Denn da passt nur ein Array mit 255 chars rein.\n $query = \"SELECT u_nick,u_id from user,iignore \"\n . \"WHERE i_user_aktiv=$u_id AND u_id=i_user_passiv order by i_id\";\n $result = @mysql_query($query, $conn);\n $anzahl = @mysql_num_rows($result) - 16;\n \n if ($result && $anzahl > 0) {\n for ($i = 0; $i < $anzahl; $i++) {\n $row = @mysql_fetch_object($result);\n ignore($o_id, $u_id, $u_name, $row->u_id, $row->u_nick);\n }\n }\n @mysql_free_result($result);\n \n if ($u_level == \"G\") {\n system_msg(\"\", 0, $u_id, $system_farbe, $t['chat_msg55']);\n } else {\n \n // Liste der User ausgeben, die von mir ignoriert werden\n $query = \"SELECT i_id,u_id,u_nick,u_level,u_punkte_gesamt,u_punkte_gruppe \"\n . \"FROM iignore LEFT JOIN user on i_user_passiv=u_id \"\n . \"WHERE i_user_aktiv=$u_id ORDER BY u_nick,i_id\";\n $result = mysql_query($query, $conn);\n \n if ($result && mysql_num_rows($result) > 0) {\n $i = 0;\n $text = str_replace(\"%u_name%\", $u_name, $t['chat_msg10']);\n while ($row = mysql_fetch_object($result)) {\n \n if ($row->u_id && $row->u_id != \"NULL\") {\n if ($i > 0)\n $text = $text . \", \";\n $text = $text\n . user($row->u_id, $row, TRUE, FALSE, \"&nbsp;\",\n \"\", \"\", FALSE);\n } else {\n $query = \"DELETE FROM iignore WHERE i_id=$row->i_id\";\n $result2 = mysql_query($query, $conn);\n }\n $i++;\n \n }\n system_msg(\"\", 0, $u_id, $system_farbe, $text . \"\");\n } else {\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%u_name%\", $u_name, $t['chat_msg9']));\n }\n @mysql_free_result($result);\n \n // Liste der User ausgeben, die mich ignorieren\n $query = \"SELECT i_id,u_id,u_nick,u_level,u_punkte_gesamt,u_punkte_gruppe \"\n . \"FROM iignore LEFT JOIN user on i_user_aktiv=u_id \"\n . \"WHERE i_user_passiv=$u_id ORDER BY u_nick,i_id\";\n $result = mysql_query($query, $conn);\n \n if ($result && mysql_num_rows($result) > 0) {\n $i = 0;\n $text = str_replace(\"%u_name%\", $u_name, $t['chat_msg82']);\n while ($row = mysql_fetch_object($result)) {\n \n if ($row->u_id && $row->u_id != \"NULL\") {\n if ($i > 0)\n $text = $text . \", \";\n $text = $text\n . user($row->u_id, $row, TRUE, FALSE, \"&nbsp;\",\n \"\", \"\", FALSE);\n } else {\n $query = \"DELETE FROM iignore WHERE i_id=$row->i_id\";\n $result2 = mysql_query($query, $conn);\n }\n $i++;\n \n }\n system_msg(\"\", 0, $u_id, $system_farbe, $text . \"\");\n }\n @mysql_free_result($result);\n }\n break;\n \n case \"/channel\":\n case \"/go\":\n case \"/raum\":\n case \"/rooms\":\n case \"/j\":\n case \"/join\":\n if ((($u_level == \"G\") || ($u_level == \"U\"))\n && ($single_room_verhalten == \"1\")) {\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%chatzeile%\", $chatzeile[0],\n $t['chat_spruch5']));\n } else if ($chatzeile[1]) {\n \n // Raumname erzeugen\n $chatzeile[1] = preg_replace(\"/[ \\\\'\\\"]/\", \"\", $chatzeile[1]);\n $f['r_name'] = htmlspecialchars($chatzeile[1]);\n \n if (!isset($chatzeile[2]))\n $chatzeile[2] = \"\";\n // Admin oder Raumbesitzer darf das Betreten geschlossener Räume erzwingen (Prüfung in raum_gehe)\n if ($beichtstuhl || $chatzeile[2] == \"immer\"\n || $chatzeile[2] == \"force\" || $chatzeile[2] == \"!\") {\n $raum_geschlossen = TRUE;\n } else {\n $raum_geschlossen = FALSE;\n }\n \n // Raum wechseln \n $query = \"SELECT r_id,(LENGTH(r_name)-length('$chatzeile[1]')) as laenge \"\n . \"FROM raum WHERE r_name like '\" . mysql_real_escape_string($chatzeile[1]) . \"%' \"\n . \"ORDER BY laenge\";\n $result = mysql_query($query, $conn);\n \n if (mysql_num_rows($result) != 0) {\n $r_id_neu = mysql_result($result, 0, \"r_id\");\n if ($r_id_neu != $r_id) {\n $r_id = raum_gehe($o_id, $u_id, $u_name, $r_id,\n $r_id_neu, $raum_geschlossen);\n raum_user($r_id, $u_id, \"\");\n }\n } elseif ($u_level != \"G\" && strlen($f['r_name']) <= $raum_max\n && strlen($f['r_name']) > 3) {\n // Neuen Raum anlegen, ausser User ist Gast\n $f['r_topic'] = htmlspecialchars($u_name . $t['chat_msg56']);\n $f['r_eintritt'] = \"\";\n $f['r_austritt'] = \"\";\n $f['r_status1'] = \"O\";\n $f['r_status2'] = \"T\";\n $f['r_besitzer'] = $u_id;\n $raumanlegen = true;\n \n // ab hier neu: wir prüfen ob community an ist, der User kein Admin und $raumanlegenpunkte gesetzt\n \n if ($communityfeatures && !$admin && $raumanlegenpunkte) {\n $result = mysql_query(\n \"select u_punkte_gesamt FROM user WHERE u_id=$u_id\");\n if ($result && mysql_num_rows($result) == 1) {\n $u_punkte_gesamt = mysql_result($result, 0, 0);\n }\n \n if ($u_punkte_gesamt < $raumanlegenpunkte) {\n // Fehlermeldung und Raum nicht anlegen\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%punkte%\", $raumanlegenpunkte,\n $t['chat_msg108']));\n $raumanlegen = false;\n }\n }\n \n if ($raumanlegen == true) {\n // Hier wird der Raum angelegt\n $r_id_neu = schreibe_db(\"raum\", $f, $f['r_id'], \"r_id\");\n if ($r_id_neu != $r_id) {\n $r_id = raum_gehe($o_id, $u_id, $u_name, $r_id,\n $r_id_neu, $raum_geschlossen);\n raum_user($r_id, $u_id, \"\");\n }\n \n }\n } else {\n // Fehlermeldung\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%chatzeile%\", $chatzeile[1],\n $t['chat_msg11']));\n }\n mysql_free_result($result);\n } else {\n // Liste alle Räume auf\n if ($admin)\n $query = \"SELECT r_name from raum order by r_name\";\n else $query = \"SELECT r_name from raum WHERE r_status1 = 'O' order by r_name\";\n \n $result = mysql_query($query, $conn);\n $rows = mysql_num_rows($result);\n $text = $t['chat_msg12'] . \" \";\n $i = 0;\n while ($rows > $i) {\n $text = $text . mysql_result($result, $i, \"r_name\");\n $i++;\n if ($i < $rows) {\n $text = $text . \", \";\n }\n }\n system_msg(\"\", 0, $u_id, $system_farbe, $text);\n mysql_free_result($result);\n }\n break;\n \n case \"/wer\":\n case \"/who\":\n case \"/w\":\n case \"/user\":\n case \"/list\":\n // User listen \n if ($chatzeile[1] == \"*\") {\n \n // * zeigt alle Räume\n $chatzeile[0] = \"/people\";\n \n } elseif ($chatzeile[1] != \"\") {\n \n $query = \"SELECT r_id from raum WHERE r_name LIKE '\" . mysql_real_escape_string($chatzeile[1]) . \"'%' \";\n if (!$admin)\n $query .= \" AND (r_status1='O' OR r_status1='m' OR r_id=$o_raum) \";\n $result = mysql_query($query, $conn);\n if ($result AND mysql_num_rows($result) > 0) {\n $text = $t['chat_msg12'] . \"<br>\";\n $row = mysql_fetch_object($result);\n raum_user($row->r_id, $u_id, \"\");\n mysql_free_result($result);\n } else {\n // Raum nicht gefunden -> Fehlermeldung\n $txt = str_replace(\"%raumname%\", $chatzeile[1],\n $t['chat_msg53']);\n system_msg(\"\", $u_id, $u_id, $system_farbe, $txt);\n }\n break;\n \n } else {\n \n // Der aktuelle Raum wird gezeigt\n raum_user($r_id, $u_id, \"\");\n break;\n }\n \n case \"/people\":\n // Liste alle Räume mit Usern auf\n $query = \"SELECT r_id from raum \";\n if (!$admin)\n $query .= \" WHERE (r_status1='O' OR r_status1='m' OR r_id=$o_raum) \";\n $query .= \" ORDER BY r_name\";\n $result = mysql_query($query, $conn);\n if ($result AND mysql_num_rows($result) > 0) {\n $text = $t['chat_msg12'] . \"<br>\";\n while ($row = mysql_fetch_object($result)) {\n raum_user($row->r_id, $u_id, \"\");\n }\n mysql_free_result($result);\n }\n break;\n \n case \"/txt\":\n case \"/me\":\n // Spruch ausgeben \n if ($u_level == \"G\") {\n system_msg(\"\", 0, $u_id, $system_farbe, $t['chat_msg55']);\n } else {\n if (!($o_knebel > 0)) {\n if ($u_level == \"M\" || !$ist_moderiert) {\n hidden_msg($u_name, $u_id, $u_farbe, $r_id,\n $u_name . \" \"\n . html_parse($privat,\n htmlspecialchars(\n $chatzeile[1] . \" \" . $chatzeile[2]\n . \" \" . $chatzeile[3]), 1));\n } else {\n system_msg(\"\", $u_id, $u_id, $system_farbe,\n $t['moderiert1']);\n }\n } else {\n // user ist geknebelt...\n $zeit = gmdate(\"H:i:s\", $o_knebel);\n $txt = str_replace(\"%zeit%\", $zeit, $t['knebel6']);\n system_msg(\"\", $u_id, $u_id, $system_farbe, $txt);\n }\n }\n break;\n \n case \"/away\":\n case \"/weg\":\n // Away-Text setzen oder löschen\n // Smilies parsen\n $privat = FALSE;\n \n if ($u_level == \"G\") {\n system_msg(\"\", 0, $u_id, $system_farbe, $t['chat_msg55']);\n // User ist Gast\n } elseif ($o_knebel > 0) {\n // User ist noch geknebelt\n $zeit = gmdate(\"H:i:s\", $o_knebel);\n $txt = str_replace(\"%zeit%\", $zeit, $t['knebel6']);\n system_msg(\"\", 0, $u_id, $system_farbe, $txt);\n } else {\n $away = substr(trim($chatzeile[1] . \" \" . $chatzeile[2] . \" \" . $chatzeile[3]), 0, 80);\n $away = html_parse($privat, htmlspecialchars($away));\n if ($away == \"\") {\n $text = \"$u_nick $t[away2]\";\n $f['u_away'] = \"\";\n schreibe_db(\"user\", $f, $u_id, \"u_id\");\n } else {\n $text = \"$u_nick $t[away1] $away\";\n $f['u_away'] = $away;\n schreibe_db(\"user\", $f, $u_id, \"u_id\");\n }\n // Bei Moderation private Nachricht, sonst Nachricht an alle\n if (!$ist_moderiert || $u_level == \"M\") {\n global_msg($u_id, $r_id, $text);\n } else {\n system_msg(\"\", $u_id, $u_id, $system_farbe, $text);\n }\n }\n break;\n \n case \"/schubs\":\n // Nur für Admins und Tempadmins, schubst User in einen andere Raum\n if ($admin || $u_level == \"A\") {\n $user = nick_ergaenze($chatzeile[1], \"raum\", 1);\n if ($user['u_nick'] == \"\")\n $user = nick_ergaenze($chatzeile[1], \"online\", 1);\n if ($user['u_nick'] != \"\") {\n $raum = $chatzeile[2];\n if ($raum == \"\") {\n $query = \"select r_id,r_name from raum where r_id=$o_raum\";\n } else {\n $query = \"select r_id,r_name from raum where r_name like '$raum%'\";\n }\n $result = mysql_query($query, $conn);\n if ($result > 0) {\n $raumid = mysql_result($result, 0, \"r_id\");\n $raum = mysql_result($result, 0, \"r_name\");\n mysql_free_result($result);\n }\n $query = \"select o_raum,o_id,r_name from online,raum where o_user=$user[u_id] AND r_id=o_raum\";\n $result = mysql_query($query, $conn);\n if ($result > 0) {\n $raumalt = mysql_result($result, 0, \"r_name\");\n $uo_id = mysql_result($result, 0, \"o_id\");\n $uo_raum = mysql_result($result, 0, \"o_raum\");\n mysql_free_result($result);\n }\n // $text=\"Schubbern...$user[u_nick]/$user[u_id] $raumalt/$uo_raum -&gt; $raum/$raumid\";\n $text = \"<b>$chat:</b> $user[u_nick]: $raumalt -&gt; $raum\";\n system_msg(\"\", 0, $u_id, $system_farbe, $text);\n global_msg($u_id, $o_raum,\n \"'$u_name' $t[sperre2] '$user[u_nick]' $t[sperre8] $raum\");\n raum_gehe($uo_id, $user['u_id'], $user['u_nick'], $uo_raum,\n $raumid, TRUE);\n }\n }\n break;\n \n case \"/plop\":\n case \"/kick\":\n // Besitzer des aktuellen Raums ermitteln\n $query = \"SELECT r_besitzer from raum WHERE r_id=$r_id \";\n $result = mysql_query($query, $conn);\n $rows = mysql_num_rows($result);\n \n if ($rows == 1) {\n $r_besitzer = mysql_result($result, 0, \"r_besitzer\");\n }\n mysql_free_result($result);\n \n // Nur für Admins und Tempadmins, wirft User aus dem aktuellen Raum oder hebt Sperre auf\n if (strlen($chatzeile[1]) > 0) {\n // User kicken....\n \n // User aus Raum werfen oder Sperre freigeben, falls $u_id ist Admin oder Besitzer\n if ($r_besitzer == $u_id || $admin || $u_level == \"A\") {\n // Ist User im aktuellen Raum eingeloggt?\n $query = \"SELECT o_user,o_name,o_level,(LENGTH(o_name)-length('\" . mysql_real_escape_string($chatzeile[1]) . \"')) as laenge \"\n . \"FROM online \"\n . \"WHERE o_name LIKE '%\" . mysql_real_escape_string($chatzeile[1]) . \"%' \"\n . \"ORDER BY laenge\";\n \n $result = mysql_query($query, $conn);\n $rows = mysql_num_rows($result);\n \n // User bestimmen\n if ($rows != 0) {\n $s_user = mysql_result($result, 0, \"o_user\");\n $s_user_name = mysql_result($result, 0, \"o_name\");\n $s_user_level = mysql_result($result, 0, \"o_level\");\n \n // Auf admin prüfen\n if ($s_user_level == \"S\" || $s_user_level == \"C\"\n || $s_user_level == \"M\" || $s_user_level == \"A\") {\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%u_name%\", $u_name,\n str_replace(\"%s_user_name%\", $s_user_name,\n $t['chat_msg13'])));\n } else {\n // Sperren oder freigeben\n sperre($r_id, $u_id, $u_name, $s_user,\n $s_user_name, $admin);\n }\n \n } else {\n // user nicht gefunden oder nicht online? dann testen, ob gesperrt, damit man das \n // gesperrt auch wieder raus bekommt.\n $query = \"SELECT u_nick,u_id from user left join sperre \"\n . \" on u_id = s_user \"\n . \"WHERE u_nick='\" . mysql_real_escape_string($chatzeile[1]) . \"' and s_raum = $r_id \";\n $result = mysql_query($query, $conn);\n if ($result && mysql_num_rows($result) == 1) {\n $row = mysql_fetch_object($result);\n sperre($r_id, $u_id, $u_name, $row->u_id,\n $row->u_nick, $admin);\n } else {\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%chatzeile%\", $chatzeile[1],\n $t['chat_msg14']));\n }\n @mysql_free_result($result);\n }\n @mysql_free_result($result);\n } else {\n system_msg(\"\", 0, $u_id, $system_farbe, $t['chat_msg15']);\n }\n \n } elseif ($r_besitzer == $u_id || $admin || $u_level == \"A\") {\n // Liste der für diesen Raum gesperrten User ausgeben\n \n $query = \"SELECT u_nick FROM sperre,user \"\n . \"WHERE s_user=u_id AND s_raum=$r_id \"\n . \"ORDER BY u_nick\";\n $result = mysql_query($query, $conn);\n $rows = mysql_num_rows($result);\n \n if ($rows > 0) {\n $text = $t['chat_msg16'] . \" \";\n $i = 0;\n while ($rows > $i) {\n $text = $text . mysql_result($result, $i, \"u_nick\");\n $i++;\n if ($rows > $i) {\n $text = $text . \", \";\n }\n }\n } else {\n $text = $t['chat_msg17'];\n }\n system_msg(\"\", 0, $u_id, $system_farbe, $text);\n mysql_free_result($result);\n } else {\n // Keine Berechtigung zur Ausgabe der gesperrten user\n system_msg(\"\", 0, $u_id, $system_farbe,\n \"<B>He $u_name!</B> \"\n . str_replace(\"%chatzeile%\", $chatzeile[0],\n $t['chat_msg1']));\n }\n \n break;\n \n case \"/name\":\n case \"/nick\":\n // Prüft und ändert Nicknamen\n if (!$einstellungen_aendern) {\n system_msg(\"\", 0, $u_id, $system_farbe,\n \"<B>He $u_name!</B> \"\n . str_replace(\"%chatzeile%\", $chatzeile[0],\n $t['chat_msg1']));\n } elseif ((strlen($chatzeile[1]) > 0)\n && (coreCheckName($chatzeile[1], $check_name) != $u_name)) {\n \n $query = \"SELECT u_nick_historie FROM user WHERE u_id = '$u_id'\";\n $result = mysql_query($query);\n $xyz = mysql_fetch_array($result);\n $nick_historie = unserialize($xyz['u_nick_historie']);\n \n if (is_array($nick_historie)) {\n reset($nick_historie);\n list($key, $value) = each($nick_historie);\n $differenz = time() - $key;\n }\n if (!isset($differenz))\n $differenz = 999;\n if ($admin)\n $differenz = 999;\n \n // Sonderzeichen filtern\n $chatzeile[1] = coreCheckName($chatzeile[1], $check_name);\n \n // Länge prüfen\n if (strlen($chatzeile[1]) < 4 || strlen($chatzeile[1]) > 20\n || $differenz < $nickwechsel) {\n if ($differenz < $nickwechsel)\n system_msg(\"\", $u_id, $u_id, $system_farbe,\n str_replace(\"%nickwechsel%\", $nickwechsel,\n $t['chat_msg107']));\n else system_msg(\"\", $u_id, $u_id, $system_farbe,\n str_replace(\"%chatzeile%\", $chatzeile[1],\n $t['chat_msg18']));\n \n } else {\n $f['u_nick'] = $chatzeile[1];\n $query = \"SELECT u_id, u_level FROM user \"\n . \"WHERE u_nick LIKE '\" . mysql_real_escape_string($f[u_nick]) . \"' \"\n . \"AND u_id != $u_id\";\n \n $result = mysql_query($query, $conn);\n $rows = mysql_num_rows($result);\n if ($rows != 0) {\n if ($rows == 1) {\n $xyz = mysql_fetch_array($result);\n if ($xyz[u_level] == 'Z') {\n system_msg(\"\", $u_id, $u_id, $system_farbe,\n str_replace(\"%u_nick%\", $f['u_nick'],\n $t['chat_msg115']));\n } else {\n system_msg(\"\", $u_id, $u_id, $system_farbe,\n str_replace(\"%u_nick%\", $f['u_nick'],\n $t['chat_msg19']));\n }\n } else {\n system_msg(\"\", $u_id, $u_id, $system_farbe,\n str_replace(\"%u_nick%\", $f['u_nick'],\n $t['chat_msg19']));\n }\n } else {\n // Nick in Datenbank ändern\n schreibe_db(\"user\", $f, $u_id, \"u_id\");\n \n // Bei Moderation private Nachricht, sonst Nachricht an alle\n if (!$ist_moderiert || $u_level == \"M\") {\n global_msg($u_id, $r_id,\n str_replace(\"%u_nick%\", $f['u_nick'],\n str_replace(\"%u_name%\", $u_name,\n $t['chat_msg20'])));\n } else {\n system_msg(\"\", $u_id, $u_id, $system_farbe,\n str_replace(\"%u_nick%\", $f['u_nick'],\n str_replace(\"%u_name%\", $u_name,\n $t['chat_msg20'])));\n } // Neuen Namen setzen und alte Nicknamen in DB speichern\n \n $query = \"SELECT u_nick_historie FROM user WHERE u_id = '$u_id'\";\n $result = mysql_query($query);\n $xyz = mysql_fetch_array($result);\n $nick_historie = unserialize($xyz['u_nick_historie']);\n \n $datum = time();\n $nick_historie_neu[$datum] = $u_name;\n \n if (is_array($nick_historie)) {\n $i = 0;\n while (($i < 3)\n && list($datum, $nick) = each($nick_historie)) {\n $nick_historie_neu[$datum] = $nick;\n $i++;\n }\n }\n \n $f['u_nick_historie'] = serialize($nick_historie_neu);\n $u_id = schreibe_db(\"user\", $f, $u_id, \"u_id\");\n \n $u_name = $f['u_nick'];\n }\n mysql_free_result($result);\n }\n }\n break;\n \n case \"/color\":\n case \"/farbe\":\n if ((($u_level == \"G\") || ($u_level == \"U\"))\n && ($eingabe_light_farbe == \"1\")) {\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%chatzeile%\", $chatzeile[0],\n $t['chat_spruch5']));\n }\n // Zeigt oder ändert Farbe\n elseif (strlen($chatzeile[1]) == 6) {\n if (preg_match(\"/[a-f0-9]{6}/i\", $chatzeile[1])) {\n if (isset($f))\n unset($f);\n $f['u_farbe'] = substr(htmlspecialchars($chatzeile[1]), 0,\n 6);\n schreibe_db(\"user\", $f, $u_id, \"u_id\");\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%u_farbe%\", $f['u_farbe'],\n $t['chat_msg21']));\n } else {\n system_msg(\"\", 0, $u_id, $system_farbe, $t['chat_msg23']);\n }\n } else if (strlen($chatzeile[1]) == 0) {\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%u_farbe%\", $u_farbe, $t['chat_msg22']));\n } else {\n system_msg(\"\", 0, $u_id, $system_farbe, $t['chat_msg23']);\n }\n break;\n \n case \"/farbset\":\n if ((($u_level == \"G\") || ($u_level == \"U\"))\n && ($eingabe_light_farbe == \"1\")) {\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%chatzeile%\", $chatzeile[0],\n $t['chat_spruch5']));\n } else {\n \n switch ($chatzeile[1]) {\n case \"1\":\n $f['u_farbe'] = \"0000c0\";\n $f['u_farbe_alle'] = \"202020\";\n $f['u_farbe_priv'] = \"c02020\";\n $f['u_farbe_sys'] = \"55555\";\n $f['u_farbe_bg'] = \"f0f0f0\";\n $f['u_farbe_noise'] = \"008000\";\n schreibe_db(\"user\", $f, $u_id, \"u_id\");\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%nummer%\", $chatzeile[1],\n $t['chat_msg28']));\n break;\n case \"2\":\n $f['u_farbe'] = \"5050c0\";\n $f['u_farbe_alle'] = \"2222cc\";\n $f['u_farbe_priv'] = \"f06000\";\n $f['u_farbe_sys'] = \"0070e0\";\n $f['u_farbe_bg'] = \"d0f0ff\";\n $f['u_farbe_noise'] = \"2090b0\";\n schreibe_db(\"user\", $f, $u_id, \"u_id\");\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%nummer%\", $chatzeile[1],\n $t['chat_msg28']));\n break;\n case \"3\":\n $f['u_farbe'] = \"424242\";\n $f['u_farbe_alle'] = \"0000c0\";\n $f['u_farbe_priv'] = \"ff4040\";\n $f['u_farbe_sys'] = \"707070\";\n $f['u_farbe_bg'] = \"ffffff\";\n $f['u_farbe_noise'] = \"008000\";\n schreibe_db(\"user\", $f, $u_id, \"u_id\");\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%nummer%\", $chatzeile[1],\n $t['chat_msg28']));\n break;\n case \"4\":\n $f['u_farbe'] = \"000000\";\n $f['u_farbe_alle'] = \"0000ff\";\n $f['u_farbe_priv'] = \"ff0000\";\n $f['u_farbe_sys'] = \"000000\";\n $f['u_farbe_bg'] = \"ffffff\";\n $f['u_farbe_noise'] = \"0000ff\";\n schreibe_db(\"user\", $f, $u_id, \"u_id\");\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%nummer%\", $chatzeile[1],\n $t['chat_msg28']));\n break;\n default:\n system_msg(\"\", 0, $u_id, $system_farbe,\n $t['chat_msg29']);\n break;\n }\n }\n break;\n \n case \"/farbreset\":\n if ((($u_level == \"G\") || ($u_level == \"U\"))\n && ($eingabe_light_farbe == \"1\")) {\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%chatzeile%\", $chatzeile[0],\n $t['chat_spruch5']));\n } else {\n $f['u_farbe_alle'] = \"-\";\n $f['u_farbe_priv'] = \"-\";\n $f['u_farbe_sys'] = \"-\";\n $f['u_farbe_bg'] = \"-\";\n $f['u_farbe_noise'] = \"-\";\n $f['u_farbe'] = $user_farbe;\n schreibe_db(\"user\", $f, $u_id, \"u_id\");\n system_msg(\"\", 0, $u_id, $system_farbe, $t['chat_msg27']);\n }\n break;\n \n case \"/color2\":\n case \"/farbe2\":\n case \"/farbealle\":\n if ((($u_level == \"G\") || ($u_level == \"U\"))\n && ($eingabe_light_farbe == \"1\")) {\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%chatzeile%\", $chatzeile[0],\n $t['chat_spruch5']));\n } else {\n \n // Zeigt oder ändert Farbe 2 (Farbe für alle anderen User)\n if ($chatzeile[1] == \"off\")\n $chatzeile[1] = \"-\";\n if ($chatzeile[1] == \"aus\")\n $chatzeile[1] = \"-\";\n if (strlen($chatzeile[1]) == 6 || $chatzeile[1] == \"-\") :\n $f['u_farbe_alle'] = substr(\n htmlspecialchars($chatzeile[1]), 0, 6);\n schreibe_db(\"user\", $f, $u_id, \"u_id\");\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%u_farbe%\", $f['u_farbe_alle'],\n $t['chat_msg21']));\n elseif (strlen($chatzeile[1]) == 0) :\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%u_farbe%\", $u_farbe_alle,\n $t['chat_msg22']));\n else :\n system_msg(\"\", 0, $u_id, $system_farbe, $t['chat_msg23']);\n endif;\n }\n break;\n \n case \"/farbe3\";\n case \"/color3\";\n case \"/farbenoise\";\n if ((($u_level == \"G\") || ($u_level == \"U\"))\n && ($eingabe_light_farbe == \"1\")) {\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%chatzeile%\", $chatzeile[0],\n $t['chat_spruch5']));\n } else {\n \n // Zeigt oder ändert Farbe 3 (Farbe für noises)\n if ($chatzeile[1] == \"off\")\n $chatzeile[1] = \"-\";\n if ($chatzeile[1] == \"aus\")\n $chatzeile[1] = \"-\";\n if (strlen($chatzeile[1]) == 6 || $chatzeile[1] == \"-\") :\n $f['u_farbe_noise'] = substr(\n htmlspecialchars($chatzeile[1]), 0, 6);\n schreibe_db(\"user\", $f, $u_id, \"u_id\");\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%u_farbe%\", $f['u_farbe_noise'],\n $t['chat_msg21']));\n elseif (strlen($chatzeile[1]) == 0) :\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%u_farbe%\", $u_farbe_noise,\n $t['chat_msg22']));\n else :\n system_msg(\"\", 0, $u_id, $system_farbe, $t['chat_msg23']);\n endif;\n }\n break;\n \n case \"/color4\":\n case \"/farbe4\":\n case \"/farbepriv\":\n if ((($u_level == \"G\") || ($u_level == \"U\"))\n && ($eingabe_light_farbe == \"1\")) {\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%chatzeile%\", $chatzeile[0],\n $t['chat_spruch5']));\n } else {\n \n // Zeigt oder ändert Farbe 4 (Farbe für privat) \n if ($chatzeile[1] == \"off\")\n $chatzeile[1] = \"-\";\n if ($chatzeile[1] == \"aus\")\n $chatzeile[1] = \"-\";\n if (strlen($chatzeile[1]) == 6 || $chatzeile[1] == \"-\") :\n $f['u_farbe_priv'] = substr(\n htmlspecialchars($chatzeile[1]), 0, 6);\n schreibe_db(\"user\", $f, $u_id, \"u_id\");\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%u_farbe%\", $f['u_farbe_priv'],\n $t['chat_msg21']));\n elseif (strlen($chatzeile[1]) == 0) :\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%u_farbe%\", $u_farbe_priv,\n $t['chat_msg22']));\n else :\n system_msg(\"\", 0, $u_id, $system_farbe, $t['chat_msg23']);\n endif;\n }\n break;\n \n case \"/color5\":\n case \"/farbe5\":\n case \"/farbebg\":\n if ((($u_level == \"G\") || ($u_level == \"U\"))\n && ($eingabe_light_farbe == \"1\")) {\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%chatzeile%\", $chatzeile[0],\n $t['chat_spruch5']));\n } else {\n // Zeigt oder ändert Farbe 5 (Farbe für Background) \n if ($chatzeile[1] == \"off\")\n $chatzeile[1] = \"-\";\n if ($chatzeile[1] == \"aus\")\n $chatzeile[1] = \"-\";\n if (strlen($chatzeile[1]) == 6 || $chatzeile[1] == \"-\") :\n $f['u_farbe_bg'] = substr(htmlspecialchars($chatzeile[1]),\n 0, 6);\n schreibe_db(\"user\", $f, $u_id, \"u_id\");\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%u_farbe%\", $f['u_farbe_bg'],\n $t['chat_msg21']));\n elseif (strlen($chatzeile[1]) == 0) :\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%u_farbe%\", $u_farbe_bg, $t['chat_msg22']));\n else :\n system_msg(\"\", 0, $u_id, $system_farbe, $t['chat_msg23']);\n endif;\n }\n break;\n \n case \"/color6\":\n case \"/farbe6\":\n case \"/farbesys\":\n if ((($u_level == \"G\") || ($u_level == \"U\"))\n && ($eingabe_light_farbe == \"1\")) {\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%chatzeile%\", $chatzeile[0],\n $t['chat_spruch5']));\n } else {\n // Zeigt oder ändert Farbe 6 (Farbe für Systemmeldungen) \n if ($chatzeile[1] == \"off\")\n $chatzeile[1] = \"-\";\n if ($chatzeile[1] == \"aus\")\n $chatzeile[1] = \"-\";\n if (strlen($chatzeile[1]) == 6 || $chatzeile[1] == \"-\") {\n $f['u_farbe_sys'] = substr(\n htmlspecialchars($chatzeile[1]), 0, 6);\n schreibe_db(\"user\", $f, $u_id, \"u_id\");\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%u_farbe%\", $f['u_farbe_sys'],\n $t['chat_msg21']));\n } elseif (strlen($chatzeile[1]) == 0) {\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%u_farbe%\", $u_farbe_sys, $t['chat_msg22']));\n } else {\n system_msg(\"\", 0, $u_id, $system_farbe, $t['chat_msg23']);\n }\n }\n break;\n \n case \"/help\":\n case \"/hilfe\":\n case \"/?\":\n if ((($u_level == \"G\") || ($u_level == \"U\"))\n && ($eingabe_light_hilfe == \"1\")) {\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%chatzeile%\", $chatzeile[0],\n $t['chat_spruch5']));\n } else {\n \n // Hilfe listen \n reset($hilfstext);\n $anzahl = count($hilfstext);\n $i = 0;\n while ($i < $anzahl) {\n $hhkey = key($hilfstext);\n system_msg(\"\", 0, $u_id, \"\",\n \"<SMALL>\" . $hilfstext[$hhkey] . \"</SMALL>\");\n next($hilfstext);\n $i++;\n }\n }\n break;\n \n case \"/clearedit\":\n // löschen der Eingabezeile erzwingen oder alten Text stehen lassen\n // alter Text wird dann zum überschreiben markiert.\n if ($u_clearedit == 0) {\n $f['u_clearedit'] = \"1\";\n system_msg(\"\", 0, $u_id, $system_farbe, $t['chat_msg30']);\n } else {\n $f['u_clearedit'] = \"0\";\n system_msg(\"\", 0, $u_id, $system_farbe, $t['chat_msg31']);\n }\n schreibe_db(\"user\", $f, $u_id, \"u_id\");\n break;\n \n case \"/dice\":\n case \"/wuerfel\":\n // Würfeln\n if ($u_level == \"G\") {\n system_msg(\"\", 0, $u_id, $system_farbe, $t['chat_msg55']);\n } else {\n \n if ($o_knebel > 0) {\n // user ist geknebelt...\n $zeit = gmdate(\"H:i:s\", $o_knebel);\n $txt = str_replace(\"%zeit%\", $zeit, $t['knebel6']);\n system_msg(\"\", 0, $u_id, $system_farbe, $txt);\n break;\n }\n \n if (preg_match(\"!^\\d+[wW]\\d+$!\", $chatzeile[1])) {\n \n $w = preg_split(\"![wW]!\", $chatzeile[1]);\n if ($w[0] > 30)\n $w[0] = 30;\n if ($w[1] == 0)\n $w[1] = 6;\n $t['chat_msg34'] = str_replace(\"%user%\", $u_name,\n $t['chat_msg34']);\n if ($w[0] == 1)\n $tmp = \"einem \";\n else $tmp = htmlspecialchars(\"$w[0] \");\n if (preg_match(\"!w!\", $chatzeile[1]))\n $tmp = $tmp . \"kleinen \";\n else $tmp = $tmp . \"großen \";\n if ($w[0] == 1) {\n $tmp = $tmp\n . htmlspecialchars(\" $w[1]-seitigen Würfel\");\n } else {\n $tmp = $tmp\n . htmlspecialchars(\" $w[1]-seitigen Würfeln\");\n }\n $t['chat_msg34'] = str_replace(\"%wuerfel%\", $tmp,\n $t['chat_msg34']);\n \n $summe = 0;\n for ($i = 0; $i < $w[0]; $i++) {\n $wurf = mt_rand(1, $w[1]);\n $summe = $summe + $wurf;\n $t['chat_msg34'] = $t['chat_msg34'] . \" $wurf\";\n }\n if ($w[0] > 1)\n $t['chat_msg34'] = $t['chat_msg34'] . \". Summe=$summe.\";\n \n // Bei Moderation private Nachricht, sonst Nachricht an alle\n if (!$ist_moderiert || $u_level == \"M\") {\n hidden_msg($u_name, $u_id, $u_farbe, $r_id,\n $t['chat_msg34']);\n } else {\n system_msg(\"\", $u_id, $u_id, $system_farbe,\n $t['moderiert1']);\n }\n \n } else {\n system_msg(\"\", $u_id, $u_id, $system_farbe,\n $t['chat_msg35']);\n }\n }\n break;\n \n case \"/zeige\":\n case \"/whois\":\n if ($u_level == \"G\") {\n system_msg(\"\", 0, $u_id, $system_farbe, $t['chat_msg55']);\n } else {\n if (strlen($chatzeile[1]) >= 3) {\n $chatzeile[1] = str_replace(\"$\", \"\", $chatzeile[1]);\n $chatzeile[1] = str_replace(\"^\", \"\", $chatzeile[1]);\n \n if (preg_match(\"/%/\", $chatzeile[1]))\n $sucheper = \"LIKE\";\n else $sucheper = \"=\";\n \n if ((strcasecmp($chatzeile[1], \"gast\") == 0) && ($admin)) {\n // suche \"/whois gast\" zeigt alle Gäste und den User gastwenn vorhanden\n $query = \"SELECT *,date_format(u_login,'%d.%m.%y %H:%i') as login \"\n . \"FROM user WHERE (u_nick LIKE '\" . mysql_real_escape_string($chatzeile[1]) . \"') or (u_level = 'G') \"\n . \"ORDER BY u_nick,u_name limit $max_user_liste\";\n } else if (($admin) || ($u_level == \"A\")) {\n // suche für Admins und Tempadmins zeigt alle User\n $query = \"SELECT *,date_format(u_login,'%d.%m.%y %H:%i') as login \"\n . \"FROM user WHERE u_nick $sucheper '\" . mysql_real_escape_string($chatzeile[1]) . \"' \"\n . \"ORDER BY u_nick,u_name limit $max_user_liste\";\n } else {\n // suche für User zeigt die gesperrten nicht an\n $query = \"SELECT *,date_format(u_login,'%d.%m.%y %H:%i') as login \"\n . \"FROM user WHERE u_nick $sucheper '\" . mysql_real_escape_string($chatzeile[1]) . \"' \"\n . \"and u_level in ('A','C','G','M','S','U') \"\n . \"ORDER BY u_nick,u_name limit $max_user_liste\";\n }\n \n $result = @mysql_query($query, $conn);\n $rows = mysql_num_rows($result);\n \n $text = \"<B>WHOIS $chatzeile[1]:</B><BR>\\n\";\n while ($row = @mysql_fetch_object($result)) {\n $q2 = \"SELECT r_name,o_ip,o_vhost,o_browser,o_id,o_who,\"\n . \"UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(o_login) AS online_zeit \"\n . \"FROM online left join raum on r_id=o_raum WHERE o_user=$row->u_id \";\n $r2 = mysql_query($q2, $conn);\n if ($r2 && mysql_num_rows($r2) > 0) {\n // User ist online\n $r = mysql_fetch_object($r2);\n if ($admin) {\n $text = $text\n . user($row->u_id, $row, TRUE, TRUE,\n \"&nbsp;\", $r->online_zeit, $row->login,\n FALSE) . \"&nbsp;(\"\n . htmlspecialchars($row->u_name) . \"), \";\n } else {\n $text = $text\n . user($row->u_id, $row, TRUE, TRUE,\n \"&nbsp;\", $r->online_zeit, $row->login,\n FALSE) . \", \";\n }\n if ($row->u_email)\n $text .= \"%email%&nbsp;\"\n . htmlspecialchars($row->u_email) . \", \";\n if ($row->u_adminemail && $admin)\n $text .= \"%adminemail%&nbsp;\"\n . htmlspecialchars($row->u_adminemail)\n . \", \";\n $text .= \"<B>[\" . $whotext[$r->o_who] . \"]</B>\";\n if ($r->o_who == 0)\n $text .= \", %raum%&nbsp;\" . $r->r_name;\n \n if ($row->u_away) {\n $awaytext = htmlspecialchars($row->u_away);\n $awaytext = str_replace('&lt;b&gt;', '<B>',\n $awaytext);\n $awaytext = str_replace('&lt;/b&gt;', '</B>',\n $awaytext);\n $awaytext = str_replace('&lt;i&gt;', '<I>',\n $awaytext);\n $awaytext = str_replace('&lt;/i&gt;', '</I>',\n $awaytext);\n $awaytext = str_replace('&amp;lt;', '<',\n $awaytext);\n $awaytext = str_replace('&amp;gt;', '>',\n $awaytext);\n $awaytext = str_replace('&amp;quot;', '\"',\n $awaytext);\n $text = $text . \", (\" . $awaytext . \")\";\n }\n \n if ($admin) {\n $host_name = @gethostbyaddr($r->o_ip);\n $text = $text\n . htmlspecialchars(\n \", ($r->o_ip($host_name), $r->o_vhost, $r->o_browser) \");\n }\n $text = $text . \"</B><br>\\n\";\n @mysql_free_result($r2);\n } else {\n // User ist nicht online\n if ($admin) {\n $text = $text\n . user($row->u_id, $row, TRUE, TRUE,\n \"&nbsp;\", \"\", $row->login, FALSE)\n . \"&nbsp;(\"\n . htmlspecialchars($row->u_name) . \"), \";\n } else {\n $text = $text\n . user($row->u_id, $row, TRUE, TRUE,\n \"&nbsp;\", \"\", $row->login, FALSE) . \", \";\n }\n if ($row->u_email)\n $text = $text . \"%email%&nbsp;\"\n . htmlspecialchars($row->u_email) . \", \";\n if ($row->u_adminemail && $admin)\n $text = $text . \"%adminemail%&nbsp;\"\n . htmlspecialchars($row->u_adminemail) . \", \";\n if ($row->u_away) {\n $awaytext = htmlspecialchars($row->u_away);\n $awaytext = str_replace('&lt;b&gt;', '<B>',\n $awaytext);\n $awaytext = str_replace('&lt;/b&gt;', '</B>',\n $awaytext);\n $awaytext = str_replace('&lt;i&gt;', '<I>',\n $awaytext);\n $awaytext = str_replace('&lt;/i&gt;', '</I>',\n $awaytext);\n $awaytext = str_replace('&amp;lt;', '<',\n $awaytext);\n $awaytext = str_replace('&amp;gt;', '>',\n $awaytext);\n $text = $text . \", (\" . $awaytext . \")\";\n }\n $text = $text . \"<br>\\n\";\n }\n }\n $text = $text . \"\\n\";\n $text = str_replace(\"%email%\", $t['chat_msg64'], $text);\n $text = str_replace(\"%adminemail%\", $t['chat_msg65'], $text);\n $text = str_replace(\"%online%\", $t['chat_msg66'], $text);\n $text = str_replace(\"%raum%\", $t['chat_msg67'], $text);\n $text = str_replace(\"%login%\", $t['chat_msg68'], $text);\n \n system_msg(\"\", 0, $u_id, $system_farbe, $text);\n @mysql_free_result($result);\n \n } else {\n system_msg(\"\", 0, $u_id, $system_farbe, $t['chat_msg33']);\n }\n \n }\n break;\n \n case \"/msg\": // Sollte hier in den Aliasen etwas dazu kommen, muss der Autoknebel angepasst werden, damit Admins die privaten\n case \"/talk\": // Nachrichten nicht lesen können, wenn der Autoknebel zuschlägt\n case \"/tell\":\n case \"/t\":\n case \"/msgpriv\": // Extra behandlung für Private Nachrichten im Userfenster, für den Fall, dass der User sich ausloggt, keine Nickergänzung\n \n // Private Nachricht \n if (!($o_knebel > 0) && $u_level != \"G\"\n && (!$beichtstuhl || $admin)) {\n \n // Smilies und Text parsen\n $privat = TRUE;\n $text = html_parse($privat,\n htmlspecialchars($chatzeile[2] . \" \" . $chatzeile[3]));\n \n // Empfänger im Chat suchen\n // /talk muss z.B. mit \"/talk kleiner\" auch dann an kleiner gehen \n // wenn kleiner in anderem Raum ist und im eigenen Raum ein kleinerpfuscher anwesend ist.\n if (!isset($nick) || $nick['u_nick'] == \"\") {\n if ($chatzeile[0] == \"/msgpriv\") { // Keine Nickergänzung bei diesem Nachrichtentyp\n // Prüfen ob User noch Online \t\t\n $query = \"SELECT o_id, o_name, o_user, o_userdata, o_userdata2, o_userdata3, o_userdata4 FROM online WHERE o_name = '\" . mysql_real_escape_string($chatzeile[1]) . \"' \";\n \n $result = mysql_query($query, $conn);\n if ($result >= 0) {\n if (mysql_num_rows($result) == 1) {\n $nick = unserialize(\n mysql_result($result, 0, \"o_userdata\")\n . mysql_result($result, 0,\n \"o_userdata2\")\n . mysql_result($result, 0,\n \"o_userdata3\")\n . mysql_result($result, 0,\n \"o_userdata4\"));\n $nick['u_nick'] = mysql_result($result, 0,\n \"o_name\");\n $nick['u_id'] = mysql_result($result, 0,\n \"o_user\");\n } else {\n $nick['u_nick'] = \"\";\n system_msg(\"\", 0, $u_id, $u_farbe,\n str_replace(\"%chatzeile%\", $chatzeile[1],\n $t['chat_msg25']));\n }\n }\n mysql_free_result($result);\n \n } else {\n $nick = nick_ergaenze($chatzeile[1], \"online\", 0);\n }\n }\n \n // Falls Empfänger gefunden, Nachricht versenden\n if (isset($nick) && $nick['u_nick'] != \"\") {\n \n // nick gefunden und Eindeutig.\n if ($text != \" \") {\n // Wir prüfen, ob der User ignoriert wird, wenn ja => Fehlermeldung\n \n $query = \"SELECT i_user_aktiv, i_user_passiv FROM iignore \"\n . \"WHERE (i_user_aktiv='$u_id' AND i_user_passiv = '$nick[u_id]') OR \"\n . \" (i_user_passiv='$u_id' AND i_user_aktiv = '$nick[u_id]') \";\n $result = mysql_query($query);\n $num = mysql_num_rows($result);\n mysql_free_result($result);\n \n #system_msg(\"\",$u_id,$u_id,$system_farbe,\"num: $num\");\n if ($num == 0) {\n priv_msg($u_name, $u_id, $nick['u_id'], $u_farbe,\n $text, $userdata);\n system_msg(\"\", $u_id, $u_id, $system_farbe,\n \"<B>$u_name $t[chat_msg24] $nick[u_nick]:</B> $text\");\n } else {\n system_msg(\"\", $u_id, $u_id, $system_farbe,\n str_replace('%nick%', $nick['u_nick'],\n $t['chat_msg109']));\n }\n if ($nick['u_away'] != \"\")\n system_msg(\"\", 0, $u_id, $system_farbe,\n \"<b>$chat:</b> $nick[u_nick] $t[away1] $nick[u_away]\");\n }\n } else {\n // Nachricht konnte nicht verschickt werden, als Kopie ausgeben\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%nachricht%\", $text, $t['chat_msg77']));\n }\n } elseif ($u_level == \"G\") {\n system_msg(\"\", 0, $u_id, $system_farbe, $t['chat_msg55']);\n } elseif ($o_knebel > 0) {\n // user ist geknebelt...\n $zeit = gmdate(\"H:i:s\", $o_knebel);\n $txt = str_replace(\"%zeit%\", $zeit, $t['knebel6']);\n system_msg(\"\", $u_id, $u_id, $system_farbe, $txt);\n } elseif (!$admin) {\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%chatzeile%\", $chatzeile[0], $t['chat_msg1']));\n }\n break;\n \n case \"/tf\":\n case \"/msgf\":\n $query = \"SELECT f_id,f_text,f_userid,f_freundid,f_zeit FROM freunde WHERE f_userid=$u_id AND f_status = 'bestaetigt' \"\n . \"UNION \"\n . \"SELECT f_id,f_text,f_userid,f_freundid,f_zeit FROM freunde WHERE f_freundid=$u_id AND f_status = 'bestaetigt' \"\n . \"ORDER BY f_zeit desc \";\n \n $result = mysql_query($query);\n $fid = \"\";\n $nicks = \"\";\n while ($a = mysql_fetch_array($result)) {\n $query2 = \"SELECT o_user,o_name FROM online WHERE (o_user = '$a[f_userid]' or o_user = '$a[f_freundid]') and o_user != '$u_id'\";\n $result2 = mysql_query($query2);\n if (mysql_numrows($result2) == 1) {\n if ($a[f_userid] != $u_id)\n $fid[] = $a[f_userid];\n if ($a[f_freundid] != $u_id)\n $fid[] = $a[f_freundid];\n }\n }\n \n $privat = TRUE;\n $text = html_parse($privat,\n htmlspecialchars(\n $chatzeile[1] . \" \" . $chatzeile[2] . \" \" . $chatzeile[3]));\n \n for ($i = 0; $i < count($fid); $i++) {\n $nick = user($fid[$i], 0, FALSE, FALSE, \"\");\n priv_msg($u_name, $u_id, $fid[$i], $u_farbe, $text, $userdata);\n system_msg(\"\", $u_id, $u_id, $system_farbe,\n \"<B>$u_name $t[chat_msg24] $nick:</B> $text\");\n }\n \n break;\n \n case \"/analle\":\n case \"/toall\":\n // Private nachricht an alle User\n if ($admin || $u_level == \"A\") {\n \n // Smilies und Text parsen\n $privat = TRUE;\n $text = html_parse($privat,\n $t['chat_msg100']\n . htmlspecialchars(\n $chatzeile[1] . \" \" . $chatzeile[2] . \" \"\n . $chatzeile[3]));\n \n if ($text) {\n // Schleife über alle User, die online sind\n $query = \"SELECT o_user FROM online\";\n $result = mysql_query($query, $conn);\n if ($result && mysql_num_rows($result) > 0) {\n while ($row = mysql_fetch_array($result)) {\n if ($row['o_user'] != $u_id) {\n priv_msg($u_name, $u_id, $row['o_user'],\n $u_farbe, $text, $userdata);\n }\n }\n system_msg(\"\", $u_id, $u_id, $system_farbe,\n \"<B>$u_name $t[chat_msg78]:</B> $text\");\n } else {\n // Kein User online\n system_msg(\"\", $u_id, $u_id, $system_farbe,\n $t['chat_msg79']);\n }\n @mysql_free_result($result);\n }\n } else {\n // user ist kein Admin\n system_msg(\"\", $u_id, $u_id, $system_farbe, $t['chat_msg1']);\n }\n break;\n \n case \"/loescheraum\":\n // Raum löschen\n if ($chatzeile[1]) {\n \n // Rechte prüfen \n $query = \"SELECT r_id,r_name,r_besitzer FROM raum \"\n . \"WHERE r_name like '\" . mysql_real_escape_string($chatzeile[1]) . \"' \";\n $result = mysql_query($query, $conn);\n \n if (mysql_num_rows($result) != 0) {\n $row = mysql_fetch_object($result);\n if ($admin || $row->r_besitzer == $u_id) {\n \n // Lobby suchen\n $query = \"SELECT r_id FROM raum WHERE r_name='$lobby' \";\n $result2 = mysql_query($query, $conn);\n if ($result2 AND mysql_num_rows($result2) > 0) :\n $lobby_id = mysql_result($result2, 0, \"r_id\");\n endif;\n @mysql_free_result($result2);\n if (!$lobby_id) {\n system_msg(\"\", 0, $u_id, $system_farbe,\n $t['chat_msg63']);\n exit;\n }\n \n // Löschen falls nicht Lobby\n if ($row->r_id == $lobby_id) {\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%r_name%\", $row->r_name,\n $t['chat_msg63']));\n } else {\n \n // Raum darf gelöscht werden, Raum schließen\n $f['r_status1'] = \"G\";\n schreibe_db(\"raum\", $f, $row->r_id, \"r_id\");\n \n // Raum leeren\n $query = \"SELECT o_user,o_name FROM online \"\n . \"WHERE o_raum=$row->r_id \";\n \n $result2 = mysql_query($query, $conn);\n while ($row2 = mysql_fetch_object($result2)) :\n system_msg(\"\", 0, $row2->o_user, $system_farbe,\n str_replace(\"%r_name%\", $row->r_name,\n $t['chat_msg62']));\n $oo_raum = raum_gehe($o_id, $row2->o_user,\n $row2->o_name, $row->r_id, $lobby_id,\n FALSE);\n raum_user($lobby_id, $row2->o_user, $id);\n $i++;\n endwhile;\n @mysql_free_result($result2);\n \n $query = \"DELETE FROM raum WHERE r_id=$row->r_id \";\n $result2 = mysql_query($query, $conn);\n @mysql_free_result($result2);\n \n // Gesperrte Räume löschen\n $query = \"DELETE FROM sperre WHERE s_raum=$row->r_id\";\n $result2 = mysql_query($query, $conn);\n @mysql_free_result($result2);\n \n // Meldung an User\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%r_name%\", $row->r_name,\n $t['chat_msg58']));\n }\n \n } else {\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%r_name%\", $row->r_name,\n $t['chat_msg57']));\n }\n } else {\n system_msg(\"\", 0, $u_id, $system_farbe, $t['chat_msg3']);\n }\n @mysql_free_result($result);\n } else {\n system_msg(\"\", 0, $u_id, $system_farbe, $t['chat_msg59']);\n }\n \n break;\n \n case \"/uebergeberaum\":\n case \"/schenke\":\n // aktuellen Raum Übergeben\n // Rechte prüfen \n $query = \"SELECT r_id,r_name,r_besitzer FROM raum \"\n . \"WHERE r_id=$o_raum \";\n $result = mysql_query($query, $conn);\n \n if (mysql_num_rows($result) != 0) {\n $row = mysql_fetch_object($result);\n if ($admin || $row->r_besitzer == $u_id) {\n \n // Empfänger im aktuellen Raum suchen\n $nick = nick_ergaenze($chatzeile[1], \"raum\", 1);\n \n // Empfänger im Chat suchen\n if ($nick['u_nick'] == \"\")\n $nick = nick_ergaenze($chatzeile[1], \"online\", 0);\n \n // Falls Empfänger gefunden und Empfänger ist nicht sich selbst, Nachricht versenden\n if (($nick['u_nick'] != \"\") && ($nick['u_id'])\n && $nick['u_nick'] != $u_name\n && $nick['u_level'] != \"G\" && $r_id) {\n // Raum übergeben\n $text = $t['chat_msg60'];\n $text = str_replace(\"%user%\", $nick['u_nick'], $text);\n $text = str_replace(\"%r_name%\", $row->r_name, $text);\n $text = str_replace(\"%absender%\", $u_nick, $text);\n \n system_msg(\"\", $u_id, $u_id, $system_farbe, $text);\n system_msg(\"\", $u_id, $nick['u_id'], $system_farbe,\n $text);\n $f['r_besitzer'] = $nick['u_id'];\n schreibe_db(\"raum\", $f, $r_id, \"r_id\");\n } else {\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%r_name%\", $row->r_name,\n $t['chat_msg69']));\n }\n \n } else {\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%r_name%\", $row->r_name, $t['chat_msg61']));\n }\n } else {\n system_msg(\"\", 0, $u_id, $system_farbe, $t['chat_msg3']);\n }\n @mysql_free_result($result);\n \n break;\n \n case \"/aendereraum\":\n // aktuellen Raum auf den Status G/O/m ändern\n // Rechte prüfen \n $query = \"SELECT r_id,r_name,r_besitzer,r_status1 FROM raum \"\n . \"WHERE r_id=$o_raum \";\n $result = mysql_query($query, $conn);\n \n if (mysql_num_rows($result) != 0) {\n $row = mysql_fetch_object($result);\n if ($admin || $row->r_besitzer == $u_id) {\n \n switch (strtolower($chatzeile[1])) {\n \n case \"m\":\n case \"moderiert\":\n if ($moderationsmodul == 0)\n system_msg(\"\", $u_id, $u_id, $system_farbe,\n $t['chat_msg74']);\n else $f['r_status1'] = \"m\";\n break;\n \n case \"o\":\n case \"offen\":\n $f['r_status1'] = \"O\";\n break;\n \n case \"g\":\n case \"geschlossen\":\n $f['r_status1'] = \"G\";\n break;\n \n default:\n unset($f['r_status1']);\n $text = $t['chat_msg71'] . $raumstatus1[O] . \", \"\n . $raumstatus1['G'] . \", \" . $raumstatus1['m']\n . \".\";\n system_msg(\"\", $u_id, $u_id, $system_farbe, $text);\n \n }\n \n if ($f['r_status1'] == $row->r_status1) {\n // Raum nicht verändert\n system_msg(\"\", $u_id, $u_id, $system_farbe,\n str_replace(\"%status%\",\n $raumstatus1[$f['r_status1']],\n str_replace(\"%r_name%\", $row->r_name,\n $t['chat_msg75'])));\n } elseif ($f['r_status1'] && $r_id) {\n // Raum ändern\n system_msg(\"\", $u_id, $u_id, $system_farbe,\n str_replace(\"%status%\",\n $raumstatus1[$f['r_status1']],\n str_replace(\"%r_name%\", $row->r_name,\n $t['chat_msg73'])));\n schreibe_db(\"raum\", $f, $r_id, \"r_id\");\n } else {\n // Fehler\n if (strlen($chatzeile[1]) > 0) {\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%r_name%\", $row->r_name,\n $t['chat_msg70']));\n }\n }\n \n } else {\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%r_name%\", $row->r_name, $t['chat_msg72']));\n }\n } else {\n system_msg(\"\", 0, $u_id, $system_farbe, $t['chat_msg3']);\n }\n @mysql_free_result($result);\n \n break;\n \n case \"/lob\":\n // Nur für Admins, lobt User mit Punkten\n if ($admin) {\n if ($communityfeatures) {\n $user = nick_ergaenze($chatzeile[1], \"raum\", 1);\n if ($user['u_nick'] == \"\") {\n $user = nick_ergaenze($chatzeile[1], \"online\", 0);\n $im_raum = FALSE;\n } else {\n $im_raum = TRUE;\n }\n \n // Nur Superuser dürfen Gästen Punkte geben\n if ($user['u_level'] == 'G' && $u_level != 'S') {\n system_msg(\"\", 0, $u_id, $system_farbe, $t['punkte22']);\n $user['u_nick'] = \"\";\n }\n \n $anzahl = (int) $chatzeile[2];\n if ((string) $anzahl != (string) $chatzeile[2])\n $anzahl = 0;\n \n // Mehr als ein Punkt? Ansonsten Fehlermeldung\n if ($anzahl < 1) {\n system_msg(\"\", 0, $u_id, $system_farbe, $t['punkte7']);\n $user['u_nick'] = \"\";\n }\n \n // Kein SU und mehr als 1000 Punkte? Ansonsten Fehlermeldung\n if ($anzahl > 1000 && $u_level != 'S') {\n system_msg(\"\", 0, $u_id, $system_farbe, $t['punkte11']);\n $user['u_nick'] = \"\";\n }\n \n // selber Punkte geben ist verboten\n if ($u_nick == $user['u_nick']) {\n system_msg(\"\", 0, $u_id, $system_farbe, $t['punkte10']);\n $user['u_nick'] = \"\";\n }\n \n if ($user['u_nick'] != \"\") {\n \n if ($im_raum) {\n // eine öffentliche Nachricht an alle schreiben\n punkte($anzahl, $user['o_id'], $user['u_id'], \"\",\n TRUE);\n $txt = str_replace(\"%user1%\", $u_nick,\n $t['punkte5']);\n $txt = str_replace(\"%user2%\", $user['u_nick'], $txt);\n $txt = str_replace(\"%punkte%\", $anzahl, $txt);\n global_msg($u_id, $o_raum,\n str_replace(\"%user%\", $u_nick, $txt));\n } else {\n // Zwei private Nachrichten (admin/user)\n punkte($anzahl, $user['o_id'], $user['u_id'],\n str_replace(\"%user%\", $u_nick, $t['punkte3']),\n TRUE);\n $txt = str_replace(\"%user2%\", $user['u_nick'],\n $t['punkte8']);\n $txt = str_replace(\"%user1%\", $u_nick, $txt);\n $txt = str_replace(\"%punkte%\", $anzahl, $txt);\n global_msg($u_id, $o_raum,\n str_replace(\"%user%\", $u_nick, $txt));\n }\n }\n } else {\n system_msg(\"\", 0, $u_id, $system_farbe, $t['chat_msg74']);\n }\n } else {\n system_msg(\"\", 0, $u_id, $system_farbe,\n \"<B>He $u_name!</B> \"\n . str_replace(\"%chatzeile%\", $chatzeile[0],\n $t['chat_msg1']));\n }\n break;\n \n case \"/tadel\":\n case \"/bestraf\":\n case \"/peitsch\":\n // Nur für Admins, zieht User Punkte ab\n if ($admin) {\n if ($communityfeatures) {\n $user = nick_ergaenze($chatzeile[1], \"raum\", 1);\n if ($user['u_nick'] == \"\") {\n $user = nick_ergaenze($chatzeile[1], \"online\", 0);\n $im_raum = FALSE;\n } else {\n $im_raum = TRUE;\n }\n \n $anzahl = (int) $chatzeile[2];\n if ((string) $anzahl != (string) $chatzeile[2])\n $anzahl = 0;\n \n // Mehr als ein Punkt? Ansonsten Fehlermeldung\n if ($anzahl < 1) {\n system_msg(\"\", 0, $u_id, $system_farbe, $t['punkte7']);\n $user['u_nick'] = \"\";\n }\n \n // Lustiger Text, wenn der Admin sich selbst etwas abzieht\n if ($lustigefeatures && $u_nick == $user['u_nick']) {\n \n if ($anzahl == 1) {\n $txt = $t['punkte12'];\n } elseif ($anzahl == 42) {\n $txt = $t['punkte13'];\n } elseif ($anzahl < 100) {\n $txt = $t['punkte14'];\n } elseif ($anzahl < 200) {\n $txt = $t['punkte15'];\n } elseif ($anzahl < 500) {\n $txt = $t['punkte16'];\n } elseif ($anzahl < 1000) {\n $txt = $t['punkte17'];\n } elseif ($anzahl < 5000) {\n $txt = $t['punkte18'];\n } elseif ($anzahl < 10000) {\n $txt = $t['punkte19'];\n } else {\n $txt = $t['punkte20'];\n }\n \n // eine öffentliche Nachricht an alle schreiben\n punkte($anzahl * (-1), $user['o_id'], $user['u_id'],\n \"\", TRUE);\n \n $txt = str_replace(\"%user%\", $u_nick, $txt);\n $txt = str_replace(\"%punkte%\", $anzahl, $txt);\n global_msg($u_id, $o_raum,\n str_replace(\"%user%\", $u_nick, $txt));\n \n } elseif ($user['u_nick'] != \"\") {\n \n if ($im_raum) {\n // eine öffentliche Nachricht an alle schreiben\n punkte($anzahl * (-1), $user['o_id'],\n $user['u_id'], \"\", TRUE);\n $txt = str_replace(\"%user1%\", $u_nick,\n $t['punkte6']);\n $txt = str_replace(\"%user2%\", $user['u_nick'], $txt);\n $txt = str_replace(\"%punkte%\", $anzahl, $txt);\n global_msg($u_id, $o_raum,\n str_replace(\"%user%\", $u_nick, $txt));\n } else {\n // Zwei private Nachrichten (admin/user)\n punkte($anzahl * (-1), $user['o_id'],\n $user['u_id'],\n str_replace(\"%user%\", $u_nick, $t['punkte4']),\n TRUE);\n $txt = str_replace(\"%user2%\", $user['u_nick'],\n $t['punkte9']);\n $txt = str_replace(\"%user1%\", $u_nick, $txt);\n $txt = str_replace(\"%punkte%\", $anzahl, $txt);\n global_msg($u_id, $o_raum,\n str_replace(\"%user%\", $u_nick, $txt));\n }\n }\n } else {\n system_msg(\"\", 0, $u_id, $system_farbe, $t['chat_msg74']);\n }\n } else {\n system_msg(\"\", 0, $u_id, $system_farbe,\n \"<B>He $u_name!</B> \"\n . str_replace(\"%chatzeile%\", $chatzeile[0],\n $t['chat_msg1']));\n }\n break;\n \n case \"/mail\":\n case \"/m\":\n // Mail schreiben\n $text = chat_parse(\n htmlspecialchars($chatzeile[2] . \" \" . $chatzeile[3]));\n \n if ($communityfeatures && !($o_knebel > 0) && $u_level != \"G\"\n && strlen($text) > 1) {\n \n // Empfänger im Chat suchen\n $nick = nick_ergaenze($chatzeile[1], \"online\", 1);\n \n // Falls keinen Empfänger gefunden, in Usertabelle nachsehen\n if ($nick['u_nick'] == \"\") {\n $query = \"SELECT u_nick,u_id from user \" . \"WHERE u_nick='\"\n . mysql_real_escape_string(coreCheckName($chatzeile[1], $check_name)) . \"'\";\n $result = mysql_query($query, $conn);\n if ($result && mysql_num_rows($result) == 1) {\n $nick = mysql_fetch_array($result);\n }\n @mysql_free_result($result);\n }\n \n $ignore = false;\n $query2 = \"SELECT * FROM iignore WHERE i_user_aktiv='$nick[u_id]' AND i_user_passiv = '$u_id'\";\n $result2 = mysql_query($query2);\n $num = mysql_numrows($result2);\n if ($num >= 1) {\n $ignore = true;\n }\n \n // Falls nick gefunden, Mail versenden\n if ($nick['u_nick'] != \"\" && $nick['u_id']\n && $nick['u_level'] != \"G\" && $nick['u_level'] != \"Z\"\n && $ignore == false) {\n if (strlen($text) > 4) {\n $result = mail_sende($u_id, $nick['u_id'], $text);\n if ($result[0])\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%chatzeile%\", $chatzeile[1],\n $t['chat_msg80']));\n else system_msg(\"\", 0, $u_id, $system_farbe, $result[1]);\n } else {\n system_msg(\"\", 0, $u_id, $system_farbe,\n $t['chat_msg81']);\n }\n } elseif ($nick['u_level'] == \"G\" || $nick['u_level'] == \"Z\") {\n // Nachricht konnte nicht verschickt werden, als Kopie ausgeben\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%chatzeile%\", $chatzeile[1],\n $t['chat_msg95']));\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%nachricht%\", $text, $t['chat_msg77']));\n } else {\n // Nachricht konnte nicht verschickt werden, als Kopie ausgeben\n // ignoriere User dürfen kein Mail schicken\n if ($ignore == true) {\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%user%\", $nick['u_nick'],\n $t['chat_msg103']));\n } else {\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%chatzeile%\", $chatzeile[1],\n $t['chat_msg8']));\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%nachricht%\", $text, $t['chat_msg77']));\n }\n }\n \n } elseif (!$communityfeatures) {\n \n system_msg(\"\", 0, $u_id, $system_farbe, $t['chat_msg74']);\n \n } elseif ($u_level == \"G\") {\n \n system_msg(\"\", 0, $u_id, $system_farbe, $t['chat_msg55']);\n \n } elseif (strlen($text) <= 1) {\n \n system_msg(\"\", 0, $u_id, $system_farbe, $t['chat_msg81']);\n \n } else {\n // user ist geknebelt...\n $zeit = gmdate(\"H:i:s\", $o_knebel);\n $txt = str_replace(\"%zeit%\", $zeit, $t['knebel6']);\n system_msg(\"\", $u_id, $u_id, $system_farbe, $txt);\n \n }\n break;\n \n case \"/freunde\":\n case \"/freund\":\n case \"/buddy\":\n // Fügt Freund der Freundesliste hinzu oder löscht einen Eintrag\n \n if ($u_level != \"G\" && $communityfeatures) {\n \n $privat = FALSE;\n $text = html_parse($privat,\n htmlspecialchars($chatzeile[2] . \" \" . $chatzeile[3]));\n \n if ($chatzeile[1]) {\n \n // Nach nicknamen suchen\t\t\n $nick = nick_ergaenze($chatzeile[1], \"online\", 1);\n \n // Falls keinen Empfänger gefunden, in Usertabelle nachsehen\n if ($nick['u_nick'] == \"\") {\n $query = \"SELECT u_nick,u_id,u_level from user \"\n . \"WHERE u_nick='\"\n . mysql_real_escape_string(coreCheckName($chatzeile[1], $check_name)) . \"'\";\n $result = mysql_query($query, $conn);\n if ($result && mysql_num_rows($result) == 1) {\n $nick = mysql_fetch_array($result);\n }\n @mysql_free_result($result);\n \n }\n \n $freunddazu = 1;\n if ($nick['u_nick'] != \"\" && $nick['u_id']) {\n $query2 = \"SELECT * FROM iignore WHERE i_user_aktiv='$nick[u_id]' AND i_user_passiv = '$u_id'\";\n $result2 = mysql_query($query2);\n $num = mysql_numrows($result2);\n if ($num >= 1) {\n $freunddazu = -1;\n }\n if ($nick['u_level'] == 'Z') {\n $freunddazu = -2;\n }\n if ($nick['u_level'] == 'G') {\n $freunddazu = -3;\n }\n @mysql_free_result($result2);\n }\n \n // Falls nick gefunden, prüfen ob er bereits in Tabelle steht\n if ($nick['u_nick'] != \"\" && $nick['u_id']) {\n $query = \"SELECT f_id from freunde WHERE \"\n . \"(f_userid=$nick[u_id] AND f_freundid=$u_id ) \"\n . \"OR \"\n . \"(f_userid=$u_id AND f_freundid=$nick[u_id] )\";\n \n $result = mysql_query($query, $conn);\n if ($result && mysql_num_rows($result) > 0) {\n \n // User ist bereits Freund -> entfernen\n $query = \"DELETE from freunde WHERE \"\n . \"(f_userid=$nick[u_id] AND f_freundid=$u_id) \"\n . \"OR \"\n . \"(f_userid=$u_id AND f_freundid=$nick[u_id])\";\n $result = mysql_query($query, $conn);\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%u_name%\", $nick['u_nick'],\n $t['chat_msg84']));\n \n } elseif ($nick['u_id'] == $u_id) {\n \n // Eigener Freund ist verboten\n system_msg(\"\", 0, $u_id, $system_farbe,\n $t['chat_msg89']);\n \n } else {\n \n if ($freunddazu == 1) {\n // User ist noch kein Freund -> hinzufügen\n unset($f);\n $f['u_id'] = $nick['u_id'];\n $f['u_nick'] = $nick['u_nick'];\n if (strlen($text) > 1)\n $f['f_text'] = $text;\n #schreibe_db(\"freunde\",$f,0,\"f_id\");\n \n $text = neuer_freund($u_id, $f);\n # system_msg(\"\",0,$u_id,$system_farbe,str_replace(\"%u_name%\",$nick[u_nick],$t[chat_msg83]));\n system_msg(\"\", 0, $u_id, $system_farbe, $text);\n } else if ($freunddazu == -1) {\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%u_name%\", $nick['u_nick'],\n $t['chat_msg116']));\n } else if ($freunddazu == -2) {\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%u_name%\", $nick['u_nick'],\n $t['chat_msg117']));\n } else if ($freunddazu == -3) {\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%u_name%\", $nick['u_nick'],\n $t['chat_msg118']));\n }\n \n }\n } else {\n // User nicht gefunden\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%chatzeile%\", $chatzeile[1],\n $t['chat_msg8']));\n }\n }\n \n // Listet alle Freunde auf\n $query = \"SELECT f_id,f_text,f_userid,f_freundid,f_zeit FROM freunde WHERE f_userid=$u_id AND f_status = 'bestaetigt' \"\n . \"UNION \"\n . \"SELECT f_id,f_text,f_userid,f_freundid,f_zeit FROM freunde WHERE f_freundid=$u_id AND f_status = 'bestaetigt' \"\n . \"ORDER BY f_zeit desc \";\n \n $result = mysql_query($query, $conn);\n if ($result && mysql_num_rows($result) > 0) {\n \n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%u_name%\", $u_nick, $t['chat_msg85']));\n \n while ($row = mysql_fetch_object($result)) {\n \n // User aus DB lesen\n if ($row->f_userid != $u_id) {\n $query = \"SELECT u_nick,u_id,u_level,u_punkte_gesamt,u_punkte_gruppe,o_id,\"\n . \"date_format(u_login,'%d.%m.%y %H:%i') as login, \"\n . \"UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(o_login) AS online \"\n . \"from user left join online on o_user=u_id \"\n . \"WHERE u_id=$row->f_userid \";\n $result2 = mysql_query($query, $conn);\n } elseif ($row->f_freundid != $u_id) {\n $query = \"SELECT u_nick,u_id,u_level,u_punkte_gesamt,u_punkte_gruppe,o_id,\"\n . \"date_format(u_login,'%d.%m.%y %H:%i') as login, \"\n . \"UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(o_login) AS online \"\n . \"from user left join online on o_user=u_id \"\n . \"WHERE u_id=$row->f_freundid \";\n $result2 = mysql_query($query, $conn);\n }\n if ($result2 && mysql_num_rows($result2) > 0) {\n // User gefunden -> Ausgeben\n $row2 = mysql_fetch_object($result2);\n if ($row2->o_id == \"\" || $row2->o_id == \"NULL\")\n $row2->online = \"\";\n $txt = user($row2->u_id, $row2, $o_js, TRUE,\n \"&nbsp;\", $row2->online, $row2->login, FALSE);\n } else {\n // User nicht gefunden, Freund löschen\n $txt = \"NOBODY\";\n $query = \"DELETE from freunde WHERE f_id=$row->f_id\";\n $result2 = mysql_query($query, $conn);\n }\n \n // Text als Systemnachricht ausgeben\n if ($row->f_text)\n $txt .= \" (\" . $row->f_text . \")\";\n system_msg(\"\", 0, $u_id, $system_farbe,\n \"&nbsp;&nbsp;\" . $txt);\n \n }\n } else {\n system_msg(\"\", 0, $u_id, $system_farbe, $t['chat_msg86']);\n }\n @mysql_free_result($result);\n \n } elseif (!$communityfeatures) {\n // Fehlermeldung Community\n system_msg(\"\", 0, $u_id, $system_farbe, $t['chat_msg74']);\n \n } else {\n // Fehlermeldung Gast\n system_msg(\"\", 0, $u_id, $system_farbe, $t['chat_msg55']);\n }\n break;\n \n case \"/time\":\n // Gibt die Systemuhrzeit aus\n if ($u_level == \"G\") {\n system_msg(\"\", 0, $u_id, $system_farbe, $t['chat_msg55']);\n } else {\n \n $tempzeit = $t['chat_msg114'];\n $tempzeit = str_replace(\"%datum%\", strftime('%d.%m.%Y'),\n $tempzeit);\n $tempzeit = str_replace(\"%uhrzeit%\", strftime('%H:%M:%S'),\n $tempzeit);\n system_msg(\"\", 0, $u_id, $system_farbe, $tempzeit);\n unset($tempzeit);\n }\n break;\n \n case \"/blacklist\":\n case \"/blackliste\":\n // Fügt Eintrag der Blacklist hinzu oder löscht einen Eintrag\n \n if ($admin && $communityfeatures) {\n \n $privat = FALSE;\n $text = html_parse($privat,\n htmlspecialchars($chatzeile[2] . \" \" . $chatzeile[3]));\n \n if ($chatzeile[1]) {\n \n // Nach nicknamen suchen\t\t\n $nick = nick_ergaenze($chatzeile[1], \"online\", 1);\n \n // Falls keinen Empfänger gefunden, in Usertabelle nachsehen\n if ($nick['u_nick'] == \"\") {\n \n $chatzeile[1] = coreCheckName($chatzeile[1],\n $check_name);\n $query = \"SELECT u_nick,u_id from user \"\n . \"WHERE u_nick='\" . mysql_real_escape_string($chatzeile[1]) . \"'\";\n $result = mysql_query($query, $conn);\n if ($result && mysql_num_rows($result) == 1) {\n $nick = mysql_fetch_array($result);\n }\n @mysql_free_result($result);\n \n }\n \n // Falls nick gefunden, prüfen ob er bereits in Tabelle steht\n if ($nick['u_nick'] != \"\" && $nick['u_id']) {\n $query = \"SELECT f_id from blacklist WHERE \"\n . \"f_blacklistid=$nick[u_id] \";\n \n $result = mysql_query($query, $conn);\n if ($result && mysql_num_rows($result) > 0) {\n \n // User ist bereits auf der Liste -> entfernen\n $query = \"DELETE from blacklist WHERE \"\n . \"f_blacklistid=$nick[u_id] \";\n $result = mysql_query($query, $conn);\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%u_name%\", $nick['u_nick'],\n $t['chat_msg97']));\n \n } elseif ($nick['u_id'] == $u_id) {\n \n // Eigener Freund ist verboten\n system_msg(\"\", 0, $u_id, $system_farbe,\n $t['chat_msg99']);\n \n } else {\n \n // User ist noch kein Eintrag -> hinzufügen\n $f['f_userid'] = $u_id;\n $f['f_blacklistid'] = $nick['u_id'];\n if (strlen($text) > 1)\n $f['f_text'] = $text;\n schreibe_db(\"blacklist\", $f, 0, \"f_id\");\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%u_name%\", $nick['u_nick'],\n $t['chat_msg96']));\n }\n } else {\n // User nicht gefunden\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%chatzeile%\", $chatzeile[1],\n $t['chat_msg8']));\n }\n \n } else {\n system_msg(\"\", 0, $u_id, $system_farbe, $t['chat_msg98']);\n }\n @mysql_free_result($result);\n \n } elseif (!$communityfeatures) {\n // Fehlermeldung Community\n system_msg(\"\", 0, $u_id, $system_farbe, $t['chat_msg74']);\n \n } else {\n // Fehlermeldung\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%chatzeile%\", $chatzeile[0], $t['chat_msg1']));\n }\n break;\n \n case \"/sms\":\n if ($u_level != \"G\" && $communityfeatures && $smsfeatures) {\n \n $text = html_parse($privat,\n htmlspecialchars($chatzeile[2] . \" \" . $chatzeile[3]));\n \n // Empfänger im Chat suchen\n // /talk muss z.B. mit \"/talk kleiner\" auch dann an kleiner gehen \n // wenn kleiner in anderem Raum ist und im eigenen Raum ein kleinerpfuscher anwesend ist.\n if ($nick['u_nick'] == \"\")\n $nick = nick_ergaenze($chatzeile[1], \"online\", 1);\n \n // Falls keinen Empfänger gefunden, in Usertabelle nachsehen\n if ($nick['u_nick'] == \"\") {\n \n $chatzeile[1] = coreCheckName($chatzeile[1], $check_name);\n $query = \"SELECT u_nick,u_id from user \"\n . \"WHERE u_nick='\" . mysql_real_escape_string($chatzeile[1]) . \"'\";\n $result = mysql_query($query, $conn);\n if ($result && mysql_num_rows($result) == 1) {\n $nick = mysql_fetch_array($result);\n }\n @mysql_free_result($result);\n }\n \n // Falls Empfänger gefunden, Nachricht versenden\n if ($nick['u_nick'] != \"\") {\n \n // nick gefunden und Eindeutig.\n if ($text != \" \") {\n sms_msg($u_name, $u_id, $nick['u_id'], $u_farbe, $text,\n $userdata);\n if ($nick['u_away'] != \"\")\n system_msg(\"\", 0, $u_id, $system_farbe,\n \"<b>$chat:</b> $nick[u_nick] $t[away1] $nick[u_away]\");\n }\n } else {\n // Nachricht konnte nicht verschickt werden, als Kopie ausgeben\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%nachricht%\", $text, $t['chat_msg77']));\n }\n \n } elseif (!$communityfeatures or !$smsfeatures) {\n // Fehlermeldung Community\n system_msg(\"\", 0, $u_id, $system_farbe, $t['chat_msg74']);\n \n } else {\n // Fehlermeldung Gast\n system_msg(\"\", 0, $u_id, $system_farbe, $t['chat_msg55']);\n }\n break;\n \n case \"/quiddice\":\n case \"/dicecheck\":\n if (!isset($o_dicecheck)) {\n mysql_query(\"ALTER TABLE online ADD o_dicecheck VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT ''\", $conn);\n $o_dicecheck = \"\";\n }\n if (!$o_dicecheck) {\n if (preg_match(\"!^\\d+[wW]\\d+$!\", $chatzeile[1])) {\n $o_dicecheck = mysql_real_escape_string($chatzeile[1]);\n mysql_query(\"UPDATE online SET o_dicecheck = '$o_dicecheck' WHERE o_user = $u_id\", $conn);\n if (!isset($t['chat_dicecheck_msg0'])) {\n $t['chat_dicecheck_msg0'] = \"<B>$chat:</B> <b>%dicecheck%</b> wurde aktiviert. Bitte klicke auf RESET.\";\n }\n system_msg(\"\", 0, $u_id, $system_farbe, str_replace(\"%dicecheck%\", $chatzeile[0] . \" \" . $chatzeile[1], $t['chat_dicecheck_msg0']));\n } else {\n if (!isset($t['chat_dicecheck_msg1'])) {\n $t['chat_dicecheck_msg1'] = \"<B>$chat:</B> Beispiel: <b>%dicecheck% 3W6</b> prüft alle Würfelwürfe, ob sie mit /dice 3W6 geworfen wurden.\";\n }\n system_msg(\"\", 0, $u_id, $system_farbe, str_replace(\"%dicecheck%\", $chatzeile[0], $t['chat_dicecheck_msg1']));\n }\n } else {\n $o_dicecheck = \"\";\n mysql_query(\"UPDATE online SET o_dicecheck = '' WHERE o_user = $u_id\", $conn);\n if (!isset($t['chat_dicecheck_msg2'])) {\n $t['chat_dicecheck_msg2'] = \"<B>$chat:</B> <b>%dicecheck%</b> wurde deaktiviert. Bitte klicke auf RESET.\";\n }\n system_msg(\"\", 0, $u_id, $system_farbe, str_replace(\"%dicecheck%\", $chatzeile[0], $t['chat_dicecheck_msg2']));\n }\n break;\n default:\n if (!($o_knebel > 0)) {\n \n // Gibt Spruch aus, falls Eingabe mit = beginnt\n if (preg_match(\"/^=/\", $chatzeile[0])) {\n \n // Spruch suchen und ausgeben\n if ($u_level == \"G\") {\n system_msg(\"\", 0, $u_id, $system_farbe,\n $t['chat_msg55']);\n } else {\n \n // Art des Spruchs\n // 0: Ohne Argumente\n // 1: Username wurde angegeben\n // 2: Username und Zusatztext wurden übergeben\n \n // Wenn in $chatzeile[1] oder anderen auser 0 ein \" vorkommt,\n // dann leerzeichen durch + ersetzen und neu splitten\n if (!isset($chatzeile[1]))\n $chatzeile[1] = \"\";\n if (!isset($chatzeile[2]))\n $chatzeile[2] = \"\";\n if (!isset($chatzeile[3]))\n $chatzeile[3] = \"\";\n if (preg_match(\"/\\\"/\", $chatzeile[1])\n || preg_match(\"/\\\"/\", $chatzeile[2])\n || preg_match(\"/\\\"/\", $chatzeile[3])) {\n $text = trim($text);\n // Nur bei gerader anzahl an \" geht es\n if (substr_count($text, '\"') == 2) {\n $temp = explode('\"', $text, 3);\n if (trim($temp[2]) == '') {\n $temp[1] = \"\\\"\" . $temp[1] . \"\\\"\";\n }\n $text = $temp[0]\n . str_replace(' ', '+', trim($temp[1]))\n . \" \"\n . str_replace(' ', '+', trim($temp[2]));\n $chatzeile = preg_split(\"/ /\", $text, 4);\n } else if (substr_count($text, '\"') == 4) {\n $temp = explode('\"', $text, 5);\n $text = $temp[0] . \"\\\"\"\n . str_replace(' ', '+', $temp[1]) . \"\\\" \"\n . str_replace(' ', '+', $temp[3]);\n $chatzeile = preg_split(\"/ /\", $text, 4);\n }\n if (!isset($chatzeile[3]))\n $chatzeile[3] = \"\";\n }\n \n // Befehl bestimmen und ungültige Zeichen filtern\n $spruchname = strtr(substr($chatzeile[0], 1), \"*%$!?.,;:\\\\/\", \"\");\n $username = $chatzeile[1];\n $zusatztext = $chatzeile[2] . \" \" . $chatzeile[3];\n \n if ($username)\n $nick = nick_ergaenze($username, \"raum\", 1);\n if (isset($nick) && $nick != \"\")\n $username = $nick['u_nick'];\n \n $spruchart = 0;\n if ($username)\n $spruchart++;\n if ($zusatztext != \" \")\n $spruchart++;\n \n $username = str_replace(\"+\", \" \", $username);\n $username = trim(str_replace(\"\\\"\", \"\", $username));\n $zusatztext = str_replace(\"+\", \" \", $zusatztext);\n $zusatztext = trim(str_replace(\"\\\"\", \"\", $zusatztext));\n \n // Spruch suchen\n // Sprüche in Array lesen\n $sp_list = file(\"conf/$datei_spruchliste\");\n $sp_such = \"^\" . preg_quote($spruchname, \"/\") . \"\\t\"\n . $spruchart . \"\\t\";\n for (@reset($sp_list); (list(, $sp_text) = each(\n $sp_list))\n AND (!preg_match(\"/\" . $sp_such . \"/i\", $sp_text));)\n ;\n \n // Spruch gefunden?\n if (preg_match(\"/\" . $sp_such . \"/i\", $sp_text)) {\n \n // Spruch parsen\n $spruchtmp = preg_split(\"/\\t/\", $sp_text, 3);\n $spruchtxt = $spruchtmp[2];\n \n $spruchtxt = str_replace(\"`2\", $zusatztext,\n $spruchtxt);\n $spruchtxt = str_replace(\"`1\", $username,\n $spruchtxt);\n $spruchtxt = str_replace(\"`0\", $u_name, $spruchtxt);\n \n // Spruch ausgeben\n $spruchtxt = str_replace(\"\\n\", \"\", $spruchtxt);\n \n if (!$ist_moderiert || $u_level == \"M\") {\n hidden_msg($u_name, $u_id, $u_farbe, $r_id,\n trim(\n html_parse($privat,\n htmlspecialchars($spruchtxt . \" \")))\n . \"<!-- ($u_nick) -->\");\n } else {\n system_msg(\"\", $u_id, $u_id, $system_farbe,\n $t['moderiert1']);\n }\n \n } else {\n \n // Fehler ausgeben\n $fehler = $t['chat_spruch3'];\n if ($spruchart == 2)\n $fehler = $t['chat_spruch1'];\n if ($spruchart == 1)\n $fehler = $t['chat_spruch2'];\n \n $fehler = str_replace(\"%spruchname%\", $spruchname,\n $fehler);\n $fehler = str_replace(\"%u_name%\", $u_name, $fehler);\n system_msg(\"\", 0, $u_id, $system_farbe, $fehler);\n \n // Hinweise ausgeben\n for (@reset($sp_list); list(, $sp_text) = each(\n $sp_list);)\n if (preg_match(\n \"/^\" . preg_quote($spruchname, \"/\")\n . \"\\t/i\", $sp_text)) {\n $spruchtmp = preg_split(\"/\\t/\", $sp_text, 3);\n $txt = \"<SMALL><B>$t[chat_spruch4] <I>\"\n . $spruchtmp[0] . \" \" . $spruchtmp[1]\n . \"</I></B> &lt;\" . $spruchtmp[2]\n . \"&gt;</SMALL>\";\n system_msg(\"\", 0, $u_id, $system_farbe,\n $txt);\n }\n }\n }\n \n } else {\n \n // Gibt Fehler aus, falls Eingabe mit / beginnt\n if (preg_match(\"/^\\//\", $chatzeile[0])) {\n system_msg(\"\", 0, $u_id, $system_farbe,\n str_replace(\"%chatzeile%\", $chatzeile[0],\n $t['chat_spruch5']));\n \n } else {\n \n // Normaler Text im Chat ausgeben\n // Text filtern und in DB schreiben\n \n // Nicknamen ergänzen, gesucht wird nach aktiven usern im selben Raum\n $temp = substr($chatzeile[0], -1);\n \n // Ansprechen mit \"Nick:\" \"@nick\" oder \"Nick,\" bzw \"Nick.\"\n // Problem: \"Nick,\" und \"Nick.\" macht Probleme bei allen Wörten, die am Anfang mit , oder \"...\" \n // getrennt geschrieben werden\n // z.b. \"so, ich gehe jetzt\" wird zu \"[zu Sonnenschein] ich gehe jetzt\" wenn User Sonnenschein im Raum ist\n // if ($temp==\":\" || $temp==\"@\" || $temp==\",\") {\n // Daher auskommentiert und nur \"Nick:\" \"@nick\" und testweise \"Nick.\" akzeptiert\n // da obriges seltener für den . passiert, und der . öfters aus versehen statt dem : erwischt wird\n if ($temp == \":\" || $temp == \"@\") {\n $nick = nick_ergaenze($chatzeile[0], \"raum\", 0);\n if ($nick['u_nick'] != \"\") {\n // Falls User gefunden wurde Nicknamen einfügen und filtern\n $f['c_text'] = \"[\" . $t['chat_spruch6']\n . \"&nbsp;$nick[u_nick]] \"\n . html_parse($privat,\n htmlspecialchars(\n $chatzeile[1] . \" \" . $chatzeile[2]\n . \" \" . $chatzeile[3]));\n if ($nick['u_away'] != \"\")\n system_msg(\"\", 0, $u_id, $system_farbe,\n \"<b>$chat:</b> $nick[u_nick] $t[away1] $nick[u_away]\");\n } else {\n // keine Fehlermeldung, wird von nick_replace schon erzeugt...\n // Ansonsten Chatzeile gefiltert ausgeben\n $f['c_text'] = html_parse($privat,\n htmlspecialchars($text));\n }\n } elseif (isset($chatzeile[1])\n && substr($chatzeile[1], 0, 1) == \"@\") {\n $nick = nick_ergaenze($chatzeile[1], \"raum\", 0);\n if ($nick['u_nick'] != \"\") {\n // Falls User gefunden wurde Nicknamen einfügen und filtern\n $f['c_text'] = \"[\" . $t['chat_spruch6']\n . \"&nbsp;$nick[u_nick]] \"\n . html_parse($privat,\n htmlspecialchars(\n $chatzeile[0] . \" \" . $chatzeile[2]\n . \" \" . $chatzeile[3]));\n if ($nick['u_away'] != \"\")\n system_msg(\"\", 0, $u_id, $system_farbe,\n \"<b>$chat:</b> $nick[u_nick] $t[away1] $nick[u_away]\");\n } else {\n // keine Fehlermeldung, wird von nick_replace schon erzeugt...\n // Ansonsten Chatzeile gefiltert ausgeben\n $f['c_text'] = html_parse($privat,\n htmlspecialchars($text));\n }\n } else {\n // Chatzeile gefiltert ausgeben\n $f['c_text'] = html_parse($privat,\n htmlspecialchars($text));\n }\n \n // Attribute ergänzen und Nachricht schreiben\n $f['c_von_user'] = $u_name;\n $f['c_von_user_id'] = $u_id;\n $f['c_raum'] = $r_id;\n $f['c_typ'] = $typ;\n $f['c_farbe'] = $u_farbe;\n \n // Ist Raum moderiert? $ist_moderiert und $raum_einstellungen wurde in raum_ist_moderiert() gesetzt\n if (!$ist_moderiert) {\n \n // raum ist nicht moderiert -> schreiben.\n $back = schreibe_chat($f);\n \n // In Session merken, dass Text im Chat geschrieben wurde\n $query = \"UPDATE online SET o_timeout_zeit=DATE_FORMAT(NOW(),\\\"%Y%m%d%H%i%s\\\"), o_timeout_warnung='N' \"\n . \"WHERE o_user=$u_id\";\n $result = mysql_query($query, $conn);\n \n // Punkte berechnen und User gutschreiben\n // Punkte=Anzahl der Wörter mit mindestens 4 Buchstaben\n // Punkte werden nur in permanenten, offen Räumen gutgeschrieben!\n if ($communityfeatures && $u_level != \"G\"\n && ($raum_einstellungen['r_status1'] == \"O\"\n || $raum_einstellungen['r_status1'] == \"m\")\n && $raum_einstellungen['r_status2'] == \"P\") {\n \n // Punkte gutschreiben, wenn im Raum mindestens $punkte_ab_user User online sind\n $query = \"select count(o_id) from online where o_raum=$o_raum\";\n $result = mysql_query($query, $conn);\n \n if ($punktefeatures && $result\n && mysql_result($result, 0, 0)\n >= $punkte_ab_user) {\n // löscht die * und _ aus dem Eingabetext, damit es für z.b. *_*_ keine Punkte mehr gibt\n $punktetext = $f['c_text'];\n $punktetext = str_replace('<i>', '',\n $punktetext);\n $punktetext = str_replace('<b>', '',\n $punktetext);\n $punktetext = str_replace('</i>', '',\n $punktetext);\n $punktetext = str_replace('</b>', '',\n $punktetext);\n \n punkte(\n strlen(\n trim(\n preg_replace(\n '/(^[[:space:]]*|[[:space:]]+)[^[:space:]]+/',\n \"x\",\n preg_replace(\n '/(^|[[:space:]]+)[^[:space:]]{1,3}/',\n \" \", $punktetext)))),\n $o_id, \"\");\n \n unset($punktetext);\n }\n \n }\n \n } else {\n if ($u_level == \"M\") {\n \n // sonderfall: moderator -> hier doch schreiben\t\n // vorher testen, ob es markierte fragen gibt:\n schreibe_moderation();\n $back = schreibe_chat($f);\n \n // In Session merken, dass Text im Chat geschrieben wurde\n $query = \"UPDATE online SET o_timeout_zeit=DATE_FORMAT(NOW(),\\\"%Y%m%d%H%i%s\\\"), o_timeout_warnung='N' \"\n . \"WHERE o_user=$u_id\";\n $result = mysql_query($query, $conn);\n \n } else {\n \n if ($f['c_text'] != \"\") {\n // raum ist moderiert -> normal nicht schreiben.\n $back = schreibe_moderiert($f);\n \n // In Session merken, dass Text im Chat geschrieben wurde\n $query = \"UPDATE online SET o_timeout_zeit=DATE_FORMAT(NOW(),\\\"%Y%m%d%H%i%s\\\"), o_timeout_warnung='N' \"\n . \"WHERE o_user=$u_id\";\n $result = mysql_query($query, $conn);\n \n system_msg(\"\", 0, $u_id, $system_farbe,\n $t['moderiert2']);\n system_msg(\"\", 0, $u_id, $system_farbe,\n \"&gt;&gt;&gt; \" . $f['c_text']);\n }\n }\n }\n return ($back);\n }\n }\n } else {\n // user ist geknebelt...\n $zeit = gmdate(\"H:i:s\", $o_knebel);\n $txt = str_replace(\"%zeit%\", $zeit, $t['knebel6']);\n system_msg(\"\", $u_id, $u_id, $system_farbe, $txt);\n }\n \n }\n \n}", "function online_status($user_id) {\r\n\t\tglobal $userpro;\r\n\t\t$res = null;\r\n\t\tif (userpro_get_option('modstate_online')) {\r\n\t\t\tif ($userpro->is_user_online($user_id)) {\r\n\t\t\t\t$res = userpro_get_badge('online');\r\n\t\t\t} else {\r\n\t\t\t\t$res = userpro_get_badge('offline');\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $res;\r\n\t}", "public function updateLastLogin()\n {\n //update profile table\n $sql = 'UPDATE ' . TABLE_PREFIX . 'ac_user_profile\n SET up_datelastlogin = ?\n WHERE u_id = ?';\n\n $stmt = $this->db->query($sql, array(time(), $this->id));\n\n if ($stmt) {\n return true;\n } else {\n return false;\n }\n }", "public function chatMsgSend($fakeMember,$partnerMember,$textMsg) { \n \n $memBig = $fakeMember['big'];\n $fakeName = $fakeMember['name'];\n $fakeSurname = $fakeMember['surname'];\n $fakeMiddle = $fakeMember['middle'];\n $partnerBig = $partnerMember;\n $text = $textMsg;\n $relId = null;\n $checkinBig = null;\n $xfoto = null;\n //$pollo=$this->api['photo']; \n $newerThan = null;\n \n /*\n * Check if user is not in partners ignore list Find checkins -> because of status and checkin big Find ,potentially create member_rel If users are not checked in at the same place, they have to have a memberRel record (chat started based on previous conversation) Save to DB\n */\n \n // Check if user is not on partners ignore list\n $isIgnored = $this->ChatMessage->Sender->MemberSetting->isOnIgnoreListDual ( $partnerBig, $memBig );\n if ($isIgnored) {\n $this->_apiEr ( __('Non posso inviare il messaggio chat. L\\'Utente è stato bloccato.'), false, false, array (\n 'error_code' => '510' \n ) );\n }\n \n // Find valid checkin for member and partner\n //$memCheckin = $this->ChatMessage->Checkin->getCheckedinEventFor ( $memBig, TRUE );\n \n //$partnerCheckin = $this->ChatMessage->Checkin->getCheckedinEventFor ( $partnerBig, TRUE );\n \n // Find relationship in member_rels table\n $memRel = $this->ChatMessage->MemberRel->findRelationships ( $memBig, $partnerBig );\n \n //$frieRel = $this->Friend->FriendsRelationship ( $memBig, $partnerBig, 'A' );\n \n if (empty ( $memRel )) {\n // Create a new one\n $relationship = array (\n 'member1_big' => $memBig,\n 'member2_big' => $partnerBig \n );\n $this->ChatMessage->MemberRel->create();\n $this->ChatMessage->MemberRel->set( $relationship );\n try {\n $memRel = $this->ChatMessage->MemberRel->save();\n $relId = $memRel ['MemberRel'] ['id'];\n \n } catch ( Exception $e ) {\n $this->_apiEr ( __('Errore. Relazione non creata.') );\n }\n } else {\n $relId = $memRel ['MemberRel'] ['id'];\n }\n \n // Create chat message record\n $message = array (\n 'rel_id' => $relId,\n 'from_big' => $memBig,\n 'to_big' => $partnerBig,\n 'checkin_big' => $checkinBig,\n 'text' => $text,\n 'from_status' => 1, // from status = 1 (not deleted)\n 'to_status' => 1, // tp status = 1 (not deleted)\n 'created' => 'NOW()',\n 'status' => 1 \n // 'photo' => $hasphoto,\n );\n \n // $this->Model->getLastInsertId();\n $this->ChatMessage->create();\n $this->ChatMessage->set( $message );\n $msgId = null;\n $chatMsg = null;\n try {\n $res = $this->ChatMessage->save ();\n $result = ($res) ? true : false;\n /* $this->log(\"-------ChatMessages CONTROLLER-api_receive-----\");\n $this->log(\"id messaggio inserito = \".serialize($res[ChatMessage][id]));\n $this->log(\"--------------close api_receive----------------\");\n */ \n $msgId = $res ['ChatMessage'] ['id'];\n $pars = array (\n 'conditions' => array (\n 'ChatMessage.id' => $msgId \n ),\n 'fields' => array (\n 'ChatMessage.id',\n 'ChatMessage.rel_id',\n 'ChatMessage.created' \n ),\n 'recursive' => - 1 \n );\n \n \n $chatMsg = $this->ChatMessage->find ( 'first', $pars );\n \n \n } catch ( Exception $e ) {\n $this->_apiEr ( __('Errore. Messaggio non creato.') );\n }\n //$this->log(\"link photo = $photolink\");\n $this->ChatCache->write ( $partnerBig . '_last_msg', strtotime ( $chatMsg ['ChatMessage'] ['created'] ) );\n \n // Determine number of unread messages\n $unreadCount = $this->ChatMessage->getUnreadMsgCount ( $partnerBig );\n // debug($unreadCount);\n \n // Send push notifications\n $privacySettings=$this->PrivacySetting->getPrivacySettings($partnerBig);\n $privacySettings=$privacySettings[0]['PrivacySetting'];\n $notifyChatMessages=$privacySettings['notifychatmessages'];\n \n $goonPrivacy=true;\n $this->log(\"-------chatmessages----------\");\n $this->log(\"Settings \".serialize($privacySettings));\n $this->log(\"notifychatmessages \".intval($notifyChatMessages));\n if (count($privacySettings)>0)\n {\n if ($notifyChatMessages == 0)\n {\n $goonPrivacy=false;\n }\n }\n $this->log(\"goonPrivacy \".intval($goonPrivacy));\n if ($goonPrivacy)\n {\n $strLen = 50;\n \n $friendsRel=$this->Friend->FriendsRelationship($memBig, $partnerBig, 'A');\n if (count($friendsRel)>0){\n $name = $fakeName . (! empty ( $fakeMiddle ) ? ' ' . $fakeMiddle . ' ' : ' ') . $fakeSurname;\n } else {\n \n $name = $fakeName . ' '. strtoupper(substr( $fakeSurname, 0, 1 )) . '.'; \n \n }\n \n $msg = (strlen ( $text ) > $strLen + 4) ? substr ( $text, 0, $strLen ) . ($text [$strLen + 1] == ' ' ? ' ...' : '...') : $text;\n $this->PushToken->sendNotification ( $name, $msg, array (\n 'partner_big' => $memBig,\n 'created' => $chatMsg ['ChatMessage'] ['created'],\n 'rel_id' => $chatMsg ['ChatMessage'] ['rel_id'],\n 'msg_id' => $chatMsg ['ChatMessage'] ['id'],\n // 'timestamp' => time(),\n 'unread' => $unreadCount \n ), array (\n $partnerBig \n ), 'chat', 'new' );\n \n }\n // return chat messages like in the receive call with refresh enabled\n $newMsgs = $this->ChatMessage->findConversations ( $memBig, $partnerBig, null, $newerThan, 0, true );\n \n // Mark mesaages as read\n if (! empty ( $newMsgs ['chat_messages'] )) {\n $updated = $this->ChatMessage->markAsRead ( $memBig, $partnerBig );\n if (! $updated)\n CakeLog::warning ( 'Messages not marked as read. Membig ' . $memBig . ' Partner big ' . $partnerBig );\n /* $this->log(\"-------ChatMessages CONTROLLER-api_send-----\");\n $this->log(\"updated = $updated \");\n $this->log(\"WWWROOT =\".WWW_ROOT);\n $this->log(\"--------------close api_send----------------\");*/\n }\n \n $newMsgs['chat_messages'][count($newMsgs['chat_messages'])-1]['photo']=$this->FileUrl->chatmsg_picture($msgId);\n //print_r($newMsgs);\n /*if ($result !== false) {\n $this->Util->transform_name ( $chatMsg );\n $this->Util->transform_name ( $newMsgs );\n $this->_apiOk ( $chatMsg );\n $this->_apiOk ( $newMsgs );\n \n \n } else {\n $this->_apiEr ( __('Error occured. Message not sent.') );\n }\n */\n }", "public function isOnline()\n {\n if (!isset($this->_isOnline)) {\n $onlinehandler = xoops_gethandler('online');\n // $this->_isOnline = ($onlinehandler->getCount(new Criteria('online_uid', $this->getVar('uid', 'N'))) > 0) ? true : false;\n $this->_isOnline = $onlinehandler->getCount(new Criteria('online_uid', $this->getVar('uid', 'N'))) > 0;\n }\n return $this->_isOnline;\n }", "public function user_message($admin_id = '') {\n\t\t\t\n\n\t\t\t$this->page_data['page_name'] = \"user_message\";\n\t\t\t$this->page_data['page_title'] = \"User Message\";\n\t\t\t$this->page_data['page_view'] = \"home/user_message\";\n\n\n\t\t\t\n\t\t\t $admin_list = $this->user_model->get_user_list(\n\t\t\t \tarray('id', 'first_name', 'last_name', 'status', 'user_type', 'profile_photo_name', 'last_activity'),\n\t\t\t \t\"OBJECT\",\n\t\t\t \tarray('status' => 1, 'user_type' => 'ADMIN')\n\t\t\t );\n\t\t\t \n\t\t\t \n\t\t\t $this->page_data['admin_list'] = array();\n\t\t\t foreach($admin_list as $admin){\n\t\t\t // if(!has_role($admin->id, 'CHAT_READ')){\n\t\t\t array_push($this->page_data['admin_list'] , $admin);\n\t\t\t // }\n\t\t\t }\n\t\t\t \n\n\t\t\t /* get user address*/\n\t\t\t \n\t\t\t \t $user_id = ($this->session->userdata('user_id')) ? $this->session->userdata('user_id') : '';\n\t\t\t \t \n\t\t\t \t if($user_id != '' || $user_id != NULL){\n\t\t\t \t $this->page_data['user_info'] = $this->user_model->get_user_list(\n \t\t\t \tarray('id', 'first_name', 'last_name', 'status', 'user_type', 'profile_photo_name'),\n \t\t\t \t\"OBJECT\",\n \t\t\t \tarray('id' => $user_id )\n \t\t\t );\n\t\t\t \t }\n\t\t\t \t \n\n\t\t\t \t \n\t\t\t \t $user = $this->crud_model->get_user_chat_info_list(\n\t\t\t \t \t\"OBJECT\", \n\t\t\t \t \tarray('user_chat_info' => array('id', 'user_id', 'ip_address')),\n\t\t\t \t \tarray(\n\t\t\t \t \t\t// 'ip_address' => $this->getUserIpAddr(),\n\t\t 'user_id' => $user_id,\n\t\t\t \t )\n\t\t\t \t );\n\t\t\t\n\t\t\t \n\t\t\t \t \t \n \t\t\t \t if($user_id != '' || $user_id != NULL){\n\t \t \t \n \t\t\t $user_check = $this->crud_model->get_user_chat_info_list(\n \t\t\t \t \t\"OBJECT\", \n \t\t\t \t \tarray('user_chat_info' => array('id', 'user_id', 'ip_address')),\n \t\t\t \t \tarray(\n \t\t\t \t \t\t// 'ip_address' => $this->getUserIpAddr(),\n \t\t\t \t \t\t 'user_id' => $user_id,\n \t\t\t \t )\n \t\t\t \t );\n\t \t \t}else{\n\t \t \t $user_check = $this->crud_model->get_user_chat_info_list(\n \t\t\t \t \t\"OBJECT\", \n \t\t\t \t \tarray('user_chat_info' => array('id', 'user_id', 'ip_address')),\n \t\t\t \t \tarray(\n \t\t\t \t \t\t 'ip_address' => $this->getUserIpAddr(),\n \t\t\t \t \t\t 'user_id' => 0,\n \t\t\t \t )\n \t\t\t \t );\n\t \t \t}\n \t\t\t \t\n\t\t\t \n\t\t\t \t\t\n \t\t\t if($admin_id != '' || $admin_id != null){\n \t\t\t \t $this->page_data['selected_admin'] = $this->user_model->get_user_list(\n \t\t\t \tarray('id', 'first_name', 'last_name', 'status', 'user_type', 'profile_photo_name'),\n \t\t\t \t\"OBJECT\",\n \t\t\t \tarray('id' => $admin_id)\n \t\t\t )[0];\n\n\n\t \t \t\n\t\t\t \t \n\t\t\t\n\t\t\t \t \n\n\t\t\t \tif(isset($user_check[0])){\n\t\t\t \t \n\t\t\t \t /*update the unseen message*/\n\t\t\t \t $this->crud_model->update_admin_message_seen($user_check[0]->id, $admin_id);\n\t\t\t \t \n\t\t\t \t\t$this->page_data['user_messages'] = $this->crud_model->get_user_chat_messages(\n\t\t\t \t\t\t'OBJECT',\n\t\t\t \t\t\tarray('chat_message' => array('sender_id', 'receiver_id', 'chat_messages_text', 'chat_messages_status', 'chat_messages_datetime')),\n\t\t\t \t\t\tarray('sender_id' => $user_check[0]->id, 'receiver_id' => $admin_id)\n\t\t\t \t\t);\n\n\t\t\t \t}\n\t\t\t }\n\t\t\t \n\t\t\t \n\t\t\t \n\t\t\t \t \n\t\t\t \t /*get total unseen message*/\n\t\t\t \t \n\t\t\t \t if(isset($user_check[0])){\n\t\t\t \t $this->page_data['total_unseen_message'] = $this->crud_model->get_user_chat_messages(\n\t\t\t \t\t\t'COUNT',\n\t\t\t \t\t\tarray('chat_message' => array('sender_id', 'receiver_id', 'chat_messages_text', 'chat_messages_status', 'chat_messages_datetime')),\n\t\t\t \t\t\tarray('chat_messages_status' => 1, 'message_seen' => 0, 'sender_id' => $user_check[0]->id)\n\t\t\t \t\t);\n\t\t\t \t\t\n\t\t\t \t\t /* admin wise unseen message*/\n \t\t\t for($i = 0; $i < count($this->page_data['admin_list']); $i++){\n $this->page_data['admin_list'][$i]->message_count = $this->crud_model->get_user_chat_messages(\n \t\t\t \t\t\t'COUNT',\n \t\t\t \t\t\tarray('chat_message' => array('sender_id', 'receiver_id', 'chat_messages_text', 'chat_messages_status', 'chat_messages_datetime')),\n \t\t\t \t\t\tarray('chat_messages_status' => 1, 'message_seen' => 0, 'receiver_id' => $this->page_data['admin_list'][$i]->id, 'sender_id' => $user_check[0]->id)\n \t\t\t \t\t);\n \n }\n\t\t\t \t }\n\n\n\t\t\n\t\t\t\n\t\t\t$this->load->view('index', $this->page_data);\n\t\t}", "private function update_user_status(ConnectionInterface $conn, $params) {\n\t\tif(isset($params->user_id) && isset($params->status)) {\n\t\t\t\n\t\t\t//Update Status\n\t\t\tblock_gchat_update_user_status($params->user_id, $params->status);\n\t\t\t\n\t\t\t//Get online users for current user\n\t\t\t$users = block_gchat_get_online_users($params->user_id);\n\t\t\t\n\t\t\t//If Online\n\t\t\tif($params->status == 'online') {\n\t\t\t\t\n\t\t\t\t//Store Connection\n\t\t\t\t$this->connections[$conn] = $params->user_id;\n\t\t\t\tif(!isset($this->clients[$params->user_id])) {\n\t\t\t\t\t$this->clients[$params->user_id] = array();\n\t\t\t\t}\n\t\t\t\tarray_push($this->clients[$params->user_id], $conn);\n\t\t\t\t\n\t\t\t\t//Get user open sessions\n\t\t\t\t$sessions = block_gchat_get_all_open_sessions($params->user_id);\n\t\t\t\t\n\t\t\t\t//Send user all current online users and open sessions\n\t\t\t\t$params = array('users' => $users['online_users'], 'sessions' => $sessions);\n\t\t\t\t$this->send_data($conn, 'get_users_and_sessions', $params);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//Send other users the new user\n\t\t\t\t$params = array('users' => $users['current_user']);\n\t\t\t\t$this->send_data_multiple($users['online_users'], 'get_users_and_sessions', $params);\n\t\t\t}\n\t\t\t\n\t\t\t//If Offline\n\t\t\telse if($params->status == 'offline') {\n\t\t\t\t\n\t\t\t\t//Close Connection\n\t\t\t\tunset($this->connections[$conn]);\n\t\t\t\t$key = array_search($conn, $this->clients[$params->user_id]);\n\t\t\t\t$this->clients[$params->user_id][$key]->close();\n\t\t\t\tunset($this->clients[$params->user_id][$key]);\n\t\t\t\t\n\t\t\t\t//Tell other users that this user went offline\n\t\t\t\t$params = array('users' => $users['current_user']);\n\t\t\t\t$this->send_data_multiple($users['online_users'], 'remove_users', $params);\n\t\t\t}\n\t\t}\n\t}", "public function getLastActivity($user,$link){\n $st = $link -> prepare(\"SELECT * FROM mensajes_usr WHERE usr_id=:usr AND ingreso < SUBTIME(NOW(),'1:0:30')\");\n $st->bindParam(':usr',$user->getId());\n $st -> execute();\n $count = $st->rowCount();\n if ($count>0){\n return false;\n }else{\n return true;\n }\n }", "public function checkUpdate($name)\n {\n \n $settins_model= UserSettings::model()->findByAttributes(array('user_id'=>1));\n if($settins_model)\n {\n $zone_id= $settins_model->timezone;\n $timezone_model= Timezone::model()->findByPk($zone_id);\n if($timezone_model)\n {\n date_default_timezone_set($timezone_model->timezone);\n }\n }\n \n $status=0;\n $array_list= array();\n $id= Yii::app()->user->id;\n $model= $this->model()->findAllByAttributes(array('status'=>1));\n foreach ($model as $key=>$data)\n {\n $start_time= $data->start_time;\n $end_time= $data->end_time;\n $current_time= date('Y-m-d H:i:s');\n if($end_time>= $current_time && $current_time>=$start_time)\n {\n if(!preg_match('/\\b' . $name . '\\b/', $data->allowed_users))\n {\n $array_list[]=$data->id; \n }\n \n }\n }\n $user_login_status=1;\n if($array_list)\n {\n $id= $array_list[0];\n $model_message= SystemOfflineSettings::model()->findByPk($id);\n if($model_message)\n {\n Yii::app()->user->setState('offline_message',$model_message->offline_message);\n }\n $user_login_status=0;\n }\n \n return $user_login_status;\n }", "public function updateUserStatus($vUserCode, $vActive){\n $vUserCode = (int) $vUserCode;\n $vActive = (int) $vActive;\n\n if(IdEnSession::getSession('vSessionActiveUserName') == null){\n $vUserMod = 'system['.date('d.m.Y h:m:s').']';\n } else {\n $vUserMod = (string) IdEnSession::getSession('vSessionActiveUserName');\n }\n\n $vResultUpdateUserStatus = $this->vDataBase->prepare(\"UPDATE\n tb_easybilling_users\n SET tb_easybilling_users.n_active = :n_active,\n tb_easybilling_users.c_usermod = :c_usermod,\n tb_easybilling_users.d_datemod = NOW()\n WHERE tb_easybilling_users.n_coduser = :n_coduser;\")\n ->execute(\n array(\n ':n_active'=>$vActive,\n ':c_usermod'=>$vUserMod,\n ':n_coduser'=>$vUserCode\n )\n );\n return $vResultUpdateUserStatus;\n $vResultUpdateUserStatus->close();\n\t\t\t}", "public function testSetOffline()\n {\n $_userId = 5;\n $this->_startUsersOnline[0] = [\n 'uuid' => '5',\n 'user_id' => 5,\n 'logged_in' => 1,\n ];\n $this->Table->setOnline((string)$_userId, true);\n\n //* test if user is inserted\n $result = $this->Table->find()\n ->select($this->_fields)\n ->enableHydration(false)\n ->all()\n ->toArray();\n $expected = $this->_startUsersOnline;\n\n $time = $result[0]['time'];\n $this->assertGreaterThan(time() - 5, $time);\n unset($result[0]['time'], $time);\n\n $this->assertEquals($result, $expected);\n\n //= try to delete new user\n $this->Table->setOffline($_userId);\n $result = $this->Table->find()\n ->select($this->_fields)\n ->enableHydration(false)\n ->all()\n ->toArray();\n $expected = [];\n $this->assertEquals($result, $expected);\n }", "function user_in_chat_session($id)\n{\n\tglobal $db, $cache, $config;\n\n\t// Only get session data if the user was online $config['ajax_chat_session_refresh'] seconds ago\n\t$time_ago = time() - (int) $config['ajax_chat_session_refresh'];\n\t$sql = 'SELECT session_id\n\t\t\tFROM ' . AJAX_SHOUTBOX_SESSIONS_TABLE . '\n\t\t\tWHERE session_user_id = ' . $id . '\n\t\t\t\tAND session_time >= ' . $time_ago . '\n\t\t\tLIMIT 1';\n\t$result = $db->sql_query($sql);\n\tif (!$result)\n\t{\n\t\treturn false;\n\t}\n\tif ($row = $db->sql_fetchrow($result))\n\t{\n\t\treturn true;\n\t}\n\treturn false;\n}", "function UpdateUser($ID , $Nick, $Email){\t\n\t$EmailStatment = null;\n\t$NameStatment = null;\n\t$Commar=null;\n\t\n\tif($Nick!=null)$NameStatment = \" Nick='$Nick' \";\n if($Email!=null)$EmailStatment = \" Email='$Email' \";\n\tif($Nick!=null&&$Email!=null) $Commar = \" , \";\n\tif ($Nick==null&&$Email==null)return false;\n\t\n\t$result = get_mysql()->query(\"UPDATE Domtable SET\".$NameStatment.\"\".$Commar.\"\".$EmailStatment.\"WHERE Id=$ID\");\n\t\n\t\n\tif ($result>0){\n\treturn true;\n\t}\n\telse{\n\treturn false;\n\t}}", "public function setOnline($user, $online, $isOnline) {\n\t\tprint_r(['online', $user->id]);\n\t\t$message = json_encode([\n\t\t\t'type' => 'online',\n\t\t\t'user' => $user->toArray(),\n\t\t\t'is_online' => $isOnline,\n\t\t]);\n\n\t\t$dataEcoded = $this->encode($message);\n\t\tforeach ($online as $key => $connect) {\n\t\t\tif ($key != $user->id) {\n\t\t\t\tfwrite($connect, $dataEcoded);\n\t\t\t}\n\t\t}\n\t}", "function offline($name, $time = false)\n{\n\n for ($i = 0; $i < count($GLOBALS['users']); $i++) {\n if ($GLOBALS['users'][$i]['name'] == $name) {\n $GLOBALS['users'][$i]['online'] = false;\n if ($time) $GLOBALS['users'][$i]['time'] = $time;\n return true;\n }\n }\n\n add_user($name, false, $time);\n}", "private static function setAsRecent(): bool\n\t{\n\t\t$botId = self::getBotId();\n\t\tforeach (parent::getAdministrators() as $userId)\n\t\t{\n\t\t\t\\CIMMessage::GetChatId($userId, $botId);\n\n\t\t\t\\CAllIMContactList::SetRecent([\n\t\t\t\t'USER_ID' => $userId,\n\t\t\t\t'ENTITY_ID' => $botId,\n\t\t\t]);\n\t\t}\n\n\t\treturn true;\n\t}", "function SaveUser()\n {\n $tmp_db = new DB();\n $q = \"SELECT * FROM \".TblModUser.\" WHERE `sys_user_id`='\".$this->user_id.\"'\";\n $res = $this->db->db_Query( $q );\n if( !$res ) return false;\n $rows = $this->db->db_GetNumRows();\n //echo '<br>$q='.$q.'$rows='.$rows;\n\n $ip = $_SERVER['REMOTE_ADDR'];\n\n $long_ip = ip2long($ip);\n $q = \"SELECT * from `mod_stat_ip` WHERE `ip_from`<\".$long_ip.\" AND `ip_to`>\".$long_ip.\"\";\n $restmp = $tmp_db->db_Query( $q );\n //if( !$restmp ) return false;\n $rows_tmp = $tmp_db->db_GetNumRows();\n if($rows_tmp>0){\n $row_tmp = $tmp_db->db_FetchAssoc();\n //echo '<br>$q='.$q.' $rows_tmp='.$rows_tmp;\n $ip_ctry = $row_tmp['ctry'];\n }\n else $ip_ctry=NULL;\n\n\n if( $rows>0 ) //--- update\n {\n // echo $this->subscr;\n $Logon = new UserAuthorize();\n $q = \"UPDATE `\".TblModUser.\"` SET\n `name`='\".$this->name.\"',\n `country`='\".$this->country.\"',\n `adr`='\".$this->adr.\"',\n `city` = '\".$this->city.\"',\n `phone` = '\".$this->phone.\"',\n `phone_mob`='\".$this->phone_mob.\"',\n `fax`='\".$this->fax.\"',\n `www`='\".$this->www.\"',\n `subscr`='\".$this->subscr.\"',\n `user_status`='\".$this->user_status.\"',\n `state`='\".$this->state.\"',\n `aboutMe`='\".$this->aboutMe.\"',\n `discount`='\".$this->discount.\"'\n \";\n //if update make User (not adminitsrator), then save IP address of this user.\n if( $Logon->user_id==$this->user_id){\n $q = $q.\", `ip`='\".$ip.\"'\";\n if( !empty($ip_ctry) ) $q = $q.\", `ip_ctry`='\".$ip_ctry.\"'\";\n }\n if(isset($this->expertTitle)){\n $q.=\", `expertTitle`='\".$this->expertTitle.\"'\";\n }\n if(isset($this->ShowInTop) && $this->ShowInTop==1){\n $q.=\", `ShowInTop`='1'\";\n }else{\n $q.=\", `ShowInTop`='0'\";\n }\n if( isset($this->bonuses) ){\n $q = $q.\", `bonuses`='\".$this->bonuses.\"'\";\n }\n $q = $q.\" WHERE `sys_user_id`='\".$this->user_id.\"'\";\n //echo $q;die();\n }\n else //--- insert\n {\n $q = \"INSERT INTO `\".TblModUser.\"` SET\n `sys_user_id`='\".$this->user_id.\"',\n `name`='\".$this->name.\"',\n `country`='\".$this->country.\"',\n `adr`='\".$this->adr.\"',\n `city` = '\".$this->city.\"',\n `phone` = '\".$this->phone.\"',\n `phone_mob`='\".$this->phone_mob.\"',\n `fax`='\".$this->fax.\"',\n `www`='\".$this->www.\"',\n `subscr`='\".$this->subscr.\"',\n `user_status`='\".$this->user_status.\"',\n `ip`='\".$ip.\"',\n `state`='\".$this->state.\"',\n `aboutMe`='\".$this->aboutMe.\"',\n `discount`='\".$this->discount.\"'\n \";\n if( !empty($ip_ctry) ) $q = $q.\", `ip_ctry`='\".$ip_ctry.\"'\";\n if( isset($this->bonuses) ){\n $q = $q.\", `bonuses`='\".$this->bonuses.\"'\";\n }\n if(isset($this->ShowInTop) && $this->ShowInTop==1){\n $q.=\", `ShowInTop`='1'\";\n }else{\n $q.=\", `ShowInTop`='0'\";\n }\n if(isset($this->expertTitle)){\n $q.=\", `expertTitle`='\".$this->expertTitle.\"'\";\n }\n }\n $res = $this->db->db_Query( $q );\n //echo '<br>$q='.$q.' $res='.$res.' $this->db->result='.$this->db->result;echo \"rows=\".$rows;\n if( !$res OR !$this->db->result ) return false;\n return true;\n }", "public function updateUserStatus($id, $active){\r\n $stmt = $this->con->prepare(\"UPDATE usuario SET active = ? WHERE id=?\");\r\n $stmt->bind_param(\"ii\",$active,$id);\r\n $result = $stmt->execute();\r\n $stmt->close();\r\n if($result){\r\n return true;\r\n }\r\n return false;\r\n }", "function checkUserNameNumber ($ID,$lastActivity = NULL) {\n\t\t\t$query = \"SELECT Username, Level_access, advanceImage, Active, advancePreffix\n\t\t\t\t\t\tFROM users\n\t\t\t\t\t\tWHERE ID='$ID'\";\n\t\t\t$result = mysqli_query($conn, $query);\n\t\t\t$row = mysqli_fetch_array($result);\n\t\t\t$Username = $row['Username'];\n\t\t\t$Level_access = $row['Level_access'];\n\t\t\t$Active = $row['Active'];\n\t\t\t$advanceImage = $row['advanceImage'];\n\t\t\t$advancePreffix = $row['advancePreffix'];\n\t\t\tif($Active == 1)\n\t\t\t{\n\t\t\t\tif($lastActivity != NULL)\n\t\t\t\t{\n\t\t\t\t\t$title = ' title=\"last click on ' . date(\"l, F jS, Y, h:i a\",$lastActivity) . '\"';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$title = '';\n\t\t\t\t}\n\t\t\t\tif($advancePreffix != NULL || $advancePreffix != '')\n\t\t\t\t{\n\t\t\t\t\t$spanbefore = '<span style=\"\">';\n\t\t\t\t\t$spanafter = '</span>';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$spanbefore = '';\n\t\t\t\t\t$spanafter = '';\n\t\t\t\t}\n\t\t\t\t$link = '<a href=\"https://' . $_SERVER['HTTP_HOST'] . '/user/' . $Username . '\"' . $title . '>';\n\t\t\t\tif($Level_access == 1)\n\t\t\t\t{\n\t\t\t\t\t$fixedUsername = $spanbefore . '<img src=\"//animeftw.tv/images/admin-icon.png\" alt=\"Admin of AnimeFTW.tv\" style=\"vertical-align:middle;width:16px;\" border=\"0\" title=\"AnimeFTW.tv Administrator\" />' . $link . $Username . '</a>' . $spanafter;\n\t\t\t\t}\n\t\t\t\telse if($Level_access == 2)\n\t\t\t\t{\n\t\t\t\t\t$fixedUsername = $spanbefore . '<img src=\"//animeftw.tv/images/manager-icon.png\" alt=\"Group manager of AnimeFTW.tv\" style=\"vertical-align:middle;\" border=\"0\" title=\"AnimeFTW.tv Manager\" />' . $link . $Username . '</a>' . $spanafter;\n\t\t\t\t}\n\t\t\t\telse if($Level_access == 4 || $Level_access == 5 || $Level_access == 6)\n\t\t\t\t{\n\t\t\t\t\t// //animeftw.tv/images/staff-icon.png\n\t\t\t\t\t$fixedUsername = $spanbefore . '<img src=\"//animeftw.tv/images/staff-icon.png\" alt=\"Staff Member of AnimeFTW.tv\" style=\"vertical-align:middle;width:16px;\" border=\"0\" title=\"AnimeFTW.tv Staff Member\" />' . $link . $Username . '</a>' . $spanafter;\n\t\t\t\t}\n\t\t\t\telse if($Level_access == 7)\n\t\t\t\t{\n\t\t\t\t\t$fixedUsername = '<img src=\"//animeftw.tv/images/advancedimages/'.$advanceImage.'.png\" alt=\"Advanced User Title\" style=\"vertical-align:middle;\" border=\"0\" title=\"AnimeFTW.tv Advanced Member\" /><a href=\"/user/'.$Username.'\">'.$Username.'</a>';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$fixedUsername = '<a href=\"https://' . $_SERVER['HTTP_HOST'] . '/user/'.$Username.'\"' . $title . '>'.$Username.'</a>';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$fixedUsername = '<a href=\"https://' . $_SERVER['HTTP_HOST'] . '/user/'.$Username.'\"' . $title . '><s>'.$Username.'</s></a>';\n\t\t\t}\n\t\t\treturn $fixedUsername;\n\t\t\t}", "function check() {\n\tglobal $db,$nameColomn,$statueColomn,$emailColomn,$srcDB,$usersTable,$userIdColomn,$chatTable;\n\t/*$netStat=connection_status();\n\tif($netStat==0)//checking if the user is not connected to the net\n\t{\n\t\t$db->close();\n\t\tdie('net');\n\t}*/\n\n\t$q=\"SELECT `\".$nameColomn.\"`,`\".$statueColomn.\"`,`\".$emailColomn.\"` from `\".$srcDB.\"`.`\".$usersTable.\"` where \".$userIdColomn.\"='{$this->ref}' Limit 1\";\n\t$result=$db->query($q);\n\tif($result){\n\t\t$nameData=$db->retrieve_data($result);\n\t\t$rec=$nameData[0][$nameColomn];\n\t\t$statue=$nameData[0][$statueColomn];\n\t\t$senderEmail=$nameData[0][$emailColomn];\n\t}\n\tswitch($statue){\n\t\tcase'0':\n\t\t\tdie('offline');\n\t\tbreak;\n\t\tcase'2':\n\t\t\techo 'away';\n\t\tbreak;\n\t\tcase'3':\n\t\t\techo 'busy';\n\t\tbreak;\n\t}\n\t$oStat=$_SESSION['chatStat'];\n\tswitch($oStat){\n\t\tcase'0': //i'am offline\n\t\t\t$db->close();die('meoff');\n\t\tbreak;\n\t\tcase'1': // You are online / continue to prepare the query\n\t\t//case'2': // You will be right back /continue to prepare the query\n\t\t//case'3': // You are busy /continue to prepare the query\n\t\t\t$this->preGet_msgs($rec,$senderEmail);\n\t\tbreak;\n\t\tdefault: // no such user in our DB , this should not happen\n\t\t\t$db->close();die('mess');\n\t\tbreak;\n\t}\n}", "public function set_user_last_login() {\n $this->user_last_login = time();\n $this->update();\n// $query = sql::result(\"UPDATE `user` SET `user_last_login` = \".time().\" WHERE `userID` ='$this->userID' \");\n }", "public function testSetOnlineSuccess()\n {\n $_userId = 5;\n $this->_startUsersOnline[0] = [\n 'uuid' => '5',\n 'user_id' => 5,\n 'time' => (string)time(),\n 'logged_in' => true,\n ];\n $this->Table->setOnline((string)$_userId, true);\n\n $result = $this->Table->find()\n ->select($this->_fields)\n ->enableHydration(false)\n ->all()\n ->toArray();\n\n $timeTmpUser = $result[0]['time'];\n $this->_assertTimeIsNow($result[0]);\n\n $expected = $this->_startUsersOnline;\n unset($expected[0]['time']);\n $this->assertEquals($result, $expected);\n\n /// set anon user online\n $_userId = 'sessionIdTest';\n $this->_startUsersOnline[1] = [\n 'uuid' => substr(($_userId), 0, 32),\n 'user_id' => null,\n 'time' => (string)time(),\n 'logged_in' => 0,\n ];\n $this->Table->setOnline((string)$_userId, false);\n\n $result = $this->Table->find()\n ->select($this->_fields)\n ->enableHydration(false)\n ->all()\n ->toArray();\n $timeTmpAnon = $result[1]['time'];\n $this->_assertTimeIsNow($result[1]);\n $result = Hash::remove($result, '{n}.time');\n $expected = Hash::remove($this->_startUsersOnline, '{n}.time');\n $this->assertEquals($result, $expected);\n\n //// *** Second 1 *** - Table should not change.\n sleep(1);\n\n /// Update registered user before time.\n $_userId = 5;\n $this->Table->setOnline((string)$_userId, true);\n\n $result = $this->Table->find()\n ->select($this->_fields)\n ->enableHydration(false)\n ->all()\n ->toArray();\n $this->assertEquals($timeTmpUser, $result[0]['time']);\n $this->assertEquals($timeTmpAnon, $result[1]['time']);\n $result = Hash::remove($result, '{n}.time');\n $expected = Hash::remove($this->_startUsersOnline, '{n}.time');\n $this->assertEquals($result, $expected);\n\n /// Update anonymous user before time.\n $_userId = 'sessionIdTest';\n $this->Table->setOnline((string)$_userId, false);\n\n $result = $this->Table->find()\n ->select($this->_fields)\n ->enableHydration(false)\n ->all()\n ->toArray();\n $this->assertEquals($timeTmpUser, $result[0]['time']);\n $this->assertEquals($timeTmpAnon, $result[1]['time']);\n $result = Hash::remove($result, '{n}.time');\n $expected = Hash::remove($this->_startUsersOnline, '{n}.time');\n $this->assertEquals($result, $expected);\n\n //// *** Second 2 *** - Forces an table update.\n sleep(1);\n $this->Table->setOnlinePeriod(1);\n $this->Table->gc();\n\n /// update anonymous user after time\n $_userId = 'sessionIdTest';\n $this->_startUsersOnline = [];\n $this->_startUsersOnline[0] = [\n 'uuid' => substr(($_userId), 0, 32),\n 'user_id' => null,\n 'logged_in' => false,\n ];\n $this->Table->setOnline((string)$_userId, false);\n\n $result = $this->Table->find()\n ->select($this->_fields)\n ->enableHydration(false)\n ->all()\n ->toArray();\n\n $this->assertNotEquals($timeTmpAnon, $result[0]['time']);\n $this->_assertTimeIsNow($result[0]);\n\n $expected = $this->_startUsersOnline;\n $this->assertEquals($result, $expected);\n }", "public function add($id, $displayName = '', $status = 'I am new to TypeYa!', $location = '', $email = '', $phone = '') {\n\t\t\t// Create statement\n\t\t\t$statement = $this->database->getStatement('SELECT * FROM settings WHERE (id=?)');\n\n\t\t\t// Bind and execute statement\n\t\t\t$statement->bind_param('i', $id);\n\t\t\t$statement->execute();\n\n\t\t\t// Check database for user settings\n\t\t\tif($statement->get_result()->num_rows !== 0) {\n\t\t\t\treturn false;\t// Settings for user already exist\n\t\t\t}\n\n\t\t\tif(strlen($displayName) > 50) {\n\t\t\t\t$displayName = '';\n\t\t\t}\n\t\t\tif(strlen($status) > 140) {\n\t\t\t\t$status = '';\n\t\t\t}\n\t\t\tif(strlen($location) > 30) {\n\t\t\t\t$location = '';\n\t\t\t}\n\t\t\tif(strlen($email) > 100) {\n\t\t\t\t$email = '';\n\t\t\t}\n\t\t\tif(strlen($phone) > 20) {\n\t\t\t\t$phone = '';\n\t\t\t}\n\n\t\t\t// Validate e-mail address\n\t\t\tif(!preg_match(\"^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,3})$^\", $email)) {\n\t\t\t\t//E-Mail address isn't valid\n\t\t\t \t$email = '';\n\t\t\t}\n\n\t\t\t// TODO Check phone number\n\n\t\t\t//Other settings\n\t\t\t$lastSeen = date(\"Y-m-d H:i:s\", time());\n\t\t\t$lastOnline = $lastSeen;\n\t\t\t$online = 0;\n\n\t\t\t// Create statement\n\t\t\t$statement = $this->database->getStatement('INSERT INTO settings (id,display_name,status,location,last_seen,last_online,online,email,phone) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?)');\n\n\t\t\t// Bind and execute\n\t\t\t$statement->bind_param('isssssiss', $id, $displayName, $status, $location, $lastSeen, $lastOnline, $online, $email, $phone);\n\t\t\tif($statement->execute()) {\n\t\t\t\treturn true;\t// User settings created\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn false;\t// Error\n\t\t\t}\n\t\t}", "public function update_users($chatId,$input1,$nama_update,$kontak_update,$kelompok_update,$level,$where_kontak){\n $kontak_pengirim =str_replace('@c.us','',$chatId);\n require_once 'users.php';\n $users = new users();\n $res2 = $users->get_users($kontak_pengirim);\n // $nama_pengirim =$res2['nama'];\n $level_user =$res2['level']; \n//cek level kontak\n// jika level 1 level=1 else level=2\n// $level_user=2; \nif($level_user==1){\n $level_update=$level;\n $where_kontak_update=$where_kontak;\n}else{\n $level_update=2;\n $where_kontak_update=str_replace('@c.us','',$chatId);\n}\n$result = $users->update($nama_update,$kontak_update,$kelompok_update,$level_update,$where_kontak_update);\nif($result){\n $this->sendMessage($chatId,\n \"--------------------------------------------------------\\n\". \n \"--------------------------------------------------------\\n\". \n \" \".$chatId.\" \\n\".\n \"UPDATE \".$input1.\" \\n\".\n // \"SET \".$input3.\" \\n\".\n \"NAMA \".$nama_update.\" \\n\".\n \"KONTAK \".$kontak_update.\" \\n\".\n \"KELOMPOK \".$kelompok_update.\" \\n\".\n \"LEVEL \".$level_update.\" \\n\".\n \"NO_KONTAK_UPDATE \".$where_kontak_update.\" \\n\".\n \"--------------------------------------------------------\"\n );\n \n}else{\n $this->sendMessage($chatId,\n \"--------------------------------------------------------\\n\". \n \"GAGAL UPDATE \\n\".\n \"--------------------------------------------------------\"\n );\n}\n \n }", "function saveMessage()\n\t{\n\t\t$db = e107::getDb('nodejs_chatbox');\n\t\t$tp = e107::getParser();\n\t\t$ip = e107::getIPHandler()->getIP(false);\n\n\t\tif(!USER && isset($_POST['nickname']))\n\t\t{\n\t\t\t$nick = 0 . '.' . trim(preg_replace(\"#\\[.*\\]#si\", \"\", $tp->toDB($_POST['nickname'])));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$nick = USERID . '.' . USERNAME;\n\t\t}\n\n\t\t$cb_message = $_POST['message'];\n\t\t$cb_message = preg_replace(\"#\\[.*?\\](.*?)\\[/.*?\\]#s\", \"\\\\1\", $cb_message);\n\n\t\t$insert = array(\n\t\t\t'ncb_id' => 0,\n\t\t\t'ncb_nick' => $nick,\n\t\t\t'ncb_message' => $cb_message,\n\t\t\t'ncb_datestamp' => time(),\n\t\t\t'ncb_blocked' => 0,\n\t\t\t'ncb_ip' => $ip,\n\t\t);\n\n\t\t$result = $db->insert(\"nodejs_chatbox\", $insert);\n\n\t\t// BC. Set values for triggering v1 \"cboxpost\" event.\n\t\t// TODO: remove these elements after removed old event triggering\n\t\t$insert['cmessage'] = $cb_message;\n\t\t$insert['ip'] = $ip;\n\n\t\t// If user is logged in, we update user info.\n\t\tif(USER)\n\t\t{\n\t\t\t$db->gen('UPDATE #user SET user_chats=user_chats+1, user_lastpost=' . $insert['ncb_datestamp'] . ' WHERE user_id=' . USERID);\n\t\t}\n\n\t\tif($result)\n\t\t{\n\t\t\t// Get last inserted id.\n\t\t\t$insert['ncb_id'] = $result;\n\n\t\t\t$event = e107::getEvent();\n\t\t\t// BC. Trigger old, v1 event.\n\t\t\t// TODO: remove old event triggering?\n\t\t\t$event->trigger('cboxpost', $insert);\n\t\t\t// Trigger new event.\n\t\t\t// TODO: finalize new event name.\n\t\t\t$event->trigger('nodejs_chatbox_message_insert', $insert);\n\n\t\t\t// Clear cache.\n\t\t\t$cache = e107::getCache();\n\t\t\t$cache->clear('nodejs_chatbox');\n\n\t\t\t// If the request is an Ajax request, we prepare the response.\n\t\t\tif(e_AJAX_REQUEST || isset($_POST['ncb_sent_ajax']))\n\t\t\t{\n\t\t\t\t$message = array(\n\t\t\t\t\t'status' => 'ok',\n\t\t\t\t\t'message' => $this->getMessage($insert['ncb_id']),\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$message = array(\n\t\t\t\t'status' => 'error',\n\t\t\t\t'message' => LAN_NCB_FRONT_08,\n\t\t\t);\n\t\t}\n\n\t\t// If the request is an Ajax request, we echos response.\n\t\tif(isset($message) && (e_AJAX_REQUEST || isset($_POST['ncb_sent_ajax'])))\n\t\t{\n\t\t\techo json_encode($message);\n\t\t\texit;\n\t\t}\n\t}", "function initUser( $mUser, $autocreate = false ) {\n\t\tglobal $wgAuth;\n\n\t\t$mUser->addToDatabase();\n\n\t\tif ( $wgAuth->allowPasswordChange() ) {\n\t\t\t$mUser->setPassword( $this->mPassword );\n\t\t}\n\n\t\t$mUser->setEmail( $this->mEmail );\n\t\t$mUser->setRealName( $this->mRealName );\n\t\t$mUser->setToken();\n\n\t\t$wgAuth->initUser( $mUser, $autocreate );\n\n\t\tif ( $this->mExtUser ) {\n\t\t\t$this->mExtUser->linkToLocal( $mUser->getId() );\n\t\t\t$email = $this->mExtUser->getPref( 'emailaddress' );\n\t\t\tif ( $email && !$this->mEmail ) {\n\t\t\t\t$mUser->setEmail( $email );\n\t\t\t}\n\t\t}\n\n\t\t$mUser->setOption( 'rememberpassword', $this->mRemember ? 1 : 0 );\n\t\t$mUser->saveSettings();\n\n\t\t# Update user count\n\t\t$ssUpdate = new SiteStatsUpdate( 0, 0, 0, 0, 1 );\n\t\t$ssUpdate->doUpdate();\n\n $this->addToSourceTracking( $mUser );\n\n\t\treturn $mUser;\n\t}", "function SendMessage( $FromUser_Id, $Conversation_Id, $Message ){\n\n\t// sanity checks.\n\tif( ! is_int( $FromUser_Id ) || ! is_int( $Conversation_Id ) || 0 == strlen( $Message ) )\n\t\treturn( \"Param error: FromUser_Id / Conversation_Id / Message - wrong type or empty.\" );\n\t\t\n\t// ensure the FromUser_Id is actually in the Conversation_Id\n\tif( ! SelfInConversationId( $FromUser_Id, $Conversation_Id ) )\n\t\treturn( \"Error: ! SelfInConversationId()\" );\n\n\t// if message is too long (>MAX_MSG_LEN), truncate\n\tif( MAX_MSG_LEN < strlen( $Message ) )\n\t\t$Message = substr( $Message, 0, MAX_MSG_LEN );\n\t\t\n\t$Message = mysql_real_escape_string( $Message );\n\t$Sql = \"INSERT INTO ChatMessages (Id,FromUser_Id,Conversation_Id,Message,DateSent) VALUES(NULL,$FromUser_Id,$Conversation_Id,'$Message',NOW())\";\n\tmysql_query( $Sql );\n\t$errno = mysql_errno();\n\tif( 0 != $errno )\n\t\treturn( \"mysql error: $errno\" );\n\t\t\n\t// message sent\n\treturn( true );\n}", "function users_online_live(){\n if(isset($_GET['onlineusers'])){\n global $connection;\n\n if(!$connection){\n session_start();\n include(\"../includes/db.php\");\n\n $session = session_id();\n $time = time();\n $time_out_in_second = 20;\n $time_out = $time - $time_out_in_second;\n\n $query = \"SELECT * FROM users_online WHERE session ='{$session}';\";\n $send_query = mysqli_query($connection, $query);\n confirm_query($send_query);\n $count = mysqli_num_rows($send_query);\n\n if($count == NULL){\n $query = \"INSERT INTO users_online (session, time) VALUES ('{$session}', '{$time}');\";\n $if_count_null_query = mysqli_query($connection, $query);\n confirm_query($if_count_null_query);\n } else {\n $query = \"UPDATE users_online SET time = '{$time}' WHERE session ='{$session}';\";\n $if_count_exists_query = mysqli_query($connection, $query);\n confirm_query($if_count_exists_query);\n }\n\n $users_online_query = mysqli_query($connection, \"SELECT * FROM users_online WHERE time > {$time_out};\");\n confirm_query($users_online_query);\n echo $count_user = mysqli_num_rows($users_online_query);\n }\n }\n}", "function add_chat_message($sender_id,$receiv_id,$message){\r\n\t\t\t\t\t\r\n\t\t\t\t\t $query_str=\"insert into user_chat ( sender_id, receiv_id ,message,receiv_seen,sender_seen ) values ( ?,? ,?,?,?) \";\r\n\t\t\t\t $result=$this->db->query($query_str, array($receiv_id,$sender_id,$message,0,1));\r\n\t\t\t\tif($result){\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t}", "public function ban_user() {\n\tif ( !is_numeric($this->id) || (int)$this->id <= 0) return false;\n\t$sql = \"UPDATE `users` SET `active`=0 WHERE `id`={$this->id} LIMIT 1\";\n\t$this->db->query($sql);\n\treturn true;\n }", "function setOnline($online) { $this->online = $online; }", "public function setTooShortUsernameMessage() {\n\t\t$this->message = 'Username has too few characters, at least 3 characters.<br />';\n\t}", "public function actionGetOnlineStatus() {\n header('Content-Type: text/event-stream');\n header('Cache-Control: no-cache');\n\n $user_name = $_GET['user'];\n json_decode($user_name);\n\n $user = Users::findByUsername($user_name);\n\n $timeFromLastConnection = time() - strtotime($user->last_connection);\n\n if ($timeFromLastConnection < 10) {\n echo \"data: (online)\\n\\n\";\n } else {\n $last_seen_time = date($user->last_connection);\n echo \"data: (offline. last seen $last_seen_time)\\n\\n\";\n }\n flush();\n }", "function SetNowUserInfo($User_id, $User_password, $Re_user_password) {\n //Check the parameters\n if (empty($User_id) || empty($User_password) || empty($Re_user_password)) {\n $data['status'] = 0;\n $data['message'] = 'Failed to modify user information, the parameters are incomplete or wrong';\n return $data;\n }\n if ($User_password != $Re_user_password) {\n $data['status'] = 0;\n $data['message'] = 'Failed to modify user information, the password is inconsistent';\n return $data;\n }\n //opration\n $this->database_medoo->update(\"User\", [\n \"User_password\" => $User_password\n ], [\n \"User_id\" => $User_id\n ]);\n //return\n $data['status'] = 1;\n $data['message'] = 'Successfully modify user information';\n return $data;\n }", "function count_unseen_message($from_user_id, $to_user_id, $connect)\r\n {\r\n //query to return unseen message details\r\n // status = 1 means message is unseen by receiver user\r\n $query = \"\r\n SELECT * FROM chat_message \r\n WHERE from_user_id = '$from_user_id' \r\n AND to_user_id = '$to_user_id' \r\n AND status = '1'\r\n \";\r\n // make query fro exxecution\r\n $statement = $connect->prepare($query);\r\n // execute select query\r\n $statement->execute();\r\n // store the number of affected rows\r\n $count = $statement->rowCount();\r\n // notification message\r\n $output = '';\r\n // if there is unread message\r\n if ($count > 0) {\r\n // update notification message to be displayed\r\n $output = '<span class=\"label label-success\">' . $count . '</span>';\r\n }\r\n return $output;\r\n }", "function i_db_update_activetime($uid)\n{\n $User = M(\"UserStatus\");\n $recordUserStatus = $User->where(\"uid = $uid\")->find();\n $timeAdd = time() - $recordUserStatus['last_active_ti'];\n if ($timeAdd > 999) {\n $timeAdd = 0;\n }\n $data['total_active_ti'] = $recordUserStatus['total_active_ti'] + $timeAdd;\n $data['last_active_ti'] = time();\n $data['acquire_seconds'] = 1500;\n $data['acquire_times'] = 5;\n return $User->where(\"uid = $uid\")->save($data);\n}" ]
[ "0.69793886", "0.6463549", "0.63666624", "0.6331217", "0.63227874", "0.58146614", "0.56441116", "0.5603898", "0.5565253", "0.5540828", "0.5502774", "0.5479328", "0.5467102", "0.5457726", "0.54563564", "0.5440825", "0.53754884", "0.53663486", "0.5337671", "0.5337207", "0.5329152", "0.53150934", "0.52946556", "0.52896667", "0.5267571", "0.52626705", "0.52582765", "0.525275", "0.5242855", "0.52255213", "0.5220256", "0.52188534", "0.5213803", "0.5208712", "0.5195264", "0.51914185", "0.51834905", "0.51782495", "0.51750076", "0.516449", "0.5157511", "0.5149716", "0.5143115", "0.5133122", "0.5127027", "0.51242584", "0.5124154", "0.5110829", "0.51108104", "0.5105285", "0.5078852", "0.5071547", "0.505435", "0.5046229", "0.50440586", "0.50365376", "0.5031802", "0.5012958", "0.50110626", "0.4994573", "0.49891242", "0.49872917", "0.49752796", "0.49717042", "0.4957198", "0.49443474", "0.4941753", "0.49385202", "0.49316153", "0.4927482", "0.49256268", "0.49231356", "0.49199226", "0.49105045", "0.4909964", "0.49004698", "0.49003378", "0.4899978", "0.48876148", "0.4871125", "0.48632327", "0.48628962", "0.48622924", "0.48577282", "0.48547405", "0.4853682", "0.4851282", "0.4850737", "0.48487228", "0.4844716", "0.48439038", "0.48430383", "0.4841748", "0.484055", "0.4836738", "0.483241", "0.482714", "0.48253912", "0.48182726", "0.48150432" ]
0.75224644
0
set a user to offline by removing the record from the ChatOnlineUsers table Params: User_Id the user id of who to set offline returns: true on success, or an errormsg string on error
Установить пользователя в оффлайн-состояние, удалив запись из таблицы ChatOnlineUsers Параметры: User_Id идентификатор пользователя, которого нужно установить в оффлайн-состояние Возвращает: true при успешном выполнении, или строку с сообщением об ошибке в случае ошибки
function SetUserOffline( $User_Id ){ if( empty( $User_Id ) || ! is_int( $User_Id ) ) return( "Param error: User_Id - wrong type or empty." ); $Sql = "UPDATE User SET IsOnlineChat = 0, LastActiveChat = NOW() WHERE Id = $User_Id LIMIT 1"; mysql_query( $Sql ); $errno = mysql_errno(); if( 0 != $errno ) return( "mysql error: $errno" ); // user is now offline return( true ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SetUserOnline( $User_Id ){\n\t\n\tif( empty( $User_Id ) || ! is_int( $User_Id ) )\n\t\treturn( \"Param error\" );\n\t$Sql = \"UPDATE User SET IsOnlineChat = 1, LastActiveChat = NOW() WHERE Id = $User_Id LIMIT 1\";\n\tmysql_query( $Sql );\n\t$errno = mysql_errno();\n\tif( 0 != $errno )\n\t\treturn( \"mysql error: $errno\" );\n\t// user is now online\n\treturn( true );\n\t\n}", "public function offline($user_id){\n\t\tglobal $base;\n\t\t$clean_user = $this->user_id = $base->clear_string($user_id);\n\t\t$sql = \"UPDATE users SET status = '0' WHERE user_id = '{$clean_user}'\";\n\t\t$base->select_table($sql);\n\t}", "function setUsersOffline() {\n\t\t$this->mdb->query(\"UPDATE gameUser SET isOnline = 0, lobbyId = 0 WHERE lastOnline < (NOW() - INTERVAL 10 MINUTE) AND isOnline != 0\");\n\t}", "public function testSetOffline()\n {\n $_userId = 5;\n $this->_startUsersOnline[0] = [\n 'uuid' => '5',\n 'user_id' => 5,\n 'logged_in' => 1,\n ];\n $this->Table->setOnline((string)$_userId, true);\n\n //* test if user is inserted\n $result = $this->Table->find()\n ->select($this->_fields)\n ->enableHydration(false)\n ->all()\n ->toArray();\n $expected = $this->_startUsersOnline;\n\n $time = $result[0]['time'];\n $this->assertGreaterThan(time() - 5, $time);\n unset($result[0]['time'], $time);\n\n $this->assertEquals($result, $expected);\n\n //= try to delete new user\n $this->Table->setOffline($_userId);\n $result = $this->Table->find()\n ->select($this->_fields)\n ->enableHydration(false)\n ->all()\n ->toArray();\n $expected = [];\n $this->assertEquals($result, $expected);\n }", "function online_set_user_offline($userid, $flag){\n\t\t$pri_msg=pack(\"Ll\",$userid ,$flag );\n\t\t$sendbuf=$this->park(\"EA61\", 0 , $pri_msg);\n\t\treturn $this->unpark($this->sock->sendmsg($sendbuf),\"\");\n\t}", "public function markUserAsUnsynced($userId){ \n $userRow = \\R::findOrCreate($this->_name,array(\"users_id\"=>$userId));\n $userRow->ams_sync_status = 0;\n $userRow->amt_sync_status = 0;\n $userRow->dmb_sync_status = 0;\n \n try{\n $this->_redBeans->store($userRow);\n \n// //lets send ipn to all clients\n// $objIpnHandler = new ipn\\IpnHandler();\n// $objIpnHandler->sendIpnForUpdatedUser($userId);\n return true;\n \n }\n catch(\\Exception $ex){\n return false;\n } \n return false;\n \n }", "function SetUser_OnLine_LastLogin($UserId){\n\t\t\t$updateUseronline = array ('last_login'=> strtotime(date('Y-m-d H:i:s')));\n\t\t\t$this->db->where('user_id',$UserId);\n\t\t\t$this->db->update('Registration',$updateUseronline);\n\t\t}", "function clearChallengesWithOfflineUser() {\n\t\t$this->mdb->query(\"DELETE c FROM challenge as c LEFT OUTER JOIN gameUser as g \n\t\t\tON (g.username = c.gameUser1Id OR g.username = c.gameUser2Id) WHERE g.isOnline = 0\");\n\t}", "function switch_set_user_offline($userid, $flag){\n\t\t$pri_msg=pack(\"Ll\",$userid ,$flag );\n\t\t$sendbuf=$this->park(\"F618\", 0 , $pri_msg);\n\t\treturn $this->sock->sendmsg_without_returnmsg($sendbuf);\n\t}", "public function disconnectUser($id) {\n $stmt = $this->db->prepare(\"UPDATE User SET Connected = 0 WHERE ID = :id\");\n $stmt->bindParam(\":id\", $id);\n $stmt->execute();\n }", "public function deactivateUser($id){\n if($user = Users::find($id)){\n // New data\n $user->status = 0;\n try{\n // Save\n $check = $user->save();\n if ($check)\n return true;\n $this->setErrors('can\\'t added to DB');\n return false;\n }catch (QueryException $e){\n $this->setErrors('update Users QueryException');\n return false;\n }\n }\n $this->setErrors('Users Not Found to be update');\n return false;\n }", "function UserOnlineUpdate()\r\n\t{\r\n\t\t$expire = time() + (60 * 10);\r\n\t\t$sql = $GLOBALS['db']->Query(\"DELETE FROM \" . PREFIX . \"_modul_forum_useronline WHERE expire <= '\" . time() . \"'\");\r\n\r\n\t\tif(isset($_SESSION['cp_benutzerid']))\r\n\t\t{\r\n\t\t\t$sql = $GLOBALS['db']->Query(\"SELECT Id FROM \" . PREFIX . \"_modul_forum_userprofile WHERE BenutzerId = '\".$_SESSION['cp_benutzerid'].\"'\");\r\n\t\t\t$num = $sql->numrows();\r\n\r\n\t\t\t// Wenn der Benutzet noch nicht im Forum-Profil gespeichert wurde,\r\n\t\t\t// wird dies hier getan\r\n\t\t\tif(!$num)\r\n\t\t\t{\r\n\t\t\t\t$sql = $GLOBALS['db']->Query(\"SELECT * FROM \" . PREFIX . \"_users WHERE Id = '\".$_SESSION['cp_benutzerid'].\"'\");\r\n\t\t\t\t$row = $sql->fetchrow();\r\n\r\n\t\t\t\t$q = \"INSERT INTO \" . PREFIX . \"_modul_forum_userprofile\r\n\t\t\t\t(\r\n\t\t\t\t\tId,\r\n\t\t\t\t\tBenutzerId,\r\n\t\t\t\t\tBenutzerName,\r\n\t\t\t\t\tGroupIdMisc,\r\n\t\t\t\t\tBeitraege,\r\n\t\t\t\t\tZeigeProfil,\r\n\t\t\t\t\tSignatur,\r\n\t\t\t\t\tIcq,\r\n\t\t\t\t\tAim,\r\n\t\t\t\t\tSkype,\r\n\t\t\t\t\tEmailempfang,\r\n\t\t\t\t\tPnempfang,\r\n\t\t\t\t\tAvatar,\r\n\t\t\t\t\tAvatarStandard,\r\n\t\t\t\t\tWebseite,\r\n\t\t\t\t\tUnsichtbar,\r\n\t\t\t\t\tInteressen,\r\n\t\t\t\t\tEmail,\r\n\t\t\t\t\tRegistriert,\r\n\t\t\t\t\tGeburtsTag\r\n\t\t\t\t) VALUES (\r\n\t\t\t\t\t'',\r\n\t\t\t\t\t'$row->Id',\r\n\t\t\t\t\t'\". (($row->UserName!='') ? $row->UserName : substr($row->Vorname,0,1) . '. ' . $row->Nachname) . \"',\r\n\t\t\t\t\t'',\r\n\t\t\t\t\t'',\r\n\t\t\t\t\t'1',\r\n\t\t\t\t\t'',\r\n\t\t\t\t\t'',\r\n\t\t\t\t\t'',\r\n\t\t\t\t\t'',\r\n\t\t\t\t\t'1',\r\n\t\t\t\t\t'1',\r\n\t\t\t\t\t'',\r\n\t\t\t\t\t'',\r\n\t\t\t\t\t'',\r\n\t\t\t\t\t'0',\r\n\t\t\t\t\t'',\r\n\t\t\t\t\t'$row->Email',\r\n\t\t\t\t\t'$row->Registriert',\r\n\t\t\t\t\t'$row->GebTag'\r\n\t\t\t\t)\";\r\n\t\t\t\t$GLOBALS['db']->Query($q);\r\n\t\t\t\theader(\"Location:index.php?module=forums\");\r\n\t\t\t}\r\n\r\n\t\t\t$sql = $GLOBALS['db']->Query(\"SELECT ip FROM \" . PREFIX . \"_modul_forum_useronline WHERE ip='\" . $_SERVER['REMOTE_ADDR'] . \"' limit 1\");\r\n\t\t\t$num = $sql->numrows();\r\n\r\n\t\t\tif ($num < 1)\r\n\t\t\t\t$sql = $GLOBALS['db']->Query(\"INSERT INTO \" . PREFIX . \"_modul_forum_useronline (ip,expire,uname,invisible) VALUES ('\" . $_SERVER['REMOTE_ADDR'] . \"','$expire','\" . (defined(\"USERNAME\") ? USERNAME : \"UNAME\") . \"','\" . (defined(\"USERNAME\") ? $this->getInvisibleStatus($_SESSION['cp_benutzerid']) : \"INVISIBLE\") . \"')\");\r\n\t\t\t else\r\n\t\t\t\t$sql = $GLOBALS['db']->Query(\"UPDATE \" . PREFIX . \"_modul_forum_useronline set uid = '\" . $_SESSION['cp_benutzerid']. \"', uname='\" . (defined(\"USERNAME\") ? USERNAME : \"UNAME\") . \"', invisible = '\" . (defined(\"USERNAME\") ? $this->getInvisibleStatus($_SESSION['cp_benutzerid']) : \"INVISIBLE\") . \"' WHERE ip='\" . $_SERVER['REMOTE_ADDR'] . \"'\");\r\n\t\t} else {\r\n\t\t\t$sql = $GLOBALS['db']->Query(\"SELECT ip FROM \" . PREFIX . \"_modul_forum_useronline WHERE ip='\" . $_SERVER['REMOTE_ADDR'] . \"' limit 1\");\r\n\t\t\t$num = $sql->numrows();\r\n\t\t\tif ($num < 1)\r\n\t\t\t\t$sql = $GLOBALS['db']->Query(\"INSERT INTO \" . PREFIX . \"_modul_forum_useronline (ip,expire,uname,invisible) VALUES ('\" . $_SERVER['REMOTE_ADDR'] . \"','$expire','UNAME','0')\");\r\n\t\t}\r\n\t}", "function unlockUser($user_id) {\r\n $this->User->id = $user_id;\r\n if ($this->User->save(array(\r\n \"User\" => array(\r\n \"Status\" => User::_STATUS_NORMAL,\r\n )\r\n ))) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "public function setLastOnline()\n {\n $user = $this->getUser(false);\n \n if ($user === null) {\n return;\n }\n \n // 1 hour timeout so we are not constantly updating this user\n $timeout = time() - (60 * 60);\n \n if ($user->getLastOnline() < $timeout) {\n $user->setLastOnline(time());\n $this->em->persist($user);\n $this->em->flush();\n }\n }", "public function disableUser($id){\n global $db;\n $query = \"UPDATE tbl_user SET status = '1' WHERE id = '$id'\";\n $update_row = $db->update($query);\n if ($update_row) {\n $msg = \"<span class='success'>User Disabled !</span>\";\n return $msg;\n }else{\n $msg = \"<span class='error'>User Not Disabled !</span>\";\n return $msg;\n }\n }", "function offline($name, $time = false)\n{\n\n for ($i = 0; $i < count($GLOBALS['users']); $i++) {\n if ($GLOBALS['users'][$i]['name'] == $name) {\n $GLOBALS['users'][$i]['online'] = false;\n if ($time) $GLOBALS['users'][$i]['time'] = $time;\n return true;\n }\n }\n\n add_user($name, false, $time);\n}", "public function online_status($user_id) {\n $updated = ['online_status' => 1];\n\n DB::table('users')->where('id', $user_id)->update($updated);\n }", "function flagLoggedOut( $idUser )\n\t{\n //echo \"In flagLoggedOut\";\n assert( is_object( $idUser ) );\n assert( isset( $this->db) );\n $bSuccess = FALSE;\n \n if( $this->db )\n {\n $users = $this->db->selectCollection( \"users\" );\n $filter = array( \"_id\" => $idUser ); \n $update = array( '$set' => array( \"isLoggedIn\" => false ) );\n $bSuccess = $users->update( $filter, $update ); \n } \n\t\treturn $bSuccess;\n\n\t}", "public function deactivateAccount(){\n $userid = $this->input->post('userId');\n $data = $this->dbUpdate('user',array('status'=>0),array('userId'=>$userid));\n if($data){\n return true;\n }else{\n return false;\n }\n \n }", "public function destroy(){\n User::where('id', Auth::user()->id)->update(['online' => 0]);\n\n Auth::logout();\n return redirect()->action('LobbyController@showGuestLobby');\n \n }", "public function setOnline(){\n\t\t\t$time = time() + 900;\n\t\t\tif(\\Auth::check())\n\t\t\t\tUser::find(\\Auth::user()->id_user)->update([\n\t\t\t\t\t'time_online' => $time\n\t\t\t\t]);\n\t\t}", "public function ClearOfflineUsers($offset = 0)\n\t{\n\t\t$timeout = UserTimeout($offset);\n\t\t$query = new MMQueryBuilder();\n\t\t$query->Update(\"`online`\")->Columns(array(\"`online`\" => \"'0'\"))->Where(\"`lastvisit` < '%s' AND `online` = '1'\", $timeout)->Build();\n\t\t$this->db->query($query, DBNAME);\n\t}", "public function online($user_id){\n\t\tglobal $base;\n\t\t$clean_user = $this->user_id = $base->clear_string($user_id);\n\t\t$ip = getenv('HTTP_CLIENT_IP') ? : getenv('HTTP_X_FORWARDED_FOR') ? : getenv('HTTP_X_FORWARDED') ? : getenv('HTTP_FORWARDED_FOR') ? : getenv('HTTP_FORWARDED') ? : getenv('REMOTE_ADDR');\n\t\t$sql = \"UPDATE users SET status = '1', current_ip_address ='{$ip}' WHERE user_id = '{$clean_user}'\"; \n\t\t$base->select_table($sql);\n\t}", "public function disableUser($id)\n {\n $query = \"UPDATE `tbl_user` SET `status` = '1' WHERE `userid` = '$id' \";\n $update_row = $this->db->update($query);\n }", "public function deactivateUser(){\n\n\t\tglobal $db;\n\t\t\n\t\t$db->SQL = \"UPDATE ebb_users SET active='0' WHERE Username='\".$this->user.\"' LIMIT 1\";\n\t\t$db->query();\n\t}", "public function eliminar($objUser) {\n $idUsers = $objUser->getIdUsers();\n\n //ahora creo la sql que ejecutaré para eliminar datos \n\n echo $sql = \"UPDATE users SET state = '1' WHERE idUsers = '$idUsers'\";\n //ejecutamos la consulta y si da error imprimimos dicho error\n if (!$this->conn->query($sql)) {\n return false;\n } else {\n //presentamos el mensaje de insercion con un alert\n return true;\n }\n //una vez eliminado los datos, cerramos la conexion activa\n mysqli_close($this->conn);\n }", "public function disactive_user($id)\n {\n $this->db->set('active', 0)->where('id', $id);\n if($this->db->update('user'))\n {\n return TRUE;\n }\n\n return $this->db->error();\n }", "function updateOnlineUser( $session, $time, $id, $role ){\n global $connection;\n\n $query = \"UPDATE users_online SET time = '$time', online_user_id = '$id', online_user_role = '$role' WHERE session = '$session'\";\n \n $result = mysqli_query( $connection, $query );\n\n confirmQuery( $result );\n }", "public function user_online($user_id) {\n global $db;\n /* first -> check if the target user enable the chat */\n $get_user_status = $db->query(sprintf(\"SELECT * FROM users WHERE users.user_chat_enabled = '1' AND users.user_id = %s\", secure($user_id, 'int'))) or _error(SQL_ERROR_THROWEN);\n if($get_user_status->num_rows == 0) {\n /* if no > return false */\n return false;\n }\n /* second -> check if the target user is friend to the viewer */\n if(!in_array($user_id, $this->_data['friends_ids'])) {\n /* if no > return false */\n return false;\n }\n /* third > check if the target user is online */\n $check_user_online = $db->query(sprintf(\"SELECT * FROM users_online WHERE users_online.user_id = %s\", secure($user_id, 'int'))) or _error(SQL_ERROR_THROWEN);\n if($check_user_online->num_rows == 0) {\n /* if no > return false */\n return false;\n } else {\n /* if yes > return false */\n return true;\n }\n }", "public function updateUserIsOnline($id, $status){\n\t\tif (empty($id) || !is_numeric($id) || !is_bool($status)){\n\t\t\treturn false;\n\t\t}\n\t\t$res = $this->db->query('UPDATE users SET `IsOnline` = ?i WHERE id=?i', $status, $id);\n\t\treturn $res;\n\t}", "public function delUser($IdUser)\n {\n $sql = \"SELECT image FROM 2d_users WHERE id = ?\";\n $query = $this->db->query($sql, array($IdUser));\n if(!empty($result->image)) {\n $file = 'uploads/images/users/'.$result->image;\n if(is_readable($file)) {\n unlink($file);\n }\n }\n // Removing comments related to the user\n $sql = 'DELETE FROM 2d_comments WHERE id_user = ?';\n $this->db->query($sql, array($IdUser));\n // Removing profile's comments related to the user\n $sql = 'DELETE FROM 2d_profiles_comments WHERE id_user_member = ?';\n $this->db->query($sql, array($IdUser));\n // Removing favorites related to the user\n $sql = 'DELETE FROM 2d_favorites WHERE id_user = ?';\n $this->db->query($sql, array($IdUser));\n // Removing notes related to the user\n $sql = 'DELETE FROM 2d_notes WHERE id_user = ?';\n $this->db->query($sql, array($IdUser));\n // Removing playlists related to the user\n $sql = 'DELETE FROM 2d_playlists WHERE id_user = ?';\n $this->db->query($sql, array($IdUser));\n // Removing the user\n $sql = 'DELETE FROM 2d_users WHERE id = ?';\n $this->db->query($sql, array($IdUser));\n }", "function Deactivate($UserID)\n\t{\n\t\t$res=jf::SQL(\"UPDATE {$this->TablePrefix()}xuser SET Activated=0 WHERE ID=? LIMIT 1\",$UserID);\n\t\treturn $res==1;\n\t}", "function rmUser($id){\r\n\t\t$query= \"DELETE FROM `tbl_user_rights` WHERE `UID` = $id\";\r\n\t\t$result = $this->mdb2->query($query) or die('An unknown error occurred while updating the data'); \r\n\t\tif(MDB2::isError($result)){\t\t\t\t\t\t\t//check weather query succeeded\r\n\t\t\treturn false;\r\n\t\t}else{\r\n\t\t\t$query= \"DELETE FROM `tbl_auth` WHERE `UID` = $id LIMIT 1\";\r\n\t\t\t$result = $this->mdb2->query($query) or die('An unknown error occurred while updating the data'); \r\n\t\t\tif(MDB2::isError($result)){\t\t\t\t\t\t\t//check weather query succeeded\r\n\t\t\t\treturn false;\r\n\t\t\t}else{\r\n\t\t\t\t$query= \"DELETE FROM `tbl_subject` WHERE `UID` = $id\";\r\n\t\t\t\t$result = $this->mdb2->query($query) or die('An unknown error occurred while updating the data'); \r\n\t\t\t\tif(MDB2::isError($result)){\t\t\t\t\t\t\t//check weather query succeeded\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function ChangeUnJoininStat($activity_id,$user_id){\n $conn = dbConnect('write');\n $r1=updateItemCol($conn,\"activity_joined\",'join_stat',2,\" where activity_id='$activity_id' and user_id='$user_id'\");\n $r2=minusJoinTimes($conn,$user_id);\n $conn->close();\n return $r1 & $r2;\n }", "private function loadOnlineUser() {\r\n $user = User::find('online = 1');\r\n if($user !== false) {\r\n $this->view->onlineUser = $user;\r\n }\r\n }", "public function onUserLogout($event) {\n DB::table('users')->where('id', auth()->user()->id)->update(['online_status' => 'offline']);\n\n }", "public function unblockUser();", "public function unbanChatMember(string $chatId, int $userId): bool\n {\n return $this->post('unbanChatMember', compact('chatId', 'userId'));\n }", "public function disable_user(){\n\t\t$this->form_validation->set_rules('id', 'Id', 'trim|required|xss_clean');\n\t\tif ($this->form_validation->run() == FALSE) {\n\t\t\tredirect('login', 'refresh');\n\t\t}\n\t\telse{\n\t\t\t$data = array(\n\t\t\t\t'id' => $this->input->post('id'),\n\t\t\t\t'active' => 0\n\t\t\t\t);\n\t\t\t$result = $this->admincustomer_database->user_edit($data);\n\t\t\tif(!$result){\n\t\t\t\t$data['all_active_users'] = $this->admincustomer_database->all_active_users();\n\t\t\t\t$data['msg_db'] = \"¡ERROR!: ID erronea.\";\n\n\t\t\t\t$this->load->view('header');\n\t\t\t\t$this->load->view('admin_customer_bars');\n\t\t\t\t$this->load->view('admin_customer_page', $data);\n\t\t\t\t$this->load->view('footer');\n\t\t\t}else{\n\t\t\t\t$data['all_active_users'] = $this->admincustomer_database->all_active_users();\n\t\t\t\t$data['msg_ok'] = \"¡BIEN HECHO!: Usuario desactivado.\";\n\n\t\t\t\t$this->load->view('header');\n\t\t\t\t$this->load->view('admin_customer_bars');\n\t\t\t\t$this->load->view('admin_customer_page', $data);\n\t\t\t\t$this->load->view('footer');\n\t\t\t}\n\t\t}\n\t}", "public function unWarnUser(User $user)\n {\n $this->sql(\n 'UPDATE ' . static::$TABLE_WARN_NAME . ' \n SET isActive = :isActive \n WHERE idUser = :idUser AND isActive = 1', \n [':isActive' => intval(false), ':idUser' => $user->getId()]\n );\n }", "public function deactivate_user($user_id) {\n\t\t$this->db->set('status', 0);\n\t\t$this->db->where('id', $user_id);\n\t\tif ($this->db->update('user')) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function unblock()\n {\n $this->status = $this->status & ~User::STATUS_BLOCK;\n return $this->save();\n }", "function unblockUser($userinfo, &$existinguser, &$status)\r\n {\r\n }", "function takeOffline()\n\t{\n\t\t$query = \"UPDATE sysmenue SET activ = '0' WHERE id = '\" . $this -> getMenuId() . \"'\";\n\t\t$insert = @mysql_query($query) OR functions::output_fehler('MySQL-Error: Nr. 128');\n\t\tif($insert == true)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "function updateLastOnline($id) {\n R::exec( 'update user set last_online=NOW() where id = :id', [':id' => $id]);\n }", "public function disable() { \n\n\t\t// Make sure we aren't disabling the last admin\n\t\t$sql = \"SELECT `id` FROM `user` WHERE `disabled` = '0' AND `id` != '\" . $this->id . \"' AND `access`='100'\"; \n\t\t$db_results = Dba::query($sql); \n\t\t\n\t\tif (!Dba::num_rows($db_results)) { return false; } \n\n\t\t$sql = \"UPDATE `user` SET `disabled`='1' WHERE id='\" . $this->id . \"'\";\n\t\t$db_results = Dba::query($sql); \n\n\t\t// Delete any sessions they may have\n\t\t$sql = \"DELETE FROM `session` WHERE `username`='\" . Dba::escape($this->username) . \"'\"; \n\t\t$db_results = Dba::query($sql); \n\n\t\treturn true; \n\n\t}", "private function untrackUser($user){\n\t\t\t\t\t$userFound = $this->searchLogin($user, $this->connectedUsersList);\t//retrieve datas of $user in $this->connectedUsersList\n\t\t\t\t\tif(isset($userFound)){\n\t\t\t\t\t\tunset($this->connectedUsersList[$userFound[1]]);\t//$userFound[1] = index of this user in usersList\n\t\t\t\t\t\t$user->setIsConnected(false);\n\t\t\t\t\t}\n\t\t\t\t}", "public function disableUser($userid){\n\t\t\t$query = \"UPDATE tbl_user SET status = '1' WHERE userid = '$userid' \";\n\t\t\t$updated_row = $this->db->update($query);\n\t\t\tif($updated_row){\n\t\t\t\t$msg = \"<span style='color: green;'>User Disabled ! </span>\";\n\t\t\t\treturn $msg;\n\t\t\t}else{\n\t\t\t\t$msg = \"<span style='color: red;'>User Not Disabled ! </span>\";\n\t\t\t\treturn $msg;\n\t\t\t}\n\t\t}", "private function redact_user()\n {\n $this->o_users->update();\n }", "public function deactivate_user_status($id){\n $sql = \"UPDATE $this->table SET active = 0 WHERE id = $id\";\n return (bool) $this->db->query($sql);\n }", "public function disable($id)\n {\n $disable_response = UserMaster::find($id)->update([\n 'isactive' => 0,\n 'updated_by' => \\Auth::user()->user_id,\n 'updated_date' => \\Carbon\\Carbon::now()->toDateTimeString(),\n ]);\n\n if($disable_response){\n return back()->with('success', 'User inactivated');\n }\n else{\n return back()->with('error', 'something went wrong! please try again later.');\n }\n }", "public function disable_user($id)\n {\n \n $data=array(\n 'status' => 0\n );\n $update = User::where(array('id' =>$id))->update($data);\n if($update)\n {\n $results = array(\n \t\t\t'result'=>'TRUE',\n \t\t\t'message'=>'Successfully Disabled'\n \t\t);\n \n }else{\n $results = array(\n \t\t\t'result'=>'FALSE',\n \t\t\t'message'=>'Failed !! please try again'\n \t\t);\n }\n echo json_encode($results);\n \n }", "public function deactiveStatus()\n {\n\n $id = $this->uri->segment(3);\n $update = array(\n 'IS_ACTIVE' => '0'\n\n );\n $where = array(\n 'USER_ID' => $id\n\n );\n $data['users'] = $this->General->update_record($update, $where, 'usr_user');\n redirect(base_url() . \"index.php/Users/add_user\");\n }", "function d4os_io_db_offline_message_user_delete($uuid) {\n d4os_io_db_set_active('os_offline_message');\n db_query(\"DELETE FROM {offline_msgs} WHERE uuid = '%s'\", array($uuid));\n d4os_io_db_set_active('default');\n}", "function update_statuts(){\n\n\n\n $conn = open_cnxn();\n global $log;\n\n // Check connection\n if (!$conn) {\n\n $log->error(\"Connection failed: \" . mysqli_connect_error());\n\n\n }\n $id=$_SESSION['id'];\n if ($conn) {\n $sql =\"UPDATE users SET status='online' WHERE id='$id' \";\n\n if ($result= mysqli_query($conn, $sql)) {\n\n\n }else{\n $log->error(\"Error while login \" . $sql . \"\\n\" . mysqli_error($conn));\n\n }\n }\n\n\nreturn\"\";\n}", "public function markAsPermanentlyOffline() {}", "public static function resetPasswordToAdmin($mUser){\n $name = $mUser->full_name;\n $login_link = '<a href=\"'.Yii::app()->createAbsoluteUrl(\"admin/site/login\").'\">'.Yii::app()->createAbsoluteUrl(\"admin/site/login\").'</a>';\n $param = array(\n '{NAME}'=>$name,\n '{PASSWORD}'=>$mUser->temp_password,\n '{LINK_LOGIN}' =>$login_link,\n );\n\n $aSubject = array(\n '{NAME}'=>$name,\n '{PASSWORD}'=>$mUser->temp_password,\n '{LINK_LOGIN}' =>$login_link,\n );\n\n // if(CmsEmail::sendmail(MAIL_RESET_PASSWORD_TO_ADMIN,$aSubject,$param, Yii::app()->setting->getItem('adminEmail') ))\n if(CmsEmail::sendmail(MAIL_RESET_PASSWORD_TO_ADMIN,$aSubject,$param, $mUser->email ))\n Yii::app()->user->setFlash(\"success\", \"An email has sent to: $mUser->email. Please check email to get new password.\");\n else\n $mUser->addError('email','Can not send email to: '.$mUser->email);\n }", "public function deleteOnlineUser($user)\n {\n $query = 'DELETE FROM ' . $this->_params['online'] . ' WHERE user_uid = ?';\n return $this->_write_db->query($query, array($user));\n }", "function moveUsersFromEmptyLobby() { \n\t\t$this->mdb->query(\"UPDATE gameUser as g RIGHT OUTER JOIN \n\t\t\t(SELECT l.id as id FROM lobby as l LEFT OUTER JOIN gameUser as g ON g.lobbyId = l.id \n\t\t\tWHERE l.id != 0 GROUP BY l.id HAVING COUNT(l.id) < 2) lobbyCount ON g.lobbyId = lobbyCount.id\n\t\t\tLEFT OUTER JOIN game ON game.lobbyId = g.lobbyId SET g.lobbyId = 0 WHERE game.botGame = FALSE\");\n\t}", "static public function mdlEliminarUsuario($id){\n\t\t$stmt = Conexion::conectar()->prepare(\"UPDATE usuarios SET usu_activo = 0 WHERE usu_id = $id\");\n\t\t// $stmt -> bindParam(\":id\", $id, PDO::PARAM_INT);\n\t\tif($stmt->execute()){\n\t\t\treturn \"ok\";\n\t\t}else{\n\t\t\treturn \"error\";\n\t\t}\n\t\t$stmt->close();\n\t\t$stmt = null;\n\t}", "public function untouchable() {\n\t\tglobal $uneditableUsers;\n\n\t\t// none?\n\t\tif(empty($uneditableUsers)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// split\n\t\t$kaboom = split(',', $uneditableUsers);\n\n\t\tif(!in_array($this->info['userid'], $kaboom)) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "function UpdateUser($ID , $Nick, $Email){\t\n\t$EmailStatment = null;\n\t$NameStatment = null;\n\t$Commar=null;\n\t\n\tif($Nick!=null)$NameStatment = \" Nick='$Nick' \";\n if($Email!=null)$EmailStatment = \" Email='$Email' \";\n\tif($Nick!=null&&$Email!=null) $Commar = \" , \";\n\tif ($Nick==null&&$Email==null)return false;\n\t\n\t$result = get_mysql()->query(\"UPDATE Domtable SET\".$NameStatment.\"\".$Commar.\"\".$EmailStatment.\"WHERE Id=$ID\");\n\t\n\t\n\tif ($result>0){\n\treturn true;\n\t}\n\telse{\n\treturn false;\n\t}}", "public function unblock($userId)\r\n {\r\n if ($this->model->changeStatus(1, $userId)){\r\n $this->addInfoMessage(\"User unblocked.\");\r\n }\r\n else{\r\n $this->addErrorMessage(\"Error: cannot unblock this user.\");\r\n }\r\n $this->redirect('users');\r\n }", "public function user_remove($data) {\n\n $where_cond = '(chat_group_id=\"'.$data['chat_group_id'].'\" AND group_member_id=\"'.$data['group_member_id'].'\" AND group_members_status=1)';\n $model_data = $this->db->where($where_cond)->update('ct_group_members',array('left_by'=>$data['users_id'],'group_members_status'=>2));\n return TRUE;\n }", "public function demote($id){\n $user = User::findOrFail($id);\n $user->administrator = false;\n $user ->save();\n return redirect()->action('UserController@index');\n }", "public function actionMakeInactive(){\n\n $post = Yii::$app->request->post();\n\n if(!isset($post['id'])) return $this->createErrorResponse('param id is missing');\n\n $user = $this->findModel($post['id']);\n\n if($user){\n\n if($user->hasOtherActives()){\n\n $user->status = User::STATUS_INACTIVE;\n $user->save();\n return $this->createSuccessResponse('user status changed successfully');\n\n } else {\n\n return $this->createSuccessResponse('There must be at least one active admin');\n\n }\n\n }\n\n return $this->createErrorResponse('user not found');\n }", "public function unBlockUser(Request $request){\n $userDetail=User::where('id',$request->id)->first();\n $userDetail->is_block='0';\n if($userDetail->save())\n {\n \\Session::flash('success',\\Lang::get('user.user_unblock_sccuess'));\n }\n else\n {\n \\Session::flash('error',\\Lang::get('user.user_unblock_error')); \n }\n return redirect('admin/list-user');\n \n }", "public function updateUserStatus($userId) {\n\n\t\t\t$query = \"\tUPDATE\tuser\n\t\t\t\t\t\tSET\t\tuserStatus = 0\n\t\t\t\t\t\tWHERE\tuserId = $userId\";\n\treturn SystemDatabaseManager::getInstance()->executeUpdateInTransaction($query,\"Query: $query\");\n}", "function unfollowUser ($unfollowing_user_id, $unfollowed_user_id)\n\t{\n\t\t$db = new Database();\n\t\t$delete = \"delete from FOLLOWERS where following_user_id = {$unfollowing_user_id} and followed_user_id = {$unfollowed_user_id};\";\n\t\t$result = $db->query($delete);\n\t}", "function update_online_status() {\n if( ! isset($_GET['id'])) {\n throw \"Error: User id not found in the request.\";\n exit();\n }\n\n global $db_connection;\n // Get the current time in UNIX Timestamp format,\n // and update the recent_ping of the user with it.\n $current_time = time();\n $id = $_GET['id'];\n $query = \"UPDATE users SET recent_ping=$current_time WHERE id=$id\";\n mysqli_query($db_connection, $query);\n if(mysqli_errno($db_connection) != 0) {\n echo mysqli_error($db_connection);\n exit();\n }\n }", "function UserLogout($UserID,$UserType)\r\n\t\t{\r\n\r\n\t\t\t$LogoutTime = date(\"Y-m-d H:i:s\");\r\n\r\n\t\t\t$strSQLQuery = \"select loginID from user_login where UserID='\".$UserID.\"' and UserType='\".$UserType.\"' order by loginID desc limit 0,1\" ;\r\n\t\t\t$arryRow = $this->query($strSQLQuery, 1);\r\n\t\t\r\n\t\t\tif($arryRow[0][\"loginID\"]>0){\r\n\t\t\t\t$strSQLQuery = \"update user_login set LogoutTime='\".$LogoutTime.\"' where loginID='\".$arryRow[0][\"loginID\"].\"'\";\r\n\t\t\t\t$this->query($strSQLQuery, 0);\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}", "public function modificarWithPassword($objUser) {\n\n $idUsers = $objUser->getIdUsers();\n $idTypeUsers = $objUser->getIdTypeUsers();\n $name = $objUser->getName();\n $surnames = $objUser->getSurnames();\n $phone = $objUser->getPhone();\n $email = $objUser->getEmail();\n $password = $objUser->getPassword();\n $state = $objUser->getState();\n $image = $objUser->getImage();\n\n\n //ahora creo la sql que ejecutaré para eliminar datos\n\n $sql = \"UPDATE users SET idTypeUsers='$idTypeUsers', name ='$name' , surnames ='$surnames',phone ='$phone',email='$email',password = SHA2('$password', 224), state='$state',image='$image' WHERE idUsers='$idUsers'\";\n //ejecutamos la consulta y si da error imprimimos dicho error\n if (!$this->conn->query($sql)) {\n mysqli_close($this->conn);\n print false;\n } else {\n mysqli_close($this->conn);\n return true;\n }\n\n }", "public function updateUser($userId) {\n\n\t\t\t$query = \"\tUPDATE\tuser\n\t\t\t\t\t\tSET\t\tuserStatus = 0\n\t\t\t\t\t\tWHERE\tuserId = $userId\";\n\treturn SystemDatabaseManager::getInstance()->executeUpdateInTransaction($query,\"Query: $query\");\n}", "function unbanUser($datas) {\n $query = \"UPDATE user SET status = 1 WHERE id_user = :id_user\";\n $ps = myDatabase()->prepare($query);\n $ps->bindParam(':id_user', $datas['user_id'], PDO::PARAM_STR);\n $ps->execute();\n}", "public function disable() {\n\t\t$this->out(\"Disabling a user account\");\n\t\t$email = $this->args[0];\n\n\t\t// Find existing user account\n\t\t$found = $this->User->find('first', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'email' => $email\n\t\t\t)\n\t\t));\n\n\t\t// If it does not exist, error out\n\t\tif (empty($found)) {\n\t\t\t$this->error(__(\"Could not find an account with that email address!\"));\n\t\t}\n\n\t\t// Save with updated status\n\t\t$this->User->id = $found['User']['id'];\n\n\t\tif (!$this->User->saveField('is_active', 0)) {\n\t\t\t$this->error(__(\"Failed to disable user '$email'!\"));\n\t\t} else {\n\t\t\t$this->out(__(\"User '$email' disabled.\"));\n\t\t}\n\t}", "public function refreshOnlineUsers(){\r\n\t}", "public function logout(): void\n {\n if (!empty($this->CurrentUser)) {\n if ($this->CurrentUser->isLoggedIn()) {\n $this->UsersTable->UserOnline->setOffline($this->CurrentUser->getId());\n }\n $this->setCurrentUser(CurrentUserFactory::createVisitor($this->getController()));\n }\n $this->Authentication->logout();\n }", "public function Unfollow(User $user) {\n $followship = new Followship();\n $followship = $this->getFollowship($user);\n \n if ($followship==false || $followship=='undefined') {\n return false;\n }\n\n $old_status = $followship->getStatus();\n $user_one = $followship->getUserOne();\n $user_two = $followship->getUserTwo();\n \n if ($old_status==1 && $user_two==$user->getUserId()) {\n $status = 0; \n } else if ($old_status==2 && $user_one==$user->getUserId()) {\n $status = 0;\n } else if ($old_status==3) {\n if ($user_one==$user->getUserId()) {\n $status = 1;\n } else {\n $status = 2;\n }\n } else {\n return true;\n }\n if($status==0){\n $sql = 'DELETE FROM `followship` ' .\n 'WHERE `user_one_id` = ' . $user_one . \n ' AND `user_two_id` = ' . $user_two; \n } else {\n $sql = 'UPDATE `relationship` '\n . 'SET `status` = '. $status .', `action_user_id` = '. $action_user_id \n .' WHERE `user_one_id` = '. $user_one \n .' AND `user_two_id` = ' . $user_two;\n \n $this->dbCon->query($sql);\n \n if ($this->dbCon->affected_rows > 0) {\n return true;\n }\n \n return false;\n }\n\n}", "public function unassignUser()\n {\n if ($this->user_id) {\n $this->update([\n 'user_id' => null\n ]);\n }\n }", "public function subtractUser()\n {\n $this->total_users->value--;\n $this->total_users->save();\n $this->updateCache();\n }", "public function DeactivateAccount($user_id) { \n \n\n $created=date('Y-m-d');\n //echo \"UPDATE users_info INNER JOIN users ON users.user_id=users_info.user_id SET users.status='2',users_info.status='2' where users.user_id='$user_id'\";\n $register = $this->db->query(\"UPDATE users_info INNER JOIN users ON users.user_id=users_info.user_id SET users.status='2',users_info.status='2' where users.user_id='$user_id'\") or die(mysqli_error($conn));\n if($register){\n $data['result']=1;\n return $data;\n }else{\n return 0;\n }\n\n //return $register; \n }", "public function deaktivieren(){\r\n\t\t\r\n\t\t$this->deaktiviert = 1;\r\n\t\t\r\n\t\t$db = new DB_connection();\r\n\t\t\r\n\t\t$query = \"UPDATE User SET\r\n\t\t\t\tdeaktiviert = '\".$this->deaktiviert.\"'\r\n\t\t\t\tWHERE u_id = '\".$this->u_id.\"'\r\n\t\t\t\r\n\t\t\t\t\t\t\";\r\n\t\t\r\n\t\t$result = $db->execute($query);\r\n\t\t\r\n\t\treturn $result;\r\n\t\r\n\t}", "public function disable($user_id)\n {\n return $this->db->table(self::TABLE)->eq('user_id', $user_id)->update(array('is_active' => 0));\n }", "public function getDisable($id){\n\n\t\t$user = User::find($id);\n\n\t\tif ($user->active == '1')\n\t\t{\n\t\t\t$user->active = 0;\n\t\t\t$message = \"Account Disabled\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$user->active = 1;\n\t\t\t$message = \"Account Enabled\";\n\t\t}\n\t\t$user->save();\n\t\treturn Redirect::back()->with('message',$message);\n\t\t\n\t}", "public function setOnline($user, $online, $isOnline) {\n\t\tprint_r(['online', $user->id]);\n\t\t$message = json_encode([\n\t\t\t'type' => 'online',\n\t\t\t'user' => $user->toArray(),\n\t\t\t'is_online' => $isOnline,\n\t\t]);\n\n\t\t$dataEcoded = $this->encode($message);\n\t\tforeach ($online as $key => $connect) {\n\t\t\tif ($key != $user->id) {\n\t\t\t\tfwrite($connect, $dataEcoded);\n\t\t\t}\n\t\t}\n\t}", "public function deactivate_user($user_id)\n\t{\n\t\t$data = array(\n\t\t\t\t'activated' => 0\n\t\t\t);\n\t\t$this->db->where('user_id', $user_id);\n\t\t\n\t\tif($this->db->update('users', $data))\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\telse{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "function unregisterUser($murmurUserID, $vServerID = NULL) {\r\n if (!isset($vServerID)) {\r\n $vServerID = $this->config->item('vServerID');\r\n }\r\n log_message('info', '<' . __FUNCTION__ . '> Unregistering ID: ' . $murmurUserID);\r\n try {\r\n $this->server = $this->meta->getServer($vServerID);\r\n $this->server->unregisterUser($murmurUserID);\r\n } catch (Murmur_MurmurException $exc) {\r\n log_message('error', '<' . __FUNCTION__ . '> Murmur: ' . $exc->ice_name());\r\n $this->errorMessage = $exc->ice_name();\r\n return FALSE;\r\n }\r\n return TRUE;\r\n }", "public function disabled($id)\n {\n $myArray = array(\n 'status' => 1\n );\n User::where('id', $id)\n ->update($myArray);\n\n Session::flash('success','Disabled User.');\n return Redirect::back();\n }", "function isOnline($user_id){\n\n $sql = \"SELECT * from user WHERE user_id ='$user_id' AND `last_activity`<DATE_SUB(NOW(), INTERVAL 5 SECOND)\";\n\n $result = mysqli_fetch_assoc(mysqli_query(self::$db, $sql));\n\n return $result;\n\n }", "public function update_non_pass()\n {\n $sql = \"UPDATE \" . self::TABLE_NAME . \"\n SET user_name=?,\n user_email=?,\n img_id=?,\n user_phone1=?,\n user_phone2=?,\n user_address=?,\n user_update_date=?,\n shipping_id=?,\n roles_id=?\n WHERE user_id=?\";\n $stmt = $this->prepare($sql);\n $stmt->bind_param(\"ssissssiii\",\n $this->getUserName(),\n $this->getUserEmail(),\n $this->getImgId(),\n $this->getUserPhone1(),\n $this->getUserPhone2(),\n $this->getUserAddress(),\n $this->getUserUpdateDate(),\n $this->getShippingId(),\n $this->getRolesId(),\n $this->getUserId());\n $result = $stmt->execute();\n $stmt->close();\n return $result;\n }", "public function Reset($UserID)\n\t{\n\t\tjf::SQL(\"UPDATE {$this->TablePrefix()}xuser SET FailedLoginAttempts=0 , LockTimeout=? , LastLoginTimestamp=? , TemporaryResetPasswordTimeout=? WHERE ID=? LIMIT 1\",jf::time(),jf::time(),jf::time(),$UserID);\n\n\t}", "public function removeUser()", "public function unblock($id)\n {\n $user = User::find($id);\n $user->status = 0;\n $user->save();\n return redirect()->route('users.index');\n }", "public function setUserUnlogged($id_user)\n {\n $this->db->query(\"UPDATE usuarios set logado = '0' where id = '$id_user' \");\n }", "public function testUnmuteUser()\n {\n $this->markTestIncomplete(\n 'Test of \"unmuteUser\" method has not been implemented yet.'\n );\n }", "public function uninvite($userId)\n{\n $exist = $this->is_inviting($userId);\n // confirming that it is not you\n $its_me = $this->id == $userId;\n\n\n if ($exist && !$its_me) {\n // stop following if following\n $this->invitings()->detach($userId);\n return true;\n } else {\n // do nothing if not following\n return false;\n }\n}", "public function deleteUserAdmin($idUser){\t\n \ttry{\n \t\t$idUserwhere = $this->_dbTable->getAdapter ()->quoteInto ( 'User_id = ?', $idUser );\n \t\t$idUser= $this->_dbTable->delete ( $idUserwhere );\n \tif($idUser){\n \t\t\treturn true;\n \t\t}else{\n \t\t\treturn false;\n \t\t}\n \t}catch(ErrorException $ex){\n \t\techo \"Message:\".$ex->getMessage();\n \t}\n }", "function usersOnline() {\n\n if(isset($_GET['onlineusers'])) {\n global $connection;\n\n if(!$connection) {\n session_start(); //start the session\n include(\"../includes/database.php\");\n\n $session_id = session_id(); //get the id of the current session\n $time = time(); //the current time\n $timeout_seconds = 5;//the amount of time until the user is marked as offline\n $timeout = $time - $timeout_seconds; //the time the user is timed out\n\n /*See if anyone is online */\n $query = \"SELECT * FROM users_online WHERE session_id = '$session_id'\";\n $send_query = mysqli_query($connection, $query);\n $count = mysqli_num_rows($send_query);\n\n if($count == NULL) {\n $query = \"INSERT INTO users_online (session_id, time) VALUES ('$session_id', '$time')\";\n mysqli_query($connection, $query);\n } else {\n $query = \"UPDATE users_online SET time = '$time' WHERE session_id = '$session_id'\";\n mysqli_query($connection, $query);\n }\n\n $query = \"SELECT * FROM users_online WHERE time > '$timeout'\";\n $users_online_query = mysqli_query($connection, $query);\n echo $users_online_count = mysqli_num_rows($users_online_query);\n } //if(!$connection)\n } //if(isset($_GET['onlineusers']))\n}", "public function actionSetOnlineStatus() {\n header('Content-Type: text/event-stream');\n header('Cache-Control: no-cache');\n\n if (Yii::$app->user->isGuest) {\n echo \"data: \\n\\n\";\n flush();\n return 0;\n }\n\n $user = Users::findIdentity(Yii::$app->user->identity->Id);\n $user->last_connection = date('Y-m-d H:i:s');\n $user->save();\n\n echo \"data: saved\\n\\n\";\n flush();\n }", "public function actionToggle_banned($id) {\n $model = User::model()->findByPk($id);\n $model->status = -($model->status);\n\n if ($model->save()) {\n echo CJSON::encode(array(\n 'status' => 'success',\n 'user_status' => User::getStatus($model->status),\n ));\n } else {\n Yii::trace('AdminController:118 Error Toggle_banned:' . print_r($model->getErrors(), true), 'registro');\n echo CJSON::encode(array(\n 'status' => 'error',\n 'error' => $model->getErrors(),\n ));\n }\n \n }" ]
[ "0.70733434", "0.7048937", "0.6989938", "0.66736203", "0.64072627", "0.62734294", "0.6165752", "0.6045424", "0.60314804", "0.59398305", "0.5912469", "0.58044446", "0.5792946", "0.57674325", "0.5717685", "0.56970716", "0.5695448", "0.5689769", "0.5637573", "0.56281275", "0.5616379", "0.555472", "0.5538556", "0.55323106", "0.55248106", "0.5481519", "0.54797703", "0.5468322", "0.54335856", "0.54305166", "0.5414", "0.5409664", "0.53722185", "0.535723", "0.53484803", "0.5347752", "0.53244776", "0.531803", "0.5316332", "0.53082085", "0.5293238", "0.52905786", "0.52898866", "0.5285385", "0.5268879", "0.5268485", "0.5260496", "0.52506644", "0.52493346", "0.5244742", "0.5225853", "0.52242744", "0.5219641", "0.5187183", "0.51856273", "0.5162935", "0.51457494", "0.51455295", "0.51407623", "0.5139495", "0.51340723", "0.51245975", "0.51106125", "0.5107885", "0.5106497", "0.5103026", "0.5100606", "0.50994647", "0.5094361", "0.5094213", "0.50922847", "0.5081895", "0.5073798", "0.5069966", "0.506981", "0.50694555", "0.50643146", "0.5059436", "0.5057925", "0.50546765", "0.5045274", "0.50417256", "0.503815", "0.5037695", "0.5037197", "0.5035592", "0.50315285", "0.5031297", "0.50261325", "0.5023281", "0.50216055", "0.50126964", "0.5007221", "0.50019157", "0.49933347", "0.4985917", "0.4983058", "0.49734607", "0.49717203", "0.4970572" ]
0.80887115
0
returns an associative array of users who are online returns an array of online users on success, or an errormsg on error
возвращает ассоциативный массив пользователей, которые находятся онлайн, в случае успеха, или сообщение об ошибке в случае ошибки
function GetOnlineUsers(){ $OnlineUsers = array(); $Sql = " SELECT U.Id AS Id, CONCAT( U.FirstName, ' ', U.LastName ) AS Name, Bus.Name As BusinessName FROM User U, Accounts Acc, Business Bus WHERE U.IsOnlineChat != 0 AND U.Account_Id = Acc.Id AND Acc.Business_Id = Bus.Id"; $result = mysql_query( $Sql ); $errno = mysql_errno(); if( 0 != $errno ) return( "mysql error: $errno" ); while( $row = mysql_fetch_array( $result, MYSQL_ASSOC ) ) $OnlineUsers[] = $row; mysql_free_result( $result ); return( $OnlineUsers ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUsersOnline(){\n\t $result = $this->getBitrixApi(array(\n\t\t\t'FILTER' => array ('IS_ONLINE' => 'Y',),\n\t\t\t), 'user.get');\n\n\t if ($result){\n\t \tif (isset($result['total']) && $result['total']>0) \n\t \t\treturn $result['result'];\n\t \telse return false;\n\t } else {\n\t return false;\n\t }\n \n\t}", "function online_users()\n{\n\tglobal $database;\n \n $online_array = NULL;\n \n // CACHING\n $cache_object = SECache::getInstance('serial');\n if( is_object($cache_object) )\n {\n $online_array = $cache_object->get('online_users');\n }\n \n if( !is_array($online_array) )\n {\n $total_visitors = 0;\n $onlineusers_array = array();\n $onlineusers_usernames = array();\n $online_time = time() - (10 * 60);\n \n $sql = \"SELECT visitor_user_id AS user_id, visitor_user_username AS user_username, visitor_user_displayname AS user_displayname FROM se_visitors WHERE visitor_invisible=0 && visitor_lastactive>'{$online_time}' ORDER BY visitor_lastactive DESC LIMIT 2000\";\n $resource = $database->database_query($sql);\n \n while( $online_user_info = $database->database_fetch_assoc($resource) )\n {\n // THIS IS A USER\n if( !empty($online_user_info['user_id']) )\n {\n if( in_array($online_user_info['user_username'], $onlineusers_usernames) ) continue;\n \n $online_user = new se_user();\n $online_user->user_info['user_id'] = $online_user_info['user_id'];\n $online_user->user_info['user_username'] = $online_user_info['user_username'];\n $online_user->user_info['user_displayname'] = $online_user_info['user_displayname'];\n $online_user->user_displayname = $online_user_info['user_displayname'];\n \n $onlineusers_array[] = $online_user;\n $onlineusers_usernames[] = $online_user->user_info['user_username'];\n }\n \n // THIS IS A VISITOR\n else\n {\n $total_visitors++;\n }\n }\n \n $online_array = array($onlineusers_array, $total_visitors, $onlineusers_usernames);\n \n // CACHE\n if( is_object($cache_object) )\n {\n $cache_object->store($online_array, 'online_users');\n }\n }\n \n\treturn $online_array;\n}", "function getOnlineUsers()\n{\n\t$array = array();\n\t\n\t$res = mysql_query(\"SELECT * FROM `posts` WHERE status=1\");\n\tif (mysql_num_rows($res) > 0) {\n\t\twhile ($row = mysql_fetch_assoc($res)) {\n\t\t\t$array[] = $row['user_id']; // this adds each online user id to the array\n\t\t}\n\t}\n\techo json_encode($array);\n}", "public function checkOnlineUsers()\n\t{\n\t\t//Time between last hit and current moment\n\t\tif($this -> registry -> getSetting(\"DbEngine\") == \"sqlite\")\n\t\t{\n\t\t\t$all_ids = $this -> db -> getAll(\"SELECT `user_id`, `last_hit` FROM `\".$this -> table.\"`\");\n\t\t\t$users_ids = array();\n\t\t\t\n\t\t\tforeach($all_ids as $row)\n\t\t\t\tif(time() - I18n :: dateToTimestamp($row[\"last_hit\"]) <= $this -> registry -> getSetting(\"UserOnlineTime\"))\n\t\t\t\t\tif(!in_array($row[\"user_id\"], $users_ids))\n\t\t\t\t\t\t$users_ids[] = $row[\"user_id\"];\n\t\t}\n\t\telse\n\t\t\t$users_ids = $this -> db -> getColumn(\"SELECT `user_id` FROM `\".$this -> table.\"` \n\t\t\t\t\t\t\t\t\t\t\t WHERE(\".$this -> db -> unixTimeStamp('now').\"-\".\n\t\t\t\t\t\t\t\t\t\t\t $this -> db -> unixTimeStamp('last_hit').\") <=\n\t\t\t\t\t\t\t\t\t\t\t \".$this -> registry -> getSetting(\"UserOnlineTime\").\n\t\t\t\t\t\t\t\t\t\t\t \" GROUP BY `user_id`\");\n\t\t\n\t\tarray_unique($users_ids);\n\t\t\t\t\n\t\treturn $users_ids;\n\t}", "public function getUsersOnline()\n\t{\n\t\techo $this->users_online_model->getNumberOfUsersOnline();\n\t}", "function online_practitioners()\n{\n $timeout = time() - 300;\n $timerunout = 1;\n\n global $lsdb;\n\n // Update database first to see who is online!\n $lsdb->query('UPDATE ' . DB_PREFIX . 'user SET available = 0 WHERE lastactivity < ' . $timeout . '');\n\n $result = $lsdb->query('SELECT id, name FROM ' . DB_PREFIX . 'user WHERE access = 1 AND available = 1');\n\n if ($lsdb->affected_rows > 0) {\n while ($row = $result->fetch_assoc()) {\n $users[$row['id']] = $row['name'];\n }\n } else {\n $timerunout = 0;\n }\n\n if ($timerunout) {\n return $users;\n } else {\n return false;\n }\n}", "public function getAllOnline();", "public function getAllOnline();", "public function onlineUsers() {\r\n $arr = array();\r\n\r\n $users = json_decode(file_get_contents($this->mockOnlineFile), true);\r\n\r\n $arr['users'] = $users;\r\n return $arr;\r\n }", "public function listOnlineUser(): array{\n $user = [];\n //Retrieve an array from ProfileModel class and loop through all registered users.\n foreach($this->profileModel->listUser() as $item){\n // Insert into an array as long as user's timestamp is under 5 minutes and different user, instead of this user.\n if($this->userLastActivityModel->isTimestampValidate($item[\"username\"]) && $this->user->getUserName() != $item[\"username\"]){\n $user[] = [\n \"username\" => $item[\"username\"],\n \"firstname\" => $item[\"firstname\"],\n \"lastname\" => $item[\"lastname\"],\n \"activitykey\" => $this->userLastActivityModel->getActivityKey($item[\"username\"])\n ];\n }\n }\n return $user;\n }", "function user_get_friends_online_list()\n{\n\tglobal $db, $cache, $config, $user;\n\n\t$friends_online_list = array();\n\t$sql = \"SELECT u.user_id, u.username, u.user_active, u.user_color, u.user_allow_viewonline, s.session_logged_in, s.session_time\n\t\t\t\t\tFROM \" . ZEBRA_TABLE . \" z, \" . USERS_TABLE . \" u, \" . SESSIONS_TABLE . \" s\n\t\t\t\t\tWHERE z.user_id = '\" . $user->data['user_id'] . \"'\n\t\t\t\t\t\tAND z.friend = '1'\n\t\t\t\t\t\tAND u.user_id = z.zebra_id\n\t\t\t\t\t\tAND u.user_id = s.session_user_id\n\t\t\t\t\t\tAND s.session_time >= \" . (time() - ONLINE_REFRESH) . \"\";\n\t$result = $db->sql_query($sql);\n\n\twhile ($row = $db->sql_fetchrow($result))\n\t{\n\t\t$friends_online_list[$row['user_id']]['username'] = $row['username'];\n\t\t$friends_online_list[$row['user_id']]['user_active'] = $row['user_active'];\n\t\t$friends_online_list[$row['user_id']]['user_color'] = $row['user_color'];\n\t\t$friends_online_list[$row['user_id']]['user_level'] = $row['user_level'];\n\t\t$friends_online_list[$row['user_id']]['user_allow_viewonline'] = $row['user_allow_viewonline'];\n\t}\n\t$db->sql_freeresult($result);\n\tif (empty($friends_online_list))\n\t{\n\t\treturn false;\n\t}\n\telse\n\t{\n\t\treturn $friends_online_list;\n\t}\n}", "public function action_getOnlineUsers()\n\t{\n\t\t// get online users' ids\n\t\t$online_users = Larachat\\Models\\User::getOnlineUsers();\n\t\treturn Response::json($online_users);\n\t}", "public function allOnline();", "public function actionUsersOnline()\n {\n $this->requirePermission(\"access.manage\");\n return User::find()\n ->select( 'namedId')\n ->where( ['online' => 1])\n ->andWhere(['anonymous'=> 0])\n ->asArray()\n ->all();\n }", "public function check_online_friends(){\n\t\t$this->fonline = array();\n\t\t$friends_online_sql = \"SELECT uo.uid as uid, u.user_username as username\n\t\t\t\t\t\t\t\tFROM buddies b \n\t\t\t\t\t\t\t\tINNER JOIN users_online uo ON b.buddy_uid = uo.uid\n\t\t\t\t\t\t\t\tINNER JOIN users u ON uo.uid = u.user_id\n\t\t\t\t\t\t\t\tWHERE b.user_uid = '$this->uid'\n\t\t\t\t\t\t\t\tAND b.confirmed =1\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t$this->fres = mysql_query($friends_online_sql);\n\t\tif(mysql_num_rows($this->fres) > 0){\n\t\t\twhile ($row = mysql_fetch_array($this->fres)) {\n\t\t\t\t$this->fonline[] = array('uid'=>$row['uid'],'username'=>$row['username']);\n\t\t\t}\n\t\t\treturn $this->fonline;\n\t\t}else{\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t}", "public static function getOnlineMembers()\n {\n self::$db = Database::get();\n return count(self::$db->select(\"\n SELECT\n u.userID,\n u.username,\n u.firstName,\n uo.userID,\n ug.userID,\n ug.groupID,\n g.groupID,\n g.groupName,\n g.groupFontColor,\n g.groupFontWeight\n FROM\n \".PREFIX.\"users_online uo\n LEFT JOIN\n \".PREFIX.\"users u\n ON u.userID = uo.userID\n LEFT JOIN\n \".PREFIX.\"users_groups ug\n ON uo.userID = ug.userID\n LEFT JOIN\n \".PREFIX.\"groups g\n ON ug.groupID = g.groupID\n GROUP BY\n u.userID\n ORDER BY\n u.userID ASC, g.groupID DESC\"));\n }", "public function who_is_online()\n\t{\n\t\t$return = array('list' => array());\n\n\t\t$sql = 'SELECT s.s_id, s.s_ip, u.u_id, u.u_nickname, u.u_color, u.u_activate_hidden, b.bot_id, b.bot_name\n\t\t\t\tFROM ' . SQL_PREFIX . 'sessions s\n\t\t\t\tLEFT JOIN ' . SQL_PREFIX . 'users u\n\t\t\t\t\tON u.u_id = s.s_id\n\t\t\t\tLEFT JOIN ' . SQL_PREFIX . 'bots b\n\t\t\t\t\tON s.s_bot = b.bot_id\n\t\t\t\tWHERE s.s_time > ' . intval(CURRENT_TIME - ONLINE_LENGTH) . '\n\t\t\t\tORDER BY u.u_auth DESC, u.u_nickname, s.s_id';\n\t\t$result = Fsb::$db->query($sql);\n\n\t\t$total_visitor = 0;\n\t\t$total_user = 0;\n\t\t$total_hidden = 0;\n\t\t$ip_array = array();\n\t\t$bot_array = array();\n\t\t$id_array = array();\n\t\twhile ($row = Fsb::$db->row($result))\n\t\t{\n\t\t\t// Bot ?\n\t\t\tif (Fsb::$mods->is_active('bot_list') && !is_null($row['bot_id']))\n\t\t\t{\n\t\t\t\tif (in_array($row['bot_id'], $bot_array))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$bot_array[] = $row['bot_id'];\n\t\t\t\t$total_visitor++;\n\n\t\t\t\t$return['list'][] = array(\n\t\t\t\t\t'is_hidden' =>\tfalse,\n\t\t\t\t\t'id' =>\t\t\tnull,\n\t\t\t\t\t'nickname' =>\tnull,\n\t\t\t\t\t'color' =>\t\t'class=\"bot\"',\n\t\t\t\t\t'html' =>\t\tsprintf(Fsb::$session->getStyle('other', 'nickname'), 'class=\"bot\"', $row['bot_name'] . ' (bot)'),\n\t\t\t\t);\n\t\t\t}\n\t\t\t// Visiteur ?\n\t\t\telse if ($row['s_id'] == VISITOR_ID)\n\t\t\t{\n\t\t\t\tif (in_array($row['s_ip'], $ip_array))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$ip_ary[] = $row['s_ip'];\n\t\t\t\t$total_visitor++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (in_array($row['s_id'], $id_array))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$id_array[] = $row['s_id'];\n\n\t\t\t\tif ($row['u_activate_hidden'])\n\t\t\t\t{\n\t\t\t\t\t$total_hidden++;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$total_user++;\n\t\t\t\t}\n\n\t\t\t\t// Autorisation de voir les invites ?\n\t\t\t\tif (!$row['u_activate_hidden'] || (Fsb::$session->auth() >= MODOSUP || Fsb::$session->id() == $row['s_id']))\n\t\t\t\t{\n\t\t\t\t\t$return['list'][] = array(\n\t\t\t\t\t\t'is_hidden' =>\t$row['u_activate_hidden'],\n\t\t\t\t\t\t'id' =>\t\t\t$row['u_id'],\n\t\t\t\t\t\t'nickname' =>\t$row['u_nickname'],\n\t\t\t\t\t\t'color' =>\t\t$row['u_color'],\n\t\t\t\t\t\t'html' =>\t\tHtml::nickname($row['u_nickname'], $row['s_id'], $row['u_color']),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tFsb::$db->free($result);\n\t\tunset($ip_array, $id_array);\n\n\t\t$return['total'] =\t\t\t$total_visitor + $total_user + $total_hidden;\n\t\t$return['total_visitor'] =\t$total_visitor;\n\t\t$return['total_user'] =\t\t$total_user;\n\t\t$return['total_hidden'] =\t$total_hidden;\n\t\t$return['total_lang'] =\t\tsprintf(Fsb::$session->lang('current_user_online'), $return['total'], $total_user, $total_hidden, $total_visitor);\n\n\t\treturn ($return);\n\t}", "public function getUsersOnline()\n {\n $users = array_map( \"trim\", file('online.log', FILE_SKIP_EMPTY_LINES));\n return $users;\n }", "public static function getOnlineUsers() {\n\n \tself::checkOS();\n\n $fn = 'who'; // Set up appropriate function call\n $fn = (self::$OS == 'WIN') ? self::$fnMap[$fn] : $fn;\n $lines = preg_split('/(\\n|\\r|\\n\\r|\\r\\n)/' , trim(`$fn`));\n $users = array();\n\n foreach($lines as $line)\n {\n if(isset($line) && preg_match(self::$fnReg['who'][(isset(self::$fnReg['who'][self::$OS]) || array_key_exists(self::$OS, self::$fnReg['who'])) ? self::$OS : 0], $line, $matches) == 1)\n {\n if(self::$OS == 'WIN') // Windows fudgery\n {\n $matches['datetime'] = self::parseWinTime(trim($matches['datetime']));\n }\n \n $timeStamp = new DateTime(trim($matches['datetime']));\n\n $users[] = array(\n \t\t\t\t\t\t'user' => trim($matches['user']),\n \t\t\t\t\t\t'term' => trim($matches['term']),\n \t\t\t\t\t\t'date' => $timeStamp->format('Y-m-d'),\n \t\t\t\t\t\t'time' => $timeStamp->format('H:i:s'),\n \t\t\t\t\t\t'host' => isset($matches['host']) ? trim($matches['host']) : null\n \t\t\t\t\t\t);\n }\n } \n return $users; \n }", "function smfapi_isOnline($username='')\n{\n\tglobal $smcFunc;\n\n $user_data = smfapi_getUserData($username);\n\n if (!$user_data) {\n return false;\n }\n\n $request = $smcFunc['db_query']('', '\n\t\tSELECT lo.id_member\n\t\tFROM {db_prefix}log_online AS lo\n\t\tWHERE lo.id_member = {int:id_member}',\n\t\tarray(\n\t\t\t'id_member' => $user_data['id_member'],\n\t\t)\n\t);\n\n if ($smcFunc['db_num_rows']($request) == 0) {\n return false;\n\t} else {\n $smcFunc['db_free_result']($request);\n return true;\n\t}\n}", "public static function count_online_users(){\n\t\tglobal $base;\n\n\t\t$query = \"SELECT * FROM users WHERE status != '0' \";\n\t\t\t$rows = $base->while_loop($query);\n\t\t\t\treturn mysqli_num_rows($rows);\n\t\n\t}", "function nickUserOnline(){\n self::setNames();\n $sql = \"SELECT\n \to.online_nick AS nick,\n o.online_nick_clean AS nickclean,\n g.grupo_color AS color\n FROM\n \tonline AS o\n INNER JOIN grupos AS g ON (g.grupo_id = o.online_grupo)\n \";\n $res = $this->con->query($sql);\n $res->execute();\n $rc = $res->rowCount();\n if($rc>0){\n while($row = $res->fetch(PDO::FETCH_ASSOC)){\n $datos[]=$row;\n }\n return $datos;\n self::closeCon();\n }\n\n }", "function online($name, $time)\n{\n\n for ($i = 0; $i < count($GLOBALS['users']); $i++) {\n if ($GLOBALS['users'][$i]['name'] == $name) {\n $GLOBALS['users'][$i]['online'] = true;\n $GLOBALS['users'][$i]['time'] = $time;\n return true;\n }\n }\n\n add_user($name, true, $time);\n}", "public function who_was_online_today()\n\t{\n\t\t$return = array('list' => array());\n\n\t\t$sql = 'SELECT u_id, u_nickname, u_color, u_activate_hidden\n\t\t\t\tFROM ' . SQL_PREFIX . 'users\n\t\t\t\tWHERE u_last_visit > ' . mktime(0, 0, 0, date('m', CURRENT_TIME), date('d', CURRENT_TIME), date('Y', CURRENT_TIME)) . '\n\t\t\t\t\tAND u_id <> ' . VISITOR_ID . '\n\t\t\t\tORDER BY u_auth DESC, u_nickname, u_id';\n\t\t$result = Fsb::$db->query($sql);\n\n\t\t$total_user_today = 0;\n\t\t$total_hidden_today = 0;\n\t\twhile ($row = Fsb::$db->row($result))\n\t\t{\n\t\t\tif ($row['u_activate_hidden'])\n\t\t\t{\n\t\t\t\t$total_hidden_today++;\n\t\t\t\tif (Fsb::$session->auth() < MODOSUP && Fsb::$session->id() != $row['u_id'])\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$total_user_today++;\n\t\t\t}\n\n\t\t\t$return['list'][] = array(\n\t\t\t\t'is_hidden' =>\t$row['u_activate_hidden'],\n\t\t\t\t'id' =>\t\t\t$row['u_id'],\n\t\t\t\t'nickname' =>\t$row['u_nickname'],\n\t\t\t\t'color' =>\t\t$row['u_color'],\n\t\t\t\t'html' =>\t\tHtml::nickname($row['u_nickname'], $row['u_id'], $row['u_color']),\n\t\t\t);\n\t\t}\n\t\tFsb::$db->free($result);\n\n\t\t$return['total'] =\t\t\t$total_user_today + $total_hidden_today;\n\t\t$return['total_user'] =\t\t$total_user_today;\n\t\t$return['total_hidden'] =\t$total_hidden_today;\n\t\t$return['total_lang'] =\t\tsprintf(String::plural('today_user_online', $return['total']), $return['total'], $total_hidden_today);\n\n\t\treturn ($return);\n\t}", "public static function getUsersOnline($a_user_id = 0)\n\t{\n\t\tinclude_once(\"./Services/User/classes/class.ilObjUser.php\");\n\t\treturn ilObjUser::_getUsersOnline($a_user_id);\n\t}", "function usersOnline() {\n\n if(isset($_GET['onlineusers'])) {\n global $connection;\n\n if(!$connection) {\n session_start(); //start the session\n include(\"../includes/database.php\");\n\n $session_id = session_id(); //get the id of the current session\n $time = time(); //the current time\n $timeout_seconds = 5;//the amount of time until the user is marked as offline\n $timeout = $time - $timeout_seconds; //the time the user is timed out\n\n /*See if anyone is online */\n $query = \"SELECT * FROM users_online WHERE session_id = '$session_id'\";\n $send_query = mysqli_query($connection, $query);\n $count = mysqli_num_rows($send_query);\n\n if($count == NULL) {\n $query = \"INSERT INTO users_online (session_id, time) VALUES ('$session_id', '$time')\";\n mysqli_query($connection, $query);\n } else {\n $query = \"UPDATE users_online SET time = '$time' WHERE session_id = '$session_id'\";\n mysqli_query($connection, $query);\n }\n\n $query = \"SELECT * FROM users_online WHERE time > '$timeout'\";\n $users_online_query = mysqli_query($connection, $query);\n echo $users_online_count = mysqli_num_rows($users_online_query);\n } //if(!$connection)\n } //if(isset($_GET['onlineusers']))\n}", "public function getUsers() {\n $pdo = $this->getPdo();\n\n try {\n $stmt = $pdo->prepare('SELECT username FROM users WHERE TIME_TO_SEC(TIMEDIFF(NOW(), updated)) < :timedelta');\n } catch (PDOException $e) {\n error_log($e->getMessage());\n return FALSE;\n }\n $stmt->execute([\n ':timedelta' => POLL_INTERVAL * OFFLINE_CYCLES,\n ]);\n $result = $stmt->fetchAll(PDO::FETCH_NUM);\n\n if (!$result) {\n return FALSE; // TODO: Add JSON error message, oder einfach ein assoc array mit error feld?\n } else {\n $stmt = null;\n return $result; // TODO: Evtl. kümmert sich auch eine andere Funktion um das JSON encoding.\n }\n }", "function member_is_online($member_id)\n{\n $count = 0;\n $online = get_users_online(false, $member_id, $count);\n foreach ($online as $m) {\n if ($m['member_id'] == $member_id) {\n return true;\n }\n }\n return false;\n}", "function get_online( $uid )\n{\n $uid = ( $uid );\n if ( 0 < $uid )\n {\n $m_online = X::model( \"online\", \"im\" );\n return $m_online->getUserOnlineStatus( $uid );\n }\n}", "public function actionGetOnlineStatus() {\n header('Content-Type: text/event-stream');\n header('Cache-Control: no-cache');\n\n $user_name = $_GET['user'];\n json_decode($user_name);\n\n $user = Users::findByUsername($user_name);\n\n $timeFromLastConnection = time() - strtotime($user->last_connection);\n\n if ($timeFromLastConnection < 10) {\n echo \"data: (online)\\n\\n\";\n } else {\n $last_seen_time = date($user->last_connection);\n echo \"data: (offline. last seen $last_seen_time)\\n\\n\";\n }\n flush();\n }", "private function getAgentesOnline(){\n $sql = \"SELECT `idUser` FROM `user` WHERE `status` = 1 AND `tipo` = 'agente'\";\n $agts = $this->db->uery($sql);\n $agts = $agts->fetchAll();\n\n $agtsOn = array();\n\n foreach ($agts as $agt) {\n array_push($agtsOn, $agt['idUser']);\n }\n\n return $agtsOn;\n }", "public function getListUser() {\n $db = $this->dblocal;\n try {\n $stmt = $db->prepare(\"select * from m_user where username<>'admin' order by username desc\");\n $stmt->execute();\n $stat[0] = true;\n $stat[1] = $stmt->fetchAll(PDO::FETCH_ASSOC);\n return $stat;\n } catch (PDOException $ex) {\n $stat[0] = false;\n $stat[1] = $ex->getMessage();\n return $stat;\n }\n }", "function members_online()\n{\n global $ilance, $myapi, $phrase;\n \n $sql = $ilance->db->query(\"\n SELECT token\n FROM \" . DB_PREFIX . \"sessions\n GROUP BY token\n \", 0, null, __FILE__, __LINE__);\n if ($ilance->db->num_rows($sql) > 0)\n {\n if ($ilance->db->num_rows($sql) == 1)\n {\n return (int)$ilance->db->num_rows($sql) . ' ' . $phrase['_member_online'];\n }\n else\n {\n return (int)$ilance->db->num_rows($sql) . ' ' . $phrase['_members_online'];\n }\n }\n \n return $phrase['_one_member_online'];\n}", "public function getGroupOnlineUsers($group)\n {\n $this->db->where(\"group\", $group);\n $this->db->where(\"status\", \"1\");\n $query = $this->db->get(self::USERS_TABLE);\n if ($query->num_rows() > 0)\n return $query->result();\n return false;\n }", "function get_users_online_in_current_room() {\n $course_id = api_get_course_int_id();\n $meeting_data = Database::select('*', $this->table, array('where' => array('c_id = ? AND status = 1 ' => $course_id)), 'first');\n if (empty($meeting_data)) {\n return 0;\n }\n $pass = $this->get_mod_meeting_password();\n $info = $this->get_meeting_info(array('meetingId' => $meeting_data['id'], 'password' => $pass));\n\n if (!empty($info) && isset($info['participantCount'])) {\n return $info['participantCount'];\n\n }\n return 0;\n }", "public function get_limited_users()\n\t{\n\t\t$db = Database::instance();\n\t\t$query = 'SELECT u.username FROM users u, ninja_user_authorization nua '.\n\t\t\t'WHERE nua.all_hosts=0 AND u.id=nua.user_id ORDER BY u.username';\n\t\t$user_res = $db->query($query);\n\n\t\tif (count($user_res)==0) {\n\t\t\treturn false;\n\t\t}\n\t\t$users = false;\n\t\tforeach ($user_res as $user) {\n\t\t\t$users[$user->username] = $user->username;\n\t\t}\n\t\treturn $users;\n\n\t}", "public function all_online_users()\r\n\t{\r\n $users = $this->registermodel->all_online_users($_POST);\r\n $result_count=$this->registermodel->all_online_users($_POST,1);\r\n $json_data = array(\r\n \"draw\" => intval($_POST['draw'] ),\r\n \"iTotalRecords\" => intval($result_count ),\r\n \"iTotalDisplayRecords\" => intval($result_count ),\r\n \"recordsFiltered\" => intval(count($users) ),\r\n \"data\" => $users); \r\n echo json_encode($json_data);\r\n }", "public function getOnlineMembers()\n\t{\n\t\treturn SR_ClanMembers::getOnlineMembers($this->getID()); \n\t}", "function denora_get_user_status($nick)\n{\n\tglobal $denora_user_db, $denora_aliases_db, $denora_server_db, $pd_statuslookup, $ircd;\n\t$array = array();\n\t\n\tif ($pd_statuslookup == true) {\n\t\t$query = sql_query(\"SELECT $denora_user_db.*,$denora_server_db.uline FROM $denora_aliases_db,$denora_user_db,$denora_server_db WHERE $denora_aliases_db.uname = '\".sql_escape_string($nick).\"' AND $denora_aliases_db.nick = $denora_user_db.nick AND $denora_user_db.server = $denora_server_db.server ORDER BY $denora_user_db.online,$denora_user_db.lastquit DESC, $denora_user_db.connecttime ASC\");\n\t\t$data = sql_fetch_array($query);\n\t\tif ($data)\n\t\t{\n\t\t\t$array['online'] = ($data['online'] == 'Y' ? 1 : 0);\n\t\t\t$array['offline'] = ($data['online'] == 'N' ? 1 : 0);\n\t\t\t$array['oper'] = ($data['mode_lo'] == 'Y' ? 1 : 0);\n\t\t\t$array['away'] = ($data['away'] == 'Y' ? 1 : 0);\n\t\t\t$array['bot'] = ($ircd['bot'] && @$data[$ircd['bot_mode']] == 'Y') ? 1 : 0;\n\t\t\t$array['helper'] = ($ircd['helper'] && @$data[$ircd['helper_mode']] == 'Y') ? 1 : 0;\n\t\t\t$array['service'] = ($data['uline'] == 'Y' ? 1 : 0);\n\t\t\t$array['country'] = $data['country'];\n\t\t\t$array['countrycode'] = $data['countrycode'];\n\t\t\treturn $array;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn NULL;\n\t\t}\n\t}\n\telse {\n\t\treturn NULL;\n\t}\n}", "function get_users_online($longer_time, $filter, &$count)\n{\n if (get_value('no_member_tracking') === '1') {\n return array();\n }\n\n $max_to_show = 200;\n\n $users_online_time_seconds = intval($longer_time ? (60.0 * 60.0 * floatval(get_option('session_expiry_time'))) : (60.0 * floatval(get_option('users_online_time'))));\n $cutoff = time() - $users_online_time_seconds;\n\n global $SESSION_CACHE;\n\n if (get_option('session_prudence') == '1') {\n // If we have multiple servers this many not be accurate as we probably turned replication off for the sessions table. The site design should be updated to not show this kind of info\n $count = $GLOBALS['SITE_DB']->query_value_if_there('SELECT COUNT(*) FROM ' . get_table_prefix() . 'sessions WHERE last_activity>' . strval($cutoff)); // Written in by reference\n if (!is_null($filter)) {\n return $GLOBALS['SITE_DB']->query('SELECT * FROM ' . get_table_prefix() . 'sessions WHERE last_activity>' . strval($cutoff) . ' AND member_id=' . strval($filter), 1);\n }\n if (count($SESSION_CACHE) > $max_to_show) {\n return null;\n }\n }\n\n $sessions = $SESSION_CACHE;\n sort_maps_by($sessions, 'last_activity'); // There may be multiple, and we need the latest to come out of the algorithm on top\n\n $members = array();\n $guest_id = $GLOBALS['FORUM_DRIVER']->get_guest_id();\n $members_online = 0;\n foreach ($sessions as $row) {\n if (!isset($row['member_id'])) {\n continue; // Workaround to HHVM weird bug\n }\n\n if (($row['last_activity'] > $cutoff) && ($row['session_invisible'] == 0)) {\n if ($row['member_id'] == $guest_id) {\n $count++;\n $members[] = $row;\n $members_online++;\n if ($members_online == $max_to_show + 1) { // This is silly, don't display any\n if (!is_null($filter)) { // Unless we are filtering\n return $GLOBALS['SITE_DB']->query('SELECT * FROM ' . get_table_prefix() . 'sessions WHERE last_activity>' . strval($cutoff) . ' AND member_id=' . strval($filter), 1);\n }\n return null;\n }\n } elseif (!member_blocked(get_member(), $row['member_id'])) {\n $count++;\n $members[-$row['member_id']] = $row; // - (minus) is just a hackerish thing to allow it to do a unique, without messing with the above\n }\n }\n }\n return $members;\n}", "function online_status($user_id) {\r\n\t\tglobal $userpro;\r\n\t\t$res = null;\r\n\t\tif (userpro_get_option('modstate_online')) {\r\n\t\t\tif ($userpro->is_user_online($user_id)) {\r\n\t\t\t\t$res = userpro_get_badge('online');\r\n\t\t\t} else {\r\n\t\t\t\t$res = userpro_get_badge('offline');\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $res;\r\n\t}", "function getOnlineUsers() {\r\n\t\t$directory_handle = @opendir(@session_save_path());\r\n\t\t$count = 0;\r\n\t\twhile($file = @readdir($directory_handle)) {\r\n\t\t\tif(!((time()- @fileatime(session_save_path() . '/' . $file) > MAX_IDLE_TIME) || $file == '.' || $file == '..')) { \r\n\t\t\t$count++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn ($count==0)? 'Couldn\\'t calculate' : $count ;\r\n\t}", "static function getUsersOnline($channel) {\n $sql = \"SELECT SQL_CACHE `chat_accounts`.`name` as `user`\n FROM `chat_users_online`\n CROSS JOIN `chat_accounts`\n WHERE (\n `timestamp` >= ( UNIX_TIMESTAMP( ) - 45)\n AND channel = ?\n AND `chat_users_online`.`user` = `chat_accounts`.`id`\n )\";\n return DB::select($sql, array($channel));\n }", "function MyProfile_userapi_getOnline($args)\r\n{\r\n \t$idletime = $args['idletime'];\r\n \tif (!isset($idletime) || (!($idletime > 0))) $idletime = (pnConfigGetVar('secinactivemins') * 60);\r\n \t$orderby = $args['orderby'];\r\n \t$uid = $args['uid'];\r\n\r\n\t// join information to retrieve the users username also\r\n\t$joinInfo[] = array (\t'join_table' => 'users',\t\t\t// table for the join\r\n\t\t\t\t\t\t\t'join_field' => 'uname',\t\t\t// field in the join table that should be in the result with\r\n \t'object_field_name' => 'uname',\t\t\t// ...this name for the new column\r\n \t'compare_field_table' => 'id',\t\t\t\t// regular table column that should be equal to\r\n \t'compare_field_join' => 'uid');\t\t\t// ...the table in join_table\r\n\r\n\t// join information because we need the join to the sessions table\r\n\t$joinInfo[] = array (\t'join_table' => 'session_info',\t// table for the join\r\n\t\t\t\t\t\t\t'join_field' => 'lastused',\t\t\t// field in the join table that should be in the result with\r\n \t'object_field_name' => 'session_uid',\t// ...this name for the new column\r\n \t'compare_field_table' => 'id',\t\t\t\t// regular table column that should be equal to\r\n \t'compare_field_join' => 'uid');\t\t\t// ...the table in join_table\r\n\r\n $tables \t\t=& pnDBGetTables();\r\n $sess_column \t= &$tables['session_info_column'];\r\n $where = $sess_column['lastused'].\" > '\".date(\"Y-m-d H:i:s\",(time()-$idletime)).\"'\";\r\n if ($uid > 1) $where.= \"AND tbl.id = \".$uid;\r\n $res = DBUtil::selectExpandedObjectArray('myprofile',$joinInfo,$where,$orderby);\r\n // we just want every user once in the table (disctinct is not possible here or I am too stupid...)\r\n $in = array();\r\n $result = array();\r\n foreach ($res as $r) {\r\n\t\t$uid = $r['id'];\r\n\t\tif (!isset($in[$uid]) || ($in[$uid] != 1)) $result[] = $r;\r\n\t\t$in[$uid] = 1;\r\n\t}\r\n return $result;\r\n}", "public function list_users(){\n $input=array(\n 'module' => 'MysqlFE',\n 'function' => 'listusers'\n );\n $query=$this->build_query($input);\n $raw=$this->query($query);\n $ob=json_decode($raw, false);\n return $status=$ob->cpanelresult->data;\n \n }", "function get_prvd_onlinestatus($uname)\n{\n$aquery = mysql_query(\"Select * FROM tbl_srvprovider WHERE username='$uname'\") or die(\"user check error \".mysql_error());\n$row = mysql_fetch_array($aquery);\n$nrow = mysql_num_rows($aquery);\n$upass = $row['profile_status'];\n\nreturn $upass;\n}", "function getOnline() { return $this->online; }", "public function getOperatorOnlineUsers($operator)\n {\n $this->db->where(\"operator\", $operator);\n $this->db->where(\"status\", \"1\");\n $query = $this->db->get(self::USERS_TABLE);\n if ($query->num_rows() > 0)\n return $query->result();\n return false;\n }", "function getOnlineHosts(){\r\n\t\t$mountJsonData = array(\r\n\t\t\"jsonrpc\" => \"2.0\", \"method\" => \"host.get\",\r\n\t\t\t\t\"params\" => array(\r\n\t\t\t\t\t\t\t\t\"output\" => array (\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"hostid\" => \"hostid\", \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"name\" => \"name\", \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"error\"=>\"error\", \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"status\"=>\"status\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\t\t\t\"selectInterfaces\" => array (\"interfaceid\" => \"interfaceid\", \"ip\" => \"ip\"),\r\n\t\t\t\t\t\t\t\t\"filter\" => array (\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"available\" => \"1\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t\t),\r\n\t\t\"id\" => $_SESSION[\"ID\"], \"auth\" => $_SESSION[\"USER\"]);\r\n\t\t\r\n\t\t$json_data_string = json_encode($mountJsonData);\t\t\r\n\t\t$result = setOpt($json_data_string, \"GET\");\t\t\r\n\t\treturn $result;\r\n\t}", "function check_online($session_id, $location) {\n global $TABLE_PREFIX, $CURUSER;\n\n $location = sqlesc($location);\n $ip = getip();\n $uid = max(1,(int)$CURUSER['uid']);\n $suffix = sqlesc($CURUSER['suffixcolor']);\n $prefix = sqlesc($CURUSER['prefixcolor']);\n $uname = sqlesc($CURUSER['username']);\n $ugroup = sqlesc($CURUSER['level']);\n $warn = sqlesc($CURUSER['warn']);\n if ($uid == 1)\n $where = \"WHERE session_id='$session_id'\";\n else\n $where = \"WHERE user_id='$uid' OR session_id='$session_id'\";\n\n @quickQuery(\"UPDATE {$TABLE_PREFIX}online SET session_id='$session_id', user_name=$uname, user_group=$ugroup, prefixcolor=$prefix, suffixcolor=$suffix, location=$location, user_id=$uid, warn=$warn, lastaction=UNIX_TIMESTAMP() $where\");\n // record don't already exist, then insert it\n if (mysql_affected_rows() == 0) { \n @quickQuery(\"UPDATE {$TABLE_PREFIX}users SET lastconnect=NOW() WHERE id=$uid AND id>1\");\n @quickQuery(\"INSERT INTO {$TABLE_PREFIX}online SET session_id='$session_id', user_name=$uname, user_group=$ugroup, prefixcolor=$prefix, suffixcolor=$suffix, user_id=$uid, user_ip='$ip', location=$location, warn=$warn, lastaction=UNIX_TIMESTAMP()\");\n }\n\n $timeout = time() - 900; // 15 minutes\n// @quickQuery(\"UPDATE {$TABLE_PREFIX}users SET lastconnect=NOW() WHERE id IN (SELECT user_id FROM {$TABLE_PREFIX}online ol WHERE ol.lastaction<$timeout AND ol.user_id>1)\");\n @quickQuery(\"UPDATE {$TABLE_PREFIX}users u INNER JOIN {$TABLE_PREFIX}online ol ON ol.user_id = u.id SET u.lastconnect=NOW(), u.cip=ol.user_ip, u.lip=INET_ATON(ol.user_ip) WHERE ol.lastaction<$timeout AND ol.user_id>1\");\n @quickQuery(\"DELETE FROM {$TABLE_PREFIX}online WHERE lastaction<$timeout\");\n}", "function offline($name, $time = false)\n{\n\n for ($i = 0; $i < count($GLOBALS['users']); $i++) {\n if ($GLOBALS['users'][$i]['name'] == $name) {\n $GLOBALS['users'][$i]['online'] = false;\n if ($time) $GLOBALS['users'][$i]['time'] = $time;\n return true;\n }\n }\n\n add_user($name, false, $time);\n}", "function getListUsers()\n {\n $conn = dbConnect();\n if ($conn->connect_errno == 0) {\n $sql = \"SELECT * FROM users\";\n $res = $conn->query($sql);\n if ($res) {\n $data = $res->fetch_all(MYSQLI_ASSOC);\n $res->free();\n return $data;\n } else {\n return false;\n }\n } else {\n return false;\n }\n }", "public function getAllOnlineUsers()\n {\n if ($directory_handle = opendir(session_save_path())) {\n $count = 0;\n\n while (false !== ( $file = readdir($directory_handle) )) {\n if ($file != '.' && $file != '..') {\n if (time() - fileatime(session_save_path() . '/' . $file) < $this->_max_idle_mins * 60) {\n $count++;\n }\n }\n }\n closedir($directory_handle);\n return $count;\n } else {\n return false;\n }\n }", "public function findOnline() {}", "public function getOnline()\n\t{\n\t\treturn $this->online;\n\t}", "public function getOnlineUsers($interval = 5, $limit = false, $page = 1)\n {\n $select = $this->getAdapter()->select();\n $select->from($this->_name);\n $select->where('last_seen > (NOW() - INTERVAL ' . $interval . ' MINUTE)');\n\n if ($limit) {\n $select->limitPage($page, $limit);\n }\n\n return $select->query()->fetchAll(Zend_Db::FETCH_OBJ);\n }", "function retrieveUsers() {\n\tinclude ('database.php');\n\t$status = array();\n\t$conn = openDB();\n\n\tif (!$conn) {\n\t\techo 'open db fail';\n\t} else {\n\n\t\t$sql = \"SELECT email FROM signupkeys WHERE status = '1'\";\n\t\t//echo \"$sql\";\n\t\t$result = array();\n\t\tmysql_select_db($db);\n\t\t$retval = mysql_query($sql, $conn);\n\t\tif ($retval) {\n\t\t\twhile ($row = mysql_fetch_assoc($retval)) {\n\t\t\t\tarray_push($result, $row);\n\t\t\t}\n\t\t\t$status = array('code' => count($result), 'data' => $result, 'message' => 'success');\n\t\t} else {\n\t\t\t$status = array('code' => -1, 'message' => mysql_error());\n\t\t}\n\n\t\tcloseDB($conn);\n\t\treturn $status;\n\t}\n}", "public static function users_connected_by_id()\n {\n $count = who_is_online_count();\n $user_connect = who_is_online(0, $count, null, null, 30, true);\n $user_id_list = array();\n for ($i = 0; $i < count($user_connect); $i++) {\n $user_id_list[$i] = $user_connect[$i][0];\n }\n\n return $user_id_list;\n }", "public function online()\n {\n return $this->ts3->clientList();\n }", "public function is_online() {\n\t\treturn $this->online;\n\t}", "public function refreshOnlineUsers(){\r\n\t}", "static function OnlineUsers($limit = 0)\n\t{\n\t\tglobal $date;\n\t\t\n\t\t$q = \"SELECT * FROM {DA}users WHERE lastonline > '$date[f]'\";\n\t\t\n\t\tif($limit > 0)\n\t\t\t$q .= \" ORDER BY RAND() LIMIT $limit\";\n\t\t\t\n\t\treturn query($q);\n\t}", "public function getOnline()\n {\n return $this->online;\n }", "public function isOnline()\n {\n if (!isset($this->_isOnline)) {\n $onlinehandler = xoops_gethandler('online');\n // $this->_isOnline = ($onlinehandler->getCount(new Criteria('online_uid', $this->getVar('uid', 'N'))) > 0) ? true : false;\n $this->_isOnline = $onlinehandler->getCount(new Criteria('online_uid', $this->getVar('uid', 'N'))) > 0;\n }\n return $this->_isOnline;\n }", "public function isOnline()\n\t{\n\t\treturn $this->online;\n\t}", "function isOnline($user_id){\n\n $sql = \"SELECT * from user WHERE user_id ='$user_id' AND `last_activity`<DATE_SUB(NOW(), INTERVAL 5 SECOND)\";\n\n $result = mysqli_fetch_assoc(mysqli_query(self::$db, $sql));\n\n return $result;\n\n }", "private function _isOnline($input) {\n\t\tif(!$this->_identifier) throw new Exception(lang('error_88'));\n\t\tswitch($input) {\n\t\t\tcase 'userid':\n\t\t\t\t// get account information using the id\n\t\t\t\t$accountInfo = $this->common->accountInformation($this->_identifier);\n\t\t\t\tif(!$accountInfo) throw new Exception(lang('error_12'));\n\t\t\t\t\n\t\t\t\t// check online status\n\t\t\t\treturn $this->common->accountOnline($accountInfo[_CLMN_USERNM_]);\n\t\t\t\tbreak;\n\t\t\tcase 'username':\n\t\t\t\t// check online status\n\t\t\t\treturn $this->common->accountOnline($this->_identifier);\n\t\t\t\tbreak;\n\t\t\tcase 'email':\n\t\t\t\t// get the account id using the email\n\t\t\t\t$userId = $this->common->retrieveUserIDbyEmail($this->_identifier);\n\t\t\t\tif(!$userId) throw new Exception(lang('error_12'));\n\t\t\t\t\n\t\t\t\t// get account information using the id\n\t\t\t\t$accountInfo = $this->common->accountInformation($userId);\n\t\t\t\tif(!$accountInfo) throw new Exception(lang('error_12'));\n\t\t\t\t\n\t\t\t\t// check online status\n\t\t\t\treturn $this->common->accountOnline($accountInfo[_CLMN_USERNM_]);\n\t\t\t\tbreak;\n\t\t\tcase 'character':\n\t\t\t\t// get account username from character data\n\t\t\t\t$characterData = $this->character->CharacterData($this->_identifier);\n\t\t\t\tif(!$characterData) throw new Exception(lang('error_12'));\n\t\t\t\t\n\t\t\t\t// check online status\n\t\t\t\treturn $this->common->accountOnline($characterData[_CLMN_CHR_ACCID_]);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new Exception(lang('error_88'));\n\t\t}\n\t}", "function getMembersOnlineStats($membersOnlineOptions)\n{\n\tglobal $settings, $txt;\n\n\t// The list can be sorted in several ways.\n\t$allowed_sort_options = array(\n\t\t'log_time',\n\t\t'real_name',\n\t\t'show_online',\n\t\t'group_name',\n\t);\n\t// Default the sorting method to 'most recent online members first'.\n\tif (!isset($membersOnlineOptions['sort']))\n\t{\n\t\t$membersOnlineOptions['sort'] = 'log_time';\n\t\t$membersOnlineOptions['reverse_sort'] = true;\n\t}\n\n\t// Not allowed sort method? Bang! Error!\n\telseif (!in_array($membersOnlineOptions['sort'], $allowed_sort_options))\n\t\ttrigger_error('Sort method for getMembersOnlineStats() function is not allowed', E_USER_NOTICE);\n\n\t// Initialize the array that'll be returned later on.\n\t$membersOnlineStats = array(\n\t\t'users_online' => array(),\n\t\t'list_users_online' => array(),\n\t\t'online_groups' => array(),\n\t\t'num_guests' => 0,\n\t\t'num_spiders' => 0,\n\t\t'num_buddies' => 0,\n\t\t'num_users_hidden' => 0,\n\t\t'num_users_online' => 0,\n\t);\n\n\t// Get any spiders if enabled.\n\t$spiders = array();\n\t$spider_finds = array();\n\tif (!empty($settings['spider_mode']) && !empty($settings['show_spider_online']) && ($settings['show_spider_online'] < 3 || allowedTo('admin_forum')) && !empty($settings['spider_name_cache']))\n\t\t$spiders = unserialize($settings['spider_name_cache']);\n\n\t// Load the users online right now.\n\t$request = wesql::query('\n\t\tSELECT\n\t\t\tlo.id_member, lo.log_time, lo.id_spider, mem.real_name, mem.member_name,\n\t\t\tmem.show_online, mg.id_group, mg.group_name\n\t\tFROM {db_prefix}log_online AS lo\n\t\t\tLEFT JOIN {db_prefix}members AS mem ON (mem.id_member = lo.id_member)\n\t\t\tLEFT JOIN {db_prefix}membergroups AS mg ON (mg.id_group = CASE WHEN mem.id_group = {int:reg_mem_group} THEN mem.id_post_group ELSE mem.id_group END)',\n\t\tarray(\n\t\t\t'reg_mem_group' => 0,\n\t\t)\n\t);\n\twhile ($row = wesql::fetch_assoc($request))\n\t{\n\t\tif (empty($row['real_name']))\n\t\t{\n\t\t\t// Do we think it's a spider?\n\t\t\tif ($row['id_spider'] && isset($spiders[$row['id_spider']]))\n\t\t\t{\n\t\t\t\t$spider_finds[$row['id_spider']] = isset($spider_finds[$row['id_spider']]) ? $spider_finds[$row['id_spider']] + 1 : 1;\n\t\t\t\t$membersOnlineStats['num_spiders']++;\n\t\t\t}\n\t\t\t// Guests are only nice for statistics.\n\t\t\t$membersOnlineStats['num_guests']++;\n\n\t\t\tcontinue;\n\t\t}\n\n\t\telseif (empty($row['show_online']) && empty($membersOnlineOptions['show_hidden']))\n\t\t{\n\t\t\t// Just increase the stats and don't add this hidden user to any list.\n\t\t\t$membersOnlineStats['num_users_hidden']++;\n\t\t\tcontinue;\n\t\t}\n\n\t\t$link = '<a href=\"<URL>?action=profile;u=' . $row['id_member'] . '\">' . $row['real_name'] . '</a>';\n\n\t\t// Buddies get counted and highlighted.\n\t\t$is_buddy = in_array($row['id_member'], we::$user['buddies']);\n\t\tif ($is_buddy)\n\t\t{\n\t\t\t$membersOnlineStats['num_buddies']++;\n\t\t\t$link .= ' <span class=\"contact\"></span>';\n\t\t}\n\n\t\t// A lot of useful information for each member.\n\t\t$membersOnlineStats['users_online'][$row[$membersOnlineOptions['sort']] . $row['member_name']] = array(\n\t\t\t'id' => $row['id_member'],\n\t\t\t'username' => $row['member_name'],\n\t\t\t'name' => $row['real_name'],\n\t\t\t'group' => $row['id_group'],\n\t\t\t'href' => '<URL>?action=profile;u=' . $row['id_member'],\n\t\t\t'link' => $link,\n\t\t\t'is_buddy' => $is_buddy,\n\t\t\t'hidden' => empty($row['show_online']),\n\t\t\t'is_last' => false,\n\t\t);\n\n\t\t// This is the compact version, simply implode it to show.\n\t\t$membersOnlineStats['list_users_online'][$row[$membersOnlineOptions['sort']] . $row['member_name']] = empty($row['show_online']) ? $link . ' <span class=\"notonline\" title=\"' . $txt['hidden'] . '\"></span>' : $link;\n\n\t\t// Store all distinct (primary) membergroups that are shown.\n\t\tif (!isset($membersOnlineStats['online_groups'][$row['id_group']]))\n\t\t\t$membersOnlineStats['online_groups'][$row['id_group']] = array(\n\t\t\t\t'id' => $row['id_group'],\n\t\t\t\t'name' => $row['group_name']\n\t\t\t);\n\t}\n\twesql::free_result($request);\n\n\t// If there are spiders only and we're showing the detail, add them to the online list - at the bottom.\n\tif (!empty($spider_finds) && $settings['show_spider_online'] > 1)\n\t\tforeach ($spider_finds as $id => $count)\n\t\t{\n\t\t\t$link = $spiders[$id] . ($count > 1 ? ' (' . $count . ')' : '');\n\t\t\t$sort = $membersOnlineOptions['sort'] === 'log_time' && $membersOnlineOptions['reverse_sort'] ? 0 : 'zzz_';\n\t\t\t$membersOnlineStats['users_online'][$sort . $spiders[$id]] = array(\n\t\t\t\t'id' => 0,\n\t\t\t\t'username' => $spiders[$id],\n\t\t\t\t'name' => $link,\n\t\t\t\t'group' => $txt['spiders'],\n\t\t\t\t'href' => '',\n\t\t\t\t'link' => $link,\n\t\t\t\t'is_buddy' => false,\n\t\t\t\t'hidden' => false,\n\t\t\t\t'is_last' => false,\n\t\t\t);\n\t\t\t$membersOnlineStats['list_users_online'][$sort . $spiders[$id]] = $link;\n\t\t}\n\n\t// Time to sort the list a bit.\n\tif (!empty($membersOnlineStats['users_online']))\n\t{\n\t\t// Determine the sort direction.\n\t\t$sortFunction = empty($membersOnlineOptions['reverse_sort']) ? 'ksort' : 'krsort';\n\n\t\t// Sort the two lists.\n\t\t$sortFunction($membersOnlineStats['users_online']);\n\t\t$sortFunction($membersOnlineStats['list_users_online']);\n\n\t\t// Mark the last list item as 'is_last'.\n\t\t$userKeys = array_keys($membersOnlineStats['users_online']);\n\t\t$membersOnlineStats['users_online'][end($userKeys)]['is_last'] = true;\n\t}\n\n\t// Also sort the membergroups.\n\tksort($membersOnlineStats['online_groups']);\n\n\t// Hidden and non-hidden members make up all online members.\n\t$membersOnlineStats['num_users_online'] = count($membersOnlineStats['users_online']) + $membersOnlineStats['num_users_hidden'] - (isset($settings['show_spider_online']) && $settings['show_spider_online'] > 1 ? count($spider_finds) : 0);\n\n\treturn $membersOnlineStats;\n}", "public function isOnline()\n {\n return Cache::has('user-online-' . $this->id);\n }", "function WhoIsOnline(){\n\t\n\tglobal $db_sessions,$db_admin,$db_admin_contact,$db_country,$db_setup;\n\tglobal $url_flags;\n\tglobal $eden_cfg;\n\t\n\t/* Nacteni nastaveni */\n\t$res_setup = mysql_query(\"SELECT setup_article_archive, setup_reg_admin_nick FROM $db_setup\") or die (\"<strong>File:</strong> \".__FILE__.\"<br /><strong>Line:</strong>\".__LINE__.\"<br />\".mysql_error());\n\t$ar_setup = mysql_fetch_array($res_setup);\n\t\n\t$res = mysql_query(\"SELECT a.admin_id, a.admin_nick, a.admin_firstname, a.admin_name, ac.admin_contact_country, ac.admin_contact_icq, ac.admin_contact_xfire, s.sessions_user, c.country_shortname \n\tFROM $db_admin AS a, \n\t$db_sessions AS s, \n\t$db_country AS c, \n\t$db_admin_contact AS ac \n\tWHERE s.sessions_user = a.admin_uname AND s.sessions_pages = '\".mysql_real_escape_string($eden_cfg['misc_web']).\"' AND ac.aid = a.admin_id AND ac.admin_contact_country = c.country_id GROUP BY s.sessions_user ORDER BY a.admin_nick ASC\") or die (\"<strong>File:</strong> \".__FILE__.\"<br /><strong>Line:</strong>\".__LINE__.\"<br />\".mysql_error());\n\techo \"<table>\\n\";\n\twhile ($ar = mysql_fetch_array($res)){\n\t\t$admin_id = $ar['admin_id'];\n\t\tif ($ar_setup['setup_reg_admin_nick'] == 1){$admin_nickname = $ar['admin_nick'];} else {$admin_nickname = $ar['admin_firstname'].' '.$ar['admin_name'];}\n\t\t$admin_contact_icq = $ar['admin_contact_icq'];\n\t\t$admin_contact_xfire = $ar['admin_contact_xfire'];\n\t\t$admin_contact_country = $ar['admin_contact_country'];\n\t\t$country_shortname = $ar['country_shortname'];\n\t\tinclude \"templates/tpl.users.whoisonline.php\";\n\t}\n\techo \"</table>\\n\";\n}", "function getActiveUsers($roomID) {\n\t//Find all users active within interval\n\t$interval = time() - PHPSC_USER_EXPIRE_INTERVAL;\n\t$users = array();\n\t$sql = \"SELECT DISTINCT usr FROM chat_users WHERE roomid = $roomID AND lastaction > $interval\";\n\tif ($result = dbQuery($sql)) {\n\t\twhile ($row = dbFetchArray($result)) {\n\t\t\t$users[]=$row[\"usr\"];\n\t\t}\n\t}\n\treturn $users;\n}", "function isOnline() {\n $this->setStatus();\n return $this->status;\n }", "function Users_Online()\r\n{\r\n if(isset($_GET['onlineusers']))\r\n {\r\n global $sqlconnection;\r\n if(!$sqlconnection)\r\n {\r\n session_start();\r\n include(\"../includes/Db.php\"); \r\n $session =Escape(session_id());// Get current session's id\r\n $time = time();\r\n $timeoutsecs = 05;\r\n $timeout = $time - $timeoutsecs;\r\n $usersessionquery =mysqli_prepare($sqlconnection,\"SELECT * FROM USERS_ONLINE WHERE SESSION = ?\");\r\n mysqli_stmt_bind_param($usersessionquery,\"s\",$session);\r\n mysqli_stmt_execute($usersessionquery);\r\n mysqli_stmt_store_result($usersessionquery);\r\n $rowcount = mysqli_stmt_num_rows($usersessionquery);\r\n if($rowcount == NULL){\r\n $insertonlinequery = mysqli_prepare($sqlconnection,\"INSERT INTO USERS_ONLINE (SESSION,TIME) VALUES (?,?) \");\r\n $bindparam= mysqli_stmt_bind_param($insertonlinequery,\"si\",$session,$time);\r\n $result =mysqli_stmt_execute($insertonlinequery);\r\n }\r\n else{\r\n $updateonlinequery = mysqli_prepare($sqlconnection,\"UPDATE USERS_ONLINE SET TIME=? WHERE SESSION = ?\");\r\n mysqli_stmt_bind_param($updateonlinequery,\"is\",$time,$session);\r\n mysqli_stmt_execute($updateonlinequery);\r\n } \r\n $useronlinequery = mysqli_prepare($sqlconnection,\"SELECT * FROM USERS_ONLINE WHERE TIME > ?\");\r\n mysqli_stmt_bind_param($useronlinequery,\"i\",$timeout);\r\n mysqli_stmt_execute($useronlinequery);\r\n mysqli_stmt_store_result($useronlinequery);\r\n echo $usersonline = mysqli_stmt_num_rows($useronlinequery);\r\n }\r\n }\r\n}", "public function isOnline() {}", "public function getOnlineUsersByID(array $ids) {\n\t\t\tif (!empty($ids)) {\n\t\t\t $keys = array_map(function ($userId) {\n\t\t\t return str_replace('{:userId}', $userId, self::ONLINE_CACHE_PREFIX_KEY);\n\t\t\t }, $ids);\n\t\t\t $result = $this->redisCon->mget($keys);\n\t\t\t return array_filter(array_combine($ids,$result));\n\t\t\t} else return false; \n\t\t}", "public function getOnline() {\n return $this->online;\n }", "public function isOnline()\n {\n return Cache::has('user-is-online-' . $this->id);\n }", "function get_all_users()\n {\n include('connect.php');\n $users_query = \"SELECT * FROM tbl_user WHERE `user_active` = true\";\n\n $get_users = $pdo->prepare($users_query);\n $get_users->execute();\n\n $users = [];\n while ($row = $get_users->fetch(PDO::FETCH_ASSOC)) {\n $users[] = $row;\n }\n return $users;\n }", "public function actionIndex()\n {\n // clear user online list\n UserOnline::clearList();\n \n if (!UserOnline::findOne(['user_id' => Yii::$app->adminuser->id])) {\n Yii::$app->response->statusCode = 401;\n return Yii::$app->response->send();\n }\n // return users, verify force reload.\n return [\n 'useronline' => UserOnline::getList(),\n 'forceReload' => Yii::$app->adminuser->identity->force_reload,\n 'locked' => UserOnline::find()->select(['lock_pk', 'lock_table', 'last_timestamp', 'u.firstname', 'u.lastname', 'u.id'])->where(['!=', 'u.id', Yii::$app->adminuser->id])->joinWith('user as u')->createCommand()->queryAll(),\n ];\n }", "public function getOnline(int $status=0){\n return $this::where(\"online\",$status)->get();\n }", "public function getOnlineStatus() {\n return $this->online;\n }", "function getUsers() {\r\n\t\t$sql = \"SELECT * FROM users\";\r\n\t\t$result = $this->query ( $sql );\r\n\t\t\r\n\t\tif ($result === FALSE) {\r\n\t\t\techo '<pre class=\"bg-danger\">';\r\n\t\t\tprint_r ( $this->errorInfo () );\r\n\t\t\techo '</pre>';\r\n\t\t\treturn array ();\r\n\t\t}\r\n\t\t\r\n\t\t$users = array ();\r\n\t\tforeach ( $result as $row ) {\r\n\t\t\t$users [] = User::getUserFromRow ( $row );\r\n\t\t}\r\n\t\tif (empty ( $users )) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn $users;\r\n\t}", "function getPrivateInvites($username) {\n\t$interval = time() - PHPSC_PRIVATE_INVITE_EXPIRE;\n\t$resultArray = array();\n\t$sql = \"SELECT * FROM chat_invites WHERE targetuser = '$username' AND requesttime > $interval AND joined = 0\";\n\tif ($result = dbQuery($sql)) {\n\t\twhile ($row = dbFetchArray($result)) {\n\t\t\t$user = $row[\"usr\"];\n\t\t\t$roomID = $row[\"roomid\"];\n\t\t\t$ID = $row[\"id\"];\n\t\t\t$resultArray[] = array('user'=>$user, 'roomID'=>$roomID, 'ID'=>$ID);\n\t\t}\n\t\treturn $resultArray;\n\t}\n\treturn false;\n}", "static function getAllUsers(){\r\n\trequire(\"../settings/dbsettings.php\");\r\n\t$query=\"SELECT `UID`,`username` FROM `tbl_auth` ORDER BY `username`\";\r\n\t\t$result = $mdb2->query($query) or die('An unknown error occurred while checking the data');\r\n\t\tif(MDB2::isError($result)){\r\n\t\t\treturn \"SelectError\";\r\n\t\t}else{\r\n\t\t\t$native_result = $result->getResource();\r\n\t\t\t$result_assoc=Mysql_Fetch_Assoc($native_result);\r\n\t\t\tif(count($result_assoc)>0){\r\n\t\t\t\treturn $native_result;\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function getIsOnline()\n\t{\n\t\treturn $this->is_online;\n\t}", "public function getUserlistapi() {\n\n $users = array();\n $return_user = array();\n $users = Login::getUserlistall();\n if (isset($users) && $users['status'] == '1') {\n $return_user['success'] = \"1\";\n $return_user['data'] = $users['data'];\n } else {\n $return_user['success'] = \"0\";\n $return_user['message'] = \"There is no more user.\";\n }\n return $return_user;\n }", "public function getallusers()\n\t{\n\t\t$this->writelog(\"getallusers() \\n\");\n\t\t$retVal = '';\n\t\ttry\n\t\t{\n\t\t\t//Check memcache\n\t\t\t// initialize class member variables\n\t\t\t$this->_client = new SoapClient($_SERVER['SOAP_CLIENT_URL']);\n\t\t\t$response = $this->_client->getallusers();\n\t\t\t$retVal = $response;\t\t\t\t\t\t\n\t\t}\n\t\tcatch (SoapFault $fault) \n\t\t{\n\t\t\t$retVal = \"SOAP Fault: (faultcode: {$fault->faultcode}, faultstring: {$fault->faultstring})\";\n\t\t}\n\t\t\n\t\treturn $retVal;\n\t}", "public static function getUsers(){\n\t\tif($_SESSION['user']['name']){\n\t\t\t$user = new ChatUser(array('name' => $_SESSION['user']['name']));\n\t\t\t$user->update();\n\t\t}\n\n\t\t/*Deleting chat messages that is older than 5 min\n and users that haven't been active the last 30 sec.*/\n\t\tDB::query(\"DELETE FROM webchat_lines WHERE ts < SUBTIME(NOW(),'0:5:0')\");\n\t\tDB::query(\"DELETE FROM webchat_users WHERE last_activity < SUBTIME(NOW(),'0:0:30')\");\n\n\t\t$result = DB::query('SELECT * FROM webchat_users ORDER BY name ASC LIMIT 18');\n\t\t$users = array();\n\n\t\t//Here we might get some problems ====\n\t\twhile($user = $result->fetch_object()){\n\t\t\t$users[] = $user;\n\t\t}\n\n\t\treturn array(\n\t\t\t'users' => $users,\n\t\t\t'total' => DB::query('SELECT COUNT(*) as cnt FROM webchat_users')->fetch_object()->cnt\n\t\t);\n\t}", "function denora_num_users()\n{\n global $denora_user_db;\n \n if ($denora_user_db) {\n\treturn sql_query_num_rows(sprintf(\"select * from %s where online = 'Y'\", $denora_user_db));\n } else {\n\treturn 0;\n }\n}", "function check_registered_users($username){\n\t $condition = \"md5(email) = \".\"'\".$username.\"' AND status = 1\";\n\t $this->db->select('*');\n\t $this->db->from($this->config->item('ems_users','dbtables'));\n\t $this->db->where($condition);\n\t $this->db->limit(1);\n\t $query = $this->db->get();\n\n\t if ($query->num_rows() == 1) {\n\t\t\treturn $query->result();\n\t }else{\n\t\t\t$condition2 = \"md5(email) = \".\"'\".$username.\"' AND status = 1\";\n\t\t\t$this->db->select('*');\n\t\t\t$this->db->from($this->config->item('ems_organisers','dbtables'));\n\t\t\t$this->db->where($condition2);\n\t\t\t$this->db->limit(1);\n\t\t\t$query2 = $this->db->get();\n\t\t\t\n\t\t\tif($query2->num_rows() == 1){\n\t\t\t\treturn $query2->result();\t\n\t\t\t}else{\n\t\t\t\treturn array();\n\t\t\t}\t\t\n\t\t}\n\t}", "public function getOnlineFriendsAndPartners($status = null) {\n if ( !$this->getId() ) {\n throw new Exception('Primary Key does not contain a value');\n }\n\n $online_users = $this->getMapper()->getDbTable()->getOnlineFriendsAndPartners($this->getId(), $this->getType(), $status);\n ksort($online_users);\n\n $result = array();\n \tforeach ($online_users as $idx => $row) {\n\t\t\t$user = $this->fill($row);\n\t\t\t$result[$idx] = $user;\n \t}\n\n \treturn $result;\n }", "function print_online_status($userid = 0, $offlinecolor = '', $onlinecolor = '')\n{\n global $ilance, $myapi, $phrase, $ilconfig, $show;\n \n $isonline = '<span class=\"' . $offlinecolor . '\">' . $phrase['_offline'] . '</span>';\n \n // are we online?\n if (isset($show['lancealert']) AND $show['lancealert'])\n {\n // we don't appear to be online the web site, are we connected via lancealert?\n $sqlla = $ilance->db->query(\"\n SELECT u.username, s.userID, s.status\n FROM \" . DB_PREFIX . \"alert_sessions s,\n \" . DB_PREFIX . \"users u\n WHERE u.username = s.userID\n AND u.user_id = '\" . intval($userid) . \"'\n AND u.status = 'active'\n \", 0, null, __FILE__, __LINE__);\n if ($ilance->db->num_rows($sqlla) > 0)\n {\n $resla = $ilance->db->fetch_array($sqlla);\n switch ($resla['status'])\n {\n case '0':\n {\n // online\n $isonline = '<a href=\"lamsgr:SendIM?' . $resla['userID'] . '\"><img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'la_online.gif\" border=\"0\" alt=\"IM Status: Online .. Click to Chat\" /></a>';\n break;\n } \n case '1':\n {\n // busy\n $isonline = '<img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'la_online.gif\" border=\"0\" alt=\"IM Status: Busy\" />';\n break;\n } \n case '2':\n {\n // do not disturb\n $isonline = '<img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'la_online.gif\" border=\"0\" alt=\"IM Status: Do Not Disturb\" />';\n break;\n } \n case '3':\n {\n // away\n $isonline = '<img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'la_online.gif\" border=\"0\" alt=\"IM Status: Away\" />';\n break;\n } \n case '4':\n {\n // offline / invisible\n $isonline = '<img src=\"' . $ilconfig['template_relativeimagepath'] . $ilconfig['template_imagesfolder'] . 'la_offline.gif\" border=\"0\" alt=\"IM Status: '.$phrase['_offline'].'\" />';\n break;\n }\n }\n }\n else \n {\n $sql = $ilance->db->query(\"\n SELECT u.user_id, s.title\n FROM \" . DB_PREFIX . \"sessions s,\n \" . DB_PREFIX . \"users u\n WHERE u.user_id = '\" . intval($userid) . \"'\n AND u.user_id = s.userid\n AND isuser = '1'\n \", 0, null, __FILE__, __LINE__);\n if ($ilance->db->num_rows($sql) > 0)\n {\n $isonline = '<span class=\"' . $onlinecolor . '\">' . $phrase['_online'] . '</span>';\n }\t\n }\n }\n else \n {\n $sql = $ilance->db->query(\"\n SELECT u.user_id, s.title\n FROM \" . DB_PREFIX . \"sessions s,\n \" . DB_PREFIX . \"users u\n WHERE u.user_id = '\" . intval($userid) . \"'\n AND u.user_id = s.userid\n AND isuser = '1'\n \", 0, null, __FILE__, __LINE__);\n if ($ilance->db->num_rows($sql) > 0)\n {\n $isonline = '<span class=\"' . $onlinecolor . '\">' . $phrase['_online'] . '</span>';\n }\n }\n \n return $isonline;\t\n}", "function checkonline($username=0){\n\t\n\t\tif (isset($_POST['ajax'])){\n\t\t\n\t\t\t$this->load->model('onlinestatus_model');\n\t\t\t$this->onlinestatus_model->checkonline($username);\n\t\t}\t\n\t}", "function getLobbyUsers($username) {\n\t\t$usernames = $this->mdb->queryOneColumn(\"username\", \"SELECT g.username FROM lobby as l LEFT OUTER JOIN gameUser as g ON l.id = g.lobbyId\n\t\t\tWHERE g.isOnline = 1 AND l.id IN (SELECT l.id FROM lobby as l LEFT OUTER JOIN gameUser as g ON l.id = g.lobbyId WHERE g.username = %s)\", $username);\n\t\t\n\t\t// error_log( print_r($usernames, true).\"\\n\", 3, __DIR__.\"/test.log\");\n\t\treturn $usernames;\n\t}", "public function GetUsers()\n\t{\n\t\t$users = UserDAL::GetAllUsers();\n\t\tif($users)\n\t\t\treturn $users;\n\t\telse\n\t\t\treturn false;\n\t}", "static public function getActiveUsers(){\n $conn = DbHandler::getConnection();\n $query = \"SELECT id, username FROM users \".\n \"WHERE id != \".$conn->escapeString(static::getCurrentUserId()).\n \" AND last_activity >= \" . $conn->escapeString(getMicrotime() - 3000);\n\n $result = $conn->query($query);\n\n $data = array();\n if($result instanceof Sqlite3Result) {\n while ($row = $result->fetchArray()) {\n $data[] = array('id' => $row['id'], 'username' => $row['username']);\n }\n }\n\n return $data;\n }", "private function loadOnlineUser() {\r\n $user = User::find('online = 1');\r\n if($user !== false) {\r\n $this->view->onlineUser = $user;\r\n }\r\n }", "public function isOnline(): bool\n {\n return Cache::has('user-is-online-' . $this->id);\n }", "public function getUserConnected()\n {\n $stmt = $this->db->prepare(\"SELECT * FROM User WHERE Connected = 1\");\n $stmt->execute();\n return $stmt->fetchAll();\n }", "public function get_connected()\n\t\t{\n return $req = $this->db->select('*')\n ->from($this->get_db_table())\n ->where('email', $this->email)\n ->where('password', $this->password)\n ->get()\n ->result_array();\n\t\t\t//return $req->row_array();\n\t\t}" ]
[ "0.84730434", "0.76582587", "0.7593298", "0.75120175", "0.7497383", "0.74685436", "0.7468169", "0.7468169", "0.74635404", "0.74523526", "0.74419755", "0.74072", "0.7361422", "0.7282878", "0.7261797", "0.7258237", "0.7217265", "0.72149485", "0.70898336", "0.70683664", "0.7048692", "0.70310456", "0.7018516", "0.69948953", "0.6984991", "0.69770914", "0.68788797", "0.6875614", "0.6856885", "0.68423575", "0.68373054", "0.68077576", "0.6783171", "0.6781504", "0.67653376", "0.6719989", "0.6688036", "0.66831607", "0.6638094", "0.66032773", "0.65897554", "0.65897375", "0.6561736", "0.6542353", "0.65383786", "0.6511912", "0.651091", "0.65019155", "0.64910334", "0.64811784", "0.6475419", "0.6473104", "0.6462568", "0.6434169", "0.6434104", "0.64234614", "0.64208734", "0.6411908", "0.64038527", "0.6401278", "0.6386661", "0.6386361", "0.63554054", "0.6347201", "0.63242495", "0.6321352", "0.6312321", "0.63028646", "0.62898624", "0.6286492", "0.62848663", "0.6283233", "0.62808615", "0.6278056", "0.6274271", "0.6272338", "0.62672937", "0.62589586", "0.6257598", "0.62544185", "0.62493086", "0.6247629", "0.624587", "0.62291914", "0.622646", "0.6207271", "0.61858165", "0.6169324", "0.616736", "0.616556", "0.61620116", "0.61603475", "0.61421806", "0.61386436", "0.6135382", "0.61276394", "0.6121809", "0.6115042", "0.6108025", "0.6107362" ]
0.7742403
1
given an array of user ids (chat participants), get the associated Conversation_Id params: FromUser_Id the user creating the conversation User_Id_Array an array of user ids: array( 1,2,3 ... ) returns: Conversation_Id (int) on success, or an errormsg on error
дан массив идентификаторов пользователей (участников чата), получить связанный Conversation_Id параметры: FromUser_Id пользователь, создающий чат User_Id_Array массив идентификаторов пользователей: array( 1,2,3 ... ) возвращает: Conversation_Id (int) при успешном выполнении, или сообщение об ошибке в случае ошибки
function CreateConversationId( $FromUser_Id, $User_Id_Array ){ // given an array of user ids - // 1) check if this exact group of ids is already forming a conversation. // 2) if so, return the conversation id - finished. // 3) otherwise, create a new conversation id record // 4) insert each user id into the participants table // 5) return the new conversation id. if( ! is_int( $FromUser_Id ) || ! is_array( $User_Id_Array ) || 0 == count( $User_Id_Array ) ) return( "Param error: FromUser_Id / User_Id_Array - wrong type or empty." ); // sort the User_Id_Array in numeric order sort( $User_Id_Array, SORT_NUMERIC ); $IdList = implode( $User_Id_Array, ',' ); // search for idlist $Sql = "SELECT Id FROM ChatConversations WHERE UserId_List = '$IdList' LIMIT 1"; $result = mysql_query( $Sql ); $errno = mysql_errno(); if( 0 != $errno ) return( "mysql error: $errno" ); if( 0 < mysql_num_rows( $result ) ){ $row = mysql_fetch_row( $result ); mysql_free_result( $result ); return( (int)$row[0] ); } mysql_query( "BEGIN" ); // conversation doesn't yet exist, create a new one and return it's id. $Sql = "INSERT INTO ChatConversations (Id,CreatedByUser_Id,CreatedDate,UserId_List) VALUES (NULL,$FromUser_Id,NOW(),'$IdList')"; $result = mysql_query( $Sql ); $errno = mysql_errno(); if( 0 != $errno ){ mysql_query( "ROLLBACK" ); return( "mysql error: $errno" ); } $Conversation_Id = mysql_insert_id(); // create a multi-insert record $Values = ''; foreach( $User_Id_Array as $Id ) $Values .= "(NULL,$Conversation_Id,$Id),"; $Values = rtrim( $Values, "," ); $Sql = "INSERT INTO ChatConversationParticipants (Id,Conversation_Id,User_Id) VALUES $Values"; mysql_query( $Sql ); $errno = mysql_errno(); if( 0 != $errno ){ mysql_query( "ROLLBACK" ); return( "mysql error: $errno" ); } mysql_query( "COMMIT" ); return( (int)$Conversation_Id ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function GetConversationIdsFromUserId( $FromUser_Id ){\n\n\tif( ! is_int( $FromUser_Id ) )\n\t\treturn( \"Param error: FromUser_Id - wrong type or empty.\" );\n\n\t$Sql = \"SELECT Conversation_Id FROM ChatConversationParticipants WHERE User_Id = $FromUser_Id\";\n\t$result = mysql_query( $Sql );\n\t$errno = mysql_errno();\n\tif( 0 != $errno )\n\t\treturn( \"mysql error: $errno\" );\n\t$Conversation_Ids = array();\n\twhile( $row = mysql_fetch_row( $result ) )\n\t\t$Conversation_Ids[] = $row[0];\n\tmysql_free_result( $result );\n\treturn( $Conversation_Ids );\n}", "function GetUsersInConversation( $Conversation_Id ){\n\n\tif( ! is_int( $Conversation_Id ) )\n\t\treturn( \"Param error: Conversation_Id - wrong type or empty.\" );\n\n\t// get the user ids within a conversation\n\t$Sql = \"SELECT UserId_List FROM ChatConversations WHERE Id = $Conversation_Id LIMIT 1\";\n\t$result = mysql_query( $Sql );\n\t$errno = mysql_errno();\n\tif( 0 != $errno )\n\t\treturn( \"mysql error: $errno\" );\n\t$row = mysql_fetch_row( $result );\n\tmysql_free_result( $result );\n\n\t// get the usernames of the ids..\n\t$Sql = \"SELECT Id,CONCAT( FirstName, ' ', LastName ) AS Name FROM User WHERE Id IN ( {$row[0]} )\";\n\t$result = mysql_query( $Sql );\n\t$errno = mysql_errno();\n\tif( 0 != $errno )\n\t\treturn( \"mysql error: $errno\" );\n\t\n\t$Users = array();\n\twhile( $row = mysql_fetch_array( $result, MYSQL_ASSOC ) ){\n\t\t// convert Id to int.\n\t\t$row[0] = (int)$row[0];\n\t\t$Users[] = $row;\n\t}\n\tmysql_free_result( $result );\n\n\t/*\n\t// final array returned should be:\n\tarray(\n\t\t\"Conversation_Id\" => (int)$Conversation_Id, \n\t\t\"User_Array\" => array(\n\t\t\t\t\t\t\tarray( \"Id\" = > 1, Name => \"Chris Veeneman\" ),\n\t\t\t\t\t\t\tarray( \"Id\" = > 2, Name => \"Fredrik Nygren\" )\n\t\t\t\t\t\t)\n\t\t)\n\t*/\n\treturn( array( \"Conversation_Id\" => (int)$Conversation_Id, \"User_Array\" => $Users ) );\n}", "public function findChatIdForTwo(array $userIds=[])\n {\n $where = \"function() { return this.participants && this.participants.length === 2; }\";\n\n $qb = $this->repository->createQueryBuilder()\n ->field('activeParticipants')->equals($userIds[0])\n ->field('participants')->where($where) //\n ->hydrate(false)\n ->select('id')\n ->limit(1)\n /////Using JavaScript for this is really slow. You should prefer \"pure\" QueryBuilder:\n // ->field('participants')->exists(true)\n // ->not($qb->expr()->size(1));\n ;\n $qb->addAnd($qb->expr()->field('activeParticipants')->equals($userIds[1]));\n\n $thread = $qb->getQuery()->execute()->getSingleResult();\n\n return $thread ? (string)$thread['_id'] : null;\n }", "public function getListenerIds($user)\n {\n //get partner whom user favourite\n $lOnlFansId = array();\n\n //searching from database\n $lFans = Favourite::where('partner_id', '=', $user->id)->get();\n if(!$lFans->isEmpty()){\n foreach ($lFans as $fan) {\n //check user existed\n if($fan->user){\n //check user online\n if($fan->user->socket_id != null && $fan->user->socket_id != ''){\n //add user to the list\n array_push($lOnlFansId, $fan->user->id);\n }\n }\n }\n }\n\n //get partner who had chat with user\n $lOnlChatedsId = array();\n\n //searching for conversations\n $lConversations = Conversation::where('user1_id','=',$user->id)\n ->orWhere('user2_id','=',$user->id)->get();\n if (!$lConversations->isEmpty()) \n {\n foreach ($lConversations as $conversation) {\n //check to add partner id\n if($conversation->user1_id == $user->id){\n array_push( $lOnlChatedsId, $conversation->user2_id);\n }\n else{\n array_push( $lOnlChatedsId, $conversation->user1_id);\n }\n }\n }\n\n //get matching partners\n $lOnlMatchingsId = array();\n\n //call action matching from UserController\n $lOnlMatchingPartners = UserController::matching($user, true, 1);\n\n if(count($lOnlMatchingPartners) > 0){\n $lOnlMatchingsId = array_pluck($lOnlMatchingPartners, 'id');\n }\n\n //merging those ids\n $listenIds = array_values(array_unique(array_collapse([$lOnlFansId, $lOnlChatedsId, $lOnlMatchingsId])));\n\n //return value\n return $listenIds;\n }", "public function getUserIdsForConvo($conversationId){\n\t\t$query = \"SELECT user_one, user_two FROM conversation WHERE conversationId = $conversationId\";\n\t\treturn Database::getResultSetAsArray($query);\n\t}", "function GetMessages( $ConversationIdArray, $LastMessageId ){\n\n\tif( ! is_array( $ConversationIdArray ) || ! is_int( $LastMessageId ) )\n\t\treturn( \"Param error: ConversationIdArray / LastMessageId - wrong type or empty.\" );\n\t$Messages = array();\n\tif( 0 == count( $ConversationIdArray ) ){\n\t\t// this user is not in any conversations, so there are no messages to retreive.\n\t\treturn( $Messages );\n\t}\n\t$ConvIdListStr = implode( \",\", $ConversationIdArray );\n\t$Sql = \n\t\t\t\"SELECT \n\t\t\t\tm.Conversation_Id AS Conversation_Id, m.Id AS MessageId, \n\t\t\t\tm.FromUser_Id as FromUser_Id, CONCAT( u.FirstName, ' ', u.LastName ) AS FromUser_Name,\n\t\t\t\tm.DateSent as DateSent,\n\t\t\t\tm.Message\n\t\t\tFROM ChatMessages m,User u\n\t\t\tWHERE \n\t\t\t\t(m.FromUser_Id = u.Id) AND\n\t\t\t\tm.Conversation_Id IN ($ConvIdListStr) AND\n\t\t\t\tm.Id > $LastMessageId\n\t\t\tORDER BY m.Id ASC\";\n\n\t$result = mysql_query( $Sql );\n\t$errno = mysql_errno();\n\tif( 0 != $errno )\n\t\treturn( \"mysql error: $errno\" );\n\twhile( $row = mysql_fetch_array( $result, MYSQL_ASSOC ) ){\n\t\t// MessageId, needs to be an int\n\t\t$row[\"MessageId\"] = (int)$row[\"MessageId\"];\n\t\t$Messages[] = $row;\n\t}\n\tmysql_free_result( $result );\n\treturn( $Messages );\n}", "public function findConversations(array $user_ids, array $arguments = array(), $limit = 1){\n\n if(!is_array($user_ids) || count($user_ids) < 2){\n throw new \\Exception('You need at least 2 users for a conversation', 1410783987);\n }\n\n //Get all conversations of the first user and check if\n //the other users are in these conversations too.\n $userClass = EloquentBase::userClass();\n\n $firstUser = $userClass::find($user_ids[0]);\n $conversations = $firstUser->conversations()->with('users')->with('messages')->get();\n\n $filteredConversations = array();\n\n foreach($conversations as $conversation){\n\n if(count($conversation->users) == count($user_ids)) {\n\n $argumentsFitting = true;\n foreach($arguments as $column => $value){\n if($conversation->$column != $value){\n $argumentsFitting = false;\n break;\n }\n }\n\n if(!$argumentsFitting) continue;\n\n $usersFitting = true;\n foreach($conversation->users as $convUser){\n if(!in_array($convUser->id, $user_ids)){\n $usersFitting = false;\n break;\n }\n\n }\n\n if(!$usersFitting) continue;\n\n $filteredConversations[] = $conversation;\n\n if(count($filteredConversations) == $limit)\n break;\n }\n }\n\n return $filteredConversations;\n\n }", "public function findConversationOfUsers($user1Id, $user2Id) {\n $queryBuilder = $this->getEntityManager()->createQueryBuilder();\n $queryBuilder->select('c')\n ->from('CoreMessageBundle:Conversation', 'c')\n ->join('c.starter', 's')\n ->join('c.reciever', 'r')\n ->where('(s.id = :user1Id AND r.id = :user2Id) OR (s.id = :user2Id AND r.id = :user1Id)')\n ->andWhere('r.deletedAt IS NULL AND r.enabled = 1 AND s.deletedAt IS NULL AND s.enabled = 1')\n ->setParameters(array(\n 'user1Id' => $user1Id,\n 'user2Id' => $user2Id,\n ));\n\n return $queryBuilder->getQuery()->getOneOrNullResult();\n }", "public function checkConversation($user_one, $user_two){\n\t\t$query = \"SELECT conversationId FROM conversation WHERE (user_one='$user_one' AND user_two='$user_two') \n\t\t\t\t\t\t\t\t\t\t\t\t OR (user_one='$user_two' AND user_two='$user_one')\";\n\t\treturn Database::getResultSetAsArray($query);\n\t}", "function getConnectionsConnectionsIds($userConnections){\n \n $userConnectionsConnections=[];\n foreach($userConnections as $k=>$v){\n \n array_push($userConnectionsConnections,getConnectionsFromUserId($v));\n }\n return $userConnectionsConnections;\n}", "function get_users_from_ids($my_user_id_blockees,$connection){\n\t$num_per_call = 90;\n\t# Used to count how many have been added and what array index\n\t$count=0;\n\t$index=0;\n\t# Arrays of ids in comma separated list.\n\t$call_array_ids = array();\n\t$call_array_ids_tmp = array();\n\tfor ($i=0; $i<=(count($my_user_id_blockees)-1); $i++)\n\t{\n\t\t# Do in blocks of x\n\t\tif ($count>=$num_per_call) {\n\t\t$count=0;\n\t\t$call_array_ids[$index]= implode(\",\", $call_array_ids_tmp);\n\t\t$call_array_ids_tmp = array();\n\t\t$index++;\n\t}\n\tarray_push($call_array_ids_tmp, $my_user_id_blockees[$i]);\n\t$count++;\n\t}\n\t$call_array_ids[$index]= implode(\",\", $call_array_ids_tmp);\n\t\n\t$users=array();\n\t# Loop over all and get the corresponding user objects\n\tfor ($i=0; $i<=(count($call_array_ids)-1); $i++)\n\t{\n\t\t$tmp_users=$connection->get(\"users/lookup\",array('user_id' => $call_array_ids[$i]));\n\t\tif (!isset($tmp_users->errors)) {\n\t\t\t$users=array_merge($users,$tmp_users);\n\t\t}\n\t}\n\treturn $users;\n}", "public function getConversationFromUser( $stream, $user_id ){\n\t\t\n\t\t$chatMessages = array();\n\n\t\t// TODO - Validate tha user exists\n\t\t// TODO - Validate that $user_id is an integer\n\n\t\t$this->db->where(array( 'from_user_id' => $user_id ) );\n\t\t$conversationQuery = $this->db->get_where( 'chat_messages', array( 'stream' => $stream ) );\n\t\t$messagesResult = $conversationQuery->result();\n\n\t\tif( count( $messagesResult ) < 1 ) {\n\t\t\t$chatMessages['error'] = NO_ERROR;\n\t\t\t$chatMessages['responseMessage'] = \"No conversation was found for stream: '$stream' and from_user_id: '$user_id'\";\n\t\t\treturn $chatMessages;\n\t\t}\n\n\t\tforeach ( $messagesResult as $key => $messageRow )\n\t\t{\n\t\t $chatMessages['data'][$key] = array(\n\t\t \t'text_message' \t=> $messageRow->text_message,\n\t\t \t'from_user_id' \t=> $messageRow->from_user_id,\n\t\t \t'to_user_id' \t=> $messageRow->to_user_id,\n\t\t \t);\n\t\t}\n\n\t\t$chatMessages['error'] = NO_ERROR;\n\t\t$chatMessages['responseMessage'] = 'Conversation retrieved successfully!';\n\t\treturn $chatMessages;\n\n\t}", "public function getReadedUserIds($idconv, $dateMessage, $idMessAuthor)\n {\n //si le message est le miens on get les id des users different du miens\n if($idMessAuthor == $this->session->read('auth')->pk_iduser)\n {\n $results = $this->db->query(\"SELECT fk_iduser FROM we__EnregConversation WHERE fk_idconversation = ? AND consultedAt >= ? AND fk_iduser != ?\",[\n $idconv,\n $dateMessage,\n $idMessAuthor\n ])->fetchAll();\n }\n //sinon on get les id de users différent du miens et de l'user\n else{\n $results = $this->db->query(\"SELECT fk_iduser FROM we__EnregConversation WHERE fk_idconversation = ? AND consultedAt >= ? AND fk_iduser != ? AND fk_iduser != ?\",[\n $idconv,\n $dateMessage,\n $this->session->read('auth')->pk_iduser,\n $idMessAuthor\n ])->fetchAll();\n }\n $idusersString = '';\n if($results)\n {\n $idusersArr = array();\n foreach ($results as $result)\n {\n array_push($idusersArr, $result->fk_iduser);\n }\n $idusersString = implode(',',$idusersArr);\n }\n return $idusersString;\n }", "public function getUserIds();", "public function displayConversations($user_id){\n\t\t$query = \"SELECT * FROM conversation WHERE user_one = $user_id OR user_two = $user_id\";\n\t\treturn Database::getResultSetAsArray($query);\n\t}", "public function createConversation($userId, $user) {\n\n if (!empty($user)) {\n $isAdminSettings = $this->settingsRepository->getValue();\n\n\n foreach ($user as $users) {\n\n if ($isAdminSettings[1]->status == 0) {\n $confirmed = 1;\n } else {\n $confirmed = $this->userRepository->getConfirmedStatus($users->contact_user_id);\n }\n $firebaseFromUserid = 'user_' . $userId;\n $firebaseToUserid = 'user_' . $users->contact_user_id;\n $conversionId = 'user' . $userId . '_' . 'user' . $users->contact_user_id;\n $firebaseArray = [\n 'Typing' => [\n $firebaseFromUserid => 'false',\n $firebaseToUserid => 'false',\n ],\n 'chat_history' => [\n $firebaseFromUserid => '',\n $firebaseToUserid => '',\n ],\n 'isGroup' => 'false',\n 'last_message' => [\n 'conversationID' => $conversionId,\n 'msgID' => '',\n 'senderId' => $firebaseFromUserid,\n 'senderName' => '',\n 'text' => '',\n 'timestamp' => '',\n 'type' => 'text'\n ],\n 'users' => [\n $firebaseFromUserid => 'true',\n $firebaseToUserid => 'true',\n ],\n 'is_admin_setting' => $isAdminSettings[1]->status,\n 'is_confirmed' => $confirmed,\n ];\n // pass from and to id for conversation\n $this->firebaseRepository->setConversationData($conversionId, $firebaseArray);\n }\n }\n }", "public static function updateChatRequestIds($from_user_id, $to_user_id) {\n $from_user_string = User::where('id', $from_user_id)->value('chat_request_ids');\n $c_string_array = explode(',', $from_user_string);\n\n //Remove to_user_id fromUser connect string array\n $remove_toUser_from_c_array = array_diff($c_string_array, array($to_user_id));\n\n //Updated connect string for fromUserId\n $update_c_string_from_user = implode(',', $remove_toUser_from_c_array);\n\n $update = User::where('id', $from_user_id)->update(['chat_request_ids' => $update_c_string_from_user]);\n\n }", "function _get_user_friends_ids ($target_user_id) {\n\t\t$cur_friends_ids = array();\n\t\t// Get friends from db\n\t\tlist($CUR_FRIENDS_LIST) = db()->query_fetch(\"SELECT friends_list AS `0` FROM \".db('friends').\" WHERE user_id=\".intval($target_user_id));\n\t\t// Convert string into array\n\t\tif (!empty($CUR_FRIENDS_LIST)) {\n\t\t\t$tmp_array = explode(\",\", $CUR_FRIENDS_LIST);\n\t\t}\n\t\tforeach ((array)$tmp_array as $tmp_friend_id) {\n\t\t\tif (empty($tmp_friend_id) || $tmp_friend_id == $target_user_id) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$cur_friends_ids[$tmp_friend_id] = $tmp_friend_id;\n\t\t}\n\t\treturn $cur_friends_ids;\n\t}", "public function getArrayParticipantForSetLu($idConversation){\n \n $idUserCourant = $this->security->getToken()->getUser()->getId();\n $repo = $this->manager->getRepository('MindMpBundle:Participants');\n $tabDest = array();\n $participants = $repo->findParticipantsByConversation($idConversation, $idUserCourant);\n \n foreach ($participants as $participant){\n $tabDest[] = $participant->getIdUser();\n }\n \n return $tabDest;\n }", "public function getUserTeamID($arrayUserID){\n $teamID = array();\n foreach($arrayUserID as $userID){\n $teamid = $this->find('first', array(\n 'conditions' => array('id' => $userID),\n 'fields' => array('authority', 'team_id')\n ));\n if($teamid['Management']['authority'] == 3){\n $teamID[] = $teamid['Management']['team_id'];\n }\n }\n return $teamID;\n }", "public function getContibsIdsForSearch($whereQuery)\n {\n $existsQuery = \"SELECT user_id FROM Participation \".$whereQuery;\n if(($result = $this->getQuery($existsQuery,true)) != NULL)\n {\n $countIds = count($result);\n for($i=0; $i<$countIds; $i++)\n {\n $ids[$i] = $result[$i]['user_id'];\n }\n return $idstring = implode(',',$ids);\n }\n else\n return 0;\n }", "public function findIncomingConversations($id_message, $id_user)\n\t{\n\t\t$qb = $this->_em->createQueryBuilder();\n\t\n\t\t$qb->select('c')\n\t\t->from('ProjetUserBundle:Conversation', 'c')\n\t\t->where('c.user != :id')\n\t\t->setParameter('id', $id_user)\n\t\t->andWhere('c.vu = 0')\n\t\t->andWhere('c.message = ?2')\n\t\t->setParameter(2, $id_message)\n\t\t;\n\t\n\t\n\t\treturn $qb->getQuery()\n\t\t->getResult();\n\t}", "function getConversationFeedId($user0, $user1){\n global $conn;\n $user0=(int)$user0;\n $user1=(int)$user1;\n $result = $conn->query(\"SELECT id FROM chats s WHERE ((s.owner='$user0' and s.receiver='$user1') OR(s.owner='$user1' and s.receiver='$user0'));\");\n if (mysqli_num_rows($result) === 0) {\n $conn->query(\"INSERT INTO chats (owner,receiver,name) VALUES ('$user0','$user1','$user0 and $user1');\");\n $result = $conn->query(\"SELECT id FROM chats s WHERE ((s.owner='$user0' and s.receiver='$user1') OR(s.owner='$user1' and s.receiver='$user0'));\");\n }\n return $result->fetch_row()[0];\n}", "public function getFromUserIds(): array\n {\n if (!is_null($this->fromUserIds)) {\n return $this->fromUserIds;\n }\n\n if (isset($this->attributes['fromUserIds'])) {\n $this->fromUserIds = explode(',', $this->attributes['fromUserIds']);\n } elseif ($this->fromUserId) {\n $this->fromUserIds = [$this->fromUserId];\n } else {\n $this->fromUserIds = [];\n }\n\n return $this->fromUserIds;\n }", "function yz_get_private_users_activity_ids( $users ) {\n\n global $bp, $wpdb;\n\n // If the given users is array convert it to string.\n if ( is_array( $users ) ) {\n $users = implode( ',', array_map( 'absint', $users ) );\n }\n\n // Get SQL.\n $sql = \"SELECT id FROM {$bp->activity->table_name} WHERE user_id IN ( $users )\";\n\n // Get Result\n $activities = $wpdb->get_results( $sql , ARRAY_A );\n\n // Return Array List.\n $activities_ids = wp_list_pluck( $activities, 'id' );\n\n return $activities_ids;\n\n}", "function getOrCreateConversationWithUser($user_id)\n{\n $user_id2 = $_GET['interlocutor_id'] ?? 0;\n $conversation_id = Conversation::getConversationIdBetweenUsers($user_id, $user_id2);\n\n if ($conversation_id <= 0) {\n $conversation_id = Conversation::createConversationBetweenUsers($user_id, $user_id2);\n }\n header('Location: index.php?action=conversation&sub_action=detail&conversation_id=' . $conversation_id);\n\n}", "function create_conversation($user_ids, $subject, $body)\n{\n $dbcon = mysqli_connect('127.0.0.1', 'root', '', 'private_message_system');\n //Change any malicious code to text only\n $subject = mysqli_real_escape_string($dbcon, htmlentities($subject));\n $body = mysqli_real_escape_string($dbcon, htmlentities($body));\n //malicious code end\n $sqlquery = \"INSERT INTO `conversations` (`conversation_subject`) VALUES ('{$subject}')\";\n mysqli_query($dbcon, $sqlquery);\n\n //Get Subject ID to link to users part of the conversation\n $conversation_id = mysqli_insert_id($dbcon);\n //Into database con_msg 4 columns values\n $sqlquery = \"INSERT INTO `conversations_messages` (`conversation_id`, `user_id`, `message_date`, `message_text`)\n VALUES ('{$conversation_id}', '{$_SESSION['user_id']}', UNIX_TIMESTAMP(), '{$body}')\";\n //FROM_UNIXTIME(unix_timestamp)\n mysqli_query($dbcon, $sqlquery);\n // die(mysqli_error($dbcon));\n //for each user array\n\n $values = array(\"({$conversation_id}, {$_SESSION['user_id']}, UNIX_TIMESTAMP(), 0)\");\n\n //$user_ids[] = $_SESSION['user_id']; //Append the user sending the message to the array\n\n //loop through each user that is added to the conversation and add to a ,cslist\n foreach ($user_ids as $user_id){\n $user_id = (int) $user_id; // Extra security to ensure data comes from the database\n $values[] = \"({$conversation_id}, {$user_id}, 0, 0)\";\n }\n\n $sqlquery = \"INSERT INTO `conversations_members` (`conversation_id`, `user_id`, `conversation_last_view`, `conversation_deleted`)\n VALUES \" . implode(\", \", $values); //include reciepients\n\n mysqli_query($dbcon, $sqlquery);\n\n}", "protected function getUserIds(){\n switch ($this->userType){\n case self::USER_TYPE_INTERNAL:\n return Yii::app()->params['googlePlayInternalUserIds'];\n case self::USER_TYPE_GOOGLE_CC_MAIN:\n return Yii::app()->params['googleCcMainUserIds'];\n case self::USER_TYPE_GOOGLE_CC_MAIN_ADMIN:\n return Yii::app()->params['googleCcMainAdminUserIds'];\n case self::USER_TYPE_GOOGLE_CC_TRANSCRIBE_QA:\n return Yii::app()->params['googleCcTransQAUserIds'];\n case self::USER_TYPE_GOOGLE_CC_TRANSCRIBE_SQA:\n return Yii::app()->params['googleCcTransSQAUserIds'];\n case self::USER_TYPE_GOOGLE_CC_CONFORM_QA:\n return Yii::app()->params['googleCcConformQAUserIds'];\n default:\n return Yii::app()->params['googlePlayExternalUserIds'];\n }\n }", "public function findConversationsOfUser($userId) {\n $queryBuilder = $this->getEntityManager()->createQueryBuilder();\n $queryBuilder->select('c as conversation')\n ->from('CoreMessageBundle:Conversation', 'c')\n ->join('c.starter', 's')\n ->join('c.reciever', 'r')\n ->where('s.id = :userId OR r.id = :userId')\n ->andWhere('r.deletedAt IS NULL AND r.enabled = 1 AND s.deletedAt IS NULL AND s.enabled = 1')\n ->setParameter('userId', $userId);\n\n return $queryBuilder->getQuery()->getResult();\n }", "public static function getChatRequestString($from_user_id = null, $to_user_id = null) {\n\n $chat_string = '';\n $user_chat_string = User::where('id', $from_user_id)->value('chat_user_ids');\n if(empty($user_chat_string)) {\n $chat_string = $to_user_id;\n } else {\n $check_string = User::where('id', $from_user_id)->whereRaw('FIND_IN_SET(?,chat_user_ids)', [$to_user_id])->first(); //checking in the string to_user_id already exist in the string\n if(empty($check_string)) {\n $chat_string .= $user_chat_string.','.$to_user_id;\n } else {\n $chat_string .= $user_chat_string;\n }\n }\n\n $c_arr = explode(',',$chat_string);\n sort($c_arr);\n $chat_string = implode(',',$c_arr);\n return $chat_string;\n }", "public function getconnectionFromUserId($data = array()) {\n\n $accessToken = $data['access_token'];\n $Dj_id = $data['dj_id'];\n\n\n $retResult = $this->_funcObj->checkBlank($data);\n if ($retResult == 1) {\n $response = array(\"error\" => \"Some Parameter Missing!\");\n return $response;\n }\n\n $authenticate = $this->_funcObj->authenticateAccessToken($accessToken);\n\n\n if (count($authenticate) == 0) {\n $response = array(\"error\" => \"Invalid Access Token!\");\n return $response;\n } else {\n $userId = $authenticate['data'][0]['user_id'];\n\n $sql = \"SELECT dj_user_id FROM tb_playlist_share where listner_user_id=? and status=? LIMIT 1\";\n $bindParams = array($userId, 2);\n $responseDjId = $this->_DAL->sqlQuery($sql, $bindParams);\n\n if (count($responseDjId) == 0) {\n $response = array(\"error\" => \"Not Listening to any Dj\");\n return $response;\n } else {\n $sql = \"SELECT listner_user_id FROM tb_playlist_share where dj_user_id=?\";\n $bindParams = array($responseDjId['data'][0]['dj_user_id']);\n $responseUserIds = $this->_DAL->sqlQuery($sql, $bindParams);\n\n // print_r($responseUserIds);\n\n if (count($responseUserIds) == 0) {\n $response = array(\"error\" => \"No Connections\");\n return $response;\n } else {\n $i = 0;\n foreach ($responseUserIds['data'] as $value) {\n $userData = $this->getUserInfoFromUserid($value['listner_user_id']);\n\n $response[$i] = $userData['data'][0];\n // $responseConnection['data'][$i]['connections']=$response[$i];\n unset($response[$i]['user_access_token']);\n unset($response[$i]['new_reg']);\n\n $i++;\n }\n $responseConnection['data'][0]['friends'] = $response;\n }\n }\n // print_r($responseConnection);\n return $responseConnection;\n }\n }", "public function getMessageListOfUserWithUser($fromUserId, $toUserId, $sqlSearch = null) {\n\t\tglobal $db;\n\t\t\n\t\t$array = [];\n\t\t\n\t\t$db -> query(\n\t\t\t'SELECT * '.\n\t\t\t'FROM `db_message` '.\n\t\t\t'WHERE ((`from_user_id` = \"'.$fromUserId.'\" && `to_user_id` = \"'.$toUserId.'\") || (`to_user_id` = \"'.$fromUserId.'\" && `from_user_id` = \"'.$toUserId.'\")) '.$sqlSearch.' '.\n\t\t\t'ORDER BY `date` ASC '.\n\t\t\t'LIMIT 100'\n\t\t);\n\t\tif($db -> numRows() > 0) {\n\t\t\twhile($r = $db -> fetchArray()) {\n\t\t\t\t$array[$r['message_id']] = $r;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn($array);\n\t}", "function internalConversationCreate($user_one,$message_user)\n{\n /* Message user id */\n $user_two=internalUsernameDetails($message_user);\n try {\n $db = getDB();\n if($user_one!=$user_two)\n {\n if($user_one>0 && $user_two>0 )\n {\n $sql= \"SELECT c_id FROM conversation WHERE (user_one=:user_one and user_two=:user_two) or (user_one=:user_two and user_two=:user_one)\";\n $stmt = $db->prepare($sql);\n $stmt->bindParam(\"user_one\", $user_one,PDO::PARAM_INT);\n $stmt->bindParam(\"user_two\", $user_two,PDO::PARAM_INT);\n $stmt->execute();\n $conversation = $stmt->fetchAll(PDO::FETCH_OBJ);\n \n if(count($conversation)==0)\n {\n $time=time();\n $ip=$_SERVER['REMOTE_ADDR'];\n $sql1 = \"INSERT INTO conversation(user_one,user_two,ip,time) VALUES (:user_one,:user_two,:ip,:time)\";\n $stmt1 = $db->prepare($sql1);\n $stmt1->bindParam(\"user_one\", $user_one,PDO::PARAM_INT);\n $stmt1->bindParam(\"user_two\", $user_two,PDO::PARAM_INT);\n $stmt1->bindParam(\"ip\", $ip);\n $stmt1->bindParam(\"time\", $time);\n $stmt1->execute();\n \n $sql2=\"SELECT c_id FROM conversation WHERE user_one=:user_one ORDER BY c_id DESC LIMIT 1\";\n $stmt2 = $db->prepare($sql2);\n $stmt2->bindParam(\"user_one\", $user_one,PDO::PARAM_INT);\n $stmt2->execute();\n $conversation2 = $stmt2->fetchAll(PDO::FETCH_OBJ);\n return $conversation2[0]->c_id;\n }\n else\n {\n return $conversation[0]->c_id;\n }\n $db = null;\n }\n }\n \n }\n catch(PDOException $e)\n {\n echo '{\"error\":{\"text\":'. $e->getMessage() .'}}';\n }\n}", "public function getChatsByUserId(int $id) : array {\n $query = \"SELECT c.id, c.subject, c.date_created FROM chats c\n JOIN chat_members cm \n ON c.id = cm.chat_id \n WHERE cm.user_id = :userid\";\n $pdostm = $this->db->prepare($query);\n $pdostm->bindValue(\":userid\",$id, PDO::PARAM_INT);\n $pdostm->execute();\n\n $chatDB = $pdostm->fetchAll(PDO::FETCH_OBJ);\n //var_dump($chatDB);\n $chats = array();\n\n foreach ($chatDB as $c) {\n $chat = new Chat();\n $sender = new User();\n\n $chat->setId($c->id); // getting the chat Id\n $chat->setSubject($c->subject);\n $chat->setDateCreated($c->date_created);\n // $sender->setUsername($c->username); // passing the username retrieved from database\n // $chat->setUser($sender); // from the User object in Chat class\n\n array_push($chats, $chat);\n }\n\n return $chats;\n\n }", "function getAllConversationId(){\n\t\t$sqlGetDialogue = \"SELECT DISTINCT conversation_id FROM \".CONVERSATION.\"\n\t\tWHERE conversation_userId = $this->id\";\n\t\t$sqlResult = $this->connect->query($sqlGetDialogue);\n\t\t$tabDialogueId = array();\n\t\t$i = 0;\n\t\twhile($idRowDiscussion = mysqli_fetch_array($sqlResult)){\n\t\t\t$tabDialogueId[$i] = $idRowDiscussion['conversation_id'];\n\t\t\t$i++;\n\t\t}\n\t\treturn $tabDialogueId;\n\t}", "public function senderchatUsers($userid){\r\n $sqlQuery = \"\r\n SELECT * FROM \".$this->chatUsersTable.\" WHERE userid IN\r\n (SELECT DISTINCT sender_userid FROM \".$this->chatTable.\" WHERE reciever_userid = '$userid')\";\r\n return $this->getData($sqlQuery);\r\n }", "public function getFriendSendMessage() {\n $viewer_id = Engine_Api::_()->user()->getViewer()->getIdentity();\n $getFriednArray = array();\n $messageTable = Engine_Api::_()->getItemTable('messages_message');\n $messageTableName = $messageTable->info('name');\n\n $recipientTable = Engine_Api::_()->getDbtable('recipients', 'messages');\n $recipientTableName = $recipientTable->info('name');\n\n $membershipTable = Engine_Api::_()->getDbtable('membership', 'user');\n $membershipTableName = $membershipTable->info('name');\n\n $select = $recipientTable->select()\n ->setIntegrityCheck(false)\n ->from($recipientTableName, array('user_id'))\n ->joinInner($messageTableName, \"$recipientTableName . conversation_id = $messageTableName . conversation_id\", null)\n ->joinInner($membershipTableName, \"$membershipTableName . resource_id = $recipientTableName . user_id\", null)\n ->where($membershipTableName . '.user_id = ?', $viewer_id);\n\n $fetch = $select->query()->fetchAll();\n foreach ($fetch as $id) {\n $getFriednArray[] = $id['user_id'];\n }\n return $getFriednArray;\n }", "private function get_user_id($user_names){\n $name_pegawai = $this->remove_behind_pipeline($user_names);\n $id_user = $this->Team->User->getUserIdByName($name_pegawai);\n return $id_user[0]['User']['id'];\n }", "public function getMyContactsPendingInArray()\n {\n $usersIdsObj = $this->db->query('SELECT fk_iduserto FROM we__Contactsask WHERE fk_iduserfrom = ?', [\n $this->session->read('auth')->pk_iduser\n ])->fetchAll();\n\n $idArray = Functions::getArrayFromObjectProperty($usersIdsObj, 'fk_iduserto');\n return $idArray;\n }", "public function loadConversations($id){\n $this->conversations = [];\n $this->active_user = User::select('first_name', 'surname', 'avatar','mobile', 'id')\n ->where('id', $id)\n ->where('tenant_id',Auth::user()->tenant_id)\n ->first();\n $this->conversations = Message::where('from_id', Auth::user()->id)->where('to_id', $id)\n ->orWhere('from_id', $id)->where('to_id',Auth::user()->id)\n ->where('tenant_id',Auth::user()->tenant_id)\n ->get();\n }", "public static function getExistingUsersId(): array\n {\n return DB::table('loan_applications')\n ->where('status', Application::STATUS_COMPLETED)\n ->select(['user_id'])\n ->distinct()\n ->get()\n ->pluck('user_id')\n ->toArray()\n ;\n\n }", "public static function conversation($user1,$user2)\n {\n $conv = static::where(function($q) use($user1,$user2){\n $q->where('sender_id',$user1->id)->where('receiver_id',$user2->id);\n })->orWhere(function($q) use($user1,$user2){\n $q->where('sender_id',$user2->id)->where('receiver_id',$user1->id);\n });\n return $conv;\n }", "public function get_conversation($ride_id,$user)\n\t{\n\t}", "public function recieverchatUsers($userid){\r\n $sqlQuery = \"\r\n SELECT * FROM \".$this->chatUsersTable.\" WHERE userid IN\r\n (SELECT DISTINCT reciever_userid FROM \".$this->chatTable.\" WHERE sender_userid = '$userid')\";\r\n return $this->getData($sqlQuery);\r\n }", "public function getMessagesGroup($userId){\n $groups = array();\n $sql = \"SELECT * FROM messageGroups WHERE FromUser = :userId OR ToUser = :userId\";\n \n $this->db->makeCamelCase();\n $this->db->query($sql);\n $this->db->bind(':userId',$userId);\n $stmt = $this->db->getStmt();\n $this->db->execute();\n $partner = '';\n while($row = $stmt->fetch(PDO::FETCH_ASSOC)){\n if($row['FromUser'] == $userId){\n $partner = $row['ToUser'];\n }else{\n $partner = $row['FromUser'];\n }\n $row['PartnerId'] = $partner;\n $partnerArray = $this->getUser($partner);\n $row['PartnerName'] = $partnerArray['Name']; \n $row['PartnerSurname'] = $partnerArray['Surname'];\n array_push($groups, $row);\n }\n return $groups;\n }", "private function get_friend_ids(){\n\n $db = $this->db;\n //ovdje spremamo sve vrijednosti id polja prijatelja korisnika\n $users = array();\n\n $users1 = $db->friendQuery('SELECT user_id FROM friend_requests WHERE friend_id=1 AND accepted=1');\n $users1 = $users1->fetchAll(PDO::FETCH_ASSOC);\n\n foreach($users1 as $user)\n {\n $users[] = $user['user_id'];\n }\n\n $users2 = array();\n $users2 = $db->friendQuery('SELECT friend_id FROM friend_requests WHERE user_id=1 AND accepted=1');\n\n if($users2)\n $users2 = $users2->fetchAll(PDO::FETCH_ASSOC);\n\n\n foreach($users2 as $user)\n {\n $users[] = $user['friend_id'];\n }\n \n return $users;\n }", "function getSnappedUsers($user_id) {\n\t\t\t\n\t\t\t// return object\n\t\t\t$user_arr = array();\n\t\t\t\n\t\t\t// list of user ids\n\t\t\t$userID_arr = array();\n\t\t\t\n\t\t\t\n\t\t\t// get the previous challengers\n\t\t\t$query = 'SELECT `challenger_id` FROM `tblChallenges` WHERE `challenger_id` != 0 AND `creator_id` = '. $user_id .' ORDER BY `updated` DESC LIMIT 8;';\n\t\t\t$result = mysql_query($query);\n\t\t\t\n\t\t\t// loop thru result ids\n\t\t\twhile ($row = mysql_fetch_assoc($result)) {\n\t\t\t\t$isFound = false;\n\t\t\t\t\n\t\t\t\t// check for an id already in array\n\t\t\t\tforeach ($userID_arr as $key => $val) {\n\t\t\t\t\tif ($val == $row['challenger_id']) {\n\t\t\t\t\t\t$isFound = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!$isFound)\n\t\t\t\t\tarray_push($userID_arr, $row['challenger_id']);\n\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t// get the previous challenge creators\n\t\t\t$query = 'SELECT `creator_id` FROM `tblChallenges` WHERE `challenger_id` = '. $user_id .' ORDER BY `updated` DESC LIMIT 8;';\n\t\t\t$result = mysql_query($query);\n\t\t\t\n\t\t\t// loop thru result ids\n\t\t\twhile ($row = mysql_fetch_assoc($result)) {\n\t\t\t\t$isFound = false;\n\t\t\t\t\n\t\t\t\t// check for an id already in array\n\t\t\t\tforeach ($userID_arr as $key => $val) {\n\t\t\t\t\tif ($val == $row['creator_id']) {\n\t\t\t\t\t\t$isFound = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!$isFound)\n\t\t\t\t\tarray_push($userID_arr, $row['creator_id']);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// get the user for each id\n\t\t\tforeach ($userID_arr as $key => $val)\n\t\t\t\tarray_push($user_arr, $this->userForSearchResult($val));\n\t\t\t\n\t\t\t\n\t\t\t// return\n\t\t\t$this->sendResponse(200, json_encode($user_arr));\n\t\t\treturn (true);\n\t\t}", "public function getActiveConversations()\n {\n $conn = Db::getConnection();\n $statement = $conn->prepare(\"SELECT * FROM conversations WHERE (user_1 = :user_id OR user_2 = :user_id) AND active = 1\");\n $statement->bindValue(\":user_id\", $this->getId());\n $statement->execute();\n $result = $statement->fetch(\\PDO::FETCH_OBJ);\n\n return $result;\n }", "public function get_friends_ids($user_id) {\n global $db;\n $friends = array();\n $get_friends = $db->query(sprintf('SELECT users.user_id FROM friends INNER JOIN users ON (friends.user_one_id = users.user_id AND friends.user_one_id != %1$s) OR (friends.user_two_id = users.user_id AND friends.user_two_id != %1$s) WHERE status = 1 AND (user_one_id = %1$s OR user_two_id = %1$s)', secure($user_id, 'int'))) or _error(SQL_ERROR_THROWEN);\n if($get_friends->num_rows > 0) {\n while($friend = $get_friends->fetch_assoc()) {\n $friends[] = $friend['user_id'];\n }\n }\n return $friends;\n }", "function get_multiple_info($user_ids)\n\t{\n\t\t$this->db->from($this->table_name);\n\t\t$this->db->where_in($user_ids);\n\t\treturn $this->db->get();\n\t}", "public function getConversationsById(array $params = [])\n {\n return $this->request->post('messages.getConversationsById', $params);\n }", "public function getRecipientsInMessage($userViewLink=null)\n\t{\n\t\t$criteria = new CDbCriteria();\n\t\t$criteria->compare('message_id', $this->id);\n $recipients = MessageStatus::model()->findAll($criteria);\n $messageRecipients = array();//Generate message user\n if(count($recipients)>0){\n \tforeach($recipients as $recipient){\n \t\t$user = User::model()->findByPk($recipient->recipient_id);\n \t\tif(isset($user->id)){\n\t \t\t$readFlagStyle = \"class='clrBlack' title='Chưa đọc'\";\n\t \t\tif($recipient->read_flag==1){\n\t \t\t\t$readFlagStyle = \"class='clrLink' title='Ngày, giờ đọc: \".date('H:i, d/m/Y', strtotime($recipient->read_date)).\"'\";\n\t \t\t}\n\t\t\t\t\tif($userViewLink!=null){\n\t\t\t\t\t\t$messageRecipients[$user->id] = '<a href=\"'.$userViewLink.'/'.$user->id.'\" '.$readFlagStyle.'>'.$user->fullName().'</a>';\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$messageRecipients[$user->id] = '<span '.$readFlagStyle.'>'.$user->fullName().'</span>';\n\t\t\t\t\t}\n \t\t}\n \t}\n }\n\t\treturn $messageRecipients;\n\t}", "public function getUserQuizByUserId($user_id_array)\n\t{\n\t\treturn $this->db\n\t\t\t->select('id')\n\t\t\t->where_in('user_id', $user_id_array)\n\t\t\t->group_by('user_id')\n\t\t\t->get('user_quiz')\n\t\t\t->result();\n\t}", "public function index($user_id) {\n $conversations_users = ConversationUser::where('user_id', $user_id)->lists('conversation_id');\n\n $conversations = array();\n\n if($conversations_users) {\n $conversations = Conversation::whereIn('id', $conversations_users)->get();\n }\n\n return Response::json([\n 'success' => true,\n 'result' => $conversations\n ]);\n }", "public function setPeerIds(array $value): GetConversationsById\n {\n $this->peerIds = $value;\n return $this;\n }", "public function participatingIn()\n {\n return $this->conversations()\n ->pluck('id');\n }", "public function isExistsAmongTwoUsers($user1, $user2)\n {\n\n $conversations = Conversation::where('user_id', $user1)\n ->orWhere('user_id', $user2)->pluck('id');\n $conversationsParticipants = ConversationParticipant::whereIn('conversation_id', $conversations)->whereIn('user_id', [$user1, $user2]);\n\n if($conversationsParticipants->exists()){\n return $conversationsParticipants->first()->conversation_id;\n }\n\n return false;\n }", "function conversations($user_id) {\r\n\t\tglobal $userpro;\r\n\t\t$output = null;\r\n\t\t\r\n\t\t$unread = $this->get_unread_user_ids($user_id);\r\n\t\t$archive = $this->get_read_user_ids($user_id);\r\n\t\t\r\n\t\tif (isset($archive) && !empty($archive) && isset($unread) && !empty($unread) ){\r\n\t\t$archive = array_diff($archive, $unread);\r\n\t\t}\r\n\t\t\r\n\t\tif (isset($unread) && !empty($unread)) {\r\n\t\t\tforeach ( $unread as $id) {\r\n\t\t\t\t$output .= '<div class=\"userpro-msg-col\" data-chat_from=\"'.$user_id.'\" data-chat_with=\"'.$id.'\">\r\n\t\t\t\t\r\n\t\t\t\t\t<span class=\"userpro-msg-view\"><i class=\"userpro-icon-retweet\"></i>'.__('read conversation','userpro-msg').'</span>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t<div class=\"userpro-msg-user-thumb alt\">'.get_avatar($id, 40).'</div>\r\n\t\t\t\t\t\r\n\t\t\t\t\t<div class=\"userpro-msg-user-info\">\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t<div class=\"userpro-msg-user-name alt\">\r\n\t\t\t\t\t\t\t<span>'.userpro_profile_data('display_name', $id).'</span>\r\n\t\t\t\t\t\t\t<span class=\"bubble\" data-chat_with=\"'.$id.'\"><i class=\"userpro-icon-comment\"></i></span>\r\n\t\t\t\t\t\t\t<span class=\"bubble-text\">'.__('quick reply','userpro-msg').'</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t<div class=\"userpro-msg-user-tab alt\">';\r\n\t\t\t\t\t\t\r\n\t\t\t\tif ( $this->extract_msg($user_id, $id, 'unread', 'status', 1) == 'unread') {\r\n\t\t\t\t\t$output .= '<span class=\"userpro-msg-unread\">'.sprintf(__('%s unread','userpro-msg'), $this->extract_msg($user_id, $id, 'unread', 'unread_msgs_count') ).'</span>';\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$output .= $this->extract_msg($user_id, $id, 'unread', 'content', 1);\r\n\t\t\t\t\r\n\t\t\t\t$output .= '<span class=\"userpro-msg-toolbar\">\r\n\t\t\t\t\t\t\t\t<span class=\"userpro-msg-timestamp\">'.$this->extract_msg($user_id, $id, 'unread', 'timestamp', 1).'</span>\r\n\t\t\t\t\t\t\t\t<span class=\"userpro-msg-delete\"><a href=\"#\" data-chat_from=\"'.$user_id.'\" data-chat_with=\"'.$id.'\">'.__('Delete Conversation','userpro-msg').'</a></span>\r\n\t\t\t\t\t\t\t</span>';\r\n\t\t\t\t\r\n\t\t\t\t$output .= '</div>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t</div><div class=\"userpro-clear\"></div>\r\n\t\t\t\t\t</div>';\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (isset($archive) && !empty($archive)) {\r\n\t\t\tforeach ( $archive as $id) {\r\n\t\t\t\t$output .= '<div class=\"userpro-msg-col\" data-chat_from=\"'.$user_id.'\" data-chat_with=\"'.$id.'\">\r\n\t\t\t\t\r\n\t\t\t\t\t<span class=\"userpro-msg-view\"><i class=\"userpro-icon-retweet\"></i>'.__('read conversation','userpro-msg').'</span>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t<div class=\"userpro-msg-user-thumb alt\">'.get_avatar($id, 40).'</div>\r\n\t\t\t\t\t\r\n\t\t\t\t\t<div class=\"userpro-msg-user-info\">\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t<div class=\"userpro-msg-user-name alt\">\r\n\t\t\t\t\t\t\t<span>'.userpro_profile_data('display_name', $id).'</span>\r\n\t\t\t\t\t\t\t<span class=\"bubble\" data-chat_with=\"'.$id.'\"><i class=\"userpro-icon-comment\"></i></span>\r\n\t\t\t\t\t\t\t<span class=\"bubble-text\">'.__('quick reply','userpro-msg').'</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t<div class=\"userpro-msg-user-tab alt\">';\r\n\t\t\t\t\t\t\r\n\t\t\t\tif ( $this->extract_msg($user_id, $id, 'archive', 'mode', 1) == 'sent') {\r\n\t\t\t\t\t$output .= '<span class=\"userpro-msg-you\"><i class=\"userpro-icon-reply\"></i></span>';\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$output .= $this->extract_msg($user_id, $id, 'archive', 'content', 1);\r\n\t\t\t\t\r\n\t\t\t\t$output .= '<span class=\"userpro-msg-toolbar\">\r\n\t\t\t\t\t\t\t\t<span class=\"userpro-msg-timestamp\">'.$this->extract_msg($user_id, $id, 'archive', 'timestamp', 1).'</span>\r\n\t\t\t\t\t\t\t\t<span class=\"userpro-msg-delete\"><a href=\"#\" data-chat_from=\"'.$user_id.'\" data-chat_with=\"'.$id.'\">'.__('Delete Conversation','userpro-msg').'</a></span>\r\n\t\t\t\t\t\t\t</span>';\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t$output .= '</div>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t</div><div class=\"userpro-clear\"></div>\r\n\t\t\t\t\t</div>';\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $output;\r\n\t}", "public function getmessages()\n {\n $alluser1 = DB::table('users as u')->join('conversions as c','u.id','c.user_one')\n ->where('c.user_two',Auth::user()->id)\n ->get();\n\n $alluser2 = DB::table('users as u')->join('conversions as c','u.id','c.user_two')\n ->where('c.user_one',Auth::user()->id)\n ->get(); \n return array_merge($alluser1->toArray(),$alluser2->toArray()); \n }", "public function messageByUserId($id){\n $messages = Message::where(function($query) use ($id){\n $query->where('from',auth()->user()->id);\n $query->where('to',$id);\n $query->where('type',0);\n })->orWhere(function($query) use ($id){\n $query->where('from',$id);\n $query->where('to',auth()->user()->id);\n $query->where('type',1);\n })->with('user')->get();\n\n return $messages;\n }", "public function getSelectedFacilityUserIds()\n {\n // $facilityUsers = InstanceSiteDelivery::select('facility_user_id')->groupBy('facility_user_id')->get();\n $usersIds = [];\n /* foreach ($facilityUsers as $facilityUser) {\n if (!in_array($facilityUser->facility_user_id, $usersIds))\n array_push($usersIds, $facilityUser->facility_user_id);\n }\n\n $palikaUsers = AdminUser::whereIn('id', $usersIds)->get();\n foreach ($palikaUsers as $users) {\n if (!in_array($users->palika_user_id, $usersIds))\n array_push($usersIds, $users->palika_user_id);\n\n if (!in_array($users->created_by, $usersIds))\n array_push($usersIds, $users->created_by);\n }*/\n\n return $usersIds;\n }", "public static function getUserSubsciptionIds($userId) {\n $results;\n $db = parent::getDataBase();\n $sql = <<<STR\n \t\t SELECT UserSubscriptionId\t\t\t\t\n FROM usersubscriptions \n WHERE UserSubscriptionUserId=:UserId AND UserSubscriptionIsTempUser=0 Order by UserSubscriptionId ASC limit 1\nSTR;\n\n $bind = array(\n \":UserId\" => $userId,\n );\n\n $results = $db->run($sql, $bind);\n Format::formatResponseData($results);\n return $results;\n }", "function get_user_conversations($user_id) {\n\t //database query\n\t $q = $this->db->select('*')\n\t \t\t\t\t ->from('conversations_inbox')\n\t\t\t\t\t ->where('R_id',$user_id)\n\t\t\t\t\t ->order_by('post_time','desc')\n\t\t\t\t\t ->get();\n\t\t$result = $q->result();\n }", "public function getMasterInboxFOUsersInter($user=NULL)\n {\n\n if($user)\n $condition=\"((t.recipient_id='\".$user.\"' and m.type='0')and (t.sender_id in (select identifier from User where type in('client','contributor'))))\";\n else\n $condition=\"((t.recipient_id in (select identifier from User where type in('client','contributor'))) and (t.sender_id in (select identifier from User where type in('client','contributor'))))\";\n\n $msg_query=\"select\n m.id as messageId,m.type,ticket_id,sender_id,recipient_id,IF(m.type='1',recipient_id,sender_id) as userid,\n IF(m.type='1',sender_id,recipient_id) as receiverId,\n u.email, title as Subject,content,\n IF(DATE(m.created_at)=DATE(NOW()),DATE_FORMAT(m.created_at , '%H:%i'),DATE_FORMAT(m.created_at , '%d/%m/%Y %H:%i')) as receivedDate,\n m.created_at as receivedDate_sort,\n\t\t\t\t\t\tm.status from Ticket t\n INNER JOIN Message m ON m.ticket_id=t.id\n INNER JOIN User u ON u.identifier=t.recipient_id\n INNER JOIN User u1 ON u1.identifier=t.sender_id\n where \".$condition.\" and t.status in ('0','1')\n Group By t.sender_id,t.recipient_id,m.id ORDER BY m.created_at DESC\";\n\n //echo $msg_query;exit;\n\n if(($result=$this->getQuery($msg_query,true))!=NULL)\n return $result;\n else\n return \"No Messages Found\";\n\n }", "function GetUnreadMessages( $User_Id ){\n\n\tif( ! is_int( $User_Id ) )\n\t\treturn( \"Param error: User_Id - wrong type or empty.\" );\n\t\t\n\t$Messages = array();\n\t$Sql = \"SELECT \n\t\t\t\tm.Conversation_Id AS Conversation_Id, m.Id AS MessageId, \n\t\t\t\tm.FromUser_Id as FromUser_Id, CONCAT( u.FirstName, ' ', u.LastName ) AS FromUser_Name,\n\t\t\t\tm.DateSent as DateSent,\n\t\t\t\tm.Message\n\t\t\tFROM ChatMessages m,User u,ChatConversationParticipants p\n\t\t\tWHERE \n\t\t\t\t(m.FromUser_Id = u.Id) AND\n\t\t\t\t(m.Id > p.LastReadMessage_Id) AND\n\t\t\t\t(m.Conversation_Id = p.Conversation_Id) AND\n\t\t\t\t(p.User_Id = $User_Id)\n\t\t\tORDER BY m.Id ASC\";\n\t$result = mysql_query( $Sql );\n\t$errno = mysql_errno();\n\tif( 0 != $errno )\n\t\treturn( \"mysql error: $errno\" );\n\twhile( $row = mysql_fetch_array( $result, MYSQL_ASSOC ) )\n\t\t$Messages[] = $row;\n\tmysql_free_result( $result );\n\treturn( $Messages );\n}", "public function conversationList($id)\n\t{\n\n\t\t$url = \"http://api.candychat.com:1314/api/chat/list/\".$id;\n\t\t$response = cURL::get($url);\n\t\t\n\t\t$response = $response->body;\n\t\t$json = json_decode($response,true);\n\t\tif(count($json) != 0)\n\t\t\treturn Response::json(array('status' => '1',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//'users' => $account2,\n \t\t\t'conversations' => $json\n \t\t\t));\n\t\telse \n\t\t\treturn Response::json(array('status' => '0',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//'users' => $account2,\n \t\t\t'conversations' => $json\n \t\t\t));\n\t\t\n\t}", "function getAllProjectsIdWhereUserIsInside($userid)\n{\n $query = \"SELECT DISTINCT projects.id FROM users\nINNER join `join` ON `join`.user_id = users.id\nINNER join `groups` ON `join`.group_id = `groups`.id\nINNER join participate ON participate.group_id = `groups`.id\nINNER join projects ON participate.project_id = projects.id\nWHERE participate.state IN (\" . PARTICIPATE_STATE_INVITATION_ACCEPTED . \",\" . PARTICIPATE_STATE_CREATOR . \") AND `join`.state IN (\" . implode(\", \", [JOIN_STATE_INVITATION_ACCEPTED, JOIN_STATE_APPROVED]) . \") AND users.id = :id AND users.state != 0 \nORDER BY projects.id\";\n\n $params = [\"id\" => $userid];\n $items = Query($query, $params, true);\n $ids = [];\n foreach ($items as $item) {\n $ids[] = $item['id'];\n }\n return $ids;\n}", "public function getAllRecipientsForChat() : array {\n $query = \"SELECT c.name, u.id FROM companies \n c JOIN users u ON c.user_id = u.id \n UNION SELECT t.first_name, u.id \n FROM teachers t JOIN users u ON t.user_id = u.id\";\n $pdostm = $this->db->prepare($query);\n $pdostm->setFetchMode(PDO::FETCH_OBJ);\n $pdostm->execute();\n\n $recipientsDB = $pdostm->fetchAll(PDO::FETCH_OBJ);\n // var_dump($recipientsDB);\n $recipients = array();\n\n foreach ($recipientsDB as $r)\n {\n $recipient = new ChatMember();\n\n $recipient->setUserId($r->id);\n $recipient->setName($r->name);\n\n array_push($recipients,$recipient);\n\n }\n return $recipients;\n\n }", "function skype_get_participants($skypeid) {\n return false;\n}", "function get_participants($con) {\n $sql = \"SELECT users.* \\n\"\n . \"FROM users \\n\"\n . \"INNER JOIN participant \\n\"\n . \"ON users.user_id = participant.user_id LIMIT 0, 30 \";\n\n $user = array();\n $all_users = array();\n $users = mysqli_query($con, $sql);\n while($result = $users->fetch_assoc()) {\n $user[\"Id\"] = $result[\"user_id\"];\n $user[\"UserName\"] = $result[\"username\"];\n $user[\"Password\"] = \"REDACTED\";\n $user[\"FirstName\"] = $result[\"user_first\"];\n $user[\"LastName\"] = $result[\"user_last\"];\n $user[\"Email\"] = $result[\"user_email\"];\n $user[\"ProfilePicture\"] = $result[\"user_profile_picture\"];\n $user[\"State\"] = $result[\"user_state\"];\n $user[\"PhoneNumber\"] = $result[\"user_phone\"];\n $user[\"Zip\"] = $result[\"user_zip\"];\n $user[\"Address\"] = $result[\"user_address\"];\n $user[\"AboutMe\"] = $result[\"user_about_me\"];\n $user[\"City\"] = $result[\"user_city\"];\n\n $user[\"EventsAttending\"] = retrieve_user_events1(\n $con\n , $user[\"Id\"]);\n array_push($all_users, $user);\n }\n return json_encode($all_users, JSON_NUMERIC_CHECK);\n}", "public function getInvitation($user_id) {\n\t\t$data = array();\n\n\t\t$c = array(\n\t\t\t'conditions' => array(\n\t\t\t\t'users_id' => $user_id,\n\t\t\t)\n\t\t);\n\n\t\t//Get all challenge's participant\n\t\t$challenges = $this->findAll($c, 'users_has_challenges');\n\n\t\t$i = 0;\n\t\tforeach ($challenges as $challenge) {\n\t\t\t$data[] = $this->load($challenge->challenges_id)[0];\n\t\t\t$data[$i]['sender'] += $this->load($challenge->sender, 'users')[0];\n\t\t\t$i++;\n\t\t}\n\n\t\treturn $data;\n\t}", "public function getMessagesById($conversation_id, $userId, $offset, $take)\n {\n\n $removed_messages = ConversationRemove::where('user_id', $userId)\n ->where('conversation_id', $conversation_id)\n ->where('messages_removed', 1)\n ->first();\n\n $messages = [];\n $recipients = [];\n if(!$removed_messages){\n $messages = Message::where('conversation_id', $conversation_id)\n ->select('*', 'user_id as user')\n ->offset($offset)->take($take)\n ->get()\n ->toArray();\n\n $messages = collect($messages)->map(function($item, $key){\n $item = collect($item)->map(function($item, $key){\n if($key == 'user'){\n $user = User::with('profile')->where('id', '=', $item)->first(['id', 'first_name', 'last_name']);\n $user->home_course = null;\n $user->home_course_logo = null;\n $home_course = HomeCourse::with('course')->where('user_id', $user->id)->first();\n if(!is_null($home_course)){\n $user->home_course = $home_course->course->name;\n $user->home_course_logo = $home_course->course->logo;\n }\n return $user;\n }\n return $item;\n });\n return $item;\n });\n\n $participants = ConversationParticipant::where('conversation_id', $conversation_id)->get()->pluck('user_id');\n $recipients = User::with('profile')->whereIn('id', $participants)->get(['id', 'first_name', 'last_name']);\n// $recipients = $conversations->messages['withUser'];\n// $messages = $conversations->messages['messages'];\n } else {\n\n $messages = Message::where('conversation_id', $conversation_id)\n ->where('id', '>', $removed_messages->last_message_id)\n ->select('*', 'user_id as user')\n ->offset($offset)->take($take)\n ->get()\n ->toArray();\n\n $messages = collect($messages)->map(function($item, $key){\n $item = collect($item)->map(function($item, $key){\n if($key == 'user'){\n $user = User::with('profile')->where('id', '=', $item)->first(['id', 'first_name', 'last_name']);\n $user->home_course = null;\n $user->home_course_logo = null;\n $home_course = HomeCourse::with('course')->where('user_id', $user->id)->first();\n if(!is_null($home_course)){\n $user->home_course = $home_course->course->name;\n $user->home_course_logo = $home_course->course->logo;\n }\n return $user;\n }\n return $item;\n });\n return $item;\n });\n $participants = ConversationParticipant::where('conversation_id', $conversation_id)->get()->pluck('user_id');\n $recipients = User::with('profile')->whereIn('id', $participants)->get(['id', 'first_name', 'last_name']);\n }\n return [\n 'messages' => $messages,\n 'withUser' => $recipients,\n ];\n\n }", "public function validateID($userIds,$size,$conn){\n for($i=0; $i < $size; $i++ ){\n if( strlen($userIds[$i]) != 4 ){\n return -1;\n }\n }\n\n $sql = \"SELECT COUNT(*) FROM People WHERE pId in (\".implode(',',$userIds).\")\";\n $result = mysqli_query($conn,$sql);\n $row = mysqli_fetch_assoc($result);\n\n if ( $row['COUNT(*)']==$size ){\n return 1;\n } else {\n return -1;\n }\n\n }", "function getAllUsersIdInsideAProject($projectid)\n{\n $query = \"SELECT distinct users.id FROM users\nINNER join `join` ON `join`.user_id = users.id\nINNER join `groups` ON `join`.group_id = `groups`.id\nINNER join participate ON participate.group_id = `groups`.id\nINNER join projects ON participate.project_id = projects.id\nWHERE participate.state IN (\" . PARTICIPATE_STATE_INVITATION_ACCEPTED . \",\" . PARTICIPATE_STATE_CREATOR . \") AND `join`.state IN (\" . implode(\", \", [JOIN_STATE_INVITATION_ACCEPTED, JOIN_STATE_APPROVED]) . \") AND projects.id = :id AND users.state != 0\nORDER BY users.id\";\n\n $params = [\"id\" => $projectid];\n $items = Query($query, $params, true);\n $ids = [];\n foreach ($items as $item) {\n $ids[] = $item['id'];\n }\n return $ids;\n}", "function get_users_of_domain($user_ids = array()){\n\t\t$user_ids = implode(',',$user_ids);\n\t\t$sql = \"SELECT * FROM \" .self::$table_name;\n\t\t$sql .= \" WHERE userid IN(\".$user_ids.\")\";\n\t\treturn self::find_by_sql($sql);\n\t}", "function getParticipantId($user_id)\n {\n $db=Frd::getDb(); \n $select=$db->select();\n\n $select->from($this->table,$this->primary);\n $select->where('userId=?',$user_id);\n $select->limit(1);\n\n\n $id= $db->fetchOne($select);\n if($id == false)\n $id=0;\n\n return $id;\n }", "function getConversationsList($uid) {\n\tglobal $db, $conversations;\n\n\t$req = 'SELECT * FROM conversations';\n\t$req .= ' LEFT JOIN users ON users.uid = conversations.c_from_id';\n\t$req .= ' WHERE c_to_id = '.$uid.' OR c_from_id = '.$uid.' ORDER BY c_create_at DESC';\n\n\treturn $conversations = $db->query($req);\n}", "public function getMyContactsIdsInArray()\n {\n $usersIdsObj = $this->db->query('SELECT id_contact FROM we__Contacts WHERE fk_iduser = ?', [\n $this->session->read('auth')->pk_iduser\n ])->fetchAll();\n\n $idArray = Functions::getArrayFromObjectProperty($usersIdsObj, 'id_contact');\n return $idArray;\n }", "public function getChatMessages(\n int $user_id\n ) {\n\n $db = $this->conn;\n $appointment_id = $this->appointment_id;\n\n $messages_statement = $db->prepare(\"SELECT msg_from, date_added, msg, selectedfile FROM chat WHERE app_id = ?\");\n $messages_statement->bind_param(\"s\", $appointment_id);\n $messages_statement->execute();\n\n if (mysqli_error($db)) {\n $this->logError(__FUNCTION__, func_get_args(), \"Failed to fetch chat messages.\", \"\", mysqli_error($db));\n\n return [\"error\" => \"Failed to fetch chat messages.\", \"error_code\" => 1];\n }\n\n $messages = array();\n $messages_result = $messages_statement->get_result();\n\n while ($message = $messages_result->fetch_assoc()) {\n $message[\"date_added\"] = date(\"d/m h:i\", strtotime($message[\"date_added\"]));\n $message[\"msg\"] = stripslashes($message[\"msg\"]);\n $message[\"selectedfile\"] = explode(\"#?#\", $message[\"selectedfile\"]);\n\n array_push($messages, $message);\n }\n\n return $messages;\n }", "public function getSpecificChannelUserCompletion($channel_id, $user_ids);", "public function getIdUsersFromCircleId($id){\r\n\t\tif($id == 0){\r\n\t\t\t\r\n\t\t\t$userId = $_SESSION['UserAuth']['User']['id'];\r\n\t\t\t$ucs = $this->query(\"SELECT user_id as id FROM user_circles as UserCircle WHERE UserCircle.user_id = $userId;\");\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$ucs = $this->query(\"SELECT user_id as id FROM user_circles as UserCircle WHERE UserCircle.circle_id = $id;\");\r\n\t\t}\r\n\t\t\r\n\t\t$circlesId = array();\r\n\t\tforeach ($ucs as $key => $uc) {\r\n\t\t\tarray_push($circlesId, $uc['UserCircle']['id']);\r\n\t\t}\r\n\t\treturn $circlesId;\r\n\t}", "public static function getChatRoomByUsers($fromUserId, $toUserId)\n {\n $fromUserId = intval($fromUserId);\n $toUserId = intval($toUserId);\n\n if (empty($fromUserId) || empty($toUserId)) {\n return false;\n }\n\n $result = DB::table('chat_video')\n ->where(function($query) use ($fromUserId, $toUserId) {\n $query->where('sender_id', $fromUserId)->where('receiver_id', $toUserId);\n })\n ->orWhere(function($query) use ($fromUserId, $toUserId) {\n $query->where('sender_id', $toUserId)->where('receiver_id', $fromUserId);\n })\n ->first();\n\n return $result ?: false;\n }", "function conversationDetail($user_id)\n{\n $conversation_id = $_GET['conversation_id'];\n $conversation = Conversation::getConversationForUser($conversation_id, $user_id);\n $messages = Message::getMessagesForConversationId($conversation_id);\n $user = User::getUserById($user_id);\n $interlocutor = User::getUserById($conversation['interlocutor_id']);\n $conversation_list_partial = conversationListPartial($user_id);\n \n $search = isset( $_GET['content'] ) ? $_GET['content'] : null;\n $messagesFiltered = Message::filterMessages($conversation_id, $search);\n \n require('view/conversationView.php');\n}", "function getPartnerIds(){\r\n \t\r\n \t$partners = array();\r\n \t$partner_ids_array = array();\r\n \t$partner_ids_str = '';\r\n\r\n \t$partners = $this->db->get_where('permissions_users', array(\r\n\t \t'role' => 'partner'\r\n\t ))->result_array();\r\n\r\n\t foreach ($partners as $key => $partner) {\r\n\t \t$partner_ids_array[] = $partner['user_id'] . '-' . $partner['user_name'];\r\n\t }\r\n\r\n \t$partner_ids_str = implode(\",\",$partner_ids_array);\r\n\r\n\t return $partner_ids_str;\r\n }", "private function buildUser($id) {\n $result = array();\n $a = 0;\n $data = MailinglistUserTable::instance()->getAllUserBySlotId($id);\n foreach($data as $user) {\n $result[$a]['id'] = $user->getId();\n $result[$a]['user_id'] = $user->getUserId();\n $result[$a++]['name'] = $user->getUserId() == -2 ? $this->context->getI18N()->__('Sender of circulation' ,null,'mailinglist') : $user->getName();\n }\n return $result;\n }", "function getHistoryForUser($userId) {\n\n $stmt = $this->conn->prepare(\"SELECT * FROM n2u_message INNER JOIN n2u_message_to_receivers\nON n2u_message.id=n2u_message_to_receivers.message_id INNER JOIN n2u_user ON n2u_message_to_receivers.receiver_id=n2u_user.id\nwhere from_user_id=? or receiver_id=? order by DATE_SENT DESC \");\n $stmt->bind_param(\"ii\", $userId, $userId);\n $stmt->execute();\n $result = $stmt->get_result();\n $messages = array();\n if ($result->num_rows > 0) {\n while($row = $result->fetch_assoc()) {\n array_push($messages,$row);\n }\n }\n $stmt->close();\n return $messages;\n\n }", "protected function getIdsByUserIds(array $userIds)\n {\n $qb = $this->getQueryBuilder()->whereIn('users', $userIds);\n $ids = $this->searchService->getIds($qb);\n $ids = array_unique($ids);\n return $ids;\n }", "function getMessages($userid)\n {\n $stmt = $this->con->prepare(\"SELECT messages.id, (SELECT users.name FROM users WHERE users.id = messages.from_users_id) as `from`, (SELECT users.name FROM users WHERE users.id = messages.to_users_id) as `to`, messages.title, messages.message, messages.sentat FROM messages WHERE messages.to_users_id = ? ORDER BY messages.sentat DESC;\");\n $stmt->bind_param(\"i\", $userid);\n $stmt->execute();\n $stmt->bind_result($id, $from, $to, $title, $message, $sent);\n\n $messages = array();\n\n while ($stmt->fetch()) {\n $temp = array();\n\n $temp['id'] = $id;\n $temp['from'] = $from;\n $temp['to'] = $to;\n $temp['title'] = $title;\n $temp['message'] = $message;\n $temp['sent'] = $sent;\n\n array_push($messages, $temp);\n }\n\n return $messages;\n }", "public function distinctUsers($userid){\r\n $senderChatUsers = $this->senderchatUsers($userid);\r\n $recieverChatUsers = $this->recieverchatUsers($userid);\r\n foreach ($recieverChatUsers as $ruser) {\r\n $flag = 0;\r\n foreach ($senderChatUsers as $suser) {\r\n if($ruser['userid'] == $suser['userid'])\r\n $flag = 1;\r\n }\r\n if($flag == 0)\r\n $senderChatUsers[] = $ruser;\r\n }\r\n return $senderChatUsers;\r\n }", "function getChallengesForUser($user_id) {\n\t\t\n\t\t// get list of past opponents & loop thru\n\t\t$opponentID_arr = $this->challengeOpponents($user_id);\n\t\tforeach($opponentID_arr as $key => $val)\n\t\t\t$opponentChallenges_arr[$user_id .'_'. $val][] = $this->challengesWithOpponent($user_id, $val);\n\t\t\n\t\t// loop thru each paired match & pull off most recent\n\t\t$challengeID_arr = array();\n\t\tforeach($opponentChallenges_arr as $key => $val)\n\t\t\tarray_push($challengeID_arr, key($val[0]));\n\t\t\t\n\t\t\n\t\t// sort by date asc, then reverse to go desc\n\t\tasort($challengeID_arr);\n\t\t$challengeID_arr = array_reverse($challengeID_arr, true);\n\t\t\n\t\t\n\t\t// loop thru the most resent challenge ID per creator/challenger match\n\t\t$cnt = 0;\n\t\t$challenge_arr = array();\n\t\tforeach ($challengeID_arr as $key => $val) {\n\t\t\tarray_push($challenge_arr, $this->getChallengeObj($val));\n\t\t\t\n\t\t\t// stop at 10\n\t\t\tif (++$cnt == 10)\n\t\t\t\tbreak;\n\t\t}\n\t\t\t\n\t\t\n\t\t// return\n\t\t$this->sendResponse(200, json_encode($challenge_arr));\n\t\treturn (true);\n\t}", "public function findByIds( $aRecipientIds );", "function follow_tags_check_notification_friends($creator_id,$toArray){\r\n\r\n \t$newToArray =\"\";\r\n\r\n \tforeach ($toArray as $to) {\r\n \t\tif(!check_entity_relationship($to,'notifysite',$creator_id) && !check_entity_relationship($to,'notifymail',$creator_id)){\r\n \t\t\t$newToArray .= \"$to,\";\r\n \t\t}\r\n \t}\r\n\r\n\t// Check if user want to notify by friends\r\n\r\n\treturn $newToArray;\r\n}", "public function recipientIds(array $aRecipientIds = null);", "public function findAllMessages(string $idUser, string $idFriend) {\n $tableName = self::TABLE_NAME;\n\n $req = $this->_db->prepare(\"\n SELECT $tableName.message, $tableName.createdAt, users.username FROM $tableName \n INNER JOIN users ON users.idUser = $tableName.idUser \n WHERE $tableName.idFriend = ? AND $tableName.idUser = ? OR $tableName.idFriend = ? AND $tableName.idUSer = ?\n ORDER BY $tableName.createdAt \n \");\n\n $req->execute([$idFriend, $idUser, $idUser, $idFriend]);\n\n return $req->fetchAll();\n\n }", "function getFollowedUsers ($user_id)\n\t{\n\t\t$db = new Database();\n\t\t$select = \"select user_id from USERS where user_id in (select followed_user_id from FOLLOWERS where following_user_id = {$user_id});\";\n\t\t$result = $db->query($select);\n\n\t\t$array = array();\n\t\twhile ($row = mysqli_fetch_assoc($result)) {\n\t\t\t$user_id = $row['user_id'];\n\t\t\t$array[] = getUser($user_id);\n\t\t}\n\t\t\n\t\treturn $array;\n\t}", "public function messages_get($id)\n {\n $expInfo = $this->db->query(\"select * from expert_opinion where expert_opinion_id='\".$id.\"'\")->row();\n // echo $this->db->last_query();\n if(count($expInfo)>0)\n {\n $messagesInfo = $this->db->query(\"select * from expert_opinion_conversations where expert_opinion_id='\".$expInfo->expert_opinion_id.\"'\")->result();\n $i = 0;\n if(count($messagesInfo)>0)\n {\n foreach($messagesInfo as $value)\n {\n $param['messages'][$i]['sent_by'] = getDoctorName($value->sent_by);\n $param['messages'][$i]['doctor_id'] = $value->sent_by;\n $param['messages'][$i]['message'] = $value->message;\n $i++;\n }\n }\n else\n {\n $param['messages'] = [];\n }\n \n $this->response(array('code'=>'200','message'=>'Success','result'=>$param));\n }\n else{\n $param['messages'] = [];\n $this->response(array('code'=>'201','message'=>'Error','result'=>$param));\n }\n }", "public function getParticipants();", "function message($id) {\r\n\r\n\t\tif($this->session->userdata('stud_id') == FALSE ) {\r\n\t\t\tredirect('students','refresh');\r\n\t\t}\r\n\r\n\t\r\n\t\t/*USERS*/\r\n\t\t$user1 = $this->session->userdata('stud_id'); //the student\r\n\t\t$user2 = $id; //ID of teh professor\r\n\r\n\t\t// GET all the conversation/s where user_1 and user_2 (vice-versa) exist\r\n\t\t$conversation_id = $this->crud->get_single('conversation',\"(user_1 = $user1 AND user_2 = $user2) OR (user_1= $user2 AND user_2 = $user1)\");\r\n\r\n\t\t// IF there is existing conversation_id\r\n\t\tif( $conversation_id ) { \r\n\t\t\t// SET it to another variable.\r\n\t\t\t$data['conversation_data'] = $conversation_id;\r\n\r\n\t\t// IF the conversation_id does not exist, create an ID for them.\r\n\t\t} else {\r\n\t\t\t$data = [\r\n\t\t\t\t'user_1' => $this->session->userdata('stud_id'),\r\n\t\t\t\t'user_2' => $id \r\n\t\t\t];\r\n\t\t\t/*ADD new conversation*/\r\n\t\t\t$new_conversation = $this->crud->add('conversation', $data);\r\n\t\t}\r\n\r\n\t\treturn $this->current_message($id);\r\n\t\t\r\n\t}", "public static function Create( $userid1, $userid2 ) {\n // but make sure that no other people are in that convo\n $res = db(\n 'SELECT\n one.participant_channelid AS channel_id\n FROM\n chatparticipants AS one\n CROSS JOIN chatparticipants AS two\n ON one.participant_channelid = two.participant_channelid\n LEFT JOIN chatparticipants AS three\n ON one.participant_channelid = three.participant_channelid \n AND three.participant_userid != :userid1\n AND three.participant_userid != :userid2\n WHERE\n one.participant_userid = :userid1\n AND two.participant_userid = :userid2\n AND three.participant_userid IS NULL', compact( 'userid1', 'userid2' )\n );\n if ( mysql_num_rows( $res ) ) {\n $row = mysql_fetch_array( $res );\n $channelid = $row[ 'channel_id' ];\n }\n else {\n // verify user exists\n $res = db(\n 'SELECT user_id FROM users WHERE user_id = :userid2 LIMIT 1',\n compact( 'userid2' )\n );\n mysql_num_rows( $res ) or die( 'Failed to create private chat; target user does not exist' );\n $success = db(\n 'INSERT INTO \n chatchannels\n ( channel_created ) VALUES ( NOW() )'\n );\n $channelid = mysql_insert_id();\n db(\n 'INSERT IGNORE INTO\n chatparticipants\n ( participant_userid, participant_channelid, participant_joined ) VALUES\n ( :userid1, :channelid, NOW() ), ( :userid2, :channelid, NOW() )',\n compact( 'userid1', 'userid2', 'channelid' )\n );\n }\n \n return $channelid;\n }", "public function getUserMessageListOfUser($userId, $sqlSearch = null) {\n\t\tglobal $db;\n\t\t\n\t\t$array = [];\n\t\t\n\t\t$db -> query(\n\t\t\t'SELECT * '.\n\t\t\t'FROM `db_message` '.\n\t\t\t'WHERE `from_user_id` = \"'.$userId.'\" || `to_user_id` = \"'.$userId.'\" '.$sqlSearch.' '.\n\t\t\t'ORDER BY `date` DESC'\n\t\t);\n\t\tif($db -> numRows() > 0) {\n\t\t\twhile($r = $db -> fetchArray()) {\n\t\t\t\t$array[] = $r;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn($array);\n\t}" ]
[ "0.7577046", "0.7073129", "0.6864772", "0.68353957", "0.663073", "0.6609367", "0.66061354", "0.6526187", "0.63598126", "0.6338855", "0.6316539", "0.6252845", "0.61836237", "0.6170326", "0.6092609", "0.60847265", "0.6053267", "0.60366213", "0.6019624", "0.5989704", "0.59562945", "0.59562", "0.59162843", "0.59015036", "0.5879135", "0.57953984", "0.5791497", "0.57911235", "0.57654756", "0.5759333", "0.5725067", "0.57137203", "0.57023615", "0.5702033", "0.5686221", "0.5677097", "0.5652131", "0.5647985", "0.56406707", "0.56396884", "0.5634223", "0.56207234", "0.55960536", "0.55669105", "0.5558123", "0.55548865", "0.555232", "0.55407435", "0.5539571", "0.5534146", "0.55305487", "0.55277985", "0.55256045", "0.54976135", "0.54940385", "0.5493729", "0.5470316", "0.5465709", "0.5462743", "0.54620653", "0.546136", "0.54577494", "0.5454574", "0.5444011", "0.54432225", "0.5429475", "0.542652", "0.5426078", "0.54234755", "0.5409154", "0.5399812", "0.5390404", "0.5389266", "0.5377339", "0.53748286", "0.53746384", "0.5374402", "0.5373723", "0.5362806", "0.53581786", "0.53476995", "0.533683", "0.53330755", "0.53279346", "0.53221315", "0.5317419", "0.5275441", "0.5260323", "0.5258226", "0.52484196", "0.52471274", "0.52442765", "0.52416027", "0.52392775", "0.5237231", "0.52325416", "0.52264655", "0.52254146", "0.52252674", "0.5216078" ]
0.7901682
0
return an array of user ids that are participating in a conversation params: Conversation_Id the conversation id returns: an array of user ids array( 1,2,...) on success errormsg on error
вернуть массив идентификаторов пользователей, участвующих в беседе params: Conversation_Id идентификатор беседы returns: массив идентификаторов пользователей array( 1,2,...) при успешном выполнении errormsg при ошибке
function GetUsersInConversation( $Conversation_Id ){ if( ! is_int( $Conversation_Id ) ) return( "Param error: Conversation_Id - wrong type or empty." ); // get the user ids within a conversation $Sql = "SELECT UserId_List FROM ChatConversations WHERE Id = $Conversation_Id LIMIT 1"; $result = mysql_query( $Sql ); $errno = mysql_errno(); if( 0 != $errno ) return( "mysql error: $errno" ); $row = mysql_fetch_row( $result ); mysql_free_result( $result ); // get the usernames of the ids.. $Sql = "SELECT Id,CONCAT( FirstName, ' ', LastName ) AS Name FROM User WHERE Id IN ( {$row[0]} )"; $result = mysql_query( $Sql ); $errno = mysql_errno(); if( 0 != $errno ) return( "mysql error: $errno" ); $Users = array(); while( $row = mysql_fetch_array( $result, MYSQL_ASSOC ) ){ // convert Id to int. $row[0] = (int)$row[0]; $Users[] = $row; } mysql_free_result( $result ); /* // final array returned should be: array( "Conversation_Id" => (int)$Conversation_Id, "User_Array" => array( array( "Id" = > 1, Name => "Chris Veeneman" ), array( "Id" = > 2, Name => "Fredrik Nygren" ) ) ) */ return( array( "Conversation_Id" => (int)$Conversation_Id, "User_Array" => $Users ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUserIdsForConvo($conversationId){\n\t\t$query = \"SELECT user_one, user_two FROM conversation WHERE conversationId = $conversationId\";\n\t\treturn Database::getResultSetAsArray($query);\n\t}", "function GetConversationIdsFromUserId( $FromUser_Id ){\n\n\tif( ! is_int( $FromUser_Id ) )\n\t\treturn( \"Param error: FromUser_Id - wrong type or empty.\" );\n\n\t$Sql = \"SELECT Conversation_Id FROM ChatConversationParticipants WHERE User_Id = $FromUser_Id\";\n\t$result = mysql_query( $Sql );\n\t$errno = mysql_errno();\n\tif( 0 != $errno )\n\t\treturn( \"mysql error: $errno\" );\n\t$Conversation_Ids = array();\n\twhile( $row = mysql_fetch_row( $result ) )\n\t\t$Conversation_Ids[] = $row[0];\n\tmysql_free_result( $result );\n\treturn( $Conversation_Ids );\n}", "public function getArrayParticipantForSetLu($idConversation){\n \n $idUserCourant = $this->security->getToken()->getUser()->getId();\n $repo = $this->manager->getRepository('MindMpBundle:Participants');\n $tabDest = array();\n $participants = $repo->findParticipantsByConversation($idConversation, $idUserCourant);\n \n foreach ($participants as $participant){\n $tabDest[] = $participant->getIdUser();\n }\n \n return $tabDest;\n }", "public function participatingIn()\n {\n return $this->conversations()\n ->pluck('id');\n }", "function getAllConversationId(){\n\t\t$sqlGetDialogue = \"SELECT DISTINCT conversation_id FROM \".CONVERSATION.\"\n\t\tWHERE conversation_userId = $this->id\";\n\t\t$sqlResult = $this->connect->query($sqlGetDialogue);\n\t\t$tabDialogueId = array();\n\t\t$i = 0;\n\t\twhile($idRowDiscussion = mysqli_fetch_array($sqlResult)){\n\t\t\t$tabDialogueId[$i] = $idRowDiscussion['conversation_id'];\n\t\t\t$i++;\n\t\t}\n\t\treturn $tabDialogueId;\n\t}", "public function getListenerIds($user)\n {\n //get partner whom user favourite\n $lOnlFansId = array();\n\n //searching from database\n $lFans = Favourite::where('partner_id', '=', $user->id)->get();\n if(!$lFans->isEmpty()){\n foreach ($lFans as $fan) {\n //check user existed\n if($fan->user){\n //check user online\n if($fan->user->socket_id != null && $fan->user->socket_id != ''){\n //add user to the list\n array_push($lOnlFansId, $fan->user->id);\n }\n }\n }\n }\n\n //get partner who had chat with user\n $lOnlChatedsId = array();\n\n //searching for conversations\n $lConversations = Conversation::where('user1_id','=',$user->id)\n ->orWhere('user2_id','=',$user->id)->get();\n if (!$lConversations->isEmpty()) \n {\n foreach ($lConversations as $conversation) {\n //check to add partner id\n if($conversation->user1_id == $user->id){\n array_push( $lOnlChatedsId, $conversation->user2_id);\n }\n else{\n array_push( $lOnlChatedsId, $conversation->user1_id);\n }\n }\n }\n\n //get matching partners\n $lOnlMatchingsId = array();\n\n //call action matching from UserController\n $lOnlMatchingPartners = UserController::matching($user, true, 1);\n\n if(count($lOnlMatchingPartners) > 0){\n $lOnlMatchingsId = array_pluck($lOnlMatchingPartners, 'id');\n }\n\n //merging those ids\n $listenIds = array_values(array_unique(array_collapse([$lOnlFansId, $lOnlChatedsId, $lOnlMatchingsId])));\n\n //return value\n return $listenIds;\n }", "public function getUserIds();", "private function get_friend_ids(){\n\n $db = $this->db;\n //ovdje spremamo sve vrijednosti id polja prijatelja korisnika\n $users = array();\n\n $users1 = $db->friendQuery('SELECT user_id FROM friend_requests WHERE friend_id=1 AND accepted=1');\n $users1 = $users1->fetchAll(PDO::FETCH_ASSOC);\n\n foreach($users1 as $user)\n {\n $users[] = $user['user_id'];\n }\n\n $users2 = array();\n $users2 = $db->friendQuery('SELECT friend_id FROM friend_requests WHERE user_id=1 AND accepted=1');\n\n if($users2)\n $users2 = $users2->fetchAll(PDO::FETCH_ASSOC);\n\n\n foreach($users2 as $user)\n {\n $users[] = $user['friend_id'];\n }\n \n return $users;\n }", "function CreateConversationId( $FromUser_Id, $User_Id_Array ){\n\n\t// given an array of user ids -\n\t// 1) check if this exact group of ids is already forming a conversation.\n\t// 2) if so, return the conversation id - finished.\n\t// 3) otherwise, create a new conversation id record\n\t// 4) insert each user id into the participants table\n\t// 5) return the new conversation id.\n\n\tif( ! is_int( $FromUser_Id ) || ! is_array( $User_Id_Array ) || 0 == count( $User_Id_Array ) )\n\t\treturn( \"Param error: FromUser_Id / User_Id_Array - wrong type or empty.\" );\n\n\t// sort the User_Id_Array in numeric order \n\tsort( $User_Id_Array, SORT_NUMERIC );\n\t$IdList = implode( $User_Id_Array, ',' );\n\t\n\t// search for idlist\n\t$Sql = \"SELECT Id FROM ChatConversations WHERE UserId_List = '$IdList' LIMIT 1\";\n\t$result = mysql_query( $Sql );\n\t$errno = mysql_errno();\n\tif( 0 != $errno )\n\t\treturn( \"mysql error: $errno\" );\n\t\t\n\tif( 0 < mysql_num_rows( $result ) ){\n\t\t$row = mysql_fetch_row( $result );\n\t\tmysql_free_result( $result );\n\t\treturn( (int)$row[0] );\n\t}\n\tmysql_query( \"BEGIN\" );\n\t\n\t// conversation doesn't yet exist, create a new one and return it's id.\n\t$Sql = \"INSERT INTO ChatConversations (Id,CreatedByUser_Id,CreatedDate,UserId_List) VALUES (NULL,$FromUser_Id,NOW(),'$IdList')\";\n\t$result = mysql_query( $Sql );\n\t$errno = mysql_errno();\n\tif( 0 != $errno ){\n\t\tmysql_query( \"ROLLBACK\" );\n\t\treturn( \"mysql error: $errno\" );\n\t}\n\n\t$Conversation_Id = mysql_insert_id();\n\n\t// create a multi-insert record\n\t$Values = '';\n\tforeach( $User_Id_Array as $Id )\n\t\t$Values .= \"(NULL,$Conversation_Id,$Id),\";\n\t$Values = rtrim( $Values, \",\" );\n\t\n\t$Sql = \"INSERT INTO ChatConversationParticipants (Id,Conversation_Id,User_Id) VALUES $Values\";\n\tmysql_query( $Sql );\n\t$errno = mysql_errno();\n\tif( 0 != $errno ){\n\t\tmysql_query( \"ROLLBACK\" );\n\t\treturn( \"mysql error: $errno\" );\n\t}\n\tmysql_query( \"COMMIT\" );\n\treturn( (int)$Conversation_Id );\n}", "public function getConversationPersons();", "public function getReadedUserIds($idconv, $dateMessage, $idMessAuthor)\n {\n //si le message est le miens on get les id des users different du miens\n if($idMessAuthor == $this->session->read('auth')->pk_iduser)\n {\n $results = $this->db->query(\"SELECT fk_iduser FROM we__EnregConversation WHERE fk_idconversation = ? AND consultedAt >= ? AND fk_iduser != ?\",[\n $idconv,\n $dateMessage,\n $idMessAuthor\n ])->fetchAll();\n }\n //sinon on get les id de users différent du miens et de l'user\n else{\n $results = $this->db->query(\"SELECT fk_iduser FROM we__EnregConversation WHERE fk_idconversation = ? AND consultedAt >= ? AND fk_iduser != ? AND fk_iduser != ?\",[\n $idconv,\n $dateMessage,\n $this->session->read('auth')->pk_iduser,\n $idMessAuthor\n ])->fetchAll();\n }\n $idusersString = '';\n if($results)\n {\n $idusersArr = array();\n foreach ($results as $result)\n {\n array_push($idusersArr, $result->fk_iduser);\n }\n $idusersString = implode(',',$idusersArr);\n }\n return $idusersString;\n }", "public static function getExistingUsersId(): array\n {\n return DB::table('loan_applications')\n ->where('status', Application::STATUS_COMPLETED)\n ->select(['user_id'])\n ->distinct()\n ->get()\n ->pluck('user_id')\n ->toArray()\n ;\n\n }", "public function getContibsIdsForSearch($whereQuery)\n {\n $existsQuery = \"SELECT user_id FROM Participation \".$whereQuery;\n if(($result = $this->getQuery($existsQuery,true)) != NULL)\n {\n $countIds = count($result);\n for($i=0; $i<$countIds; $i++)\n {\n $ids[$i] = $result[$i]['user_id'];\n }\n return $idstring = implode(',',$ids);\n }\n else\n return 0;\n }", "function skype_get_participants($skypeid) {\n return false;\n}", "public function getFromUserIds(): array\n {\n if (!is_null($this->fromUserIds)) {\n return $this->fromUserIds;\n }\n\n if (isset($this->attributes['fromUserIds'])) {\n $this->fromUserIds = explode(',', $this->attributes['fromUserIds']);\n } elseif ($this->fromUserId) {\n $this->fromUserIds = [$this->fromUserId];\n } else {\n $this->fromUserIds = [];\n }\n\n return $this->fromUserIds;\n }", "protected function getUserIds(){\n switch ($this->userType){\n case self::USER_TYPE_INTERNAL:\n return Yii::app()->params['googlePlayInternalUserIds'];\n case self::USER_TYPE_GOOGLE_CC_MAIN:\n return Yii::app()->params['googleCcMainUserIds'];\n case self::USER_TYPE_GOOGLE_CC_MAIN_ADMIN:\n return Yii::app()->params['googleCcMainAdminUserIds'];\n case self::USER_TYPE_GOOGLE_CC_TRANSCRIBE_QA:\n return Yii::app()->params['googleCcTransQAUserIds'];\n case self::USER_TYPE_GOOGLE_CC_TRANSCRIBE_SQA:\n return Yii::app()->params['googleCcTransSQAUserIds'];\n case self::USER_TYPE_GOOGLE_CC_CONFORM_QA:\n return Yii::app()->params['googleCcConformQAUserIds'];\n default:\n return Yii::app()->params['googlePlayExternalUserIds'];\n }\n }", "public function getParticipants();", "public function participants()\n\t{\n\t\treturn $this->belongsToMany('App\\User', 'confer_conversation_participants', 'user_id', 'conversation_id');\n\t}", "public function getConversationParticipants()\n {\n return $this->conversationParticipants;\n }", "public function getParticipantPeopleIds()\n\t{\n\t\t$this->getOriginalParticipantIds();\n\t\t$ids = array();\n\t\tforeach ($this->getParticipants() as $p) {\n\t\t\t$ids[] = $p['person']['id'];\n\t\t}\n\n\t\treturn $ids;\n\t}", "function yz_get_private_users_activity_ids( $users ) {\n\n global $bp, $wpdb;\n\n // If the given users is array convert it to string.\n if ( is_array( $users ) ) {\n $users = implode( ',', array_map( 'absint', $users ) );\n }\n\n // Get SQL.\n $sql = \"SELECT id FROM {$bp->activity->table_name} WHERE user_id IN ( $users )\";\n\n // Get Result\n $activities = $wpdb->get_results( $sql , ARRAY_A );\n\n // Return Array List.\n $activities_ids = wp_list_pluck( $activities, 'id' );\n\n return $activities_ids;\n\n}", "function get_users_from_ids($my_user_id_blockees,$connection){\n\t$num_per_call = 90;\n\t# Used to count how many have been added and what array index\n\t$count=0;\n\t$index=0;\n\t# Arrays of ids in comma separated list.\n\t$call_array_ids = array();\n\t$call_array_ids_tmp = array();\n\tfor ($i=0; $i<=(count($my_user_id_blockees)-1); $i++)\n\t{\n\t\t# Do in blocks of x\n\t\tif ($count>=$num_per_call) {\n\t\t$count=0;\n\t\t$call_array_ids[$index]= implode(\",\", $call_array_ids_tmp);\n\t\t$call_array_ids_tmp = array();\n\t\t$index++;\n\t}\n\tarray_push($call_array_ids_tmp, $my_user_id_blockees[$i]);\n\t$count++;\n\t}\n\t$call_array_ids[$index]= implode(\",\", $call_array_ids_tmp);\n\t\n\t$users=array();\n\t# Loop over all and get the corresponding user objects\n\tfor ($i=0; $i<=(count($call_array_ids)-1); $i++)\n\t{\n\t\t$tmp_users=$connection->get(\"users/lookup\",array('user_id' => $call_array_ids[$i]));\n\t\tif (!isset($tmp_users->errors)) {\n\t\t\t$users=array_merge($users,$tmp_users);\n\t\t}\n\t}\n\treturn $users;\n}", "public function getUserIds()\n {\n $this->_parse();\n\n return $this->_cache['userid'];\n }", "public function getActiveConversations()\n {\n $conn = Db::getConnection();\n $statement = $conn->prepare(\"SELECT * FROM conversations WHERE (user_1 = :user_id OR user_2 = :user_id) AND active = 1\");\n $statement->bindValue(\":user_id\", $this->getId());\n $statement->execute();\n $result = $statement->fetch(\\PDO::FETCH_OBJ);\n\n return $result;\n }", "public function getFriendSendMessage() {\n $viewer_id = Engine_Api::_()->user()->getViewer()->getIdentity();\n $getFriednArray = array();\n $messageTable = Engine_Api::_()->getItemTable('messages_message');\n $messageTableName = $messageTable->info('name');\n\n $recipientTable = Engine_Api::_()->getDbtable('recipients', 'messages');\n $recipientTableName = $recipientTable->info('name');\n\n $membershipTable = Engine_Api::_()->getDbtable('membership', 'user');\n $membershipTableName = $membershipTable->info('name');\n\n $select = $recipientTable->select()\n ->setIntegrityCheck(false)\n ->from($recipientTableName, array('user_id'))\n ->joinInner($messageTableName, \"$recipientTableName . conversation_id = $messageTableName . conversation_id\", null)\n ->joinInner($membershipTableName, \"$membershipTableName . resource_id = $recipientTableName . user_id\", null)\n ->where($membershipTableName . '.user_id = ?', $viewer_id);\n\n $fetch = $select->query()->fetchAll();\n foreach ($fetch as $id) {\n $getFriednArray[] = $id['user_id'];\n }\n return $getFriednArray;\n }", "function getPartnerIds(){\r\n \t\r\n \t$partners = array();\r\n \t$partner_ids_array = array();\r\n \t$partner_ids_str = '';\r\n\r\n \t$partners = $this->db->get_where('permissions_users', array(\r\n\t \t'role' => 'partner'\r\n\t ))->result_array();\r\n\r\n\t foreach ($partners as $key => $partner) {\r\n\t \t$partner_ids_array[] = $partner['user_id'] . '-' . $partner['user_name'];\r\n\t }\r\n\r\n \t$partner_ids_str = implode(\",\",$partner_ids_array);\r\n\r\n\t return $partner_ids_str;\r\n }", "public function getMyContactsPendingInArray()\n {\n $usersIdsObj = $this->db->query('SELECT fk_iduserto FROM we__Contactsask WHERE fk_iduserfrom = ?', [\n $this->session->read('auth')->pk_iduser\n ])->fetchAll();\n\n $idArray = Functions::getArrayFromObjectProperty($usersIdsObj, 'fk_iduserto');\n return $idArray;\n }", "public function getSelectedFacilityUserIds()\n {\n // $facilityUsers = InstanceSiteDelivery::select('facility_user_id')->groupBy('facility_user_id')->get();\n $usersIds = [];\n /* foreach ($facilityUsers as $facilityUser) {\n if (!in_array($facilityUser->facility_user_id, $usersIds))\n array_push($usersIds, $facilityUser->facility_user_id);\n }\n\n $palikaUsers = AdminUser::whereIn('id', $usersIds)->get();\n foreach ($palikaUsers as $users) {\n if (!in_array($users->palika_user_id, $usersIds))\n array_push($usersIds, $users->palika_user_id);\n\n if (!in_array($users->created_by, $usersIds))\n array_push($usersIds, $users->created_by);\n }*/\n\n return $usersIds;\n }", "public function getUserIdList() {\n return $this->database()->select(\"user_id\")\n ->from(Phpfox::getT('fundraising_supporter'))\n ->execute('getSlaveRows');\n }", "function _get_user_friends_ids ($target_user_id) {\n\t\t$cur_friends_ids = array();\n\t\t// Get friends from db\n\t\tlist($CUR_FRIENDS_LIST) = db()->query_fetch(\"SELECT friends_list AS `0` FROM \".db('friends').\" WHERE user_id=\".intval($target_user_id));\n\t\t// Convert string into array\n\t\tif (!empty($CUR_FRIENDS_LIST)) {\n\t\t\t$tmp_array = explode(\",\", $CUR_FRIENDS_LIST);\n\t\t}\n\t\tforeach ((array)$tmp_array as $tmp_friend_id) {\n\t\t\tif (empty($tmp_friend_id) || $tmp_friend_id == $target_user_id) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$cur_friends_ids[$tmp_friend_id] = $tmp_friend_id;\n\t\t}\n\t\treturn $cur_friends_ids;\n\t}", "function listOfUserIDs(){\n\t\t$ids = [];\n\t\tforeach ($this->members as $obj){\n\t\t\t$id = $obj->getUserID();\n\t\t\tarray_push($ids, $id);\n\t\t}\n\t\treturn $ids;\n\t}", "public function checkConversation($user_one, $user_two){\n\t\t$query = \"SELECT conversationId FROM conversation WHERE (user_one='$user_one' AND user_two='$user_two') \n\t\t\t\t\t\t\t\t\t\t\t\t OR (user_one='$user_two' AND user_two='$user_one')\";\n\t\treturn Database::getResultSetAsArray($query);\n\t}", "public function loadConversationRegistrationIds($authenticatedUser, $recipient)\r\n {\r\n $registrationIds = $this->createQueryBuilder(\"d\")\r\n ->where(\"d.user = :authenticatedUser\")\r\n ->orWhere(\"d.user = :recipient\")\r\n ->setParameter(\":authenticatedUser\", $authenticatedUser)\r\n ->setParameter(\":recipient\", $recipient)\r\n ->getQuery()\r\n ->getResult();\r\n\r\n return $registrationIds;\r\n }", "public function getUserIds()\n {\n return $this->users->lists('id')->toArray();\n }", "public function senderchatUsers($userid){\r\n $sqlQuery = \"\r\n SELECT * FROM \".$this->chatUsersTable.\" WHERE userid IN\r\n (SELECT DISTINCT sender_userid FROM \".$this->chatTable.\" WHERE reciever_userid = '$userid')\";\r\n return $this->getData($sqlQuery);\r\n }", "function assesmentParticipants($assesment){\n // DB connection\n require 'db_connect.php';\n // SQL statement\n $query=\"SELECT u.username FROM pp_user as u INNER JOIN participant AS p ON u.id = p.pp_user_id WHERE p.assesment_id = $assesment\";\n // run SQL statement\n $result=mysqli_query($link, $query);\n // extract data into arry with participants for assesment\n $participants=array();\n while ($row =mysqli_fetch_assoc($result)){\n $participants[]=$row['username'];\n }\n // return arry with participants for assesment\n return $participants;\n}", "public function getAllRecipientsForChat() : array {\n $query = \"SELECT c.name, u.id FROM companies \n c JOIN users u ON c.user_id = u.id \n UNION SELECT t.first_name, u.id \n FROM teachers t JOIN users u ON t.user_id = u.id\";\n $pdostm = $this->db->prepare($query);\n $pdostm->setFetchMode(PDO::FETCH_OBJ);\n $pdostm->execute();\n\n $recipientsDB = $pdostm->fetchAll(PDO::FETCH_OBJ);\n // var_dump($recipientsDB);\n $recipients = array();\n\n foreach ($recipientsDB as $r)\n {\n $recipient = new ChatMember();\n\n $recipient->setUserId($r->id);\n $recipient->setName($r->name);\n\n array_push($recipients,$recipient);\n\n }\n return $recipients;\n\n }", "public function getUserIds() : ?array\n {\n return $this->userIds;\n }", "public static function getUserSubsciptionIds($userId) {\n $results;\n $db = parent::getDataBase();\n $sql = <<<STR\n \t\t SELECT UserSubscriptionId\t\t\t\t\n FROM usersubscriptions \n WHERE UserSubscriptionUserId=:UserId AND UserSubscriptionIsTempUser=0 Order by UserSubscriptionId ASC limit 1\nSTR;\n\n $bind = array(\n \":UserId\" => $userId,\n );\n\n $results = $db->run($sql, $bind);\n Format::formatResponseData($results);\n return $results;\n }", "public function getParticipationsForUser($a_user_id) {\r\n\t\treturn $this->ilRoomSharingDatabaseParticipants->getParticipationsForUser($a_user_id);\r\n\t}", "public function get_user_ids()\n {\n $filter = Request::post(self::PARAM_FILTER);\n $filter_id = substr($filter, 2);\n\n if (! $filter_id)\n {\n return;\n }\n\n $condition = new EqualityCondition(\n new PropertyConditionVariable(GroupRelUser::class_name(), GroupRelUser::PROPERTY_GROUP_ID),\n new StaticConditionVariable($filter_id));\n $relations = \\Chamilo\\Core\\Group\\Storage\\DataManager::retrieves(\n GroupRelUser::class_name(),\n new DataClassRetrievesParameters($condition));\n\n $user_ids = array();\n\n while ($relation = $relations->next_result())\n {\n $user_ids[] = $relation->get_user_id();\n }\n\n return $user_ids;\n }", "public function findConversationOfUsers($user1Id, $user2Id) {\n $queryBuilder = $this->getEntityManager()->createQueryBuilder();\n $queryBuilder->select('c')\n ->from('CoreMessageBundle:Conversation', 'c')\n ->join('c.starter', 's')\n ->join('c.reciever', 'r')\n ->where('(s.id = :user1Id AND r.id = :user2Id) OR (s.id = :user2Id AND r.id = :user1Id)')\n ->andWhere('r.deletedAt IS NULL AND r.enabled = 1 AND s.deletedAt IS NULL AND s.enabled = 1')\n ->setParameters(array(\n 'user1Id' => $user1Id,\n 'user2Id' => $user2Id,\n ));\n\n return $queryBuilder->getQuery()->getOneOrNullResult();\n }", "function smartcom_get_participants($smartcomid) {\n return false;\n}", "function quiz_get_participants($quizid) {\n/// (users with records in quiz_attempts and quiz_question_versions)\n\n global $CFG;\n\n //Get users from attempts\n $us_attempts = get_records_sql(\"SELECT DISTINCT u.id, u.id\n FROM {$CFG->prefix}user u,\n {$CFG->prefix}quiz_attempts a\n WHERE a.quiz = '$quizid' and\n u.id = a.userid\");\n\n //Get users from question_versions\n $us_versions = get_records_sql(\"SELECT DISTINCT u.id, u.id\n FROM {$CFG->prefix}user u,\n {$CFG->prefix}quiz_question_versions v\n WHERE v.quiz = '$quizid' and\n u.id = v.userid\");\n\n //Add us_versions to us_attempts\n if ($us_versions) {\n foreach ($us_versions as $us_version) {\n $us_attempts[$us_version->id] = $us_version;\n }\n }\n //Return us_attempts array (it contains an array of unique users)\n return ($us_attempts);\n\n}", "public function getUserIds() {\n return @$this->attributes['user_ids'];\n }", "function tw_friends_ids_all(){\r\n $output = tw_friends_ids();\r\n $resp = array();\r\n if ($output['success']) {\r\n $resp = $output['response']['ids'];\r\n }\r\n return $resp;\r\n}", "function getRecipientIds() {\n\t\t$ids = array();\n\t\t$recipients = $this->getRecipients();\n\t\tforeach ($recipients as $recipient){\n\t\t\t$ids[$recipient->getRecipientID()] = $recipient->getRecipientID();\n\t\t}\n\t\treturn $ids;\n\t}", "public function findIncomingConversations($id_message, $id_user)\n\t{\n\t\t$qb = $this->_em->createQueryBuilder();\n\t\n\t\t$qb->select('c')\n\t\t->from('ProjetUserBundle:Conversation', 'c')\n\t\t->where('c.user != :id')\n\t\t->setParameter('id', $id_user)\n\t\t->andWhere('c.vu = 0')\n\t\t->andWhere('c.message = ?2')\n\t\t->setParameter(2, $id_message)\n\t\t;\n\t\n\t\n\t\treturn $qb->getQuery()\n\t\t->getResult();\n\t}", "function getAllUsersIdInsideAProject($projectid)\n{\n $query = \"SELECT distinct users.id FROM users\nINNER join `join` ON `join`.user_id = users.id\nINNER join `groups` ON `join`.group_id = `groups`.id\nINNER join participate ON participate.group_id = `groups`.id\nINNER join projects ON participate.project_id = projects.id\nWHERE participate.state IN (\" . PARTICIPATE_STATE_INVITATION_ACCEPTED . \",\" . PARTICIPATE_STATE_CREATOR . \") AND `join`.state IN (\" . implode(\", \", [JOIN_STATE_INVITATION_ACCEPTED, JOIN_STATE_APPROVED]) . \") AND projects.id = :id AND users.state != 0\nORDER BY users.id\";\n\n $params = [\"id\" => $projectid];\n $items = Query($query, $params, true);\n $ids = [];\n foreach ($items as $item) {\n $ids[] = $item['id'];\n }\n return $ids;\n}", "public function getAccountIds() {\n\t\t$retVal = array();\n\t\t\n\t\tforeach ($this->_data as $comment) {\n\t\t\tif ($comment[\"user_id\"] && !in_array($comment[\"user_id\"], $retVal))\n\t\t\t\t$retVal[] = $comment[\"user_id\"];\n\t\t}\n\t\t\n\t\treturn $retVal;\n\t}", "public function recieverchatUsers($userid){\r\n $sqlQuery = \"\r\n SELECT * FROM \".$this->chatUsersTable.\" WHERE userid IN\r\n (SELECT DISTINCT reciever_userid FROM \".$this->chatTable.\" WHERE sender_userid = '$userid')\";\r\n return $this->getData($sqlQuery);\r\n }", "public function getMyContactsIdsInArray()\n {\n $usersIdsObj = $this->db->query('SELECT id_contact FROM we__Contacts WHERE fk_iduser = ?', [\n $this->session->read('auth')->pk_iduser\n ])->fetchAll();\n\n $idArray = Functions::getArrayFromObjectProperty($usersIdsObj, 'id_contact');\n return $idArray;\n }", "public static function getMembersId(int $chatId): array\n {\n $ids = [];\n\n if ($chatId && \\Bitrix\\Main\\Loader::includeModule('im')) {\n $chatRow = self::getRow($chatId);\n $users = \\Bitrix\\Im\\Chat::getUsers($chatRow['CHAT_ID']);\n foreach ($users as $user) {\n $ids[] = $user['id'];\n }\n }\n\n return $ids;\n }", "function getConversationsList($uid) {\n\tglobal $db, $conversations;\n\n\t$req = 'SELECT * FROM conversations';\n\t$req .= ' LEFT JOIN users ON users.uid = conversations.c_from_id';\n\t$req .= ' WHERE c_to_id = '.$uid.' OR c_from_id = '.$uid.' ORDER BY c_create_at DESC';\n\n\treturn $conversations = $db->query($req);\n}", "public function getUser(string $chatId) : array {\r\n $conn = $this->conn->dbConn();\r\n $query = \"SELECT current_frame, start_frame, end_frame FROM user_entity WHERE chat_id = $chatId\";\r\n $result = $conn->query($query);\r\n $arrayDataChat = [];\r\n if ( $result ) {\r\n while ($row = $result->fetch_row()) {\r\n $arrayDataChat = array(\r\n 'current_frame' => intval($row[0]),\r\n 'start_frame' => intval($row[1]),\r\n 'end_frame' => intval($row[2])\r\n );\r\n }\r\n }\r\n return $arrayDataChat;\r\n }", "public function displayConversations($user_id){\n\t\t$query = \"SELECT * FROM conversation WHERE user_one = $user_id OR user_two = $user_id\";\n\t\treturn Database::getResultSetAsArray($query);\n\t}", "public function getIdUsersFromCircleId($id){\r\n\t\tif($id == 0){\r\n\t\t\t\r\n\t\t\t$userId = $_SESSION['UserAuth']['User']['id'];\r\n\t\t\t$ucs = $this->query(\"SELECT user_id as id FROM user_circles as UserCircle WHERE UserCircle.user_id = $userId;\");\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$ucs = $this->query(\"SELECT user_id as id FROM user_circles as UserCircle WHERE UserCircle.circle_id = $id;\");\r\n\t\t}\r\n\t\t\r\n\t\t$circlesId = array();\r\n\t\tforeach ($ucs as $key => $uc) {\r\n\t\t\tarray_push($circlesId, $uc['UserCircle']['id']);\r\n\t\t}\r\n\t\treturn $circlesId;\r\n\t}", "function msm_get_participants($msmid)\n{\n return false;\n}", "public function isThereStillPeopleInConversation() {\n\t\t$request = $this->connection->prepare(\"SELECT uid from CONVERSATION_SUBSCRIBE where id_conversation = ?;\");\n\t\tif ($request===false) return false;\n\t\tif (!$request->execute(array($id_conversation))) return false;\n\t\t\n\t\tif($request->rowCount()===0) {\n\t\t\t$request = $this->connection->prepare('UPDATE CONVERSATION set closed = ?;'); /* mettre 1 directement ici ? */\n\n\t\t\t$query = $request->execute(array(1));\n\t\t\tif (!$query) {\n\t \t\t\t echo \"\\n*** PDO: Erreur MySQL *** \\n\";\n\t\t print_r($this->connection->errorInfo());\n\t\t return false;\n\t\t }\n\t\t}\n\t\telse return $request->rowCount();\n\t}", "public function listUsersInForFriendsSection(){\t\t\n\t\t\t$arrObjPerm = $this->listJournalPerm();\n\t\t\tif(count($arrObjPerm) == 0){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\n\t\t\t$this->loadObject('User');\n\n\t\t\t$arrUsers = array();\n\t\t\t\n\t\t\t$objGroup = $this->loadModel('Group');\n\t\t\n\t\t\tforeach ($arrObjPerm as $value){\n\t\t\t\t$journalperm = $value->data['Journalperm'];\n\t\t\t\t\t\n\t\t\t\tif (($journalperm['tablename_id'] == 3) && ($journalperm['id_value'] == 0)) {\n\t\t\t\t\t$arrUsers = array_merge($arrUsers , $this->User->listFriend(array('buildBelongs' => 0)));\n\t\t\t\t}\n\t\t\t\tif ($journalperm['tablename_id'] == 3 && $journalperm['id_value'] > 0) {\n\t\t\t\t\t$arrUsers[] = $this->User->findById($journalperm['id_value'], array('recursive'=>-1), \"0\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (($journalperm['tablename_id'] == 10) && ($journalperm['id_value'] == 0)){\n\t\t\t\t\t$arrGroups = $this->User->listGroupsByUser();\n\t\t\t\t\t\n\t\t\t\t\tif(is_array($arrGroups)){\n\t\t\t\t\t\tforeach($arrGroups as $key => $value){\n\t\t\t\t\t\t\t$arrUsers = array_merge($arrUsers , $value->listMembers());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif ( ($journalperm['tablename_id'] == 10) && ($journalperm['id_value'] != 0) ) {\n\t\t\t\t\t$group = $objGroup->findById($journalperm['id_value']);\n\t\t\t\t\t$arrUsers = array_merge($arrUsers , $group->listMembers());\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Remove Duplicated Users\n\t\t\t$arrUserId = array();\n\t\t\tforeach($arrUsers as $key => $value){\n\t\t\t\tif(in_array($value->getPrimaryId(),$arrUserId)){\n\t\t\t\t\tunset($arrUsers[$key]);\n\t\t\t\t}else{\n\t\t\t\t\t$arrUserId[] = $value->getPrimaryId();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\treturn $arrUsers;\n\t}", "function get_participants($con) {\n $sql = \"SELECT users.* \\n\"\n . \"FROM users \\n\"\n . \"INNER JOIN participant \\n\"\n . \"ON users.user_id = participant.user_id LIMIT 0, 30 \";\n\n $user = array();\n $all_users = array();\n $users = mysqli_query($con, $sql);\n while($result = $users->fetch_assoc()) {\n $user[\"Id\"] = $result[\"user_id\"];\n $user[\"UserName\"] = $result[\"username\"];\n $user[\"Password\"] = \"REDACTED\";\n $user[\"FirstName\"] = $result[\"user_first\"];\n $user[\"LastName\"] = $result[\"user_last\"];\n $user[\"Email\"] = $result[\"user_email\"];\n $user[\"ProfilePicture\"] = $result[\"user_profile_picture\"];\n $user[\"State\"] = $result[\"user_state\"];\n $user[\"PhoneNumber\"] = $result[\"user_phone\"];\n $user[\"Zip\"] = $result[\"user_zip\"];\n $user[\"Address\"] = $result[\"user_address\"];\n $user[\"AboutMe\"] = $result[\"user_about_me\"];\n $user[\"City\"] = $result[\"user_city\"];\n\n $user[\"EventsAttending\"] = retrieve_user_events1(\n $con\n , $user[\"Id\"]);\n array_push($all_users, $user);\n }\n return json_encode($all_users, JSON_NUMERIC_CHECK);\n}", "function get_author_user_ids()\n{\n}", "public function findConversationsOfUser($userId) {\n $queryBuilder = $this->getEntityManager()->createQueryBuilder();\n $queryBuilder->select('c as conversation')\n ->from('CoreMessageBundle:Conversation', 'c')\n ->join('c.starter', 's')\n ->join('c.reciever', 'r')\n ->where('s.id = :userId OR r.id = :userId')\n ->andWhere('r.deletedAt IS NULL AND r.enabled = 1 AND s.deletedAt IS NULL AND s.enabled = 1')\n ->setParameter('userId', $userId);\n\n return $queryBuilder->getQuery()->getResult();\n }", "public static function getSearchParticipants($data)\n\t{\n\t\tif ($data['app'] != self::APPNAME) return [];\n\t\t$api = new Restapi();\n\t\t$result = [];\n\t\t$logged_in = Api\\Cache::getSession(self::APPNAME, 'logged_in', function() use ($api)\n\t\t{\n\t\t\ttry {\n\t\t\t\t$api->login($GLOBALS['egw_info']['user']['account_lid'], '');\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tcatch (\\Exception $ex) {\n\t\t\t\tApi\\Framework::message($ex->getMessage());\n\t\t\t\t// it's important to return nothing here as false will block login attempt even though the server is\n\t\t\t\t// back from failure and running normal.\n\t\t\t\treturn;\n\t\t\t}\n\t\t});\n\t\tif ($logged_in)\n\t\t{\n\t\t\t$users = $api->userslist([\"query\" => [\n\t\t\t\t\"active\"=>true,\n\t\t\t]]);\n\t\t\t$status_users = array_column(Status\\Hooks::getUsers(), 'account_lid');\n\n\t\t\t$rooms = $api->roomslist();\n\t\t\tforeach ($rooms as $r)\n\t\t\t{\n\t\t\t\tif ($r['t'] == 'p' || $r['t'] == 'c')\n\t\t\t\t{\n\t\t\t\t\tarray_push($users, [\n\t\t\t\t\t\t'username' => $r['name'],\n\t\t\t\t\t\t'name' => $r['name'],\n\t\t\t\t\t\t'status' => 'room',\n\t\t\t\t\t\t'active' => true,\n\t\t\t\t\t\t'type' => $r['t'],\n\t\t\t\t\t\t'icon' => \"avatar/@\".$r[\"name\"]\n\t\t\t\t\t]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tforeach($users as $user)\n\t\t\t{\n\t\t\t\tif (!in_array($user['username'], $status_users))\n\t\t\t\t{\n\t\t\t\t\t$result[] = [\n\t\t\t\t\t\t'id' => self::APPNAME.Status\\Ui::ID_DELIMITER.$user['username'],\n\t\t\t\t\t\t'label' => $user['name'],\n\t\t\t\t\t\t'icon' => self::getSiteUrl().'api/v1/users.getAvatar?userId='.$user['_id']\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}", "function getConversationFeedId($user0, $user1){\n global $conn;\n $user0=(int)$user0;\n $user1=(int)$user1;\n $result = $conn->query(\"SELECT id FROM chats s WHERE ((s.owner='$user0' and s.receiver='$user1') OR(s.owner='$user1' and s.receiver='$user0'));\");\n if (mysqli_num_rows($result) === 0) {\n $conn->query(\"INSERT INTO chats (owner,receiver,name) VALUES ('$user0','$user1','$user0 and $user1');\");\n $result = $conn->query(\"SELECT id FROM chats s WHERE ((s.owner='$user0' and s.receiver='$user1') OR(s.owner='$user1' and s.receiver='$user0'));\");\n }\n return $result->fetch_row()[0];\n}", "function _getSignoffCapableUsersId() {\n\t\t$monograph =& $this->getAuthorizedContextObject(ASSOC_TYPE_MONOGRAPH);\n\n\t\t// Get all the users that are assigned to the stage (managers, series editors, and assistants)\n\t\t// FIXME: is there a better way to do this?\n\t\t$userIds = array();\n\t\t$stageAssignmentDao = & DAORegistry::getDAO('StageAssignmentDAO'); /* @var $stageAssignmentDao StageAssignmentDAO */\n\t\t$seriesEditorAssignments =& $stageAssignmentDao->getBySubmissionAndRoleId($monograph->getId(), ROLE_ID_SERIES_EDITOR, $this->getStageId());\n\t\t$assistantAssignments =& $stageAssignmentDao->getBySubmissionAndRoleId($monograph->getId(), ROLE_ID_PRESS_ASSISTANT, $this->getStageId());\n\n\t\t$allAssignments = array_merge(\n\t\t\t$seriesEditorAssignments->toArray(),\n\t\t\t$assistantAssignments->toArray()\n\t\t);\n\n\t\tforeach ($allAssignments as $assignment) {\n\t\t\t$userIds[] = $assignment->getUserId();\n\t\t}\n\n\t\t// We need to manually include the press editor, because he has access\n\t\t// to all submission and its workflow stages but not always with\n\t\t// an stage assignment (editorial and production stages, for example).\n\t\t$userGroupDao =& DAORegistry::getDAO('UserGroupDAO');\n\t\t$pressManagerUserGroupsFactory =& $userGroupDao->getByRoleId($monograph->getPressId(), ROLE_ID_PRESS_MANAGER);\n\t\twhile ($userGroup =& $pressManagerUserGroupsFactory->next()) {\n\t\t\t$usersFactory =& $userGroupDao->getUsersById($userGroup->getId(), $monograph->getPressId());\n\t\t\twhile ($user =& $usersFactory->next()) {\n\t\t\t\t$userIds[] = $user->getId();\n\t\t\t\tunset($user);\n\t\t\t}\n\t\t\tunset($userGroup);\n\t\t}\n\n\t\treturn array_unique($userIds);\n\t}", "public function getSocialIds();", "function getReviewNotificationUsers($assessment_id) {\n \n $res=$this->db->get_results(\"SELECT user_id,assessment_id,notification_id,type FROM h_user_review_notification \n WHERE assessment_id=?\",array($assessment_id));\n return $res?$res:array();\n }", "function getFollowedUsers ($user_id)\n\t{\n\t\t$db = new Database();\n\t\t$select = \"select user_id from USERS where user_id in (select followed_user_id from FOLLOWERS where following_user_id = {$user_id});\";\n\t\t$result = $db->query($select);\n\n\t\t$array = array();\n\t\twhile ($row = mysqli_fetch_assoc($result)) {\n\t\t\t$user_id = $row['user_id'];\n\t\t\t$array[] = getUser($user_id);\n\t\t}\n\t\t\n\t\treturn $array;\n\t}", "public static function users_connected_by_id()\n {\n $count = who_is_online_count();\n $user_connect = who_is_online(0, $count, null, null, 30, true);\n $user_id_list = array();\n for ($i = 0; $i < count($user_connect); $i++) {\n $user_id_list[$i] = $user_connect[$i][0];\n }\n\n return $user_id_list;\n }", "public function getEventHaventInvitedFriendList($eventID, $userID) {\r\n\t\t//$friendList= $this->getFriendList($userID);\r\n\t\t$result = $this->mysqli->prepare ( '(SELECT c4_friend.friend_id FROM c4_friend\r\n\t\t\tWHERE c4_friend.user_id =?\r\n\t\t\tAND c4_friend.friend_status =1\r\n\t\t\tAND c4_friend.friend_id NOT IN (SELECT user_id FROM c4_eventattend WHERE event_ID=?\r\n\t \t\tAND eventattend_status= 2)\r\n\t\t\t)\t\r\n\t\tUNION (\r\n\t\tSELECT c4_friend.user_id\r\n\t\tFROM c4_friend\r\n\t\tWHERE c4_friend.friend_id =?\r\n\t\tAND c4_friend.friend_status =1\r\n\t\tAND c4_friend.user_id NOT IN (SELECT user_id FROM c4_eventattend WHERE event_ID=?\r\n\t AND eventattend_status= 2))' );\r\n\t\tif ($result) {\r\n\t\t\t$result->bind_param ( 'iiii', $userID, $eventID, $userID, $eventID );\r\n\t\t\t$result->execute ();\r\n\t\t\t$result->bind_result ( $userID );\r\n\t\t\twhile ( $result->fetch () ) {\r\n\t\t\t\t// var_dump($userID);\r\n\t\t\t\t// echo \"<br>\";\r\n\t\t\t\t$userIDList [] = $userID;\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\t$result->close ();\r\n\t\t\tforeach ( $userIDList as $userID ) {\r\n\t\t\t\t$userList [] = $this->getUserAccountByID ( $userID );\r\n\t\t\t}\r\n\t\t\treturn $userList;\r\n\t\t\r\n\t\t}\r\n\t}", "function getAllUserIDs($con)\n{\n\n\t$result = mysqli_query($con,\"SELECT ID FROM player\");\n\twhile($row=mysqli_fetch_array($result))\n\t{\n\t\t$user_ids[] = $row[\"ID\"];\n\t}\n\t\n\treturn $user_ids;\n}", "function getConnectionsConnectionsIds($userConnections){\n \n $userConnectionsConnections=[];\n foreach($userConnections as $k=>$v){\n \n array_push($userConnectionsConnections,getConnectionsFromUserId($v));\n }\n return $userConnectionsConnections;\n}", "function &getUserIds($objectId) {\n\t\t$result =& $this->retrieve(\n\t\t\t\t'SELECT user_id FROM object_for_review_assignments WHERE object_id = ?',\n\t\t\t\t(int) $objectId\n\t\t);\n\n\t\t$userIds = array();\n\t\twhile (!$result->EOF) {\n\t\t\t$userIds[] = $result->fields[0];\n\t\t\t$result->MoveNext();\n\t\t}\n\t\t$result->Close();\n\t\treturn $userIds;\n\t}", "function getAllProjectsIdWhereUserIsInside($userid)\n{\n $query = \"SELECT DISTINCT projects.id FROM users\nINNER join `join` ON `join`.user_id = users.id\nINNER join `groups` ON `join`.group_id = `groups`.id\nINNER join participate ON participate.group_id = `groups`.id\nINNER join projects ON participate.project_id = projects.id\nWHERE participate.state IN (\" . PARTICIPATE_STATE_INVITATION_ACCEPTED . \",\" . PARTICIPATE_STATE_CREATOR . \") AND `join`.state IN (\" . implode(\", \", [JOIN_STATE_INVITATION_ACCEPTED, JOIN_STATE_APPROVED]) . \") AND users.id = :id AND users.state != 0 \nORDER BY projects.id\";\n\n $params = [\"id\" => $userid];\n $items = Query($query, $params, true);\n $ids = [];\n foreach ($items as $item) {\n $ids[] = $item['id'];\n }\n return $ids;\n}", "public function getLearnerSessionIds(int $userId): array\n {\n $qb = $this->_em->createQueryBuilder();\n $qb->select('s1.id AS s1Id, s2.id AS s2Id, s3.id AS s3Id, s4.id AS s4Id')->distinct();\n $qb->from(User::class, 'u');\n $qb->leftJoin('u.offerings', 'offering');\n $qb->leftJoin('u.learnerIlmSessions', 'ilm');\n $qb->leftJoin('u.learnerGroups', 'learnerGroup');\n $qb->leftJoin('learnerGroup.offerings', 'offering2');\n $qb->leftJoin('learnerGroup.ilmSessions', 'ilm2');\n $qb->leftJoin('offering.session', 's1');\n $qb->leftJoin('ilm.session', 's2');\n $qb->leftJoin('offering2.session', 's3');\n $qb->leftJoin('ilm2.session', 's4');\n $qb->andWhere($qb->expr()->eq('u.id', ':userId'));\n $qb->setParameter(':userId', $userId);\n\n $rhett = [];\n foreach ($qb->getQuery()->getArrayResult() as $arr) {\n foreach ($arr as $id) {\n if (!is_null($id)) {\n $rhett[] = $id;\n }\n }\n }\n\n return array_unique($rhett);\n }", "public function getMessageListOfUserWithUser($fromUserId, $toUserId, $sqlSearch = null) {\n\t\tglobal $db;\n\t\t\n\t\t$array = [];\n\t\t\n\t\t$db -> query(\n\t\t\t'SELECT * '.\n\t\t\t'FROM `db_message` '.\n\t\t\t'WHERE ((`from_user_id` = \"'.$fromUserId.'\" && `to_user_id` = \"'.$toUserId.'\") || (`to_user_id` = \"'.$fromUserId.'\" && `from_user_id` = \"'.$toUserId.'\")) '.$sqlSearch.' '.\n\t\t\t'ORDER BY `date` ASC '.\n\t\t\t'LIMIT 100'\n\t\t);\n\t\tif($db -> numRows() > 0) {\n\t\t\twhile($r = $db -> fetchArray()) {\n\t\t\t\t$array[$r['message_id']] = $r;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn($array);\n\t}", "public function get_course_users() {\r\n global $COURSE, $DB;\r\n $userids = array();\r\n\r\n $context = context_course::instance($COURSE->id);\r\n $query = '\r\n SELECT u.id AS id\r\n FROM {role_assignments} AS a, {user} AS u\r\n WHERE contextid=' . $context->id . ' AND roleid<>0 AND a.userid=u.id;';\r\n\r\n $rs = $DB->get_recordset_sql($query);\r\n\r\n foreach( $rs as $r ) {\r\n $userids[] = $r->id;\r\n }\r\n return $userids;\r\n }", "function SelfInConversationId( $Self_Id, $Conversation_Id ){\n\t$result = mysql_query( \"SELECT Id FROM ChatConversationParticipants WHERE Conversation_Id = $Conversation_Id AND User_Id = $Self_Id LIMIT 1\" );\n\tif( 0 == mysql_num_rows( $result ) )\n\t\treturn( false );\n\treturn( true );\n}", "public function getUsers()\n\t{\n\t\t$uids = array();\n\n\t\t// Get distinct list of users\n\t\tforeach ($this->entries as $ent)\n\t\t{\n\t\t\tforeach ($ent->users as $userId)\n\t\t\t{\n\t\t\t\tif (!in_array($userId, $uids))\n\t\t\t\t\t$uids[] = $userId;\n\t\t\t}\n\t\t}\n\n\t\treturn $uids;\n\t}", "public function listMembers(){\n\n global $connection;\n\n $sql = \"SELECT * FROM organisationmembers WHERE orgid=?\";\n\n $stmt = $connection->stmt_init();\n\n $stmt->prepare($sql);\n\n $oI = $this->obj->orgid;\n\n $stmt->bind_param(\"s\",$oI);\n\n $stmt->execute();\n\n $a = Array();\n\n $r = $stmt->get_result();\n\n if($r->num_rows == 0){\n\n return $a;\n\n } else {\n\n while($row = $r->fetch_assoc()){\n array_push($a,$row['userid']);\n }\n\n return $a;\n\n }\n\n }", "public function broadcastOn()\r\n {\r\n $recipients = [];\r\n $ids = $this->recipientIds;\r\n\r\n foreach($ids as $id) {\r\n $recipients[] = new PrivateChannel('user-'.$id);\r\n }\r\n return $recipients;\r\n }", "public function getAToUserIDs()\n {\n return isset($this->aToUserIDs) ? $this->aToUserIDs : null;\n }", "public function get_friends_ids($user_id) {\n global $db;\n $friends = array();\n $get_friends = $db->query(sprintf('SELECT users.user_id FROM friends INNER JOIN users ON (friends.user_one_id = users.user_id AND friends.user_one_id != %1$s) OR (friends.user_two_id = users.user_id AND friends.user_two_id != %1$s) WHERE status = 1 AND (user_one_id = %1$s OR user_two_id = %1$s)', secure($user_id, 'int'))) or _error(SQL_ERROR_THROWEN);\n if($get_friends->num_rows > 0) {\n while($friend = $get_friends->fetch_assoc()) {\n $friends[] = $friend['user_id'];\n }\n }\n return $friends;\n }", "function get_user_friends(){\r\n\r\n\t\t//$res = getrows($sql, $err);\r\n\r\n\t\t//$ids = $res['0']['memeje_friends'];\r\n\r\n\t\t//return $ids;\r\n\r\n\t}", "public function getPayeeIDs() {\r\n\t\t$query = \"SELECT payeeID\r\n \t\t\t\tFROM Payees\r\n \t\t\t\tWHERE userID = :userID\r\n \t\t\t\tAND payeeStatus != 'deleted'\";\r\n\t\t\r\n\t\t$db = Database::getInstance ();\r\n\t\t$stmt = $db->prepare ( $query );\r\n\t\t$stmt->bindParam ( ':userID', $this->_userID );\r\n\t\t$stmt->execute ();\r\n\t\t$payeeIDs = array ();\r\n\t\t\r\n\t\twhile ( $row = $stmt->fetch ( PDO::FETCH_ASSOC ) ) {\r\n\t\t\t\r\n\t\t\t$payeeIDs [] = $row ['payeeID'];\r\n\t\t}\r\n\t\t\r\n\t\treturn $payeeIDs;\r\n\t}", "public function conversationList($id)\n\t{\n\n\t\t$url = \"http://api.candychat.com:1314/api/chat/list/\".$id;\n\t\t$response = cURL::get($url);\n\t\t\n\t\t$response = $response->body;\n\t\t$json = json_decode($response,true);\n\t\tif(count($json) != 0)\n\t\t\treturn Response::json(array('status' => '1',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//'users' => $account2,\n \t\t\t'conversations' => $json\n \t\t\t));\n\t\telse \n\t\t\treturn Response::json(array('status' => '0',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//'users' => $account2,\n \t\t\t'conversations' => $json\n \t\t\t));\n\t\t\n\t}", "public function loadConversations($id){\n $this->conversations = [];\n $this->active_user = User::select('first_name', 'surname', 'avatar','mobile', 'id')\n ->where('id', $id)\n ->where('tenant_id',Auth::user()->tenant_id)\n ->first();\n $this->conversations = Message::where('from_id', Auth::user()->id)->where('to_id', $id)\n ->orWhere('from_id', $id)->where('to_id',Auth::user()->id)\n ->where('tenant_id',Auth::user()->tenant_id)\n ->get();\n }", "function tw_followers_ids_all(){\r\n $output = tw_followers_ids();\r\n $resp = array();\r\n if ($output['success']) {\r\n $resp = $output['response']['ids'];\r\n }\r\n return $resp;\r\n}", "public static function getFriendIdList() \n\t{\n\t\t$sql = 'SELECT IF (friend1!=' .Yii::app()->user->id. ', friend1, friend2) as friend\n\t\t\t\tFROM '.Friends::model()->tableName().'\n\t\t\t\tWHERE (friend1 = ' . Yii::app()->user->id . '\n\t\t\t\t\t OR friend2 = ' . Yii::app()->user->id .') \n\t\t\t\t\t AND status = 1';\n\t\t\n\t\t$friendsResult = Yii::app()->db->createCommand($sql)->queryAll();\n\t\t$length = count($friendsResult);\n\t\t\n\t\t$friends = array();\n\t\tfor ($i = 0; $i < $length; $i++) {\n\t\t\tarray_push($friends, $friendsResult[$i]['friend']);\t\t\t\n\t\t}\n\t\t$result = -1;\n\t\tif (count($friends) > 0) {\t\t\n\t\t\t$result = implode(',', $friends);\n\t\t}\n\t\treturn $result;\n\t}", "public function getUserFriends() {\n if (!$this->getId())\n throw new Exception('Primary Key does not contain a value');\n\n \t$friends = new Petolio_Model_DbTable_PoFriends();\n \t$all = array_merge($friends->findFriends($this->getId(), null, 1), $friends->findFriends(null, $this->getId(), 1));\n \tksort($all); // sort invited / accepted\n\n\t\t$result = array();\n \tforeach ($all as $idx => $row) {\n\t\t\t$user = $this->fill($row);\n\t\t\t$result[$idx] = $user;\n \t}\n\n \treturn $result;\n }", "function GetMessages( $ConversationIdArray, $LastMessageId ){\n\n\tif( ! is_array( $ConversationIdArray ) || ! is_int( $LastMessageId ) )\n\t\treturn( \"Param error: ConversationIdArray / LastMessageId - wrong type or empty.\" );\n\t$Messages = array();\n\tif( 0 == count( $ConversationIdArray ) ){\n\t\t// this user is not in any conversations, so there are no messages to retreive.\n\t\treturn( $Messages );\n\t}\n\t$ConvIdListStr = implode( \",\", $ConversationIdArray );\n\t$Sql = \n\t\t\t\"SELECT \n\t\t\t\tm.Conversation_Id AS Conversation_Id, m.Id AS MessageId, \n\t\t\t\tm.FromUser_Id as FromUser_Id, CONCAT( u.FirstName, ' ', u.LastName ) AS FromUser_Name,\n\t\t\t\tm.DateSent as DateSent,\n\t\t\t\tm.Message\n\t\t\tFROM ChatMessages m,User u\n\t\t\tWHERE \n\t\t\t\t(m.FromUser_Id = u.Id) AND\n\t\t\t\tm.Conversation_Id IN ($ConvIdListStr) AND\n\t\t\t\tm.Id > $LastMessageId\n\t\t\tORDER BY m.Id ASC\";\n\n\t$result = mysql_query( $Sql );\n\t$errno = mysql_errno();\n\tif( 0 != $errno )\n\t\treturn( \"mysql error: $errno\" );\n\twhile( $row = mysql_fetch_array( $result, MYSQL_ASSOC ) ){\n\t\t// MessageId, needs to be an int\n\t\t$row[\"MessageId\"] = (int)$row[\"MessageId\"];\n\t\t$Messages[] = $row;\n\t}\n\tmysql_free_result( $result );\n\treturn( $Messages );\n}", "protected function get_group_member_ids() {\n\t\tglobal $wpdb;\n\n\t\tif ( is_array( $this->group_member_ids ) ) {\n\t\t\treturn $this->group_member_ids;\n\t\t}\n\n\t\t$bp = buddypress();\n\t\t$sql = array(\n\t\t\t'select' => \"SELECT user_id FROM {$bp->groups->table_name_members}\",\n\t\t\t'where' => array(),\n\t\t\t'orderby' => '',\n\t\t\t'order' => '',\n\t\t);\n\n\t\t/** WHERE clauses *****************************************************/\n\n\t\t// Group id\n\t\t$sql['where'][] = $wpdb->prepare( \"group_id = %d\", $this->query_vars['group_id'] );\n\n\t\t// is_confirmed\n\t\t$is_confirmed = ! empty( $this->query_vars['is_confirmed'] ) ? 1 : 0;\n\t\t$sql['where'][] = $wpdb->prepare( \"is_confirmed = %d\", $is_confirmed );\n\n\t\t// invite_sent\n\t\tif ( ! is_null( $this->query_vars['invite_sent'] ) ) {\n\t\t\t$invite_sent = ! empty( $this->query_vars['invite_sent'] ) ? 1 : 0;\n\t\t\t$sql['where'][] = $wpdb->prepare( \"invite_sent = %d\", $invite_sent );\n\t\t}\n\n\t\t// inviter_id\n\t\tif ( ! is_null( $this->query_vars['inviter_id'] ) ) {\n\t\t\t$inviter_id = $this->query_vars['inviter_id'];\n\n\t\t\t// Empty: inviter_id = 0. (pass false, 0, or empty array)\n\t\t\tif ( empty( $inviter_id ) ) {\n\t\t\t\t$sql['where'][] = \"inviter_id = 0\";\n\n\t\t\t// The string 'any' matches any non-zero value (inviter_id != 0)\n\t\t\t} else if ( 'any' === $inviter_id ) {\n\t\t\t\t$sql['where'][] = \"inviter_id != 0\";\n\n\t\t\t// Assume that a list of inviter IDs has been passed\n\t\t\t} else {\n\t\t\t\t// Parse and sanitize\n\t\t\t\t$inviter_ids = wp_parse_id_list( $inviter_id );\n\t\t\t\tif ( ! empty( $inviter_ids ) ) {\n\t\t\t\t\t$inviter_ids_sql = implode( ',', $inviter_ids );\n\t\t\t\t\t$sql['where'][] = \"inviter_id IN ({$inviter_ids_sql})\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Role information is stored as follows: admins have\n\t\t// is_admin = 1, mods have is_mod = 1, banned have is_banned =\n\t\t// 1, and members have all three set to 0.\n\t\t$roles = !empty( $this->query_vars['group_role'] ) ? $this->query_vars['group_role'] : array();\n\t\tif ( is_string( $roles ) ) {\n\t\t\t$roles = explode( ',', $roles );\n\t\t}\n\n\t\t// Sanitize: Only 'admin', 'mod', 'member', and 'banned' are valid\n\t\t$allowed_roles = array( 'admin', 'mod', 'member', 'banned' );\n\t\tforeach ( $roles as $role_key => $role_value ) {\n\t\t\tif ( ! in_array( $role_value, $allowed_roles ) ) {\n\t\t\t\tunset( $roles[ $role_key ] );\n\t\t\t}\n\t\t}\n\n\t\t$roles = array_unique( $roles );\n\n\t\t// When querying for a set of roles containing 'member' (for\n\t\t// which there is no dedicated is_ column), figure out a list\n\t\t// of columns *not* to match\n\t\t$roles_sql = '';\n\t\tif ( in_array( 'member', $roles ) ) {\n\t\t\t$role_columns = array();\n\t\t\tforeach ( array_diff( $allowed_roles, $roles ) as $excluded_role ) {\n\t\t\t\t$role_columns[] = 'is_' . $excluded_role . ' = 0';\n\t\t\t}\n\n\t\t\tif ( ! empty( $role_columns ) ) {\n\t\t\t\t$roles_sql = '(' . implode( ' AND ', $role_columns ) . ')';\n\t\t\t}\n\n\t\t// When querying for a set of roles *not* containing 'member',\n\t\t// simply construct a list of is_* = 1 clauses\n\t\t} else {\n\t\t\t$role_columns = array();\n\t\t\tforeach ( $roles as $role ) {\n\t\t\t\t$role_columns[] = 'is_' . $role . ' = 1';\n\t\t\t}\n\n\t\t\tif ( ! empty( $role_columns ) ) {\n\t\t\t\t$roles_sql = '(' . implode( ' OR ', $role_columns ) . ')';\n\t\t\t}\n\t\t}\n\n\t\tif ( ! empty( $roles_sql ) ) {\n\t\t\t$sql['where'][] = $roles_sql;\n\t\t}\n\n\t\t$sql['where'] = ! empty( $sql['where'] ) ? 'WHERE ' . implode( ' AND ', $sql['where'] ) : '';\n\n\t\t// We fetch group members in order of last_joined, regardless\n\t\t// of 'type'. If the 'type' value is not 'last_joined' or\n\t\t// 'first_joined', the order will be overridden in\n\t\t// BP_Group_Member_Query::set_orderby()\n\t\t$sql['orderby'] = \"ORDER BY date_modified\";\n\t\t$sql['order'] = 'first_joined' === $this->query_vars['type'] ? 'ASC' : 'DESC';\n\n\t\t$this->group_member_ids = $wpdb->get_col( \"{$sql['select']} {$sql['where']} {$sql['orderby']} {$sql['order']}\" );\n\n\t\t/**\n\t\t * Use this filter to build a custom query (such as when you've\n\t\t * defined a custom 'type').\n\t\t */\n\t\t$this->group_member_ids = apply_filters( 'bp_group_member_query_group_member_ids', $this->group_member_ids, $this );\n\n\t\treturn $this->group_member_ids;\n\t}", "function create_conversation($user_ids, $subject, $body)\n{\n $dbcon = mysqli_connect('127.0.0.1', 'root', '', 'private_message_system');\n //Change any malicious code to text only\n $subject = mysqli_real_escape_string($dbcon, htmlentities($subject));\n $body = mysqli_real_escape_string($dbcon, htmlentities($body));\n //malicious code end\n $sqlquery = \"INSERT INTO `conversations` (`conversation_subject`) VALUES ('{$subject}')\";\n mysqli_query($dbcon, $sqlquery);\n\n //Get Subject ID to link to users part of the conversation\n $conversation_id = mysqli_insert_id($dbcon);\n //Into database con_msg 4 columns values\n $sqlquery = \"INSERT INTO `conversations_messages` (`conversation_id`, `user_id`, `message_date`, `message_text`)\n VALUES ('{$conversation_id}', '{$_SESSION['user_id']}', UNIX_TIMESTAMP(), '{$body}')\";\n //FROM_UNIXTIME(unix_timestamp)\n mysqli_query($dbcon, $sqlquery);\n // die(mysqli_error($dbcon));\n //for each user array\n\n $values = array(\"({$conversation_id}, {$_SESSION['user_id']}, UNIX_TIMESTAMP(), 0)\");\n\n //$user_ids[] = $_SESSION['user_id']; //Append the user sending the message to the array\n\n //loop through each user that is added to the conversation and add to a ,cslist\n foreach ($user_ids as $user_id){\n $user_id = (int) $user_id; // Extra security to ensure data comes from the database\n $values[] = \"({$conversation_id}, {$user_id}, 0, 0)\";\n }\n\n $sqlquery = \"INSERT INTO `conversations_members` (`conversation_id`, `user_id`, `conversation_last_view`, `conversation_deleted`)\n VALUES \" . implode(\", \", $values); //include reciepients\n\n mysqli_query($dbcon, $sqlquery);\n\n}", "function socialwiki_get_subwiki_users() {\n Global $PAGE;\n $context = context_module::instance($PAGE->cm->id);\n $users = get_enrolled_users($context);\n $uids = array();\n foreach ($users as $u) {\n array_push($uids, $u->id);\n }\n return $uids;\n}", "function ajan_activity_get_comments_user_ids() {\n\tif ( empty( $GLOBALS['activities_template']->activity ) || empty( $GLOBALS['activities_template']->activity->children ) )\n\t\treturn false;\n\n\t$user_ids = (array) ajan_activity_recurse_comments_user_ids( $GLOBALS['activities_template']->activity->children );\n\treturn apply_filters( 'ajan_activity_get_comments_user_ids', array_unique( $user_ids ) );\n}", "public static function ajax_chat($id){\r\n $query = DB::$conn->prepare('select * from messages where (from_user=? and to_user=?) or (from_user=? and to_user=?) order by date_and_time desc');\r\n $query->execute([$_COOKIE['id'],$id,$id,$_COOKIE['id']]);\r\n $parents = $query->fetchAll(PDO::FETCH_ASSOC);\r\n return $parents;\r\n \r\n }", "public function users_to_query()\n\t{\n\t\treturn [$this->get_data('closer_id')];\n\t}", "function getUserList($auth_user_id = null){\n\t\tApp::import('Model','User');\n\t\t$User = new User();\n\t\t/* ==========User Conditions=========== */\n\t\t$filters['user_cond'][] = array('User.access_permission'=>1,'User.status'=>1);\n\t\t$filters['user_list'] = $User->find('list',array('conditions'=>$filters['user_cond'],'fields'=>array('id','id')));\n\t\t \n\t\t/* ==========questionOptionsUser Conditions=========== */\n\t\t//logined user question's options\n\t\t$loginedQuesOp = $this->find('list',array('conditions'=>array('user_id'=>$auth_user_id),'fields'=>array('id','question_option_id')));\n\n\t\t/* ========fetch questionOptionUserArr from questionOptionsUser model======= \n\t\t* all options\n\t\t* \n\t\t*/\n\t\t$this->unbindModel(array('belongsTo'=>array('QuestionOption','User')),false);\n\t\t$questionOptionUserArr = $this->find('all',array('conditions'=>array('user_id'=>$filters['user_list'])));\n\t\t/* =====set user_id=>array('optionsArr')======= */\n\t\t$userQuestions = array();\t\t\n\t\tif(count($questionOptionUserArr)>0){\n\t\t\tforeach($questionOptionUserArr as $key=>$options){\n\t\t\t\t$user_id = $options['QuestionOptionsUser']['user_id'];\t\t\t\t\n\t\t\t\t$userQuestions[$user_id]['question_option_id'][] = $options['QuestionOptionsUser']['question_option_id'];\n\t\t\t}\t\t\n\t\t}\n\t\t/* =====filter user_id that have same questions at logined user======= */\n\t\t$getUsers = array();\n\t\tif(count($userQuestions) > 0){\n\t\t\tforeach($userQuestions as $user_id=>$quOpArr){\n\t\t\t\tif($this->twoArrayEqual($quOpArr['question_option_id'],$loginedQuesOp)){\n\t\t\t\t\t$getUsers[] = $user_id;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $getUsers;\n\t\t\n/* \t\techo 'user list Arr::';\n\t\tpr($filters['user_list']);\n\t\techo 'questionOptionUserArr::';\n\t\tpr($questionOptionUserArr);\n\t\techo 'userQuestions::';\n\t\tpr($userQuestions);\n\t\techo 'logined user options::';\n\t\tpr($loginedQuesOp);\n\t\techo 'getUsers::';\n\t\tpr($getUsers);\n\t\tdie; */\t\n\t\n\t}", "function get_target_users()\r\n {\r\n if (!$this->target_users)\r\n {\r\n $condition = new EqualityCondition(PeerAssessmentPublicationUser :: PROPERTY_PEER_ASSESSMENT_PUBLICATION, $this->get_id());\r\n $users = $this->get_data_manager()->retrieve_peer_assessment_publication_users($condition);\r\n\r\n while ($user = $users->next_result())\r\n {\r\n $this->target_users[] = $user->get_user();\r\n }\r\n }\r\n\r\n return $this->target_users;\r\n }" ]
[ "0.7742586", "0.73817647", "0.7088733", "0.6995056", "0.68358517", "0.6739574", "0.66809493", "0.65206605", "0.6483122", "0.6472868", "0.6429682", "0.6425396", "0.6411096", "0.63975316", "0.6380223", "0.6352845", "0.6342031", "0.63094133", "0.629902", "0.62608904", "0.62308687", "0.62125826", "0.61943084", "0.6190444", "0.61761427", "0.61461556", "0.61450076", "0.6088114", "0.6069264", "0.60668", "0.60608214", "0.60479414", "0.60017216", "0.59959793", "0.59825987", "0.5975191", "0.5970115", "0.5963603", "0.59544593", "0.595054", "0.59486204", "0.59366506", "0.5935776", "0.593468", "0.5921976", "0.59080416", "0.588623", "0.58637935", "0.5855096", "0.5845722", "0.5844773", "0.5842681", "0.5829347", "0.58244723", "0.5811392", "0.5801883", "0.5796225", "0.57892334", "0.5779081", "0.57695353", "0.5766864", "0.57528216", "0.57476366", "0.5722159", "0.57199", "0.57178026", "0.5704756", "0.5701967", "0.5698526", "0.5690103", "0.5688086", "0.5688058", "0.5684556", "0.56840396", "0.56753546", "0.5668967", "0.5655772", "0.56541157", "0.5643776", "0.56424874", "0.56416863", "0.56409794", "0.5636913", "0.5630811", "0.562841", "0.5625556", "0.5619194", "0.5616501", "0.5616223", "0.56124884", "0.5608707", "0.56034225", "0.56002676", "0.55922455", "0.5578654", "0.55761695", "0.5573894", "0.5540802", "0.553975", "0.5533749" ]
0.7760243
0
return an array of conversation ids that a user id is participating in params: FromUser_Id the user id returns: an array of conversation ids array( 1,2,...) on success errormsg on error
вернуть массив идентификаторов бесед, в которых участвует идентификатор пользователя параметры: FromUser_Id идентификатор пользователя возвращает: массив идентификаторов бесед array(1,2,...) при успешном выполнении errormsg при ошибке
function GetConversationIdsFromUserId( $FromUser_Id ){ if( ! is_int( $FromUser_Id ) ) return( "Param error: FromUser_Id - wrong type or empty." ); $Sql = "SELECT Conversation_Id FROM ChatConversationParticipants WHERE User_Id = $FromUser_Id"; $result = mysql_query( $Sql ); $errno = mysql_errno(); if( 0 != $errno ) return( "mysql error: $errno" ); $Conversation_Ids = array(); while( $row = mysql_fetch_row( $result ) ) $Conversation_Ids[] = $row[0]; mysql_free_result( $result ); return( $Conversation_Ids ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getListenerIds($user)\n {\n //get partner whom user favourite\n $lOnlFansId = array();\n\n //searching from database\n $lFans = Favourite::where('partner_id', '=', $user->id)->get();\n if(!$lFans->isEmpty()){\n foreach ($lFans as $fan) {\n //check user existed\n if($fan->user){\n //check user online\n if($fan->user->socket_id != null && $fan->user->socket_id != ''){\n //add user to the list\n array_push($lOnlFansId, $fan->user->id);\n }\n }\n }\n }\n\n //get partner who had chat with user\n $lOnlChatedsId = array();\n\n //searching for conversations\n $lConversations = Conversation::where('user1_id','=',$user->id)\n ->orWhere('user2_id','=',$user->id)->get();\n if (!$lConversations->isEmpty()) \n {\n foreach ($lConversations as $conversation) {\n //check to add partner id\n if($conversation->user1_id == $user->id){\n array_push( $lOnlChatedsId, $conversation->user2_id);\n }\n else{\n array_push( $lOnlChatedsId, $conversation->user1_id);\n }\n }\n }\n\n //get matching partners\n $lOnlMatchingsId = array();\n\n //call action matching from UserController\n $lOnlMatchingPartners = UserController::matching($user, true, 1);\n\n if(count($lOnlMatchingPartners) > 0){\n $lOnlMatchingsId = array_pluck($lOnlMatchingPartners, 'id');\n }\n\n //merging those ids\n $listenIds = array_values(array_unique(array_collapse([$lOnlFansId, $lOnlChatedsId, $lOnlMatchingsId])));\n\n //return value\n return $listenIds;\n }", "public function getUserIdsForConvo($conversationId){\n\t\t$query = \"SELECT user_one, user_two FROM conversation WHERE conversationId = $conversationId\";\n\t\treturn Database::getResultSetAsArray($query);\n\t}", "function CreateConversationId( $FromUser_Id, $User_Id_Array ){\n\n\t// given an array of user ids -\n\t// 1) check if this exact group of ids is already forming a conversation.\n\t// 2) if so, return the conversation id - finished.\n\t// 3) otherwise, create a new conversation id record\n\t// 4) insert each user id into the participants table\n\t// 5) return the new conversation id.\n\n\tif( ! is_int( $FromUser_Id ) || ! is_array( $User_Id_Array ) || 0 == count( $User_Id_Array ) )\n\t\treturn( \"Param error: FromUser_Id / User_Id_Array - wrong type or empty.\" );\n\n\t// sort the User_Id_Array in numeric order \n\tsort( $User_Id_Array, SORT_NUMERIC );\n\t$IdList = implode( $User_Id_Array, ',' );\n\t\n\t// search for idlist\n\t$Sql = \"SELECT Id FROM ChatConversations WHERE UserId_List = '$IdList' LIMIT 1\";\n\t$result = mysql_query( $Sql );\n\t$errno = mysql_errno();\n\tif( 0 != $errno )\n\t\treturn( \"mysql error: $errno\" );\n\t\t\n\tif( 0 < mysql_num_rows( $result ) ){\n\t\t$row = mysql_fetch_row( $result );\n\t\tmysql_free_result( $result );\n\t\treturn( (int)$row[0] );\n\t}\n\tmysql_query( \"BEGIN\" );\n\t\n\t// conversation doesn't yet exist, create a new one and return it's id.\n\t$Sql = \"INSERT INTO ChatConversations (Id,CreatedByUser_Id,CreatedDate,UserId_List) VALUES (NULL,$FromUser_Id,NOW(),'$IdList')\";\n\t$result = mysql_query( $Sql );\n\t$errno = mysql_errno();\n\tif( 0 != $errno ){\n\t\tmysql_query( \"ROLLBACK\" );\n\t\treturn( \"mysql error: $errno\" );\n\t}\n\n\t$Conversation_Id = mysql_insert_id();\n\n\t// create a multi-insert record\n\t$Values = '';\n\tforeach( $User_Id_Array as $Id )\n\t\t$Values .= \"(NULL,$Conversation_Id,$Id),\";\n\t$Values = rtrim( $Values, \",\" );\n\t\n\t$Sql = \"INSERT INTO ChatConversationParticipants (Id,Conversation_Id,User_Id) VALUES $Values\";\n\tmysql_query( $Sql );\n\t$errno = mysql_errno();\n\tif( 0 != $errno ){\n\t\tmysql_query( \"ROLLBACK\" );\n\t\treturn( \"mysql error: $errno\" );\n\t}\n\tmysql_query( \"COMMIT\" );\n\treturn( (int)$Conversation_Id );\n}", "function GetUsersInConversation( $Conversation_Id ){\n\n\tif( ! is_int( $Conversation_Id ) )\n\t\treturn( \"Param error: Conversation_Id - wrong type or empty.\" );\n\n\t// get the user ids within a conversation\n\t$Sql = \"SELECT UserId_List FROM ChatConversations WHERE Id = $Conversation_Id LIMIT 1\";\n\t$result = mysql_query( $Sql );\n\t$errno = mysql_errno();\n\tif( 0 != $errno )\n\t\treturn( \"mysql error: $errno\" );\n\t$row = mysql_fetch_row( $result );\n\tmysql_free_result( $result );\n\n\t// get the usernames of the ids..\n\t$Sql = \"SELECT Id,CONCAT( FirstName, ' ', LastName ) AS Name FROM User WHERE Id IN ( {$row[0]} )\";\n\t$result = mysql_query( $Sql );\n\t$errno = mysql_errno();\n\tif( 0 != $errno )\n\t\treturn( \"mysql error: $errno\" );\n\t\n\t$Users = array();\n\twhile( $row = mysql_fetch_array( $result, MYSQL_ASSOC ) ){\n\t\t// convert Id to int.\n\t\t$row[0] = (int)$row[0];\n\t\t$Users[] = $row;\n\t}\n\tmysql_free_result( $result );\n\n\t/*\n\t// final array returned should be:\n\tarray(\n\t\t\"Conversation_Id\" => (int)$Conversation_Id, \n\t\t\"User_Array\" => array(\n\t\t\t\t\t\t\tarray( \"Id\" = > 1, Name => \"Chris Veeneman\" ),\n\t\t\t\t\t\t\tarray( \"Id\" = > 2, Name => \"Fredrik Nygren\" )\n\t\t\t\t\t\t)\n\t\t)\n\t*/\n\treturn( array( \"Conversation_Id\" => (int)$Conversation_Id, \"User_Array\" => $Users ) );\n}", "public function getFromUserIds(): array\n {\n if (!is_null($this->fromUserIds)) {\n return $this->fromUserIds;\n }\n\n if (isset($this->attributes['fromUserIds'])) {\n $this->fromUserIds = explode(',', $this->attributes['fromUserIds']);\n } elseif ($this->fromUserId) {\n $this->fromUserIds = [$this->fromUserId];\n } else {\n $this->fromUserIds = [];\n }\n\n return $this->fromUserIds;\n }", "public function findIncomingConversations($id_message, $id_user)\n\t{\n\t\t$qb = $this->_em->createQueryBuilder();\n\t\n\t\t$qb->select('c')\n\t\t->from('ProjetUserBundle:Conversation', 'c')\n\t\t->where('c.user != :id')\n\t\t->setParameter('id', $id_user)\n\t\t->andWhere('c.vu = 0')\n\t\t->andWhere('c.message = ?2')\n\t\t->setParameter(2, $id_message)\n\t\t;\n\t\n\t\n\t\treturn $qb->getQuery()\n\t\t->getResult();\n\t}", "public function findConversationOfUsers($user1Id, $user2Id) {\n $queryBuilder = $this->getEntityManager()->createQueryBuilder();\n $queryBuilder->select('c')\n ->from('CoreMessageBundle:Conversation', 'c')\n ->join('c.starter', 's')\n ->join('c.reciever', 'r')\n ->where('(s.id = :user1Id AND r.id = :user2Id) OR (s.id = :user2Id AND r.id = :user1Id)')\n ->andWhere('r.deletedAt IS NULL AND r.enabled = 1 AND s.deletedAt IS NULL AND s.enabled = 1')\n ->setParameters(array(\n 'user1Id' => $user1Id,\n 'user2Id' => $user2Id,\n ));\n\n return $queryBuilder->getQuery()->getOneOrNullResult();\n }", "public function findConversationsOfUser($userId) {\n $queryBuilder = $this->getEntityManager()->createQueryBuilder();\n $queryBuilder->select('c as conversation')\n ->from('CoreMessageBundle:Conversation', 'c')\n ->join('c.starter', 's')\n ->join('c.reciever', 'r')\n ->where('s.id = :userId OR r.id = :userId')\n ->andWhere('r.deletedAt IS NULL AND r.enabled = 1 AND s.deletedAt IS NULL AND s.enabled = 1')\n ->setParameter('userId', $userId);\n\n return $queryBuilder->getQuery()->getResult();\n }", "public function getMessageListOfUserWithUser($fromUserId, $toUserId, $sqlSearch = null) {\n\t\tglobal $db;\n\t\t\n\t\t$array = [];\n\t\t\n\t\t$db -> query(\n\t\t\t'SELECT * '.\n\t\t\t'FROM `db_message` '.\n\t\t\t'WHERE ((`from_user_id` = \"'.$fromUserId.'\" && `to_user_id` = \"'.$toUserId.'\") || (`to_user_id` = \"'.$fromUserId.'\" && `from_user_id` = \"'.$toUserId.'\")) '.$sqlSearch.' '.\n\t\t\t'ORDER BY `date` ASC '.\n\t\t\t'LIMIT 100'\n\t\t);\n\t\tif($db -> numRows() > 0) {\n\t\t\twhile($r = $db -> fetchArray()) {\n\t\t\t\t$array[$r['message_id']] = $r;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn($array);\n\t}", "public function getReadedUserIds($idconv, $dateMessage, $idMessAuthor)\n {\n //si le message est le miens on get les id des users different du miens\n if($idMessAuthor == $this->session->read('auth')->pk_iduser)\n {\n $results = $this->db->query(\"SELECT fk_iduser FROM we__EnregConversation WHERE fk_idconversation = ? AND consultedAt >= ? AND fk_iduser != ?\",[\n $idconv,\n $dateMessage,\n $idMessAuthor\n ])->fetchAll();\n }\n //sinon on get les id de users différent du miens et de l'user\n else{\n $results = $this->db->query(\"SELECT fk_iduser FROM we__EnregConversation WHERE fk_idconversation = ? AND consultedAt >= ? AND fk_iduser != ? AND fk_iduser != ?\",[\n $idconv,\n $dateMessage,\n $this->session->read('auth')->pk_iduser,\n $idMessAuthor\n ])->fetchAll();\n }\n $idusersString = '';\n if($results)\n {\n $idusersArr = array();\n foreach ($results as $result)\n {\n array_push($idusersArr, $result->fk_iduser);\n }\n $idusersString = implode(',',$idusersArr);\n }\n return $idusersString;\n }", "public function senderchatUsers($userid){\r\n $sqlQuery = \"\r\n SELECT * FROM \".$this->chatUsersTable.\" WHERE userid IN\r\n (SELECT DISTINCT sender_userid FROM \".$this->chatTable.\" WHERE reciever_userid = '$userid')\";\r\n return $this->getData($sqlQuery);\r\n }", "public function displayConversations($user_id){\n\t\t$query = \"SELECT * FROM conversation WHERE user_one = $user_id OR user_two = $user_id\";\n\t\treturn Database::getResultSetAsArray($query);\n\t}", "public function checkConversation($user_one, $user_two){\n\t\t$query = \"SELECT conversationId FROM conversation WHERE (user_one='$user_one' AND user_two='$user_two') \n\t\t\t\t\t\t\t\t\t\t\t\t OR (user_one='$user_two' AND user_two='$user_one')\";\n\t\treturn Database::getResultSetAsArray($query);\n\t}", "public function recieverchatUsers($userid){\r\n $sqlQuery = \"\r\n SELECT * FROM \".$this->chatUsersTable.\" WHERE userid IN\r\n (SELECT DISTINCT reciever_userid FROM \".$this->chatTable.\" WHERE sender_userid = '$userid')\";\r\n return $this->getData($sqlQuery);\r\n }", "public static function updateChatRequestIds($from_user_id, $to_user_id) {\n $from_user_string = User::where('id', $from_user_id)->value('chat_request_ids');\n $c_string_array = explode(',', $from_user_string);\n\n //Remove to_user_id fromUser connect string array\n $remove_toUser_from_c_array = array_diff($c_string_array, array($to_user_id));\n\n //Updated connect string for fromUserId\n $update_c_string_from_user = implode(',', $remove_toUser_from_c_array);\n\n $update = User::where('id', $from_user_id)->update(['chat_request_ids' => $update_c_string_from_user]);\n\n }", "public function getConversationFromUser( $stream, $user_id ){\n\t\t\n\t\t$chatMessages = array();\n\n\t\t// TODO - Validate tha user exists\n\t\t// TODO - Validate that $user_id is an integer\n\n\t\t$this->db->where(array( 'from_user_id' => $user_id ) );\n\t\t$conversationQuery = $this->db->get_where( 'chat_messages', array( 'stream' => $stream ) );\n\t\t$messagesResult = $conversationQuery->result();\n\n\t\tif( count( $messagesResult ) < 1 ) {\n\t\t\t$chatMessages['error'] = NO_ERROR;\n\t\t\t$chatMessages['responseMessage'] = \"No conversation was found for stream: '$stream' and from_user_id: '$user_id'\";\n\t\t\treturn $chatMessages;\n\t\t}\n\n\t\tforeach ( $messagesResult as $key => $messageRow )\n\t\t{\n\t\t $chatMessages['data'][$key] = array(\n\t\t \t'text_message' \t=> $messageRow->text_message,\n\t\t \t'from_user_id' \t=> $messageRow->from_user_id,\n\t\t \t'to_user_id' \t=> $messageRow->to_user_id,\n\t\t \t);\n\t\t}\n\n\t\t$chatMessages['error'] = NO_ERROR;\n\t\t$chatMessages['responseMessage'] = 'Conversation retrieved successfully!';\n\t\treturn $chatMessages;\n\n\t}", "function getAllConversationId(){\n\t\t$sqlGetDialogue = \"SELECT DISTINCT conversation_id FROM \".CONVERSATION.\"\n\t\tWHERE conversation_userId = $this->id\";\n\t\t$sqlResult = $this->connect->query($sqlGetDialogue);\n\t\t$tabDialogueId = array();\n\t\t$i = 0;\n\t\twhile($idRowDiscussion = mysqli_fetch_array($sqlResult)){\n\t\t\t$tabDialogueId[$i] = $idRowDiscussion['conversation_id'];\n\t\t\t$i++;\n\t\t}\n\t\treturn $tabDialogueId;\n\t}", "function _get_user_friends_ids ($target_user_id) {\n\t\t$cur_friends_ids = array();\n\t\t// Get friends from db\n\t\tlist($CUR_FRIENDS_LIST) = db()->query_fetch(\"SELECT friends_list AS `0` FROM \".db('friends').\" WHERE user_id=\".intval($target_user_id));\n\t\t// Convert string into array\n\t\tif (!empty($CUR_FRIENDS_LIST)) {\n\t\t\t$tmp_array = explode(\",\", $CUR_FRIENDS_LIST);\n\t\t}\n\t\tforeach ((array)$tmp_array as $tmp_friend_id) {\n\t\t\tif (empty($tmp_friend_id) || $tmp_friend_id == $target_user_id) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$cur_friends_ids[$tmp_friend_id] = $tmp_friend_id;\n\t\t}\n\t\treturn $cur_friends_ids;\n\t}", "public function getUserIds();", "public function getContibsIdsForSearch($whereQuery)\n {\n $existsQuery = \"SELECT user_id FROM Participation \".$whereQuery;\n if(($result = $this->getQuery($existsQuery,true)) != NULL)\n {\n $countIds = count($result);\n for($i=0; $i<$countIds; $i++)\n {\n $ids[$i] = $result[$i]['user_id'];\n }\n return $idstring = implode(',',$ids);\n }\n else\n return 0;\n }", "public function getMyContactsPendingInArray()\n {\n $usersIdsObj = $this->db->query('SELECT fk_iduserto FROM we__Contactsask WHERE fk_iduserfrom = ?', [\n $this->session->read('auth')->pk_iduser\n ])->fetchAll();\n\n $idArray = Functions::getArrayFromObjectProperty($usersIdsObj, 'fk_iduserto');\n return $idArray;\n }", "public function participatingIn()\n {\n return $this->conversations()\n ->pluck('id');\n }", "public function getMessagesGroup($userId){\n $groups = array();\n $sql = \"SELECT * FROM messageGroups WHERE FromUser = :userId OR ToUser = :userId\";\n \n $this->db->makeCamelCase();\n $this->db->query($sql);\n $this->db->bind(':userId',$userId);\n $stmt = $this->db->getStmt();\n $this->db->execute();\n $partner = '';\n while($row = $stmt->fetch(PDO::FETCH_ASSOC)){\n if($row['FromUser'] == $userId){\n $partner = $row['ToUser'];\n }else{\n $partner = $row['FromUser'];\n }\n $row['PartnerId'] = $partner;\n $partnerArray = $this->getUser($partner);\n $row['PartnerName'] = $partnerArray['Name']; \n $row['PartnerSurname'] = $partnerArray['Surname'];\n array_push($groups, $row);\n }\n return $groups;\n }", "function getHistoryForUser($userId) {\n\n $stmt = $this->conn->prepare(\"SELECT * FROM n2u_message INNER JOIN n2u_message_to_receivers\nON n2u_message.id=n2u_message_to_receivers.message_id INNER JOIN n2u_user ON n2u_message_to_receivers.receiver_id=n2u_user.id\nwhere from_user_id=? or receiver_id=? order by DATE_SENT DESC \");\n $stmt->bind_param(\"ii\", $userId, $userId);\n $stmt->execute();\n $result = $stmt->get_result();\n $messages = array();\n if ($result->num_rows > 0) {\n while($row = $result->fetch_assoc()) {\n array_push($messages,$row);\n }\n }\n $stmt->close();\n return $messages;\n\n }", "public static function getUserSubsciptionIds($userId) {\n $results;\n $db = parent::getDataBase();\n $sql = <<<STR\n \t\t SELECT UserSubscriptionId\t\t\t\t\n FROM usersubscriptions \n WHERE UserSubscriptionUserId=:UserId AND UserSubscriptionIsTempUser=0 Order by UserSubscriptionId ASC limit 1\nSTR;\n\n $bind = array(\n \":UserId\" => $userId,\n );\n\n $results = $db->run($sql, $bind);\n Format::formatResponseData($results);\n return $results;\n }", "public static function getChatRequestString($from_user_id = null, $to_user_id = null) {\n\n $chat_string = '';\n $user_chat_string = User::where('id', $from_user_id)->value('chat_user_ids');\n if(empty($user_chat_string)) {\n $chat_string = $to_user_id;\n } else {\n $check_string = User::where('id', $from_user_id)->whereRaw('FIND_IN_SET(?,chat_user_ids)', [$to_user_id])->first(); //checking in the string to_user_id already exist in the string\n if(empty($check_string)) {\n $chat_string .= $user_chat_string.','.$to_user_id;\n } else {\n $chat_string .= $user_chat_string;\n }\n }\n\n $c_arr = explode(',',$chat_string);\n sort($c_arr);\n $chat_string = implode(',',$c_arr);\n return $chat_string;\n }", "function getConversationsList($uid) {\n\tglobal $db, $conversations;\n\n\t$req = 'SELECT * FROM conversations';\n\t$req .= ' LEFT JOIN users ON users.uid = conversations.c_from_id';\n\t$req .= ' WHERE c_to_id = '.$uid.' OR c_from_id = '.$uid.' ORDER BY c_create_at DESC';\n\n\treturn $conversations = $db->query($req);\n}", "protected function getUserIds(){\n switch ($this->userType){\n case self::USER_TYPE_INTERNAL:\n return Yii::app()->params['googlePlayInternalUserIds'];\n case self::USER_TYPE_GOOGLE_CC_MAIN:\n return Yii::app()->params['googleCcMainUserIds'];\n case self::USER_TYPE_GOOGLE_CC_MAIN_ADMIN:\n return Yii::app()->params['googleCcMainAdminUserIds'];\n case self::USER_TYPE_GOOGLE_CC_TRANSCRIBE_QA:\n return Yii::app()->params['googleCcTransQAUserIds'];\n case self::USER_TYPE_GOOGLE_CC_TRANSCRIBE_SQA:\n return Yii::app()->params['googleCcTransSQAUserIds'];\n case self::USER_TYPE_GOOGLE_CC_CONFORM_QA:\n return Yii::app()->params['googleCcConformQAUserIds'];\n default:\n return Yii::app()->params['googlePlayExternalUserIds'];\n }\n }", "function getMessages($userid)\n {\n $stmt = $this->con->prepare(\"SELECT messages.id, (SELECT users.name FROM users WHERE users.id = messages.from_users_id) as `from`, (SELECT users.name FROM users WHERE users.id = messages.to_users_id) as `to`, messages.title, messages.message, messages.sentat FROM messages WHERE messages.to_users_id = ? ORDER BY messages.sentat DESC;\");\n $stmt->bind_param(\"i\", $userid);\n $stmt->execute();\n $stmt->bind_result($id, $from, $to, $title, $message, $sent);\n\n $messages = array();\n\n while ($stmt->fetch()) {\n $temp = array();\n\n $temp['id'] = $id;\n $temp['from'] = $from;\n $temp['to'] = $to;\n $temp['title'] = $title;\n $temp['message'] = $message;\n $temp['sent'] = $sent;\n\n array_push($messages, $temp);\n }\n\n return $messages;\n }", "public function getArrayParticipantForSetLu($idConversation){\n \n $idUserCourant = $this->security->getToken()->getUser()->getId();\n $repo = $this->manager->getRepository('MindMpBundle:Participants');\n $tabDest = array();\n $participants = $repo->findParticipantsByConversation($idConversation, $idUserCourant);\n \n foreach ($participants as $participant){\n $tabDest[] = $participant->getIdUser();\n }\n \n return $tabDest;\n }", "public function getLearnerSessionIds(int $userId): array\n {\n $qb = $this->_em->createQueryBuilder();\n $qb->select('s1.id AS s1Id, s2.id AS s2Id, s3.id AS s3Id, s4.id AS s4Id')->distinct();\n $qb->from(User::class, 'u');\n $qb->leftJoin('u.offerings', 'offering');\n $qb->leftJoin('u.learnerIlmSessions', 'ilm');\n $qb->leftJoin('u.learnerGroups', 'learnerGroup');\n $qb->leftJoin('learnerGroup.offerings', 'offering2');\n $qb->leftJoin('learnerGroup.ilmSessions', 'ilm2');\n $qb->leftJoin('offering.session', 's1');\n $qb->leftJoin('ilm.session', 's2');\n $qb->leftJoin('offering2.session', 's3');\n $qb->leftJoin('ilm2.session', 's4');\n $qb->andWhere($qb->expr()->eq('u.id', ':userId'));\n $qb->setParameter(':userId', $userId);\n\n $rhett = [];\n foreach ($qb->getQuery()->getArrayResult() as $arr) {\n foreach ($arr as $id) {\n if (!is_null($id)) {\n $rhett[] = $id;\n }\n }\n }\n\n return array_unique($rhett);\n }", "public function getmessages()\n {\n $alluser1 = DB::table('users as u')->join('conversions as c','u.id','c.user_one')\n ->where('c.user_two',Auth::user()->id)\n ->get();\n\n $alluser2 = DB::table('users as u')->join('conversions as c','u.id','c.user_two')\n ->where('c.user_one',Auth::user()->id)\n ->get(); \n return array_merge($alluser1->toArray(),$alluser2->toArray()); \n }", "function getConnectionsConnectionsIds($userConnections){\n \n $userConnectionsConnections=[];\n foreach($userConnections as $k=>$v){\n \n array_push($userConnectionsConnections,getConnectionsFromUserId($v));\n }\n return $userConnectionsConnections;\n}", "public function getActiveConversations()\n {\n $conn = Db::getConnection();\n $statement = $conn->prepare(\"SELECT * FROM conversations WHERE (user_1 = :user_id OR user_2 = :user_id) AND active = 1\");\n $statement->bindValue(\":user_id\", $this->getId());\n $statement->execute();\n $result = $statement->fetch(\\PDO::FETCH_OBJ);\n\n return $result;\n }", "public function getFriendSendMessage() {\n $viewer_id = Engine_Api::_()->user()->getViewer()->getIdentity();\n $getFriednArray = array();\n $messageTable = Engine_Api::_()->getItemTable('messages_message');\n $messageTableName = $messageTable->info('name');\n\n $recipientTable = Engine_Api::_()->getDbtable('recipients', 'messages');\n $recipientTableName = $recipientTable->info('name');\n\n $membershipTable = Engine_Api::_()->getDbtable('membership', 'user');\n $membershipTableName = $membershipTable->info('name');\n\n $select = $recipientTable->select()\n ->setIntegrityCheck(false)\n ->from($recipientTableName, array('user_id'))\n ->joinInner($messageTableName, \"$recipientTableName . conversation_id = $messageTableName . conversation_id\", null)\n ->joinInner($membershipTableName, \"$membershipTableName . resource_id = $recipientTableName . user_id\", null)\n ->where($membershipTableName . '.user_id = ?', $viewer_id);\n\n $fetch = $select->query()->fetchAll();\n foreach ($fetch as $id) {\n $getFriednArray[] = $id['user_id'];\n }\n return $getFriednArray;\n }", "function get_user_conversations($user_id) {\n\t //database query\n\t $q = $this->db->select('*')\n\t \t\t\t\t ->from('conversations_inbox')\n\t\t\t\t\t ->where('R_id',$user_id)\n\t\t\t\t\t ->order_by('post_time','desc')\n\t\t\t\t\t ->get();\n\t\t$result = $q->result();\n }", "public function getUserMessageListOfUser($userId, $sqlSearch = null) {\n\t\tglobal $db;\n\t\t\n\t\t$array = [];\n\t\t\n\t\t$db -> query(\n\t\t\t'SELECT * '.\n\t\t\t'FROM `db_message` '.\n\t\t\t'WHERE `from_user_id` = \"'.$userId.'\" || `to_user_id` = \"'.$userId.'\" '.$sqlSearch.' '.\n\t\t\t'ORDER BY `date` DESC'\n\t\t);\n\t\tif($db -> numRows() > 0) {\n\t\t\twhile($r = $db -> fetchArray()) {\n\t\t\t\t$array[] = $r;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn($array);\n\t}", "public function messageByUserId($id){\n $messages = Message::where(function($query) use ($id){\n $query->where('from',auth()->user()->id);\n $query->where('to',$id);\n $query->where('type',0);\n })->orWhere(function($query) use ($id){\n $query->where('from',$id);\n $query->where('to',auth()->user()->id);\n $query->where('type',1);\n })->with('user')->get();\n\n return $messages;\n }", "function skype_get_participants($skypeid) {\n return false;\n}", "public static function getChatRoomByUsers($fromUserId, $toUserId)\n {\n $fromUserId = intval($fromUserId);\n $toUserId = intval($toUserId);\n\n if (empty($fromUserId) || empty($toUserId)) {\n return false;\n }\n\n $result = DB::table('chat_video')\n ->where(function($query) use ($fromUserId, $toUserId) {\n $query->where('sender_id', $fromUserId)->where('receiver_id', $toUserId);\n })\n ->orWhere(function($query) use ($fromUserId, $toUserId) {\n $query->where('sender_id', $toUserId)->where('receiver_id', $fromUserId);\n })\n ->first();\n\n return $result ?: false;\n }", "public function getChatsByUserId(int $id) : array {\n $query = \"SELECT c.id, c.subject, c.date_created FROM chats c\n JOIN chat_members cm \n ON c.id = cm.chat_id \n WHERE cm.user_id = :userid\";\n $pdostm = $this->db->prepare($query);\n $pdostm->bindValue(\":userid\",$id, PDO::PARAM_INT);\n $pdostm->execute();\n\n $chatDB = $pdostm->fetchAll(PDO::FETCH_OBJ);\n //var_dump($chatDB);\n $chats = array();\n\n foreach ($chatDB as $c) {\n $chat = new Chat();\n $sender = new User();\n\n $chat->setId($c->id); // getting the chat Id\n $chat->setSubject($c->subject);\n $chat->setDateCreated($c->date_created);\n // $sender->setUsername($c->username); // passing the username retrieved from database\n // $chat->setUser($sender); // from the User object in Chat class\n\n array_push($chats, $chat);\n }\n\n return $chats;\n\n }", "public static function ajax_chat($id){\r\n $query = DB::$conn->prepare('select * from messages where (from_user=? and to_user=?) or (from_user=? and to_user=?) order by date_and_time desc');\r\n $query->execute([$_COOKIE['id'],$id,$id,$_COOKIE['id']]);\r\n $parents = $query->fetchAll(PDO::FETCH_ASSOC);\r\n return $parents;\r\n \r\n }", "public function findConversations(array $user_ids, array $arguments = array(), $limit = 1){\n\n if(!is_array($user_ids) || count($user_ids) < 2){\n throw new \\Exception('You need at least 2 users for a conversation', 1410783987);\n }\n\n //Get all conversations of the first user and check if\n //the other users are in these conversations too.\n $userClass = EloquentBase::userClass();\n\n $firstUser = $userClass::find($user_ids[0]);\n $conversations = $firstUser->conversations()->with('users')->with('messages')->get();\n\n $filteredConversations = array();\n\n foreach($conversations as $conversation){\n\n if(count($conversation->users) == count($user_ids)) {\n\n $argumentsFitting = true;\n foreach($arguments as $column => $value){\n if($conversation->$column != $value){\n $argumentsFitting = false;\n break;\n }\n }\n\n if(!$argumentsFitting) continue;\n\n $usersFitting = true;\n foreach($conversation->users as $convUser){\n if(!in_array($convUser->id, $user_ids)){\n $usersFitting = false;\n break;\n }\n\n }\n\n if(!$usersFitting) continue;\n\n $filteredConversations[] = $conversation;\n\n if(count($filteredConversations) == $limit)\n break;\n }\n }\n\n return $filteredConversations;\n\n }", "private function get_friend_ids(){\n\n $db = $this->db;\n //ovdje spremamo sve vrijednosti id polja prijatelja korisnika\n $users = array();\n\n $users1 = $db->friendQuery('SELECT user_id FROM friend_requests WHERE friend_id=1 AND accepted=1');\n $users1 = $users1->fetchAll(PDO::FETCH_ASSOC);\n\n foreach($users1 as $user)\n {\n $users[] = $user['user_id'];\n }\n\n $users2 = array();\n $users2 = $db->friendQuery('SELECT friend_id FROM friend_requests WHERE user_id=1 AND accepted=1');\n\n if($users2)\n $users2 = $users2->fetchAll(PDO::FETCH_ASSOC);\n\n\n foreach($users2 as $user)\n {\n $users[] = $user['friend_id'];\n }\n \n return $users;\n }", "public function loadConversations($id){\n $this->conversations = [];\n $this->active_user = User::select('first_name', 'surname', 'avatar','mobile', 'id')\n ->where('id', $id)\n ->where('tenant_id',Auth::user()->tenant_id)\n ->first();\n $this->conversations = Message::where('from_id', Auth::user()->id)->where('to_id', $id)\n ->orWhere('from_id', $id)->where('to_id',Auth::user()->id)\n ->where('tenant_id',Auth::user()->tenant_id)\n ->get();\n }", "function GetUnreadMessages( $User_Id ){\n\n\tif( ! is_int( $User_Id ) )\n\t\treturn( \"Param error: User_Id - wrong type or empty.\" );\n\t\t\n\t$Messages = array();\n\t$Sql = \"SELECT \n\t\t\t\tm.Conversation_Id AS Conversation_Id, m.Id AS MessageId, \n\t\t\t\tm.FromUser_Id as FromUser_Id, CONCAT( u.FirstName, ' ', u.LastName ) AS FromUser_Name,\n\t\t\t\tm.DateSent as DateSent,\n\t\t\t\tm.Message\n\t\t\tFROM ChatMessages m,User u,ChatConversationParticipants p\n\t\t\tWHERE \n\t\t\t\t(m.FromUser_Id = u.Id) AND\n\t\t\t\t(m.Id > p.LastReadMessage_Id) AND\n\t\t\t\t(m.Conversation_Id = p.Conversation_Id) AND\n\t\t\t\t(p.User_Id = $User_Id)\n\t\t\tORDER BY m.Id ASC\";\n\t$result = mysql_query( $Sql );\n\t$errno = mysql_errno();\n\tif( 0 != $errno )\n\t\treturn( \"mysql error: $errno\" );\n\twhile( $row = mysql_fetch_array( $result, MYSQL_ASSOC ) )\n\t\t$Messages[] = $row;\n\tmysql_free_result( $result );\n\treturn( $Messages );\n}", "function get_users_from_ids($my_user_id_blockees,$connection){\n\t$num_per_call = 90;\n\t# Used to count how many have been added and what array index\n\t$count=0;\n\t$index=0;\n\t# Arrays of ids in comma separated list.\n\t$call_array_ids = array();\n\t$call_array_ids_tmp = array();\n\tfor ($i=0; $i<=(count($my_user_id_blockees)-1); $i++)\n\t{\n\t\t# Do in blocks of x\n\t\tif ($count>=$num_per_call) {\n\t\t$count=0;\n\t\t$call_array_ids[$index]= implode(\",\", $call_array_ids_tmp);\n\t\t$call_array_ids_tmp = array();\n\t\t$index++;\n\t}\n\tarray_push($call_array_ids_tmp, $my_user_id_blockees[$i]);\n\t$count++;\n\t}\n\t$call_array_ids[$index]= implode(\",\", $call_array_ids_tmp);\n\t\n\t$users=array();\n\t# Loop over all and get the corresponding user objects\n\tfor ($i=0; $i<=(count($call_array_ids)-1); $i++)\n\t{\n\t\t$tmp_users=$connection->get(\"users/lookup\",array('user_id' => $call_array_ids[$i]));\n\t\tif (!isset($tmp_users->errors)) {\n\t\t\t$users=array_merge($users,$tmp_users);\n\t\t}\n\t}\n\treturn $users;\n}", "public function getSelectedFacilityUserIds()\n {\n // $facilityUsers = InstanceSiteDelivery::select('facility_user_id')->groupBy('facility_user_id')->get();\n $usersIds = [];\n /* foreach ($facilityUsers as $facilityUser) {\n if (!in_array($facilityUser->facility_user_id, $usersIds))\n array_push($usersIds, $facilityUser->facility_user_id);\n }\n\n $palikaUsers = AdminUser::whereIn('id', $usersIds)->get();\n foreach ($palikaUsers as $users) {\n if (!in_array($users->palika_user_id, $usersIds))\n array_push($usersIds, $users->palika_user_id);\n\n if (!in_array($users->created_by, $usersIds))\n array_push($usersIds, $users->created_by);\n }*/\n\n return $usersIds;\n }", "public function getRecipientsInMessage($userViewLink=null)\n\t{\n\t\t$criteria = new CDbCriteria();\n\t\t$criteria->compare('message_id', $this->id);\n $recipients = MessageStatus::model()->findAll($criteria);\n $messageRecipients = array();//Generate message user\n if(count($recipients)>0){\n \tforeach($recipients as $recipient){\n \t\t$user = User::model()->findByPk($recipient->recipient_id);\n \t\tif(isset($user->id)){\n\t \t\t$readFlagStyle = \"class='clrBlack' title='Chưa đọc'\";\n\t \t\tif($recipient->read_flag==1){\n\t \t\t\t$readFlagStyle = \"class='clrLink' title='Ngày, giờ đọc: \".date('H:i, d/m/Y', strtotime($recipient->read_date)).\"'\";\n\t \t\t}\n\t\t\t\t\tif($userViewLink!=null){\n\t\t\t\t\t\t$messageRecipients[$user->id] = '<a href=\"'.$userViewLink.'/'.$user->id.'\" '.$readFlagStyle.'>'.$user->fullName().'</a>';\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$messageRecipients[$user->id] = '<span '.$readFlagStyle.'>'.$user->fullName().'</span>';\n\t\t\t\t\t}\n \t\t}\n \t}\n }\n\t\treturn $messageRecipients;\n\t}", "public function get_friends_ids($user_id) {\n global $db;\n $friends = array();\n $get_friends = $db->query(sprintf('SELECT users.user_id FROM friends INNER JOIN users ON (friends.user_one_id = users.user_id AND friends.user_one_id != %1$s) OR (friends.user_two_id = users.user_id AND friends.user_two_id != %1$s) WHERE status = 1 AND (user_one_id = %1$s OR user_two_id = %1$s)', secure($user_id, 'int'))) or _error(SQL_ERROR_THROWEN);\n if($get_friends->num_rows > 0) {\n while($friend = $get_friends->fetch_assoc()) {\n $friends[] = $friend['user_id'];\n }\n }\n return $friends;\n }", "public static function conversation($user1,$user2)\n {\n $conv = static::where(function($q) use($user1,$user2){\n $q->where('sender_id',$user1->id)->where('receiver_id',$user2->id);\n })->orWhere(function($q) use($user1,$user2){\n $q->where('sender_id',$user2->id)->where('receiver_id',$user1->id);\n });\n return $conv;\n }", "function yz_get_private_users_activity_ids( $users ) {\n\n global $bp, $wpdb;\n\n // If the given users is array convert it to string.\n if ( is_array( $users ) ) {\n $users = implode( ',', array_map( 'absint', $users ) );\n }\n\n // Get SQL.\n $sql = \"SELECT id FROM {$bp->activity->table_name} WHERE user_id IN ( $users )\";\n\n // Get Result\n $activities = $wpdb->get_results( $sql , ARRAY_A );\n\n // Return Array List.\n $activities_ids = wp_list_pluck( $activities, 'id' );\n\n return $activities_ids;\n\n}", "function GetMessages( $ConversationIdArray, $LastMessageId ){\n\n\tif( ! is_array( $ConversationIdArray ) || ! is_int( $LastMessageId ) )\n\t\treturn( \"Param error: ConversationIdArray / LastMessageId - wrong type or empty.\" );\n\t$Messages = array();\n\tif( 0 == count( $ConversationIdArray ) ){\n\t\t// this user is not in any conversations, so there are no messages to retreive.\n\t\treturn( $Messages );\n\t}\n\t$ConvIdListStr = implode( \",\", $ConversationIdArray );\n\t$Sql = \n\t\t\t\"SELECT \n\t\t\t\tm.Conversation_Id AS Conversation_Id, m.Id AS MessageId, \n\t\t\t\tm.FromUser_Id as FromUser_Id, CONCAT( u.FirstName, ' ', u.LastName ) AS FromUser_Name,\n\t\t\t\tm.DateSent as DateSent,\n\t\t\t\tm.Message\n\t\t\tFROM ChatMessages m,User u\n\t\t\tWHERE \n\t\t\t\t(m.FromUser_Id = u.Id) AND\n\t\t\t\tm.Conversation_Id IN ($ConvIdListStr) AND\n\t\t\t\tm.Id > $LastMessageId\n\t\t\tORDER BY m.Id ASC\";\n\n\t$result = mysql_query( $Sql );\n\t$errno = mysql_errno();\n\tif( 0 != $errno )\n\t\treturn( \"mysql error: $errno\" );\n\twhile( $row = mysql_fetch_array( $result, MYSQL_ASSOC ) ){\n\t\t// MessageId, needs to be an int\n\t\t$row[\"MessageId\"] = (int)$row[\"MessageId\"];\n\t\t$Messages[] = $row;\n\t}\n\tmysql_free_result( $result );\n\treturn( $Messages );\n}", "public function createConversation($userId, $user) {\n\n if (!empty($user)) {\n $isAdminSettings = $this->settingsRepository->getValue();\n\n\n foreach ($user as $users) {\n\n if ($isAdminSettings[1]->status == 0) {\n $confirmed = 1;\n } else {\n $confirmed = $this->userRepository->getConfirmedStatus($users->contact_user_id);\n }\n $firebaseFromUserid = 'user_' . $userId;\n $firebaseToUserid = 'user_' . $users->contact_user_id;\n $conversionId = 'user' . $userId . '_' . 'user' . $users->contact_user_id;\n $firebaseArray = [\n 'Typing' => [\n $firebaseFromUserid => 'false',\n $firebaseToUserid => 'false',\n ],\n 'chat_history' => [\n $firebaseFromUserid => '',\n $firebaseToUserid => '',\n ],\n 'isGroup' => 'false',\n 'last_message' => [\n 'conversationID' => $conversionId,\n 'msgID' => '',\n 'senderId' => $firebaseFromUserid,\n 'senderName' => '',\n 'text' => '',\n 'timestamp' => '',\n 'type' => 'text'\n ],\n 'users' => [\n $firebaseFromUserid => 'true',\n $firebaseToUserid => 'true',\n ],\n 'is_admin_setting' => $isAdminSettings[1]->status,\n 'is_confirmed' => $confirmed,\n ];\n // pass from and to id for conversation\n $this->firebaseRepository->setConversationData($conversionId, $firebaseArray);\n }\n }\n }", "public function getChatMessages(\n int $user_id\n ) {\n\n $db = $this->conn;\n $appointment_id = $this->appointment_id;\n\n $messages_statement = $db->prepare(\"SELECT msg_from, date_added, msg, selectedfile FROM chat WHERE app_id = ?\");\n $messages_statement->bind_param(\"s\", $appointment_id);\n $messages_statement->execute();\n\n if (mysqli_error($db)) {\n $this->logError(__FUNCTION__, func_get_args(), \"Failed to fetch chat messages.\", \"\", mysqli_error($db));\n\n return [\"error\" => \"Failed to fetch chat messages.\", \"error_code\" => 1];\n }\n\n $messages = array();\n $messages_result = $messages_statement->get_result();\n\n while ($message = $messages_result->fetch_assoc()) {\n $message[\"date_added\"] = date(\"d/m h:i\", strtotime($message[\"date_added\"]));\n $message[\"msg\"] = stripslashes($message[\"msg\"]);\n $message[\"selectedfile\"] = explode(\"#?#\", $message[\"selectedfile\"]);\n\n array_push($messages, $message);\n }\n\n return $messages;\n }", "public function distinctUsers($userid){\r\n $senderChatUsers = $this->senderchatUsers($userid);\r\n $recieverChatUsers = $this->recieverchatUsers($userid);\r\n foreach ($recieverChatUsers as $ruser) {\r\n $flag = 0;\r\n foreach ($senderChatUsers as $suser) {\r\n if($ruser['userid'] == $suser['userid'])\r\n $flag = 1;\r\n }\r\n if($flag == 0)\r\n $senderChatUsers[] = $ruser;\r\n }\r\n return $senderChatUsers;\r\n }", "public function getMasterInboxFOUsersInter($user=NULL)\n {\n\n if($user)\n $condition=\"((t.recipient_id='\".$user.\"' and m.type='0')and (t.sender_id in (select identifier from User where type in('client','contributor'))))\";\n else\n $condition=\"((t.recipient_id in (select identifier from User where type in('client','contributor'))) and (t.sender_id in (select identifier from User where type in('client','contributor'))))\";\n\n $msg_query=\"select\n m.id as messageId,m.type,ticket_id,sender_id,recipient_id,IF(m.type='1',recipient_id,sender_id) as userid,\n IF(m.type='1',sender_id,recipient_id) as receiverId,\n u.email, title as Subject,content,\n IF(DATE(m.created_at)=DATE(NOW()),DATE_FORMAT(m.created_at , '%H:%i'),DATE_FORMAT(m.created_at , '%d/%m/%Y %H:%i')) as receivedDate,\n m.created_at as receivedDate_sort,\n\t\t\t\t\t\tm.status from Ticket t\n INNER JOIN Message m ON m.ticket_id=t.id\n INNER JOIN User u ON u.identifier=t.recipient_id\n INNER JOIN User u1 ON u1.identifier=t.sender_id\n where \".$condition.\" and t.status in ('0','1')\n Group By t.sender_id,t.recipient_id,m.id ORDER BY m.created_at DESC\";\n\n //echo $msg_query;exit;\n\n if(($result=$this->getQuery($msg_query,true))!=NULL)\n return $result;\n else\n return \"No Messages Found\";\n\n }", "public function getParticipants();", "function getAllProjectsIdWhereUserIsInside($userid)\n{\n $query = \"SELECT DISTINCT projects.id FROM users\nINNER join `join` ON `join`.user_id = users.id\nINNER join `groups` ON `join`.group_id = `groups`.id\nINNER join participate ON participate.group_id = `groups`.id\nINNER join projects ON participate.project_id = projects.id\nWHERE participate.state IN (\" . PARTICIPATE_STATE_INVITATION_ACCEPTED . \",\" . PARTICIPATE_STATE_CREATOR . \") AND `join`.state IN (\" . implode(\", \", [JOIN_STATE_INVITATION_ACCEPTED, JOIN_STATE_APPROVED]) . \") AND users.id = :id AND users.state != 0 \nORDER BY projects.id\";\n\n $params = [\"id\" => $userid];\n $items = Query($query, $params, true);\n $ids = [];\n foreach ($items as $item) {\n $ids[] = $item['id'];\n }\n return $ids;\n}", "public function getParticipationsForUser($a_user_id) {\r\n\t\treturn $this->ilRoomSharingDatabaseParticipants->getParticipationsForUser($a_user_id);\r\n\t}", "function conversations($user_id) {\r\n\t\tglobal $userpro;\r\n\t\t$output = null;\r\n\t\t\r\n\t\t$unread = $this->get_unread_user_ids($user_id);\r\n\t\t$archive = $this->get_read_user_ids($user_id);\r\n\t\t\r\n\t\tif (isset($archive) && !empty($archive) && isset($unread) && !empty($unread) ){\r\n\t\t$archive = array_diff($archive, $unread);\r\n\t\t}\r\n\t\t\r\n\t\tif (isset($unread) && !empty($unread)) {\r\n\t\t\tforeach ( $unread as $id) {\r\n\t\t\t\t$output .= '<div class=\"userpro-msg-col\" data-chat_from=\"'.$user_id.'\" data-chat_with=\"'.$id.'\">\r\n\t\t\t\t\r\n\t\t\t\t\t<span class=\"userpro-msg-view\"><i class=\"userpro-icon-retweet\"></i>'.__('read conversation','userpro-msg').'</span>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t<div class=\"userpro-msg-user-thumb alt\">'.get_avatar($id, 40).'</div>\r\n\t\t\t\t\t\r\n\t\t\t\t\t<div class=\"userpro-msg-user-info\">\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t<div class=\"userpro-msg-user-name alt\">\r\n\t\t\t\t\t\t\t<span>'.userpro_profile_data('display_name', $id).'</span>\r\n\t\t\t\t\t\t\t<span class=\"bubble\" data-chat_with=\"'.$id.'\"><i class=\"userpro-icon-comment\"></i></span>\r\n\t\t\t\t\t\t\t<span class=\"bubble-text\">'.__('quick reply','userpro-msg').'</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t<div class=\"userpro-msg-user-tab alt\">';\r\n\t\t\t\t\t\t\r\n\t\t\t\tif ( $this->extract_msg($user_id, $id, 'unread', 'status', 1) == 'unread') {\r\n\t\t\t\t\t$output .= '<span class=\"userpro-msg-unread\">'.sprintf(__('%s unread','userpro-msg'), $this->extract_msg($user_id, $id, 'unread', 'unread_msgs_count') ).'</span>';\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$output .= $this->extract_msg($user_id, $id, 'unread', 'content', 1);\r\n\t\t\t\t\r\n\t\t\t\t$output .= '<span class=\"userpro-msg-toolbar\">\r\n\t\t\t\t\t\t\t\t<span class=\"userpro-msg-timestamp\">'.$this->extract_msg($user_id, $id, 'unread', 'timestamp', 1).'</span>\r\n\t\t\t\t\t\t\t\t<span class=\"userpro-msg-delete\"><a href=\"#\" data-chat_from=\"'.$user_id.'\" data-chat_with=\"'.$id.'\">'.__('Delete Conversation','userpro-msg').'</a></span>\r\n\t\t\t\t\t\t\t</span>';\r\n\t\t\t\t\r\n\t\t\t\t$output .= '</div>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t</div><div class=\"userpro-clear\"></div>\r\n\t\t\t\t\t</div>';\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (isset($archive) && !empty($archive)) {\r\n\t\t\tforeach ( $archive as $id) {\r\n\t\t\t\t$output .= '<div class=\"userpro-msg-col\" data-chat_from=\"'.$user_id.'\" data-chat_with=\"'.$id.'\">\r\n\t\t\t\t\r\n\t\t\t\t\t<span class=\"userpro-msg-view\"><i class=\"userpro-icon-retweet\"></i>'.__('read conversation','userpro-msg').'</span>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t<div class=\"userpro-msg-user-thumb alt\">'.get_avatar($id, 40).'</div>\r\n\t\t\t\t\t\r\n\t\t\t\t\t<div class=\"userpro-msg-user-info\">\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t<div class=\"userpro-msg-user-name alt\">\r\n\t\t\t\t\t\t\t<span>'.userpro_profile_data('display_name', $id).'</span>\r\n\t\t\t\t\t\t\t<span class=\"bubble\" data-chat_with=\"'.$id.'\"><i class=\"userpro-icon-comment\"></i></span>\r\n\t\t\t\t\t\t\t<span class=\"bubble-text\">'.__('quick reply','userpro-msg').'</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t<div class=\"userpro-msg-user-tab alt\">';\r\n\t\t\t\t\t\t\r\n\t\t\t\tif ( $this->extract_msg($user_id, $id, 'archive', 'mode', 1) == 'sent') {\r\n\t\t\t\t\t$output .= '<span class=\"userpro-msg-you\"><i class=\"userpro-icon-reply\"></i></span>';\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$output .= $this->extract_msg($user_id, $id, 'archive', 'content', 1);\r\n\t\t\t\t\r\n\t\t\t\t$output .= '<span class=\"userpro-msg-toolbar\">\r\n\t\t\t\t\t\t\t\t<span class=\"userpro-msg-timestamp\">'.$this->extract_msg($user_id, $id, 'archive', 'timestamp', 1).'</span>\r\n\t\t\t\t\t\t\t\t<span class=\"userpro-msg-delete\"><a href=\"#\" data-chat_from=\"'.$user_id.'\" data-chat_with=\"'.$id.'\">'.__('Delete Conversation','userpro-msg').'</a></span>\r\n\t\t\t\t\t\t\t</span>';\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t$output .= '</div>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t</div><div class=\"userpro-clear\"></div>\r\n\t\t\t\t\t</div>';\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $output;\r\n\t}", "public function sendConversations()\n {\n return $this->hasMany('App\\Conversation', 'user1_id');\n }", "public function index($user_id) {\n $conversations_users = ConversationUser::where('user_id', $user_id)->lists('conversation_id');\n\n $conversations = array();\n\n if($conversations_users) {\n $conversations = Conversation::whereIn('id', $conversations_users)->get();\n }\n\n return Response::json([\n 'success' => true,\n 'result' => $conversations\n ]);\n }", "private function getUserFriendsIds($userId)\n {\n return Friendship::where('user_id', $userId)->lists('friend_id');\n }", "public static function getExistingUsersId(): array\n {\n return DB::table('loan_applications')\n ->where('status', Application::STATUS_COMPLETED)\n ->select(['user_id'])\n ->distinct()\n ->get()\n ->pluck('user_id')\n ->toArray()\n ;\n\n }", "function listMessages($service, $userId) {\n\n $opt_param = array();\n //////////////// temporary for test /////////////////\n\n if($_GET && array_key_exists('date', $_GET)) {\n $ini_date = date_create($_GET['date']);\n $end_date = date_add(date_create($_GET['date']), new DateInterval('P2D')) ;\n } else {\n $ini_date = date_create('02/28/2016');\n $end_date = date_create('03/01/2016');\n }\n $opt_param = array('q'=>'after:' . $ini_date->format('Y/m/d') . ' before:' . $end_date->format('Y/m/d') );\n //var_dump($opt_param);\n //////////////////////////////////////////////////////\n\n $pageToken = NULL;\n $messages = array();\n\n do {\n try {\n if ($pageToken) {\n $opt_param['pageToken'] = $pageToken;\n\n }\n $messagesResponse = $service->users_messages->listUsersMessages($userId, $opt_param);\n if ($messagesResponse->getMessages()) {\n $messages = array_merge($messages, $messagesResponse->getMessages());\n $pageToken = $messagesResponse->getNextPageToken();\n }\n } catch (Exception $e) {\n print 'An error occurred: ' . $e->getMessage();\n }\n } while ($pageToken);\n\n return $messages;\n}", "public function getInvitation($user_id) {\n\t\t$data = array();\n\n\t\t$c = array(\n\t\t\t'conditions' => array(\n\t\t\t\t'users_id' => $user_id,\n\t\t\t)\n\t\t);\n\n\t\t//Get all challenge's participant\n\t\t$challenges = $this->findAll($c, 'users_has_challenges');\n\n\t\t$i = 0;\n\t\tforeach ($challenges as $challenge) {\n\t\t\t$data[] = $this->load($challenge->challenges_id)[0];\n\t\t\t$data[$i]['sender'] += $this->load($challenge->sender, 'users')[0];\n\t\t\t$i++;\n\t\t}\n\n\t\treturn $data;\n\t}", "public function findChatIdForTwo(array $userIds=[])\n {\n $where = \"function() { return this.participants && this.participants.length === 2; }\";\n\n $qb = $this->repository->createQueryBuilder()\n ->field('activeParticipants')->equals($userIds[0])\n ->field('participants')->where($where) //\n ->hydrate(false)\n ->select('id')\n ->limit(1)\n /////Using JavaScript for this is really slow. You should prefer \"pure\" QueryBuilder:\n // ->field('participants')->exists(true)\n // ->not($qb->expr()->size(1));\n ;\n $qb->addAnd($qb->expr()->field('activeParticipants')->equals($userIds[1]));\n\n $thread = $qb->getQuery()->execute()->getSingleResult();\n\n return $thread ? (string)$thread['_id'] : null;\n }", "function getEventIds($userId) {\n return $this->find('list', array(\n 'conditions' => array('EventMember.user_id' => $userId),\n 'fields' => array('EventMember.event_id')\n ));\n }", "public function broadcastOn()\n {\n\n $result = [];\n foreach ($this->users AS $userId) {\n $result[] = 'messages.' . $userId;\n }\n\n if (!$result) {\n $result = ['messages'];\n }\n\n \\Log::debug(print_r($result, 1));\n return $result;\n\n }", "public static function get_all_for_user()\n\t{\n\t\t$user = Auth::instance()->get_user();\n\t\t$q = self::get_all_where()->where('user.id', '=', $user['id'])->execute()->as_array();\n $q = self::get_message_sender($q);\n return $q;\n\t}", "public function getAllRecipientsForChat() : array {\n $query = \"SELECT c.name, u.id FROM companies \n c JOIN users u ON c.user_id = u.id \n UNION SELECT t.first_name, u.id \n FROM teachers t JOIN users u ON t.user_id = u.id\";\n $pdostm = $this->db->prepare($query);\n $pdostm->setFetchMode(PDO::FETCH_OBJ);\n $pdostm->execute();\n\n $recipientsDB = $pdostm->fetchAll(PDO::FETCH_OBJ);\n // var_dump($recipientsDB);\n $recipients = array();\n\n foreach ($recipientsDB as $r)\n {\n $recipient = new ChatMember();\n\n $recipient->setUserId($r->id);\n $recipient->setName($r->name);\n\n array_push($recipients,$recipient);\n\n }\n return $recipients;\n\n }", "public function recievedConversations()\n {\n return $this->hasMany('App\\Conversation', 'user2_id');\n }", "public function participants()\n\t{\n\t\treturn $this->belongsToMany('App\\User', 'confer_conversation_participants', 'user_id', 'conversation_id');\n\t}", "public function getRequestList(int $user_id): array\n {\n $requests = UserContact::find()->where(['friend' => $user_id])->andWhere(['status' => UserContact::status['await']])->orderBy(['created_at' => SORT_DESC])->asArray()->all();\n $return = [];\n if (!empty($requests)) {\n foreach ($requests as $key => $list) {\n if ($list['person'] !== $user_id)\n $person = \\zetsoft\\models\\user\\User::findOne($list['person']);\n else\n $person = \\zetsoft\\models\\user\\User::findOne($list['friend']);\n\n if ($person !== null) {\n $return[$key]['id'] = $person->id;\n $return[$key]['name'] = $person->title;\n $return[$key]['status'] = $person->status;\n $return[$key]['avatar'] = $person->photo;\n }\n }\n }\n return $return;\n }", "public function getConversationListing($userId) {\n\n return $this->userRepository->listUserContacts($userId);\n }", "public function getMessagesSeg($idUser){\n\t\t$this->db->select('xref_message_user.id, xref_message_user.status, commerce.name as commerce');\n $this->db->select('xref_message_user.created as dateIncome, seg_message.name, commerce.image');\n $this->db->from('xref_message_user');\n $this->db->join('seg_message', 'xref_message_user.idSegMessage = seg_message.id', 'left');\n $this->db->join('commerce', 'seg_message.idCommerce = commerce.id', 'left');\n $this->db->where('xref_message_user.status > 0');\n $this->db->where('xref_message_user.idUser', $idUser);\n //$this->db->order_by(\"message.status\", \"asc\");\n $this->db->order_by(\"xref_message_user.created\", \"desc\");\n return $this->db->get()->result();\n\t}", "function create_conversation($user_ids, $subject, $body)\n{\n $dbcon = mysqli_connect('127.0.0.1', 'root', '', 'private_message_system');\n //Change any malicious code to text only\n $subject = mysqli_real_escape_string($dbcon, htmlentities($subject));\n $body = mysqli_real_escape_string($dbcon, htmlentities($body));\n //malicious code end\n $sqlquery = \"INSERT INTO `conversations` (`conversation_subject`) VALUES ('{$subject}')\";\n mysqli_query($dbcon, $sqlquery);\n\n //Get Subject ID to link to users part of the conversation\n $conversation_id = mysqli_insert_id($dbcon);\n //Into database con_msg 4 columns values\n $sqlquery = \"INSERT INTO `conversations_messages` (`conversation_id`, `user_id`, `message_date`, `message_text`)\n VALUES ('{$conversation_id}', '{$_SESSION['user_id']}', UNIX_TIMESTAMP(), '{$body}')\";\n //FROM_UNIXTIME(unix_timestamp)\n mysqli_query($dbcon, $sqlquery);\n // die(mysqli_error($dbcon));\n //for each user array\n\n $values = array(\"({$conversation_id}, {$_SESSION['user_id']}, UNIX_TIMESTAMP(), 0)\");\n\n //$user_ids[] = $_SESSION['user_id']; //Append the user sending the message to the array\n\n //loop through each user that is added to the conversation and add to a ,cslist\n foreach ($user_ids as $user_id){\n $user_id = (int) $user_id; // Extra security to ensure data comes from the database\n $values[] = \"({$conversation_id}, {$user_id}, 0, 0)\";\n }\n\n $sqlquery = \"INSERT INTO `conversations_members` (`conversation_id`, `user_id`, `conversation_last_view`, `conversation_deleted`)\n VALUES \" . implode(\", \", $values); //include reciepients\n\n mysqli_query($dbcon, $sqlquery);\n\n}", "public function getConversationPersons();", "static function show_received_message($id_user){\n if(!is_int($id_user))\n return false;\n $query = self::$PDO->prepare(\"SELECT t1.*,concat(t2.fname,' ',t2.name) as recipient_name,concat(t3.fname,' ',t3.name) as sender_name from \".self::$prefix.\"messages t1,\".self::$prefix.\"users t2, \".self::$prefix.\"users t3 where id_recipient = :id_user and t1.id_recipient = t2.ID AND t1.id_sender = t3.ID and (deleted IS NULL OR deleted=0)\");\n $query->execute(array(':id_user'=>$id_user));\n return $query->fetchAll();\n }", "public function loadConversationRegistrationIds($authenticatedUser, $recipient)\r\n {\r\n $registrationIds = $this->createQueryBuilder(\"d\")\r\n ->where(\"d.user = :authenticatedUser\")\r\n ->orWhere(\"d.user = :recipient\")\r\n ->setParameter(\":authenticatedUser\", $authenticatedUser)\r\n ->setParameter(\":recipient\", $recipient)\r\n ->getQuery()\r\n ->getResult();\r\n\r\n return $registrationIds;\r\n }", "public function getUserIds()\n {\n $this->_parse();\n\n return $this->_cache['userid'];\n }", "public function conversationList($id)\n\t{\n\n\t\t$url = \"http://api.candychat.com:1314/api/chat/list/\".$id;\n\t\t$response = cURL::get($url);\n\t\t\n\t\t$response = $response->body;\n\t\t$json = json_decode($response,true);\n\t\tif(count($json) != 0)\n\t\t\treturn Response::json(array('status' => '1',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//'users' => $account2,\n \t\t\t'conversations' => $json\n \t\t\t));\n\t\telse \n\t\t\treturn Response::json(array('status' => '0',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//'users' => $account2,\n \t\t\t'conversations' => $json\n \t\t\t));\n\t\t\n\t}", "public function countMessageListOfUserWithUser($fromUserId, $toUserId, $sqlSearch = null) {\n\t\tglobal $db;\n\t\t\n\t\t$db -> query(\n\t\t\t'SELECT COUNT(*) AS `count` '.\n\t\t\t'FROM `db_message` '.\n\t\t\t'WHERE ((`from_user_id` = \"'.$fromUserId.'\" && `to_user_id` = \"'.$toUserId.'\") || (`to_user_id` = \"'.$fromUserId.'\" && `from_user_id` = \"'.$toUserId.'\")) '.$sqlSearch.' '.\n\t\t\t'ORDER BY `date` ASC '.\n\t\t\t'LIMIT 100'\n\t\t);\n\t\t$r = $db -> fetchArray();\n\t\t\n\t\treturn($r['count']);\n\t}", "function msm_get_participants($msmid)\n{\n return false;\n}", "function getRecipientIds() {\n\t\t$ids = array();\n\t\t$recipients = $this->getRecipients();\n\t\tforeach ($recipients as $recipient){\n\t\t\t$ids[$recipient->getRecipientID()] = $recipient->getRecipientID();\n\t\t}\n\t\treturn $ids;\n\t}", "function getPartnerIds(){\r\n \t\r\n \t$partners = array();\r\n \t$partner_ids_array = array();\r\n \t$partner_ids_str = '';\r\n\r\n \t$partners = $this->db->get_where('permissions_users', array(\r\n\t \t'role' => 'partner'\r\n\t ))->result_array();\r\n\r\n\t foreach ($partners as $key => $partner) {\r\n\t \t$partner_ids_array[] = $partner['user_id'] . '-' . $partner['user_name'];\r\n\t }\r\n\r\n \t$partner_ids_str = implode(\",\",$partner_ids_array);\r\n\r\n\t return $partner_ids_str;\r\n }", "function cot_message_count($user_id=0)\n{\n\tglobal $db, $db_pm;\n\t$sql = $db->query(\"SELECT COUNT(*) FROM $db_pm WHERE pm_fromuserid = $user_id AND pm_fromstate <> 3\");\n\t$totalsentbox = $sql->fetchColumn();\n\t$sql = $db->query(\"SELECT COUNT(*) FROM $db_pm WHERE pm_touserid = $user_id AND pm_tostate <> 3\");\n\t$totalinbox = $sql->fetchColumn();\n\n\treturn array($totalsentbox, $totalinbox);\n}", "public function broadcastOn()\r\n {\r\n $recipients = [];\r\n $ids = $this->recipientIds;\r\n\r\n foreach($ids as $id) {\r\n $recipients[] = new PrivateChannel('user-'.$id);\r\n }\r\n return $recipients;\r\n }", "public function findAllMessages(string $idUser, string $idFriend) {\n $tableName = self::TABLE_NAME;\n\n $req = $this->_db->prepare(\"\n SELECT $tableName.message, $tableName.createdAt, users.username FROM $tableName \n INNER JOIN users ON users.idUser = $tableName.idUser \n WHERE $tableName.idFriend = ? AND $tableName.idUser = ? OR $tableName.idFriend = ? AND $tableName.idUSer = ?\n ORDER BY $tableName.createdAt \n \");\n\n $req->execute([$idFriend, $idUser, $idUser, $idFriend]);\n\n return $req->fetchAll();\n\n }", "public function getUser(string $chatId) : array {\r\n $conn = $this->conn->dbConn();\r\n $query = \"SELECT current_frame, start_frame, end_frame FROM user_entity WHERE chat_id = $chatId\";\r\n $result = $conn->query($query);\r\n $arrayDataChat = [];\r\n if ( $result ) {\r\n while ($row = $result->fetch_row()) {\r\n $arrayDataChat = array(\r\n 'current_frame' => intval($row[0]),\r\n 'start_frame' => intval($row[1]),\r\n 'end_frame' => intval($row[2])\r\n );\r\n }\r\n }\r\n return $arrayDataChat;\r\n }", "public function getUserIds() {\n return @$this->attributes['user_ids'];\n }", "public function getconnectionFromUserId($data = array()) {\n\n $accessToken = $data['access_token'];\n $Dj_id = $data['dj_id'];\n\n\n $retResult = $this->_funcObj->checkBlank($data);\n if ($retResult == 1) {\n $response = array(\"error\" => \"Some Parameter Missing!\");\n return $response;\n }\n\n $authenticate = $this->_funcObj->authenticateAccessToken($accessToken);\n\n\n if (count($authenticate) == 0) {\n $response = array(\"error\" => \"Invalid Access Token!\");\n return $response;\n } else {\n $userId = $authenticate['data'][0]['user_id'];\n\n $sql = \"SELECT dj_user_id FROM tb_playlist_share where listner_user_id=? and status=? LIMIT 1\";\n $bindParams = array($userId, 2);\n $responseDjId = $this->_DAL->sqlQuery($sql, $bindParams);\n\n if (count($responseDjId) == 0) {\n $response = array(\"error\" => \"Not Listening to any Dj\");\n return $response;\n } else {\n $sql = \"SELECT listner_user_id FROM tb_playlist_share where dj_user_id=?\";\n $bindParams = array($responseDjId['data'][0]['dj_user_id']);\n $responseUserIds = $this->_DAL->sqlQuery($sql, $bindParams);\n\n // print_r($responseUserIds);\n\n if (count($responseUserIds) == 0) {\n $response = array(\"error\" => \"No Connections\");\n return $response;\n } else {\n $i = 0;\n foreach ($responseUserIds['data'] as $value) {\n $userData = $this->getUserInfoFromUserid($value['listner_user_id']);\n\n $response[$i] = $userData['data'][0];\n // $responseConnection['data'][$i]['connections']=$response[$i];\n unset($response[$i]['user_access_token']);\n unset($response[$i]['new_reg']);\n\n $i++;\n }\n $responseConnection['data'][0]['friends'] = $response;\n }\n }\n // print_r($responseConnection);\n return $responseConnection;\n }\n }", "public static function getFriendsSendToday($user_id) {\n\t\t$rRedis = Env::getRedisForUserRead();\n\t\t$key = CacheKey::getFriendsSendPresent ( $user_id );\n\t\t$fids = $rRedis->get ( $key );\n\t\tif (! $fids) {\n\t\t\t$pdo = Env::getDbConnectionForUserRead ( $user_id );\n\t\t\t\n\t\t\t$today_range = self::getTodayRange ();\n\t\t\t\n\t\t\t$sql = 'SELECT * FROM ' . static::TABLE_NAME;\n\t\t\t$sql .= ' WHERE sender_id = ?';\n\t\t\t$sql .= ' AND UNIX_TIMESTAMP(created_at) >= ?';\n\t\t\t$sql .= ' AND UNIX_TIMESTAMP(created_at) < ?';\n\t\t\t$values = array (\n\t\t\t\t\t$user_id,\n\t\t\t\t\t$today_range ['start'],\n\t\t\t\t\t$today_range ['end'] \n\t\t\t);\n\t\t\t$stmt = $pdo->prepare ( $sql );\n\t\t\t$stmt->setFetchMode ( PDO::FETCH_CLASS, get_called_class () );\n\t\t\t$stmt->execute ( $values );\n\t\t\t$objs = $stmt->fetchAll ( PDO::FETCH_CLASS, get_called_class () );\n\t\t\tif (empty ( $objs )) {\n\t\t\t\treturn array ();\n\t\t\t}\n\t\t\t\n\t\t\t$fids = array ();\n\t\t\tforeach ( $objs as $obj ) {\n\t\t\t\t$fids [] = $obj->receiver_id;\n\t\t\t}\n\t\t\t$expire = static::getSecendsToTomorrow ();\n\t\t\tif ($expire > 1) {\n\t\t\t\t$redis = Env::getRedisForUser();\n\t\t\t\t$redis->set ( $key, $fids, $expire );\n\t\t\t}\n\t\t\treturn $fids;\n\t\t} else {\n\t\t\treturn $fids;\n\t\t}\n\t}", "public function getMySubordinatesIds($userId)\n {\n $queryBuilder = $this->createQueryBuilder('u');\n $queryBuilder->select('u.id')\n ->innerJoin('u.supervisorsLevel1', 'sp1')\n ->where('sp1.id = :id')\n ->setParameter('id', $userId)\n ;\n $mySubordinatesAsLevel1 = $queryBuilder->getQuery()->getScalarResult();\n \n $queryBuilder = $this->createQueryBuilder('u');\n $queryBuilder->select('u.id')\n ->innerJoin('u.supervisorsLevel2', 'sp2')\n ->where('sp2.id = :id')\n ->setParameter('id', $userId)\n ;\n $mySubordinatesAsLevel2 = $queryBuilder->getQuery()->getScalarResult();\n \n $ids1 = array_column($mySubordinatesAsLevel1, \"id\");\n $ids2 = array_column($mySubordinatesAsLevel2, \"id\");\n\n return array_unique(array_merge([(string)$userId], $ids1, $ids2));\n }", "public function getMyContactsIdsInArray()\n {\n $usersIdsObj = $this->db->query('SELECT id_contact FROM we__Contacts WHERE fk_iduser = ?', [\n $this->session->read('auth')->pk_iduser\n ])->fetchAll();\n\n $idArray = Functions::getArrayFromObjectProperty($usersIdsObj, 'id_contact');\n return $idArray;\n }", "public function getMasterInboxFOUsers($user=NULL)\n {\n\n if($user)\n $condition=\"m.auto_mail!='yes' and ((t.recipient_id='\".$user.\"' and m.type='1') OR (t.sender_id='\".$user.\"' and m.type='0'))\";\n //$condition=\"m.auto_mail!='yes' and ((t.recipient_id='\".$user.\"' and m.type='0') and (t.sender_id in (select identifier from User where type not in('client','contributor'))))\";\n else\n $condition=\"m.auto_mail!='yes' and ((t.recipient_id in (select identifier from User where type in('client','contributor') and m.type='0')) and (t.sender_id in (select identifier from User where type not in('client','contributor'))))\n OR ((t.sender_id in (select identifier from User where type in('client','contributor') and m.type='1')) and (t.recipient_id in (select identifier from User where type not in('client','contributor'))))\";\n\n $msg_query=\"select\n m.id as messageId,m.type,ticket_id,sender_id,recipient_id,IF(m.type='1',recipient_id,sender_id) as userid,\n IF(m.type='1',sender_id,recipient_id) as receiverId,\n u.email, title as Subject,content,\n IF(DATE(m.created_at)=DATE(NOW()),DATE_FORMAT(m.created_at , '%H:%i'),DATE_FORMAT(m.created_at , '%d/%m/%Y %H:%i')) as receivedDate,\n m.created_at as receivedDate_sort,\n m.status from Ticket t\n INNER JOIN Message m ON m.ticket_id=t.id\n INNER JOIN User u ON u.identifier=t.recipient_id\n INNER JOIN User u1 ON u1.identifier=t.sender_id\n where \".$condition.\" and t.status in ('0','1') \n Group By t.sender_id,t.recipient_id,m.id ORDER BY m.created_at DESC\";\n\n //echo $msg_query;exit;\n\n if(($result=$this->getQuery($msg_query,true))!=NULL)\n return $result;\n else\n return \"No Messages Found\";\n\n }", "function getFollowedUsers ($user_id)\n\t{\n\t\t$db = new Database();\n\t\t$select = \"select user_id from USERS where user_id in (select followed_user_id from FOLLOWERS where following_user_id = {$user_id});\";\n\t\t$result = $db->query($select);\n\n\t\t$array = array();\n\t\twhile ($row = mysqli_fetch_assoc($result)) {\n\t\t\t$user_id = $row['user_id'];\n\t\t\t$array[] = getUser($user_id);\n\t\t}\n\t\t\n\t\treturn $array;\n\t}", "public function get_conversation($ride_id,$user)\n\t{\n\t}", "function smartcom_get_participants($smartcomid) {\n return false;\n}" ]
[ "0.72482604", "0.71369934", "0.7083625", "0.7021509", "0.6950238", "0.6687215", "0.66870475", "0.6684659", "0.6600432", "0.6562371", "0.6554495", "0.6498348", "0.6495832", "0.6443552", "0.64414144", "0.63727164", "0.63582224", "0.63374275", "0.6333397", "0.63258505", "0.63239574", "0.63125384", "0.62923694", "0.62652534", "0.62245375", "0.6175599", "0.61264634", "0.6073169", "0.6055173", "0.605233", "0.6051781", "0.6035921", "0.6035553", "0.60315394", "0.6030821", "0.6018474", "0.60170627", "0.6012862", "0.5999963", "0.5999838", "0.5956286", "0.5951556", "0.5948423", "0.59460133", "0.5945535", "0.5935692", "0.5927564", "0.59246534", "0.5920782", "0.59171766", "0.59115154", "0.5901864", "0.58949864", "0.5885081", "0.588294", "0.58770263", "0.5867536", "0.58595026", "0.58500934", "0.58399063", "0.58304423", "0.58143365", "0.57981133", "0.57939374", "0.57935995", "0.5779778", "0.5755692", "0.5749715", "0.5737461", "0.5734451", "0.57310814", "0.5717052", "0.5710655", "0.5708216", "0.5707049", "0.56957847", "0.56953114", "0.5690235", "0.56846213", "0.56834525", "0.5677776", "0.56768346", "0.5671067", "0.5666621", "0.56654483", "0.56634474", "0.5651274", "0.56476355", "0.56416094", "0.5638704", "0.5629868", "0.56272805", "0.5625216", "0.56224585", "0.5621364", "0.56173307", "0.5613812", "0.56095237", "0.56055003", "0.56042534" ]
0.8356511
0
send a message to a user Params: FromUser_Id who the message is from Conversation_Id the conversation id that the message is posted to Message the message text (MAX_MESSAGE_LEN bytes max) returns: true on success, errormsg otherwise.
отправить сообщение пользователю Параметры: FromUser_Id от кого отправлено сообщение Conversation_Id идентификатор чата, в который отправляется сообщение Message текст сообщения (максимум MAX_MESSAGE_LEN байт) возвращает: true при успешном выполнении, errormsg в противном случае.
function SendMessage( $FromUser_Id, $Conversation_Id, $Message ){ // sanity checks. if( ! is_int( $FromUser_Id ) || ! is_int( $Conversation_Id ) || 0 == strlen( $Message ) ) return( "Param error: FromUser_Id / Conversation_Id / Message - wrong type or empty." ); // ensure the FromUser_Id is actually in the Conversation_Id if( ! SelfInConversationId( $FromUser_Id, $Conversation_Id ) ) return( "Error: ! SelfInConversationId()" ); // if message is too long (>MAX_MSG_LEN), truncate if( MAX_MSG_LEN < strlen( $Message ) ) $Message = substr( $Message, 0, MAX_MSG_LEN ); $Message = mysql_real_escape_string( $Message ); $Sql = "INSERT INTO ChatMessages (Id,FromUser_Id,Conversation_Id,Message,DateSent) VALUES(NULL,$FromUser_Id,$Conversation_Id,'$Message',NOW())"; mysql_query( $Sql ); $errno = mysql_errno(); if( 0 != $errno ) return( "mysql error: $errno" ); // message sent return( true ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function user_message_send($to, $subject, $message, $convo_id = 0) {\n\t global $database, $class_user;\n\n\t // VALIDATE CONVERSATION ID\n\t if($convo_id == \"\" OR !is_numeric($convo_id)) { $convo_id = 0; }\n\n\t // GET TO USER\n\t $to_user = new se_user(Array(0, $to));\n\n\t // CHECK TO SEE IF MESSAGE IS EMPTY\n\t if(str_replace(\" \", \"\", $message) == \"\") { $this->is_error = 1; $this->error_message = $class_user[22]; }\n\n\t // TO USER DOESN'T EXIST\n\t if($to_user->user_exists == 0) { $this->is_error = 1; $this->error_message = $class_user[23]; }\n\n\t // TO USER IS THE SAME AS LOGGED IN USER\n\t if($to_user->user_info[user_username] == $this->user_info[user_username]) { $this->is_error = 1; $this->error_message = $class_user[24]; }\n\n\t // TO USER HAS CURRENT USER IN THEIR BLOCK LIST\n\t if($to_user->user_blocked($this->user_info[user_id])) { $is_error = 1; $error_message = $class_user[25]; }\n\n\t // TO USER IS NOT A FRIEND AND ADMIN HAS \"MESSAGE FRIENDS ONLY\" TURNED ON\n\t if($this->level_info[level_message_allow] == 1 & $this->user_friended($to_user->user_info[user_id]) == FALSE) { $this->is_error = 1; $this->error_message = $class_user[26]; }\n\n\t // IF NO ERROR, SEND MESSAGE\n\t if($this->is_error == 0) {\n\n\t // REPLACE NEWLINES IN BODY WITH BREAKS\n\t $message = str_replace(\"\\n\", \"<br>\", $message);\n\n\t // INSERT MESSAGE\n\t $pm_date = time();\n\t $database->database_query(\"INSERT INTO se_pms (pm_user_id, pm_authoruser_id, pm_convo_id, pm_date, pm_subject, pm_body, pm_status, pm_outbox) VALUES ('\".$to_user->user_info[user_id].\"', '\".$this->user_info[user_id].\"', '$convo_id', '$pm_date', '$subject', '$message', '0', '1')\");\n\n\t // SEND MESSAGE NOTIFICATION EMAIL\n\t send_message($to_user, $this->user_info[user_username]);\n\n\t // IF OUTBOX IS FULL, DELETE OLDEST MESSAGE\n\t $num_outbox = $this->user_message_total(1, 0);\n\t if($num_outbox > $this->level_info[level_message_outbox]) {\n\t $num_delete = $num_outbox-($this->level_info[level_message_outbox]);\n\t $database->database_query(\"UPDATE se_pms SET pm_outbox='0' WHERE pm_authoruser_id='\".$this->user_info[user_id].\"' AND pm_outbox<>'0' ORDER BY pm_id ASC LIMIT $num_delete\");\n\t } \n\n\t // IF INBOX IS FULL, DELETE OLDEST MESSAGE\t\n\t $total_pms = $to_user->user_message_total(0, 0);\n\t if($num_inbox > $to_user->level_info[level_message_inbox]) {\n\t $num_delete = $num_inbox-($to_user->level_info[level_message_inbox]);\n\t $database->database_query(\"UPDATE se_pms SET pm_status='2' WHERE pm_user_id='\".$to_user->user_info[user_id].\"' AND pm_status<>'2' ORDER BY pm_date ASC LIMIT $num_delete\");\n\t }\n\n\t // CLEAR PMS\n\t $database->database_query(\"DELETE FROM se_pms WHERE pm_status='2' AND pm_outbox='0'\");\n\t }\n\n\t}", "public function sendMsg()\n\t{\n\t\t$res = $this -> weObj->sendMassMessage(\n\t\t\t\tarray(\n\t\t\t\t\t'ToUserName'=>array('onm1jwPia20C0HYPSCbPtaHVdV0I','onm1jwAD3vu1V53eaygfOmcfADfU','onm1jwKM7L0Agos_3J00yg7jL5ok'),\n\t\t\t\t\t'FromUserName'=>'onm1jwAD3vu1V53eaygfOmcfADfU',\n\t\t\t\t\t'CreateTime'=>'1486378084',\n\t\t\t\t\t'MsgType' =>'text',\n\t\t\t\t\t'Content'=>'在干吗呢'\n\t\t\t\t));\n\t\tdump($res);\n\t}", "public function actionSend(){\r\n\t\tif(!$_POST){\r\n\t\t\tYii::app()->end();\r\n\t\t}\r\n\t\t\r\n\t\t$this->requireGold('sendmessage', $this->id);\r\n\t\t\r\n\t\t$subject = '';\r\n\t\t$content = '';\r\n\t\t$parentmsgid = null;\r\n\t\tif(isset($_POST['subject'])) $subject = $_POST['subject'];\r\n\t\tif(isset($_POST['content'])) $content = $_POST['content'];\r\n\t\tif(isset($_POST['parentmsgid'])){\r\n\t\t\t$parentmsgid = $_POST['parentmsgid'];\r\n\t\t\tif(trim($parentmsgid) == '') $parentmsgid = null;\r\n\t\t}\r\n\t\t\r\n\t\tif(!$this->id)\r\n\t\t{\r\n\t\t\tYii::app()->end();\r\n\t\t}\r\n\t\t\r\n\t\t$user = new Profile($this->userid);\r\n\t\t$target = new Profile($this->id);\r\n\t\t\r\n\t\t$act = Activity::createActivity();\r\n\t\t$result = $act->sendMessages($this->id, $subject, $content, $parentmsgid);\r\n\t\t\r\n\t\t$this->checkBlockResult($result);\r\n\t\t\r\n\t\tif($result){\r\n\t\t\t\r\n\t\t\t$reshtml = array(\r\n\t\t\t\t'subject' => $subject,\r\n\t\t\t\t'content' => $content,\r\n\t\t\t\t'fromName' => $user->getDataValue('username'),\r\n\t\t\t\t'toName' => $target->getDataValue('username'),\r\n\t\t\t\t'fromLink' => \"/profile/\".Yii::app()->secur->encryptID($this->userid),\r\n\t\t\t\t'toLink' => \"/profile/\".Yii::app()->secur->encryptID($this->id),\r\n\t\t\t\t'fromImgUrl' => $user->imgUrl(),\r\n\t\t\t\t'toImgUrl' => $target->imgUrl(),\r\n\t\t\t\t'time' => 'less than 5 seconds',\r\n\t\t\t\t);\r\n\t\t\tif(!isset($result['parent']) || $result['parent'] == ''){\r\n\t\t\t\t$reshtml['threadlink'] = SITE_URL.\"/thread/\".Yii::app()->secur->encryptID($this->id).'/'.$result['id'];\r\n\t\t\t} else{\r\n\t\t\t\t$reshtml['threadlink'] = SITE_URL.\"/thread/\".Yii::app()->secur->encryptID($this->id).'/'.$result['parent'];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Note: Do not send reply message.\r\n\t\t\tif(!isset($result['parent']) && $target->getSettingsValue('hided_notify') == '0'){\r\n\t\t\t\tYii::app()->mail->prepareMailHtml(\r\n\t\t\t\t\t'',\r\n\t\t\t\t\t'', \r\n\t\t\t\t\t'email', \r\n\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t'from_user_id' => $this->userid,\r\n\t\t\t\t\t\t\t'user_id'\t=> $this->id,//email to this user\r\n\t\t\t\t\t\t\t'messages_Url' => CHelperProfile::getAutoLoginUrl($this->id).'?redirect='. urlencode(\"/thread/\".Yii::app()->secur->encryptID($this->userid).'/'.$result['id']),\r\n\t\t\t\t\t\t\t'message_subject' => $subject\r\n\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\techo CJavaScript::jsonEncode($reshtml);\r\n\t\t\tYii::app()->end();\t\t\t\r\n\t\t}\r\n\t\telse {\r\n\t\t\tYii::app()->end();\r\n\t\t}\r\n\t}", "function send_user($user, $message) {\n $user = messaging_user_object($user);\n $simple = Messaging_Simple::build($user, $message);\n return (bool)$simple->save();\n }", "public function actionSend()\n {\n $this->enableCsrfValidation = false;\n $model = new Message();\n $model->uuid = MainFunctions::GUID();\n $accountUser = Yii::$app->user->identity;\n $currentUser = Users::findOne(['user_id' => $accountUser['id']]);\n $model->fromUserUuid = $currentUser['uuid'];\n $model->text = $_POST[\"message\"];\n $model->toUserUuid = $model->fromUserUuid;\n $model->status = 0;\n $model->date = date(\"Ymd\");\n $model->save();\n return $this->redirect(['/site/dashboard']);\n }", "public function executeSend()\n\t{\n\n\n\t\t//Grab the user object\n\t\t$user = $this->getUser()->getRaykuUser();\n\n\t\t//Pull a User object for the recipient\n\t\t$c = new Criteria();\n\t\t$c->add(UserPeer::USERNAME, $this->getRequestParameter('name'));\n\t\t$recipient = UserPeer::doSelectOne($c);\n\n\t\t//Send the message\n\t\t$user->sendMessage($recipient->getId(), $this->getRequestParameter('subject'), $this->getRequestParameter('body'));\n\n\t\t$this->getUser()->addNotice('Your private message has been successfully sent');\n\n\t\t$this->redirect('message/index');\n\t}", "function sendMsg() {\r\n\t\t$current_user_id=$this->getCurrentUserID ();\r\n\t\tif(!$current_user_id)\r\n\t\t\t\treturn 0;\t\t\r\n\t\t$receiver_id = $_GET ['receiver_id'];\r\n\t\t$title = $_GET ['title'];\r\n\t\t$content = $_GET ['content'];\r\n\t\t$m=new Msg();\r\n\t\t$m->sender_id=$current_user_id;\r\n\t\t$m->receiver_id=$receiver_id;\r\n\t\t$m->title=$title;\r\n\t\t$m->content=$content;\r\n\t\t$m->save();\r\n\t\t$m->send();\t\t\t\r\n\t}", "public function sendMessage($user_id=0, $from_email='', $subject='', $message='', $xhr=FALSE){\r\n\t\t$xmlobject = $this->getXMLObject();\r\n\t\t$err_code = 0;\r\n\t\t$ip = DB::escape(Utils::getIP());\r\n\t\t$result = DB::query('SELECT message_date FROM messages WHERE sender_ip = \\''.$ip.'\\' ORDER BY message_id DESC LIMIT 0,1');\r\n\t\tif($result){\r\n\t\t\t$bln_send = true;\r\n\t\t\tif(DB::numRows($result)==1){\r\n\t\t\t\tif(time()-strtotime(DB::result($result, 0))<self::ANTISPAM_TIME_DELAY){\r\n\t\t\t\t\t$bln_send = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif($bln_send){\r\n\t\t\t\t$result_to = DB::query('SELECT email, user_name FROM users WHERE user_id = '.(int)$user_id);\r\n\t\t\t\tif($result_to){\r\n\t\t\t\t\tif(DB::numRows($result_to)==1){\r\n\t\t\t\t\t\t$to_user = DB::fetchAssoc($result_to);\r\n\t\t\t\t\t\t$to_email = $to_user['email'];\r\n\t\t\t\t\t\t$to_user_name = $to_user['user_name'];\r\n\t\t\t\t\t\tif($uid = $this->access->getUserId()){\r\n\t\t\t\t\t\t\tif($from_name = $this->access->getUserName()){\r\n\t\t\t\t\t\t\t\t$result_from = DB::query('SELECT photo_count FROM users WHERE user_id='.(int)$uid);\r\n\t\t\t\t\t\t\t\tif($result_from){\r\n\t\t\t\t\t\t\t\t\tif(DB::numRows($result_from)==1){//check if user still exists. In case of spamming: user has been deleted but is still able to send mail because of session cookie\r\n\t\t\t\t\t\t\t\t\t\tif((int)DB::result($result_from, 0)>=0){//user has uploaded more than 2 photo\r\n\t\t\t\t\t\t\t\t\t\t\t$subject = strip_tags(trim($subject));\r\n\t\t\t\t\t\t\t\t\t\t\tif(mb_strlen($subject)>0){\r\n\t\t\t\t\t\t\t\t\t\t\t\t$body = strip_tags(trim($message));\r\n\t\t\t\t\t\t\t\t\t\t\t\tif(mb_strlen($body)>0){\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tinclude_once CLASS_PATH.'Mail.class.php';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$mail = new Mail();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$mail->From(EMAIL_SENDER, SUPPORT_EMAIL_ADDRESS);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$mail->To($to_email);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$mail->Subject($from_name.' has sent you a message: '.$subject);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$mail->Body($body);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(!$mail->Send())$this->throwError(11);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\telse DB::query('INSERT INTO messages SET user_id='.(int)$user_id.',sender_id='.(int)$uid.',sender_name=\\''.DB::escape($from_name).'\\',sender_ip=\\''.$ip.'\\', message_subject=\\''.DB::escape($subject).'\\',message_text=\\''.DB::escape($body).'\\'');//log\r\n\t\t\t\t\t\t\t\t\t\t\t\t}else $err_code = 3;\r\n\t\t\t\t\t\t\t\t\t\t\t}else $err_code = 3;\r\n\t\t\t\t\t\t\t\t\t\t}else $err_code = 14;\r\n\t\t\t\t\t\t\t\t\t}else $err_code = 11;\r\n\t\t\t\t\t\t\t\t}else $err_code = 8;\r\n\t\t\t\t\t\t\t}else $err_code = 1;\r\n\t\t\t\t\t\t}else $err_code = 1;\r\n\t\t\t\t\t}else $err_code = 2;\r\n\t\t\t\t}else $err_code = 8;\r\n\t\t\t}else $err_code = 13;\r\n\t\t}\r\n\t\tif($err_code > 0){\r\n\t\t\tif($xhr){\r\n\t\t\t\treturn array('error_code'=>$err_code, 'error_message'=>$this->getErrorMessage($err_code));\r\n\t\t\t}else{\r\n\t\t\t\theader('location:'.ROOT_URL.'member/'.urldecode($to_user_name).'/send_message/?err='.$this->getErrorMessage($err_code));\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(!$xhr)return $xmlobject;\r\n\t\telse{\r\n\t\t\treturn array('message'=>'Your message has been sent.');\r\n\t\t}\r\n\t}", "public function sendMessage()\n\t{\n\t\t$sent_by = $this->my_id;\n\t\t$message = $this->input->post('message');\n\t\t$sentTo = $this->input->post('sendMessageTo');\n\t\t//\tinsert into one_to_one_chat\n\t\t$data = array(\n\t\t\t\"from_user_id\" => $sent_by,\n\t\t\t\"to_user_id\" => $sentTo,\n\t\t\t\"message_body\" => $message,\n\t\t\t\"message_time\" => date('Y-m-d H:i:s'),\n\t\t);\n\t\tif ($this->db->insert('one_to_one_chat', $data)) {\n\t\t\techo 'Success';\n\t\t} else {\n\t\t\techo 'failed';\n\t\t}\n\t}", "public function sendMessage($conversation_id, $message, $user_id){\n\t\t$description = Database::getEscaped($message);\n\t\t$query = \"INSERT INTO conversation_reply(cr_id, sender, reply_message, conversationId) VALUES(DEFAULT, $user_id, '$description', '$conversation_id')\";\n\t\tDatabase::executeSqlQuery($query);\n\t}", "public function sendAction()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$user = Application_Model_User::getAuth();\n\n\t\t\tif ($user == null)\n\t\t\t{\n\t\t\t\tthrow new RuntimeException('You are not authorized to access this action');\n\t\t\t}\n\n\t\t\t$user_id = $this->_request->getPost('user_id');\n\n\t\t\tif (!v::intVal()->validate($user_id))\n\t\t\t{\n\t\t\t\tthrow new RuntimeException('Incorrect user ID value');\n\t\t\t}\n\n\t\t\tif (!Application_Model_User::checkId($user_id, $receiver))\n\t\t\t{\n\t\t\t\tthrow new RuntimeException('Incorrect user ID');\n\t\t\t}\n\n\t\t\t$form = new Application_Form_Message;\n\n\t\t\tif (!$form->isValid($this->_request->getPost()))\n\t\t\t{\n\t\t\t\tthrow new RuntimeException('Validate error');\n\t\t\t}\n\n\t\t\t$data = $form->getValues();\n\n\t\t\t$conversation_id = (new Application_Model_Conversation)->insert([\n\t\t\t\t'created_at' => new Zend_Db_Expr('NOW()'),\n\t\t\t\t'status' => new Zend_Db_Expr('0'),\n\t\t\t\t'from_id' => $user['id'],\n\t\t\t\t'to_id' => $receiver['id'],\n\t\t\t\t'subject' => $data['subject']\n\t\t\t]);\n\n\t\t\t(new Application_Model_ConversationMessage)->insert([\n\t\t\t\t'conversation_id' => $conversation_id,\n\t\t\t\t'from_id' => $user['id'],\n\t\t\t\t'to_id' => $receiver['id'],\n\t\t\t\t'body' => $data['message'],\n\t\t\t\t'is_first' => 1,\n\t\t\t\t'is_read' => 0,\n\t\t\t\t'created_at' => new Zend_Db_Expr('NOW()'),\n\t\t\t\t'status' => 0\n\t\t\t]);\n\n\t\t\tMy_Email::send(\n\t\t\t\t[$receiver['Name'] => $receiver['Email_id']],\n\t\t\t\t$data['subject'],\n\t\t\t\t[\n\t\t\t\t\t'template' => 'message-notification',\n\t\t\t\t\t'assign' => [\n\t\t\t\t\t\t'sender' => $user,\n\t\t\t\t\t\t'subject' => $data['subject'],\n\t\t\t\t\t\t'message' => $data['message']\n\t\t\t\t\t]\n\t\t\t\t]\n\t\t\t);\n\n\t\t\t$response = ['status' => 1];\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t$response = [\n\t\t\t\t'status' => 0,\n\t\t\t\t'error' => [\n\t\t\t\t\t'message' => $e instanceof RuntimeException ?\n\t\t\t\t\t\t$e->getMessage() : 'Internal Server Error'\n\t\t\t\t]\n\t\t\t];\n\t\t}\n\n\t\t$this->_helper->json($response);\n\t}", "public function send($userid, $text, $image = null, $fromUserid = null)\r\n {\r\n $fromUserid = ($fromUserid) ? $fromUserid : \\Auth::user()->id;\r\n\r\n if (!$this->canSendEachOther($userid, $fromUserid)) return false;\r\n\r\n $conversation = $this->conversationRepository->ensureConnection($userid, $fromUserid);\r\n\r\n $photo = '';\r\n if ($image) {\r\n $photo = $this->photoRepository->upload($image, [\r\n 'path' => 'users/'.$fromUserid,\r\n 'slug' => 'messages',\r\n 'userid' => $fromUserid\r\n ]);\r\n\r\n }\r\n\r\n $message = $this->model->newInstance();\r\n $message->text = \\Hook::fire('filter-text', sanitizeText($text));\r\n $message->sender = sanitizeText($fromUserid);\r\n $message->receiver = sanitizeText($userid);\r\n $message->image = $photo;\r\n $message->conversation_id = $conversation->id;\r\n $message->save();\r\n\r\n $this->event->fire('message.send', [$message]);\r\n $this->realTimeRepository->add($userid, 'message');\r\n\r\n return $message;\r\n }", "function send_msg() {\r\n\r\n\t\tif($this->session->userdata('stud_id') == FALSE ) {\r\n\t\t\tredirect('students','refresh');\r\n\t\t}\r\n\r\n\r\n\r\n\t\t// inputs\r\n\t\t$msg = $this->input->post('msg', true);\r\n\t\t$to = $this->input->post('to_id', true); //hidden input based on the ID of the professor\r\n\t\t$conversation_id = $this->input->post('conversation_id', true); //hidden input of the conversation id\r\n\r\n\t\tif( !empty($msg) ) {\r\n\t\t\t// DATA\r\n\t\t\t$data = [\r\n\t\t\t\t'conversation_id' => $conversation_id,\r\n\t\t\t\t'msg' => trim($msg),\r\n\t\t\t\t'status' => '0',\r\n\t\t\t\t'from_id' => $this->session->userdata('stud_id'),\r\n\t\t\t\t'to_id' => $to\r\n\t\t\t];\r\n\r\n\t\t\t// add DATA to DB\r\n\t\t\t$new_data = $this->crud->add('msg', $data);\r\n\r\n\t\t\tif( $new_data ) { //if added successfully\r\n\t\t\t\t$response = true;\r\n\t\t\t} \r\n\t\t}\r\n\r\n\t\techo json_encode(['sent', $response]);\r\n\t}", "public function sent_message()\n\t{\n\t\t$this->permiso_model->need_alumno_permition_level();\n\t\t\n\t\t$chat_id = $this->input->post('chat_id');\n\t\t$text = $this->input->post('text');\n\t\t$username = $this->input->post('username');\n\n\t\tif ($text) {\n\t\t\t$this->load->model('chat_model');\n\t\t\t$pizarra = $this->chat_model->update_content($chat_id,$text,$username);\n\t\t}\n\n\t}", "public function SendMessageWithUserContext ( $to, $text, $usercontext ) \r\n\t{\r\n\t\t$FormParams = array ( \t'username'=>$this->Username,\r\n\t\t\t\t\t'password'=>$this->Password,\r\n\t\t\t\t\t'to'=>$to,\r\n\t\t\t\t\t'usercontext'=>$usercontext ,\r\n\t\t\t\t\t'text'=>$text,\r\n\t\t\t\t\t'maxconcat'=>$this->MaxConCatMsgs );\r\n\r\n\t\t$FormData = http_build_query($FormParams, '', '&');\r\n\r\n\t\t$Response = $this->IntelliSMS_MakeHTTPRequest ( $FormData, $to );\r\n\r\n\t\t$SendStatusCollection = $this->IntelliSMS_ParseHTTPResponse ( $Response, $to );\r\n\r\n\t\treturn $SendStatusCollection;\r\n\t}", "public static function send_message(\n $to = 0,\n $message,\n $link = \"\",\n $otherVariables = array()\n ) {\n if ($to instanceof Member) {\n $to = $to->TwitterID;\n }\n $member = Member::currentUser();\n if ($member) {\n if ($twitterClass = self::get_twitter_class()) {\n $twitterDetails = self::is_valid_user($to);\n if (!empty($twitterDetails[\"screen_name\"])) {\n $toScreenName = $twitterDetails[\"screen_name\"];\n $message = trim(strip_tags(stripslashes($message)));\n $message = \"@$toScreenName \".$message.\" \".$link;\n $twitterClass->statusesUpdate($message);\n //followers can also get a direct message\n $followers = self::get_list_of_friends(-1);\n $isFollower = false;\n foreach ($followers as $follower) {\n if ($follower[\"id\"] == $to) {\n $isFollower = true;\n }\n }\n if ($isFollower) {\n $text = $message.\" \".$link;\n $userId = $to;\n $includeEntities = false;\n //returns the user's details as an array if sent successfully\n //and a string with error message if sent unsuccessfully\n $outcome = $twitterClass->directMessagesNew($userId, $screenName = null, $text);\n if (is_array($outcome)) {\n return true;\n } else {\n SS_Log::log($outcome, SS_Log::NOTICE);\n }\n }\n return true;\n } else {\n SS_Log::log(\"Twitter user not found\", SS_Log::NOTICE);\n }\n }\n }\n return false;\n }", "function sendmessage($to,$title,$message) {\r\n $to = $this->getuserid($to);\r\n $sql = \"INSERT INTO messages SET `to` = '\".$to.\"', `from` = '\".$this->userid.\"', `title` = '\".$title.\"', `message` = '\".$message.\"', `created` = NOW()\";\r\n return (@mysql_query($sql)) ? true:false;\r\n }", "public function sendMessage(\n $userMessageMode,\n $userFrom,\n $userTo,\n $body,\n $title,\n $thread = null,\n $item = null,\n $transaction = null,\n $type = MessageThreadType::GENERIC\n ) {\n $userFrom = \\User::resolve($userFrom);\n $userTo = \\User::resolve($userTo);\n\n $message = new \\Message();\n\n if ($transaction != null) {\n $message->setTransaction($transaction);\n }\n\n if ($thread != null) {\n $thread = \\MessageThread::resolve($thread);\n } else {\n $thread = new \\MessageThread();\n $thread->setType($type);\n }\n\n if ($item != null) {\n $item = \\Item::resolve($item);\n $message->setReferenceItem($item->getItemId());\n }\n\n $message->setTargetUser($userTo->getUserId());\n $message->setSourceUser($userFrom->getUserId());\n\n $message->setBody($body);\n $message->setTitle($title);\n $message->setSourcePortal($userFrom->getPortalId());\n\n $message->setSourceDescription\n (\n $userFrom->getUserProfile()->getFullName()\n );\n\n $message->setSent(date('Y-m-d H:i:s'));\n $message->setSourceOrganisation($userFrom->getOrganisationId());\n\n if (!$message->save()) {\n $this->appendMessageEx($message);\n } else {\n if ($transaction != null) {\n $thread->setTransaction($transaction);\n }\n\n $thread->setStartedByUser($message->getSourceUser());\n $thread->setFirstRecipientUser($message->getTargetUser());\n\n if ($item != null && $item->getState() == ItemState::ARRANGING && $thread->getByArrangementId() == null) {\n $thread->setByArrangementId($item->getItemId());\n }\n\n if (!$thread->save()) {\n $this->appendMessageEx($thread);\n } else {\n $thread->addMessage($message);\n }\n }\n\n if ($this->hasMessages()) {\n return false;\n }\n\n if ($userMessageMode != UserMessageMode::MESSAGE_ONLY) {\n if ($userMessageMode == UserMessageMode::MESSAGE_AND_ALERT\n || $userMessageMode == UserMessageMode::MESSAGE_AND_EMAIL_AND_ALERT\n ) {\n $notice = new Notification();\n if (!$notice->addNotification(\n $userTo,\n $title,\n $body,\n '/alertcentre/view/' . $thread->getThreadId(),\n $transaction\n )\n ) {\n $this->appendMessageEx($notice);\n return false;\n }\n }\n\n if ($userMessageMode == UserMessageMode::MESSAGE_AND_EMAIL_AND_ALERT\n || $userMessageMode == UserMessageMode::MESSAGE_AND_EMAIL\n ) {\n\n UserEx::ForceActivePortalForUserQueries($userTo->getPortalId());\n $profile = $userTo->getUserProfile();\n $toEmail = $profile->getEmail();\n UserEx::ForceActivePortalForUserQueries();\n if ($toEmail == null) {\n $this->appendMessageEx(_g('The user has no available email address to send to'));\n } else {\n $email = new EmailUtility();\n if (!$email->sendGenericEmailMessage($toEmail, $body, $title, $userFrom->getOrganisation())) {\n $this->appendMessageEx($email);\n return false;\n }\n }\n }\n }\n\n return $thread;\n }", "public function conversation($user_to = FALSE, $job_id = FALSE, $conversation_id = FALSE) {\n\t\t// Must also check if login user is lawyer or client, and add the necessary validation.\n\t\tif(!$this->messaging->has_conversation_access($conversation_id, $job_id, $this->loggedUser)) {\n\t\t\techo \"<h2>You don't have access to this message</h2>\";\n\t\t\texit();\n\t\t}\n\n\t\tif($user_to == $this->loggedUser) {\n\t\t\techo \"<h2>System does not allow you to chat with yourself, kindly choose a different user</h2>\";\n\t\t\texit();\n\t\t}\n\n\t\t$user_to_info = $this->user->get_user_info($user_to);\n\t\t$job_info = $this->messaging->get_job_info($job_id);\n\t\t$conversation_info = $this->messaging->get_conversation_info($job_id);\n\t\t$logged_user_info = $this->user->get_user_info($this->loggedUser);\n\n\t\tif(!$job_info) {\n\t\t\techo \"<h2>Job you are trying to discuss does not exist</h2>\";\n\t\t\texit();\n\t\t}\n\n\t\tif(!$user_to_info) {\n\t\t\techo \"<h2>User you are trying to contact does not exist</h2>\";\n\t\t\texit();\n\t\t}\n\n\t\tif($this->messaging->count_unread_message($conversation_id, $this->loggedUser)) {\n\t\t\t$this->messaging->tag_message_as_read($conversation_id, $this->loggedUser);\n\t\t}\n\n\t\t$data['is_mobile'] = $this->isMobile();\n\t\t$data['room_name'] = $conversation_info->room_name; // this should be change and save on database, use only for testing\n\t\t$data['user_to'] = $user_to;\n\t\t$data['job_id'] = $job_id;\n\t\t$data['loggedUser'] = $this->loggedUser;\n\t\t$data['user_name'] = $logged_user_info->first_name;\n\t\t$data['messages'] = $this->_clean_message($this->messaging->get_messages($conversation_id));\n\t\t$data['conversation_id'] = $conversation_id;\n\t\t$data['client_name'] = $user_to_info->first_name.\" \".$user_to_info->last_name;\n\t\t$data['job_name'] = (isset($job_info->title)) ? $job_info->title : \"N/a\";\n\t\t$data['conversation_list'] = $this->messaging->get_conversations($this->loggedUser);\n\n\t\t$this->load->template(\"messaging/chat\", $data);\n\t}", "public function chatUser(Request $request, User $toUser)\n {\n\n $this->validate($request, ['text' => 'required']);\n $currentUser = Auth::user();\n\n if ($currentUser->id == $toUser->id) {\n return ['status' => false, 'message' => 'You cannot send a message to yourself.'];\n }\n $message = Message::create([\n 'from_user_id' => $currentUser->id,\n 'to_user_id' => $toUser->id,\n 'text' => $request->input('text'),\n ]);\n\n return ['status' => true, 'message' => $message];\n }", "public function sendMessage() {\n $iUserId = Session::get('user_id');\n $oUser = UserUser::find($iUserId);\n // pr(Request::method());exit;\n // if (Request::method() == 'POST') {\n $this->params = trimArray(Input::except('user_type', '_token'));\n // echo json_encode($this->params);exit;\n $iUserType = Input::get('user_type');\n $aReceivers = $this->getReceivers($iUserType);\n if (!count($aReceivers)) {\n return Response::json(['success' => 0, 'msg' => '没有收信人!']);\n }\n $this->model = App::make('MsgMessage');\n $this->model->sender_id = $iUserId;\n $this->model->sender = Session::get('username');\n $this->model->type_id = MsgType::PRIVATE_MSG_TYPE;\n $bSucc = $this->saveData();\n if (!$bSucc) {\n // $this->langVars['reason'] = & $this->model->getValidationErrorString();\n return Response::json(['success' => 0, 'msg' => '发送消息失败!']);\n }\n $aParams = $this->generateSyncParams( $aReceivers );\n // pr($aParams);exit;\n if (!$aParams) return Response::json(['success' => 0, 'msg' => '发送消息失败!']);\n return $this->saveMsgToUsers($aParams);\n // } else {\n // $aParent = null;\n // $aChildren = null;\n // if (! Session::get('is_top_agent')) {\n // $aParent = $oUser->getDirectParent()->toArray();\n // }\n // if (! Session::get('is_player')) {\n // $aChildren = $oUser->getUsersBelongsToAgent()->toArray();\n\n // }\n // $sJsonParent = json_encode([$aParent]);\n // $sJsonChildren = json_encode($aChildren);\n // $this->setVars(compact('sJsonParent', 'sJsonChildren', 'aParent'));\n // // pr($sJsonParent);\n // // pr($sJsonChildren);\n // // exit;\n // return $this->render();\n // }\n }", "function send_sms_message($userId, $messageDetails)\n\t{\n\t\tlog_message('debug', '_messenger/send_sms_message');\n\t\tlog_message('debug', '_messenger/send_sms_message:: [1] userId='.$userId.' messageDetails='.json_encode($messageDetails));\n\t\t\n\t\t$isSent = false;\n\t\tif(check_sending_settings($this, $userId, 'sms'))\n\t\t{\n\t\t\t$messageDetails['emailfrom'] = NOREPLY_EMAIL;\n\t\t\t$messageDetails['fromname'] = SITE_GENERAL_NAME;\n\t\t\t\n\t\t\tif(!empty($messageDetails['telephone']))\n\t\t\t{\n\t\t\t\t#Attempt sending by SMS and then by API\n\t\t\t\t$domain = $this->_query_reader->get_row_as_array('get_provider_email_domain', array('telephone'=>$messageDetails['telephone'], 'user_id'=>$userId)); \n\t\t\t\t$providerEmailDomain = !empty($domain['email_domain'])? $domain['email_domain']: '';\n\t\t\t\t# if domain is provided, send SMS by email\n\t\t\t\tif(!empty($providerEmailDomain))\n\t\t\t\t{\n\t\t\t\t\t$m['emailaddress'] = $messageDetails['telephone'].'@'.$providerEmailDomain;\n\t\t\t\t\t$m['emailfrom'] = NOREPLY_EMAIL;\n\t\t\t\t\t$m['subject'] = $messageDetails['subject'];\n\t\t\t\t\t$m['details'] = limit_string_length($messageDetails['sms'],150,FALSE);\n\t\t\t\t\tif(!empty($messageDetails['__format'])) $m['__format'] = $messageDetails['__format'];\n\t\t\t\t\t\n\t\t\t\t\t$isSent = $this->email($m, (!empty($messageDetails['__method'])? $messageDetails['__method']: 'server'));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t#Else use the SMS-Global gateway to send the SMS\n\t\t\tif(!$isSent && !empty($messageDetails['telephone']) && !empty($messageDetails['sms']))\n\t\t\t{\n\t\t\t\t$this->load->library('Sms_global', array('user'=>SMS_GLOBAL_USERNAME, 'pass'=>SMS_GLOBAL_PASSWORD, 'from'=>SMS_GLOBAL_VERIFIED_SENDER)); \n\t\t\t\t\n\t\t\t\t$this->sms_global->to($messageDetails['telephone']);\n\t\t\t\t$this->sms_global->from(SMS_GLOBAL_VERIFIED_SENDER);\n\t\t\t\t$this->sms_global->message(limit_string_length($messageDetails['sms'],150,FALSE));\n\t\t\t\t$this->sms_global->send();\n\t\t\t\t\n\t\t\t\t# only use this to output the message details on screen for debugging\n\t\t\t\t#$this->sms_global->print_debugger(); \n\t\t\t\t\n\t\t\t\t$isSent = !empty($this->sms_global->get_sms_id())? true: false; \n\t\t\t}\n\t\t\n\t\t\t\t\n\t\t\t#Record messsage sending event\n\t\t\t$this->log_message_event($userId, $isSent, 'sms__message_sent', $messageDetails);\n\t\t}\n\t\tlog_message('debug', '_messenger/send_sms_message:: [2] isSent='.$isSent);\n\t\t\n\t\treturn $isSent;\n\t}", "function sendMessage()\n {\n global $CONF, $member;\n\n $error = $this->validateMessage();\n\n if ( $error != '' )\n {\n return array('message' => $error);\n }\n\n if ( !$member->isLoggedIn() )\n {\n $fromMail = postVar('frommail');\n $fromName = _MMAIL_FROMANON;\n }\n else\n {\n $fromMail = $member->getEmail();\n $fromName = $member->getDisplayName();\n }\n\n $tomem = new MEMBER();\n $tomem->readFromId(postVar('memberid') );\n\n $message = _MMAIL_MSG . ' ' . $fromName . \"\\n\"\n . '(' . _MMAIL_FROMNUC. ' ' . $CONF['IndexURL'] .\") \\n\\n\"\n . _MMAIL_MAIL . \" \\n\\n\"\n . postVar('message');\n $message .= getMailFooter();\n\n $title = _MMAIL_TITLE . ' ' . $fromName;\n\n @Utils::mail($tomem->getEmail(), $title, $message, 'From: '. $fromMail);\n\n if ( postVar('url') )\n {\n redirect(postVar('url') );\n }\n else\n {\n $CONF['MemberURL'] = $CONF['IndexURL'];\n\n if ( $CONF['URLMode'] == 'pathinfo' )\n {\n $url = createLink('member', array('memberid' => $tomem->getID(), 'name' => $tomem->getDisplayName() ) );\n }\n else\n {\n $url = $CONF['IndexURL'] . createMemberLink($tomem->getID());\n }\n\n redirect($url);\n }\n\n exit;\n }", "public function replyAction()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$user = Application_Model_User::getAuth();\n\n\t\t\tif ($user == null)\n\t\t\t{\n\t\t\t\tthrow new RuntimeException('You are not authorized to access this action');\n\t\t\t}\n\n\t\t\t$id = $this->_request->getPost('id');\n\n\t\t\tif (!v::intVal()->validate($id))\n\t\t\t{\n\t\t\t\tthrow new RuntimeException('Incorrect user ID value: ' .\n\t\t\t\t\tvar_export($id, true));\n\t\t\t}\n\n\t\t\t$conversationModel = new Application_Model_Conversation;\n\n\t\t\tif (!$conversationModel->checkId($id, $conversation))\n\t\t\t{\n\t\t\t\tthrow new RuntimeException('Incorrect message ID value: ' .\n\t\t\t\t\tvar_export($id, true));\n\t\t\t}\n\n\t\t\tif ($conversation->from_id != $user['id'] &&\n\t\t\t\t$conversation->to_id != $user['id'])\n\t\t\t{\n\t\t\t\tthrow new RuntimeException('You are not authorized to access this action');\n\t\t\t}\n\n\t\t\t$body = $this->_request->getPost('message');\n\n\t\t\tif (!v::stringType()->length(1, 65535)->validate($body))\n\t\t\t{\n\t\t\t\tthrow new RuntimeException('Incorrect body value: ' .\n\t\t\t\t\tvar_export($body, true));\n\t\t\t}\n\n\t\t\t$receiverId = $user['id'] == $conversation->from_id ? $conversation->to_id :\n\t\t\t\t$conversation->from_id;\n\n\t\t\t(new Application_Model_ConversationMessage)->insert([\n\t\t\t\t'conversation_id' => $id,\n\t\t\t\t'from_id' => $user['id'],\n\t\t\t\t'to_id' => $receiverId,\n\t\t\t\t'body' => $body,\n\t\t\t\t'is_first' => 0,\n\t\t\t\t'is_read' => 0,\n\t\t\t\t'created_at' => new Zend_Db_Expr('NOW()'),\n\t\t\t\t'status' => 0\n\t\t\t]);\n\n\t\t\t$response = [\n\t\t\t\t'status' => 1,\n\t\t\t\t'message' => [\n\t\t\t\t\t'receiver_id' => $receiverId,\n\t\t\t\t\t'receiver_read' => 0,\n\t\t\t\t\t'reply_text' => $body,\n\t\t\t\t\t'created' => (new DateTime)->setTimezone(\n\t\t\t\t\t\tApplication_Model_User::getTimezone($user))\n\t\t\t\t\t\t->format(My_Time::OUTPUT),\n\t\t\t\t\t'sender' => [\n\t\t\t\t\t\t'name' => $user['Name'],\n\t\t\t\t\t\t'image' => $this->view->baseUrl(\n\t\t\t\t\t\t\tApplication_Model_User::getThumb($user, '55x55'))\n\t\t\t\t\t]\n\t\t\t\t]\n\t\t\t];\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t$response = [\n\t\t\t\t'status' => 0,\n\t\t\t\t'message' => $e instanceof RuntimeException ?\n\t\t\t\t\t$e->getMessage() : 'Internal Server Error'\n\t\t\t];\n\t\t}\n\n\t\t$this->_helper->json($response);\n\t}", "private function send(User $user, MessageInterface $message)\n {\n if ($success = $message->send()) {\n Userlog::log('mail', $message->getSubject(), $user->id);\n } else {\n $this->stdout(\"Mail failed for user \".$user->username.\" (\".$user->email.\")\\n\", Console::BOLD, Console::FG_RED);\n }\n\n return $success;\n }", "public function sentMessage() {\n $user = $this->ion_auth->user()->row();\n $id = $user->id;\n $data['massage'] = $this->common->getWhere22('massage', 'sender_id', $id, 'sender_delete', 1);\n\n $this->load->view('temp/header');\n $this->load->view('sent', $data);\n $this->load->view('temp/footer');\n }", "public function send_message($to, $message, $subject, $respond = 0){\n\t\t$from = $_SESSION['user_id']; // ID of a user sending a message\n\n\t\t$message = $this->_validate_message($message); // validate message to see if it safe, to be passed to the database\n\n\t\tif($respond == 0){\n\t\t\t$query = \"INSERT INTO \" . TBL_MESSAGES . \" (user_to, user_from, subject, message) VALUES(\" . $to . \", \" . $from . \", '\" . $subject . \"', '\" . $message . \"')\";\n\t\t}else{\n\t\t\t$query = \"INSERT INTO \" . TBL_MESSAGES . \" (user_to, useer_from, subject, message, respond) VALUES(\" . $to . \", \" . $from . \", '\" . $subject . \"', '\" . $message . \"',\" . $respond . \")\";\n\t\t}\n\t\tif($this->validate_message($message)){\n\t\t\tmysql_query($query);\n\t\t\t// uncomment this function out if you want to email a user of a new message\n\t\t\t//$this->_email_user_of_new_message($to,$from,$subject);\n\t\t\treturn TRUE;\n\t\t}else{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function send_message($user_id, $subject, $body){\n\t\t$mixi_id = get_user_meta($user_id, $this->umeta_id, true);\n\t\t$token = $this->get_new_token($this->refresh_token);\n\t\tif($mixi_id && $token){\n\t\t\t$endpoint = \"http://api.mixi-platform.com/2/messages/@me/@self/@outbox?oauth_token={$token}&format=json\";\n\t\t\t$request = json_encode(array(\n\t\t\t\t'title' => $subject,\n\t\t\t\t'body' => $body,\n\t\t\t\t'recipients' => array($mixi_id)\n\t\t\t));\n\t\t\t$this->get_response($endpoint, $request, 'POST', true);\n\t\t}\n\t}", "public function add_message($to_user, $content){\n $my_id = $this->session->customer_id;\n //check if a conversation between 2 users started\n $this->db->select('chat_id')->where(['from_user'=>$my_id, 'to_user'=>$to_user])\n ->or_where('(from_user = '.$this->db->escape($to_user).' AND to_user = '.$this->db->escape($my_id).')');\n $chat_id = $this->db->get('messages',0,1)->row()->chat_id;\n //start a new conversation if a conversation did not start yet\n if(count($chat_id) == 0) {$chat_id = ($this->db->select_max('chat_id')->get('messages')->row()->chat_id+1); }\n //send a message data\n $message = new stdClass();\n $message->chat_id = $chat_id;\n $message->from_user = $my_id;\n $message->to_user = $to_user;\n $message->content = $content;\n //save a message to DB\n $this->db->insert('messages',$message);\n }", "public function sendMessage(User $user, SendMessage $req)\n {\n $this->repo->create(\n $req->get('content'),\n Auth::user()->id,\n $user->id\n );\n // redirection route nommé avec entrée utilisateur\n return redirect()->route('messages.show', ['id' => $user]);\n }", "public function sendMessage()\n\t{\t\t\n\t\t$this->Checklogin();\n\t\tif (isset($_POST ['btnSubmit']))\n\t\t{\t\n\t\t\t$data ['admin_section']='Send_message';\n\t\t\t$id=$this->send_message_model->addSendMessage();\n\t\t\tif ($id)\n\t\t\t{\n\t\t\t\t$this->session->set_flashdata('success','Message has been sent successfully.');\n\t\t\t\tredirect('head/send_message');\n\t\t\t} \n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->session->set_flashdata('error','Unable to sent message.');\n\t\t\t\tredirect('head/send_message');\n\t\t\t}\n\t\t} \n\t\telse\n\t\t{\n\t\t\tredirect('head/send_message');\n\t\t}\n\t}", "public function sendmessage(){\n\t\t\t$receiver = strtolower($_POST['receiver']);\n\t\t\t$message = $_POST['message'];\n\t\t\t$temp = $this->session->all_userdata();\n\t\t\t$dt = date(\"D M d, Y G:i\");\t// get date time\n\t\t\t$this->db->select_max('id');\n\t\t\t$query = $this->db->get('message');\n\t\t\tforeach($query->result_array() as $row)\n\t\t\t\t$id = $row['id']+1;\n\t\t\t$data = array('id'=>$id,'sender'=>$temp['username'],'time'=>$dt,'receiver'=>$receiver,'message'=>$message); // put data to array\n\t\t\t$this->load->model('member_model');\t\n\t\t\t$this->member_model->sendmessage($data); // Send message\n\t\t\techo\"<script language='javascript'>\n\talert('success');\n window.location.href = '../../pages/message';\n</script>\";\t\n\t\t}", "public function sendMessage();", "public function SendMessage ( $to, $text, $from ) \r\n\t{\r\n\t\t$FormParams = array ( \t'username'=>$this->Username,\r\n\t\t\t\t\t'password'=>$this->Password,\r\n\t\t\t\t\t'to'=>$to,\r\n\t\t\t\t\t'from'=>$from,\r\n\t\t\t\t\t'text'=>$text,\r\n\t\t\t\t\t'maxconcat'=>$this->MaxConCatMsgs );\r\n\r\n\t\t$FormData = http_build_query($FormParams, '', '&');\r\n\r\n\t\t$Response = $this->IntelliSMS_MakeHTTPRequest ( $FormData );\r\n\r\n\t\t$SendStatusCollection = $this->IntelliSMS_ParseHTTPResponse ( $Response, $to );\r\n\r\n\t\treturn $SendStatusCollection;\r\n\t}", "public function sendMessageUs()\n\t{\n\t\t\n\t\t//filters the inputted email if its valid\n\t\t$acm_check_email = filter_input(INPUT_POST, 'acm_message_email', FILTER_VALIDATE_EMAIL);\n\n\t\t//filters the message for any html tags\n\t\t$_POST['acm_message'] = filter_input(INPUT_POST, 'acm_message', \n\t\t\tFILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_FLAG_STRIP_HIGH);\n\t\t\n\t\t\n\t\tif($acm_check_email)\n\t\t{\n\n\t\t\t$message_mail = $this->getServerDetails();\n\n\t\t\t$message_mail->ClearReplyTos();\n\t \t$message_mail->addReplyTo($_POST['acm_message_email'], $_POST['acm_message_name']);\n\t\t\t$message_mail->setFrom('info@airlandcargomovers.com', 'ACM-SATMS');\n\t\t\t$message_mail->addAddress('tancioco.eron@yahoo.com', 'ACM Customer Support');\n\t\t\t$message_mail->Subject = 'Customer Response from ' . $_POST['acm_message_name'];\n\t\t\t$message_mail->Body = $_POST['acm_message'];\n\n\t\t\tif(!$message_mail->send()) \n\t\t\t{\n\t\t\t return null;\n\t\t\t} \n\t\t\telse \n\t\t\t{\n\t\t\t return 'Message has been sent.';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn null;\n\t\t}\t\n\t}", "public function sendMessage()\n {\n $message = ['danger' => 'An error has occurred. Please try again.'];\n\n if (Request::isMethod('post')) {\n $rules = [\n 'mobile_from' => 'required',\n 'mobile_to' => 'required',\n 'sms_message' => 'required|max:160',\n ];\n\n $validator = Validator::make(Input::all(), $rules);\n if ($validator->passes()) {\n $user = Sentry::getUser();\n $status = $this->sms->sendMessage($user->id, Input::get('mobile_from'), Input::get('mobile_to'), Input::get('sms_message'));\n\n if ('success' == $status['status']) {\n $message = ['success' => $status['message']];\n } else {\n $message = ['danger' => $status['message']];\n\n return Redirect::to('dashboard')\n ->withMessage($message)\n ->withInput();\n }\n } else {\n return Redirect::to('dashboard')\n ->withMessage($message)\n ->withErrors($validator)\n ->withInput();\n }\n }\n\n return Redirect::to('dashboard')->withMessage($message);\n }", "public function sendMessage($fromuserid, $touserid, $subject, $message, $attachments, $external_recipients = null, $attachmentTag) {\r\n\t\t// sanity checks\r\n\t\tif (empty($fromuserid) || empty($touserid)) return false;\r\n\t\tif (empty($subject)) $subject = \"(\".$this->lh->translationFor(\"no_subject\").\")\";\r\n\t\tif (empty($message)) $message = \"(\".$this->lh->translationFor(\"no_message\").\")\";\r\n\t\t\r\n\t\t// first send to external recipients (if any), because we are moving them later with the call to move_uploaded_file.\r\n\t\tif (!empty($external_recipients)) {\r\n\t\t\trequire_once('MailHandler.php');\r\n\t\t\t$mh = \\creamy\\MailHandler::getInstance();\r\n\t\t\t$result = $mh->sendMailWithAttachments($external_recipients, $subject, $message, $attachments, $attachmentTag);\r\n\t\t}\r\n\t\t\r\n\t\t// Now store the message in our database.\r\n\t\t// try to store the inbox message for the target user. Start transaction because we could have attachments.\r\n\t\t$this->dbConnector->startTransaction();\r\n\t\t$date = $this->dbConnector->now();\r\n\t\t// message data.\r\n\t\t$data = array(\r\n\t\t\t\"user_from\" => $fromuserid,\r\n\t\t\t\"user_to\" => $touserid,\r\n\t\t\t\"subject\" => $subject,\r\n\t\t\t\"message\" => $message,\r\n\t\t\t\"date\" => $date,\r\n\t\t\t\"message_read\" => 0,\r\n\t\t\t\"favorite\" => 0\r\n\t\t);\r\n\t\t// insert the new message in the inbox of the receiving user.\r\n\t\t$inboxmsgid = $this->dbConnector->insert(CRM_MESSAGES_INBOX_TABLE_NAME, $data);\r\n\t\tif (!$inboxmsgid) { $this->dbConnector->rollback(); return false; }\r\n\t\t\r\n\t\t// insert the new message in the outbox of the sending user.\r\n\t\t$data[\"message_read\"] = 1;\r\n\t\t$outboxmsgid = $this->dbConnector->insert(CRM_MESSAGES_OUTBOX_TABLE_NAME, $data);\r\n\t\tif (!$outboxmsgid) { $this->dbConnector->rollback(); return false; }\r\n\t\t\r\n\t\t// insert into timeline table \r\n\t\t$dataTL = array(\r\n \"type_id\" => $inboxmsgid,\r\n \"type\" => \"message\",\r\n\t\t\t\"user_id\" => $touserid,\r\n\t\t\t\"user_from_id\" => $fromuserid,\r\n\t\t\t\"title\" => $subject,\r\n\t\t\t\"description\" => $message,\r\n\t\t\t\"start_date\" => $date\r\n\t\t);\r\n\t\t$msgidTL = $this->dbConnector->insert(CRM_TIMELINE_TABLE_NAME, $dataTL);\r\n\t\r\n\t\t// insert attachments (if any).\r\n\t\tif (!$this->addAttachmentsForMessage($inboxmsgid, $outboxmsgid, $fromuserid, $touserid, $attachments, $attachmentTag)) {\r\n\t\t\t$this->dbConnector->rollback();\r\n\t\t\treturn false;\t\t\t\r\n\t\t}\r\n\t\t// success! commit transactions.\r\n\t\t$this->dbConnector->commit();\r\n\t\treturn true;\r\n\t}", "function mail($toUser, $subject, $message) {\n\t\t$to = $toUser->displayName . ' <'.$toUser->email.'>';\n\t\t$from = $this->settings['application']['senderEmail'];\n\t\t$header = 'From: ' . $from . '\\r\\n' .\n\t\t\t\t'Reply-To: ' . $from . '\\r\\n';\n\t\t// todo activate\n\t\t//$isSent = @mail($to, $subject, $message, $header);\n\t\t$isSent = true;\n\n\t\treturn $isSent;\n\t}", "function send_system_message($userId, $messageDetails)\n\t{\n\t\tlog_message('debug', '_messenger/send_system_message');\n\t\tlog_message('debug', '_messenger/send_system_message:: [1] userId='.$userId.' messageDetails='.json_encode($messageDetails));\n\t\t\n\t\t$isSent = false;\n\t\t\n\t\tif(check_sending_settings($this, $userId, 'system', (!empty($messageDetails['allow_message_code'])? $messageDetails['allow_message_code']: 'all') ))\n\t\t{\n\t\t\t#Make the sender the no-reply user if no sender id is given\n\t\t\t$messageDetails['senderid'] = !empty($messageDetails['senderid'])? $messageDetails['senderid']: '2';\n\t\t\t\n\t\t\t# 1. Record the message exchange to be accessed by the recipient in their inbox\n\t\t\t$isSent[0] = $this->_query_reader->run('record_message_exchange', array('template_code'=>(!empty($messageDetails['code'])? $messageDetails['code']: 'user_defined_message'), 'details'=>htmlentities($messageDetails['details'], ENT_QUOTES), 'subject'=>htmlentities($messageDetails['subject'], ENT_QUOTES), 'attachment_url'=>(!empty($messageDetails['fileurl'])? substr(strrchr($messageDetails['fileurl'], \"/\"),1): ''), 'sender_id'=>$messageDetails['senderid'], 'recipient_id'=>$userId));\n\t\t\t\n\t\t\t# 2. copy admin if required\n\t\t\tif(!empty($messageDetails['copyadmin']) && $messageDetails['copyadmin'] == 'Y')\n\t\t\t{\n\t\t\t \t$isSent[1] = $this->_query_reader->run('record_message_exchange', array('template_code'=>(!empty($messageDetails['code'])? $messageDetails['code']: 'user_defined_message'), 'details'=>htmlentities($messageDetails['details'], ENT_QUOTES), 'subject'=>htmlentities($messageDetails['subject'], ENT_QUOTES), 'attachment_url'=>(!empty($messageDetails['fileurl'])? substr(strrchr($messageDetails['fileurl'], \"/\"),1): ''), 'sender_id'=>$messageDetails['senderid'], 'recipient_id'=>implode(\"','\", $this->get_admin_users()) ));\n\t\t\t}\n\t\t\t\n\t\t\t$isSent = get_decision($isSent);\n\t\t}\n\t\tlog_message('debug', '_messenger/send_system_message:: [2] isSent='.$isSent);\n\t\t\n\t\treturn $isSent;\n\t}", "public function addMessage( $stream, $text_message, $from_user_id, $to_user_id ){\n\t\t\n\t\t$insertMessageStatus = array();\n\n\t\t$messageData = array(\n\t\t\t'stream'\t\t=> $stream,\n\t\t\t'text_message'\t=> $text_message,\t\t\n\t\t\t'from_user_id'\t=> $from_user_id,\t\n\t\t\t'to_user_id'\t=> $to_user_id,\t\n\t\t\t);\n\t\t$this->db->insert( 'chat_messages', $messageData );\n\n\t\tif ( $this->db->affected_rows() > 0 ){\n\t\t\t$insertMessageStatus['data']['id'] = $this->db->insert_id();\n\t\t\t$insertMessageStatus['error'] = NO_ERROR;\n\t\t\t$insertMessageStatus['responseMessage'] = \"Text message '$text_message' added successfully\";\n\t\t\treturn $insertMessageStatus;\n\t\t}\n \n\t\t$insertMessageStatus['error'] = UNABLE_TO_INSERT;\n\t\t$insertMessageStatus['responseMessage'] = \"The text message '$text_message' couldn't be added\";\n\t\treturn $insertMessageStatus;\n\n\t}", "function sendMessage($chatId, $text, $replyTo = '', $replyMarkup = '') {\n $data = array(\n 'disable_web_page_preview' => true,\n 'parse_mode' => 'html',\n 'chat_id' => $chatId,\n 'text' => $text,\n 'reply_to_message_id' => $replyTo,\n 'reply_markup' => $replyMarkup\n );\n return makeApiRequest('sendMessage', $data);\n}", "public function sendMessageAction()\n {\n $newMessage = new Messages();\n $newMessage->save($this->user->userName, $_SESSION['groupNameToDisplay'], $_POST['message']);\n }", "function send() {\n\t\t$this->setFromIp($_SERVER['REMOTE_ADDR']);\n\t\t$this->setFromDate(date('Y-m-d H:i:s'));\n\t\t$this->db->setTableName('message');\n\t\t$data = array(\n\t\t\t'body' \t\t\t=> $this->getBody(),\n\t\t\t'image' \t\t=> $this->getImage(),\n\t\t\t'from_type' => $this->getFromType(),\n\t\t\t'from_id' \t=> $this->getFromId(),\n\t\t\t'from_ip' \t=> $this->getFromIp(),\n\t\t\t'from_date' => $this->getFromDate(),\n\t\t\t'to_type' \t=> $this->getToType(),\n\t\t\t'to_id' \t\t=> $this->getToId()\n\t\t);\n\t\t$result = $this->db->insert($data);\n\t\tif ($result) {\n\t\t\t$data = array('is_sent' => 1);\n\t\t\t$messageId = $this->db->getLastInsert();\n\t\t\t$this->resetProperties();\n\t\t\t$this->db->where('id', $messageId);\n\t\t\treturn $db->update('message', $data);\n\t\t}\n\t\treturn false;\n\t}", "function sendMessage($message){\n\t\tglobal $chat_id;\n\t\t$payload_array = array(\n\t\t\t\"chat_id\" => $chat_id,\n\t\t\t\"text\" => $message\n\t\t);\n\t\trequest(\"sendMessage\", $payload_array);\n\t}", "function sendingMessage()\n {\n $send['nickname'] = $_POST['username'];\n $send['text'] = $_POST['user'];\n $send[\"nick\"] = $_POST['username'];\n $this->Chat_model->insert_chat($send);\n $this->load->view(\"chatView\", $this->chatForAllUser());\n }", "public function send()\n {\n $this->users->needLogin();\n if (isset($_POST['msg']))\n {\n foreach ($_POST['msg'] AS $array)\n {\n $std = (object) $array;\n $std->user_id = $_SESSION['user']['user_id'];\n $user = $this->users->get($std->user_id);\n if (($std = $this->chat->checkCommands($std, $user)) !== NULL)\n $this->chat->add($std->user_id, $std->texte, $std->channel);\n }\n $this->poll->addBreak($_SESSION['user']['user_id']);\n }\n }", "function sendSms( $text, $from, $to, &$errMsg)\n {\n\n $user \t= &$this->_params['username'];\n $pw \t= &$this->_params['password'];\n\n //new send a email\n\n //to phonenumber.username.password@suresms.com\n //subject empty\n //msg msg\n\t\t$rec = \"$to.$user.$pw@sms.suresms.com\";\n\n\t\t$success = mail( $rec, '', $text );\n\n\t\tif( $success === false )\n\t\t{\n\t\t\t$errMsg = \"Failed to send sms\";\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n }", "public function SendMessage()\n\t{\t\n\t\t$headers = array(\n\t\t\t'From' => \"\\\"\" . $this->_senderName . \"\\\" <\" . $this->_senderEmail . \">\",\n\t\t\t'To' => $this->_to,\n\t\t\t'Subject' => $this->_subject\n\t\t);\n\t\t\n\t\t$smtp = Mail::factory(\n\t\t\t'smtp',\n\t\t\t\n\t\t\tarray(\n\t\t\t\t'host' \t => $this->_host,\n\t\t\t\t'port' \t => $this->_port,\n\t\t\t\t'auth' \t => true,\n\t\t\t\t'username' => $this->_senderEmail,\n\t\t\t\t'password' => $this->_sederEmailPassword\n\t\t\t)\n\t\t);\n\t\t\n\t\t$mail = $smtp->send($this->_to, $headers, $this->_body);\n\t\t\n // If something is wrong, then show error message\n\t\tif (PEAR::isError($mail))\n\t\t{\n $message = new Message(\"Email Sending Failed\", \"Sorry, Email sending failed. <b>Reason:</b> \" . $mail->getMessage(), \"ui-icon-closethick\");\n $message->ShowMessage();\n\t\t}\n // Otherwise, message sending succssful\n\t\telse\n\t\t{\n $message = new Message(\"Success\", \"Email has been sent successfully.\", \"ui-icon-check\");\n $message->ShowMessage();\n\t\t}\n\t}", "public function sendMessageAction()\n {\n if (isset($_POST['agreement_chk'])) {\n// session_start();\n if (strtolower($_SESSION['code']) == strtolower($_POST['seccode_verify'])) {\n $validate = new Validate();\n $tel = $validate->checkTel($_POST['phone']);\n if ($tel) {\n $message = new Message();\n $code = mt_rand(1000, 9999);\n $expire = $GLOBALS['config']['expire_time'];\n $tempID = $GLOBALS['config']['tempId'];\n $data = array($code, $expire);\n $message->sendTemplateSMS($_POST['phone'], $data, $tempID);\n\n $msg['phone'] = $_POST['phone'];\n $msg['code'] = $code;\n $msg['send_time'] = time();\n $msg_model = Factory::model('Message');\n $ins = $msg_model->insert($msg);\n if ($ins) {\n $this->jump('?c=user&a=MsgRegisterAction', '<i>Succeed to send message !</i>');\n } else {\n $this->jump('?c=user&a=msmAction', \"<b>Error</b>: Failed to send !\");\n }\n } else {\n $this->jump('?c=user&a=msmAction', \"<b>Error</b>: Please enter correct tel !\");\n }\n } else {\n $this->jump('?c=user&a=msmAction', \"<b>Error</b>: Please enter correct verify code !\");\n }\n } else {\n $this->jump('?c=user&a=msmAction', \"<b>Error</b>: Please agree to the user agreement first !\");\n }\n }", "public function actionMessage()\r\n {\r\n if(!Yii::$app->user->isGuest && Yii::$app->request->isAjax) {\r\n\r\n $result['result'] = false;\r\n\r\n $model = new Message;\r\n if ($model->load(Yii::$app->request->post())) {\r\n /* The user who is receiving the message (receiver_id) $receiver\r\n * The user who is sending the message (sender_id) $sender\r\n * Check if it's a number we are receiving and since we are receiving\r\n * a string we convert it to integer\r\n */\r\n $model->save();\r\n $result['result'] = true;\r\n json_encode($result);\r\n }\r\n }\r\n }", "function addMessage($user_id)\n{\n $conversation_id = $_GET['conversation_id'];\n $conversation = Conversation::getConversationForUser($conversation_id, $user_id);\n $content = $_POST['content'];\n $message = new Message();\n $message->setConversationId($conversation_id);\n $message->setUserId($user_id);\n $message->setContent($content);\n Message::createMessage($message);\n\n header('Location: /index.php?action=conversation&sub_action=detail&conversation_id=' . $conversation_id);\n}", "public function actionReply() {\n if (Yii::app()->request->isPostRequest) {\n $body = $_POST['MessageForm']['body'];\n $conv_id = $_POST['MessageForm']['conversation_id'];\n $to = $_POST['MessageForm']['to'];\n $conv = Mailbox::conversation($conv_id);\n\n $reply = new Message;\n $reply->text = $body;\n $reply->conversation_id = $conv->conversation_id;\n $reply->recipients = explode(',', $to);\n $reply->sender_id = user()->id;\n $reply->created = time();\n $reply->crc64 = Message::crc64($body);\n\n //we also check if the message has been replied to a new interlocutor\n $newInterlocutors = array_diff(explode(',', $to), $conv->interlocutorIds);\n if (count($newInterlocutors) > 0) {\n $conv->interlocutors += $newInterlocutors;\n }\n $conv->modified = $reply->created;\n $conv->initiator_restored = Mailbox::INITIATOR_FLAG;\n\n $validate = $reply->validate();\n $validate = $conv->validate() && $validate;\n\n if ($validate) {\n $conv->save();\n $reply->save();\n $message = t('site', 'Your message has been successfully sent.');\n// $user = User::model()->findByPk($reply->sender_id);\n// $sender = GxcHelpers::getDisplayName($reply->sender_id);\n// $image = ($user->user_type == 0) ? $user->profile->selectedImage(100) : $user->cshop->selectedImage(100, 'frontend');\n//\n//\n//\n// $html = \"<li class='message-item clearfix' id='msg-'\" . $reply->message_id . \">\";\n// $html .= \"<div class='thumbnail'>\" . Chtml::link($image, '') . \"</div>\";\n// $html .= \"<div class='data-wrap'>\"; // start data-wrap\n// $html .= \"<div class='top clearfix'>\"; // start top\n// $html .= \"<div class='sender' id='usr-'\" . $reply->sender_id . \">\"; // start sender\n// $html .= $sender;\n// $html .= \"<span>\" . t('site', 'ha risposto:') . \"</span>\";\n// $html .= \"<span class='sender-date'>\" . date(\"j M Y, H:i\", $reply->created) . \"</span>\";\n// $html .= \"</div>\"; //end sender\n// $html .= \"<div class='actions'>\"; // start actions\n//\n// $html .= CHtml::link(t('site', 'Add flag'), 'javascript:void(0)', array('class' => 'msg-btn visible', 'id' => 'addflag'));\n// $html .= CHtml::link(t('site', 'Delete'), 'javascript:void(0)', array('class' => 'msg-btn', 'id' => 'delete'));\n// $html .= CHtml::link(t('site', 'Mark spam'), 'javascript:void(0)', array('class' => 'msg-btn', 'id' => 'markspam'));\n//\n// $html .= \"</div>\"; // end actions\n// $html .= \"<div class='content'>\" . nl2br(makeLinks($reply->text)) . \"</div>\"; // content\n// $html .= \"</div>\"; // end top\n// $html .= \"</div>\"; // end data-wrap\n// $html .= \"</li>\";\n\n// echo json_encode(array(\n// 'success' => $message,\n// 'header' => t('site', 'Conferma!'),\n// 'output' => $html\n// ));\n \n echo json_encode(array(\n 'success' => $message,\n 'header' => t('site', 'Conferma!'),\n ));\n app()->end();\n } else {\n $message = t('site', 'Error while sending the message.');\n echo json_encode(array('error' => $message, 'header' => t('site', 'Errore!')));\n app()->end();\n }\n } else\n throw new CHttpException(400, t('site', 'Invalid request. Please do not repeat this request again.'));\n }", "function send_message()\n {\n $target_path = get_setting(\"timeline_file_path\");\n $files_data = move_files_from_temp_dir_to_permanent_dir($target_path, \"message\");\n $done = false;\n\n if (is_array($this->input->post('to_user_id'))) {\n foreach ($this->input->post('to_user_id') as $receiver) {\n $message_data = array(\n \"from_user_id\" => $this->login_user->id,\n \"to_user_id\" => $receiver,\n \"subject\" => $this->input->post('subject'),\n \"message\" => $this->input->post('message'),\n \"created_at\" => get_current_utc_time(),\n \"files\" => $files_data,\n \"deleted_by_users\" => \"\",\n );\n\n $done = $this->Messages_model->save($message_data);\n }\n }\n\n if ($done) {\n echo json_encode(array(\"success\" => true, 'message' => lang('message_sent')));\n } else {\n echo json_encode(array(\"success\" => false, 'message' => lang('error_occurred')));\n }\n }", "public function sendPmessage($to,$message){\n\t\t$userID=$this->session->userdata('userid');\n\t\t$data=array(\n\t\t 'to_id'=> $to,\n\t\t 'from_id' => $userID,\n\t\t 'time_sent' => date(\"d/m/y H:i:s\"),\n\t\t 'message' => $message\n\t\t);\n\t\t$this->db->insert('emp_message',$data);\n\t}", "function telegram_send_message($chat_id, $message, $parameters = null) {\n $parameters = prepare_parameters($parameters, array(\n 'chat_id' => $chat_id,\n 'text' => $message\n ));\n\n $handle = prepare_curl_api_request(TELEGRAM_API_URI_MESSAGE, 'POST', $parameters, null);\n if($handle === false) {\n Logger::error('Failed to prepare cURL handle', __FILE__);\n return false;\n }\n\n return perform_telegram_request($handle);\n}", "public function sendMessage($user_id, $number, $message, $fake, $channel_id = \"\", $nickname = \"\")\n {\n set_time_limit(0);\n $credits = $this->mwhats->getUserCredits($user_id);\n if ($credits < 1)\n return 2; // credit points is zerooooo!!!!\n $channel = $this->mchannels->getUserChannel($user_id);\n if ($channel_id != \"\")\n $channel = $this->mchannels->getChannelById($channel_id);\n // $msgid = time () . \"_\" . substr ( trim ( $number ), 9 );\n if ($nickname == \"\")\n $nickname = $channel->phone;\n try {\n $w = new WhatsProt(trim($channel->phone), $channel->identity, $nickname, false);\n $w->eventManager()->bind(\"onSendMessage\", array(\n $this,\n \"onSendMessage\"\n ));\n $w->eventManager()->bind(\"onMessageReceivedServer\", array(\n $this,\n \"onMessageReceivedServer\"\n ));\n $w->eventManager()->bind(\"onMessageReceivedClient\", array(\n $this,\n \"onMessageReceivedClient\"\n ));\n $w->eventManager()->bind(\"onLoginFailed\", array(\n $this,\n \"onLoginFailed\"\n ));\n } catch (Exception $e) {\n return \"0\";\n }\n $w->Connect();\n $w->LoginWithPassword(trim($channel->hash));\n if ($this->connected !== false) {\n\n // $this->mwhats->disChannel($channel->channel_id);\n // $w->sendMessageComposing ( trim ( $number ) );\n // $this->mwhats->activeChannel($channel->channel_id);\n if (! is_array($number))\n $number = array(\n $number\n );\n foreach ($number as $num) {\n // $w->sendPresenceSubscription ( trim ( $num ) );\n $w->sendMessageComposing(trim($num));\n $w->sendMessage(trim($num), trim($message), array(\n \"user_id\" => $user_id,\n \"nickname\" => $nickname,\n \"fake\" => $fake\n ));\n // $w->sendMessagePaused ( trim ( $num ) );\n // sleep ( 1 );\n }\n $w->disconnect();\n return true;\n }\n }", "public function sendMessage($conversatonId, $message, $message_html, $message_type)\n {\n if ($conversatonId && $message) {\n if ($this->conversation->existsById($conversatonId)) {\n $message = $this->makeMessage($conversatonId, $message, $message_html, $message_type);\n\n return $message;\n }\n }\n\n return false;\n }", "public function sms($user_id, $push_message)\n {\n try {\n $username = \"Deocabs\";\n $password = \"Deocabs#123\";\n $sender = \"DEOCAB\";\n //$user = User::findOrFail($user_id);\n $mobile = User::where('id', $user_id)->first()->mobile;\n log::alert($mobile);\n log::alert($push_message);\n $final = urlencode($push_message);\n $url = \"login.bulksmsgateway.in/sendmessage.php?user=\" . urlencode($username) . \"&password=\" . urlencode($password) . \"&mobile=\" . urlencode($mobile) . \"&sender=\" . urlencode($sender) . \"&message=\" . urlencode($push_message) . \"&type=\" . urlencode('3');\n log::alert($url);\n $curl = curl_init();\n\n curl_setopt_array($curl, array(\n CURLOPT_URL => $url,\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"GET\",\n CURLOPT_POSTFIELDS => \"\",\n CURLOPT_HTTPHEADER => array(\n \"Postman-Token: c9c6630f-ad5a-40c4-b54c-7f6ec65d3981\",\n \"cache-control: no-cache\"\n ),\n ));\n\n $response = curl_exec($curl);\n $err = curl_error($curl);\n\n curl_close($curl);\n } catch (Exception $e) {\n return $e;\n }\n }", "public function sendMessage()\n\t{\n\t\t$validation = Validator::make(\n\t\t\tInput::all(),\n\t\t\tarray(\n\t\t\t\t'nombre'\t=> 'required|max:30',\n\t\t\t\t'email'\t\t=> 'required|email|max:40',\n\t\t\t\t'telefono'\t=> 'required|digits_between:5,10',\n\t\t\t\t'ciudad'\t=> 'required|max:30',\n\t\t\t\t'medio'\t\t=> 'required|max:50',\n\t\t\t\t'mensaje'\t=> 'required|max:250'\n\t\t\t\t), \n\t\t\tarray(\n\t\t\t\t'required' \t=> 'El :attribute es requerido.',\n\t\t\t\t'max' \t\t=> 'El :attribute no debe tener más de :max caractéres.',\n\t\t\t\t'digits_between'=> 'El :attribute debe contener entre :min y :max dígitos.',\n\t\t\t\t'email' \t\t=> 'El :attribute no es un e-mail valido'\n\t\t\t\t)\n\t\t);\n\n\t\tif($validation->fails()){\n\t\t\treturn Redirect::to('/')->withErrors($validation->errors());\n\t\t}else{\n\t\t\tMail::send('emails.contact-message-mail', array('datos'=>Input::all()), function($message){\n\t\t\t\t$message->to('ventas@nuwork.mx', 'John Smith')->subject('Nuevo Mensaje de Contacto');\n\t\t\t});\n\t\t}\n\t\treturn Redirect::to('/');\n\t}", "function sendToMe(){\n\tglobal $json;\n\tlogin();\n\tif(isset($_POST['username']) && isset($_POST['context']) && isset($_SESSION['verifyCode'])){\n\t\t$username = $_POST['username'];\n\t\t$verifyCode = $_POST['verifyCode'];\n\t\t$context = $_POST['context'];\n\n\t\t$_verifyCode = $_SESSION['verifyCode'];\n\n\t\t$verifyCode = strtolower($verifyCode);\n\t\t$_verifyCode = strtolower($_verifyCode);\n\n\t\tif(strcmp($_verifyCode, $verifyCode) != 0){\n\t\t\treturn output(OUTPUT_ERROR,\"验证码不正确\");\n\t\t}else{\n\t\t\t$ret = sendNewGroupShortMsg(\"【\".$username.\"】给你发送了:\".$context.\"\");\n\t\t\tif(PHONE_DEBUG){\n\t\t\t\tvar_dump($ret);\n\t\t\t}\n\t\t\t$ret = $json->decode($ret);\n\t\t\tif(strcmp($ret->info,\"发送成功\") == 0){\n\t\t\t\treturn output(OUTPUT_SUCCESS,\"发送成功\" );\n\t\t\t}else{\n\t\t\t\treturn output(OUTPUT_ERROR, $ret->info);\n\t\t\t}\n\t\t}\n\t}else{\n\t\treturn output(OUTPUT_ERROR,\"非法操作\");\n\t}\n}", "function sms_send($recipient, $message, $originator)\r\n{\r\n\tif (!$recipient || !$message) {\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\t/*\r\n\t *\tADD CODE FOR SMS SENDING HERE\r\n\t */\r\n\r\n\t// return true or SMS id in case of success\r\n\treturn true; \r\n}", "function telegram_send_message($chat_id, $message, $parameters = null) {\n $parameters = prepare_parameters($parameters, array(\n 'chat_id' => $chat_id,\n 'text' => $message\n ));\n\n $handle = prepare_curl_api_request(TELEGRAM_API_URI_MESSAGE, 'POST', $parameters, null);\n if($handle === false) {\n error_log('Failed to prepare cURL handle');\n return false;\n }\n\n return perform_telegram_request($handle);\n}", "private function post_message($params) {\n\t\tif(isset($params->session) && isset($params->user) && isset($params->message)) {\n\t\t\t$userto = block_gchat_post_message($params->session->id, $params->user->id, $params->message->text);\n\t\t\t\n\t\t\t//If message posted successfully\n\t\t\tif($userto) {\n\t\t\t\t$this->send_data($userto, 'post_message', $params);\n\t\t\t}\n\t\t}\n\t}", "function sms_send($recipient, $message, $originator, &$sms_errors)\n{\n\tif (!$recipient || !$message) {\n\t\treturn false;\n\t}\n\t\n\t/*\n\t *\tADD CODE FOR SMS SENDING HERE\n\t */\n\n\t// return true or SMS id in case of success\n\treturn true; \n}", "function send_usermsg($sender_id, $text, $room)\r\n\t\t{\r\n\t\t\t\t$users_data = $this->SPECIAL_CORE->mysql_master->get_user_by_id($sender_id);\r\n\t\t $maskip = $this->SPECIAL_CORE->mysql_master->get_rights_by_level($users_data->level); //get right by level\r\n\r\n\t\t\t\t$result = mysql_query(\"SELECT `W`.`users_id`, `W`.`online`,U.`nick`,U.`level`,U.`id`,U.`rights` FROM `who_is_online` W, `users` U WHERE W.online = '1' and W.users_id = U.id\") or FUNCTIONS::debug(mysql_error(), \"mysql_actions\", __LINE__);\r\n\t\t\t $i = 0;\r\n\t\t\t while ($row = mysql_fetch_object($result)){\r\n\t\t\t\t\t if($row->level == 0){\r\n\r\n\t\t\t\t\t $msg = str_replace(array(\"#nickcolor#\",\"#nickfont#\",\"#sender_name#\",\"#rights#\",\"#color#\",\"#font#\",\"#text#\"),\r\n\t\t\t\t\t array($users_data->nickcolor ,$users_data->nickfont , $users_data->nick, $maskip, $users_data->color, $users_data->font, $text), ChFun_guestmsg);\r\n\r\n\t\t\t\t\t $final = addslashes($msg);\r\n\t\t\t\t\t mysql_query(\"INSERT INTO `private_talk`\r\n\t\t\t\t\t (`users_id_from` , `users_id_to` , `text` , `time`, `delivered_from`)\r\n\t\t\t\t\t VALUES\r\n\t\t\t ('50','{$row->id}', '{$final}', '\".time().\"', '1')\") or FUNCTIONS::debug(mysql_error(), \"mysql_actions\", __LINE__);\r\n\t\t\t\t\t $i++;\r\n\t\t\t\t }\r\n\r\n\t\t\t\t}\r\n\t\t\t\t$this->SPECIAL_CORE->mysql_public_private->post_logs($msg, $room, 'usermsg', FALSE);\r\n\t\t\t\treturn array('info' => $i);\r\n\t\t}", "public function send_sms(){\r\n $message = new \\Esendex\\Model\\DispatchMessage(\r\n \"PagaHoy\", /* Send from */\r\n $this->phone_number, /* Send to any valid number */\r\n $this->sms_text,\r\n \\Esendex\\Model\\Message::SmsType\r\n );\r\n $authentication = new \\Esendex\\Authentication\\LoginAuthentication(\r\n $this->account_reference, /* Your Esendex Account Reference */\r\n $this->account_username, /* Your login email address */\r\n $this->account_password /* Your password */\r\n );\r\n $service = new \\Esendex\\DispatchService($authentication);\r\n\r\n try {\r\n\r\n $result = $service->send($message);\r\n }catch (Exception $ex){\r\n return $ex;\r\n }\r\n return $result;\r\n }", "public function sendmessageAction(){\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t$this->view->form = $form = new SendMessage_Form_SendMessage();\r\n\t\t\r\n\t\tif ($this->_request->isPost()){\r\n\t\t\t\r\n\t\t\tif ( $form->isValid($_POST)){\r\n\t\t\t\t\r\n\t\t\t\t$email = new Zend_Mail();\t\t\t\t\r\n\t\t\t\t$val = $form->getValues();\r\n\t\t\t\t$email->setBodyText($val['messaage'])\r\n \t\t\t->setFrom('ala.63@interia.pl', $val['name'])\r\n \t\t\t->addTo($val['email'], 'Some Recipient')\r\n \t\t\t->setSubject($val['subiect'])\r\n \t\t\t->send();\t\t\t\r\n\r\n \t\t\techo \"wiadomość została wysłana\";\r\n\t\t\t} else {\r\n\t\t\t\techo \"nie udało się \";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}", "function send_direct_email($recipientEmail, $userId, $message)\n\t{\n\t\tlog_message('debug', '_messenger/send_direct_email');\n\t\tlog_message('debug', '_messenger/send_direct_email:: [1] recipientEmail='.$recipientEmail.' userId='.$userId.' message='.json_encode($message).' method='.$method);\n\t\t\n\t\t$isSent = FALSE;\n\t\t\n\t\tif(!empty($message['code']))\n\t\t{\n\t\t\tif(!empty($userId)){\n\t\t\t\t$user = $this->_query_reader->get_row_as_array('get_user_by_id', array('user_id'=>$userId));\n\t\t\t\tif(!empty($user)){ \n\t\t\t\t\t$message['firstname'] = $user['first_name'];\n\t\t\t\t\t$message['fromname'] = $user['first_name'].' '.$user['last_name'];\n\t\t\t\t\t$message['emailfrom'] = $user['email_address'];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t# Put default if user is not specified\n\t\t\tif(empty($message['emailfrom'])){\n\t\t\t\t$message['fromname'] = SITE_TITLE;\n\t\t\t\t$message['emailfrom'] = NOREPLY_EMAIL;\n\t\t\t}\n\t\t\t\n\t\t\t$template = $this->get_template_by_code($message['code']);\n\t\t\t$messageData = $this->populate_template($template, $message);\n\t\t\t$message = array_merge($messageData, $message);\n\t\t\t\n\t\t\t$m['emailaddress'] = $recipientEmail;\n\t\t\t$m['emailfrom'] = NOREPLY_EMAIL;\n\t\t\t$m['subject'] = $message['subject'];\n\t\t\t$m['details'] = $message['details'].$this->add_disclaimer($m['emailaddress']);\n\t\t\tif(!empty($message['fileurl'])) $m['fileurl'] = $message['fileurl'];\n\t\t\t$isSent = $this->email($m, 'ses');\n\t\t\t\n\t\t\t# 2. copy admin if required\n\t\t\tif(!empty($message['copyadmin']) && $message['copyadmin'] == 'Y')\n\t\t\t{\n\t\t\t \t$isSent = $this->_query_reader->run('record_message_exchange', array('template_code'=>(!empty($message['code'])? $message['code']: 'user_defined_message'), 'details'=>htmlentities($message['details'], ENT_QUOTES), 'subject'=>htmlentities($message['subject'], ENT_QUOTES), 'attachment_url'=>(!empty($message['fileurl'])? substr(strrchr($message['fileurl'], \"/\"),1): ''), 'sender_id'=>(!empty($userId)? $userId: '1'), 'recipient_id'=>implode(\"','\", $this->get_admin_users()) ));\n\t\t\t}\n\t\t\t\n\t\t\t#Record messsage sending event\n\t\t\t$this->log_message_event($userId, $isSent, 'email__message_sent', $message);\n\t\t}\n\t\tlog_message('debug', '_messenger/send_direct_email:: [2] isSent='.$isSent);\n\t\t\n\t\treturn $isSent;\n\t}", "function messageSend($from, $frommail, $to, $params, $topic, $text)\r\n{\r\n\tglobal $db, $_cfg;\r\n\tif (!$frommail and !($usr = opReadUser($from)))\r\n\t\treturn 'user_not_found';\r\n\tif ($frommail and !validMail($frommail))\r\n\t\treturn 'mail_wrong';\r\n\tif (!is_array($to)) \r\n\t\t$to = array($to);\r\n\tfor ($i = count($to) - 1; $i >= 0; $i--)\r\n\t\tif (!($u = trim($to[$i])))\r\n\t\t\tunset($to[$i]);\r\n\t\telse\r\n\t\t\t$to[$i] = $u;\r\n\tif (count($to) < 1)\r\n\t\treturn 'to_empty';\r\n\tif (!$topic)\r\n\t\treturn 'topic_empty';\r\n\tif (!$text)\r\n\t\treturn 'text_empty';\r\n\t$lang = exValue($params['lang'], $usr['uLang']);\r\n\t$wrusrs = array();\r\n\t$users = array();\r\n\tforeach ($to as $u)\r\n\t{\r\n\t\tif (textPos('mailto:', $u) == 0)\r\n\t\t{\r\n\t\t\t$u = trim(textSubStr($u, 7, 60)); // e-mail\r\n\t\t\t$a = $db->fetch1Row($db->select('Users LEFT JOIN AddInfo ON auID=uID', '*', 'uMail=?', array($u)));\r\n\t\t\tif (!$a and validMail($u))\r\n\t\t\t\t$a = array('uMail' => $u, 'aName' => 'User', 'uLang' => $lang);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$a = $db->fetch1Row($db->select('Users LEFT JOIN AddInfo ON auID=uID', '*', 'uLogin=? and uState=1', array($u)));\r\n\t\t}\r\n\t\tif (!$a)\r\n\t\t\t$wrusrs[] = $u;\r\n\t\telse\r\n\t\t\t$users[] = $a;\r\n\t}\r\n\tif ($wrusrs)\r\n\t{\r\n\t\tsetPage('wrusrs', asStr($wrusrs, ', '));\r\n\t\treturn 'to_wrong';\r\n\t}\r\n\t$mid = $db->insert('Msg', array(\r\n\t\t'muID' => $from,\r\n\t\t'mTS' => timeToStamp(),\r\n\t\t'mMail' => $frommail,\r\n\t\t'mAttn' => $params['attn'],\r\n\t\t'mTopic' => $topic,\r\n\t\t'mText' => $text,\r\n\t\t'mLang' => $lang,\r\n\t\t'mGroup' => $params['group'],\r\n\t\t'mTo' => asStr($to, HS2_NL),\r\n\t\t'mToCnt' => count($to)\r\n\t));\r\n\t$a = array(\r\n\t\t'from' => exValue($frommail, $usr['uLogin']),\r\n\t\t'topic' => $topic,\r\n\t\t'message' => $text,\r\n\t\t'remessage' => $db->fetch1($db->select('MBox LEFT JOIN Msg ON mID=bmID', 'mText', 'bID=?d', array($params['re']))),\r\n\t\t'url' => fullURL(moduleToLink('message/show'))\r\n\t);\r\n\tforeach ($users as $u)\r\n\t{\r\n\t\tif ($u['uID'])\r\n\t\t{\r\n\t\t\t$id = $db->insert('MBox', array( // Inbox\r\n\t\t\t\t'buID' => $u['uID'],\r\n\t\t\t\t'bmID' => $mid,\r\n\t\t\t\t'bRe' => $params['re'],\r\n\t\t\t\t'buID2' => $from,\r\n\t\t\t\t'bMail' => $frommail\r\n\t\t\t));\r\n\t\t}\r\n\t\tif (!$u['uID'] or (!$_cfg['Msg_NoMail'] and !$u['aNoMail']))\r\n\t\t\tsendMailToUser2($u['uMail'], 'Notice' . valueIf(!$u['uID'] or !$_cfg['Msg_Mode'] or $params['feed'], 'ToMail'),\r\n\t\t\t\t$a + array('name' => $u['aName'], 'id' => $id), $u['uLang'], 'e-mails', exValue($usr['uMail'], $frommail), $params['feed']);\r\n\t}\r\n\treturn $mid;\r\n}", "function message($id) {\r\n\r\n\t\tif($this->session->userdata('stud_id') == FALSE ) {\r\n\t\t\tredirect('students','refresh');\r\n\t\t}\r\n\r\n\t\r\n\t\t/*USERS*/\r\n\t\t$user1 = $this->session->userdata('stud_id'); //the student\r\n\t\t$user2 = $id; //ID of teh professor\r\n\r\n\t\t// GET all the conversation/s where user_1 and user_2 (vice-versa) exist\r\n\t\t$conversation_id = $this->crud->get_single('conversation',\"(user_1 = $user1 AND user_2 = $user2) OR (user_1= $user2 AND user_2 = $user1)\");\r\n\r\n\t\t// IF there is existing conversation_id\r\n\t\tif( $conversation_id ) { \r\n\t\t\t// SET it to another variable.\r\n\t\t\t$data['conversation_data'] = $conversation_id;\r\n\r\n\t\t// IF the conversation_id does not exist, create an ID for them.\r\n\t\t} else {\r\n\t\t\t$data = [\r\n\t\t\t\t'user_1' => $this->session->userdata('stud_id'),\r\n\t\t\t\t'user_2' => $id \r\n\t\t\t];\r\n\t\t\t/*ADD new conversation*/\r\n\t\t\t$new_conversation = $this->crud->add('conversation', $data);\r\n\t\t}\r\n\r\n\t\treturn $this->current_message($id);\r\n\t\t\r\n\t}", "protected function runSendText(User $user, $chatId)\n {\n $user->updateState(States::START_SEND_CONTEXT, $chatId);\n $this->conversation->stop();\n $this->telegram->executeCommand(Command::SEND_TEXT);\n }", "private function sendText($to, $from, $body) {\n\t\t$blacklist = DB::select(\"SELECT count(*) as count FROM blacklist WHERE number='\".$to.\"'\");\n\t\tif($blacklist[0]->count > 0){\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// set your AccountSid and AuthToken from www.twilio.com/user/account\n\t\t$AccountSid = \"ACee1a2b72c78697cb71ffd9762bf5431a\";\n\t\t$AuthToken = \"eeeefef73f544fce3b7b7f3decfddf86\";\n\t\t \n\t\t$client = new Services_Twilio($AccountSid, $AuthToken);\n\t\t \n\t\t$message = $client->account->messages->create(array(\n\t\t\t\"From\" => $from,\n\t\t\t\"To\" => $to,\n\t\t\t\"Body\" => $body,\n\t\t));\t \n\t\t// Display a confirmation message on the screen\n\t\t//echo \"Sent message {$message->sid}\";\n\t}", "public function contactingUser($id)\n\t{\t\n\t\t\n\t\t$thisRe = Realestate::with('users')->find($id);\n\t\t$thisUser = User::find($thisRe->user_id);\n\n\t\t$input = Input::all();\n\n\t\t$rules = array(\n\t\t\t'nameUser' \t=>\t'required|min:3',\n\t\t\t'emailUser'\t=>\t'required|email',\n\t\t\t'commentUser'\t=>\t'required'\n\t\t\t);\n\n\t\t$v = Validator::make($input, $rules);\n\n\t\tif ($v->fails())\n\t\t{\n\t\t\treturn Redirect::back()\n\t\t\t\t->withErrors($v);\n\t\t}\n\n\t\t$mailMessage = array(\n\t\t\t'nameUser' => Input::get('nameUser'),\n\t\t\t'emailUser' => Input::get('emailUser'),\n\t\t\t'commentUser' => Input::get('commentUser')\n\t\t);\n\n\t\t\n\t\tMail::send('emails.usertouser', $mailMessage, function($message) use ($thisUser){\n\t\t\t$message\n\t\t\t\t->to($thisUser->email, 'test')\n\t\t\t\t->from(Input::get('emailUser'))\n\t\t\t\t->Subject(Input::get('nameUser').' from Real Estate ');\n\t\t\t\n\t\t});\n\n\t\tSession::flash('succes', 'Email Sent');\n\n\t\treturn Redirect::back();\n\t}", "function sendMessage($senderEmail,$receiversEmail,$subject,$body)\n{\n\t$message= new message;\n\tif ($message->sendMessage($senderEmail,$receiversEmail,$subject,$body)) \n\t{\n\t\treturn true;\n\t}\n\treturn false;\n}", "public function sendMessage( $message ) {\r\n\t}", "public function sendsAction()\n\t{\n\t\t$user = Application_Model_User::getAuth();\n\n\t\tif ($user == null)\n\t\t{\n\t\t\tthrow new RuntimeException('You are not authorized to access this action');\n\t\t}\n\n\t\t$model = new Application_Model_Conversation;\n\t\t$paginator = Zend_Paginator::factory(\n\t\t\t$model->select()\n\t\t\t\t->setIntegrityCheck(false)\n\t\t\t\t->from(array('c' => 'conversation'), array(\n\t\t\t\t\t'c.id',\n\t\t\t\t\t'c.subject',\n\t\t\t\t\t'c.created_at',\n\t\t\t\t\t'user_name' => 'u.Name',\n\t\t\t\t\t'is_read' => 'IFNULL(cm.is_read,1)'\n\t\t\t\t))\n\t\t\t\t->where('c.from_id=?', $user['id'])\n\t\t\t\t->joinLeft(array('cm' => 'conversation_message'), '(cm.conversation_id=c.id AND ' .\n\t\t\t\t\t'cm.is_read=0 AND cm.from_id=' . $user['id'] . ')', '')\n\t\t\t\t->joinLeft(array('u' => 'user_data'), 'u.id=c.to_id', [\n\t\t\t\t\t'u_image_id' => 'u.image_id',\n\t\t\t\t\t'u_image_name' => 'u.image_name'\n\t\t\t\t])\n\t\t\t\t->group('c.id')\n\t\t\t\t->order('c.created_at DESC')\n\t\t);\n\t\t$paginator->setCurrentPageNumber($this->_request->getParam('page', 1));\n\t\t$paginator->setItemCountPerPage(14);\n\n\t\t$this->view->userTimezone = Application_Model_User::getTimezone($user);\n\t\t$this->view->paginator = $paginator;\n\t\t$this->view->hideRight = true;\n\n\t\t$this->view->headScript()->appendFile(My_Layout::assetUrl('www/scripts/messageindex.js'));\n\t}", "function send_text_message($text,$to,$from=\"\",$subject=\"\")\n\t{\n\t\tif ($this->call(\"Mail.SendTextMessage?text=\".urlencode($text).\"&to=\".urlencode($to).\"&from=\".urlencode($from).\"&subject=\".urlencode($subject))==\"true\")\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "public function sendMessageAction($peerId)\n {\n try {\n //get array of conversation members\n $vkService = VkApi::getInstance(env('VK_API_GROUP_TOKEN'));\n $vkService->sendMessage($peerId, 'Test!');\n } catch (\\Error $e) {\n dump($e->getMessage());\n die;\n }\n\n return 'ok!';\n }", "public static function send_message($to, $message, $link = \"\", $otherVariables = array());", "public function sendReply($userContactId=null) {\n\t\t$confirm = null;\n\t\tif(isset($this->request->data['confirmEmail'])) {\n\t\t\t$confirm = 'confirm';\n\t\t}\n\t\t$page = (isset($this->request->query['page'])) ? $this->request->query['page'] : 1;\n\t\tif(!empty($userContactId)) {\n\t\t\t$userContact = $this->UserContacts->find()->where(['UserContacts.id'=>$userContactId])->first();\n\t\t\tif(!empty($userContact)) {\n\t\t\t\t$this->loadModel('Usermgmt.UserEmails');\n\t\t\t\t$this->loadModel('Usermgmt.UserEmailTemplates');\n\t\t\t\t$this->loadModel('Usermgmt.UserEmailSignatures');\n\n\t\t\t\t$userEmailEntity = $this->UserEmails->newEntity($this->request->data, ['validate'=>'forSend']);\n\t\t\t\t$name = $userContact['name'];\n\t\t\t\t$confirmRender = false;\n\t\t\t\tif($this->request->is('post')) {\n\t\t\t\t\t$errors = $userEmailEntity->errors();\n\t\t\t\t\tif($this->request->is('ajax')) {\n\t\t\t\t\t\tif(empty($errors)) {\n\t\t\t\t\t\t\t$response = ['error'=>0, 'message'=>'success'];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$response = ['error'=>1, 'message'=>'failure'];\n\t\t\t\t\t\t\t$response['data']['UserEmails'] = $errors;\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo json_encode($response);exit;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif(empty($errors)) {\n\t\t\t\t\t\t\tif(is_null($confirm)) {\n\t\t\t\t\t\t\t\tif($userEmailEntity['template']) {\n\t\t\t\t\t\t\t\t\t$template = $this->UserEmailTemplates->getEmailTemplateById($userEmailEntity['template']);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif($userEmailEntity['signature']) {\n\t\t\t\t\t\t\t\t\t$signature = $this->UserEmailSignatures->getEmailSignatureById($userEmailEntity['signature']);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$message = '';\n\t\t\t\t\t\t\t\tif(!empty($template['header'])) {\n\t\t\t\t\t\t\t\t\t$message .= $template['header'].\"<br/>\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$message .= $userEmailEntity['message'];\n\t\t\t\t\t\t\t\tif(!empty($signature['signature'])) {\n\t\t\t\t\t\t\t\t\t$message .= $signature['signature'];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(!empty($template['footer'])) {\n\t\t\t\t\t\t\t\t\t$message .= \"<br/>\".$template['footer'];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$userEmailEntity['modified_message'] = $message;\n\t\t\t\t\t\t\t\t$this->request->session()->write('send_reply_email_data', $userEmailEntity);\n\t\t\t\t\t\t\t\t$confirmRender = true;\n\t\t\t\t\t\t\t} else if($confirm == 'confirm') {\n\t\t\t\t\t\t\t\t$data = $this->request->session()->read('send_reply_email_data');\n\t\t\t\t\t\t\t\t$fromConfig = $data['from_email'];\n\t\t\t\t\t\t\t\t$fromNameConfig = $data['from_name'];\n\n\t\t\t\t\t\t\t\t$emailObj = new Email('default');\n\t\t\t\t\t\t\t\t$emailObj->from([$fromConfig=>$fromNameConfig]);\n\t\t\t\t\t\t\t\t$emailObj->sender([$fromConfig=>$fromNameConfig]);\n\t\t\t\t\t\t\t\t$emailObj->subject($data['subject']);\n\t\t\t\t\t\t\t\t$emailObj->emailFormat('both');\n\t\t\t\t\t\t\t\t$sent = false;\n\t\t\t\t\t\t\t\t$emailObj->to($data['to']);\n\t\t\t\t\t\t\t\tif(!empty($data['cc_to'])) {\n\t\t\t\t\t\t\t\t\t$data['cc_to'] = array_filter(array_map('trim', explode(',', strtolower($data['cc_to']))));\n\t\t\t\t\t\t\t\t\t$emailObj->cc($data['cc_to']);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t$result = $emailObj->send($data['modified_message']);\n\t\t\t\t\t\t\t\t\tif($result) {\n\t\t\t\t\t\t\t\t\t\t$sent = true;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} catch (Exception $ex){\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif($sent) {\n\t\t\t\t\t\t\t\t\t$this->request->session()->delete('send_reply_email_data');\n\t\t\t\t\t\t\t\t\t$msg = $userContact['reply_message'];\n\t\t\t\t\t\t\t\t\tif(empty($msg)) {\n\t\t\t\t\t\t\t\t\t\t$userContact['reply_message'] = 'Reply On '.date('d M Y', time()).' at '.date('h:i A', time()).'<br/>'.$data['modified_message'];\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$userContact['reply_message'] = 'Reply On '.date('d M Y', time()).' at '.date('h:i A', time()).'<br/>'.$data['modified_message'].'<br/><br/>'.$msg;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$this->UserContacts->save($userContact, ['validate'=>false]);\n\t\t\t\t\t\t\t\t\t$this->Flash->success(__('Contact Reply has been sent successfully'));\n\t\t\t\t\t\t\t\t\t$this->redirect(['action'=>'index', 'page'=>$page]);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$this->Flash->error(__('We could not send Reply Email'));\n\t\t\t\t\t\t\t\t\t$this->redirect(['action'=>'sendReply', $userContactId]);\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} else {\n\t\t\t\t\t$userEmailEntity['from_name'] = EMAIL_FROM_NAME;\n\t\t\t\t\t$userEmailEntity['from_email'] = EMAIL_FROM_ADDRESS;\n\t\t\t\t\t$userEmailEntity['to'] = $userContact['email'];\n\t\t\t\t\t$userEmailEntity['subject'] = 'Re: '.SITE_NAME;\n\t\t\t\t\t$userEmailEntity['message'] = '<br/><p>-------------------------------------------<br/>On '.$userContact['created']->format('d M Y').' at '.$userContact['created']->format('h:i A').'<br/>'.h($userContact['name']).' wrote:</p>'.$userContact['requirement'];\n\t\t\t\t\tif($this->request->session()->check('send_reply_email_data')) {\n\t\t\t\t\t\t$userEmailEntity = $this->request->session()->read('send_reply_email_data');\n\t\t\t\t\t\t$this->request->session()->delete('send_reply_email_data');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(!$confirmRender) {\n\t\t\t\t\t$templates = $this->UserEmailTemplates->getEmailTemplates();\n\t\t\t\t\t$signatures = $this->UserEmailSignatures->getEmailSignatures();\n\t\t\t\t}\n\t\t\t\t$this->set(compact('userEmailEntity', 'name', 'templates', 'signatures', 'userContactId'));\n\t\t\t\tif($confirmRender) {\n\t\t\t\t\t$this->render('send_reply_confirm');\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->Flash->error(__('Invalid Contact Id'));\n\t\t\t\t$this->redirect(['action'=>'index', 'page'=>$page]);\n\t\t\t}\n\t\t} else {\n\t\t\t$this->Flash->error(__('Missing Contact Id'));\n\t\t\t$this->redirect(['action'=>'index', 'page'=>$page]);\n\t\t}\n\t}", "public static function exist_message($user_id, $id)\n {\n if ($id != strval(intval($id)) || $user_id != strval(intval($user_id)))\n return false;\n $table_message = Database::get_main_table(TABLE_MESSAGE);\n $query = \"SELECT id FROM $table_message\n WHERE\n user_receiver_id = \" . intval($user_id) . \" AND\n id = '\" . intval($id) . \"'\";\n $result = Database::query($query);\n $num = Database::num_rows($result);\n if ($num > 0) {\n return true;\n } else {\n return false;\n }\n }", "public function sendResponse()\n {\n $mdata_id = $this->mdata_id;\n\n if ($this->is_mms_msg) {\n if ($mdata_id == '12368') {\n $matched_response = '195188';\n }\n elseif ($mdata_id == '12388') {\n $matched_response = '195456';\n }\n\n return $this->mobile_commons->sendMessage($matched_response, $this->phone);\n }\n\n // Get the user message.\n $user_message = $this->args;\n $user_message = Message::sanitizeMessage($user_message);\n\n // Test phrase messages.\n if ($matched_response = Message::testPhraseMessages($user_message, $mdata_id)) {\n $matched_response = self::getFinalOptInPath($matched_response);\n }\n // Test word messages.\n else if ($matched_response = Message::testWordMessages($user_message, $mdata_id)) {\n $matched_response = self::getFinalOptInPath($matched_response);\n }\n // Test regex messages.\n else if ($matched_response = Message::testRegexMessages($user_message, $mdata_id)) {\n $matched_response = self::getFinalOptInPath($matched_response);\n }\n // No match found message.\n else {\n $matched_response = Message::determineOptInPath('default', $mdata_id);\n }\n\n return $this->mobile_commons->sendMessage($matched_response, $this->phone, $this->is_test);\n }", "public function send(string $to, string $message);", "public function messageSend(string $targetId): ?string\n {\n if (!Any::isInt($targetId) || $targetId < 1) {\n throw new NativeException('Bad target id format');\n }\n\n // check if user is auth\n if (!App::$User->isAuth()) {\n throw new ForbiddenException('Auth required');\n }\n\n // get current user object and check in blacklist\n $user = App::$User->identity();\n if (!Blacklist::check($user->id, $targetId)) {\n throw new ForbiddenException('In blacklist');\n }\n\n // check input params\n $msg = App::$Security->strip_tags($this->request->get('message'));\n if (!Any::isInt($targetId) || $targetId < 1 || Str::length($msg) < 1) {\n throw new NativeException('Wrong input data');\n }\n\n $this->setJsonHeader();\n\n // try to save message\n $message = new Message();\n $message->target_id = $targetId;\n $message->sender_id = $user->id;\n $message->message = $msg;\n $message->save();\n\n return json_encode(['status' => 1]);\n }", "function sendMessage($to, $bodytext, $from='', $subject='', $notification_read=0, $savePid='') {\n\t\t// if sender is not set, use current loggend in user as sender\n\t\t$sender = $from ? $from : $GLOBALS['TSFE']->fe_user->user['uid'];\n\t\t// set default subject if not defined\n\t\t$subj = $subject ? $subject : $this->pi_getLL('no_subject');\n\t\t// set pid to save messsage to if not defined\n\t\t$pid = $pid ? $pid : $this->conf['dataPid'];\n\t\t\n\t\t$fields_values = array(\n\t\t\t'pid' => $pid,\n\t\t\t'crdate' => time(),\n\t\t\t'tstamp' => time(),\n\t\t\t'cruser_id' => $sender,\n\t\t\t'sender' => $sender,\n\t\t\t'recipient' => $to,\n\t\t\t'bodytext' => $bodytext,\n\t\t\t'subject' => $this->sanitizeData($subj),\n\t\t\t'attachment' => '',\n\t\t\t'notification_read' => $notification_read,\t\t\n\t\t);\n\t\tif ($GLOBALS['TYPO3_DB']->exec_INSERTquery($this->table,$fields_values,$no_quote_fields=FALSE)) return true;\n\t\telse return false;\n \t}", "public function send(SmsMessage $message)\n {\n $body = urlencode(utf8_decode($message->getBody()));\n $from = urlencode($message->getFrom());\n\n foreach ($message->getTo() as $to) {\n $url = \"{$this->endpoint}/http/sendmsg?api_id={$this->apiKey}&user={$this->user}\" .\n \"&password={$this->password}&to={$to}&text={$body}&from={$from}\";\n $this->getClient()->post($url, array());\n }\n return true;\n }", "public function send() {\n\t\tif(!$this->validate()){\n\t\t\treturn false;\n\t\t}\n\t\t$header = 'From: ' . $this->from . \" \\r\\n\";\n\t\t$header .= \"X-Mailer: PHP/\" . phpversion() . \" \\r\\n\";\n\t\t$header .= \"Mime-Version: 1.0 \\r\\n\";\n\t\t$header .= \"Content-Type: \".$this->type.\"; charset=\".$this->charset;\n\t\t\n\t\t$to = self::TO;\n\t\tif(is_array($this->cc) && !empty($this->cc)){\n\t\t\t$to .= ', ' . implode(', ', $this->cc);\n\t\t}\n\t\t\n\t\t$message = \"<b>Mensaje enviado por:</b> \" . trim($this->name) . \"<br />\";\n\t\t$message .= \"<b>e-mail: </b>\" . $this->from . \" <br /><br />\";\n\t\t$message .= \"<b>Mensaje: </b><br />\" . nl2br(htmlentities(utf8_decode(trim($this->content)), ENT_COMPAT, 'UTF-8', false)) . \" <br /><br />\";\n\t\t$message .= \"<b>Fecha: </b>\" . date('d/m/Y', time());\n\t\t\n\t\tmail($to, $this->subject, utf8_decode($message), $header);\n\t\treturn true;\n\t}", "public function replyMessage(Request $request){\n //store data in ContactUsMessage Table with user Information And paratns messageid\n\n //Sent mail to user via mail sarver \n\n //retun back with Success full message\n }", "function reply() {\n\t\t$this->success = null;\n\t\t\n\t\t$msg = new Message($this->POD,array('targetUserId'=>$this->fromId,'message'=>$message));\n\t\t$msg->save();\n\t\tif ($msg->success()) { \n\t\t\t$this->MESSAGES->exists();\n\t\t\t$this->MESSAGES->add($msg);\n\t\t\t$this->success = true;\n\t\t\treturn $msg;\t\t\n\t\t} else {\n\t\t\t$this->throwError($msg->error());\n\t\t\t$this->error_code = $msg->errorCode();\n\t\t\treturn null;\n\t\t}\t\n\t}", "public function send(string $to, array $message) : bool;", "public function send()\n\t{\n\t\t// Send only if message hasn't been sent yet\n\t\tif(!$this->sent && $this->bot_id)\n\t\t{\n\t\t\t// Send message to GroupMe API\n\t\t\t$options = array(\n\t\t\t 'http' => array(\n\t\t\t 'header' => \"Content-type: application/json\\r\\n\",\n\t\t\t 'method' => 'POST',\n\t\t\t 'content' => json_encode($this->compile_message()),\n\t\t\t ),\n\t\t\t);\n\t\t\t\n\t\t\t$context = stream_context_create($options);\n\t\t\t$result = file_get_contents($this->api_url, false, $context);\n\n\t\t\t$this->sent = true;\n\t\t\treturn $this->sent;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public function sendMessage($message, $module = false){\n\t\tif(!isset($this->_to)){\n\t\t\tthrow new ParamException(\"Parameter `to` should be initialized first\");\n\t\t}\n\t\t\n\t\t$this->validateMessage($message);\n\t\tif(!empty($module)){\n\t\t\t$this->validateModule($module);\n\t\t}\n\n\t\t$delimiter = strpos($this->_sender, \"?\")?'&':'?';\n\n\t\t$url = $this->_sender.$delimiter.\"bot=\".$this->_from.\"&msg=\".base64_encode($message).\n\t\t\t\t\t(!empty($module)?\"&source=$module\":\"\").\"&to=\".$this->_to;\n\n\t\t$res = file_get_contents($url);\n\n\t\treturn empty($res)?true:$res;\n\t}", "public function message($msg)\r\n {\r\n $this->execute(\"sendtextmessage\", array(\"msg\" => $msg, \"target\" => $this->getId(), \"targetmode\" => TeamSpeak3::TEXTMSG_CLIENT));\r\n }", "public function send_reply(){\n $data = $this->input->post();\n print_r($data);die;\n // and seperate out the form data \n $form_data = $data['form_data'];\n \n // using the inbuilt auth library loaded in the constructer\n $sender_id = $this->current_user->id; \n\n // uses a native php function to record the data/time\n $timestamp = time();\n\n $mock_message = array(\n 'sender_id' => $sender_id, \n 'recipient_id' => $form_data['recipient'],\n 'message' => $form_data['message'],\n 'timestamp' => $timestamp,\n 'checked' => 0\n );\n\n $outcome = $this->chat_model->create_message($mock_message);\n\n echo $outcome;die; // we could use this for error messages on the front end\n }", "public function sendMessage()\n {\n $to = 'lieninformatique11@gmail.com';\n $name = htmlspecialchars($_POST['name']);\n $email = htmlspecialchars($_POST['email']);\n $message = htmlspecialchars($_POST['message']);\n\n if ( preg_match( \"/[\\r\\n]/\", $name) || preg_match( \"/[\\r\\n]/\", $email ) ) {\n header(\"location : http://www.myriamstampers.com/mail-error.php\");\n }\n else{\n $sujet = $name.' depuis le site viva Informatique';\n $headers = 'From : ' . 'email' . \"\\r\\n\" ;\n mail($to, $sujet, $message, $headers);\n }\n }", "private function sendMessage(User $user, array $data)\n {\n // Make sure the data contains changes\n if (!array_key_exists('changes', $data) && count($data['changes']) > 1) {\n return;\n }\n\n return $this->mailer->send('email.' . $this->template, $data, function (MailMessage $message) use ($user) {\n $message->to($user->email, $user->fullname)->subject($this->getSubject());\n });\n }", "protected function process ($user, $message) {\n $this->send($user,$message);\n }", "public function sendMessageFromSystem($extChatId, $extUserId, $message, $created)\n {\n $this->externalClient->sendTextMessage($message);\n }", "function SendMessageModal($id)\n {\n $userModel = new UserModel();\n \n $userName = $userModel->GetUserById($id)->username;\n $_SESSION['SendUsername']=$userName;\n $result = \"\n <div class='modal fade col-md-12 col-xs-11' id='sendMessageModal' role='dialog'>\n\t\t\t<div class='modal-dialog'>\n\t\t\t\n\t\t\t <!-- Modal content-->\n\t\t\t <div class='modal-content'>\n\t\t\t\t<div class='modal-header'>\n\t\t\t\t <button type='button' class='close' data-dismiss='modal'>&times;</button>\n\t\t\t\t <h4 class='modal-title'>Send User a Message</h4>\n\t\t\t\t</div>\n\t\t\t\t<div class='modal-body'>\n <div class='row'>\n <form action='' method = 'POST'>\n <div class='msg-container'>\n <div class='msg-area' id='msg-area'>\";\n $result.=\"<div class='msgc' style='margin-bottom: 30px;'> \n <div class='msg msgfrom'> Send A New Message :) </div> \n <div class='msgarr msgarrfrom'></div>\n <div class='msgsentby msgsentbyfrom'>Type your message in the message box and click send.</div> \n </div>\";\n\n $result.=\"<div class='msgc'> \n <div class='msg'> <a href='Messages.php?epr=view&fromusername=\".$userName.\"'> View Previous Conversation </a> </div>\n <div class='msgarr'></div>\n <div class='msgsentby'>View your previous conversation between this user</div>\n </div>\";\n $result.=\"</div>\n \n <fieldset>\n \n <div class='clearfix'>\n <label for='messages' class='col-md-2 col-sm-2 col-xs-3'> Message: </label>\n <textarea class='col-md-8 col-sm-8 col-xs-8' rows='5' id='messages' name = 'messages' placeholder='Message' required autofocus></textarea>\n </div>\n\n <div class='row'>\n <button class='btn primary col-sm-2 col-sm-offset-9 col-md-2 col-md-offset-9' Style='margin-left:185px;' name = 'sendMessage' type='submit'>Send</button>\n </div>\n </fieldset>\n </form>\n </div>\n\t\t\t\t</div>\n\t\t\t\t<div class='modal-footer'>\n\t\t\t\t <button type='button' class='btn btn-default' data-dismiss='modal'>Close</button>\n\t\t\t\t</div>\n\t\t\t </div>\n\t\t\t \n\t\t\t</div>\n\t </div>\";\n return $result;\n }", "public function postMessage(string $message, int $username): bool{\n $request = DB::getInstance()->prepare(\"\n INSERT INTO clavardage.message (fk_username, message)\n VALUES (:username, :message)\n \");\n $request->bindParam(':username', $username);\n $request->bindParam(':message', $message);\n $request->execute();\n return intval(DB::getInstance()->lastInsertId()) !== 0;\n }" ]
[ "0.70646703", "0.6937308", "0.6897981", "0.6885115", "0.68458164", "0.6751401", "0.67403334", "0.6735484", "0.6717577", "0.6709608", "0.6542987", "0.650415", "0.6462952", "0.6452747", "0.6430111", "0.63756716", "0.6354696", "0.63510245", "0.6350097", "0.6337627", "0.63166004", "0.6313844", "0.62985206", "0.62544596", "0.6238201", "0.6226656", "0.6221678", "0.62183553", "0.62114364", "0.6210789", "0.6207103", "0.62045014", "0.6171169", "0.6168744", "0.61682254", "0.61540836", "0.6152213", "0.61144185", "0.61113316", "0.6094455", "0.6090695", "0.60858333", "0.6083396", "0.60745573", "0.6068926", "0.6068772", "0.60594565", "0.6059188", "0.603356", "0.60332346", "0.6032151", "0.6018172", "0.6018029", "0.5989256", "0.598317", "0.5979547", "0.5975909", "0.5974114", "0.59734", "0.5968109", "0.596646", "0.59609854", "0.59556913", "0.59534836", "0.59459215", "0.59389967", "0.59324604", "0.59319544", "0.5926595", "0.59247017", "0.5923483", "0.5915868", "0.5894306", "0.5852289", "0.58500564", "0.5849759", "0.58485043", "0.58484757", "0.5840614", "0.58387697", "0.5835302", "0.5833887", "0.5831719", "0.58177704", "0.5815834", "0.58149153", "0.58092064", "0.5808516", "0.5808513", "0.57989156", "0.57951313", "0.5791185", "0.57867795", "0.57833177", "0.57809186", "0.57787216", "0.5764618", "0.57591856", "0.57589144", "0.5752677" ]
0.773897
0
Get all unread messages to (for) a specified user Params: User_Id user id of who to get messages for returns: array of messages on success, or an errormsg on error
Получить все непрочитанные сообщения для (для) указанного пользователя Параметры: User_Id идентификатор пользователя, для которого нужно получить сообщения возвращает: массив сообщений при успехе, или сообщение об ошибке в случае ошибки
function GetUnreadMessages( $User_Id ){ if( ! is_int( $User_Id ) ) return( "Param error: User_Id - wrong type or empty." ); $Messages = array(); $Sql = "SELECT m.Conversation_Id AS Conversation_Id, m.Id AS MessageId, m.FromUser_Id as FromUser_Id, CONCAT( u.FirstName, ' ', u.LastName ) AS FromUser_Name, m.DateSent as DateSent, m.Message FROM ChatMessages m,User u,ChatConversationParticipants p WHERE (m.FromUser_Id = u.Id) AND (m.Id > p.LastReadMessage_Id) AND (m.Conversation_Id = p.Conversation_Id) AND (p.User_Id = $User_Id) ORDER BY m.Id ASC"; $result = mysql_query( $Sql ); $errno = mysql_errno(); if( 0 != $errno ) return( "mysql error: $errno" ); while( $row = mysql_fetch_array( $result, MYSQL_ASSOC ) ) $Messages[] = $row; mysql_free_result( $result ); return( $Messages ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUnreadByUserId($user_id) {\n\t\t$sql = 'SELECT * FROM ' . NOTIFICATIONS_TABLE_NAME . ' where user_id = :user_id AND is_read = 0';\n\t\t$params = array(':user_id' => $user_id);\n\n\t\t$result = $this->db->query_db($sql, $params)->fetchAll(PDO::FETCH_ASSOC);\n\n\t\treturn $result;\t\n\t}", "public function get_unread_messages($id)\n {\n $this->db->select('*');\n $this->db->where('user_id', $id);\n $this->db->where('read', 0);\n $this->db->limit(10);\n $this->db->order_by('date', 'DESC');\n $query = $this->db->get('tbl_messages');\n return $query->result();\n }", "public function allUnreadForUser($userId)\n {\n return $this->model->where('user_id','=',$userId)->where('is_read','=',false)->orderBy('created_at', 'desc')->get();\n }", "public function getUserNotReadMessages($user_id = null)\n {\n if(!$user_id) $user_id = Auth::guard('user')->user()->id;\n $messages = $this->userRepository->getNotReadMessages($user_id);\n return response()->json(['status' => true, 'data' => $messages]);\n }", "public static function getMessages($user)\n\t{\n\t\t$db_connection = self::getConn(self::$MESS);\n\t\t$query = \"SELECT id, title, from_id, create_time, is_read FROM MESSAGE WHERE OWNER_ID=$user ORDER BY CREATE_TIME DESC\";\n\t\treturn self::selectDataList($db_connection, $query);\n\t}", "public function allUnreadForUser($userId) {\n return $this->cache\n ->tags($this->entityName, 'global')\n ->remember(\"{$this->locale}.{$this->entityName}.allUnreadForUser.{$userId}\", $this->cacheTime, function () use ($userId) {\n return $this->repository->allUnreadForUser($userId);\n }\n );\n }", "public function pullUnreadMessages()\n {\n try {\n $result = $this->getBootic()->getAccountMessages();\n } catch (Exception $e) {\n // We do nothing\n return;\n }\n\n $messages = array_reverse($result->getData());\n\n foreach ($messages as $message) {\n $booticMessage = Mage::getModel('bootic/message')->load($message['id']);\n\n if ($booticMessage->isObjectNew()) {\n $content = 'From <strong>' . $message['user_name'] . '</strong><br/>';\n $content .= $message['content'];\n\n $magentoMessage = Mage::getModel('adminnotification/inbox');\n $magentoMessage->setSeverity(2);\n $magentoMessage->setTitle($message['subject']);\n $magentoMessage->setDescription($content);\n $magentoMessage->setDateAdded($message['date']);\n $magentoMessage->save();\n\n $booticMessage->setMagentoMessageId($magentoMessage->getId());\n $booticMessage->setBooticMessageId($message['id']);\n $booticMessage->save();\n }\n }\n }", "public function unread_message_alert()\n {\n $activeUser = loggedin_role_id() . '-' . get_loggedin_user_id();\n $activeUser = $this->db->escape($activeUser);\n $sql = \"SELECT id,body,created_at,IF(sender = \" . $activeUser . \", 'sent','inbox') as `msg_type`,IF(sender = \" . $activeUser . \", reciever,sender) as `get_user` FROM message WHERE (sender = \" . $activeUser . \" AND trash_sent = 0 AND reply_status = 1) OR (reciever = \" . $activeUser . \" AND trash_inbox = 0 AND read_status = 0) ORDER BY id DESC\";\n $result = $this->db->query($sql)->result_array();\n foreach ($result as $key => $value) {\n $result[$key]['message_details'] = $this->getMessage_details($value['get_user']);\n }\n return $result;\n }", "function getAllMessages($uid)\n{\n\t$now = new \\DWDateTime();\n\t$sql = '\n\t\tSELECT msgid, title FROM dw_message\n\t\tWHERE uid_recipient = '.\\util\\mysql\\sqlval($uid).'\n\t\t\tAND ((read_datetime >= '.\\util\\mysql\\sqlval($now->format()).'\n\t\t\t\tOR read_datetime = 0)\n\t\t\t\tOR archive = 1)\n\t';\n\treturn \\util\\mysql\\query($sql, true);\n}", "function getAllUnreadMessage($fromId, $type = '') {\n\t\tglobal $ownerCd;\n\t\t$this->db->select('count(1) as total');\n\t\t$this->db->from('message m');\n\t\t$this->db->join('message_contact c', \"((c.user_id = '$fromId' AND c.performer_id = m.from_id) OR (c.performer_id = '$fromId' AND c.user_id = m.from_id))\", 'LEFT');\n\t\t$this->db->where(\"m.to_id = '$fromId' AND m.is_read = 0\");\n\t\t//if ($type != '') {\n\t\t\t$this->db->where(\"m.id NOT IN (Select message_id from message_delete where del_by_type = $type)\");\n\t\t\t$this->db->where(\"(m.from_type = 3 OR c.id NOT IN (Select contact_id from message_contact_block WHERE block_by_type = $type))\");\n\t\t//}\n\t\t$this->db->limit(1);\n\t\treturn $this->db->get_row();\n\t}", "public function getReceivedMessages ($userId)\n\t{\n\t\t$qb = $this->createQueryBuilder('m');\n\t\t$qb->where($qb->expr()->andX(\n\t\t\t$qb->expr()->eq('m.recipient', $userId),\n\t\t\t$qb->expr()->eq('m.deletedByRecipient', '?1')\n\t\t));\n\t\t$qb->orderBy('m.sentTime', 'DESC');\n\t\t$qb->setParameter(1, false);\n\n\t\t$messages = $qb->getQuery()->getResult();\n\t\treturn $messages;\n\n\t}", "public static function loadAllReceivedMessages($userId){\n $sql = \"SELECT * FROM Messages WHERE user_id = $userId\";\n $result = Message::$conn->query($sql);\n if ($result->num_rows > 0) {\n $allMsg = array();\n foreach ($result as $row){\n $newMsg = new Message($row['id'], $row['text'], $row['user_id'], $row['admin_id']);\n $allMsg[] = $newMsg;\n }\n return $allMsg;\n }\n return []; \n }", "public function getunReadNotifications($user_id, $role)\r\n {\r\n if ($role == 2 || $role == 5) {\r\n $query = \"SELECT * FROM notification WHERE status=0 AND to_user IN('$user_id','$role') ORDER BY id DESC\";\r\n $result = $this->conn->query($query);\r\n return $result;\r\n }\r\n \r\n // if user isn't a clerck\r\n $query = \"SELECT * FROM notification WHERE status=0 AND to_user='$user_id' ORDER BY id DESC\";\r\n $result = $this->conn->query($query);\r\n return $result;\r\n }", "public function messageByUserId($id){\n $messages = Message::where(function($query) use ($id){\n $query->where('from',auth()->user()->id);\n $query->where('to',$id);\n $query->where('type',0);\n })->orWhere(function($query) use ($id){\n $query->where('from',$id);\n $query->where('to',auth()->user()->id);\n $query->where('type',1);\n })->with('user')->get();\n\n return $messages;\n }", "public function unreadReceivedSiteMessages(User $from = null)\n {\n return $this->receivedSiteMessages($from)\n ->whereNull('read_at');\n }", "private function getNotifications(){\n // Ensure the API key is valid\n if($this->_validated === true) {\n if(!isset($_GET['uuid']))\n $this->throwError(26, $this->_language->get('api', 'invalid_get_contents'));\n\n // Remove -s from UUID (if present)\n $query = str_replace('-', '', $_GET['uuid']);\n\n // Ensure the user exists\n $this->_db = DB::getInstance();\n\n // Check UUID\n $user = $this->_db->query('SELECT id FROM nl2_users WHERE uuid = ?', array($query));\n\n if(!$user->count()){\n $this->throwError(16, $this->_language->get('api', 'unable_to_find_user'));\n }\n $user = $user->first()->id;\n\n $return = array('notifications' => array());\n\n // Get unread alerts\n $alerts = $this->_db->query('SELECT id, type, url, content_short FROM nl2_alerts WHERE user_id = ? AND `read` = 0', array($user));\n if($alerts->count()){\n foreach($alerts->results() as $result){\n $return['notifications'][] = array(\n 'type' => $result->type,\n 'message_short' => $result->content_short,\n 'message' => ($result->content) ? strip_tags($result->content) : $result->content_short,\n 'url' => rtrim(Util::getSelfURL(), '/') . URL::build('/user/alerts/', 'view=' . $result->id)\n );\n }\n }\n\n // Get unread messages\n $messages = $this->_db->query('SELECT nl2_private_messages.id, nl2_private_messages.title FROM nl2_private_messages WHERE nl2_private_messages.id IN (SELECT nl2_private_messages_users.pm_id as id FROM nl2_private_messages_users WHERE user_id = ? AND `read` = 0)', array($user));\n\n if($messages->count()){\n foreach($messages->results() as $result){\n $return['notifications'][] = array(\n 'type' => 'message',\n 'url' => Util::getSelfURL() . ltrim(URL::build('/user/messaging/', 'action=view&message=' . $result->id), '/'),\n 'message_short' => $result->title,\n 'message' => $result->title\n );\n }\n }\n\n $this->returnArray($return);\n\n } else $this->throwError(1, $this->_language->get('api', 'invalid_api_key'));\n }", "private function get_user_messages($game, $user_id)\n {\n $limit = config('app.chat_limit');\n return Message::where('game_id', $game->id)->where('user_id', $user_id)->paginate($limit);\n }", "public function listInboxMessage($userid, $from, $to){\n\t\tglobal $dblink;\n\t\t$v = $dblink->prepare(\"SELECT * FROM message WHERE msg_to=? ORDER BY time DESC LIMIT ?,?\");\n\t\t$v->bind_param(\"iii\", $userid, $from, $to);\n\t\t$v->execute();\n\t\t\n\t\t$data = get_result($v);\n\t\treturn $data;\n\t}", "public function unreadMessagesInConversation($userId, $convId)\n {\n\n return 0;\n }", "public function getChatMessages(\n int $user_id\n ) {\n\n $db = $this->conn;\n $appointment_id = $this->appointment_id;\n\n $messages_statement = $db->prepare(\"SELECT msg_from, date_added, msg, selectedfile FROM chat WHERE app_id = ?\");\n $messages_statement->bind_param(\"s\", $appointment_id);\n $messages_statement->execute();\n\n if (mysqli_error($db)) {\n $this->logError(__FUNCTION__, func_get_args(), \"Failed to fetch chat messages.\", \"\", mysqli_error($db));\n\n return [\"error\" => \"Failed to fetch chat messages.\", \"error_code\" => 1];\n }\n\n $messages = array();\n $messages_result = $messages_statement->get_result();\n\n while ($message = $messages_result->fetch_assoc()) {\n $message[\"date_added\"] = date(\"d/m h:i\", strtotime($message[\"date_added\"]));\n $message[\"msg\"] = stripslashes($message[\"msg\"]);\n $message[\"selectedfile\"] = explode(\"#?#\", $message[\"selectedfile\"]);\n\n array_push($messages, $message);\n }\n\n return $messages;\n }", "private function getUserUnread($user_id)\n {\n\n $notify = fetch_assoc(\n \"SELECT notification_log_id as id, title, message, sent FROM notification_log WHERE `read` = 0 AND user_id = $user_id ORDER BY sent;\"\n );\n\n if ($notify['error'] == true) {\n return false;\n }\n\n return $notify;\n }", "public function getUnreadMessagesAsTable($userid) {\n\t\t$messages = $this->db->getMessagesOfType($userid, MESSAGES_GET_UNREAD_MESSAGES);\n\t\tif ($messages == NULL) return $this->calloutInfoMessage($this->lh->translationFor(\"no_messages_in_list\"));\n\t\telse return $this->getMessageListAsTable($messages);\n\t}", "function list_message($user, $user_type='m_to_username', $read=1, $page=1, $no=20, $count=0,$m_type=0,$start_time=null) {\r\n $this->db->where($user_type, $user);\r\n \r\n //private message\r\n if($m_type==4)\r\n $this->db->where('m_type', 4);\r\n \r\n //for received message, $m_read is ignored\r\n if($user_type=='m_to_username'&&$read!=-1){\r\n $this->db->where('m_read', $read);\r\n }\r\n \r\n //count only\r\n if ($count){\r\n $new=0;\r\n $all=$this->db->from(self::MSG_TABLE)->count_all_results();\r\n //if $start_time given, then get the messages received after the $start_time\r\n if($start_time){\r\n $this->db->where('m_time >=',$start_time);\r\n $new =$this->db->from(self::MSG_TABLE)->count_all_results();\r\n return array($all,$new,$start_time);\r\n }\r\n return $all; \r\n }\r\n\r\n $this->db->order_by('m_id', 'DESC')->limit($no, count_offset($page, $no));\r\n $message = $this->db->get(self::MSG_TABLE);\r\n $rs = $message->result_array();\r\n foreach ($rs as $k => $v) {\r\n $rs[$k]['sub'] = json_decode($v['m_subject'], true);\r\n unset($rs[$k]['m_subject']);\r\n }\r\n return $rs;\r\n }", "public function getUnreadSMS() {\n\t\t// Login to the service if not already done.\n\t\t$this->_logIn();\n\n\t\t// Send HTTP POST request.\n\t\tcurl_setopt($this->_ch, CURLOPT_URL, 'https://www.google.com/voice/inbox/recent/sms/');\n\t\tcurl_setopt($this->_ch, CURLOPT_POST, FALSE);\n\t\tcurl_setopt($this->_ch, CURLOPT_RETURNTRANSFER, TRUE);\n\t\t$xml = curl_exec($this->_ch);\n\n\t\t// Load the \"wrapper\" xml (contains two elements, json and html).\n\t\t$dom = new DOMDocument();\n\t\t$dom->loadXML($xml);\n\t\t$json = $dom->documentElement->getElementsByTagName(\"json\")->item(0)->nodeValue;\n\t\t$json = json_decode($json);\n\n\t\t// Loop through all of the messages.\n\t\t$results = array();\n\t\tforeach($json->messages as $mid=>$convo) {\n\t\t\tif($convo->isRead == FALSE) {\n\t\t\t\t$results[] = $convo;\n\t\t\t}\n\t\t}\n\t\treturn $results;\n\t}", "public function getMessages(){\n\n $db = $this->db;\n $id = $this->id;\n\n $q = new QueryObject;\n\n try{\n $db->setTable('messages as m');\n \n $q->setRule(['reader_id', '=', $id]);\n $q->setJoin(['INNER', 'users as u', 'u.id', 'm.sender_id']);\n \n $q->setCondition('ORDER BY created ASC');\n \n $messages = $db->whereJoin($q, [\n 'u.name',\n 'u.nickname',\n \n 'm.content',\n 'm.status',\n 'm.created',\n ])->getAll();\n }\n catch(PDOException $e){\n echo $e->getMessage();\n }\n\n $poruke = [];\n\n foreach($messages as $m){\n\n $m['date-diff'] = contentAge($m['created']);\n die($m['date-diff']);\n\n if($m['status'])\n $poruke['read'][] = $m;\n else\n $poruke['unread'][] = $m;\n\n \n\n }\n\n return $poruke;\n }", "public function getUserMessageListOfUser($userId, $sqlSearch = null) {\n\t\tglobal $db;\n\t\t\n\t\t$array = [];\n\t\t\n\t\t$db -> query(\n\t\t\t'SELECT * '.\n\t\t\t'FROM `db_message` '.\n\t\t\t'WHERE `from_user_id` = \"'.$userId.'\" || `to_user_id` = \"'.$userId.'\" '.$sqlSearch.' '.\n\t\t\t'ORDER BY `date` DESC'\n\t\t);\n\t\tif($db -> numRows() > 0) {\n\t\t\twhile($r = $db -> fetchArray()) {\n\t\t\t\t$array[] = $r;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn($array);\n\t}", "function listMessages($service, $userId) {\n\n $opt_param = array();\n //////////////// temporary for test /////////////////\n\n if($_GET && array_key_exists('date', $_GET)) {\n $ini_date = date_create($_GET['date']);\n $end_date = date_add(date_create($_GET['date']), new DateInterval('P2D')) ;\n } else {\n $ini_date = date_create('02/28/2016');\n $end_date = date_create('03/01/2016');\n }\n $opt_param = array('q'=>'after:' . $ini_date->format('Y/m/d') . ' before:' . $end_date->format('Y/m/d') );\n //var_dump($opt_param);\n //////////////////////////////////////////////////////\n\n $pageToken = NULL;\n $messages = array();\n\n do {\n try {\n if ($pageToken) {\n $opt_param['pageToken'] = $pageToken;\n\n }\n $messagesResponse = $service->users_messages->listUsersMessages($userId, $opt_param);\n if ($messagesResponse->getMessages()) {\n $messages = array_merge($messages, $messagesResponse->getMessages());\n $pageToken = $messagesResponse->getNextPageToken();\n }\n } catch (Exception $e) {\n print 'An error occurred: ' . $e->getMessage();\n }\n } while ($pageToken);\n\n return $messages;\n}", "public function getUnreadNotification(User $user)\n {\n $qb = $this->createQueryBuilder('n');\n $qb\n ->innerJoin('n.userNotifications', 'un')\n ->where('un.isRead = 0')\n ->andWhere('un.user = :user')\n ->setParameter(':user', $user)\n ->orderBy('n.createdAt', 'DESC')\n ;\n\n return $qb->getQuery()->getResult();\n }", "public static function getUnreadMessages(Account $acc) {\n self::T(DB::MESSAGE)->db_set_order(array('created'=>true));\n $l = self::getAll(self::T(DB::MESSAGE), new DBBool(array(new DBCond('account', $acc->id), new DBCond('read_time', null))));\n self::T(DB::MESSAGE)->db_set_order();\n return $l;\n }", "public static function getMessagesFromLastReceivedMessage($userId, $lastId = 0)\n {\n $userId = intval($userId);\n $lastId = intval($lastId);\n\n if (empty($userId)) {\n return 0;\n }\n\n $messagesTable = Database::get_main_table(TABLE_MESSAGE);\n $userTable = Database::get_main_table(TABLE_MAIN_USER);\n\n $messages = array();\n\n $sql = \"SELECT m.*, u.user_id, u.lastname, u.firstname\n FROM $messagesTable as m\n INNER JOIN $userTable as u\n ON m.user_sender_id = u.user_id\n WHERE\n m.user_receiver_id = $userId AND\n m.msg_status = \" . MESSAGE_STATUS_UNREAD . \"\n AND m.id > $lastId\n ORDER BY m.send_date DESC\";\n\n $result = Database::query($sql);\n\n if ($result !== false) {\n while ($row = Database::fetch_assoc($result)) {\n $messages[] = $row;\n }\n }\n\n return $messages;\n }", "public static function numberOfUnreadMessages($IDuser)\n\t{\n\t\t$messagesTable=Messages::getTableSchema();\n\t\t$query=Messages::returnUndeletedMessages();\n\t\t$query->andWhere('(user_one=:user AND user_one_read=0) OR (user_two=:user AND user_two_read=0)',[':user'=>$IDuser]);\n\t\t$query->groupBy(\"$messagesTable->name.ID\");\n\t\treturn $query;\n\t}", "function getMessages($userid)\n {\n $stmt = $this->con->prepare(\"SELECT messages.id, (SELECT users.name FROM users WHERE users.id = messages.from_users_id) as `from`, (SELECT users.name FROM users WHERE users.id = messages.to_users_id) as `to`, messages.title, messages.message, messages.sentat FROM messages WHERE messages.to_users_id = ? ORDER BY messages.sentat DESC;\");\n $stmt->bind_param(\"i\", $userid);\n $stmt->execute();\n $stmt->bind_result($id, $from, $to, $title, $message, $sent);\n\n $messages = array();\n\n while ($stmt->fetch()) {\n $temp = array();\n\n $temp['id'] = $id;\n $temp['from'] = $from;\n $temp['to'] = $to;\n $temp['title'] = $title;\n $temp['message'] = $message;\n $temp['sent'] = $sent;\n\n array_push($messages, $temp);\n }\n\n return $messages;\n }", "public function getMessages($id) // Item and user must match\n {\n $user = Auth::user();\n $user_id = $user->id;\n $item_id = $id;\n \n \n //The query will return everything that the user received or send as message according to the item, it can return \n $messages = Message::with('user','receiver')\n ->where(['user_id'=> $user_id, 'item_id' => $item_id])\n ->orWhere(function($query) use($user_id, $item_id){\n $query->where(['receiver_id' => $user_id, 'item_id' => $item_id]);\n })\n ->get();\n \n return $messages;\n }", "public function listInboxMessageFull($userid){\n\t\tglobal $dblink;\n\n\t\t$v = $dblink->prepare(\"SELECT * FROM message WHERE msg_to=? ORDER BY time DESC\");\n\t\t$v->bind_param(\"i\", $userid);\n\t\t$v->execute();\n\t\t$v->store_result();\n\n\t\t$data = $v->num_rows;\n\t\treturn $data;\n\t}", "public static function getUnread($user, $lastRun)\n {\n $notifications = new Notification\\Listing();\n $notifications->setCondition('user = ? AND unread = 1 AND creationDate >= ?', [\n $user->getId(),\n $lastRun\n ]);\n $data = [];\n\n /** @var Notification $notification */\n foreach ($notifications->load() as $notification) {\n $date = new Zend_Date($notification->getCreationDate());\n $tmp = [\n 'id' => $notification->getId(),\n 'title' => $notification->getTitle(),\n 'message' => $notification->getMessage(),\n 'from' => '',\n 'date' => $date->get('YYYY-MM-dd HH:mm:ss'),\n 'type' => $notification->getType(),\n 'linkedElementType' => $notification->getLinkedElementType(),\n 'linkedElementId' => null\n ];\n if ($notification->getLinkedElement()) {\n $tmp['linkedElementId'] = $notification->getLinkedElement()->getId();\n }\n /** @var User $fromUser */\n $fromUser = User::getById($notification->getFromUser());\n if ($fromUser) {\n $tmp['from'] = $fromUser->getFirstname() . ' ' . $fromUser->getLastname();\n if (0 === strlen(trim($tmp['from']))) {\n $tmp['from'] = $fromUser->getName();\n }\n }\n $data[] = $tmp;\n }\n\n return $data;\n }", "function receivedMessagesFromSender(User $user)\n {\n return Message::where('recipient_id', $this->id)->where('sender_id', $user->id)->where('read', 0)->get();\n }", "public function getTopbarMessagesMenu($user) {\n\t\tif (!$user->userHasBasicPermission()) return '';\n $list = $this->db->getMessagesOfType($user->getUserId(), MESSAGES_GET_UNREAD_MESSAGES);\n\t\t$numMessages = count($list);\n\n\t\t$headerText = $this->lh->translationFor(\"you_have\").' '.$numMessages.' '.$this->lh->translationFor(\"unread_messages\");\n\t\t$result = $this->getTopbarMenuHeader(\"envelope-o\", $numMessages, CRM_UI_TOPBAR_MENU_STYLE_COMPLEX, $headerText, null, CRM_UI_STYLE_SUCCESS, false);\n\n foreach ($list as $message) {\n\t\t\t$from = $this->db->getDataForUser($message['user_from']);\n\t\t\t//if (empty($message[\"remote_user\"])) $remoteuser = $this->lh->translationFor(\"unknown\");\n\t\t\tif (empty($from['user'])) {\n\t\t\t $remoteuser = $this->lh->translationFor(\"unknown\");\n\t\t\t}else{\n\t\t\t //$remoteuser = $message[\"remote_user\"];\n\t\t\t $remoteuser = $from['user'];\n\t\t\t}\n\n\t if (empty($message[\"remote_avatar\"])) {\n\t\t\t\t$remoteavatar = CRM_DEFAULTS_USER_AVATAR;\n\t\t\t} else {\n\t\t\t\t$remoteavatar = $message[\"remote_avatar\"];\n\t }\n\t $result .= $this->getTopbarComplexElement($remoteuser, $message[\"message\"], $message[\"date\"], $remoteavatar, \"messages.php\");\n }\n\t\t$result .= $this->getTopbarMenuFooter($this->lh->translationFor(\"see_all_messages\"), \"messages.php\");\n\t\treturn $result;\n\t}", "function d4os_io_db_os_services_offline_message_retrievemessages($params) {\n $uuid = $params['Guid'];\n\n // get the messages\n $messages_list = array();\n d4os_io_db_set_active('os_offline_message');\n $messages = db_query(\"SELECT * FROM {offline_msgs} WHERE uuid = '%s'\", array($uuid));\n while ($message = db_fetch_object($messages)) {\n $messages_list[] = $message->message;\n }\n d4os_io_db_set_active('default');\n\n // delete the messages\n d4os_io_db_set_active('os_offline_message');\n db_query(\"DELETE FROM {offline_msgs} WHERE uuid = '%s'\", array($uuid));\n d4os_io_db_set_active('default');\n\n return array(\n 'success' => TRUE,\n 'data' => $messages_list,\n );\n}", "function getHistoryForUser($userId) {\n\n $stmt = $this->conn->prepare(\"SELECT * FROM n2u_message INNER JOIN n2u_message_to_receivers\nON n2u_message.id=n2u_message_to_receivers.message_id INNER JOIN n2u_user ON n2u_message_to_receivers.receiver_id=n2u_user.id\nwhere from_user_id=? or receiver_id=? order by DATE_SENT DESC \");\n $stmt->bind_param(\"ii\", $userId, $userId);\n $stmt->execute();\n $result = $stmt->get_result();\n $messages = array();\n if ($result->num_rows > 0) {\n while($row = $result->fetch_assoc()) {\n array_push($messages,$row);\n }\n }\n $stmt->close();\n return $messages;\n\n }", "public function fetchMessages( $params )\n {\n \n $db = $this->getDb();\n \n // filter für die query konfigurieren\n $condition = array();\n $condition['filters'] = array();\n $condition['filters']['mailbox'] = 'in';\n $condition['filters']['archive'] = false;\n\n $query = $db->newQuery( 'GroupwareMessage_Table' );\n\n $query->fetch\n (\n $condition,\n $params\n );\n \n return $query->getAll();\n \n }", "public function getMessagesFor($id)\n {\n Message::where('from', $id)->where('to', auth()->id())->update(['read' => true]);\n\n // get all messages between the authenticated user and the selected user\n $messages = Message::where(function($q) use ($id) {\n $q->where('from', auth()->id());\n $q->where('to', $id);\n })->orWhere(function($q) use ($id) {\n $q->where('from', $id);\n $q->where('to', auth()->id());\n })\n ->get();\n\n return response()->json($messages);\n }", "public function getMessageList($page, $userId);", "public function getOfflineMessages(User $user, $limit = 30)\n {\n $result = array();\n $stmt = $this->prepare(\"\n SELECT `users`.`name` AS `from`, `message`, `date`\n FROM `events`\n INNER JOIN `users` ON `users`.`id` = `userid`\n WHERE `type` = 'message' AND `to` = :to AND `date` > :date\n LIMIT :limit;\");\n $stmt->bindParam(':to', $user->getName(), PDO::PARAM_STR);\n $stmt->bindParam(':date', $user->getLastLogout(), PDO::PARAM_INT);\n $temp = PHP_INT_MAX;\n $stmt->bindParam(':limit', $temp, PDO::PARAM_INT);\n $stmt->execute();\n $result[$user->getName()] = $stmt->fetchAll(PDO::FETCH_ASSOC);\n $stmt->closeCursor();\n foreach($user->getChannels(true) as $name => $arr) {\n $stmt->bindParam(':to', $name, PDO::PARAM_STR);\n $stmt->bindParam(':date', $user->getLastLogout(), PDO::PARAM_INT);\n $stmt->bindParam(':limit', $limit, PDO::PARAM_INT);\n $stmt->execute();\n $result[$name] = $stmt->fetchAll(PDO::FETCH_ASSOC);\n $stmt->closeCursor();\n }\n return $result;\n }", "public static function getUnreadMessages($where_id){\n if(ctype_digit($where_id)){\n self::$db = Database::get();\n\t\t\t$data = self::$db->select(\"\n\t\t\t\t\tSELECT\n *\n\t\t\t\t\tFROM\n\t\t\t\t\t\t\".PREFIX.\"messages\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tto_userID = :userID\n AND\n date_read IS NULL\n AND\n to_delete = :to_delete\n\t\t\t\t\t\",\n\t\t\t\tarray(':userID' => $where_id, ':to_delete' => 'false'));\n $count = count($data);\n if($count > 0){\n return $count;\n }else{\n $count = \"0\";\n return $count;\n }\n\t\t\treturn $count;\n\t\t}else{\n $count = \"0\";\n return $count;\n }\n }", "function sf_get_pm_inbox($userid)\n{\n\tglobal $wpdb;\n\n\t# Get sorted lst of pm inbox titles first\n\t$titles = $wpdb->get_results(\n\t\t\t\"SELECT DISTINCT title, message_slug\n\t\t\t FROM \".SFMESSAGES.\"\n\t\t\t LEFT JOIN \".SFMEMBERS.\" ON \".SFMESSAGES.\".from_id = \".SFMEMBERS.\".user_id\n\t\t\t WHERE to_id = \".$userid.\" AND inbox=1\n\t\t\t ORDER BY sent_date DESC\");\n\tif(!$titles) return;\n\n\t# Now grab the full records\n\t$pms = $wpdb->get_results(\n\t\t\t\"SELECT SQL_CALC_FOUND_ROWS message_id, sent_date, from_id, to_id, title, message_status, inbox, sentbox, is_reply, message_slug, display_name\n\t\t\t FROM \".SFMESSAGES.\"\n\t\t\t LEFT JOIN \".SFMEMBERS.\" ON \".SFMESSAGES.\".from_id = \".SFMEMBERS.\".user_id\n\t\t\t WHERE to_id = \".$userid.\" AND inbox=1\n\t\t\t ORDER BY message_id ASC\");\n\n\treturn sf_sort_pms($titles, $pms);\n}", "public function getUnreadMessageCollection(){\n if(!$this->_unreadMessageCollection){\n $this->_unreadMessageCollection = $this->_messageFactory->create()->getCollection();\n $this->_unreadMessageCollection->addFieldToFilter('customer_email','')->addFieldToFilter('customer_id',$this->helper->getCustomerId())\n ->addFieldToFilter('is_read',0)\n ->setOrder('message_id','DESC')\n ->setPageSize(5);\n }\n \n return $this->_unreadMessageCollection;\n }", "public function unreadMessages(){\n //Find data where statas is 0 form contactUsMessage Table \n $unReadMessages = ContactUsMessage::where('status', 0)->paginate(10);\n \n //store data unreadmessages to user messages for use same view\n $usersMessages=$unReadMessages;\n\n $viewTitle= 'View All Unread Message';\n //return view with data \n return view('backEnd.user.viewUserMessage',['usersMessages'=>$usersMessages, 'viewTitle'=>$viewTitle ]);\n \n }", "public function findAllMessages(string $idUser, string $idFriend) {\n $tableName = self::TABLE_NAME;\n\n $req = $this->_db->prepare(\"\n SELECT $tableName.message, $tableName.createdAt, users.username FROM $tableName \n INNER JOIN users ON users.idUser = $tableName.idUser \n WHERE $tableName.idFriend = ? AND $tableName.idUser = ? OR $tableName.idFriend = ? AND $tableName.idUSer = ?\n ORDER BY $tableName.createdAt \n \");\n\n $req->execute([$idFriend, $idUser, $idUser, $idFriend]);\n\n return $req->fetchAll();\n\n }", "public function getUnreadConversations()\n {\n $conversations = Chat::conversations()->for(Auth::user())->get();\n \n if($conversations)\n {\n foreach($conversations as $conv)\n {\n $unreadCount = Chat::conversation($conv)->for(Auth::user())->unreadCount();\n\n $conv['unread'] = $unreadCount;\n\n $get_receiver_id = MessageNotification::where('conversation_id', $conv['id'])->where('user_id', '<>', Auth::user()->id)->first();\n\n $user = User::where('id', $get_receiver_id['user_id'])->first();\n\n $conv['user'] = $user;\n }\n\n $unread_list = view('host.renders.unread_conversations_list_render')->with('conversations', $conversations)->render();\n \n return response()->json(['status' => 'success', 'conversations' => $unread_list]);\n }\n return response()->json(['status' => 'success', 'conversations' => '']);\n }", "function newMessages($uid){\n\t\t\t\t$query = \"SELECT COUNT(id) AS unreadMsgs FROM messages WHERE rid='\".$uid.\"' AND viewed='1'\";\n\t\t\t\t$result = mysqli_query($conn, $query) or die('Error, query failed');\n\t\t\t\t$row = mysqli_fetch_array($result, MYSQL_ASSOC);\n\t\t\t\t$unreadMsgs = $row['unreadMsgs'];\n\t\t\t\treturn $unreadMsgs;\n\t\t\t}", "public function show($user_id)\n {\n $messages = Message::where('recipient_id', '=', $user_id)->get();\n\n return $messages;\n }", "public function findNotReadByUser(User $user) {\n $stmt = $this->db->prepare(\"SELECT NU.*, NU.id as 'notification_user.id', N.*, N.id as 'notification.id', U.id as 'user.id', U.login as 'user.login',\n U.name as 'user.name', U.email as 'user.email',\n U.description as 'user.description'\n FROM notification_user NU\n LEFT JOIN notification N ON NU.id_notification = N.id\n LEFT JOIN user U ON NU.id_user = U.id\n WHERE NU.id_user=? AND (NU.viewed IS NULL)\");\n $stmt->execute(array($user->getId()));\n $notification_db = $stmt->fetchAll(PDO::FETCH_ASSOC);\n $notifications = array();\n\n foreach ($notification_db as $notification_user) {\n $usuario = new User($notification_user[\"user.id\"], $notification_user[\"user.login\"],\n $notification_user[\"user.name\"],\n NULL/*password*/,\n $notification_user[\"user.email\"],\n $notification_user[\"user.description\"]);\n $notification = new Notification($notification_user[\"notification.id\"],NULL, NULL, $notification_user[\"title\"]);\n array_push($notifications, new Notification_user($notification_user[\"notification_user.id\"],\n $usuario, $notification,\n $notification_user[\"viewed\"]));\n }\n return $notifications;\n }", "public function get_all_unread_messages($limit = 5, $page) {\r\n\r\n\t\t$max = $limit;\r\n\t\tif ($page==1) {\r\n\t\t\t$start_from = 0;\r\n\t\t} else {\r\n\t\t\t$start_from = ($page-1)*$limit;\r\n\t\t}\r\n\t\tglobal $wpdb;\r\n\t\t$table = $wpdb->prefix.$this->table_name;\r\n\t\t$ID = $this->ID;\r\n\t\t$query = \"SELECT * FROM $table WHERE `user_id`= $ID AND `post_type` = 'user-message' ORDER BY `date` DESC \";\r\n\r\n\t\t$rows = $wpdb->get_results($query);\r\n\r\n\t\treturn $rows;\r\n\t}", "public function get_recieved(){\n\t\t\tglobal $db;\n\n\n\t\t\t$user_id = $_SESSION['logged_admin_id'];\n\n\t\t\t\n\t\t\t$sql = \"SELECT * FROM message \";\n\t\t\t$sql .= \" WHERE reciever_id = {$user_id} \";\n\t\t\t$sql .= \" ORDER BY stamp DESC \";\n\n\t\t\t$messages = $db->query($sql);\n\n\t\t\tconfirm($messages);\n\n\t\t\treturn $messages;\n\t\t}", "function message_get(&$messages,$user,$get_all=false,$sort_desc=false)\r\n\t{\r\n\t$messages=sql_query(\"SELECT user_message.ref, user.username AS owner, user_message.seen, message.created, message.expires, message.message, message.url \" .\r\n\t\t\"FROM `user_message`\r\n\t\tINNER JOIN `message` ON user_message.message=message.ref \" .\r\n\t\t\"LEFT OUTER JOIN `user` ON message.owner=user.ref \" .\r\n\t\t\"WHERE user_message.user='{$user}'\" .\r\n\t\t($get_all ? \" \" : \" AND message.expires > NOW()\") .\r\n\t\t($get_all ? \" \" : \" AND user_message.seen='0'\") .\r\n\t\t\" ORDER BY user_message.ref \" . ($sort_desc ? \"DESC\" : \"ASC\"));\r\n\treturn(count($messages) > 0);\r\n\t}", "function unreadMessageCountForSender(User $user)\n {\n return count(Message::where('recipient_id', $this->id)->where('sender_id', $user->id)->where('read', 0)->get());\n }", "public function getMasterInboxFOUsersInter($user=NULL)\n {\n\n if($user)\n $condition=\"((t.recipient_id='\".$user.\"' and m.type='0')and (t.sender_id in (select identifier from User where type in('client','contributor'))))\";\n else\n $condition=\"((t.recipient_id in (select identifier from User where type in('client','contributor'))) and (t.sender_id in (select identifier from User where type in('client','contributor'))))\";\n\n $msg_query=\"select\n m.id as messageId,m.type,ticket_id,sender_id,recipient_id,IF(m.type='1',recipient_id,sender_id) as userid,\n IF(m.type='1',sender_id,recipient_id) as receiverId,\n u.email, title as Subject,content,\n IF(DATE(m.created_at)=DATE(NOW()),DATE_FORMAT(m.created_at , '%H:%i'),DATE_FORMAT(m.created_at , '%d/%m/%Y %H:%i')) as receivedDate,\n m.created_at as receivedDate_sort,\n\t\t\t\t\t\tm.status from Ticket t\n INNER JOIN Message m ON m.ticket_id=t.id\n INNER JOIN User u ON u.identifier=t.recipient_id\n INNER JOIN User u1 ON u1.identifier=t.sender_id\n where \".$condition.\" and t.status in ('0','1')\n Group By t.sender_id,t.recipient_id,m.id ORDER BY m.created_at DESC\";\n\n //echo $msg_query;exit;\n\n if(($result=$this->getQuery($msg_query,true))!=NULL)\n return $result;\n else\n return \"No Messages Found\";\n\n }", "public function getMessageListOfUserWithUser($fromUserId, $toUserId, $sqlSearch = null) {\n\t\tglobal $db;\n\t\t\n\t\t$array = [];\n\t\t\n\t\t$db -> query(\n\t\t\t'SELECT * '.\n\t\t\t'FROM `db_message` '.\n\t\t\t'WHERE ((`from_user_id` = \"'.$fromUserId.'\" && `to_user_id` = \"'.$toUserId.'\") || (`to_user_id` = \"'.$fromUserId.'\" && `from_user_id` = \"'.$toUserId.'\")) '.$sqlSearch.' '.\n\t\t\t'ORDER BY `date` ASC '.\n\t\t\t'LIMIT 100'\n\t\t);\n\t\tif($db -> numRows() > 0) {\n\t\t\twhile($r = $db -> fetchArray()) {\n\t\t\t\t$array[$r['message_id']] = $r;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn($array);\n\t}", "public function privateMessages(User $user)\n {\n $tempUser = \\Illuminate\\Support\\Facades\\Auth::user();\n\n $pvCommunication = Chat::with('user')\n ->where(['user_id' => $tempUser->id,\n 'receiver_id' => $user->id])->orWhere(function ($query) use ($user) {\n $query->where(['user_id' => $user->id, 'receiver_id' => \\Illuminate\\Support\\Facades\\Auth::user()->id]);\n })->get();\n return response()->json($pvCommunication);\n }", "public function findMessagesWithUser(int $userId, bool $isArchived)\n {\n $querybuilder = $this->createQueryBuilder('m');\n\n $querybuilder\n ->addSelect('(\n SELECT COUNT(re.isRead)\n FROM App\\Entity\\Reply re\n WHERE re.isRead = false\n and IDENTITY(re.sender) != :userId\n and re.isReceiverCopyDeleted = false\n and m.id = IDENTITY(re.message)\n ) as unreadItems');\n\n $querybuilder\n ->andwhere('(s.id = :userId and m.isArchivedBySender = :isArchived)\n or (r.id = :userId and m.isArchivedByRecepient = :isArchived)')\n ->andWhere('(s.id = :userId and m.isSenderCopyDeleted = false)\n or (r.id = :userId and m.isRecepientCopyDeleted = false)')\n ;\n\n return $querybuilder\n ->orderBy('m.dateSent', 'DESC')\n ->join('m.sender', 's')\n ->join('m.recepient', 'r')\n ->setParameters(array(\n 'userId' => $userId,\n 'isArchived' => $isArchived\n )\n )\n ->getQuery()\n ->getResult();\n }", "public function listOutboxMessage($userid, $from, $to){\n\t\tglobal $dblink;\n\t\t$v = $dblink->prepare(\"SELECT * FROM message WHERE msg_from=? ORDER BY time DESC LIMIT ?,?\");\n\t\t$v->bind_param(\"iii\", $userid, $from, $to);\n\t\t$v->execute();\n\t\t$v->store_result();\n\n\t\t$data = get_result($v);\n\t\treturn $data;\n\t}", "public function getMessagesFor($id)\n {\n App\\Message::where('emisor', $id)->where('receptor', Auth::user()->id)->update(['readmessage' => true]);\n $messages = App\\Message::where(function ($q) use ($id) {\n $q->where('emisor', Auth::user()->id);\n $q->where('receptor', $id);\n })->orWhere(function ($q) use ($id) {\n $q->where('emisor', $id);\n $q->where('receptor', Auth::user()->id);\n })->get();\n\n return response()->json($messages);\n }", "public function listOutboxMessageFull($userid){\n\t\tglobal $dblink;\n\t\t$v = $dblink->prepare(\"SELECT * FROM message WHERE msg_from=? ORDER BY time DESC\");\n\t\t$v->bind_param(\"i\", $userid);\n\t\t$v->execute();\n\t\t$v->store_result();\n\n\t\t$data = $v->num_rows;\n\n\t\t\n\t\treturn $data;\n\t}", "public function recieverchatUsers($userid){\r\n $sqlQuery = \"\r\n SELECT * FROM \".$this->chatUsersTable.\" WHERE userid IN\r\n (SELECT DISTINCT reciever_userid FROM \".$this->chatTable.\" WHERE sender_userid = '$userid')\";\r\n return $this->getData($sqlQuery);\r\n }", "public function getUnreadVoicemail() {\n\t\t// Login to the service if not already done.\n\t\t$this->_logIn();\n\n\t\t// Send HTTP POST request.\n\t\tcurl_setopt($this->_ch, CURLOPT_URL, 'https://www.google.com/voice/inbox/recent/voicemail/');\n\t\tcurl_setopt($this->_ch, CURLOPT_POST, FALSE);\n\t\tcurl_setopt($this->_ch, CURLOPT_RETURNTRANSFER, TRUE);\n\t\t$xml = curl_exec($this->_ch);\n\n\t\t// Load the \"wrapper\" xml (contains two elements, json and html)\n\t\t$dom = new DOMDocument();\n\t\t$dom->loadXML($xml);\n\t\t$json = $dom->documentElement->getElementsByTagName(\"json\")->item(0)->nodeValue;\n\t\t$json = json_decode($json);\n\n\t\t// Loop through all of the messages.\n\t\t$results = array();\n\t\tforeach($json->messages as $mid=>$convo) {\n\t\t\tif($convo->isRead == FALSE) {\n\t\t\t\t$results[] = $convo;\n\t\t\t}\n\t\t}\n\t\treturn $results;\n\t}", "public function getUnreadMsgCount ($userId)\n\t{\n\t\t$qb = $this->createQueryBuilder('m');\n\t\t$qb->where($qb->expr()->andX(\n\t\t\t$qb->expr()->eq('m.recipient', $userId),\n\t\t\t$qb->expr()->eq('m.read', '?1')\n\t\t));\n\t\t$qb->setParameter(1, false);\n\n\t\t$messages = $qb->getQuery()->getResult();\n\t\treturn count($messages);\n\n\t}", "public function getLevelOneWithUnreadMsg($app_user_id, $timestamp) {\n\t\t$sent_time = date(\"Y-m-d H:i:s\", $timestamp);\n\t\t$category_results = $this->conn->query(\"SELECT DISTINCT category_id, category_name,second_level FROM view_sp_res WHERE user_id IN ( SELECT sp_id FROM appuserssps WHERE app_user_id = $app_user_id AND active = 1 ) OR user_id IN ( SELECT residence_id FROM residencesindividuals WHERE individual_id = $app_user_id AND active = 1 ) OR user_id IN ( SELECT first_user_id FROM appusersappusers WHERE second_user_id = $app_user_id AND (active = 1 OR active = 0) ) OR user_id IN ( SELECT second_user_id FROM appusersappusers WHERE first_user_id = $app_user_id AND (active = 1 OR active = 0) )\");\n\t\t$no_of_rows_category = $category_results->num_rows;\n\t\tif ($no_of_rows_category > 0) //if data exist\n\t\t{\n\t\t\t$i = 0;\n\t\t\twhile( $row = $category_results->fetch_assoc() )\n\t\t\t{\n\t\t\t\t$category_id = $row['category_id'];\n\t\t\t\t//$user_id = $row['user_id'];\n\t\t\t\t$message_results = $this->conn->query(\"SELECT message_id FROM messages WHERE sent_time > '\".$sent_time.\"' AND (receiver_id =0 OR receiver_id = $app_user_id) AND sender_id IN (SELECT DISTINCT user_id FROM view_sp_res WHERE category_id = $category_id AND user_id IN ( SELECT sp_id FROM appuserssps WHERE app_user_id = $app_user_id ) OR user_id IN ( SELECT residence_id FROM residencesindividuals WHERE individual_id = $app_user_id ) OR user_id IN ( SELECT first_user_id FROM appusersappusers WHERE second_user_id = $app_user_id ) OR user_id IN ( SELECT second_user_id FROM appusersappusers WHERE first_user_id = $app_user_id ) )\");\n\t\t\t\t$no_of_msg = $message_results->num_rows;\n\t\t\t\t$rows[] = array(\n\t\t\t\t\t'category_id'=> $row['category_id'],\n\t\t\t\t\t'category_name' => $row['category_name'],\n\t\t\t\t\t'second_level' => $row['second_level'], \n\t\t\t\t\t'no_of_msg' => $no_of_msg \n\t\t\t\t);\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t$return = array(\n\t\t\t\t'message'=>\"Ok\",\n\t\t\t\t'categories' => $rows \n\t\t\t);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$return = array(\n\t\t\t\t'message'=>\"No Result Found.\" \n\t\t\t); \n\t\t}\n\t\treturn $return;\n\t\t\n\t}", "public function getMessages(User $user, Request $request)\n {\n $messages = Message::whereFrom($user->id)->orWhere('to', $user->id)->get();\n\n return response()->json($messages);\n }", "public function getMessagesFor($id)\n {\n Message::where('from', $id)->where('to', auth()->id())->update(['read' => true]);\n\n $messages = Message::where(function($q) use ($id) {\n $q->where('from', auth()->id());\n $q->where('to', $id);\n })->orWhere(function($q) use ($id) {\n $q->where('from', $id);\n $q->where('to', auth()->id());\n })\n ->get(); // (a = 1 AND b=2) OR (c=1 OR d=2) Two functions and if statements between them.\n \n return response()->json($messages);\n }", "function get_messages_for($for_user) {\r\n\r\n\t$sql = \"SELECT * FROM messages WHERE to_user = $for_user\";\r\n\t$result = mysql_query($sql) or die(mysql_error());\r\n\t$messages = array();\r\n\twhile ($message = mysql_fetch_assoc($result)){\r\n\t\tarray_push($messages,$message);\r\n\t}\r\n\treturn $messages;\r\n\r\n}", "public function pageGetMyMessages()\n {\n $page = isset($_POST['page']) && (int)($_POST['page']) ? (int)($_POST['page']) : 1;\n $length = isset($_POST['length']) && (int)($_POST['length']) ? (int)($_POST['length']) : 10;\n\n $res = message_api::getMyMessages($this->uid, $page, $length);\n if (!empty($res['data'])) {\n return interface_func::setData(\n [\n 'messageList' => $res['data'],\n ]\n );\n }\n\n return interface_func::setMsg(3002);\n }", "public static function get_new_messages()\n {\n $table = Database::get_main_table(TABLE_MESSAGE);\n if (!api_get_user_id()) {\n return false;\n }\n $sql = \"SELECT * FROM $table\n WHERE\n user_receiver_id=\" . api_get_user_id() . \" AND\n msg_status=\" . MESSAGE_STATUS_UNREAD;\n $result = Database::query($sql);\n $i = Database::num_rows($result);\n\n return $i;\n }", "public function actionGetNotifications( $userId ){\n Yii::$app->response->format = Response::FORMAT_JSON;\n $newNotifications = Notification::find()->andWhere(['to_user' => $userId ])->andWhere(['is_read' => Notification::UNREAD])->limit(10)->orderBy(['created_at' => SORT_DESC ])->all();\n $oldNotifications = Notification::find()->andWhere(['to_user' => $userId ])->andWhere(['is_read' => Notification::READ])->limit(10)->orderBy(['created_at' => SORT_DESC ])->all();\n return [ ArrayHelper::toArray($newNotifications) , $oldNotifications ] ;\n }", "public function getMessages() {\n $parameters = StatusAPI::getParameters();\n if ($_GET['action'] == 'messages') {\n $db = new \\Status\\DB\\Messages();\n if (isset($parameters['field']['q']) || isset($parameters['field']['id'])) {//show a only array messages ID \n if(isset($parameters['field']['id'])){ \n if(is_numeric($parameters['field']['id'])){\n $response = $db->getMessageID($parameters['field']['id']);\n }else{\n StatusAPI::response(422, \"error\", \"The id value is incorrect\");\n exit;\n }\n }else{ \n $response = $db->getMessage($parameters);\n }\n print_r(json_encode($response));\n } else { //show a array with all messages \n if(isset($_GET['id'])){\n if(is_numeric($_GET['id'])){ \n $response = $db->getMessageID($_GET['id']);\n }else{\n StatusAPI::response(422, \"error\", \"The id value is incorrect\"); \n exit;\n }\n }else{ \n $response = $db->getAllMessages();\n }\n print_r(json_encode($response));\n }\n } else {\n StatusAPI::response(400,\"error\", \"Bad request\");\n }\n }", "public function getMessages();", "public function getMessages();", "public function getMessages();", "public function getMessages();", "public static function unread()\n {\n try {\n\n if(!Auth::check()) {\n\n throw new \\Exception('An authenticated user does not exist.');\n\n }\n\n $alerts = [];\n\n foreach(Auth::user()->alerts as $alert) {\n\n if((boolean)$alert->is_viewed == false) {\n $alerts[$alert->id] = $alert;\n }\n\n }\n\n foreach(Auth::user()->businesses as $business) {\n\n foreach($business->alerts as $alert) {\n if((boolean)$alert->is_viewed == false) {\n $alerts[$alert->id] = $alert;\n }\n }\n\n }\n\n return collect($alerts);\n\n } catch (\\Exception $e) {\n\n return collect();\n\n }\n\n }", "function getAllNotificationByUserId($userId)\n {\n $result = $this->conn->prepare(\"SELECT * FROM `notifications` WHERE `user_id` = ?\");\n $result->bind_param(\"i\", $userId);\n $result->execute();\n $notifications = $result->get_result()->fetch_all(MYSQLI_ASSOC);\n $result->close();\n return $notifications;\n }", "public function get($user_id, $read = false, $limit = false){\n\t\treturn $this->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'Notification.user_id' => $user_id,\n\t\t\t\t'Notification.read' => $read\n\t\t\t),\n\t\t\t'limit' => $limit,\n\t\t));\n\t}", "public function getMessagesAction()\n {\n $this->get('logger')->info('get message for user');\n $messages = $this->get('alert.manager')->getUserMessages();\n $results = array();\n foreach($messages as $message){\n $results[] = array(\n 'content' => $message->getContent(), \n 'type' => $message->getMessageType()->getId()\n ); \n }\n \n $response = array(\"code\" => 100 ,\"count\" => sizeof($results) , \"messages\" => $results);\n //you can return result as JSON\n return new Response(json_encode($response));\n }", "function show_messages($userid){\r\n include(\"mysql_connection.php\");\r\n $messages = array();\r\n\r\n $sql = \"SELECT sender_id, receiver_id, body, send_time FROM message\r\n WHERE receiver_id = '$userid' order by send_time desc\";\r\n $result = mysqli_query($connect, $sql);\r\n\r\n while($data = mysqli_fetch_object($result)){\r\n $messages[] = array( 'send_time' => $data->send_time,\r\n 'sender_id' => $data-> sender_id,\r\n 'uid' => $userid,\r\n 'body' => $data->body);\r\n }\r\n return $messages;\r\n\r\n }", "public function get_user_notifications($read = 1)\r\n {\r\n $total = 10;\r\n $total_unread = total_rows('tblnotifications', array(\r\n 'isread' => $read,\r\n 'touserid' => get_staff_user_id()\r\n ));\r\n if (is_numeric($read)) {\r\n $this->db->where('isread', $read);\r\n }\r\n if ($total_unread > $total) {\r\n $_diff = $total_unread - $total;\r\n $total = $_diff + $total;\r\n }\r\n\r\n $this->db->where('touserid', get_staff_user_id());\r\n $this->db->limit($total);\r\n $this->db->order_by('date', 'desc');\r\n return $this->db->get('tblnotifications')->result_array();\r\n }", "function get_unread_user_ids($user_id) {\r\n\t\t$unread = $this->get_conv_unread_folder($user_id);\r\n\t\tif ( !$this->is_dir_empty($unread) ) {\r\n\t\t\tforeach (glob( $unread . '*.txt') as $user) {\r\n\t\t\t\t$modified = filemtime( $user );\r\n\t\t\t\t$id = str_replace('.txt','', basename($user));\r\n\t\t\t\t$ids[] = array(\r\n\t\t\t\t\r\n\t\t\t\t\t'id' => $id,\r\n\t\t\t\t\t'modified' => $modified\r\n\t\t\t\t\t\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (isset($ids)) {\r\n\t\t\t$this->array_sort_by_column($ids, 'modified', SORT_DESC);\r\n\t\t\tforeach($ids as $k => $v) {\r\n\t\t\t\t$ordered[] = $v['id'];\r\n\t\t\t}\r\n\t\t\treturn $ordered;\r\n\t\t} else {\r\n\t\t\treturn '';\r\n\t\t}\r\n\t}", "function messages_list($user, $options = array('mode' => 'recieved'))\r\n{\r\n\r\n\tif(!is_numeric($options['offset']))\r\n\t{\r\n\t\t$options['offset'] = 0;\r\n\t}\r\n\tif(!is_numeric($options['limit']))\r\n\t{\r\n\t\t$options['limit'] = MESSAGES_ITEMS_PER_PAGE;\r\n\t}\r\n\tif(isset($options['user']) && !is_numeric($options['user']))\r\n\t{\r\n\t\tdie('Icke numerisk konversationspartner har angivits, dödar scriptet.');\r\n\t}\r\n\r\n\t$query = 'SELECT m.id, m.timestamp, CONCAT(mm.title, m.title) AS title, m.recipient_status, SUBSTRING(CONCAT(mm.message, m.message), 1, 150) AS message, ';\r\n\tif($options['mode'] == 'recieved')\r\n\t{\r\n\t\t$query .= 'm.sender AS sender_id, slogin.username AS sender_username, sinfo.birthday AS sender_birthday, ';\r\n\t\t$query .= 'sinfo.gender AS sender_gender, sinfo.image AS sender_image ';\r\n\t\t$query .= 'FROM messages_new AS m, mass_messages AS mm, login AS slogin, userinfo AS sinfo ';\r\n\t\t$query .= 'WHERE mm.id = m.mass_message_id AND slogin.id = m.sender AND sinfo.userid = m.sender AND m.recipient = \"' . $user . '\" ';\r\n\t\t$query .= 'AND m.recipient_status != 2 ';\r\n\t}\r\n\telseif($options['mode'] == 'sent')\r\n\t{\r\n\t\t$query .= 'm.recipient AS recipient_id, rlogin.username AS recipient_username, rinfo.birthday AS recipient_birthday, ';\r\n\t\t$query .= 'rinfo.gender AS recipient_gender, rinfo.image AS recipient_image ';\r\n\t\t$query .= 'FROM messages_new AS m, mass_messages AS mm, login AS rlogin, userinfo AS rinfo ';\r\n\t\t$query .= 'WHERE mm.id = m.mass_message_id AND rlogin.id = m.recipient AND rinfo.userid = m.recipient AND m.sender = \"' . $user . '\" ';\r\n\t}\r\n\telseif($options['mode'] == 'conversation' || $options['mode'] == 'associated')\r\n\t{\r\n\t\t$query .= 'm.discussion AS discussion, m.recipient AS recipient_id, m.sender AS sender_id, rlogin.username AS recipient_username, ';\r\n\t\t$query .= 'slogin.username AS sender_username, rinfo.birthday AS recipient_birthday, sinfo.birthday AS sender_birthday, ';\r\n\t\t$query .= 'rinfo.gender AS recipient_gender, sinfo.gender AS sender_gender, ';\r\n\t\t$query .= 'rinfo.image AS recipient_image, sinfo.image AS sender_image ';\r\n\t\t$query .= 'FROM messages_new AS m, mass_messages AS mm, login AS slogin, login AS rlogin, userinfo AS sinfo, userinfo AS rinfo ';\r\n\t\t$query .= 'WHERE mm.id = m.mass_message_id AND rlogin.id = m.recipient AND slogin.id = m.sender AND rinfo.userid = m.recipient AND sinfo.userid = m.sender ';\r\n\t\t$query .= 'AND ((m.sender = \"' . $options['user'] . '\" AND m.recipient = \"' . $user . '\") OR ';\r\n\t\t$query .= '(m.sender = \"' . $user . '\" AND m.recipient = \"' . $options['user'] . '\")) ';\r\n\t\tif($options['mode'] == 'associated')\r\n\t\t{\r\n\t\t\t$query .= 'AND (discussion > ' . ($options['discussion']-5) . ' AND discussion < ' . ($options['discussion']+5) . ') ';\r\n\t\t}\r\n\t}\r\n\tswitch($options['order'])\r\n\t{\r\n\t\tcase 'sender':\r\n\t\t\t$query .= 'ORDER BY m.sender ';\r\n\t\tbreak;\r\n\t\tcase 'recipient':\r\n\t\t\t$query .= 'ORDER BY m.recipient ';\r\n\t\tbreak;\r\n\t\tcase 'title':\r\n\t\t\t$query .= 'ORDER BY m.title ';\r\n\t\tbreak;\r\n\t\tdefault:\r\n\t\t\t$query .= 'ORDER BY m.id ';\r\n\t\tbreak;\r\n\t}\r\n\tif($options['direction'] == 'ASC')\r\n\t{\r\n\t\t$query .= 'ASC ';\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$query .= 'DESC ';\r\n\t}\r\n\t$query .= 'LIMIT ' . $options['offset'] . ', ' . $options['limit'];\r\n\t\r\n\t\r\n\t\r\n\t$result = mysql_query($query) or die(report_sql_error($query));\r\n\tif(mysql_num_rows($result) == 0)\r\n\t{\r\n\t\techo 'Här var det tomt!';\r\n\t}\r\n\telse\r\n\t{\r\n\t\tif($options['mode'] == 'recieved')\r\n\t\t{\r\n\t\t\techo '<form action=\"' . $_SERVER['PHP_SELF'] . '?action=delete\" method=\"post\">';\r\n\t\t}\r\n\t\techo '</div><table style=\"width: 100%; margin-bottom: 3px;\" cellspacing=\"0\">';\r\n\t\techo '<tr style=\"font-weight: bold;\">';\r\n\r\n\t\tif(strlen($_GET['action']) < 1)\r\n\t\t{\r\n\t\t\t$link_action = 'inbox';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$link_action = $_GET['action'];\r\n\t\t}\r\n\r\n\t\tif($options['mode'] == 'conversation' || $options['mode'] == 'recieved' || $options['mode'] == 'associated')\r\n\t\t{\r\n\t\t\techo '<td style=\"width: 150px;\">';\r\n\t\t\tif($options['mode'] != 'associated')\r\n\t\t\t{\r\n\t\t\t\tif($options['direction'] == 'ASC' && $options['order'] == 'sender')\r\n\t\t\t\t{\r\n\t\t\t\t\t$link_direction = 'DESC';\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$link_direction = 'ASC';\r\n\t\t\t\t}\r\n\t\t\t\techo '<a href=\"' . $_SERVER['PHP_SELF'] . '?action=' . $link_action . '&order=sender&direction=' . $link_direction;\r\n\t\t\t\tif($options['mode'] == 'conversation')\r\n\t\t\t\t{\r\n\t\t\t\t\techo '&user=' . $_GET['user'];\r\n\t\t\t\t}\r\n\t\t\t\techo '\">Avsändare</a>';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\techo 'Avsändare';\r\n\t\t\t}\r\n\t\t\techo '</td>';\r\n\t\t}\r\n\t\tif($options['mode'] == 'conversation' || $options['mode'] == 'sent')\r\n\t\t{\r\n\t\t\tif($options['direction'] == 'ASC' && $options['order'] == 'recipient')\r\n\t\t\t{\r\n\t\t\t\t$link_direction = 'DESC';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$link_direction = 'ASC';\r\n\t\t\t}\r\n\t\t\techo '<td style=\"width: 150px;\">';\r\n\t\t\techo '<a href=\"' . $_SERVER['PHP_SELF'] . '?action=' . $link_action . '&order=recipient&direction=' . $link_direction;\r\n\t\t\tif($options['mode'] == 'conversation')\r\n\t\t\t{\r\n\t\t\t\techo '&user=' . $_GET['user'];\r\n\t\t\t}\r\n\t\t\techo '\">Mottagare</a></td>';\r\n\t\t}\r\n\t\techo '<td style=\"width: 150px;\">';\r\n\t\tif($options['mode'] != 'associated')\r\n\t\t{\r\n\t\t\tif(($options['direction'] == 'DESC' && $options['order'] == 'time') || !isset($options['order']))\r\n\t\t\t{\r\n\t\t\t\t$link_direction = 'ASC';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$link_direction = 'DESC';\r\n\t\t\t}\r\n\t\t\techo '<a href=\"' . $_SERVER['PHP_SELF'] . '?action=' . $link_action . '&order=time&direction=' . $link_direction;\r\n\t\t\tif($options['mode'] == 'conversation')\r\n\t\t\t{\r\n\t\t\t\techo '&user=' . $_GET['user'];\r\n\t\t\t}\r\n\t\t\techo '\">Tid</a>';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\techo 'Tid';\r\n\t\t}\r\n\t\techo '</td>';\r\n\r\n\t\techo '<td>';\r\n\t\tif($options['mode'] != 'associated')\r\n\t\t{\r\n\t\t\tif(($options['order'] == 'title' || !isset($options['order'])) && $options['direction'] == 'ASC')\r\n\t\t\t{\r\n\t\t\t\t$link_direction = 'DESC';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$link_direction = 'ASC';\r\n\t\t\t}\r\n\t\t\techo '<a href=\"' . $_SERVER['PHP_SELF'] . '?action=' . $link_action . '&order=title&direction=' . $link_direction;\r\n\t\t\tif($options['mode'] == 'conversation')\r\n\t\t\t{\r\n\t\t\t\techo '&user=' . $_GET['user'];\r\n\t\t\t}\r\n\t\t\techo '\">Rubrik</a>';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\techo 'Rubrik';\r\n\t\t}\r\n\t\techo '</td>';\r\n\t\tif($options['mode'] == 'recieved')\r\n\t\t{\r\n\t\t\techo '<td style=\"width: 50px;\">Radera</td>';\r\n\t\t}\r\n\t\techo '</tr>';\r\n\t\t$background = '#e7e7e7';\r\n\t\twhile($data = mysql_fetch_assoc($result))\r\n\t\t{\r\n\t\t\techo '<tr style=\"';\r\n\t\t\tif($data['recipient_status'] == 0)\r\n\t\t\t{\r\n\t\t\t\techo 'font-weight: bold;';\r\n\t\t\t}\r\n\t\t\tif($options['mode'] == 'associated' && $data['discussion'] == $options['discussion'])\r\n\t\t\t{\r\n\t\t\t\techo 'background-image: url(\\'\\');';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\techo 'background: ' . $background . ';';\r\n\t\t\t}\r\n\t\t\techo '\";>';\r\n\t\t\tif($options['mode'] == 'conversation' || $options['mode'] == 'recieved' || $options['mode'] == 'associated')\r\n\t\t\t{\r\n\t\t\t\t$tooltip_sender = '<b>' . $data['sender_username'] . '</b>';\r\n\t\t\t\tif($data['sender_image'] == 1 || $data['sender_image'] == 2)\r\n\t\t\t\t{\r\n\t\t\t\t\t$tooltip_sender .= '<br /><img src=' . IMAGE_URL . '/images/users/thumb/' . $data['sender_id'] . '.jpg />';\r\n\t\t\t\t}\r\n\t\t\t\tif($data['sender_gender'] == 'P')\r\n\t\t\t\t{\r\n\t\t\t\t\t$tooltip_sender .= '<br />Kön: kille';\r\n\t\t\t\t}\r\n\t\t\t\telseif($data['sender_gender'] == 'F')\r\n\t\t\t\t{\r\n\t\t\t\t\t$tooltip_sender .= '<br />Kön: tjej';\r\n\t\t\t\t}\r\n\t\t\t\tif(isset($data['sender_birthday']) && $data['sender_birthday'] != '0000-00-00')\r\n\t\t\t\t{\r\n\t\t\t\t\t$tooltip_sender .= '<br />Ålder: ' . date_get_age($data['sender_birthday']) . 'år';\r\n\t\t\t\t}\r\n\t\t\t\tif(strlen($data['sender_location']) > 1)\r\n\t\t\t\t{\r\n\t\t\t\t\t$tooltip_sender .= '<br />Bor: ' . $data['sender_location'];\r\n\t\t\t\t}\r\n\t\t\t\techo '<td><a href=\"/traffa/profile.php?id=' . $data['sender_id'] . '\" onmouseover=\"return makeTrue(domTT_activate(this, event, \\'content\\', \\'' . $tooltip_sender . '\\', \\'trail\\', true));\">' . $data['sender_username'] . '</a></td>';\r\n\t\t\t}\r\n\t\t\tif($options['mode'] == 'conversation' || $options['mode'] == 'sent')\r\n\t\t\t{\r\n\t\t\t\t$tooltip_recipient = '<b>' . $data['recipient_username'] . '</b>';\r\n\t\t\t\tif($data['recipient_image'] == 1 || $data['recipient_image'] == 2)\r\n\t\t\t\t{\r\n\t\t\t\t\t$tooltip_recipient .= '<br /><img src=' . IMAGE_URL . '/images/users/thumb/' . $data['recipient_id'] . '.jpg />';\r\n\t\t\t\t}\r\n\t\t\t\tif($data['recipient_gender'] == 'P')\r\n\t\t\t\t{\r\n\t\t\t\t\t$tooltip_recipient .= '<br />Kön: kille';\r\n\t\t\t\t}\r\n\t\t\t\telseif($data['recipient_gender'] == 'F')\r\n\t\t\t\t{\r\n\t\t\t\t\t$tooltip_recipient .= '<br />Kön: tjej';\r\n\t\t\t\t}\r\n\t\t\t\tif(isset($data['recipient_birthday']) && $data['recipient_birthday'] != '0000-00-00')\r\n\t\t\t\t{\r\n\t\t\t\t\t$tooltip_recipient .= '<br />Ålder: ' . date_get_age($data['recipient_birthday']) . 'år';\r\n\t\t\t\t}\r\n\t\t\t\tif(strlen($data['recipient_location']) > 1)\r\n\t\t\t\t{\r\n\t\t\t\t\t$tooltip_recipient .= '<br />Bor: ' . $data['recipient_location'];\r\n\t\t\t\t}\r\n\t\t\t\techo '<td><a href=\"/traffa/profile.php?id=' . $data['recipient_id'] . '\" ';\r\n\t\t\t\techo 'onmouseover=\"return makeTrue(domTT_activate(this, event, \\'content\\', \\'' . $tooltip_recipient . '\\', \\'trail\\', true));\">';\r\n\t\t\t\techo $data['recipient_username'] . '</a></td>';\r\n\t\t\t}\r\n\t\t\t$tooltip_title = '<b>' . $data['title'] . '</b><br />' . str_replace('\\'', '\\\\\\'', str_replace('\"', '\\\\\\\\', $data['message']));\r\n\t\t\tif(strlen($data['message']) == 150)\r\n\t\t\t{\r\n\t\t\t\t$tooltip_title .= '...';\r\n\t\t\t}\r\n\r\n\t\t\t$tooltip_title = str_replace(array(\"\\n\", \"\\r\"), '', $tooltip_title);\r\n\t\t\t\r\n\t\t\techo '<td>' . fix_time($data['timestamp']) . '</td>';\r\n\t\t\t$data['title'] = (strlen($data['title']) == 0) ? '[Rubrik saknas]' : $data['title'];\r\n\t\t\techo '<td><a href=\"' . $_SERVER['PHP_SELF'] . '?action=read&message_id=' . $data['id'] . '\" ';\r\n\t\t\techo 'onmouseover=\"return makeTrue(domTT_activate(this, event, \\'content\\', \\'' . $tooltip_title . '\\', \\'trail\\', true));\">' . $data['title'] . '</a></td>';\r\n\t\t\tif($options['mode'] == 'recieved')\r\n\t\t\t{\r\n\t\t\t\techo '<td><input name=\"' . $data['id'] . '\" value=\"delete\" type=\"checkbox\" style=\"border: 5x solid blue;\" /></td>';\r\n\t\t\t}\r\n\t\t\techo '</tr>';\r\n\t\t\tif($background == '#e7e7e7')\r\n\t\t\t{\r\n\t\t\t\t$background = '#ffffff';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$background = '#e7e7e7';\r\n\t\t\t}\r\n\t\t}\r\n\t\techo '</table>';\r\n\t}\r\n\tif($options['mode'] != 'associated')\r\n\t{\r\n\t\techo '<div class=\"grey_faded_div\">';\r\n\t\techo '<strong>Sida:</strong> ';\r\n\t\tif($options['mode'] == 'conversation')\r\n\t\t{\r\n\t\t\t$query = 'SELECT MAX(discussion) AS messages FROM messages_new WHERE ';\r\n\t\t\t$query .= '(sender = ' . $user . ' AND recipient = ' . $options['user'] . ') OR ';\r\n\t\t\t$query .= '(sender = ' . $options['user'] . ' AND recipient = ' . $user . ')';\r\n\t\t}\r\n\t\telseif($options['mode'] == 'recieved')\r\n\t\t{\r\n\t\t\t$query = 'SELECT messages_recieved AS messages FROM userinfo WHERE userid = ' . $_SESSION['login']['id'] . ' LIMIT 1';\r\n\t\t}\r\n\t\telseif($options['mode'] == 'sent')\r\n\t\t{\r\n\t\t\t$query = 'SELECT messages_sent AS messages FROM userinfo WHERE userid = ' . $_SESSION['login']['id'] . ' LIMIT 1';\r\n\t\t}\r\n\t\t$result = mysql_query($query) or die(report_sql_error($query));\r\n\t\t$data = mysql_fetch_assoc($result);\r\n\t\t$pages = ceil($data['messages'] / MESSAGES_ITEMS_PER_PAGE);\r\n\t\tfor($i = 0; $i < $pages; $i++)\r\n\t\t{\r\n\t\t\tif(($options['offset'] / MESSAGES_ITEMS_PER_PAGE) == $i)\r\n\t\t\t{\r\n\t\t\t\techo '<strong>' . ($i+1) . '</strong> ';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\techo '<a href=\"' . $_SERVER['PHP_SELF'] . '?action=' . $link_action;\r\n\t\t\t\tif(isset($options['order']))\r\n\t\t\t\t{\r\n\t\t\t\t\techo '&order=' . $options['order'];\r\n\t\t\t\t}\r\n\t\t\t\tif(isset($options['direction']))\r\n\t\t\t\t{\r\n\t\t\t\t\techo '&direction=' . $options['direction'];\r\n\t\t\t\t}\r\n\t\t\t\tif(isset($options['user']))\r\n\t\t\t\t{\r\n\t\t\t\t\techo '&user=' . $options['user'];\r\n\t\t\t\t}\r\n\t\t\t\techo '&offset=' . ($i * MESSAGES_ITEMS_PER_PAGE);\r\n\t\t\t\techo '\">' . ($i+1) . '</a> ';\r\n\t\t\t}\r\n\t\t}\r\n\t\techo '</div>';\r\n\t}\r\n\t//echo '<div>';\r\n\tif($options['mode'] == 'recieved')\r\n\t{\r\n\t\techo '<input type=\"submit\" value=\"Ta bort markerade\" class=\"button\" style=\"float: right; margin: 3px;\" onclick=\"return confirm(\\'Detta kommer ta bort alla markerade inlägg. Vill du fortsätta?\\');\" /> ';\r\n\t\techo '</form>';\r\n\t}\r\n\tif($options['mode'] == 'recieved')\r\n\t{\r\n\t\techo '<input type=\"button\" class=\"button\" style=\"float: left; margin: 3px;\" value=\"Gå till utkorgen\" onclick=\"window.location=\\'' . $_SERVER['PHP_SELF'];\r\n\t\techo '?action=list_sent\\';\" /> ';\r\n\t}\r\n\telse\r\n\t{\r\n\t\techo '<input type=\"button\" style=\"float: left; margin: 3px;\" class=\"button\" value=\"Gå till inkorgen\" onclick=\"window.location=\\'' . $_SERVER['PHP_SELF'];\r\n\t\techo '\\';\" /> ';\r\n\t}\r\n\tif($options['mode'] == 'associated')\r\n\t{\r\n\t\techo ' <input type=\"button\" class=\"button\" style=\"float: left; margin: 3px;\" value=\"Visa hela konversationen\" onclick=\"window.location=\\'' . $_SERVER['PHP_SELF'];\r\n\t\techo '?action=conversation&user=' . $options['user'] . '\\';\" /> ';\r\n\t}\r\n\t//echo '</div>';\r\n\techo '<br style=\"clear: both;\" />';\r\n}", "public function getUnreadCountForUser($user_id) {\n\t\t$sql = $this->db->prepare(\n\t\t\t\"SELECT p.name, count(c.id) as unread\n\t\t\t FROM comments c\n\t\t\t JOIN products p ON p.id = c.product_id\n\t\t\t WHERE c.user_id = ?\n\t\t\t\tAND `read` = 0\n\t\t\t GROUP BY p.name\"\n\t\t);\n\n\t\t$sql->bind_param(\"i\", $user_id);\n\n\t\tif (! $sql->execute()) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$result = $sql->get_result();\n\t\t\n\t\treturn $result->fetch_all();\n\t}", "public function allForUser($userId)\n {\n $maxNotifications = Config('asgard.workflow.config.notification.max_notification_to_show',10);\n return $this->model->where('user_id','=',$userId)->orderBy('created_at', 'desc')->take($maxNotifications)->get();\n }", "function getLastMessages($user=NULL){\n \tif($user == NULL){\n \t\t$user = getUser();\n \t}else{\n \t\t$user = save($user);\n \t}\n \n $returner = array();\n \t$listedUsers[] = $user;\n $session = '';\n $db = new db();\n $newMessagesSQL = $db->shiftResult($db->query(\"SELECT * FROM `messages` WHERE receiver='$user' OR sender='$user' ORDER BY timestamp DESC LIMIT 0, 5\"),'id');\n\tforeach($newMessagesSQL AS $newMessagesData){\n\t\t$session .= \"newMessage \".$newMessagesData['id'];\n\t\t\n\t\t\n\t\t//each sender is only listed once\n\t\tif(!in_array($newMessagesData['sender'], $listedUsers)){\n\t $text = substr($newMessagesData['text'], 0, 100);\n\n\t\t//define everything that is important\t \n\t\t$return['messageId'] = $newMessagesData['id'];\n\t\t$return['sender'] = $newMessagesData['sender'];\n\t\t$return['receiver'] = $newMessagesData['receiver'];\n\t\t$return['timestamp'] = $newMessagesData['timestamp'];\n\t\t$return['text'] = $newMessagesData['text'];\n\t\t\n\t\t$return['seen'] = $newMessagesData['seen'];\n\t\t$return['read'] = $newMessagesData['read'];\n\t\t$return['senderUsername'] = useridToUsername($newMessagesData['sender']);\n\t\t\n\t\t//add sender too users array\n\t\t$listedUsers[] = $newMessagesData['sender'];\n\t\t\n\t\t//add all return data to returner array\n\t\t$returner[] = $return;\n\t\t\t\n\t\t}\n\t}\n\t\n\treturn $returner;\n\t\n }", "function getMessages($userid, $buddyId, $limit){\n $db = new db();\n $chatSQL = $db->shiftResult($db->query(\"SELECT * FROM messages WHERE sender='$userid' && receiver='\".save($buddyId).\"' OR sender='\".save($buddyId).\"' && receiver='\".save($userid).\"' ORDER BY timestamp DESC LIMIT \".save($limit).\"\"),'id');\n \n\t\tforeach($chatSQL AS $chatData){\n\t\t\t$id = $chatData['id'];\n\t\t\t$return[$id] = $chatData;\n\t\t}\n\t\treturn $return;\n\t}", "public function unread()\n {\n $count = Auth::user()->newMessagesCount();\n return ['msg_count' => $count];\n }", "public function getUnread(Request $request) {\n $username = $request->username;\n $user = User::where('name', $username)->get()->first(); // Must use find() or first() to get entire object.\n $messages = $user->unreadNotifications;\n return response::json($messages);\n }", "function unreadMessageCount()\n {\n return count(Message::where('recipient_id', $this->id)->where('read', 0)->get());\n }", "public function get_mymessages($applicant_id){//get messages of an aplicant\n\t\t$this->db->where(array(\n\t\t\t\t'A.applicant_id'\t=>\t$applicant_id,\n\t\t\t\t'A.InActive'\t\t=>\t0\n\t\t\t));\n\t\t$this->db->order_by('A.message_sent','asc');\n\t\t$this->db->join(\"company_info B\",\"B.company_id = A.company_sender\",\"left outer\");\n\t\t$query = $this->db->get(\"applicant_inbox A\");\n\t\treturn $query->result();\t\t\n\t}", "public function getMessages()\n {\n //PEMBAHASAN MENGENAI EAGER LOADING BISA DI CARI DI DAENGWEB.ID\n return Grub_message::with('user')->get();\n }", "public function getFnfWithUnreadMsgForApp($app_user_id, $timestamp) {\n\t\t$sent_time = date(\"Y-m-d H:i:s\", $timestamp);\n\t\t//$user_results = $this->conn->query(\"SELECT user_id, user_role, first_name, last_name, organisation_name,image_url FROM users WHERE user_id IN ( SELECT first_user_id FROM appusersappusers WHERE second_user_id = $app_user_id AND active = 1 ) OR user_id IN ( SELECT second_user_id FROM appusersappusers WHERE first_user_id = $app_user_id AND active = 1 )\");\n\t\t$user_results = $this->conn->query(\"SELECT user_id, user_role, first_name, last_name, organisation_name,image_url,email FROM users WHERE user_id IN ( SELECT first_user_id FROM appusersappusers WHERE second_user_id = $app_user_id AND active = 1 )\");\n\t\t$no_of_rows_user = $user_results->num_rows;\n\t\tif ($no_of_rows_user > 0) //if data exist\n\t\t{\n\t\t\t$i = 0;\n\t\t\twhile( $row = $user_results->fetch_assoc() )\n\t\t\t{\n\t\t\t\t$user_id = $row['user_id'];\n\t\t\t\t$message_results = $this->conn->query(\"SELECT message_id FROM messages WHERE sent_time > '\".$sent_time.\"' AND receiver_id = $app_user_id AND (sender_id <> $app_user_id AND sender_id = $user_id)\");\n\t\t\t\t$no_of_msg = $message_results->num_rows;\n\t\t\t\t$rows[] = array(\n\t\t\t\t\t'user_id'=> $row['user_id'],\n\t\t\t\t\t'user_role'=> $row['user_role'],\n\t\t\t\t\t'first_name' => $row['first_name'],\n\t\t\t\t\t'last_name' => $row['last_name'], \n\t\t\t\t\t'organisation_name' => $row['organisation_name'], \n\t\t\t\t\t'image_url' => ROOT_PATH.\"images/profile/\".$row['image_url'],\n\t\t\t\t\t'email' => $row['email'], \n\t\t\t\t\t'sender_id' => $row['user_id'], \n\t\t\t\t\t'receiver_id' => $app_user_id, \n\t\t\t\t\t'active' => 1,\n\t\t\t\t\t'no_of_msg' => $no_of_msg \n\t\t\t\t);\n\t\t\t\t$i++;\n\t\t\t}\n//\t\t\t$return = array(\n//\t\t\t\t'message'=>\"Ok\",\n//\t\t\t\t'categories' => $rows \n//\t\t\t);\n\t\t}\n\t\t\n\t\t$user_results1 = $this->conn->query(\"SELECT user_id, user_role, first_name, last_name, organisation_name,image_url,email FROM users WHERE user_id IN ( SELECT second_user_id FROM appusersappusers WHERE first_user_id = $app_user_id AND active = 1 )\");\n\t\t$no_of_rows_user1 = $user_results1->num_rows;\n\t\tif ($no_of_rows_user1 > 0) //if data exist\n\t\t{\n\t\t\t$i = 0;\n\t\t\twhile( $row1 = $user_results1->fetch_assoc() )\n\t\t\t{\n\t\t\t\t$user_id = $row1['user_id'];\n\t\t\t\t$message_results1 = $this->conn->query(\"SELECT message_id FROM messages WHERE sent_time > '\".$sent_time.\"' AND receiver_id = $app_user_id AND (sender_id <> $app_user_id AND sender_id = $user_id)\");\n\t\t\t\t$no_of_msg1 = $message_results1->num_rows;\n\t\t\t\t$rows[] = array(\n\t\t\t\t\t'user_id'=> $row1['user_id'],\n\t\t\t\t\t'user_role'=> $row1['user_role'],\n\t\t\t\t\t'first_name' => $row1['first_name'],\n\t\t\t\t\t'last_name' => $row1['last_name'], \n\t\t\t\t\t'organisation_name' => $row1['organisation_name'], \n\t\t\t\t\t'image_url' => ROOT_PATH.\"images/profile/\".$row1['image_url'],\n\t\t\t\t\t'email' => $row1['email'],\n\t\t\t\t\t'sender_id' => $app_user_id, \n\t\t\t\t\t'receiver_id' => $row1['user_id'], \t\t\t\t\t\n\t\t\t\t\t'active' => 1,\n\t\t\t\t\t'no_of_msg' => $no_of_msg1 \n\t\t\t\t);\n\t\t\t\t$i++;\n\t\t\t}\n//\t\t\t$return = array(\n//\t\t\t\t'message'=>\"Ok\",\n//\t\t\t\t'categories' => $rows \n//\t\t\t);\n\t\t}\n\t\t\n\t\t$user_results2 = $this->conn->query(\"SELECT user_id, user_role, first_name, last_name, organisation_name,image_url,email FROM users WHERE user_id IN ( SELECT second_user_id FROM appusersappusers WHERE first_user_id = $app_user_id AND active = 0 )\");\n\t\t$no_of_rows_user2 = $user_results2->num_rows;\n\t\tif ($no_of_rows_user2 > 0) //if data exist\n\t\t{\n\t\t\t$i = 0;\n\t\t\twhile( $row2 = $user_results2->fetch_assoc() )\n\t\t\t{\n\t\t\t\t$user_id = $row2['user_id'];\n\t\t\t\t//$message_results2 = $this->conn->query(\"SELECT message_id FROM messages WHERE receiver_id = $app_user_id AND (sender_id <> $app_user_id AND sender_id = $user_id)\");\n\t\t\t\t//$no_of_msg2 = $message_results2->num_rows;\n\t\t\t\t$rows[] = array(\n\t\t\t\t\t'user_id'=> $row2['user_id'],\n\t\t\t\t\t'user_role'=> $row2['user_role'],\n\t\t\t\t\t'first_name' => $row2['first_name'],\n\t\t\t\t\t'last_name' => $row2['last_name'], \n\t\t\t\t\t'organisation_name' => $row2['organisation_name'], \n\t\t\t\t\t'image_url' => ROOT_PATH.\"images/profile/\".$row2['image_url'],\n\t\t\t\t\t'email' => $row2['email'],\n\t\t\t\t\t'sender_id' => $app_user_id, \n\t\t\t\t\t'receiver_id' => $row2['user_id'], \t\t\t\t\t\n\t\t\t\t\t'active' => 0,\n\t\t\t\t\t'no_of_msg' => 0 \n\t\t\t\t);\n\t\t\t\t$i++;\n\t\t\t}\n//\t\t\t$return = array(\n//\t\t\t\t'message'=>\"Ok\",\n//\t\t\t\t'categories' => $rows \n//\t\t\t);\n\t\t}\n\t\t\n\t\t$user_results3 = $this->conn->query(\"SELECT user_id, user_role, first_name, last_name, organisation_name,image_url,email FROM users WHERE user_id IN ( SELECT first_user_id FROM appusersappusers WHERE second_user_id = $app_user_id AND active = 0 )\");\n\t\t$no_of_rows_user3 = $user_results3->num_rows;\n\t\tif ($no_of_rows_user3 > 0) //if data exist\n\t\t{\n\t\t\t$i = 0;\n\t\t\twhile( $row3 = $user_results3->fetch_assoc() )\n\t\t\t{\n\t\t\t\t$user_id = $row3['user_id'];\n\t\t\t\t//$message_results = $this->conn->query(\"SELECT message_id FROM messages WHERE receiver_id = $app_user_id AND (sender_id <> $app_user_id AND sender_id = $user_id)\");\n\t\t\t\t//$no_of_msg = $message_results->num_rows;\n\t\t\t\t$rows[] = array(\n\t\t\t\t\t'user_id'=> $row3['user_id'],\n\t\t\t\t\t'user_role'=> $row3['user_role'],\n\t\t\t\t\t'first_name' => $row3['first_name'],\n\t\t\t\t\t'last_name' => $row3['last_name'], \n\t\t\t\t\t'organisation_name' => $row3['organisation_name'], \n\t\t\t\t\t'image_url' => ROOT_PATH.\"images/profile/\".$row3['image_url'],\n\t\t\t\t\t'email' => $row3['email'],\n\t\t\t\t\t'sender_id' => $row3['user_id'], \n\t\t\t\t\t'receiver_id' => $app_user_id, \n\t\t\t\t\t'active' => 0,\n\t\t\t\t\t'no_of_msg' => 0 \n\t\t\t\t);\n\t\t\t\t$i++;\n\t\t\t}\n//\t\t\t$return = array(\n//\t\t\t\t'message'=>\"Ok\",\n//\t\t\t\t'categories' => $rows \n//\t\t\t);\n\t\t}\n\t\t\n\t\t$return = array(\n\t\t\t'message'=>\"Ok\",\n\t\t\t'categories' => $rows \n\t\t);\n\t\t\n//\t\telse\n//\t\t{\n//\t\t\t$return = array(\n//\t\t\t\t'message'=>\"No Result Found.\" \n//\t\t\t); \n//\t\t}\n\t\treturn $return;\n\t\t\n\t}", "function message_seen_all($user,$seen_type=MESSAGE_ENUM_NOTIFICATION_TYPE_SCREEN)\r\n\t{\r\n\t$messages = array();\r\n\tif (message_get($messages,$user))\r\n\t\t{\r\n\t\tforeach($messages as $message)\r\n\t\t\t{\r\n\t\t\tmessage_seen($message['ref']);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function get_messages()\n {\n $this->token_checker();\n\n $call = \"messages\";\n $key = ($call.$this->_hash);\n $result = $this->_get_cache($key);\n\n if(!$result)\n {\n $this->_api_headers();\n $url = $this->_apiUrl .$call;\n $this->_call_api($url, 'GET');\n $result = $this->result;\n\n $expire = 3600;\n\n if(isset($result[0]->expire))\n {\n $expire = $result[0]->expire;\n }\n\n $this->_set_cache($key,$result,$expire);\n }\n return $result;\n }", "static function show_received_message($id_user){\n if(!is_int($id_user))\n return false;\n $query = self::$PDO->prepare(\"SELECT t1.*,concat(t2.fname,' ',t2.name) as recipient_name,concat(t3.fname,' ',t3.name) as sender_name from \".self::$prefix.\"messages t1,\".self::$prefix.\"users t2, \".self::$prefix.\"users t3 where id_recipient = :id_user and t1.id_recipient = t2.ID AND t1.id_sender = t3.ID and (deleted IS NULL OR deleted=0)\");\n $query->execute(array(':id_user'=>$id_user));\n return $query->fetchAll();\n }", "function getMailsByUser( $idU )\n\t\t{\n\t\t\t$result = $this->mysql->query(\"select * from mail where idUser = '$idU' \");\n\t\t}" ]
[ "0.79135704", "0.759831", "0.75201666", "0.7447418", "0.7446079", "0.73776466", "0.73085904", "0.72688997", "0.72414637", "0.72213125", "0.7213601", "0.7213519", "0.7210579", "0.70359", "0.70350164", "0.70189375", "0.6976784", "0.6958053", "0.6955718", "0.695092", "0.694587", "0.68869007", "0.6881101", "0.6871641", "0.6870306", "0.68630564", "0.68622947", "0.68368196", "0.68243706", "0.6819802", "0.68049914", "0.6797806", "0.67733973", "0.6767734", "0.673014", "0.6726611", "0.67112094", "0.6711071", "0.6677234", "0.6664048", "0.66631335", "0.66470295", "0.6633775", "0.6631481", "0.66219497", "0.66088575", "0.66078204", "0.65952796", "0.65844667", "0.6579904", "0.65701276", "0.65679026", "0.65631187", "0.6557495", "0.6554413", "0.6548448", "0.6545762", "0.6536611", "0.6534692", "0.6501426", "0.65004855", "0.6492896", "0.6490595", "0.6478639", "0.64772636", "0.6471843", "0.64567274", "0.6456054", "0.64486045", "0.64414495", "0.64317405", "0.6425618", "0.6405933", "0.6402427", "0.6384865", "0.6384865", "0.6384865", "0.6384865", "0.637688", "0.63760936", "0.63759285", "0.63701934", "0.636827", "0.6367783", "0.6364511", "0.63606876", "0.635734", "0.63543123", "0.6351233", "0.63440406", "0.6342135", "0.63371676", "0.6329017", "0.632793", "0.6325382", "0.63211143", "0.6316503", "0.6310585", "0.6308489", "0.62961936" ]
0.8461219
0
return the last read message id for a given user Params: User_Id user id of who to get messages for returns: the last unre
вернуть идентификатор последнего прочитанного сообщения для заданного пользователя Параметры: User_Id идентификатор пользователя, для которого нужно получить сообщения возвращает: последний непрочитанный
function GetLastReadMessageId( $User_Id ){ if( ! is_int( $User_Id ) ) return( "Param error: User_Id - wrong type or empty." ); $Sql = "SELECT MAX( LastReadMessage_Id ) FROM ChatConversationParticipants WHERE User_Id = $User_Id LIMIT 1"; $result = mysql_query( $Sql ); $errno = mysql_errno(); if( 0 != $errno ) return( "mysql error: $errno" ); $row = mysql_fetch_row( $result ); mysql_free_result( $result ); return( (int)$row[0] ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function lastMessageByUserId($user_id,$cantMess){\r\n $q = Doctrine_Query::create()\r\n ->from(\"Message m , m.Conversation \")\r\n ->leftJoin(\"m.Conversation c\")\r\n ->where(\"(c.user_to_id = $user_id OR c.user_from_id = $user_id)\")\r\n ->andWhere(\"m.user_id <> $user_id\")\r\n ->andWhere(\"(c.user_to_id=$user_id AND m.looking_user_to=1) OR (c.user_from_id=$user_id AND m.looking_user_from=1)\")\r\n ->orderBy(\"m.date desc\")\r\n ->limit($cantMess);\r\n return $q->execute();\r\n }", "function getLastMessages($user=NULL){\n \tif($user == NULL){\n \t\t$user = getUser();\n \t}else{\n \t\t$user = save($user);\n \t}\n \n $returner = array();\n \t$listedUsers[] = $user;\n $session = '';\n $db = new db();\n $newMessagesSQL = $db->shiftResult($db->query(\"SELECT * FROM `messages` WHERE receiver='$user' OR sender='$user' ORDER BY timestamp DESC LIMIT 0, 5\"),'id');\n\tforeach($newMessagesSQL AS $newMessagesData){\n\t\t$session .= \"newMessage \".$newMessagesData['id'];\n\t\t\n\t\t\n\t\t//each sender is only listed once\n\t\tif(!in_array($newMessagesData['sender'], $listedUsers)){\n\t $text = substr($newMessagesData['text'], 0, 100);\n\n\t\t//define everything that is important\t \n\t\t$return['messageId'] = $newMessagesData['id'];\n\t\t$return['sender'] = $newMessagesData['sender'];\n\t\t$return['receiver'] = $newMessagesData['receiver'];\n\t\t$return['timestamp'] = $newMessagesData['timestamp'];\n\t\t$return['text'] = $newMessagesData['text'];\n\t\t\n\t\t$return['seen'] = $newMessagesData['seen'];\n\t\t$return['read'] = $newMessagesData['read'];\n\t\t$return['senderUsername'] = useridToUsername($newMessagesData['sender']);\n\t\t\n\t\t//add sender too users array\n\t\t$listedUsers[] = $newMessagesData['sender'];\n\t\t\n\t\t//add all return data to returner array\n\t\t$returner[] = $return;\n\t\t\t\n\t\t}\n\t}\n\t\n\treturn $returner;\n\t\n }", "public function lastMessage($user)\n {\n $fromMe = $this->sendMessages->where('to', $user->id);\n\n // Getting the messages that were send to us by the given user\n $fromHim = $this->receivedMessages->where('from', $user->id);\n\n // Merge the collections\n $messages = $fromMe->merge($fromHim);\n\n // Sort then and take the last message in the chat\n $message = $messages->sortByDesc('created_at')->first();\n\n return $message;\n }", "public function getUnreadMessageNumber( $user_id , $room_id ){\n if(empty($user_id) || empty($room_id)){\n return false;\n }\n //get the time of new read in the designated user and the designated room\n $readTime = DB::table('room_users')\n ->where('user_id', '=' , $user_id)\n ->where('room_id' , '=' , $room_id)\n ->value('user_read_time');\n // DB::connection()->enableQueryLog();\n //get unread message the number\n $unreadMessageNumber = DB::table('chats')\n ->where('room_id' , $room_id)\n ->where('send_time' , '>' , $readTime)\n ->count();\n // $sql = DB::getQueryLog();\n return $unreadMessageNumber;\n }", "function get_last_message_for($for_user) {\r\n\r\n\t$sql = \"SELECT * FROM messages WHERE to_user = $for_user ORDER BY date_sent DESC LIMIT 1\";\r\n\t$result = mysql_query($sql) or die(mysql_error());\r\n\t$message = mysql_fetch_assoc($result);\r\n\treturn $message;\r\n\r\n}", "public static function getMessagesFromLastReceivedMessage($userId, $lastId = 0)\n {\n $userId = intval($userId);\n $lastId = intval($lastId);\n\n if (empty($userId)) {\n return 0;\n }\n\n $messagesTable = Database::get_main_table(TABLE_MESSAGE);\n $userTable = Database::get_main_table(TABLE_MAIN_USER);\n\n $messages = array();\n\n $sql = \"SELECT m.*, u.user_id, u.lastname, u.firstname\n FROM $messagesTable as m\n INNER JOIN $userTable as u\n ON m.user_sender_id = u.user_id\n WHERE\n m.user_receiver_id = $userId AND\n m.msg_status = \" . MESSAGE_STATUS_UNREAD . \"\n AND m.id > $lastId\n ORDER BY m.send_date DESC\";\n\n $result = Database::query($sql);\n\n if ($result !== false) {\n while ($row = Database::fetch_assoc($result)) {\n $messages[] = $row;\n }\n }\n\n return $messages;\n }", "function GetUnreadMessages( $User_Id ){\n\n\tif( ! is_int( $User_Id ) )\n\t\treturn( \"Param error: User_Id - wrong type or empty.\" );\n\t\t\n\t$Messages = array();\n\t$Sql = \"SELECT \n\t\t\t\tm.Conversation_Id AS Conversation_Id, m.Id AS MessageId, \n\t\t\t\tm.FromUser_Id as FromUser_Id, CONCAT( u.FirstName, ' ', u.LastName ) AS FromUser_Name,\n\t\t\t\tm.DateSent as DateSent,\n\t\t\t\tm.Message\n\t\t\tFROM ChatMessages m,User u,ChatConversationParticipants p\n\t\t\tWHERE \n\t\t\t\t(m.FromUser_Id = u.Id) AND\n\t\t\t\t(m.Id > p.LastReadMessage_Id) AND\n\t\t\t\t(m.Conversation_Id = p.Conversation_Id) AND\n\t\t\t\t(p.User_Id = $User_Id)\n\t\t\tORDER BY m.Id ASC\";\n\t$result = mysql_query( $Sql );\n\t$errno = mysql_errno();\n\tif( 0 != $errno )\n\t\treturn( \"mysql error: $errno\" );\n\twhile( $row = mysql_fetch_array( $result, MYSQL_ASSOC ) )\n\t\t$Messages[] = $row;\n\tmysql_free_result( $result );\n\treturn( $Messages );\n}", "public static function getGetLastChatMessageEdit($chat_id, $user_id)\n {\n $db = ezcDbInstance::get();\n $stmt = $db->prepare('SELECT lh_msg.* FROM lh_msg INNER JOIN ( SELECT id FROM lh_msg WHERE chat_id = :chat_id AND user_id = :user_id ORDER BY id DESC LIMIT 1 OFFSET 0) AS items ON lh_msg.id = items.id');\n $stmt->bindValue( ':chat_id',$chat_id,PDO::PARAM_INT);\n $stmt->bindValue( ':user_id',$user_id,PDO::PARAM_INT);\n $stmt->setFetchMode(PDO::FETCH_ASSOC);\n $stmt->execute();\n $row = $stmt->fetch();\n\n return $row;\n }", "public static function countMessagesFromLastReceivedMessage($userId, $lastId = 0)\n {\n $userId = intval($userId);\n $lastId = intval($lastId);\n\n if (empty($userId)) {\n return 0;\n }\n\n $messagesTable = Database::get_main_table(TABLE_MESSAGE);\n\n $conditions = array(\n 'where' => array(\n 'user_receiver_id = ?' => $userId,\n 'AND msg_status = ?' => MESSAGE_STATUS_UNREAD,\n 'AND id > ?' => $lastId\n )\n );\n\n $result = Database::select('COUNT(1) AS qty', $messagesTable, $conditions);\n\n if (!empty($result)) {\n $row = current($result);\n\n return $row['qty'];\n }\n\n return 0;\n }", "public function getIdFromLastMessage(): int\n {\n $message = $this->createQueryBuilder('m')\n ->orderBy('m.id', 'DESC')\n ->setMaxResults(1)\n ->getQuery()\n ->getOneOrNullResult();\n if ($message) {\n return $message->getId();\n } else {\n return 0;\n }\n }", "public function get_user_last_campaign($conn, $user_id) {\n\t\t$query = ('SELECT messages.id, messages.sender, messages.message, messages.phone, messages.status,messages.smsid, messages.time,messages.created FROM messages INNER JOIN users ON messages.user_id = users.id where user_id=' . $user_id . ' ORDER BY messages.sender DESC LIMIT :start,:end');\n\t\t\n\t\t// print_r($query);\n\t\treturn $this->get_pdo_record ( $conn, $query, 0, 1 );\n\t}", "function getMessageRoleByUserId($idMessage, $idUser)\n{\n\t$role=NULL; //Will contains the rights of the user\n\t//Connect to the DB\n\t$link=connectDB();\n\tif($link)\n\t{\n\t\t//Cleaning input entry\n\t\t$idUser=secureString($link, $idUser);\n\t\t$idMessage=secureString($link, $idMessage);\n\t\t$stmt=mysqli_stmt_init($link);\n\t\tif(mysqli_stmt_prepare($stmt, 'SELECT r.role\n\t\t\t\t\t\tFROM role r\n\t\t\t\t\t\tINNER JOIN message m ON r.idUser = m.idUser\n\t\t\t\t\t\tWHERE r.idUser =?\n\t\t\t\t\t\tAND m.idMessage =?'))\n\t\t{\t\n\t\t\tmysqli_stmt_bind_param($stmt, 'ii', $idUser, $idMessage);\n\t\t\tmysqli_stmt_execute($stmt);\n\t\t\tmysqli_stmt_bind_result($stmt, $role);\n\t\t\tmysqli_stmt_fetch($stmt);\n\t\t\treturn $role;\n\t\t}\n\t}\n}", "public function getLastMessageID()\n {\n }", "public function userRead()\n {\n\n if(!$id = userIsLogin())\n return err();\n\n $aid = request('id');\n\n $c = $this->model->where('admin_message_id',$aid)->where('user_id',$id)->exists();\n\n if($c)\n return err('readed');\n\n $r = $this->model->create(['admin_message_id'=>$aid,'user_id'=>$id]);\n\n return $this->resultReturn($r->id);\n\n }", "public function getLevelOneWithUnreadMsg($app_user_id, $timestamp) {\n\t\t$sent_time = date(\"Y-m-d H:i:s\", $timestamp);\n\t\t$category_results = $this->conn->query(\"SELECT DISTINCT category_id, category_name,second_level FROM view_sp_res WHERE user_id IN ( SELECT sp_id FROM appuserssps WHERE app_user_id = $app_user_id AND active = 1 ) OR user_id IN ( SELECT residence_id FROM residencesindividuals WHERE individual_id = $app_user_id AND active = 1 ) OR user_id IN ( SELECT first_user_id FROM appusersappusers WHERE second_user_id = $app_user_id AND (active = 1 OR active = 0) ) OR user_id IN ( SELECT second_user_id FROM appusersappusers WHERE first_user_id = $app_user_id AND (active = 1 OR active = 0) )\");\n\t\t$no_of_rows_category = $category_results->num_rows;\n\t\tif ($no_of_rows_category > 0) //if data exist\n\t\t{\n\t\t\t$i = 0;\n\t\t\twhile( $row = $category_results->fetch_assoc() )\n\t\t\t{\n\t\t\t\t$category_id = $row['category_id'];\n\t\t\t\t//$user_id = $row['user_id'];\n\t\t\t\t$message_results = $this->conn->query(\"SELECT message_id FROM messages WHERE sent_time > '\".$sent_time.\"' AND (receiver_id =0 OR receiver_id = $app_user_id) AND sender_id IN (SELECT DISTINCT user_id FROM view_sp_res WHERE category_id = $category_id AND user_id IN ( SELECT sp_id FROM appuserssps WHERE app_user_id = $app_user_id ) OR user_id IN ( SELECT residence_id FROM residencesindividuals WHERE individual_id = $app_user_id ) OR user_id IN ( SELECT first_user_id FROM appusersappusers WHERE second_user_id = $app_user_id ) OR user_id IN ( SELECT second_user_id FROM appusersappusers WHERE first_user_id = $app_user_id ) )\");\n\t\t\t\t$no_of_msg = $message_results->num_rows;\n\t\t\t\t$rows[] = array(\n\t\t\t\t\t'category_id'=> $row['category_id'],\n\t\t\t\t\t'category_name' => $row['category_name'],\n\t\t\t\t\t'second_level' => $row['second_level'], \n\t\t\t\t\t'no_of_msg' => $no_of_msg \n\t\t\t\t);\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t$return = array(\n\t\t\t\t'message'=>\"Ok\",\n\t\t\t\t'categories' => $rows \n\t\t\t);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$return = array(\n\t\t\t\t'message'=>\"No Result Found.\" \n\t\t\t); \n\t\t}\n\t\treturn $return;\n\t\t\n\t}", "public function getLastId(){\n\t\t\t$query = \"SELECT * FROM message ORDER BY id DESC LIMIT 0,1\";\n\n\t\t\t$stmt = $this->conn->prepare($query);\n\t\t\t\n\t\t\t$stmt->execute();\n\n\n\t\t\tif($stmt){\n\t\t\t\t$row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n\t\t\t\treturn $row['id'];\n\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t}", "public function get_lastUserId() {\n \n return $this->lastUserId;\n \n }", "private function getUserUnread($user_id)\n {\n\n $notify = fetch_assoc(\n \"SELECT notification_log_id as id, title, message, sent FROM notification_log WHERE `read` = 0 AND user_id = $user_id ORDER BY sent;\"\n );\n\n if ($notify['error'] == true) {\n return false;\n }\n\n return $notify;\n }", "public function getCurrentUserId() {\r\n\t\t\r\n\t\t$query = \"SELECT user_id FROM $this->user ORDER BY user_id DESC LIMIT 0,1\";\r\n\t\t\t\t\t\t\r\n\t\t$Resultset = $this->executeQuery($query);\r\n\t\t\t\t\r\n\t\t$user_data = $Resultset->fetchRow();\r\n\t\t\r\n\t\treturn $user_data[0];\r\n\t\t\r\n\t}", "public function getUnreadByUserId($user_id) {\n\t\t$sql = 'SELECT * FROM ' . NOTIFICATIONS_TABLE_NAME . ' where user_id = :user_id AND is_read = 0';\n\t\t$params = array(':user_id' => $user_id);\n\n\t\t$result = $this->db->query_db($sql, $params)->fetchAll(PDO::FETCH_ASSOC);\n\n\t\treturn $result;\t\n\t}", "public static function numberOfUnreadMessages($IDuser)\n\t{\n\t\t$messagesTable=Messages::getTableSchema();\n\t\t$query=Messages::returnUndeletedMessages();\n\t\t$query->andWhere('(user_one=:user AND user_one_read=0) OR (user_two=:user AND user_two_read=0)',[':user'=>$IDuser]);\n\t\t$query->groupBy(\"$messagesTable->name.ID\");\n\t\treturn $query;\n\t}", "function RetrieveLcmsLastRecordScorew($user_id) {\n\t\t$ext = isset($user_id) && mb_strlen($user_id, 'UTF-8') > 1 ? \" and UsersCredentials.UserName = \" . $this->db->escape($user_id) . \"\" : \"\";\n\t\t$sql = \"select Name,\"\n\t\t\t\t. \"Description,\"\n\t\t\t\t. \"valuesServi,UsersCredentials.UserName as username \"\n\t\t\t\t. \"from \"\n\t\t\t\t. \"socialEnergy.LcmsStoreDataFromServiceScore \"\n\t\t\t\t. \"inner join \"\n\t\t\t\t. \"UsersCredentials on \"\n\t\t\t\t. \"UsersCredentials.User_ID= LcmsStoreDataFromServiceScore.userID \"\n\t\t\t\t. \" \"\n\t\t\t\t. \" $ext \"\n\t\t\t\t. \"order by tmsIntoSystem desc;\";\n\n\n\t\t$result = $this->db->query($sql);\n\t\treturn $result;\n\t}", "function getParticipantId($user_id)\n {\n $db=Frd::getDb(); \n $select=$db->select();\n\n $select->from($this->table,$this->primary);\n $select->where('userId=?',$user_id);\n $select->limit(1);\n\n\n $id= $db->fetchOne($select);\n if($id == false)\n $id=0;\n\n return $id;\n }", "static public function getLastDate($user_id){\n $sql = \"SELECT date FROM refill WHERE id_user = $user_id ORDER BY id DESC LIMIT 1;\";\n $arr = WorkDB::getData($sql);\n if($arr){\n $lastDate = $arr[0]['date'];\n }else{\n $lastDate = '{no data}';\n }\n return $lastDate;\n }", "function messageReadByRecipient($messageUid, $recipientUser='') {\n\t\t\n\t\t// check given user or check current user if not set\n\t\t$recipient = $recipientUser ? $recipientUser : $GLOBALS['TSFE']->fe_user->user['uid'];\n\t\t\n\t\t#debug($recipient);\n\t\t\n\t\t$fields = '*';\n\t\t$table = 'tx_keinsitemailbox_log';\n\t\t$where = 'message=\"'.intval($messageUid).'\" AND recipient=\"'.intval($recipient).'\" AND action=\"read\" ';\n\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($fields,$table,$where,$groupBy='',$orderBy='',$limit='');\n\t\t$anz = $GLOBALS['TYPO3_DB']->sql_num_rows($res);\n\t\treturn $anz ? true : false;\n\t}", "public function getUserUnreadCount($user_id)\n {\n\n $count_sql = $this->pdo->prepare(\"SELECT notification_log_id FROM notification_log WHERE `read` = 0 AND user_id = $user_id\");\n $count_sql->execute(array($user_id));\n\n return $count_sql->rowCount();\n }", "function GetLastMessage() \n\t\t{\n\t\t\treturn $this->currentDB->GetLastMessage();\n\t\t}", "public function userLastRead(int $userId, int $perPage): array {\n self::$db->prepared_query(\"\n SELECT\n l.TopicID,\n l.PostID,\n CEIL((\n SELECT count(*)\n FROM forums_posts AS p\n WHERE p.TopicID = l.TopicID\n AND p.ID <= l.PostID\n ) / ?\n ) AS Page\n FROM forums_last_read_topics AS l\n INNER JOIN forums_topics ft ON (ft.ID = l.TopicID)\n WHERE ft.ForumID = ?\n AND l.UserID = ?\n \", $perPage, $this->id, $userId\n );\n return self::$db->to_array('TopicID', MYSQLI_ASSOC, false);\n }", "public function userLastAction($user_id = 0)\n {\n $user_id*=1;\n if (!$user_id) {\n return false;\n }\n\n $sql=\"SELECT * FROM edxapp.courseware_studentmodule WHERE student_id=$user_id ORDER BY modified DESC LIMIT 1;\";\n $q=$this->db->query($sql) or die(print_r($this->db->errorInfo(), true));\n return $q->fetch(\\PDO::FETCH_ASSOC);\n }", "public function getUserId(){\r\n $this->initDb();\r\n $ui = 0;\r\n if($this->id != \"\"){\r\n $ui = getValue(\"SELECT user_id FROM tbl_requested_subjects WHERE subject_id = \" . $this->id);\r\n }\r\n return $ui;\r\n }", "public function getLastMessageId()\n {\n return $this->_usenetStateDao->getLastMessageId(Dao_UsenetState::State_Reports);\n }", "public function getMessageId();", "function getLastNumbyInputPer($user_id){\n\t\tglobal $dbconn;\n // ---- Get sql query\n $sql = \" SELECT feedback_num FROM $this->tablename where 1 = 1 and input_per = \".$user_id.\" order by feedback_id desc limit 1\";\n // ---- Execute SQL\n $result = $dbconn->Execute($sql);\n\t\treturn $result->fields[0];\n\t}", "public function getUnreadMessagesNumber($userid) {\r\n\t\t if (empty($userid)) return 0;\r\n\t\t // prepare query.\r\n\t\t $this->dbConnector->where(\"user_to\", $userid);\r\n\t\t $this->dbConnector->where(\"message_read\", \"0\");\r\n\t\t return $this->dbConnector->getValue(CRM_MESSAGES_INBOX_TABLE_NAME, \"count(*)\");\r\n\t }", "public function lastUpdatedUserMessages()\n {\n if(empty($this->_publicPropertyArray['last_updated_user_messages']))\n return 0;\n else\n return $this->_publicPropertyArray['last_updated_user_messages'];\n }", "function RetrieveLcmsLastRecordBadgesW($user_id) {\n\n\t\t$ext = isset($user_id) && mb_strlen($user_id, 'UTF-8') > 1 ? \" and UsersCredentials.UserName = \" . $this->db->escape($user_id) . \"\" : \"\";\n\n\t\t$sql = \"select RowID,\"\n\t\t\t\t. \"BadgeName,\"\n\t\t\t\t. \"BadgeDesc,\"\n\t\t\t\t. \"DateGiven,\"\n\t\t\t\t. \"UsersCredentials.UserName as username,\"\n\t\t\t\t. \"RecordSavedAt,\"\n\t\t\t\t. \"UserID \"\n\t\t\t\t. \"from socialEnergy.LcmsStoreDataFromServiceBadge \"\n\t\t\t\t. \"inner join \"\n\t\t\t\t. \"UsersCredentials \"\n\t\t\t\t. \"on \"\n\t\t\t\t. \"UsersCredentials.User_ID =LcmsStoreDataFromServiceBadge.UserID \"\n\t\t\t\t. \" \"\n\t\t\t\t. \" $ext \"\n\t\t\t\t. \"order by LcmsStoreDataFromServiceBadge.RecordSavedAt desc;\";\n\n\n\t\t$result = $this->db->query($sql);\n\t\treturn $result;\n\t}", "public function getUserId() {\n\t\t\n\t\t\tif (isset(self::$user)) {\n\t\t\t\treturn self::$user->user_id;\n\t\t\t} else {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\t\n\t\t}", "public static function find_by_user_msg( $user_id = 0 , $message_id = 0 )\r\n\t\t{\r\n\t\t\tglobal $database;\r\n\t\t\t$result_array = static::find_by_sql('select * from ' . static::$table_name . ' where message_id=\"' . $message_id . '\"');\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\treturn !empty($result_array) ? array_shift($result_array) : false;\r\n\t\t}", "function get_user_last( $user ) {\n $u_last = get_user_data( $user , 'u_last' );\n return $u_last;\n}", "function get_user_message() {\n\n $userID = $this->Session->read('User.id');\n\n $conditions[] = array(\"Inbox.to_id = '$userID'\");\n $this->paginate = array('limit' => '10', 'order' => array('Inbox.datetime' => 'DESC'));\n $rowspop = $this->paginate('Inbox', $conditions);\n\n\n if(!empty($rowspop))\n return $rowspop;\n else\n return '0';\n}", "public function getMsgUserKey()\n\t{\n\t\t$temp = $this->message;\n\t\treturn temp->msgUserKey;\n\t}", "function ajan_get_user_last_activity( $user_id = 0 ) {\n\t$activity = '';\n\n\t$last_activity = AJAN_Core_User::get_last_activity( $user_id );\n\tif ( ! empty( $last_activity[ $user_id ] ) ) {\n\t\t$activity = $last_activity[ $user_id ]['date_recorded'];\n\t}\n\n\treturn apply_filters( 'ajan_get_user_last_activity', $activity, $user_id );\n}", "public function getUserid () {\t\t\t\n\t\treturn $this->DataUser['userid'];\t\t\n\t}", "function get_unread_user_ids($user_id) {\r\n\t\t$unread = $this->get_conv_unread_folder($user_id);\r\n\t\tif ( !$this->is_dir_empty($unread) ) {\r\n\t\t\tforeach (glob( $unread . '*.txt') as $user) {\r\n\t\t\t\t$modified = filemtime( $user );\r\n\t\t\t\t$id = str_replace('.txt','', basename($user));\r\n\t\t\t\t$ids[] = array(\r\n\t\t\t\t\r\n\t\t\t\t\t'id' => $id,\r\n\t\t\t\t\t'modified' => $modified\r\n\t\t\t\t\t\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (isset($ids)) {\r\n\t\t\t$this->array_sort_by_column($ids, 'modified', SORT_DESC);\r\n\t\t\tforeach($ids as $k => $v) {\r\n\t\t\t\t$ordered[] = $v['id'];\r\n\t\t\t}\r\n\t\t\treturn $ordered;\r\n\t\t} else {\r\n\t\t\treturn '';\r\n\t\t}\r\n\t}", "public function getUserNotReadMessages($user_id = null)\n {\n if(!$user_id) $user_id = Auth::guard('user')->user()->id;\n $messages = $this->userRepository->getNotReadMessages($user_id);\n return response()->json(['status' => true, 'data' => $messages]);\n }", "public function lastRemarks()\n {\n $id = Auth::user()->id;\n $remarks = Remarks::where('remarks_user_id_fkey','=',$id)\n ->orderBy('remarks_id','desc')->take(1)\n ->get();\n return $remarks;\n }", "static function show_received_message($id_user){\n if(!is_int($id_user))\n return false;\n $query = self::$PDO->prepare(\"SELECT t1.*,concat(t2.fname,' ',t2.name) as recipient_name,concat(t3.fname,' ',t3.name) as sender_name from \".self::$prefix.\"messages t1,\".self::$prefix.\"users t2, \".self::$prefix.\"users t3 where id_recipient = :id_user and t1.id_recipient = t2.ID AND t1.id_sender = t3.ID and (deleted IS NULL OR deleted=0)\");\n $query->execute(array(':id_user'=>$id_user));\n return $query->fetchAll();\n }", "function getUserId() {\n\t\treturn $this->user_id;\n\t}", "function getUserId() {\n\t\treturn $this->user_id;\n\t}", "public function getUserLastActivity( $ID )\n {\n $authCol = $this->configModel()->uac_auth();\n $_columns = array();\n $_columns[] = $authCol->last_activity;\n $_filters = array();\n $_filters[$authCol->id] = array( '=', $ID, bcDB::TYPE_INTEGER, NULL );\n $_data = $this->model()->uac_auth()->read( FALSE, $_columns, $_filters, array(), NULL );\n return $_data[$authCol->last_activity];\n }", "static public function getLastAmount($user_id){\n $sql = \"SELECT date,total_sum FROM refill WHERE id_user = $user_id ORDER BY id DESC LIMIT 1;\";\n $arr = WorkDB::getData($sql);\n if($arr){\n $lastAmount = $arr[0]['total_sum'];\n }else{\n $lastAmount = '{no data}';\n }\n return $lastAmount;\n }", "public function getLastmessage($id){\n\t\t\t$query = \"SELECT * FROM message WHERE id > $id ORDER BY id DESC LIMIT 0,1\";\n\n\t\t\t$stmt = $this->conn->prepare($query);\n\t\t\t//$stmt->bindParam(1,$id);\n\t\t\t$stmt->execute();\n\n\n\t\t\tif($stmt){\n\t\t\t\t$row = $stmt->fetch(PDO::FETCH_ASSOC);\n\t\t\t\treturn $row;\n\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t}", "public function readMessage($userid, $messageid){\n\t\tglobal $dblink;\n\n\t\t$v = $dblink->prepare(\"SELECT * FROM message WHERE (msg_to=? OR msg_from=?) AND id=?\");\n\t\t$v->bind_param(\"iii\", $userid, $userid, $messageid);\n\t\t$v->execute();\n\t\t\t$result = get_result($v);\n\t\n\t\tforeach($result as $row) {\n\t\t\treturn $row;\n\t\t}\n\t}", "function get_read_user_ids($user_id) {\r\n\t\t$read = $this->get_conv_read_folder($user_id);\r\n\t\tif ( !$this->is_dir_empty($read) ) {\r\n\t\t\tforeach (glob( $read . '*.txt') as $user) {\r\n\t\t\t\t$modified = filemtime( $user );\r\n\t\t\t\t$id = str_replace('.txt','', basename($user));\r\n\t\t\t\t$ids[] = array(\r\n\t\t\t\t\r\n\t\t\t\t\t'id' => $id,\r\n\t\t\t\t\t'modified' => $modified\r\n\t\t\t\t\t\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (isset($ids)) {\r\n\t\t\t$this->array_sort_by_column($ids, 'modified', SORT_DESC);\r\n\t\t\tforeach($ids as $k => $v) {\r\n\t\t\t\t$ordered[] = $v['id'];\r\n\t\t\t}\r\n\t\t\treturn $ordered;\r\n\t\t} else {\r\n\t\t\treturn '';\r\n\t\t}\r\n\t}", "protected function readMessageByUser( $message_id, $user_id )\n\t{\n\t\treturn MessageReadState::firstOrCreate( [ 'message_id' => $message_id, 'user_id' => $user_id ] );\n\t}", "public function getMessageId()\n {\n return $this->message_id;\n }", "public function getMessageId()\n {\n return $this->message_id;\n }", "public function getunReadNotifications($user_id, $role)\r\n {\r\n if ($role == 2 || $role == 5) {\r\n $query = \"SELECT * FROM notification WHERE status=0 AND to_user IN('$user_id','$role') ORDER BY id DESC\";\r\n $result = $this->conn->query($query);\r\n return $result;\r\n }\r\n \r\n // if user isn't a clerck\r\n $query = \"SELECT * FROM notification WHERE status=0 AND to_user='$user_id' ORDER BY id DESC\";\r\n $result = $this->conn->query($query);\r\n return $result;\r\n }", "private function nextUserId() {\n $sql = 'SELECT max(userId) FROM __usersControl';\n $query = self::$dbConnection->prepare($sql);\n $query->execute();\n return $query->fetchAll(\\PDO::FETCH_ASSOC);\n }", "public function getUserId () :?string\n {\n // if ($this->getUpdateType () == 'edited_message'){\n // return $this->content ['edited_message']['from']['id'];\n // }\n // if ($this->getUpdateType () == 'channel_post'){\n // return $this->content ['channel_post']['from']['id'];\n // }\n // if ($this->getUpdateType () == 'edited_channel_post'){\n // return $this->content ['edited_channel_post']['from']['id'];\n // }\n // if ($this->getUpdateType () == 'inline_query'){\n // return $this->content ['inline_query']['from']['id'];\n // }\n // if ($this->getUpdateType () == 'chosen_inline_result'){\n // return $this->content ['chosen_inline_result']['from']['id'];\n // }\n // if ($this->getUpdateType () == 'callback_query'){\n // return $this->content ['callback_query']['from']['id'];\n // }\n // if ($this->getUpdateType () == 'shipping_query'){\n // return $this->content ['shipping_query']['from']['id'];\n // }\n // if ($this->getUpdateType () == 'pre_checkout_query'){\n // return $this->content ['pre_checkout_query']['from']['id'];\n // }\n // if ($this->getUpdateType () == 'my_chat_member' || $this->getUpdateType () == 'chat_member'){\n // return $this->content ['my_chat_member']['from']['id'];\n // }\n // if ($this->getUpdateType () == 'chat_join_request'){\n // return $this->content ['chat_join_request']['from']['id'];\n // }\n // return $this->content ['message']['from']['id'];\n\n return $this->content [$this->getUpdateType ()]['from']['id'] ?? null;\n }", "function getUserId()\n\t{\n\t\t$prism_id = mysql_real_escape_string(getPrismId());\n\t\t$row = getDBResultRecord(\"\n\t\t\tSELECT user_id \n\t\t\tFROM user_table \n\t\t\tWHERE prism_id='$prism_id';\n\t\t\");\n\t\t\n\t\tif(sizeof($row) == 0)\n\t\t{\n\t\t\t$GLOBALS[\"_PLATFORM\"]->sandboxHeader('HTTP/1.1 404 Not Found');\n\t\t\tdie();\n\t\t}\n\t\t\n\t\t$user_id = $row['user_id'];\n\t\treturn $user_id;\n\t}", "public function getLatestMessage();", "public static function getMessages($user)\n\t{\n\t\t$db_connection = self::getConn(self::$MESS);\n\t\t$query = \"SELECT id, title, from_id, create_time, is_read FROM MESSAGE WHERE OWNER_ID=$user ORDER BY CREATE_TIME DESC\";\n\t\treturn self::selectDataList($db_connection, $query);\n\t}", "public function getUnreadMsgCount ($userId)\n\t{\n\t\t$qb = $this->createQueryBuilder('m');\n\t\t$qb->where($qb->expr()->andX(\n\t\t\t$qb->expr()->eq('m.recipient', $userId),\n\t\t\t$qb->expr()->eq('m.read', '?1')\n\t\t));\n\t\t$qb->setParameter(1, false);\n\n\t\t$messages = $qb->getQuery()->getResult();\n\t\treturn count($messages);\n\n\t}", "public function getUserId()\n\t{\n\t\treturn $this->user_id;\n\t}", "public function getUserId()\n\t{\n\t\treturn $this->user_id;\n\t}", "function getLastModifedIssue( $userID ) {\r\n\t \t$query = \"SELECT LastModified, ID FROM issues WHERE Creator = '$userID' AND Status = 'Open'\";\r\n\t \t$result = mysql_query($query);\r\n\t \t\r\n\t \treturn $result;\r\n\t }", "function getHistoryForUser($userId) {\n\n $stmt = $this->conn->prepare(\"SELECT * FROM n2u_message INNER JOIN n2u_message_to_receivers\nON n2u_message.id=n2u_message_to_receivers.message_id INNER JOIN n2u_user ON n2u_message_to_receivers.receiver_id=n2u_user.id\nwhere from_user_id=? or receiver_id=? order by DATE_SENT DESC \");\n $stmt->bind_param(\"ii\", $userId, $userId);\n $stmt->execute();\n $result = $stmt->get_result();\n $messages = array();\n if ($result->num_rows > 0) {\n while($row = $result->fetch_assoc()) {\n array_push($messages,$row);\n }\n }\n $stmt->close();\n return $messages;\n\n }", "function getNewUserId(){\n\t\t\t$sql = \"SELECT MAX(iduser) FROM users;\";\n\t\t\t# se prepara el stament para la ejecucion de la consulta\n\t\t\t$stmt = $this->AbrirConexion->prepare($sql);\n\n\t\t\ttry {\n\t\t\t\t# ejecutamos el stament\n\t\t\t\t$stmt->execute();\n\t\t\t\t# solicitamos la consulta en un arreglo asociativo\n\t\t\t\t$result = $stmt->fetchColumn();\n\t\t\t} catch (PDOException $e) {\n\t\t\t\t# capturamos el error\n\t\t\t\t$result = $e->getMesage();\n\t\t\t}\n\t\t\t# libera la conexion con la base de datos\n\t\t\t$stmt->closeCursor();\n\n\t\t\t# retornamos el resultado de la consulta.\n\t\t\treturn $result;\n\t\t}", "public function messageByUserId($id){\n $messages = Message::where(function($query) use ($id){\n $query->where('from',auth()->user()->id);\n $query->where('to',$id);\n $query->where('type',0);\n })->orWhere(function($query) use ($id){\n $query->where('from',$id);\n $query->where('to',auth()->user()->id);\n $query->where('type',1);\n })->with('user')->get();\n\n return $messages;\n }", "function get_most_recent_post_of_user($user_id)\n{\n}", "public function getUserId()\r\n {\r\n return $this->user_id;\r\n }", "function get_user_conversations($user_id) {\n\t //database query\n\t $q = $this->db->select('*')\n\t \t\t\t\t ->from('conversations_inbox')\n\t\t\t\t\t ->where('R_id',$user_id)\n\t\t\t\t\t ->order_by('post_time','desc')\n\t\t\t\t\t ->get();\n\t\t$result = $q->result();\n }", "public function getLastMessageId(): string\n {\n return $this->auth->getLastMessageId();\n }", "function getID($user)\n\t{\n\t\t$request = request(\"SELECT id FROM users WHERE user='\".$user.\"' OR mail='\".$user.\"'\");\n\t\t$user = $request->fetch();\n\t\t$user = $user['id'];\n\t\treturn $user;\n\t}", "public function countUnreadmessage($userid){\n\t\tglobal $dblink;\n\n\t\t$v = $dblink->prepare(\"SELECT * FROM message WHERE (msg_to=? AND is_unread='0')\");\n\t\t$v->bind_param(\"i\", $userid);\n\t\t$v->execute();\n\t\t$v->store_result();\n\n\t\t\n\t\t\n\t\t$value = $v->num_rows;\t\t\n\t\t\n\n\t\treturn $value;\n\t\t\n\t}", "function RetrieveLcmsLastRecordCoursesw($user_id) {\n\t\t// echo \"<br>SelectData3::SQL:::-- \".$sql;\n\n\t\t$ext = isset($user_id) && mb_strlen($user_id, 'UTF-8') > 1 ? \" and UsersCredentials.UserName = \" . $this->db->escape($user_id) . \"\" : \"\";\n\n\t\t$sql = \"select RowID,DateGraded,CurrentGrade,TimeSpent,\"\n\t\t\t\t. \"ObjectName,\"\n\t\t\t\t. \"ObjectNameDesc,\"\n\t\t\t\t. \"UsersCredentials.UserName as username,\"\n\t\t\t\t. \"RecordSavedAt,grademin,grademax,gradepass \"\n\t\t\t\t. \"from \"\n\t\t\t\t. \"socialEnergy.LcmsStoreDataFromServiceCoursers \"\n\t\t\t\t. \"inner join \"\n\t\t\t\t. \"UsersCredentials \"\n\t\t\t\t. \"on UsersCredentials.User_ID= LcmsStoreDataFromServiceCoursers.UserID \"\n\t\t\t\t. \" \"\n\t\t\t\t. \"$ext \"\n\t\t\t\t. \"order by RecordSavedAt desc\";\n\n\n\t\t$result = $this->db->query($sql);\n\t\treturn $result;\n\t}", "public function getUserMessage();", "public function getUserMessage();", "function FetchUser() {\n\t\t\n\t\tif (isset($this->mU_id)) {\n\t\t\t$oLoggenOnUser = $this->mU_id;\n\t\t\t//echo \"Found User: \", $loggenOnUser, \"<br />\";\n\t\t}else {\n\t\t\t $oLoggenOnUser = -1;\n\t\t}\n\t\treturn $oLoggenOnUser + 0; //ensures a numerical value is returned\t\n\t}", "public function unread_message_alert()\n {\n $activeUser = loggedin_role_id() . '-' . get_loggedin_user_id();\n $activeUser = $this->db->escape($activeUser);\n $sql = \"SELECT id,body,created_at,IF(sender = \" . $activeUser . \", 'sent','inbox') as `msg_type`,IF(sender = \" . $activeUser . \", reciever,sender) as `get_user` FROM message WHERE (sender = \" . $activeUser . \" AND trash_sent = 0 AND reply_status = 1) OR (reciever = \" . $activeUser . \" AND trash_inbox = 0 AND read_status = 0) ORDER BY id DESC\";\n $result = $this->db->query($sql)->result_array();\n foreach ($result as $key => $value) {\n $result[$key]['message_details'] = $this->getMessage_details($value['get_user']);\n }\n return $result;\n }", "function getUserId(){\n\t\t\treturn $this -> userId;\n\t\t}", "private function getUserId() {\n $query = $this->getEntityManager()->createQueryBuilder()\n ->select('u')\n ->from('App:User', 'u')\n ->getQuery();\n $user_array = $query->getResult(Query::HYDRATE_ARRAY);\n\n $this->user_id = $user_array[0]['id'];\n\n return $this->user_id;\n }", "public function getUserId()\n {\n return $this->user_id;\n }", "public function getUserId()\n {\n return $this->user_id;\n }", "public function getUserId()\n {\n return $this->user_id;\n }", "public function getUserId()\n {\n return $this->user_id;\n }", "public function getUserId()\n {\n return $this->user_id;\n }", "public function getUserId()\n {\n return $this->user_id;\n }", "public function getUserId()\n {\n return $this->user_id;\n }", "public function getUserId()\n {\n return $this->user_id;\n }", "public function getUserId()\n {\n return $this->user_id;\n }", "public function getUserId()\n {\n return $this->user_id;\n }", "public function getUserId()\n {\n return $this->user_id;\n }", "public function getUserId()\n {\n return $this->user_id;\n }", "public function getUserId()\n {\n return $this->user_id;\n }", "public function getUserId()\n {\n return $this->user_id;\n }", "public function getUserId()\n {\n return $this->user_id;\n }", "public function getUserId()\n {\n return $this->user_id;\n }", "public function getUserId()\n {\n return $this->user_id;\n }" ]
[ "0.73152554", "0.6824954", "0.6799087", "0.6779587", "0.6769025", "0.66664356", "0.6663479", "0.6590527", "0.65140563", "0.64905334", "0.6488868", "0.63785696", "0.63601005", "0.63417095", "0.63331616", "0.62911195", "0.6272502", "0.62430614", "0.6241509", "0.6237741", "0.62262076", "0.6215548", "0.60740227", "0.60468537", "0.60449415", "0.6042144", "0.6026088", "0.6024332", "0.60200775", "0.60200614", "0.6008096", "0.59846187", "0.5960839", "0.5958402", "0.5951971", "0.5945028", "0.59432364", "0.594281", "0.59305084", "0.59141123", "0.5907186", "0.5906494", "0.5904346", "0.5895837", "0.5894384", "0.58940667", "0.58937824", "0.5887931", "0.5887931", "0.58853114", "0.5881466", "0.58762765", "0.5859942", "0.5855368", "0.5848111", "0.5842762", "0.5842762", "0.5842746", "0.5834308", "0.58295476", "0.5828425", "0.5827991", "0.5820591", "0.58075315", "0.58073455", "0.58073455", "0.5797323", "0.57946116", "0.5794309", "0.57927847", "0.57880306", "0.57871574", "0.5785093", "0.5780058", "0.57752514", "0.5773694", "0.577243", "0.5770685", "0.5770685", "0.5769687", "0.5768083", "0.57636243", "0.57630104", "0.5759404", "0.5759404", "0.5759404", "0.5759404", "0.5759404", "0.5759404", "0.5759404", "0.5759404", "0.5759404", "0.5759404", "0.5759404", "0.5759404", "0.5759404", "0.5759404", "0.5759404", "0.5759404", "0.5759404" ]
0.8237267
0
Get all messages to a specified user that are greater than LastMessageId Params: ConversationIdArray an array of conversation ids that you want the messages for this can be obtained from: GetConversationIdsFromUserId() LastMessageId a message id returns: array of messages on success, or an errormsg on error
Получить все сообщения для указанного пользователя, которые больше LastMessageId Параметры: ConversationIdArray массив идентификаторов чатов, для которых вы хотите получить сообщения, это можно получить из: GetConversationIdsFromUserId() LastMessageId идентификатор сообщения Возвращается: массив сообщений в случае успеха, или сообщение об ошибке в случае ошибки
function GetMessages( $ConversationIdArray, $LastMessageId ){ if( ! is_array( $ConversationIdArray ) || ! is_int( $LastMessageId ) ) return( "Param error: ConversationIdArray / LastMessageId - wrong type or empty." ); $Messages = array(); if( 0 == count( $ConversationIdArray ) ){ // this user is not in any conversations, so there are no messages to retreive. return( $Messages ); } $ConvIdListStr = implode( ",", $ConversationIdArray ); $Sql = "SELECT m.Conversation_Id AS Conversation_Id, m.Id AS MessageId, m.FromUser_Id as FromUser_Id, CONCAT( u.FirstName, ' ', u.LastName ) AS FromUser_Name, m.DateSent as DateSent, m.Message FROM ChatMessages m,User u WHERE (m.FromUser_Id = u.Id) AND m.Conversation_Id IN ($ConvIdListStr) AND m.Id > $LastMessageId ORDER BY m.Id ASC"; $result = mysql_query( $Sql ); $errno = mysql_errno(); if( 0 != $errno ) return( "mysql error: $errno" ); while( $row = mysql_fetch_array( $result, MYSQL_ASSOC ) ){ // MessageId, needs to be an int $row["MessageId"] = (int)$row["MessageId"]; $Messages[] = $row; } mysql_free_result( $result ); return( $Messages ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getMessagesFromLastReceivedMessage($userId, $lastId = 0)\n {\n $userId = intval($userId);\n $lastId = intval($lastId);\n\n if (empty($userId)) {\n return 0;\n }\n\n $messagesTable = Database::get_main_table(TABLE_MESSAGE);\n $userTable = Database::get_main_table(TABLE_MAIN_USER);\n\n $messages = array();\n\n $sql = \"SELECT m.*, u.user_id, u.lastname, u.firstname\n FROM $messagesTable as m\n INNER JOIN $userTable as u\n ON m.user_sender_id = u.user_id\n WHERE\n m.user_receiver_id = $userId AND\n m.msg_status = \" . MESSAGE_STATUS_UNREAD . \"\n AND m.id > $lastId\n ORDER BY m.send_date DESC\";\n\n $result = Database::query($sql);\n\n if ($result !== false) {\n while ($row = Database::fetch_assoc($result)) {\n $messages[] = $row;\n }\n }\n\n return $messages;\n }", "public function getReceivedMessages ($userId)\n\t{\n\t\t$qb = $this->createQueryBuilder('m');\n\t\t$qb->where($qb->expr()->andX(\n\t\t\t$qb->expr()->eq('m.recipient', $userId),\n\t\t\t$qb->expr()->eq('m.deletedByRecipient', '?1')\n\t\t));\n\t\t$qb->orderBy('m.sentTime', 'DESC');\n\t\t$qb->setParameter(1, false);\n\n\t\t$messages = $qb->getQuery()->getResult();\n\t\treturn $messages;\n\n\t}", "private function get_user_messages($game, $user_id)\n {\n $limit = config('app.chat_limit');\n return Message::where('game_id', $game->id)->where('user_id', $user_id)->paginate($limit);\n }", "function GetUnreadMessages( $User_Id ){\n\n\tif( ! is_int( $User_Id ) )\n\t\treturn( \"Param error: User_Id - wrong type or empty.\" );\n\t\t\n\t$Messages = array();\n\t$Sql = \"SELECT \n\t\t\t\tm.Conversation_Id AS Conversation_Id, m.Id AS MessageId, \n\t\t\t\tm.FromUser_Id as FromUser_Id, CONCAT( u.FirstName, ' ', u.LastName ) AS FromUser_Name,\n\t\t\t\tm.DateSent as DateSent,\n\t\t\t\tm.Message\n\t\t\tFROM ChatMessages m,User u,ChatConversationParticipants p\n\t\t\tWHERE \n\t\t\t\t(m.FromUser_Id = u.Id) AND\n\t\t\t\t(m.Id > p.LastReadMessage_Id) AND\n\t\t\t\t(m.Conversation_Id = p.Conversation_Id) AND\n\t\t\t\t(p.User_Id = $User_Id)\n\t\t\tORDER BY m.Id ASC\";\n\t$result = mysql_query( $Sql );\n\t$errno = mysql_errno();\n\tif( 0 != $errno )\n\t\treturn( \"mysql error: $errno\" );\n\twhile( $row = mysql_fetch_array( $result, MYSQL_ASSOC ) )\n\t\t$Messages[] = $row;\n\tmysql_free_result( $result );\n\treturn( $Messages );\n}", "function getLastMessages($user=NULL){\n \tif($user == NULL){\n \t\t$user = getUser();\n \t}else{\n \t\t$user = save($user);\n \t}\n \n $returner = array();\n \t$listedUsers[] = $user;\n $session = '';\n $db = new db();\n $newMessagesSQL = $db->shiftResult($db->query(\"SELECT * FROM `messages` WHERE receiver='$user' OR sender='$user' ORDER BY timestamp DESC LIMIT 0, 5\"),'id');\n\tforeach($newMessagesSQL AS $newMessagesData){\n\t\t$session .= \"newMessage \".$newMessagesData['id'];\n\t\t\n\t\t\n\t\t//each sender is only listed once\n\t\tif(!in_array($newMessagesData['sender'], $listedUsers)){\n\t $text = substr($newMessagesData['text'], 0, 100);\n\n\t\t//define everything that is important\t \n\t\t$return['messageId'] = $newMessagesData['id'];\n\t\t$return['sender'] = $newMessagesData['sender'];\n\t\t$return['receiver'] = $newMessagesData['receiver'];\n\t\t$return['timestamp'] = $newMessagesData['timestamp'];\n\t\t$return['text'] = $newMessagesData['text'];\n\t\t\n\t\t$return['seen'] = $newMessagesData['seen'];\n\t\t$return['read'] = $newMessagesData['read'];\n\t\t$return['senderUsername'] = useridToUsername($newMessagesData['sender']);\n\t\t\n\t\t//add sender too users array\n\t\t$listedUsers[] = $newMessagesData['sender'];\n\t\t\n\t\t//add all return data to returner array\n\t\t$returner[] = $return;\n\t\t\t\n\t\t}\n\t}\n\t\n\treturn $returner;\n\t\n }", "function getMessages($userid, $buddyId, $limit){\n $db = new db();\n $chatSQL = $db->shiftResult($db->query(\"SELECT * FROM messages WHERE sender='$userid' && receiver='\".save($buddyId).\"' OR sender='\".save($buddyId).\"' && receiver='\".save($userid).\"' ORDER BY timestamp DESC LIMIT \".save($limit).\"\"),'id');\n \n\t\tforeach($chatSQL AS $chatData){\n\t\t\t$id = $chatData['id'];\n\t\t\t$return[$id] = $chatData;\n\t\t}\n\t\treturn $return;\n\t}", "public function lastMessageByUserId($user_id,$cantMess){\r\n $q = Doctrine_Query::create()\r\n ->from(\"Message m , m.Conversation \")\r\n ->leftJoin(\"m.Conversation c\")\r\n ->where(\"(c.user_to_id = $user_id OR c.user_from_id = $user_id)\")\r\n ->andWhere(\"m.user_id <> $user_id\")\r\n ->andWhere(\"(c.user_to_id=$user_id AND m.looking_user_to=1) OR (c.user_from_id=$user_id AND m.looking_user_from=1)\")\r\n ->orderBy(\"m.date desc\")\r\n ->limit($cantMess);\r\n return $q->execute();\r\n }", "public static function getRecentChats($userId){\n\n $userChats = UserChat::select(\"*\")->where(\"creator_user_id\", $userId)->orWhere(\"receiver_user_id\", $userId)->get();\n\n //Foreach all userChats of user and pushing them in a array + the sended date and recentchat\n $userchats = self::getUserChatArray($userChats, $userId);\n // sorting all the userChats on sender date so most recent one is on top\n usort($userchats, function($a, $b) {\n return ($a['timeSentLast'] > $b['timeSentLast']) ? -1 : 1;\n });\n\n //returning all chats\n return $userchats;\n }", "public static function getChatMessages($chat_id, $limit = 1000, $lastMessageId = 0)\n {\n if ($lastMessageId == 0) {\n $db = ezcDbInstance::get();\n $stmt = $db->prepare('SELECT lh_msg.* FROM lh_msg INNER JOIN ( SELECT id FROM lh_msg WHERE chat_id = :chat_id ORDER BY id DESC LIMIT :limit) AS items ON lh_msg.id = items.id ORDER BY lh_msg.id ASC');\n $stmt->bindValue( ':chat_id',$chat_id,PDO::PARAM_INT);\n $stmt->bindValue( ':limit',$limit,PDO::PARAM_INT);\n $stmt->setFetchMode(PDO::FETCH_ASSOC);\n $stmt->execute();\n $rows = $stmt->fetchAll();\n } else {\n $db = ezcDbInstance::get();\n $stmt = $db->prepare('SELECT lh_msg.* FROM lh_msg INNER JOIN ( SELECT id FROM lh_msg WHERE chat_id = :chat_id AND lh_msg.id < :message_id ORDER BY id DESC LIMIT :limit) AS items ON lh_msg.id = items.id ORDER BY lh_msg.id ASC');\n $stmt->bindValue( ':chat_id',$chat_id,PDO::PARAM_INT);\n $stmt->bindValue( ':limit',$limit,PDO::PARAM_INT);\n $stmt->bindValue( ':message_id',$lastMessageId,PDO::PARAM_INT);\n $stmt->setFetchMode(PDO::FETCH_ASSOC);\n $stmt->execute();\n $rows = $stmt->fetchAll();\n }\n\n return $rows;\n }", "function getHistoryForUser($userId) {\n\n $stmt = $this->conn->prepare(\"SELECT * FROM n2u_message INNER JOIN n2u_message_to_receivers\nON n2u_message.id=n2u_message_to_receivers.message_id INNER JOIN n2u_user ON n2u_message_to_receivers.receiver_id=n2u_user.id\nwhere from_user_id=? or receiver_id=? order by DATE_SENT DESC \");\n $stmt->bind_param(\"ii\", $userId, $userId);\n $stmt->execute();\n $result = $stmt->get_result();\n $messages = array();\n if ($result->num_rows > 0) {\n while($row = $result->fetch_assoc()) {\n array_push($messages,$row);\n }\n }\n $stmt->close();\n return $messages;\n\n }", "public function findSystemMessagesOf($user, $page, $size, $lastCreatedAt = null);", "public function findMessagesOfUser($user, array $teams = [], array $activities = [], $lastCreatedAt, $onlyCount = true);", "function getMessages($userid)\n {\n $stmt = $this->con->prepare(\"SELECT messages.id, (SELECT users.name FROM users WHERE users.id = messages.from_users_id) as `from`, (SELECT users.name FROM users WHERE users.id = messages.to_users_id) as `to`, messages.title, messages.message, messages.sentat FROM messages WHERE messages.to_users_id = ? ORDER BY messages.sentat DESC;\");\n $stmt->bind_param(\"i\", $userid);\n $stmt->execute();\n $stmt->bind_result($id, $from, $to, $title, $message, $sent);\n\n $messages = array();\n\n while ($stmt->fetch()) {\n $temp = array();\n\n $temp['id'] = $id;\n $temp['from'] = $from;\n $temp['to'] = $to;\n $temp['title'] = $title;\n $temp['message'] = $message;\n $temp['sent'] = $sent;\n\n array_push($messages, $temp);\n }\n\n return $messages;\n }", "function listMessages($service, $userId) {\n\n $opt_param = array();\n //////////////// temporary for test /////////////////\n\n if($_GET && array_key_exists('date', $_GET)) {\n $ini_date = date_create($_GET['date']);\n $end_date = date_add(date_create($_GET['date']), new DateInterval('P2D')) ;\n } else {\n $ini_date = date_create('02/28/2016');\n $end_date = date_create('03/01/2016');\n }\n $opt_param = array('q'=>'after:' . $ini_date->format('Y/m/d') . ' before:' . $end_date->format('Y/m/d') );\n //var_dump($opt_param);\n //////////////////////////////////////////////////////\n\n $pageToken = NULL;\n $messages = array();\n\n do {\n try {\n if ($pageToken) {\n $opt_param['pageToken'] = $pageToken;\n\n }\n $messagesResponse = $service->users_messages->listUsersMessages($userId, $opt_param);\n if ($messagesResponse->getMessages()) {\n $messages = array_merge($messages, $messagesResponse->getMessages());\n $pageToken = $messagesResponse->getNextPageToken();\n }\n } catch (Exception $e) {\n print 'An error occurred: ' . $e->getMessage();\n }\n } while ($pageToken);\n\n return $messages;\n}", "public function messageByUserId($id){\n $messages = Message::where(function($query) use ($id){\n $query->where('from',auth()->user()->id);\n $query->where('to',$id);\n $query->where('type',0);\n })->orWhere(function($query) use ($id){\n $query->where('from',$id);\n $query->where('to',auth()->user()->id);\n $query->where('type',1);\n })->with('user')->get();\n\n return $messages;\n }", "public function getChatMessages(\n int $user_id\n ) {\n\n $db = $this->conn;\n $appointment_id = $this->appointment_id;\n\n $messages_statement = $db->prepare(\"SELECT msg_from, date_added, msg, selectedfile FROM chat WHERE app_id = ?\");\n $messages_statement->bind_param(\"s\", $appointment_id);\n $messages_statement->execute();\n\n if (mysqli_error($db)) {\n $this->logError(__FUNCTION__, func_get_args(), \"Failed to fetch chat messages.\", \"\", mysqli_error($db));\n\n return [\"error\" => \"Failed to fetch chat messages.\", \"error_code\" => 1];\n }\n\n $messages = array();\n $messages_result = $messages_statement->get_result();\n\n while ($message = $messages_result->fetch_assoc()) {\n $message[\"date_added\"] = date(\"d/m h:i\", strtotime($message[\"date_added\"]));\n $message[\"msg\"] = stripslashes($message[\"msg\"]);\n $message[\"selectedfile\"] = explode(\"#?#\", $message[\"selectedfile\"]);\n\n array_push($messages, $message);\n }\n\n return $messages;\n }", "public function findAllMessages(string $idUser, string $idFriend) {\n $tableName = self::TABLE_NAME;\n\n $req = $this->_db->prepare(\"\n SELECT $tableName.message, $tableName.createdAt, users.username FROM $tableName \n INNER JOIN users ON users.idUser = $tableName.idUser \n WHERE $tableName.idFriend = ? AND $tableName.idUser = ? OR $tableName.idFriend = ? AND $tableName.idUSer = ?\n ORDER BY $tableName.createdAt \n \");\n\n $req->execute([$idFriend, $idUser, $idUser, $idFriend]);\n\n return $req->fetchAll();\n\n }", "public function getSentMessages ($userId)\n\t{\n\t\t$qb = $this->createQueryBuilder('m');\n\t\t$qb->where($qb->expr()->andX(\n\t\t\t$qb->expr()->eq('m.sender', $userId),\n\t\t\t$qb->expr()->eq('m.deletedBySender', '?1')\n\t\t));\n\t\t$qb->orderBy('m.sentTime', 'DESC');\n\t\t$qb->setParameter(1, false);\n\n\t\t$messages = $qb->getQuery()->getResult();\n\t\treturn $messages;\n\n\t}", "public function getUserMessageListOfUser($userId, $sqlSearch = null) {\n\t\tglobal $db;\n\t\t\n\t\t$array = [];\n\t\t\n\t\t$db -> query(\n\t\t\t'SELECT * '.\n\t\t\t'FROM `db_message` '.\n\t\t\t'WHERE `from_user_id` = \"'.$userId.'\" || `to_user_id` = \"'.$userId.'\" '.$sqlSearch.' '.\n\t\t\t'ORDER BY `date` DESC'\n\t\t);\n\t\tif($db -> numRows() > 0) {\n\t\t\twhile($r = $db -> fetchArray()) {\n\t\t\t\t$array[] = $r;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn($array);\n\t}", "public static function getMessages($user)\n\t{\n\t\t$db_connection = self::getConn(self::$MESS);\n\t\t$query = \"SELECT id, title, from_id, create_time, is_read FROM MESSAGE WHERE OWNER_ID=$user ORDER BY CREATE_TIME DESC\";\n\t\treturn self::selectDataList($db_connection, $query);\n\t}", "public function findUserMessages($teams, $activities, $user, $page, $size, $lastCreatedAt = null);", "public static function loadAllReceivedMessages($userId){\n $sql = \"SELECT * FROM Messages WHERE user_id = $userId\";\n $result = Message::$conn->query($sql);\n if ($result->num_rows > 0) {\n $allMsg = array();\n foreach ($result as $row){\n $newMsg = new Message($row['id'], $row['text'], $row['user_id'], $row['admin_id']);\n $allMsg[] = $newMsg;\n }\n return $allMsg;\n }\n return []; \n }", "function get_user_conversations($user_id) {\n\t //database query\n\t $q = $this->db->select('*')\n\t \t\t\t\t ->from('conversations_inbox')\n\t\t\t\t\t ->where('R_id',$user_id)\n\t\t\t\t\t ->order_by('post_time','desc')\n\t\t\t\t\t ->get();\n\t\t$result = $q->result();\n }", "protected function actionGetRecentMessages() {\n class_carrier::getInstance()->getObjSession()->setBitBlockDbUpdate(true);\n class_response_object::getInstance()->setStResponseType(class_http_responsetypes::STR_TYPE_JSON);\n\n $intMaxAmount = $this->getParam(\"limit\") != \"\" ? $this->getParam(\"limit\") : 5 ;\n\n $arrMessages = class_module_messaging_message::getObjectList($this->objSession->getUserID(), 0, $intMaxAmount-1);\n $arrReturn = array();\n foreach($arrMessages as $objOneMessage) {\n $arrReturn[] = array(\n \"systemid\" => $objOneMessage->getSystemid(),\n \"title\" => $objOneMessage->getStrDisplayName(),\n \"unread\" => $objOneMessage->getBitRead(),\n \"details\" => getLinkAdminHref($objOneMessage->getArrModule(\"modul\"), \"edit\", \"&systemid=\".$objOneMessage->getSystemid(), false)\n );\n }\n\n $arrReturn = array(\n \"messages\" => $arrReturn,\n \"messageCount\" => class_module_messaging_message::getNumberOfMessagesForUser($this->objSession->getUserID(), true)\n );\n\n return json_encode($arrReturn);\n }", "static function getMessages($channel, $currentUser, $last=0) {\n $query = \"SELECT SQL_CACHE `chat_accounts`.`name` , `chat_messages` . *\n FROM `chat_messages`\n\t\t CROSS JOIN `chat_accounts`\n\t\t WHERE (\n (`chat_messages`.`id` > ? AND `chat_messages`.`channel` = ?)\n AND\n (\n (`chat_messages`.`user` = ?)\n OR\n (`chat_messages`.`to` = ?)\n OR\n (`chat_messages`.`to` = '')\n )\n AND\n (\n `chat_accounts`.`id` = `chat_messages`.`user`\n )\n )\n ORDER BY `chat_messages`.`id` DESC LIMIT 35\";\n\t $arr = array($last,\n $channel,\n $currentUser->id,\n $currentUser->name);\n return DB::select($query, $arr);\n }", "public function findUserMessagesOf($team, $activities, $user, $page, $size, $lastCreatedAt = null);", "public function get_user_last_campaign($conn, $user_id) {\n\t\t$query = ('SELECT messages.id, messages.sender, messages.message, messages.phone, messages.status,messages.smsid, messages.time,messages.created FROM messages INNER JOIN users ON messages.user_id = users.id where user_id=' . $user_id . ' ORDER BY messages.sender DESC LIMIT :start,:end');\n\t\t\n\t\t// print_r($query);\n\t\treturn $this->get_pdo_record ( $conn, $query, 0, 1 );\n\t}", "function get_list() {\n\t\t\n\t\t$return = array();\n\t\t\n\t\t$query = \"SELECT *\"\n\t\t\t\t.\" FROM \".$this->table.\" M\"\n\t\t\t\t.\" WHERE \"\n\t\t\t\t.\" (user_from_ID = '{{user_ID}}' OR user_to_ID = '{{user_ID}}')\"\n\t\t\t\t.\" AND timestamp = (SELECT MAX(timestamp) FROM messages WHERE user_key = M.user_key LIMIT 0,1)\"\n\t\t\t\t.\" GROUP BY user_key ORDER BY timestamp DESC\"\n\t\t\t\t.\" LIMIT 0,25\";\n\t\t\n\t\t\n\t\t$where = array(\n\t\t\t'user_ID' => USER_ID\n\t\t);\n\t\t\n\t\t$messages = $this->db->query($query, $where);\n\t\twhile ($messages && $message = $this->db->fetch_assoc($messages)) {\n\t\t\t// get user details\n\t\t\t$user_ID = ($message['user_to_ID'] == USER_ID) ? $message['user_from_ID'] : $message['user_to_ID'];\n\t\t\t\n\t\t\t$user_obj = $this->db->select(\"users\",\n\t\t\t\tarray(\"user_ID\" => $user_ID),\n\t\t\t\tarray(\"user_ID\", \"user_username\", \"user_name_first\", \"user_name_last\")\n\t\t\t);\n\t\t\tif ($user_obj) $message['user'] = $this->db->fetch_assoc($user_obj);\n\t\t\t\n\t\t\t$return[] = $message;\n\t\t}\n\n\t\treturn $return;\n\t}", "function get_messages($user_id, $start, $limit) {\n $messages = good_query_table(\"SELECT * FROM msgs_rec LEFT JOIN msgs_thread ON msgs_thread.thread_id = msgs_rec.tid WHERE recipient_id = '$user_id' AND del = '1' ORDER BY `last_update` DESC LIMIT $start, $limit\");\n return $messages;\n}", "public function recieverchatUsers($userid){\r\n $sqlQuery = \"\r\n SELECT * FROM \".$this->chatUsersTable.\" WHERE userid IN\r\n (SELECT DISTINCT reciever_userid FROM \".$this->chatTable.\" WHERE sender_userid = '$userid')\";\r\n return $this->getData($sqlQuery);\r\n }", "public function findConversations(array $user_ids, array $arguments = array(), $limit = 1){\n\n if(!is_array($user_ids) || count($user_ids) < 2){\n throw new \\Exception('You need at least 2 users for a conversation', 1410783987);\n }\n\n //Get all conversations of the first user and check if\n //the other users are in these conversations too.\n $userClass = EloquentBase::userClass();\n\n $firstUser = $userClass::find($user_ids[0]);\n $conversations = $firstUser->conversations()->with('users')->with('messages')->get();\n\n $filteredConversations = array();\n\n foreach($conversations as $conversation){\n\n if(count($conversation->users) == count($user_ids)) {\n\n $argumentsFitting = true;\n foreach($arguments as $column => $value){\n if($conversation->$column != $value){\n $argumentsFitting = false;\n break;\n }\n }\n\n if(!$argumentsFitting) continue;\n\n $usersFitting = true;\n foreach($conversation->users as $convUser){\n if(!in_array($convUser->id, $user_ids)){\n $usersFitting = false;\n break;\n }\n\n }\n\n if(!$usersFitting) continue;\n\n $filteredConversations[] = $conversation;\n\n if(count($filteredConversations) == $limit)\n break;\n }\n }\n\n return $filteredConversations;\n\n }", "public function getMessageListOfUserWithUser($fromUserId, $toUserId, $sqlSearch = null) {\n\t\tglobal $db;\n\t\t\n\t\t$array = [];\n\t\t\n\t\t$db -> query(\n\t\t\t'SELECT * '.\n\t\t\t'FROM `db_message` '.\n\t\t\t'WHERE ((`from_user_id` = \"'.$fromUserId.'\" && `to_user_id` = \"'.$toUserId.'\") || (`to_user_id` = \"'.$fromUserId.'\" && `from_user_id` = \"'.$toUserId.'\")) '.$sqlSearch.' '.\n\t\t\t'ORDER BY `date` ASC '.\n\t\t\t'LIMIT 100'\n\t\t);\n\t\tif($db -> numRows() > 0) {\n\t\t\twhile($r = $db -> fetchArray()) {\n\t\t\t\t$array[$r['message_id']] = $r;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn($array);\n\t}", "public function index(Request $request, User $toUser)\n {\n $currentUser = Auth::user();\n\n if ($currentUser->id == $toUser->id) {\n return response('Forbidden Access.', 403);\n }\n\n $query = Message::with('fromUser')\n ->where(function ($query) use ($currentUser, $toUser) {\n $query->orWhere(function ($query) use ($currentUser, $toUser) {\n $query->where('from_user_id', $currentUser->id);\n $query->where('to_user_id', $toUser->id);\n });\n\n $query->orWhere(function ($query) use ($currentUser, $toUser) {\n $query->where('to_user_id', $currentUser->id);\n $query->where('from_user_id', $toUser->id);\n });\n })\n ->orderBy('id', 'DESC')\n ->limit(50);\n\n if ($request->input('last_message_id')) {\n $query->where('id', '<', $request->input('last_message_id'));\n }\n\n $messages = $query->get();\n\n return $messages;\n }", "public function lastMessages()\n {\n return response()->json(array_reverse(Chat::with('User')->orderBy('id', 'desc')->limit(20)->get()->toArray()));\n }", "public function getMessages($messageId = false, $isScroll = false){\n // SELECT * FROM (\n // SELECT * FROM messages ORDER BY id DESC LIMIT 150\n // ) sub\n // ORDER BY id ASC\n // need think how make 1 query\n $count = Messages::count();\n $limit = Common::GET_LAST_MESSAGE_LIMIT;\n $offset = $count - $limit;\n if ($offset < 0) $offset = 0;\n if ($messageId){\n if ($isScroll){\n return Messages::find(array(\n \"id < \" . (int) $messageId,\n \"limit\" => $limit\n ));\n } else {\n return Messages::find(\"id > \" . (int) $messageId);\n }\n } else {\n return Messages::find(array(\n \"offset\" => $offset,\n \"limit\" => $limit\n ));\n }\n }", "function receivedMessagesFromSender(User $user)\n {\n return Message::where('recipient_id', $this->id)->where('sender_id', $user->id)->where('read', 0)->get();\n }", "public function threadsLastMessages()\n {\n // Get all the threads that have not been deleted by the auth user\n $threads = $this->where( 'user_one', auth()->id() )->where( 'deleted_by_user_one', 0 )\n ->orWhere(function ($query) {\n $query->where('user_two', auth()->id())->where('deleted_by_user_two', 0);\n })->pluck('id');\n\n $threadsLastMessages = new Collection;\n\n if( $threads )\n {\n foreach( $threads as $thread )\n {\n $message = Message::where( 'thread_id', $thread )->orderBy('created_at', 'desc')->first();\n\n $threadsLastMessages->push($message);\n }\n }\n\n return isset( $threadsLastMessages ) ? $threadsLastMessages->sortByDesc( 'id' ) : new Collection;\n }", "public function all($user, $recipientId) {\n\t\treturn Message::query()\n\t\t\t->where(function ($query) use ($user, $recipientId) {\n\t\t\t\t$query->where('sender_id', '=', $user->id)\n\t\t\t\t\t->where('recipient_id', '=', $recipientId);\n\t\t\t})\n\t\t\t->orWhere(function ($query) use ($user, $recipientId) {\n\t\t\t\t$query->where('sender_id', '=', $recipientId)\n\t\t\t\t\t->where('recipient_id', '=', $user->id);\n\t\t\t})\n\t\t\t->orderBy('created_at', 'desc')\n\t\t\t->orderBy('id', 'desc')\n\t\t\t->simplePaginate(self::PAGE_SIZE);\n\t}", "public function getMessagesById($conversationId, $userId, $offset, $take)\n {\n return Conversation::whereHas('messages', function ($query) use ($userId, $offset, $take) {\n $query->where(function ($qr) use ($userId) {\n $qr->where('user_id', '=', $userId)\n ->where('deleted_from_sender', 0);\n })\n ->orWhere(function ($q) use ($userId) {\n $q->where('user_id', '!=', $userId)\n ->where('deleted_from_receiver', 0);\n })->skip($offset)->take($take);\n })->with(['messages.sender.image','userone', 'userone.image', 'usertwo', 'usertwo.image'])->find($conversationId);\n }", "function getMessages()\n {\n $message = new Message();\n\n $message->from_user = $this->cur_user->id;\n $message->orderBy('created DESC, id DESC');\n $message->is_deleted_from = 0;\n $message->limit((($this->cur_page - 1) * MESSAGES_PER_PAGE),\n MESSAGES_PER_PAGE + 1);\n\n if ($message->find()) {\n return $message;\n } else {\n return null;\n }\n }", "public\n function all_conversations($to_user_id)\n {\n $open_chats = $this->chat_model->get_open_chats($to_user_id);\n\n $chat_windows = array();\n if (!empty($open_chats)) {\n foreach ($open_chats as $chats) {\n $c_data = array();\n // mark chat read if window is active\n if ($chats->unread && $chats->active == 1) {\n $chats->unread = 0;\n $uc_data['unread'] = 0;\n $this->chat_model->_table_name = 'tbl_private_chat_users';\n $this->chat_model->_primary_key = 'private_chat_users_id';\n $this->chat_model->save($uc_data, $chats->private_chat_users_id);\n }\n // If a chat title is set then replace with the user title in tbl_private_chat_users\n if (!empty($chats->chat_title)) {\n $chats->title = $chats->chat_title;\n }\n $c_data['title'] = $chats->title;\n $c_data['chatid'] = $chats->private_chat_id;\n $c_data['unread'] = $chats->unread;\n $c_data['active'] = $chats->active;\n $c_data['to_user_id'] = $chats->user_id;\n\n // get all message by private chat id\n $messages = array();\n $limit = 5;\n $last_reply_id = 0;\n $all_messages = $this->chat_model->get_chat_messages($chats->private_chat_id, $chats->deleted);\n\n foreach ($all_messages as $message) {\n array_push($messages, $message);\n if ($last_reply_id == 0) {\n $last_reply_id = $message->private_chat_messages_id;\n }\n }\n $messages = array_reverse($messages);\n\n $template = $this->load->view(\"chat/conversations_body.php\", array(\n \"all_messages\" => $messages,\n \"chat\" => $chats,\n \"last_reply_id\" => $last_reply_id\n ), TRUE);\n // Store template\n $c_data['messages_template'] = $template;\n // Add Chat to array\n $chat_windows[] = $c_data;\n }\n }\n echo json_encode(array(\"chats\" => $chat_windows));\n exit();\n }", "public function getOfflineMessages(User $user, $limit = 30)\n {\n $result = array();\n $stmt = $this->prepare(\"\n SELECT `users`.`name` AS `from`, `message`, `date`\n FROM `events`\n INNER JOIN `users` ON `users`.`id` = `userid`\n WHERE `type` = 'message' AND `to` = :to AND `date` > :date\n LIMIT :limit;\");\n $stmt->bindParam(':to', $user->getName(), PDO::PARAM_STR);\n $stmt->bindParam(':date', $user->getLastLogout(), PDO::PARAM_INT);\n $temp = PHP_INT_MAX;\n $stmt->bindParam(':limit', $temp, PDO::PARAM_INT);\n $stmt->execute();\n $result[$user->getName()] = $stmt->fetchAll(PDO::FETCH_ASSOC);\n $stmt->closeCursor();\n foreach($user->getChannels(true) as $name => $arr) {\n $stmt->bindParam(':to', $name, PDO::PARAM_STR);\n $stmt->bindParam(':date', $user->getLastLogout(), PDO::PARAM_INT);\n $stmt->bindParam(':limit', $limit, PDO::PARAM_INT);\n $stmt->execute();\n $result[$name] = $stmt->fetchAll(PDO::FETCH_ASSOC);\n $stmt->closeCursor();\n }\n return $result;\n }", "public function getSentMessage($userId, $pageSize=5)\n {\n $criteria = new CDbCriteria;\n $criteria->condition = \"sender_id=$userId AND deleted_flag=0\";\n $criteria->order = 'created_date DESC';\n $count = Message::model()->count($criteria);\n $pages = new CPagination($count);\n // results per page\n $pages->pageSize=$pageSize;\n $pages->applyLimit($criteria);\n $messages = Message::model()->findAll($criteria);\n return array(\n 'messages' => $messages,\n 'pages' => $pages,\n );\n }", "public function getMessagesAllByUserId($userId, $offset = 0, $take = 20)\n {\n return $this->getConversationsAllByUserId($userId, $offset, $take);\n }", "public function getMessages(){\n\n $db = $this->db;\n $id = $this->id;\n\n $q = new QueryObject;\n\n try{\n $db->setTable('messages as m');\n \n $q->setRule(['reader_id', '=', $id]);\n $q->setJoin(['INNER', 'users as u', 'u.id', 'm.sender_id']);\n \n $q->setCondition('ORDER BY created ASC');\n \n $messages = $db->whereJoin($q, [\n 'u.name',\n 'u.nickname',\n \n 'm.content',\n 'm.status',\n 'm.created',\n ])->getAll();\n }\n catch(PDOException $e){\n echo $e->getMessage();\n }\n\n $poruke = [];\n\n foreach($messages as $m){\n\n $m['date-diff'] = contentAge($m['created']);\n die($m['date-diff']);\n\n if($m['status'])\n $poruke['read'][] = $m;\n else\n $poruke['unread'][] = $m;\n\n \n\n }\n\n return $poruke;\n }", "public function conversations_get_all($current_user_id,$item_id,$newerthan_id,$olderthan_id,$count) {\n\t\t\n\t\t\n\t\t/*$stmt = $this->limitQuery(\"SELECT t.username, t.image, t.locality, t.id, t.name, c.id FROM users t, conversations c\n\t\tINNER JOIN conversation_participants AS cp ON (cp.conversation_id = c.id AND cp.user_id = :user_id)\n\t\tLEFT JOIN messages AS m ON m.conversation_id = c.id\n\t\tWHERE m.id ### :limitid AND m.id = (SELECT MAX(id) FROM messages where conversation_id = c.id) ORDER BY m.id DESC LIMIT 0, :count\",$newerthan_id,$olderthan_id,$count);*/\n\t\t\t$stmt = $this->limitQuery(\"SELECT cp.unread as num_unread, i.title, i.id as item_id, i.image as item_image, i.price as item_price, t2.username, t2.image as userimage, t2.locality, t2.id as user_id, t2.name, c.id as conversation_id, m1.message as latest_message, m1.created_at as latest_message_timestamp, m1.id as latest_message_id, m1.type as latest_message_type, t3.username as latest_message_from_username, t3.id as latest_message_from_id, t3.image as latest_message_from_image, m1.offer as latest_message_offer FROM users t, users t2, users t3, conversation_participants cp, conversation_participants cp2, messages m1, conversations c LEFT JOIN items as i ON i.id = c.item_id\n\t\t\tWHERE m1.id ### :limitid AND cp.conversation_id = c.id AND cp2.conversation_id = c.id AND cp2.user_id <> :user_id AND t2.id = cp2.user_id AND\n\t\t\tm1.id = (SELECT MAX(m2.id)\n\t\t\t\t\t FROM messages m2\n\t\t\t\t\t WHERE m2.conversation_id = c.id) AND\n\t\t\tm1.conversation_id = c.id AND\n\t\t\tcp.user_id = :user_id AND t.id = cp.user_id AND t3.id = m1.user_id ORDER BY m1.id DESC LIMIT 0, :count\",$newerthan_id,$olderthan_id,$count);\n\t\t$stmt->bindParam(\":user_id\",$current_user_id);\n\t\t\t\n\t\t\t\n\t\treturn $this->yExecute($stmt,\"conversations\");\n\t\t\n\t}", "static function show_new_messages($id_user){\n if(!is_int($id_user))\n return false;\n $query = self::$PDO->prepare(\"SELECT t1.*,concat(t2.fname,' ',t2.name) as recipient_name,concat(t3.fname,' ',t3.name) as sender_name from \".self::$prefix.\"messages t1,\".self::$prefix.\"users t2, \".self::$prefix.\"users t3 where id_recipient = :id_user and t1.id_recipient = t2.ID AND t1.id_sender = t3.ID and viewed IS NULL and (deleted IS NULL OR deleted = 0)\");\n $query->execute(array(':id_user'=>$id_user));\n return $query->fetchAll();\n }", "public function lastFrom($lastMessage)\n {\n return response()->json(Chat::with('User')->where('id', '>', $lastMessage)->get()->toArray());\n }", "function get_conversation($user_id, $howmany)\t\r\n\t{\r\n\t\tglobal $wpdb, $current_user, $xoouserultra;\t\t\r\n\t\r\n\t\t$sql = ' SELECT * FROM ' . $wpdb->prefix . 'usersultra_wall ' ;\t\t\r\n\t \r\n\t\t\r\n\t\tif($user_id!=\"\" && $user_id>0)\r\n\t\t{\r\n\t\t\t$sql .= \" WHERE comment_wall_user_id = '\".(int)$user_id.\"' \";\t\t\r\n\t\t}\r\n\t\t\r\n\t\t$sql .= \" ORDER BY comment_id DESC LIMIT \".$howmany.\" \";\r\n\t\t\r\n\t\t$rows = $wpdb->get_results($sql);\r\n\t\t\r\n\t\t\t\r\n\t\treturn $rows;\t\t\t\r\n\t\r\n\t}", "static function show_received_message($id_user){\n if(!is_int($id_user))\n return false;\n $query = self::$PDO->prepare(\"SELECT t1.*,concat(t2.fname,' ',t2.name) as recipient_name,concat(t3.fname,' ',t3.name) as sender_name from \".self::$prefix.\"messages t1,\".self::$prefix.\"users t2, \".self::$prefix.\"users t3 where id_recipient = :id_user and t1.id_recipient = t2.ID AND t1.id_sender = t3.ID and (deleted IS NULL OR deleted=0)\");\n $query->execute(array(':id_user'=>$id_user));\n return $query->fetchAll();\n }", "function message_get(&$messages,$user,$get_all=false,$sort_desc=false)\r\n\t{\r\n\t$messages=sql_query(\"SELECT user_message.ref, user.username AS owner, user_message.seen, message.created, message.expires, message.message, message.url \" .\r\n\t\t\"FROM `user_message`\r\n\t\tINNER JOIN `message` ON user_message.message=message.ref \" .\r\n\t\t\"LEFT OUTER JOIN `user` ON message.owner=user.ref \" .\r\n\t\t\"WHERE user_message.user='{$user}'\" .\r\n\t\t($get_all ? \" \" : \" AND message.expires > NOW()\") .\r\n\t\t($get_all ? \" \" : \" AND user_message.seen='0'\") .\r\n\t\t\" ORDER BY user_message.ref \" . ($sort_desc ? \"DESC\" : \"ASC\"));\r\n\treturn(count($messages) > 0);\r\n\t}", "function getAllMessages($uid)\n{\n\t$now = new \\DWDateTime();\n\t$sql = '\n\t\tSELECT msgid, title FROM dw_message\n\t\tWHERE uid_recipient = '.\\util\\mysql\\sqlval($uid).'\n\t\t\tAND ((read_datetime >= '.\\util\\mysql\\sqlval($now->format()).'\n\t\t\t\tOR read_datetime = 0)\n\t\t\t\tOR archive = 1)\n\t';\n\treturn \\util\\mysql\\query($sql, true);\n}", "public function lastMessage($user)\n {\n $fromMe = $this->sendMessages->where('to', $user->id);\n\n // Getting the messages that were send to us by the given user\n $fromHim = $this->receivedMessages->where('from', $user->id);\n\n // Merge the collections\n $messages = $fromMe->merge($fromHim);\n\n // Sort then and take the last message in the chat\n $message = $messages->sortByDesc('created_at')->first();\n\n return $message;\n }", "public function get_recieved(){\n\t\t\tglobal $db;\n\n\n\t\t\t$user_id = $_SESSION['logged_admin_id'];\n\n\t\t\t\n\t\t\t$sql = \"SELECT * FROM message \";\n\t\t\t$sql .= \" WHERE reciever_id = {$user_id} \";\n\t\t\t$sql .= \" ORDER BY stamp DESC \";\n\n\t\t\t$messages = $db->query($sql);\n\n\t\t\tconfirm($messages);\n\n\t\t\treturn $messages;\n\t\t}", "public function getMessages($id) // Item and user must match\n {\n $user = Auth::user();\n $user_id = $user->id;\n $item_id = $id;\n \n \n //The query will return everything that the user received or send as message according to the item, it can return \n $messages = Message::with('user','receiver')\n ->where(['user_id'=> $user_id, 'item_id' => $item_id])\n ->orWhere(function($query) use($user_id, $item_id){\n $query->where(['receiver_id' => $user_id, 'item_id' => $item_id]);\n })\n ->get();\n \n return $messages;\n }", "function get_last_message_for($for_user) {\r\n\r\n\t$sql = \"SELECT * FROM messages WHERE to_user = $for_user ORDER BY date_sent DESC LIMIT 1\";\r\n\t$result = mysql_query($sql) or die(mysql_error());\r\n\t$message = mysql_fetch_assoc($result);\r\n\treturn $message;\r\n\r\n}", "public function getMessagesById($conversation_id, $userId, $offset, $take)\n {\n\n $removed_messages = ConversationRemove::where('user_id', $userId)\n ->where('conversation_id', $conversation_id)\n ->where('messages_removed', 1)\n ->first();\n\n $messages = [];\n $recipients = [];\n if(!$removed_messages){\n $messages = Message::where('conversation_id', $conversation_id)\n ->select('*', 'user_id as user')\n ->offset($offset)->take($take)\n ->get()\n ->toArray();\n\n $messages = collect($messages)->map(function($item, $key){\n $item = collect($item)->map(function($item, $key){\n if($key == 'user'){\n $user = User::with('profile')->where('id', '=', $item)->first(['id', 'first_name', 'last_name']);\n $user->home_course = null;\n $user->home_course_logo = null;\n $home_course = HomeCourse::with('course')->where('user_id', $user->id)->first();\n if(!is_null($home_course)){\n $user->home_course = $home_course->course->name;\n $user->home_course_logo = $home_course->course->logo;\n }\n return $user;\n }\n return $item;\n });\n return $item;\n });\n\n $participants = ConversationParticipant::where('conversation_id', $conversation_id)->get()->pluck('user_id');\n $recipients = User::with('profile')->whereIn('id', $participants)->get(['id', 'first_name', 'last_name']);\n// $recipients = $conversations->messages['withUser'];\n// $messages = $conversations->messages['messages'];\n } else {\n\n $messages = Message::where('conversation_id', $conversation_id)\n ->where('id', '>', $removed_messages->last_message_id)\n ->select('*', 'user_id as user')\n ->offset($offset)->take($take)\n ->get()\n ->toArray();\n\n $messages = collect($messages)->map(function($item, $key){\n $item = collect($item)->map(function($item, $key){\n if($key == 'user'){\n $user = User::with('profile')->where('id', '=', $item)->first(['id', 'first_name', 'last_name']);\n $user->home_course = null;\n $user->home_course_logo = null;\n $home_course = HomeCourse::with('course')->where('user_id', $user->id)->first();\n if(!is_null($home_course)){\n $user->home_course = $home_course->course->name;\n $user->home_course_logo = $home_course->course->logo;\n }\n return $user;\n }\n return $item;\n });\n return $item;\n });\n $participants = ConversationParticipant::where('conversation_id', $conversation_id)->get()->pluck('user_id');\n $recipients = User::with('profile')->whereIn('id', $participants)->get(['id', 'first_name', 'last_name']);\n }\n return [\n 'messages' => $messages,\n 'withUser' => $recipients,\n ];\n\n }", "public static function returnUndeletedMessages()\n\t{\n\t\t/*\n\t\t NULL - nobody deleted it\n\t\t 0 - both users deleted it\n\t\t IDuser1 - only first user deleted it\n\t\t IDuser2 - only second user deleted it\n\t\t*/\n\t\t$IDuser=Yii::$app->user->getId();\n\t\t$messagesReplyTable=MessagesReply::getTableSchema();\n\t\t$query=Messages::find();\n\t\t$query->joinWith(['relationMessagesReply']); \n\t\t$query->where(\"$messagesReplyTable->name.deleted_by IS NULL OR \n\t\t\t\t\t\t($messagesReplyTable->name.deleted_by <> 0 AND $messagesReplyTable->name.deleted_by <> :user)\", \n\t\t\t\t\t\t[':user'=>$IDuser]);//find NOT deleted messages\n\t\t$query->andWhere('user_one=:user OR user_two=:user',[':user'=>$IDuser]);\n\t\treturn $query;\n\t}", "public function getTopbarMessagesMenu($user) {\n\t\tif (!$user->userHasBasicPermission()) return '';\n $list = $this->db->getMessagesOfType($user->getUserId(), MESSAGES_GET_UNREAD_MESSAGES);\n\t\t$numMessages = count($list);\n\n\t\t$headerText = $this->lh->translationFor(\"you_have\").' '.$numMessages.' '.$this->lh->translationFor(\"unread_messages\");\n\t\t$result = $this->getTopbarMenuHeader(\"envelope-o\", $numMessages, CRM_UI_TOPBAR_MENU_STYLE_COMPLEX, $headerText, null, CRM_UI_STYLE_SUCCESS, false);\n\n foreach ($list as $message) {\n\t\t\t$from = $this->db->getDataForUser($message['user_from']);\n\t\t\t//if (empty($message[\"remote_user\"])) $remoteuser = $this->lh->translationFor(\"unknown\");\n\t\t\tif (empty($from['user'])) {\n\t\t\t $remoteuser = $this->lh->translationFor(\"unknown\");\n\t\t\t}else{\n\t\t\t //$remoteuser = $message[\"remote_user\"];\n\t\t\t $remoteuser = $from['user'];\n\t\t\t}\n\n\t if (empty($message[\"remote_avatar\"])) {\n\t\t\t\t$remoteavatar = CRM_DEFAULTS_USER_AVATAR;\n\t\t\t} else {\n\t\t\t\t$remoteavatar = $message[\"remote_avatar\"];\n\t }\n\t $result .= $this->getTopbarComplexElement($remoteuser, $message[\"message\"], $message[\"date\"], $remoteavatar, \"messages.php\");\n }\n\t\t$result .= $this->getTopbarMenuFooter($this->lh->translationFor(\"see_all_messages\"), \"messages.php\");\n\t\treturn $result;\n\t}", "public function show($user_id)\n {\n $messages = Message::where('recipient_id', '=', $user_id)->get();\n\n return $messages;\n }", "function messages_list($user, $options = array('mode' => 'recieved'))\r\n{\r\n\r\n\tif(!is_numeric($options['offset']))\r\n\t{\r\n\t\t$options['offset'] = 0;\r\n\t}\r\n\tif(!is_numeric($options['limit']))\r\n\t{\r\n\t\t$options['limit'] = MESSAGES_ITEMS_PER_PAGE;\r\n\t}\r\n\tif(isset($options['user']) && !is_numeric($options['user']))\r\n\t{\r\n\t\tdie('Icke numerisk konversationspartner har angivits, dödar scriptet.');\r\n\t}\r\n\r\n\t$query = 'SELECT m.id, m.timestamp, CONCAT(mm.title, m.title) AS title, m.recipient_status, SUBSTRING(CONCAT(mm.message, m.message), 1, 150) AS message, ';\r\n\tif($options['mode'] == 'recieved')\r\n\t{\r\n\t\t$query .= 'm.sender AS sender_id, slogin.username AS sender_username, sinfo.birthday AS sender_birthday, ';\r\n\t\t$query .= 'sinfo.gender AS sender_gender, sinfo.image AS sender_image ';\r\n\t\t$query .= 'FROM messages_new AS m, mass_messages AS mm, login AS slogin, userinfo AS sinfo ';\r\n\t\t$query .= 'WHERE mm.id = m.mass_message_id AND slogin.id = m.sender AND sinfo.userid = m.sender AND m.recipient = \"' . $user . '\" ';\r\n\t\t$query .= 'AND m.recipient_status != 2 ';\r\n\t}\r\n\telseif($options['mode'] == 'sent')\r\n\t{\r\n\t\t$query .= 'm.recipient AS recipient_id, rlogin.username AS recipient_username, rinfo.birthday AS recipient_birthday, ';\r\n\t\t$query .= 'rinfo.gender AS recipient_gender, rinfo.image AS recipient_image ';\r\n\t\t$query .= 'FROM messages_new AS m, mass_messages AS mm, login AS rlogin, userinfo AS rinfo ';\r\n\t\t$query .= 'WHERE mm.id = m.mass_message_id AND rlogin.id = m.recipient AND rinfo.userid = m.recipient AND m.sender = \"' . $user . '\" ';\r\n\t}\r\n\telseif($options['mode'] == 'conversation' || $options['mode'] == 'associated')\r\n\t{\r\n\t\t$query .= 'm.discussion AS discussion, m.recipient AS recipient_id, m.sender AS sender_id, rlogin.username AS recipient_username, ';\r\n\t\t$query .= 'slogin.username AS sender_username, rinfo.birthday AS recipient_birthday, sinfo.birthday AS sender_birthday, ';\r\n\t\t$query .= 'rinfo.gender AS recipient_gender, sinfo.gender AS sender_gender, ';\r\n\t\t$query .= 'rinfo.image AS recipient_image, sinfo.image AS sender_image ';\r\n\t\t$query .= 'FROM messages_new AS m, mass_messages AS mm, login AS slogin, login AS rlogin, userinfo AS sinfo, userinfo AS rinfo ';\r\n\t\t$query .= 'WHERE mm.id = m.mass_message_id AND rlogin.id = m.recipient AND slogin.id = m.sender AND rinfo.userid = m.recipient AND sinfo.userid = m.sender ';\r\n\t\t$query .= 'AND ((m.sender = \"' . $options['user'] . '\" AND m.recipient = \"' . $user . '\") OR ';\r\n\t\t$query .= '(m.sender = \"' . $user . '\" AND m.recipient = \"' . $options['user'] . '\")) ';\r\n\t\tif($options['mode'] == 'associated')\r\n\t\t{\r\n\t\t\t$query .= 'AND (discussion > ' . ($options['discussion']-5) . ' AND discussion < ' . ($options['discussion']+5) . ') ';\r\n\t\t}\r\n\t}\r\n\tswitch($options['order'])\r\n\t{\r\n\t\tcase 'sender':\r\n\t\t\t$query .= 'ORDER BY m.sender ';\r\n\t\tbreak;\r\n\t\tcase 'recipient':\r\n\t\t\t$query .= 'ORDER BY m.recipient ';\r\n\t\tbreak;\r\n\t\tcase 'title':\r\n\t\t\t$query .= 'ORDER BY m.title ';\r\n\t\tbreak;\r\n\t\tdefault:\r\n\t\t\t$query .= 'ORDER BY m.id ';\r\n\t\tbreak;\r\n\t}\r\n\tif($options['direction'] == 'ASC')\r\n\t{\r\n\t\t$query .= 'ASC ';\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$query .= 'DESC ';\r\n\t}\r\n\t$query .= 'LIMIT ' . $options['offset'] . ', ' . $options['limit'];\r\n\t\r\n\t\r\n\t\r\n\t$result = mysql_query($query) or die(report_sql_error($query));\r\n\tif(mysql_num_rows($result) == 0)\r\n\t{\r\n\t\techo 'Här var det tomt!';\r\n\t}\r\n\telse\r\n\t{\r\n\t\tif($options['mode'] == 'recieved')\r\n\t\t{\r\n\t\t\techo '<form action=\"' . $_SERVER['PHP_SELF'] . '?action=delete\" method=\"post\">';\r\n\t\t}\r\n\t\techo '</div><table style=\"width: 100%; margin-bottom: 3px;\" cellspacing=\"0\">';\r\n\t\techo '<tr style=\"font-weight: bold;\">';\r\n\r\n\t\tif(strlen($_GET['action']) < 1)\r\n\t\t{\r\n\t\t\t$link_action = 'inbox';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$link_action = $_GET['action'];\r\n\t\t}\r\n\r\n\t\tif($options['mode'] == 'conversation' || $options['mode'] == 'recieved' || $options['mode'] == 'associated')\r\n\t\t{\r\n\t\t\techo '<td style=\"width: 150px;\">';\r\n\t\t\tif($options['mode'] != 'associated')\r\n\t\t\t{\r\n\t\t\t\tif($options['direction'] == 'ASC' && $options['order'] == 'sender')\r\n\t\t\t\t{\r\n\t\t\t\t\t$link_direction = 'DESC';\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$link_direction = 'ASC';\r\n\t\t\t\t}\r\n\t\t\t\techo '<a href=\"' . $_SERVER['PHP_SELF'] . '?action=' . $link_action . '&order=sender&direction=' . $link_direction;\r\n\t\t\t\tif($options['mode'] == 'conversation')\r\n\t\t\t\t{\r\n\t\t\t\t\techo '&user=' . $_GET['user'];\r\n\t\t\t\t}\r\n\t\t\t\techo '\">Avsändare</a>';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\techo 'Avsändare';\r\n\t\t\t}\r\n\t\t\techo '</td>';\r\n\t\t}\r\n\t\tif($options['mode'] == 'conversation' || $options['mode'] == 'sent')\r\n\t\t{\r\n\t\t\tif($options['direction'] == 'ASC' && $options['order'] == 'recipient')\r\n\t\t\t{\r\n\t\t\t\t$link_direction = 'DESC';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$link_direction = 'ASC';\r\n\t\t\t}\r\n\t\t\techo '<td style=\"width: 150px;\">';\r\n\t\t\techo '<a href=\"' . $_SERVER['PHP_SELF'] . '?action=' . $link_action . '&order=recipient&direction=' . $link_direction;\r\n\t\t\tif($options['mode'] == 'conversation')\r\n\t\t\t{\r\n\t\t\t\techo '&user=' . $_GET['user'];\r\n\t\t\t}\r\n\t\t\techo '\">Mottagare</a></td>';\r\n\t\t}\r\n\t\techo '<td style=\"width: 150px;\">';\r\n\t\tif($options['mode'] != 'associated')\r\n\t\t{\r\n\t\t\tif(($options['direction'] == 'DESC' && $options['order'] == 'time') || !isset($options['order']))\r\n\t\t\t{\r\n\t\t\t\t$link_direction = 'ASC';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$link_direction = 'DESC';\r\n\t\t\t}\r\n\t\t\techo '<a href=\"' . $_SERVER['PHP_SELF'] . '?action=' . $link_action . '&order=time&direction=' . $link_direction;\r\n\t\t\tif($options['mode'] == 'conversation')\r\n\t\t\t{\r\n\t\t\t\techo '&user=' . $_GET['user'];\r\n\t\t\t}\r\n\t\t\techo '\">Tid</a>';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\techo 'Tid';\r\n\t\t}\r\n\t\techo '</td>';\r\n\r\n\t\techo '<td>';\r\n\t\tif($options['mode'] != 'associated')\r\n\t\t{\r\n\t\t\tif(($options['order'] == 'title' || !isset($options['order'])) && $options['direction'] == 'ASC')\r\n\t\t\t{\r\n\t\t\t\t$link_direction = 'DESC';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$link_direction = 'ASC';\r\n\t\t\t}\r\n\t\t\techo '<a href=\"' . $_SERVER['PHP_SELF'] . '?action=' . $link_action . '&order=title&direction=' . $link_direction;\r\n\t\t\tif($options['mode'] == 'conversation')\r\n\t\t\t{\r\n\t\t\t\techo '&user=' . $_GET['user'];\r\n\t\t\t}\r\n\t\t\techo '\">Rubrik</a>';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\techo 'Rubrik';\r\n\t\t}\r\n\t\techo '</td>';\r\n\t\tif($options['mode'] == 'recieved')\r\n\t\t{\r\n\t\t\techo '<td style=\"width: 50px;\">Radera</td>';\r\n\t\t}\r\n\t\techo '</tr>';\r\n\t\t$background = '#e7e7e7';\r\n\t\twhile($data = mysql_fetch_assoc($result))\r\n\t\t{\r\n\t\t\techo '<tr style=\"';\r\n\t\t\tif($data['recipient_status'] == 0)\r\n\t\t\t{\r\n\t\t\t\techo 'font-weight: bold;';\r\n\t\t\t}\r\n\t\t\tif($options['mode'] == 'associated' && $data['discussion'] == $options['discussion'])\r\n\t\t\t{\r\n\t\t\t\techo 'background-image: url(\\'\\');';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\techo 'background: ' . $background . ';';\r\n\t\t\t}\r\n\t\t\techo '\";>';\r\n\t\t\tif($options['mode'] == 'conversation' || $options['mode'] == 'recieved' || $options['mode'] == 'associated')\r\n\t\t\t{\r\n\t\t\t\t$tooltip_sender = '<b>' . $data['sender_username'] . '</b>';\r\n\t\t\t\tif($data['sender_image'] == 1 || $data['sender_image'] == 2)\r\n\t\t\t\t{\r\n\t\t\t\t\t$tooltip_sender .= '<br /><img src=' . IMAGE_URL . '/images/users/thumb/' . $data['sender_id'] . '.jpg />';\r\n\t\t\t\t}\r\n\t\t\t\tif($data['sender_gender'] == 'P')\r\n\t\t\t\t{\r\n\t\t\t\t\t$tooltip_sender .= '<br />Kön: kille';\r\n\t\t\t\t}\r\n\t\t\t\telseif($data['sender_gender'] == 'F')\r\n\t\t\t\t{\r\n\t\t\t\t\t$tooltip_sender .= '<br />Kön: tjej';\r\n\t\t\t\t}\r\n\t\t\t\tif(isset($data['sender_birthday']) && $data['sender_birthday'] != '0000-00-00')\r\n\t\t\t\t{\r\n\t\t\t\t\t$tooltip_sender .= '<br />Ålder: ' . date_get_age($data['sender_birthday']) . 'år';\r\n\t\t\t\t}\r\n\t\t\t\tif(strlen($data['sender_location']) > 1)\r\n\t\t\t\t{\r\n\t\t\t\t\t$tooltip_sender .= '<br />Bor: ' . $data['sender_location'];\r\n\t\t\t\t}\r\n\t\t\t\techo '<td><a href=\"/traffa/profile.php?id=' . $data['sender_id'] . '\" onmouseover=\"return makeTrue(domTT_activate(this, event, \\'content\\', \\'' . $tooltip_sender . '\\', \\'trail\\', true));\">' . $data['sender_username'] . '</a></td>';\r\n\t\t\t}\r\n\t\t\tif($options['mode'] == 'conversation' || $options['mode'] == 'sent')\r\n\t\t\t{\r\n\t\t\t\t$tooltip_recipient = '<b>' . $data['recipient_username'] . '</b>';\r\n\t\t\t\tif($data['recipient_image'] == 1 || $data['recipient_image'] == 2)\r\n\t\t\t\t{\r\n\t\t\t\t\t$tooltip_recipient .= '<br /><img src=' . IMAGE_URL . '/images/users/thumb/' . $data['recipient_id'] . '.jpg />';\r\n\t\t\t\t}\r\n\t\t\t\tif($data['recipient_gender'] == 'P')\r\n\t\t\t\t{\r\n\t\t\t\t\t$tooltip_recipient .= '<br />Kön: kille';\r\n\t\t\t\t}\r\n\t\t\t\telseif($data['recipient_gender'] == 'F')\r\n\t\t\t\t{\r\n\t\t\t\t\t$tooltip_recipient .= '<br />Kön: tjej';\r\n\t\t\t\t}\r\n\t\t\t\tif(isset($data['recipient_birthday']) && $data['recipient_birthday'] != '0000-00-00')\r\n\t\t\t\t{\r\n\t\t\t\t\t$tooltip_recipient .= '<br />Ålder: ' . date_get_age($data['recipient_birthday']) . 'år';\r\n\t\t\t\t}\r\n\t\t\t\tif(strlen($data['recipient_location']) > 1)\r\n\t\t\t\t{\r\n\t\t\t\t\t$tooltip_recipient .= '<br />Bor: ' . $data['recipient_location'];\r\n\t\t\t\t}\r\n\t\t\t\techo '<td><a href=\"/traffa/profile.php?id=' . $data['recipient_id'] . '\" ';\r\n\t\t\t\techo 'onmouseover=\"return makeTrue(domTT_activate(this, event, \\'content\\', \\'' . $tooltip_recipient . '\\', \\'trail\\', true));\">';\r\n\t\t\t\techo $data['recipient_username'] . '</a></td>';\r\n\t\t\t}\r\n\t\t\t$tooltip_title = '<b>' . $data['title'] . '</b><br />' . str_replace('\\'', '\\\\\\'', str_replace('\"', '\\\\\\\\', $data['message']));\r\n\t\t\tif(strlen($data['message']) == 150)\r\n\t\t\t{\r\n\t\t\t\t$tooltip_title .= '...';\r\n\t\t\t}\r\n\r\n\t\t\t$tooltip_title = str_replace(array(\"\\n\", \"\\r\"), '', $tooltip_title);\r\n\t\t\t\r\n\t\t\techo '<td>' . fix_time($data['timestamp']) . '</td>';\r\n\t\t\t$data['title'] = (strlen($data['title']) == 0) ? '[Rubrik saknas]' : $data['title'];\r\n\t\t\techo '<td><a href=\"' . $_SERVER['PHP_SELF'] . '?action=read&message_id=' . $data['id'] . '\" ';\r\n\t\t\techo 'onmouseover=\"return makeTrue(domTT_activate(this, event, \\'content\\', \\'' . $tooltip_title . '\\', \\'trail\\', true));\">' . $data['title'] . '</a></td>';\r\n\t\t\tif($options['mode'] == 'recieved')\r\n\t\t\t{\r\n\t\t\t\techo '<td><input name=\"' . $data['id'] . '\" value=\"delete\" type=\"checkbox\" style=\"border: 5x solid blue;\" /></td>';\r\n\t\t\t}\r\n\t\t\techo '</tr>';\r\n\t\t\tif($background == '#e7e7e7')\r\n\t\t\t{\r\n\t\t\t\t$background = '#ffffff';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$background = '#e7e7e7';\r\n\t\t\t}\r\n\t\t}\r\n\t\techo '</table>';\r\n\t}\r\n\tif($options['mode'] != 'associated')\r\n\t{\r\n\t\techo '<div class=\"grey_faded_div\">';\r\n\t\techo '<strong>Sida:</strong> ';\r\n\t\tif($options['mode'] == 'conversation')\r\n\t\t{\r\n\t\t\t$query = 'SELECT MAX(discussion) AS messages FROM messages_new WHERE ';\r\n\t\t\t$query .= '(sender = ' . $user . ' AND recipient = ' . $options['user'] . ') OR ';\r\n\t\t\t$query .= '(sender = ' . $options['user'] . ' AND recipient = ' . $user . ')';\r\n\t\t}\r\n\t\telseif($options['mode'] == 'recieved')\r\n\t\t{\r\n\t\t\t$query = 'SELECT messages_recieved AS messages FROM userinfo WHERE userid = ' . $_SESSION['login']['id'] . ' LIMIT 1';\r\n\t\t}\r\n\t\telseif($options['mode'] == 'sent')\r\n\t\t{\r\n\t\t\t$query = 'SELECT messages_sent AS messages FROM userinfo WHERE userid = ' . $_SESSION['login']['id'] . ' LIMIT 1';\r\n\t\t}\r\n\t\t$result = mysql_query($query) or die(report_sql_error($query));\r\n\t\t$data = mysql_fetch_assoc($result);\r\n\t\t$pages = ceil($data['messages'] / MESSAGES_ITEMS_PER_PAGE);\r\n\t\tfor($i = 0; $i < $pages; $i++)\r\n\t\t{\r\n\t\t\tif(($options['offset'] / MESSAGES_ITEMS_PER_PAGE) == $i)\r\n\t\t\t{\r\n\t\t\t\techo '<strong>' . ($i+1) . '</strong> ';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\techo '<a href=\"' . $_SERVER['PHP_SELF'] . '?action=' . $link_action;\r\n\t\t\t\tif(isset($options['order']))\r\n\t\t\t\t{\r\n\t\t\t\t\techo '&order=' . $options['order'];\r\n\t\t\t\t}\r\n\t\t\t\tif(isset($options['direction']))\r\n\t\t\t\t{\r\n\t\t\t\t\techo '&direction=' . $options['direction'];\r\n\t\t\t\t}\r\n\t\t\t\tif(isset($options['user']))\r\n\t\t\t\t{\r\n\t\t\t\t\techo '&user=' . $options['user'];\r\n\t\t\t\t}\r\n\t\t\t\techo '&offset=' . ($i * MESSAGES_ITEMS_PER_PAGE);\r\n\t\t\t\techo '\">' . ($i+1) . '</a> ';\r\n\t\t\t}\r\n\t\t}\r\n\t\techo '</div>';\r\n\t}\r\n\t//echo '<div>';\r\n\tif($options['mode'] == 'recieved')\r\n\t{\r\n\t\techo '<input type=\"submit\" value=\"Ta bort markerade\" class=\"button\" style=\"float: right; margin: 3px;\" onclick=\"return confirm(\\'Detta kommer ta bort alla markerade inlägg. Vill du fortsätta?\\');\" /> ';\r\n\t\techo '</form>';\r\n\t}\r\n\tif($options['mode'] == 'recieved')\r\n\t{\r\n\t\techo '<input type=\"button\" class=\"button\" style=\"float: left; margin: 3px;\" value=\"Gå till utkorgen\" onclick=\"window.location=\\'' . $_SERVER['PHP_SELF'];\r\n\t\techo '?action=list_sent\\';\" /> ';\r\n\t}\r\n\telse\r\n\t{\r\n\t\techo '<input type=\"button\" style=\"float: left; margin: 3px;\" class=\"button\" value=\"Gå till inkorgen\" onclick=\"window.location=\\'' . $_SERVER['PHP_SELF'];\r\n\t\techo '\\';\" /> ';\r\n\t}\r\n\tif($options['mode'] == 'associated')\r\n\t{\r\n\t\techo ' <input type=\"button\" class=\"button\" style=\"float: left; margin: 3px;\" value=\"Visa hela konversationen\" onclick=\"window.location=\\'' . $_SERVER['PHP_SELF'];\r\n\t\techo '?action=conversation&user=' . $options['user'] . '\\';\" /> ';\r\n\t}\r\n\t//echo '</div>';\r\n\techo '<br style=\"clear: both;\" />';\r\n}", "public function listInboxMessage($userid, $from, $to){\n\t\tglobal $dblink;\n\t\t$v = $dblink->prepare(\"SELECT * FROM message WHERE msg_to=? ORDER BY time DESC LIMIT ?,?\");\n\t\t$v->bind_param(\"iii\", $userid, $from, $to);\n\t\t$v->execute();\n\t\t\n\t\t$data = get_result($v);\n\t\treturn $data;\n\t}", "public function receivedSiteMessages(User $from = null)\n {\n $query = $this->siteMessages()\n ->where(DB::raw(\"cast(data->>'type' as int)\"), SiteMessage::received);\n\n return $from ? $query->where(DB::raw(\"cast(data->>'from' as int)\"), $from->id) : $query;\n\n }", "public function get_messages($chat_id, $last_message_id){\n\n $this->db->select(['id','to_user','from_user','content','created'])\n ->where('chat_id',$chat_id)\n ->where('id>',$last_message_id)\n ->order_by('created','DESC');\n //offset for loading of messages will be added soon\n $messages = $this->db->get('messages',15)->result();\n $messages = array_reverse($messages);\n //find id of a user on the otherside\n $otherside_user = new stdClass();\n $otherside_user->chat_id = $chat_id;\n foreach ($messages as $field => $value) {\n if($value->to_user == $this->session->customer_id){\n $otherside_user->id = $value->from_user;\n break;\n } else {\n $otherside_user->id = $value->to_user;\n break;\n }\n}\n//get information about a user on the other side\nif(!empty($otherside_user->id)){\n $this->db->select(['id','first_name','last_name','image'])\n ->from('customers')\n ->where('id',$otherside_user->id);\n $otherside_user = $this->db->get()->result();\n}\n//send messages and otherside user info to a view\n$chat_data['messages'] = $messages;\n$chat_data['otherside_user'] = $otherside_user ? $otherside_user : '';\n\nreturn $chat_data;\n}", "public function getMessagesFor($id)\n {\n Message::where('from', $id)->where('to', auth()->id())->update(['read' => true]);\n\n // get all messages between the authenticated user and the selected user\n $messages = Message::where(function($q) use ($id) {\n $q->where('from', auth()->id());\n $q->where('to', $id);\n })->orWhere(function($q) use ($id) {\n $q->where('from', $id);\n $q->where('to', auth()->id());\n })\n ->get();\n\n return response()->json($messages);\n }", "public static function getPendingMessages($chat_id,$message_id, $excludeSystem = false)\n {\n\n $excludeFilter = '';\n\n if ($excludeSystem == true) {\n $excludeFilter = ' AND user_id != -1'; // It's a system message\n }\n\n $db = ezcDbInstance::get();\n $stmt = $db->prepare('SELECT lh_msg.* FROM lh_msg INNER JOIN (SELECT id FROM lh_msg WHERE chat_id = :chat_id AND id > :message_id ' . $excludeFilter . ' ORDER BY id ASC) AS items ON lh_msg.id = items.id');\n $stmt->bindValue( ':chat_id',$chat_id,PDO::PARAM_INT);\n $stmt->bindValue( ':message_id',$message_id,PDO::PARAM_INT);\n $stmt->setFetchMode(PDO::FETCH_ASSOC);\n $stmt->execute();\n $rows = $stmt->fetchAll();\n\n return $rows;\n }", "public function getMessagesByUserId($userId, $car_id,$offset = 0, $take = 20)\n {\n return $this->getConversationsByUserId($userId, $car_id, $offset, $take);\n }", "public function findMessagesWithUser(int $userId, bool $isArchived)\n {\n $querybuilder = $this->createQueryBuilder('m');\n\n $querybuilder\n ->addSelect('(\n SELECT COUNT(re.isRead)\n FROM App\\Entity\\Reply re\n WHERE re.isRead = false\n and IDENTITY(re.sender) != :userId\n and re.isReceiverCopyDeleted = false\n and m.id = IDENTITY(re.message)\n ) as unreadItems');\n\n $querybuilder\n ->andwhere('(s.id = :userId and m.isArchivedBySender = :isArchived)\n or (r.id = :userId and m.isArchivedByRecepient = :isArchived)')\n ->andWhere('(s.id = :userId and m.isSenderCopyDeleted = false)\n or (r.id = :userId and m.isRecepientCopyDeleted = false)')\n ;\n\n return $querybuilder\n ->orderBy('m.dateSent', 'DESC')\n ->join('m.sender', 's')\n ->join('m.recepient', 'r')\n ->setParameters(array(\n 'userId' => $userId,\n 'isArchived' => $isArchived\n )\n )\n ->getQuery()\n ->getResult();\n }", "public function fetchMessages( $params )\n {\n \n $db = $this->getDb();\n \n // filter für die query konfigurieren\n $condition = array();\n $condition['filters'] = array();\n $condition['filters']['mailbox'] = 'in';\n $condition['filters']['archive'] = false;\n\n $query = $db->newQuery( 'GroupwareMessage_Table' );\n\n $query->fetch\n (\n $condition,\n $params\n );\n \n return $query->getAll();\n \n }", "function get_messages_for($for_user) {\r\n\r\n\t$sql = \"SELECT * FROM messages WHERE to_user = $for_user\";\r\n\t$result = mysql_query($sql) or die(mysql_error());\r\n\t$messages = array();\r\n\twhile ($message = mysql_fetch_assoc($result)){\r\n\t\tarray_push($messages,$message);\r\n\t}\r\n\treturn $messages;\r\n\r\n}", "public function findAllLatestMessages(): array\n {\n return $this->createQueryBuilder('p')\n ->orderBy('p.createdAt', 'DESC')\n ->getQuery()\n ->getResult();\n }", "function getUnreadChatMessages()\n{\n\n $messages = \\App\\Models\\TaskAssigned::join('task', 'task.id', '=', 'task_assigned.task_id')\n ->where('task_assigned.user_id', \\Auth::user()->id)\n ->where('task.status', 1)\n ->select([\"task.name\", \"task_assigned.last_message\", \"task_assigned.user_id\", \"task_assigned.task_id\" ])\n ->get();\n\n $data = array();\n foreach ($messages as $value) {\n $getLastMessageId = \\App\\Models\\TaskChat::where('task_id', $value['task_id'])->where('user_id', '!=' , $value['user_id'])->orderBy('id', 'desc')->first();\n //echo $getLastMessageId->id.' '.$value['last_message'].'<br>';\n if(isset($getLastMessageId) && !empty($getLastMessageId->id)){\n if($getLastMessageId->id > $value['last_message'] || $value['last_message']==0){\n $data[] = $value;\n //echo 'New message in task #'.$value['task_id'].'<br>';\n }\n }\n }\n\n return $data;\n}", "protected function getChatMessagesRequest($user_id, $to_contact = null, $to_channel = null, $date_ = null, $page_size = '10', $next_page_token = null)\n {\n // verify the required parameter 'user_id' is set\n if ($user_id === null || (is_array($user_id) && count($user_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $user_id when calling getChatMessages'\n );\n }\n if ($page_size !== null && $page_size > 50) {\n throw new \\InvalidArgumentException('invalid value for \"$page_size\" when calling ChatMessagesApi.getChatMessages, must be smaller than or equal to 50.');\n }\n\n\n $resourcePath = '/chat/users/{userId}/messages';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($to_contact !== null) {\n $queryParams['to_contact'] = ObjectSerializer::toQueryValue($to_contact);\n }\n // query params\n if ($to_channel !== null) {\n $queryParams['to_channel'] = ObjectSerializer::toQueryValue($to_channel);\n }\n // query params\n if ($date_ !== null) {\n $queryParams['date '] = ObjectSerializer::toQueryValue($date_);\n }\n // query params\n if ($page_size !== null) {\n $queryParams['page_size'] = ObjectSerializer::toQueryValue($page_size);\n }\n // query params\n if ($next_page_token !== null) {\n $queryParams['next_page_token'] = ObjectSerializer::toQueryValue($next_page_token);\n }\n\n // path params\n if ($user_id !== null) {\n $resourcePath = str_replace(\n '{' . 'userId' . '}',\n ObjectSerializer::toPathValue($user_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'application/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'application/xml'],\n ['application/json', 'multipart/form-data']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "function getMessages($post, $user, $db) {\r\n\t\t//if((preg_match('!#!', $message) !== FALSE) || (preg_match(':&:', $message) !== FALSE)) {\r\n\t\t// Format sent to client:\r\n\t\t// Friend!#!Message:&:Friend!#!Message ... Message\r\n\t\t$thisUser = $user['Login'];\r\n\t\t$query = \"SELECT * FROM Messages WHERE `To`='$thisUser' ORDER BY Time DESC LIMIT 50\";\r\n\t\t$res = $db->squery($query);\r\n\t\t$list = '';\r\n\t\tif($res->num_rows == 0) {\r\n\t\t\tdie(\"MSG: No Messages\");\r\n\t\t}\r\n\t\twhile($row = $res->fetch_assoc()) {\r\n\t\t\t$list .= $row['From'].'!#!'.$row['Message'].':&:';\r\n\t\t}\r\n\t\t$list = substr($list, 0, -3);\r\n\t\treturn $list;\r\n\t}", "public function get_mymessages($applicant_id){//get messages of an aplicant\n\t\t$this->db->where(array(\n\t\t\t\t'A.applicant_id'\t=>\t$applicant_id,\n\t\t\t\t'A.InActive'\t\t=>\t0\n\t\t\t));\n\t\t$this->db->order_by('A.message_sent','asc');\n\t\t$this->db->join(\"company_info B\",\"B.company_id = A.company_sender\",\"left outer\");\n\t\t$query = $this->db->get(\"applicant_inbox A\");\n\t\treturn $query->result();\t\t\n\t}", "public function findConversationsOfUser($userId) {\n $queryBuilder = $this->getEntityManager()->createQueryBuilder();\n $queryBuilder->select('c as conversation')\n ->from('CoreMessageBundle:Conversation', 'c')\n ->join('c.starter', 's')\n ->join('c.reciever', 'r')\n ->where('s.id = :userId OR r.id = :userId')\n ->andWhere('r.deletedAt IS NULL AND r.enabled = 1 AND s.deletedAt IS NULL AND s.enabled = 1')\n ->setParameter('userId', $userId);\n\n return $queryBuilder->getQuery()->getResult();\n }", "public function getFriendSendMessage() {\n $viewer_id = Engine_Api::_()->user()->getViewer()->getIdentity();\n $getFriednArray = array();\n $messageTable = Engine_Api::_()->getItemTable('messages_message');\n $messageTableName = $messageTable->info('name');\n\n $recipientTable = Engine_Api::_()->getDbtable('recipients', 'messages');\n $recipientTableName = $recipientTable->info('name');\n\n $membershipTable = Engine_Api::_()->getDbtable('membership', 'user');\n $membershipTableName = $membershipTable->info('name');\n\n $select = $recipientTable->select()\n ->setIntegrityCheck(false)\n ->from($recipientTableName, array('user_id'))\n ->joinInner($messageTableName, \"$recipientTableName . conversation_id = $messageTableName . conversation_id\", null)\n ->joinInner($membershipTableName, \"$membershipTableName . resource_id = $recipientTableName . user_id\", null)\n ->where($membershipTableName . '.user_id = ?', $viewer_id);\n\n $fetch = $select->query()->fetchAll();\n foreach ($fetch as $id) {\n $getFriednArray[] = $id['user_id'];\n }\n return $getFriednArray;\n }", "public function get_user_messages($offset=\"\",$record=\"\")\n\t{\n\t\t$result=$this->db->from(\"email\")->where(array(\"sender_id\" =>$this->user_id,\"type\" =>3))->orderby(\"id\",\"DESC\")->limit($record,$offset)->get();\n\t\treturn $result;\n\t}", "function getMessages($user,$reverse,$last){\n // get messages\n $time = date (\"F d Y H:i:s.\", filemtime(\"msg/\".$user));\n $time = prettyDate($time).\".\";\n if($time == \"46 years ago.\"){$time = \"Never ago.\";}\n $curtime = date (\"F d Y H:i:s.\", time());\nif(!isset($last)){\n echo \"Message last receieved: \".$time.\" Current time: \".$curtime.\"<br>\\n\";\n}\n echo \"Messages, sorted by recent:<br>\\n\";\n if(!$reverse){\n $messages = file(\"msg/\".$user);\n } else {\n $messages = array_reverse( file(\"msg/\".$user) );\n }\necho \"<div class='scrolls'>\";\n foreach($messages as $message){\n highlight_string($message).\"<br>\";\n }\necho \"</div>\";\nif(isset($_POST[\"api\"])){\ndie();\n}\n}", "public function siteMessages(User $theOther = null)\n {\n $query = $this->morphMany(DatabaseNotification::class, 'notifiable')\n ->where('type', SiteMessage::class);\n\n return $theOther ? $query->where(function (Builder $query) use ($theOther) {\n $query->where([\n [DB::raw(\"cast(data->>'type' as int)\"), SiteMessage::sent],\n [DB::raw(\"cast(data->>'to' as int)\"), $theOther->id],\n ])->orWhere([\n [DB::raw(\"cast(data->>'type' as int)\"), SiteMessage::received],\n [DB::raw(\"cast(data->>'from' as int)\"), $theOther->id],\n ]);\n }) : $query;\n }", "public function privateMessages(User $user)\n {\n $tempUser = \\Illuminate\\Support\\Facades\\Auth::user();\n\n $pvCommunication = Chat::with('user')\n ->where(['user_id' => $tempUser->id,\n 'receiver_id' => $user->id])->orWhere(function ($query) use ($user) {\n $query->where(['user_id' => $user->id, 'receiver_id' => \\Illuminate\\Support\\Facades\\Auth::user()->id]);\n })->get();\n return response()->json($pvCommunication);\n }", "public function senderchatUsers($userid){\r\n $sqlQuery = \"\r\n SELECT * FROM \".$this->chatUsersTable.\" WHERE userid IN\r\n (SELECT DISTINCT sender_userid FROM \".$this->chatTable.\" WHERE reciever_userid = '$userid')\";\r\n return $this->getData($sqlQuery);\r\n }", "public static function get($paramarray = array())\r\n {\r\n // defaults\r\n $where = array();\r\n $params = array();\r\n $limit = is_numeric(Options::get('pagination')) ? Options::get('pagination') : 20;\r\n\r\n // extract overrides\r\n $allowed = array('criteria', 'limit', 'offset', 'page');\r\n $paramarray = array_intersect_key($paramarray, array_fill_keys($allowed, true));\r\n extract($paramarray);\r\n\r\n if (isset($page) && is_numeric($page) ) {\r\n $offset = (intval($page) - 1) * intval($limit);\r\n }\r\n\r\n if (isset($criteria)) {\r\n $where[] = \"(sender LIKE CONCAT('%',?,'%') OR content LIKE CONCAT('%',?,'%'))\";\r\n $params[] = $criteria;\r\n $params[] = $criteria;\r\n }\r\n\r\n $q = \"SELECT * FROM message \";\r\n\r\n if (count($where)) {\r\n $q .= ' WHERE (' . implode(' AND ', $where) . ')';\r\n }\r\n\r\n $q .= \" ORDER BY sent_at DESC\";\r\n $q .= \" LIMIT $limit\";\r\n\r\n if (isset($offset)) {\r\n $q .= \" OFFSET $offset\";\r\n }\r\n\r\n try {\r\n $sth = DB::connect()->prepare($q);\r\n\r\n $sth->setFetchMode(PDO::FETCH_CLASS, 'Message', array());\r\n\r\n $sth->execute($params);\r\n\r\n $messages = $sth->fetchAll();\r\n } catch (PDOException $e) {\r\n trigger_error($e->getMessage());\r\n\r\n return false;\r\n }\r\n\r\n return $messages;\r\n }", "public function allForUser($userId)\n {\n $maxNotifications = Config('asgard.workflow.config.notification.max_notification_to_show',10);\n return $this->model->where('user_id','=',$userId)->orderBy('created_at', 'desc')->take($maxNotifications)->get();\n }", "public function getLevelOneWithUnreadMsg($app_user_id, $timestamp) {\n\t\t$sent_time = date(\"Y-m-d H:i:s\", $timestamp);\n\t\t$category_results = $this->conn->query(\"SELECT DISTINCT category_id, category_name,second_level FROM view_sp_res WHERE user_id IN ( SELECT sp_id FROM appuserssps WHERE app_user_id = $app_user_id AND active = 1 ) OR user_id IN ( SELECT residence_id FROM residencesindividuals WHERE individual_id = $app_user_id AND active = 1 ) OR user_id IN ( SELECT first_user_id FROM appusersappusers WHERE second_user_id = $app_user_id AND (active = 1 OR active = 0) ) OR user_id IN ( SELECT second_user_id FROM appusersappusers WHERE first_user_id = $app_user_id AND (active = 1 OR active = 0) )\");\n\t\t$no_of_rows_category = $category_results->num_rows;\n\t\tif ($no_of_rows_category > 0) //if data exist\n\t\t{\n\t\t\t$i = 0;\n\t\t\twhile( $row = $category_results->fetch_assoc() )\n\t\t\t{\n\t\t\t\t$category_id = $row['category_id'];\n\t\t\t\t//$user_id = $row['user_id'];\n\t\t\t\t$message_results = $this->conn->query(\"SELECT message_id FROM messages WHERE sent_time > '\".$sent_time.\"' AND (receiver_id =0 OR receiver_id = $app_user_id) AND sender_id IN (SELECT DISTINCT user_id FROM view_sp_res WHERE category_id = $category_id AND user_id IN ( SELECT sp_id FROM appuserssps WHERE app_user_id = $app_user_id ) OR user_id IN ( SELECT residence_id FROM residencesindividuals WHERE individual_id = $app_user_id ) OR user_id IN ( SELECT first_user_id FROM appusersappusers WHERE second_user_id = $app_user_id ) OR user_id IN ( SELECT second_user_id FROM appusersappusers WHERE first_user_id = $app_user_id ) )\");\n\t\t\t\t$no_of_msg = $message_results->num_rows;\n\t\t\t\t$rows[] = array(\n\t\t\t\t\t'category_id'=> $row['category_id'],\n\t\t\t\t\t'category_name' => $row['category_name'],\n\t\t\t\t\t'second_level' => $row['second_level'], \n\t\t\t\t\t'no_of_msg' => $no_of_msg \n\t\t\t\t);\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t$return = array(\n\t\t\t\t'message'=>\"Ok\",\n\t\t\t\t'categories' => $rows \n\t\t\t);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$return = array(\n\t\t\t\t'message'=>\"No Result Found.\" \n\t\t\t); \n\t\t}\n\t\treturn $return;\n\t\t\n\t}", "public function getmessages()\n {\n $alluser1 = DB::table('users as u')->join('conversions as c','u.id','c.user_one')\n ->where('c.user_two',Auth::user()->id)\n ->get();\n\n $alluser2 = DB::table('users as u')->join('conversions as c','u.id','c.user_two')\n ->where('c.user_one',Auth::user()->id)\n ->get(); \n return array_merge($alluser1->toArray(),$alluser2->toArray()); \n }", "public function getConversationFromUser( $stream, $user_id ){\n\t\t\n\t\t$chatMessages = array();\n\n\t\t// TODO - Validate tha user exists\n\t\t// TODO - Validate that $user_id is an integer\n\n\t\t$this->db->where(array( 'from_user_id' => $user_id ) );\n\t\t$conversationQuery = $this->db->get_where( 'chat_messages', array( 'stream' => $stream ) );\n\t\t$messagesResult = $conversationQuery->result();\n\n\t\tif( count( $messagesResult ) < 1 ) {\n\t\t\t$chatMessages['error'] = NO_ERROR;\n\t\t\t$chatMessages['responseMessage'] = \"No conversation was found for stream: '$stream' and from_user_id: '$user_id'\";\n\t\t\treturn $chatMessages;\n\t\t}\n\n\t\tforeach ( $messagesResult as $key => $messageRow )\n\t\t{\n\t\t $chatMessages['data'][$key] = array(\n\t\t \t'text_message' \t=> $messageRow->text_message,\n\t\t \t'from_user_id' \t=> $messageRow->from_user_id,\n\t\t \t'to_user_id' \t=> $messageRow->to_user_id,\n\t\t \t);\n\t\t}\n\n\t\t$chatMessages['error'] = NO_ERROR;\n\t\t$chatMessages['responseMessage'] = 'Conversation retrieved successfully!';\n\t\treturn $chatMessages;\n\n\t}", "public static function countMessagesFromLastReceivedMessage($userId, $lastId = 0)\n {\n $userId = intval($userId);\n $lastId = intval($lastId);\n\n if (empty($userId)) {\n return 0;\n }\n\n $messagesTable = Database::get_main_table(TABLE_MESSAGE);\n\n $conditions = array(\n 'where' => array(\n 'user_receiver_id = ?' => $userId,\n 'AND msg_status = ?' => MESSAGE_STATUS_UNREAD,\n 'AND id > ?' => $lastId\n )\n );\n\n $result = Database::select('COUNT(1) AS qty', $messagesTable, $conditions);\n\n if (!empty($result)) {\n $row = current($result);\n\n return $row['qty'];\n }\n\n return 0;\n }", "public static function getNewMessageCount($userId = null)\n {\n if ($userId === null) {\n $userId = Yii::app()->user->id;\n }\n\n $json = array();\n\n // New message count\n $sql = \"SELECT count(message_id)\n FROM user_message\n LEFT JOIN message on message.id = user_message.message_id\n WHERE user_message.user_id = :user_id AND (message.updated_at > user_message.last_viewed OR user_message.last_viewed IS NULL) AND message.updated_by <> :user_id\";\n $connection = Yii::app()->db;\n $command = $connection->createCommand($sql);\n $command->bindParam(\":user_id\", $userId);\n return $command->queryScalar();\n }", "function show_messages($userid){\r\n include(\"mysql_connection.php\");\r\n $messages = array();\r\n\r\n $sql = \"SELECT sender_id, receiver_id, body, send_time FROM message\r\n WHERE receiver_id = '$userid' order by send_time desc\";\r\n $result = mysqli_query($connect, $sql);\r\n\r\n while($data = mysqli_fetch_object($result)){\r\n $messages[] = array( 'send_time' => $data->send_time,\r\n 'sender_id' => $data-> sender_id,\r\n 'uid' => $userid,\r\n 'body' => $data->body);\r\n }\r\n return $messages;\r\n\r\n }", "public function getMessages()\n {\n $params = [\n 'owner' => $this->credentials,\n 'maxLimit' => $this->maxLimit\n ];\n\n $result = $this->_client->getMessages($params);\n return isset($result->return) ? FactoryMessage::getMessages($result->return) : null;\n }", "function GetConversationIdsFromUserId( $FromUser_Id ){\n\n\tif( ! is_int( $FromUser_Id ) )\n\t\treturn( \"Param error: FromUser_Id - wrong type or empty.\" );\n\n\t$Sql = \"SELECT Conversation_Id FROM ChatConversationParticipants WHERE User_Id = $FromUser_Id\";\n\t$result = mysql_query( $Sql );\n\t$errno = mysql_errno();\n\tif( 0 != $errno )\n\t\treturn( \"mysql error: $errno\" );\n\t$Conversation_Ids = array();\n\twhile( $row = mysql_fetch_row( $result ) )\n\t\t$Conversation_Ids[] = $row[0];\n\tmysql_free_result( $result );\n\treturn( $Conversation_Ids );\n}", "public function listOutboxMessage($userid, $from, $to){\n\t\tglobal $dblink;\n\t\t$v = $dblink->prepare(\"SELECT * FROM message WHERE msg_from=? ORDER BY time DESC LIMIT ?,?\");\n\t\t$v->bind_param(\"iii\", $userid, $from, $to);\n\t\t$v->execute();\n\t\t$v->store_result();\n\n\t\t$data = get_result($v);\n\t\treturn $data;\n\t}", "public function getMessageList($page, $userId);", "public static function get_all_for_user()\n\t{\n\t\t$user = Auth::instance()->get_user();\n\t\t$q = self::get_all_where()->where('user.id', '=', $user['id'])->execute()->as_array();\n $q = self::get_message_sender($q);\n return $q;\n\t}", "public function listInboxMessageFull($userid){\n\t\tglobal $dblink;\n\n\t\t$v = $dblink->prepare(\"SELECT * FROM message WHERE msg_to=? ORDER BY time DESC\");\n\t\t$v->bind_param(\"i\", $userid);\n\t\t$v->execute();\n\t\t$v->store_result();\n\n\t\t$data = $v->num_rows;\n\t\treturn $data;\n\t}", "public function getMessagesFor($id)\n {\n Message::where('from', $id)->where('to', auth()->id())->update(['read' => true]);\n\n $messages = Message::where(function($q) use ($id) {\n $q->where('from', auth()->id());\n $q->where('to', $id);\n })->orWhere(function($q) use ($id) {\n $q->where('from', $id);\n $q->where('to', auth()->id());\n })\n ->get(); // (a = 1 AND b=2) OR (c=1 OR d=2) Two functions and if statements between them.\n \n return response()->json($messages);\n }", "public function fetchMessages($fromid,$toid)\r\n\t{\r\n\t\t\t//$this->query(\"SELECT `chat`.`msg` FROM `chat` WHERE (`chat`.`msgfrom`=\".(int)$fromid.\" OR `chat`.`msgfrom`=\".(int)$toid.\" ) AND (`chat`.`msgto`=\".(int)$fromid.\" OR `chat`.`msgto`=\".(int)$toid.\") ORDER BY `chat`.`time` DESC\");\r\n\t\t\t$this->query(\"SELECT `chat`.`msg`,`users`.`username` FROM `chat` JOIN `users` ON `chat`.`msgfrom`=`users`.`uid` WHERE (`chat`.`msgfrom`=\".(int)$fromid.\" OR `chat`.`msgfrom`=\".(int)$toid.\" ) AND (`chat`.`msgto`=\".(int)$fromid.\" OR `chat`.`msgto`=\".(int)$toid.\") ORDER BY `chat`.`time` DESC\");\r\n\t\treturn $this->rows();\r\n\t}", "function getLocationHistoryForUser($userId) {\n\n $stmt = $this->conn->prepare(\"SELECT * FROM n2u_user_history where user_id=? order by date_visited DESC\");\n $stmt->bind_param(\"i\", $userId);\n $stmt->execute();\n $result = $stmt->get_result();\n $messages = array();\n if ($result->num_rows > 0) {\n while($row = $result->fetch_assoc()) {\n array_push($messages,$row);\n }\n }\n $stmt->close();\n return $messages;\n\n }", "public static function getNewMessages( $users_id ){\n\t\t$sql = \"SELECT knights.name as name, knights.avatars_id as avatars_id, messages_last_one_new.text as text, messages_last_one_new.date as date\n\t\t\t\t\tFROM messages_last_one_new\n\t\t\t\t\tINNER JOIN users ON users.id = messages_last_one_new.with_user\n\t\t\t\t\tINNER JOIN knights ON knights.users_id = users.id\n\t\t\t\t\tWHERE messages_last_one_new.users_id = :users_id\";\n\t\t$command = Yii::app()->db->createCommand( $sql );\n\t\t$command->bindValue( ':users_id', $users_id, PDO::PARAM_INT );\n\t\treturn $command->queryAll();\n\t}" ]
[ "0.7131494", "0.69212425", "0.6910486", "0.69050115", "0.6769677", "0.6648811", "0.65980834", "0.6537211", "0.65326416", "0.6511721", "0.6491113", "0.64504147", "0.6447291", "0.64414334", "0.6424168", "0.6406356", "0.64015853", "0.6400921", "0.63757455", "0.6330126", "0.632511", "0.62841636", "0.6280016", "0.6234609", "0.62245333", "0.62233675", "0.62071687", "0.6144175", "0.610888", "0.6066677", "0.6038233", "0.60255635", "0.6024004", "0.5989345", "0.5986548", "0.5964261", "0.5961328", "0.59529227", "0.5948951", "0.5927785", "0.5921775", "0.5915581", "0.58991516", "0.5885197", "0.58797127", "0.5879234", "0.58724445", "0.58723617", "0.58663225", "0.5865637", "0.5864349", "0.5848654", "0.5838062", "0.58316845", "0.58228195", "0.58190835", "0.5815267", "0.58098084", "0.5792316", "0.57872355", "0.57833695", "0.5782913", "0.5772649", "0.57711715", "0.5769127", "0.576505", "0.5753175", "0.57515913", "0.57431", "0.57415384", "0.57278275", "0.57243127", "0.5722247", "0.57220596", "0.57186455", "0.5718636", "0.5717749", "0.571499", "0.5686394", "0.5682848", "0.56745833", "0.5664171", "0.56632936", "0.56631833", "0.5662493", "0.56525666", "0.56519103", "0.5644762", "0.56358737", "0.5634053", "0.56324506", "0.5630991", "0.56063753", "0.5606092", "0.560234", "0.5599636", "0.5591816", "0.55876416", "0.557229", "0.55707854" ]
0.7725402
0
update all LastReadMessage_Id for all User_Id in all their active conversations given an array of array( 0 => array(Conversation_Id,User_Id,Message_Id), 1 => array(Conversation_Id,User_Id,Message_Id), ... ) update the ChatConversationParticipants tables setting the LastReadMessage_Id to the Message_Id for each Conversation_Id,User_Id
обновить LastReadMessage_Id для всех User_Id в всех их активных беседах, используя массив массивов (0 => массив(Conversation_Id, User_Id, Message_Id), 1 => массив(Conversation_Id, User_Id, Message_Id), ...) обновить таблицу ChatConversationParticipants, установив LastReadMessage_Id в Message_Id для каждого Conversation_Id, User_Id
function UpdateLastRead( $LastReadArray ){ if( ! is_array( $LastReadArray ) || 0 == count( $LastReadArray ) ) return( "Param error: LastReadArray - wrong type or empty." ); /* // compose an sql statement like this: UPDATE ChatConversationParticipants SET LastReadMessage_Id = CASE WHEN ( Conversation_Id = 42 AND User_Id = 1 ) THEN 1 WHEN ( Conversation_Id = 42 AND User_Id = 2 ) THEN 2 WHEN ( Conversation_Id = 43 AND User_Id = 1 ) THEN 1 WHEN ( Conversation_Id = 43 AND User_Id = 2 ) THEN 2 ELSE LastReadMessage_Id END WHERE Conversation_Id IN (42,43,44) */ $InList = ""; $Sql = "UPDATE ChatConversationParticipants SET LastReadMessage_Id = CASE "; foreach( $LastReadArray as $row ){ $InList .= "{$row[0]},"; $Sql .= "WHEN (Conversation_Id = {$row[0]} AND User_Id = {$row[1]} ) THEN {$row[2]} "; } $InList = rtrim( $InList, "," ); $Sql .= "ELSE LastReadMessage_Id END WHERE Conversation_Id IN ($InList)"; mysql_query( $Sql ); $errno = mysql_errno(); if( 0 != mysql_errno() ) return( "mysql error: $errno" ); return( true ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update(Request $request, User $message)\n {\n //\n $converses=Conversation::Where('r_id',auth()->user()->id)->where('status','unread')->orderBy('updated_at','desc')->get();\n $this->validate($request,[\n 'body'=>'required'\n ]);\n $name = $message->name;\n $user=$message->id;\n \n if (Auth::user()) {\n\n\n $message= new Message;\n $message->s_id=Auth::user()->id;\n $message->r_id=$user;\n $message->body=$request->input('body');\n $message->save();\n\n $chat=Conversation::where(function($query) use($user){\n $query->where('s_id',auth()->user()->id)\n ->where('r_id',$user);\n })->orWhere(function($query) use($user){\n $query->where('s_id',$user)\n ->where('r_id',auth()->user()->id);\n })->get();\n \n $chat_id= $chat[0]['id'];\n\n $converse=Conversation::find($chat_id);\n $converse->s_id=auth()->user()->id;\n $converse->r_id=$user;\n $converse->s_name=Auth::user()->name;\n $converse->r_name=$name;\n $converse->last_message=$request->input('body');\n $converse->save();\n $notifications = Notification::where('status','2')->where('user_id', Auth::user()->id)->get();\n\n\n return redirect()->route('messages.show',['reciever'=>$user])->with('conversations',$converses)->with('notifications', $notifications);\n }\n \n }", "public function updateNotificationReadedAll($user)\n {\n # code...\n // $x = select all\n // set readed in $x\n $unread = $this->db\n ->select('user_notification_id')\n ->from($this->table)\n ->where_null('readed_at')\n ->where('user', $user)->result_object();\n\n // map to set readed_at\n $currentTimestamp = $this->timestamp;\n $arrayOfUnread = array_map(function ($item) use ($currentTimestamp) {\n return [\n 'user_notification_id' => $item['user_notification_id'],\n 'readed_at' => $currentTimestamp\n ];\n }, $unread);\n\n // update to table\n // update_batch(Table, Array, Where Key)\n return $this->db\n ->where('user', $user)\n ->update_batch($this->table, $arrayOfUnread, 'id');\n }", "function GetMessages( $ConversationIdArray, $LastMessageId ){\n\n\tif( ! is_array( $ConversationIdArray ) || ! is_int( $LastMessageId ) )\n\t\treturn( \"Param error: ConversationIdArray / LastMessageId - wrong type or empty.\" );\n\t$Messages = array();\n\tif( 0 == count( $ConversationIdArray ) ){\n\t\t// this user is not in any conversations, so there are no messages to retreive.\n\t\treturn( $Messages );\n\t}\n\t$ConvIdListStr = implode( \",\", $ConversationIdArray );\n\t$Sql = \n\t\t\t\"SELECT \n\t\t\t\tm.Conversation_Id AS Conversation_Id, m.Id AS MessageId, \n\t\t\t\tm.FromUser_Id as FromUser_Id, CONCAT( u.FirstName, ' ', u.LastName ) AS FromUser_Name,\n\t\t\t\tm.DateSent as DateSent,\n\t\t\t\tm.Message\n\t\t\tFROM ChatMessages m,User u\n\t\t\tWHERE \n\t\t\t\t(m.FromUser_Id = u.Id) AND\n\t\t\t\tm.Conversation_Id IN ($ConvIdListStr) AND\n\t\t\t\tm.Id > $LastMessageId\n\t\t\tORDER BY m.Id ASC\";\n\n\t$result = mysql_query( $Sql );\n\t$errno = mysql_errno();\n\tif( 0 != $errno )\n\t\treturn( \"mysql error: $errno\" );\n\twhile( $row = mysql_fetch_array( $result, MYSQL_ASSOC ) ){\n\t\t// MessageId, needs to be an int\n\t\t$row[\"MessageId\"] = (int)$row[\"MessageId\"];\n\t\t$Messages[] = $row;\n\t}\n\tmysql_free_result( $result );\n\treturn( $Messages );\n}", "function create_conversation($user_ids, $subject, $body)\n{\n $dbcon = mysqli_connect('127.0.0.1', 'root', '', 'private_message_system');\n //Change any malicious code to text only\n $subject = mysqli_real_escape_string($dbcon, htmlentities($subject));\n $body = mysqli_real_escape_string($dbcon, htmlentities($body));\n //malicious code end\n $sqlquery = \"INSERT INTO `conversations` (`conversation_subject`) VALUES ('{$subject}')\";\n mysqli_query($dbcon, $sqlquery);\n\n //Get Subject ID to link to users part of the conversation\n $conversation_id = mysqli_insert_id($dbcon);\n //Into database con_msg 4 columns values\n $sqlquery = \"INSERT INTO `conversations_messages` (`conversation_id`, `user_id`, `message_date`, `message_text`)\n VALUES ('{$conversation_id}', '{$_SESSION['user_id']}', UNIX_TIMESTAMP(), '{$body}')\";\n //FROM_UNIXTIME(unix_timestamp)\n mysqli_query($dbcon, $sqlquery);\n // die(mysqli_error($dbcon));\n //for each user array\n\n $values = array(\"({$conversation_id}, {$_SESSION['user_id']}, UNIX_TIMESTAMP(), 0)\");\n\n //$user_ids[] = $_SESSION['user_id']; //Append the user sending the message to the array\n\n //loop through each user that is added to the conversation and add to a ,cslist\n foreach ($user_ids as $user_id){\n $user_id = (int) $user_id; // Extra security to ensure data comes from the database\n $values[] = \"({$conversation_id}, {$user_id}, 0, 0)\";\n }\n\n $sqlquery = \"INSERT INTO `conversations_members` (`conversation_id`, `user_id`, `conversation_last_view`, `conversation_deleted`)\n VALUES \" . implode(\", \", $values); //include reciepients\n\n mysqli_query($dbcon, $sqlquery);\n\n}", "function markMessages($personal_messages = null, $owner = null)\n{\n\tglobal $ID_MEMBER, $db_prefix;\n\n\tif ($owner === null)\n\t\t$owner = $ID_MEMBER;\n\n\tdb_query(\"\n\t\tUPDATE {$db_prefix}im_recipients\n\t\tSET is_read = 1\n\t\tWHERE ID_MEMBER = $owner\n\t\t\tAND is_read = 0\" . ($personal_messages !== null ? \"\n\t\t\tAND ID_PM IN (\" . implode(', ', $personal_messages) . \")\n\t\tLIMIT \" . count($personal_messages) : ''), __FILE__, __LINE__);\n\t// If something was marked as read, get the number of unread messages remaining.\n\tif (db_affected_rows() > 0);\n\t{\n\t\t$request = db_query(\"\n\t\t\tSELECT COUNT(ID_PM)\n\t\t\tFROM {$db_prefix}im_recipients\n\t\t\tWHERE ID_MEMBER = $owner\n\t\t\t\tAND is_read = 0\", __FILE__, __LINE__);\n\t\tlist ($num_unmarked) = mysql_fetch_row($request);\n\t\tupdateMemberData($owner, array('unreadMessages' => $num_unmarked));\n\t}\n}", "public function updateMail()\n\t\t{\n\t\t\t$conn = connectDB();\n\t\t\t$userID = $this->id;\n\t\t\t$result = $conn->query(\"SELECT * FROM user_mail WHERE id=$userID\");\n\t\t\t$row = mysqli_fetch_row($result);\n\t\t\t\n\t\t\t$unread = 0;\n\t\t\t//Iterates through the user's message slots\n\t\t\tfor($i = 1; $i < 11; $i++)\n\t\t\t{\n\t\t\t\t//There is a message\n\t\t\t\tif($row[$i] != null)\n\t\t\t\t{\n\t\t\t\t\t//Get the message ID\n\t\t\t\t\t$msgID = $row[$i];\n\t\t\t\t\t//Check if that message was read\n\t\t\t\t\t$is_read = get_value($conn, \"SELECT is_read FROM messages WHERE id=$msgID\");\n\t\t\t\t\tif($is_read == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$unread++;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tunset($msgID);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$conn->close();\n\t\t\t$this->unread = $unread;\n\t\t\t\n\t\t\tunset($userID);\n\t\t\tunset($result);\n\t\t\tunset($row);\n\t\t\tunset($unread);\n\t\t}", "public\n function all_conversations($to_user_id)\n {\n $open_chats = $this->chat_model->get_open_chats($to_user_id);\n\n $chat_windows = array();\n if (!empty($open_chats)) {\n foreach ($open_chats as $chats) {\n $c_data = array();\n // mark chat read if window is active\n if ($chats->unread && $chats->active == 1) {\n $chats->unread = 0;\n $uc_data['unread'] = 0;\n $this->chat_model->_table_name = 'tbl_private_chat_users';\n $this->chat_model->_primary_key = 'private_chat_users_id';\n $this->chat_model->save($uc_data, $chats->private_chat_users_id);\n }\n // If a chat title is set then replace with the user title in tbl_private_chat_users\n if (!empty($chats->chat_title)) {\n $chats->title = $chats->chat_title;\n }\n $c_data['title'] = $chats->title;\n $c_data['chatid'] = $chats->private_chat_id;\n $c_data['unread'] = $chats->unread;\n $c_data['active'] = $chats->active;\n $c_data['to_user_id'] = $chats->user_id;\n\n // get all message by private chat id\n $messages = array();\n $limit = 5;\n $last_reply_id = 0;\n $all_messages = $this->chat_model->get_chat_messages($chats->private_chat_id, $chats->deleted);\n\n foreach ($all_messages as $message) {\n array_push($messages, $message);\n if ($last_reply_id == 0) {\n $last_reply_id = $message->private_chat_messages_id;\n }\n }\n $messages = array_reverse($messages);\n\n $template = $this->load->view(\"chat/conversations_body.php\", array(\n \"all_messages\" => $messages,\n \"chat\" => $chats,\n \"last_reply_id\" => $last_reply_id\n ), TRUE);\n // Store template\n $c_data['messages_template'] = $template;\n // Add Chat to array\n $chat_windows[] = $c_data;\n }\n }\n echo json_encode(array(\"chats\" => $chat_windows));\n exit();\n }", "protected function doEnsureMessagesIsRead()\n {\n foreach ($this->getMessages() as $message) {\n $message->setIsReadByParticipant($message->getSender(), true);\n $message->ensureIsReadByParticipant($this->getParticipants());\n }\n }", "function messagesSeen($friend_id){\n global $so,$db;\n $res = dbQuery('update messages set message_status = 1 where message_from = :friend_id AND message_to = :self',[':friend_id'=>sanitized($friend_id),':self'=>sanitized($so['user']['user_id'])]);\n return $res;\n}", "public function getMessagesById($conversation_id, $userId, $offset, $take)\n {\n\n $removed_messages = ConversationRemove::where('user_id', $userId)\n ->where('conversation_id', $conversation_id)\n ->where('messages_removed', 1)\n ->first();\n\n $messages = [];\n $recipients = [];\n if(!$removed_messages){\n $messages = Message::where('conversation_id', $conversation_id)\n ->select('*', 'user_id as user')\n ->offset($offset)->take($take)\n ->get()\n ->toArray();\n\n $messages = collect($messages)->map(function($item, $key){\n $item = collect($item)->map(function($item, $key){\n if($key == 'user'){\n $user = User::with('profile')->where('id', '=', $item)->first(['id', 'first_name', 'last_name']);\n $user->home_course = null;\n $user->home_course_logo = null;\n $home_course = HomeCourse::with('course')->where('user_id', $user->id)->first();\n if(!is_null($home_course)){\n $user->home_course = $home_course->course->name;\n $user->home_course_logo = $home_course->course->logo;\n }\n return $user;\n }\n return $item;\n });\n return $item;\n });\n\n $participants = ConversationParticipant::where('conversation_id', $conversation_id)->get()->pluck('user_id');\n $recipients = User::with('profile')->whereIn('id', $participants)->get(['id', 'first_name', 'last_name']);\n// $recipients = $conversations->messages['withUser'];\n// $messages = $conversations->messages['messages'];\n } else {\n\n $messages = Message::where('conversation_id', $conversation_id)\n ->where('id', '>', $removed_messages->last_message_id)\n ->select('*', 'user_id as user')\n ->offset($offset)->take($take)\n ->get()\n ->toArray();\n\n $messages = collect($messages)->map(function($item, $key){\n $item = collect($item)->map(function($item, $key){\n if($key == 'user'){\n $user = User::with('profile')->where('id', '=', $item)->first(['id', 'first_name', 'last_name']);\n $user->home_course = null;\n $user->home_course_logo = null;\n $home_course = HomeCourse::with('course')->where('user_id', $user->id)->first();\n if(!is_null($home_course)){\n $user->home_course = $home_course->course->name;\n $user->home_course_logo = $home_course->course->logo;\n }\n return $user;\n }\n return $item;\n });\n return $item;\n });\n $participants = ConversationParticipant::where('conversation_id', $conversation_id)->get()->pluck('user_id');\n $recipients = User::with('profile')->whereIn('id', $participants)->get(['id', 'first_name', 'last_name']);\n }\n return [\n 'messages' => $messages,\n 'withUser' => $recipients,\n ];\n\n }", "function fetch_conversation_summery(){\n $dbcon = mysqli_connect('127.0.0.1', 'root', '', 'private_message_system');\n // conversation id is needed to delete the conversations\n // MAX used to select the last date of message reply\n $sqlquery = \"SELECT\n `conversations`.`conversation_id`,\n `conversations`.`conversation_subject`,\n MAX(`conversations_messages`.`message_date`) AS `conversation_last_reply`,\n MAX(`conversations_messages`.`message_date`) > `conversations_members`.`conversation_last_view` AS `conversation_unread`\n FROM `conversations`\n LEFT JOIN `conversations_messages` ON `conversations`.`conversation_id` = `conversations_messages`.`conversation_id`\n INNER JOIN `conversations_members` ON `conversations`.`conversation_id` = `conversations_members`.`conversation_id`\n WHERE `conversations_members`.`user_id` = {$_SESSION['user_id']}\n AND `conversations_members`.`conversation_deleted` = 0\n GROUP BY `conversations`.`conversation_id`\n ORDER BY `conversation_last_reply` DESC\";\n\n$result = mysqli_query($dbcon, $sqlquery);\n\n//Code to check what is wrong in the query\n//die(mysqli_error($dbcon));\n\n$conversations = array();\n\nwhile (($row = mysqli_fetch_assoc($result)) !== null){\n $conversations[] = array(\n 'id' => $row['conversation_id'],\n 'subject' => $row['conversation_subject'],\n 'last_reply' => $row['conversation_last_reply'],\n 'unread_messages' => ($row['conversation_unread'] == 1),\n );\n}\nreturn $conversations;\n}", "public function readMessages()\n {\n $tmp = $this->model('messages')->getUnclosedMessages();\n $messages = [];\n $concat = [];\n foreach ($tmp as $k => $v) {\n if(!$v['concat']) {\n $messages[] = array(\n 'time' => strtotime($v['push_date']),\n 'phone' => $v['phone'],\n 'user_id' => $v['user_id'],\n 'text' => $v['content'],\n 'status' => $v['message_status'],\n 'id' => $v['id'],\n 'recipient' => $v['recipient'],\n 'campaign_id' => $v['campaign_id']\n );\n } else {\n $concat[$v['concat']]['parts'][$v['concat_count']]['content'] = $v['content'];\n $concat[$v['concat']]['parts'][$v['concat_count']]['id'] = $v['id'];\n $concat[$v['concat']]['total'] = $v['concat_total'];\n if(count($concat[$v['concat']]['parts']) == $v['concat_total']) {\n ksort($concat[$v['concat']]['parts']);\n $parts = [];\n foreach ($concat[$v['concat']]['parts'] as $part) {\n $parts[] = $part['content'];\n }\n $last = array_pop($concat[$v['concat']]['parts']);\n foreach ($concat[$v['concat']]['parts'] as $part) {\n $row = [];\n $row['id'] = $part['id'];\n $row['message_status'] = 4;\n $this->model('messages')->insert($row);\n }\n\n $messages[] = array(\n 'time' => strtotime($v['push_date']),\n 'phone' => $v['phone'],\n 'user_id' => $v['user_id'],\n 'text' => implode('', $parts),\n 'status' => $v['message_status'],\n 'id' => $last['id'],\n 'recipient' => $v['recipient'],\n 'campaign_id' => $v['campaign_id']\n );\n\n\n }\n }\n }\n foreach ($messages as $message) {\n $this->manageMessage($message);\n }\n }", "public function mark_all_read_update()\n {\n $messages = Message::all()->where('read', 0);\n\n // Update to database\n foreach ($messages as $message) {\n Message::find($message->id)->update(['read' => 1]);\n }\n\n return redirect()->route('message.index')\n ->with('success', 'content.updated_successfully');\n }", "private function readAllChat($user_id, $chat, $chat_content_id=null)\n {\n $lastChat = ChatContent::where('chat_id', $chat->id)->orderBy('created_at', 'desc')->first();\n\n if ($lastChat && ($lastChat->user_id != $user_id)) {\n $chatContents = ChatContent::where('chat_id', $chat->id)->where('is_read', false)->where('for_user_id', $user_id)->get();\n\n foreach ($chatContents as $chatContent) {\n $chatContent->is_read = true;\n $chatContent->update();\n }\n }\n\n return true;\n }", "public function conversations_get_all($current_user_id,$item_id,$newerthan_id,$olderthan_id,$count) {\n\t\t\n\t\t\n\t\t/*$stmt = $this->limitQuery(\"SELECT t.username, t.image, t.locality, t.id, t.name, c.id FROM users t, conversations c\n\t\tINNER JOIN conversation_participants AS cp ON (cp.conversation_id = c.id AND cp.user_id = :user_id)\n\t\tLEFT JOIN messages AS m ON m.conversation_id = c.id\n\t\tWHERE m.id ### :limitid AND m.id = (SELECT MAX(id) FROM messages where conversation_id = c.id) ORDER BY m.id DESC LIMIT 0, :count\",$newerthan_id,$olderthan_id,$count);*/\n\t\t\t$stmt = $this->limitQuery(\"SELECT cp.unread as num_unread, i.title, i.id as item_id, i.image as item_image, i.price as item_price, t2.username, t2.image as userimage, t2.locality, t2.id as user_id, t2.name, c.id as conversation_id, m1.message as latest_message, m1.created_at as latest_message_timestamp, m1.id as latest_message_id, m1.type as latest_message_type, t3.username as latest_message_from_username, t3.id as latest_message_from_id, t3.image as latest_message_from_image, m1.offer as latest_message_offer FROM users t, users t2, users t3, conversation_participants cp, conversation_participants cp2, messages m1, conversations c LEFT JOIN items as i ON i.id = c.item_id\n\t\t\tWHERE m1.id ### :limitid AND cp.conversation_id = c.id AND cp2.conversation_id = c.id AND cp2.user_id <> :user_id AND t2.id = cp2.user_id AND\n\t\t\tm1.id = (SELECT MAX(m2.id)\n\t\t\t\t\t FROM messages m2\n\t\t\t\t\t WHERE m2.conversation_id = c.id) AND\n\t\t\tm1.conversation_id = c.id AND\n\t\t\tcp.user_id = :user_id AND t.id = cp.user_id AND t3.id = m1.user_id ORDER BY m1.id DESC LIMIT 0, :count\",$newerthan_id,$olderthan_id,$count);\n\t\t$stmt->bindParam(\":user_id\",$current_user_id);\n\t\t\t\n\t\t\t\n\t\treturn $this->yExecute($stmt,\"conversations\");\n\t\t\n\t}", "public static function updateChatRequestIds($from_user_id, $to_user_id) {\n $from_user_string = User::where('id', $from_user_id)->value('chat_request_ids');\n $c_string_array = explode(',', $from_user_string);\n\n //Remove to_user_id fromUser connect string array\n $remove_toUser_from_c_array = array_diff($c_string_array, array($to_user_id));\n\n //Updated connect string for fromUserId\n $update_c_string_from_user = implode(',', $remove_toUser_from_c_array);\n\n $update = User::where('id', $from_user_id)->update(['chat_request_ids' => $update_c_string_from_user]);\n\n }", "public function get_messages($chat_id, $last_message_id){\n\n $this->db->select(['id','to_user','from_user','content','created'])\n ->where('chat_id',$chat_id)\n ->where('id>',$last_message_id)\n ->order_by('created','DESC');\n //offset for loading of messages will be added soon\n $messages = $this->db->get('messages',15)->result();\n $messages = array_reverse($messages);\n //find id of a user on the otherside\n $otherside_user = new stdClass();\n $otherside_user->chat_id = $chat_id;\n foreach ($messages as $field => $value) {\n if($value->to_user == $this->session->customer_id){\n $otherside_user->id = $value->from_user;\n break;\n } else {\n $otherside_user->id = $value->to_user;\n break;\n }\n}\n//get information about a user on the other side\nif(!empty($otherside_user->id)){\n $this->db->select(['id','first_name','last_name','image'])\n ->from('customers')\n ->where('id',$otherside_user->id);\n $otherside_user = $this->db->get()->result();\n}\n//send messages and otherside user info to a view\n$chat_data['messages'] = $messages;\n$chat_data['otherside_user'] = $otherside_user ? $otherside_user : '';\n\nreturn $chat_data;\n}", "public static function update_parent_ids_from_reply($parent_id, $receiver_user_id, $message_id)\n {\n $table_message = Database::get_main_table(TABLE_MESSAGE);\n $parent_id = intval($parent_id);\n $receiver_user_id = intval($receiver_user_id);\n $message_id = intval($message_id);\n // first get data from message id (parent)\n $sql_message = \"SELECT * FROM $table_message WHERE id = '$parent_id'\";\n $rs_message = Database::query($sql_message);\n $row_message = Database::fetch_array($rs_message);\n\n // get message id from data found early for other receiver user\n $sql = \"SELECT id FROM $table_message\n WHERE\n user_sender_id ='{$row_message['user_sender_id']}' AND\n title='{$row_message['title']}' AND\n content='{$row_message['content']}' AND\n group_id='{$row_message['group_id']}' AND\n user_receiver_id='$receiver_user_id'\";\n $rs_msg_id = Database::query($sql);\n $row = Database::fetch_array($rs_msg_id);\n\n // update parent_id for other user receiver\n $sql = \"UPDATE $table_message SET parent_id = \" . $row['id'] . \"\n WHERE id = $message_id\";\n Database::query($sql);\n }", "public function conversation($id)\n {\n $messages = $this->Messages->find()\n ->contain([\n 'Sender',\n 'Receiver',\n 'Conversations'\n ])\n ->where(['Messages.conversation_id' => $id])\n ->andWhere(['OR' => [\n 'Messages.sender_id' => $this->Auth->user()['id'],\n 'Messages.receiver_id' => $this->Auth->user()['id']\n ]])\n ->select(\n [\n 'Messages.id',\n 'Messages.conversation_id',\n 'Messages.event_id',\n 'Messages.readstatus',\n 'Messages.type',\n 'Messages.content',\n 'Messages.created',\n 'Sender.login',\n 'Sender.avatar',\n 'Sender.id',\n 'Receiver.login',\n 'Receiver.avatar',\n 'Receiver.id',\n 'Conversations.user1_id',\n 'Conversations.user2_id',\n ]\n )\n ->order(['Messages.created' => 'DESC']);\n\n $unreadMsg = [];\n\n foreach ($messages as $m) {\n if ($m->Sender->id !== $this->Auth->user()['id'] && empty($m->readstatus)) {\n array_push($unreadMsg, $m->id);\n }\n }\n\n if (!$messages->isEmpty()) {\n $this->set(compact('messages'));\n // Update readstatus of unread message\n if (!empty($unreadMsg)) {\n $query = $this->Messages->query();\n $query->update()\n ->set(['readstatus' => new Time('now')])\n ->where(['id IN' => $unreadMsg])\n ->execute();\n }\n } else {\n $this->Flash->error('Impossible de charger la conversation demandée');\n return $this->redirect(['controller' => 'Messages', 'action' => 'index']);\n }\n\n $n = $this->Messages->newEntity();\n $this->set(compact('n'));\n\n // Check if is from post method\n if ($this->request->is(['post'])) {\n $u = $this->Auth->user();\n $n = $this->Messages->patchEntity($n, $this->request->getData());\n $n->type = 'message';\n $n->conversation_id = $id;\n $n->sender_id = $u['id'];\n\n if ($result = $this->Messages->save($n)) {\n $this->Flash->success('Message envoyé');\n return $this->redirect(['action' => 'conversation', $id]);\n }\n // Error while trying to save\n $this->Flash->error('Une erreur est survenue. Veuillez réessayer.');\n }\n }", "public function getAllMessageRight($project_id,$sender_id,$recipient_id , $interview='')\n\t{\n\t\t//echo $interview;\n\t\t$recipients=array($sender_id,$recipient_id);\n\t\t$sender=array($sender_id,$recipient_id);\n\t\t$this->db->select();\n\t\t$this->db->where('project_id',$project_id);\n\t\tif(!empty($interview)){\n\t\t\t$this->db->where('interview' , $interview);\n\t\t}\n\t\t$this->db->where_in('sender_id',$sender);\n\t\t$this->db->where_in('recipient_id',$recipients);\n\t\t$this->db->order_by('add_date','asc');\n\t\t$rs=$this->db->get('message');\n\t\t//echo $this->db->last_query();\n\t\t$data=array();\n \n foreach($rs->result() as $val){ \n $data[]=array(\n \"id\" => $val->id,\n \"project_id\" => $val->project_id,\n\t\t\t\t\"sender_id\" => $val->sender_id,\n\t\t\t\t\"recipient_id\" => $val->recipient_id,\n \"message\" => $val->message,\n\t\t\t\t\"attachment\" => $val->attachment,\n \"add_date\" => $val->add_date,\n \"read_status\" => $val->read_status,\n );\n }\n\t\t\n\n return $data;\n\t}", "function sql_update_setreadtime_all($userid) {\n $query = 'UPDATE privatemessages SET readtime = current_timestamp WHERE readtime IS NULL AND receiverid = $1 AND sendtime < current_timestamp RETURNING current_timestamp';\n $result = pg_query_params($query, array($userid)) or die ('Update failed: ' . pg_last_error());\n $line = pg_fetch_row($result, null);\n return $line[0];\n }", "function CreateConversationId( $FromUser_Id, $User_Id_Array ){\n\n\t// given an array of user ids -\n\t// 1) check if this exact group of ids is already forming a conversation.\n\t// 2) if so, return the conversation id - finished.\n\t// 3) otherwise, create a new conversation id record\n\t// 4) insert each user id into the participants table\n\t// 5) return the new conversation id.\n\n\tif( ! is_int( $FromUser_Id ) || ! is_array( $User_Id_Array ) || 0 == count( $User_Id_Array ) )\n\t\treturn( \"Param error: FromUser_Id / User_Id_Array - wrong type or empty.\" );\n\n\t// sort the User_Id_Array in numeric order \n\tsort( $User_Id_Array, SORT_NUMERIC );\n\t$IdList = implode( $User_Id_Array, ',' );\n\t\n\t// search for idlist\n\t$Sql = \"SELECT Id FROM ChatConversations WHERE UserId_List = '$IdList' LIMIT 1\";\n\t$result = mysql_query( $Sql );\n\t$errno = mysql_errno();\n\tif( 0 != $errno )\n\t\treturn( \"mysql error: $errno\" );\n\t\t\n\tif( 0 < mysql_num_rows( $result ) ){\n\t\t$row = mysql_fetch_row( $result );\n\t\tmysql_free_result( $result );\n\t\treturn( (int)$row[0] );\n\t}\n\tmysql_query( \"BEGIN\" );\n\t\n\t// conversation doesn't yet exist, create a new one and return it's id.\n\t$Sql = \"INSERT INTO ChatConversations (Id,CreatedByUser_Id,CreatedDate,UserId_List) VALUES (NULL,$FromUser_Id,NOW(),'$IdList')\";\n\t$result = mysql_query( $Sql );\n\t$errno = mysql_errno();\n\tif( 0 != $errno ){\n\t\tmysql_query( \"ROLLBACK\" );\n\t\treturn( \"mysql error: $errno\" );\n\t}\n\n\t$Conversation_Id = mysql_insert_id();\n\n\t// create a multi-insert record\n\t$Values = '';\n\tforeach( $User_Id_Array as $Id )\n\t\t$Values .= \"(NULL,$Conversation_Id,$Id),\";\n\t$Values = rtrim( $Values, \",\" );\n\t\n\t$Sql = \"INSERT INTO ChatConversationParticipants (Id,Conversation_Id,User_Id) VALUES $Values\";\n\tmysql_query( $Sql );\n\t$errno = mysql_errno();\n\tif( 0 != $errno ){\n\t\tmysql_query( \"ROLLBACK\" );\n\t\treturn( \"mysql error: $errno\" );\n\t}\n\tmysql_query( \"COMMIT\" );\n\treturn( (int)$Conversation_Id );\n}", "public function all_chat_messages()\n {\n $open_chats = $this->chat_model->get_open_chats();\n\n $chat_windows = array();\n if (!empty($open_chats)) {\n foreach ($open_chats as $chats) {\n $c_data = array();\n // mark chat read if window is active\n if ($chats->unread && $chats->active == 1) {\n $chats->unread = 0;\n $uc_data['unread'] = 0;\n $this->chat_model->_table_name = 'tbl_private_chat_users';\n $this->chat_model->_primary_key = 'private_chat_users_id';\n $this->chat_model->save($uc_data, $chats->private_chat_users_id);\n }\n // If a chat title is set then replace with the user title in tbl_private_chat_users\n if (!empty($chats->chat_title)) {\n $chats->title = $chats->chat_title;\n }\n $c_data['title'] = $chats->title;\n $c_data['chatid'] = $chats->private_chat_id;\n $c_data['unread'] = $chats->unread;\n $c_data['active'] = $chats->active;\n $c_data['to_user_id'] = $chats->user_id;\n\n // get all message by private chat id\n $messages = array();\n $limit = 5;\n $last_reply_id = 0;\n $all_messages = $this->chat_model->get_chat_messages($chats->private_chat_id, $chats->deleted);\n\n foreach ($all_messages as $message) {\n array_push($messages, $message);\n if ($last_reply_id == 0) {\n $last_reply_id = $message->private_chat_messages_id;\n }\n }\n $messages = array_reverse($messages);\n\n $template = $this->load->view(\"chat/chat_body.php\", array(\n \"messages\" => $messages,\n \"chat\" => $chats,\n \"last_reply_id\" => $last_reply_id\n ), TRUE);\n // Store template\n $c_data['messages_template'] = $template;\n\n // Chat chat_badge\n $c_data['chat_badge'] = $this->load->view(\"chat/chat_badge.php\", array(\n \"chats\" => $chats,\n ), TRUE);\n // Add Chat to array\n $chat_windows[] = $c_data;\n }\n }\n echo json_encode(array(\"chats\" => $chat_windows));\n exit();\n }", "public function loadConversations($id){\n $this->conversations = [];\n $this->active_user = User::select('first_name', 'surname', 'avatar','mobile', 'id')\n ->where('id', $id)\n ->where('tenant_id',Auth::user()->tenant_id)\n ->first();\n $this->conversations = Message::where('from_id', Auth::user()->id)->where('to_id', $id)\n ->orWhere('from_id', $id)->where('to_id',Auth::user()->id)\n ->where('tenant_id',Auth::user()->tenant_id)\n ->get();\n }", "public function unreadMessagesInConversation($userId, $convId)\n {\n\n return 0;\n }", "public function getUnreadConversations()\n {\n $conversations = Chat::conversations()->for(Auth::user())->get();\n \n if($conversations)\n {\n foreach($conversations as $conv)\n {\n $unreadCount = Chat::conversation($conv)->for(Auth::user())->unreadCount();\n\n $conv['unread'] = $unreadCount;\n\n $get_receiver_id = MessageNotification::where('conversation_id', $conv['id'])->where('user_id', '<>', Auth::user()->id)->first();\n\n $user = User::where('id', $get_receiver_id['user_id'])->first();\n\n $conv['user'] = $user;\n }\n\n $unread_list = view('host.renders.unread_conversations_list_render')->with('conversations', $conversations)->render();\n \n return response()->json(['status' => 'success', 'conversations' => $unread_list]);\n }\n return response()->json(['status' => 'success', 'conversations' => '']);\n }", "public function updateConversation($data) {\n\n $firebaseArray = ['is_confirmed' => (int) $data['is_confirmed']];\n // from user\n $fromUser = $this->getUserById(Auth::id());\n $getUserContact = $this->userRepository->saveConfirmStatus($data['conversation_id'], $data['is_confirmed'])->user_id;\n $toUser = $this->getUserById($getUserContact);\n $profilePics = $this->getUserProfilePic($fromUser->id);\n $this->userRepository->saveConfirmStatus($data['conversation_id'], $data['is_confirmed']);\n // pass from and to id for conversation\n if ($data['is_confirmed'] == 1) {\n $this->firebaseRepository->setConversationData($data['conversation_id'], $firebaseArray);\n\n // send notification if user has accepted the conversation\n $fcmResponse = $this->notification->sendNotifications($toUser, [\n 'type' => 'acceptinvite',\n 'notification_message' => \\config('constants.NOTIFICATION_MESSAGE.USER_ACCEPT'),\n 'image' => $profilePics,\n 'from_user' => $fromUser,\n ]);\n } else {\n $this->firebaseRepository->deleteConversationData($data['conversation_id']);\n // send notification if user has rejected the conversation\n $fcmResponse = $this->notification->sendNotifications($toUser, [\n 'type' => 'rejectinvite',\n 'notification_message' => \\config('constants.NOTIFICATION_MESSAGE.USER_REJECT'),\n 'image' => $profilePics,\n 'from_user' => $fromUser,\n ]);\n }\n }", "function GetUnreadMessages( $User_Id ){\n\n\tif( ! is_int( $User_Id ) )\n\t\treturn( \"Param error: User_Id - wrong type or empty.\" );\n\t\t\n\t$Messages = array();\n\t$Sql = \"SELECT \n\t\t\t\tm.Conversation_Id AS Conversation_Id, m.Id AS MessageId, \n\t\t\t\tm.FromUser_Id as FromUser_Id, CONCAT( u.FirstName, ' ', u.LastName ) AS FromUser_Name,\n\t\t\t\tm.DateSent as DateSent,\n\t\t\t\tm.Message\n\t\t\tFROM ChatMessages m,User u,ChatConversationParticipants p\n\t\t\tWHERE \n\t\t\t\t(m.FromUser_Id = u.Id) AND\n\t\t\t\t(m.Id > p.LastReadMessage_Id) AND\n\t\t\t\t(m.Conversation_Id = p.Conversation_Id) AND\n\t\t\t\t(p.User_Id = $User_Id)\n\t\t\tORDER BY m.Id ASC\";\n\t$result = mysql_query( $Sql );\n\t$errno = mysql_errno();\n\tif( 0 != $errno )\n\t\treturn( \"mysql error: $errno\" );\n\twhile( $row = mysql_fetch_array( $result, MYSQL_ASSOC ) )\n\t\t$Messages[] = $row;\n\tmysql_free_result( $result );\n\treturn( $Messages );\n}", "public function readMessage($id_read){\r\n\r\n $this->query('SELECT * FROM `message` \r\n INNER JOIN `utilisateur` ON `utilisateur`.`id_ut` = `message`.`id_destinataire_msg`\r\n WHERE `id_msg` = :id_read ');\r\n $this->bind(\":id_read\", $id_read);\r\n $this->execute();\r\n $row = resultSet();\r\n // si il retourne une resultat on va faire update des champs date de lecture et mettre la valeur etat sur 1 ca veut dire lu \r\n if ($row ==1 AND $row['etat_lu_msg']== 0) {\r\n $this->query('UPDATE `message` SET `etat_lu_msg` = 1,`date_lu_msg`= NOW()\r\n WHERE `id_msg` = :id_read ');\r\n $this->bind(\":id_read\", $id_read);\r\n $this->execute();\r\n\r\n }\r\n }", "function getMessages() {\n\t\t//create database object\n\t\t$mysqli = new mysqli(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME);\n \t\tif ($mysqli->connect_errno) {\n \t\t\t$response = [\"status\" => \"error\"];\n \t\t\t$mysqli->close();\n \t\t\techo json_encode($response);\n \t\t\treturn;\n \t\t}\n\n\n \t\t//escape, remove special characters, and format appropriately\n \t\t$matchID = $mysqli->real_escape_string(htmlspecialchars($_POST[\"matchID\"]));\n \t\t$originUserID = $mysqli->real_escape_string(htmlspecialchars($_POST[\"userID\"]));\n\t\t//for \"last updated\" note on messages\n\t\t$date = date(\"Y-m-d H:i:s\");\n\n\n\n\t\t//find current match id and message count for conversation\n\t\t$query = \"SELECT user_id_1, user_id_2, message_count FROM message_counter WHERE match_id = ?\";\n\n\t\t//prepare statement and handle error\n\t\t$stmt = $mysqli->prepare($query);\n\n\t\t//bind email to query and execute\n\t\t$stmt->bind_param(\"i\", $matchID);\n\t\tif (!$stmt->execute()) {\n\t\t\t$response = [\"status\" => \"error\"];\n \t\t\t$mysqli->close();\n \t\t\techo json_encode($response);\n \t\t\treturn;\n\t\t}\n\n\t\t//get result\n\t\t$result = $stmt->get_result();\n\t\t$row = $result->fetch_assoc();\n\t\t$userID1 = $row[\"user_id_1\"];\n\t\t$userID2 = $row[\"user_id_2\"];\n\t\t$messageCount = $row[\"message_count\"];\n\n\t\t//if no messages exit, else continue\n\t\tif ($messageCount == 0) {\n\t\t\t$response = [\"status\" => \"empty\"];\n\t\t} else {\n\t\t\t//free memory\n\t\t\t$result->free();\n\n\t\t\t//update last_seen message counter to the total message counter\n\t\t\tif ($originUserID === $userID1) {\n\t\t\t\t$query = \"\tUPDATE message_counter\n\t\t\t\t\t\t\tSET last_seen_user_1 = ?\n\t\t\t\t\t\t\tWHERE match_id = ?\";\n\t\t\t} elseif ($originUserID === $userID2) {\n\t\t\t\t$query = \"\tUPDATE message_counter\n\t\t\t\t\t\t\tSET last_seen_user_2 = ?\n\t\t\t\t\t\t\tWHERE match_id = ?\";\n\t\t\t}\n\n\t\t\t//some kind of error catching here - if not - reutrn and respond with error\n\t\t\t//prepare statement and handle error\n\t\t\t$stmt = $mysqli->prepare($query);\n\n\t\t\t//bind email to query and execute\n\t\t\t$stmt->bind_param(\"ii\", $messageCount, $matchID);\n\t\t\tif (!$stmt->execute()) {\n\t\t\t\t$response = [\"status\" => \"error\"];\n \t\t\t\t$mysqli->close();\n \t\t\t\techo json_encode($response);\n \t\t\t\treturn;\n\t\t\t}\n\n\n\t\t\t//get all messages for that match\n\t\t\t$query = \"SELECT all_messages.* FROM all_messages WHERE match_id = ?\";\n\n\t\t\t//prepare statement and handle error\n\t\t\t$stmt = $mysqli->prepare($query);\n\n\t\t\t//bind email to query and execute\n\t\t\t$stmt->bind_param(\"i\", $matchID);\n\t\t\tif (!$stmt->execute()) {\n\t\t\t\t$response = [\"status\" => \"error\"];\n \t\t\t\t$mysqli->close();\n \t\t\t\techo json_encode($response);\n \t\t\t\treturn;\n\t\t\t}\n\n\t\t\t//get result\n\t\t\t$result = $stmt->get_result();\n\n\t\t\t//array of arrays of message data\n\t\t\t$allMessages = [];\n\n\t\t\t//loop through all messages in table\n\t\t\t$i = 0;\n\t\t\twhile ($row = $result->fetch_assoc()) {\n\n\t\t\t\t$dateTime = $row[\"date_time\"];\n\t\t\t\t$messageNumber = $row[\"message_number\"];\n\t\t\t\t$messageBody = stripslashes($row[\"message_body\"]);\n\t\t\t\t$senderID = $row[\"sender_id\"];\n\n\t\t\t\t//message array for each message\n \t\t\t$messageData = [\"dateTime\" => $dateTime,\n \t\t\t\t\t\t\t\"messageNumber\" => $messageNumber,\n \t\t\t\t\t\t\t\"messageBody\" => $messageBody,\n \t\t\t\t\t\t\t\"senderID\" => $senderID];\n\n \t\t\t//put in another array for response\n \t\t\t$allMessages[$i] = $messageData;\n\t\t\t\t$i++;\n\t\t\t}\n\n\t\t\t//free memory\n\t\t\t$result->free();\n\n\t\t\t//{status, count, {message1, message2...}}\n\t\t\t$response = [\t\"status\" => \"success\",\n\t\t\t\t\t\t\t\"messageCount\" => $messageCount,\n\t\t\t\t\t\t\t\"messages\" => $allMessages];\n\t\t}\n\t\t\n\n\t\t//close and respond\n\t\t$mysqli->close();\n\t\techo json_encode($response);\n\t}", "function conversations($user_id) {\r\n\t\tglobal $userpro;\r\n\t\t$output = null;\r\n\t\t\r\n\t\t$unread = $this->get_unread_user_ids($user_id);\r\n\t\t$archive = $this->get_read_user_ids($user_id);\r\n\t\t\r\n\t\tif (isset($archive) && !empty($archive) && isset($unread) && !empty($unread) ){\r\n\t\t$archive = array_diff($archive, $unread);\r\n\t\t}\r\n\t\t\r\n\t\tif (isset($unread) && !empty($unread)) {\r\n\t\t\tforeach ( $unread as $id) {\r\n\t\t\t\t$output .= '<div class=\"userpro-msg-col\" data-chat_from=\"'.$user_id.'\" data-chat_with=\"'.$id.'\">\r\n\t\t\t\t\r\n\t\t\t\t\t<span class=\"userpro-msg-view\"><i class=\"userpro-icon-retweet\"></i>'.__('read conversation','userpro-msg').'</span>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t<div class=\"userpro-msg-user-thumb alt\">'.get_avatar($id, 40).'</div>\r\n\t\t\t\t\t\r\n\t\t\t\t\t<div class=\"userpro-msg-user-info\">\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t<div class=\"userpro-msg-user-name alt\">\r\n\t\t\t\t\t\t\t<span>'.userpro_profile_data('display_name', $id).'</span>\r\n\t\t\t\t\t\t\t<span class=\"bubble\" data-chat_with=\"'.$id.'\"><i class=\"userpro-icon-comment\"></i></span>\r\n\t\t\t\t\t\t\t<span class=\"bubble-text\">'.__('quick reply','userpro-msg').'</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t<div class=\"userpro-msg-user-tab alt\">';\r\n\t\t\t\t\t\t\r\n\t\t\t\tif ( $this->extract_msg($user_id, $id, 'unread', 'status', 1) == 'unread') {\r\n\t\t\t\t\t$output .= '<span class=\"userpro-msg-unread\">'.sprintf(__('%s unread','userpro-msg'), $this->extract_msg($user_id, $id, 'unread', 'unread_msgs_count') ).'</span>';\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$output .= $this->extract_msg($user_id, $id, 'unread', 'content', 1);\r\n\t\t\t\t\r\n\t\t\t\t$output .= '<span class=\"userpro-msg-toolbar\">\r\n\t\t\t\t\t\t\t\t<span class=\"userpro-msg-timestamp\">'.$this->extract_msg($user_id, $id, 'unread', 'timestamp', 1).'</span>\r\n\t\t\t\t\t\t\t\t<span class=\"userpro-msg-delete\"><a href=\"#\" data-chat_from=\"'.$user_id.'\" data-chat_with=\"'.$id.'\">'.__('Delete Conversation','userpro-msg').'</a></span>\r\n\t\t\t\t\t\t\t</span>';\r\n\t\t\t\t\r\n\t\t\t\t$output .= '</div>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t</div><div class=\"userpro-clear\"></div>\r\n\t\t\t\t\t</div>';\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (isset($archive) && !empty($archive)) {\r\n\t\t\tforeach ( $archive as $id) {\r\n\t\t\t\t$output .= '<div class=\"userpro-msg-col\" data-chat_from=\"'.$user_id.'\" data-chat_with=\"'.$id.'\">\r\n\t\t\t\t\r\n\t\t\t\t\t<span class=\"userpro-msg-view\"><i class=\"userpro-icon-retweet\"></i>'.__('read conversation','userpro-msg').'</span>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t<div class=\"userpro-msg-user-thumb alt\">'.get_avatar($id, 40).'</div>\r\n\t\t\t\t\t\r\n\t\t\t\t\t<div class=\"userpro-msg-user-info\">\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t<div class=\"userpro-msg-user-name alt\">\r\n\t\t\t\t\t\t\t<span>'.userpro_profile_data('display_name', $id).'</span>\r\n\t\t\t\t\t\t\t<span class=\"bubble\" data-chat_with=\"'.$id.'\"><i class=\"userpro-icon-comment\"></i></span>\r\n\t\t\t\t\t\t\t<span class=\"bubble-text\">'.__('quick reply','userpro-msg').'</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t<div class=\"userpro-msg-user-tab alt\">';\r\n\t\t\t\t\t\t\r\n\t\t\t\tif ( $this->extract_msg($user_id, $id, 'archive', 'mode', 1) == 'sent') {\r\n\t\t\t\t\t$output .= '<span class=\"userpro-msg-you\"><i class=\"userpro-icon-reply\"></i></span>';\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$output .= $this->extract_msg($user_id, $id, 'archive', 'content', 1);\r\n\t\t\t\t\r\n\t\t\t\t$output .= '<span class=\"userpro-msg-toolbar\">\r\n\t\t\t\t\t\t\t\t<span class=\"userpro-msg-timestamp\">'.$this->extract_msg($user_id, $id, 'archive', 'timestamp', 1).'</span>\r\n\t\t\t\t\t\t\t\t<span class=\"userpro-msg-delete\"><a href=\"#\" data-chat_from=\"'.$user_id.'\" data-chat_with=\"'.$id.'\">'.__('Delete Conversation','userpro-msg').'</a></span>\r\n\t\t\t\t\t\t\t</span>';\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t$output .= '</div>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t</div><div class=\"userpro-clear\"></div>\r\n\t\t\t\t\t</div>';\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $output;\r\n\t}", "protected function readAllMessages( $id )\n\t{\n\t\t$t = [];\n\t\t$m = [];\n\t\t$allMessagesId = Thread::find( $id )->messages()->lists('message_id');\n\t\tforeach ($allMessagesId as $key => $value)\n\t\t{\n\t\t\tif( Auth::user()->isAdmin() )\n\t\t\t{\n\t\t\t\t$find = MessageStatus::whereMessageId( $value )\n\t\t\t\t\t\t\t\t\t\t\t ->where( 'user_id', '=', Auth::user()->id )\n\t\t\t\t\t\t\t\t\t\t\t ->where( 'type', 'NOT LIKE', '%.reply%');\n\t\t\t\t$findThread = MessageStatus::whereThreadId( $id )\n\t\t\t\t\t\t\t\t\t\t\t ->where( 'user_id', '=', Auth::user()->id )\n\t\t\t\t\t\t\t\t\t\t\t ->where( 'type', 'NOT LIKE', '%.reply%');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$find = MessageStatus::whereMessageId( $value )\n\t\t\t\t\t\t\t\t\t\t\t ->where( 'user_id', '=', Auth::user()->id )\n\t\t\t\t\t\t\t\t\t\t\t ->where( 'type', 'LIKE', '%.reply%');\n\t\t\t\t$findThread = MessageStatus::whereThreadId( $id )\n\t\t\t\t\t\t\t\t\t\t\t ->where( 'user_id', '=', Auth::user()->id )\n\t\t\t\t\t\t\t\t\t\t\t ->where( 'type', 'LIKE', '%.reply%');\n\t\t\t}\n\t\t\t$t[] = $findThread->update( [ 'status' => 1 ] );\n\t\t\t$m[] = $find->update( [ 'status' => 1 ] );\n\t\t\t$this->readMessageByUser( $value, Auth::user()->id );\n\t\t}\n\n\t\treturn [\n\t\t\t'messages' => $m,\n\t\t\t'thread' => $t\n\t\t];\n\t}", "public function markMessagesAsRead($userid, $messageids, $folder) {\r\n\t\t// sanity checks\r\n\t\tif (!is_numeric($userid)) return false;\r\n\t\tif (!is_numeric($folder)) return false;\r\n\t\t$tableName = $this->getTableNameForFolder($folder);\r\n\t\tif ($tableName == NULL) return false;\r\n\t\tif (!$this->array_contains_only_numeric_values($messageids)) return false;\r\n\t\t\r\n\t\t$useridfield = \"user_to\";\r\n\t\tif ($folder == MESSAGES_GET_SENT_MESSAGES) $useridfield = \"user_from\";\r\n\t\t\r\n\t\t$this->dbConnector->where($useridfield, $userid);\r\n\t\t$this->dbConnector->where(\"id IN (\".implode(',',$messageids).\")\");\r\n\t\t$data = array(\"message_read\" => \"1\");\r\n\t\treturn $this->dbConnector->update($tableName, $data);\r\n\t}", "protected function _replaceMessages()\n {\n //last step\n //get last message id\n $lastMessageId = $this->_getReadAdapter()->fetchOne('SELECT MAX(id) FROM ' . $this->_getTableName('aw_hdu_message'));\n\n //get messages from\n $startFromId = 0;\n if (array_key_exists('last_message_id', $this->_migrationData)) {\n $startFromId = $this->_migrationData['last_message_id'];\n }\n if ($this->_isCompleted) {\n //process if saved id != last id from table aw_hdu_message\n if ($lastMessageId != $startFromId) {\n $this->_isCompleted = false;\n\n $needToReplaceMessageIds = $this->_getReadAdapter()->fetchCol('SELECT id FROM '\n . $this->_getTableName('aw_hdu_message') . ' WHERE id > ' . $startFromId\n . ' LIMIT ' . self::REPLACE_MESSAGE_LIMIT\n );\n foreach ($needToReplaceMessageIds as $oldMessageId) {\n //remember migrated old ticket id\n $startFromId = $oldMessageId;\n\n //get old ticket model\n $oldMessageModel = Mage::getModel('helpdeskultimate/message')->load($oldMessageId);\n try {\n $oldTicketModel = $oldMessageModel->getTicket();\n } catch (Mage_Core_Exception $e) {\n $this->_log(Mage::helper('aw_hdu3')->__('Error: message id %d skipped - %s', $oldMessageModel->getData('id'), $e->getMessage()));\n continue;\n }\n\n //get new ticket model\n $newTicketModel = Mage::getModel('aw_hdu3/ticket')->loadByUid($oldTicketModel->getData('uid'));\n if (null === $newTicketModel->getId()) {\n $this->_log(Mage::helper('aw_hdu3')->__('Error: message id %d skipped - no exist ticket', $oldMessageModel->getData('id')));\n continue;\n }\n\n //get initiator agent id\n $initiatorDepartmentAgentId = null;\n if ($oldMessageModel->getDepartmentId()) {\n //if new department doesn't exist by old department id -> skip message\n if (!array_key_exists($oldMessageModel->getData('department_id'), $this->_migrationData['departments'])) {\n $this->_log(Mage::helper('aw_hdu3')->__('Error: message id %d skipped - no exist department', $oldMessageModel->getData('id')));\n continue;\n }\n //get new department info\n $_newDepartmentId = $this->_migrationData['departments'][$oldMessageModel->getData('department_id')];\n $newDepartmentModel = Mage::getModel('aw_hdu3/department')->load($_newDepartmentId);\n $initiatorDepartmentAgentId = $newDepartmentModel->getPrimaryAgentId();\n }\n\n $eventData = array(\n 'content' => $oldMessageModel->getData('content'),\n 'attachments' => $oldMessageModel->getFilename()\n );\n\n try {\n $this->_addTicketHistory($oldMessageModel, $newTicketModel, $initiatorDepartmentAgentId, $eventData);\n } catch (Exception $e){\n $this->_log(Mage::helper('aw_hdu3')->__('Warning: can\\'t save attachment for ticket UID: %s - Reason: %s', $oldTicketModel->getData('uid'), $e->getMessage()));\n }\n\n //if saved old ticket id = last old ticket id -> complete\n if ($startFromId == $lastMessageId) {\n $this->_isCompleted = true;\n break;\n }\n }\n }\n }\n $this->_setMigrationData('last_message_id', $startFromId);\n\n //get count messages\n $messagesCount = $this->_getReadAdapter()->fetchOne('SELECT COUNT(id) FROM ' . $this->_getTableName('aw_hdu_message'));\n\n //get processed old tickets\n $migratedMessagesCount = $this->_getReadAdapter()->fetchOne('SELECT COUNT(id) FROM '\n . $this->_getTableName('aw_hdu_message') . ' WHERE id <= ' . $this->_migrationData['last_message_id']\n );\n $this->_log(Mage::helper('aw_hdu3')->__('(%d) from (%d) message(s) has been replaced', $migratedMessagesCount, $messagesCount));\n return $this;\n }", "public static function convertChatObjects()\n\t{\n\t\t/**\n\t\t * @var $ilDB ilDB\n\t\t */\n\t\tglobal $ilDB;\n\n\t\t$res = $ilDB->queryF(\n\t\t\t\"SELECT\t\tobj_id\n\t\t\tFROM\t\tobject_data\n\t\t\tWHERE\t\ttype = %s\",\n\t\t\tarray('text'),\n\t\t\tarray('chat')\n\t\t);\n\n\t\t$obj_ids = array();\n\n\t\twhile($row = $ilDB->fetchAssoc($res))\n\t\t{\n\t\t\t$obj_ids[] = $row['obj_id'];\n\t\t}\n\n\t\t$ilDB->manipulateF(\n\t\t\t\"UPDATE\t\tobject_data\n\t\t\tSET\t\ttype = %s\n\t\t\tWHERE\t\ttype = %s\",\n\t\t\tarray('text', 'text'),\n\t\t\tarray('chtr', 'chat')\n\t\t);\n\n\t\tself::setChatroomSettings($obj_ids);\n\t}", "public static function getChatMessages($chat_id, $limit = 1000, $lastMessageId = 0)\n {\n if ($lastMessageId == 0) {\n $db = ezcDbInstance::get();\n $stmt = $db->prepare('SELECT lh_msg.* FROM lh_msg INNER JOIN ( SELECT id FROM lh_msg WHERE chat_id = :chat_id ORDER BY id DESC LIMIT :limit) AS items ON lh_msg.id = items.id ORDER BY lh_msg.id ASC');\n $stmt->bindValue( ':chat_id',$chat_id,PDO::PARAM_INT);\n $stmt->bindValue( ':limit',$limit,PDO::PARAM_INT);\n $stmt->setFetchMode(PDO::FETCH_ASSOC);\n $stmt->execute();\n $rows = $stmt->fetchAll();\n } else {\n $db = ezcDbInstance::get();\n $stmt = $db->prepare('SELECT lh_msg.* FROM lh_msg INNER JOIN ( SELECT id FROM lh_msg WHERE chat_id = :chat_id AND lh_msg.id < :message_id ORDER BY id DESC LIMIT :limit) AS items ON lh_msg.id = items.id ORDER BY lh_msg.id ASC');\n $stmt->bindValue( ':chat_id',$chat_id,PDO::PARAM_INT);\n $stmt->bindValue( ':limit',$limit,PDO::PARAM_INT);\n $stmt->bindValue( ':message_id',$lastMessageId,PDO::PARAM_INT);\n $stmt->setFetchMode(PDO::FETCH_ASSOC);\n $stmt->execute();\n $rows = $stmt->fetchAll();\n }\n\n return $rows;\n }", "function updateActivityLog() {\n \t$all_ids = $this->utility->db->execute('SELECT id, project_id FROM ' . TABLE_PREFIX . 'project_objects');\n \tif(is_error($all_ids)) {\n \t return $all_ids->getMessage();\n \t} // if\n \t\n \tif(is_foreachable($all_ids)) {\n \t $updates = array();\n \t foreach($all_ids as $row) {\n \t $project_id = (integer) $row['project_id'];\n \t \n \t if(!isset($updates[$project_id])) {\n \t $updates[$project_id] = array();\n \t } // if\n \t \n \t $updates[$project_id][] = (integer) $row['id'];\n \t } // foreach\n \t \n \t foreach($updates as $project_id => $object_ids) {\n \t $update = $this->utility->db->execute('UPDATE ' . TABLE_PREFIX . 'activity_logs SET project_id = ? WHERE object_id IN (?)', array($project_id, $object_ids));\n \t if(is_error($update)) {\n \t return $update->getMessage();\n \t } // if\n \t } // foreach\n \t} // if\n \t\n \treturn true;\n }", "public function retrieveMessages($contributor_id)\n {\n /*\n * --------------------------------------------------------------------------\n * Retrieve message list\n * --------------------------------------------------------------------------\n * Select conversation by contributor and find who is the first sender,\n * just select data with marker column which has value 1, if sender is\n * this contributor then is_available_sender must be 1, otherwise\n * is_available_receiver must be 1, this marker as guard that the data\n * is available for the contributor because if the value of marker depends\n * on they are the first sender or not then the message or conversation has\n * been deleted before, and in other situation another user who chat with\n * must keep see the message, because we just update the marker 0 or 1,\n * 0 mean deleted, 1 mean available.\n */\n $sender = \"\n SELECT\n conversations.message_id AS message_id,\n sender AS message_sender\n FROM conversations\n JOIN (SELECT message_id, MIN(created_at) AS timestamp FROM conversations GROUP BY conversations.message_id) dates_min\n ON conversations.message_id = dates_min.message_id\n AND created_at = dates_min.timestamp\n WHERE\n (sender = \" . $contributor_id . \" OR receiver = \" . $contributor_id . \")\n \";\n\n $conversation = Conversation::select(\n DB::raw('\n id,\n conversations.message_id AS message_id,\n IF(sender = ' . $contributor_id . ', receiver, sender) AS interact_with,\n message_sender,\n message,\n conversation_total,\n conversations.created_at AS created_at'))\n ->join(DB::raw('(SELECT message_id, COUNT(*) as conversation_total, MAX(created_at) AS timestamp FROM conversations GROUP BY message_id) dates'), function ($join) {\n $join->on('conversations.message_id', '=', 'dates.message_id');\n $join->on('created_at', '=', 'dates.timestamp');\n })\n ->join(DB::raw('(' . $sender . ') AS first_sender'), 'conversations.message_id', '=', 'first_sender.message_id')\n ->whereRaw('(sender = ' . $contributor_id . ' OR receiver = ' . $contributor_id . ')')\n ->whereRaw('IF(message_sender = ' . $contributor_id . ', is_available_sender, is_available_receiver) = 1 ')\n ->orderBy('conversations.created_at', 'desc');\n\n /*\n * --------------------------------------------------------------------------\n * Grouping at once\n * --------------------------------------------------------------------------\n * Group the conversation by message_id, it mean same result of group by\n * contributor who talk with then select the partner of conversation,\n * because we just show the opposite of us as contributor.\n * message_sender is the one who sent email first.\n */\n $contributor = Contributor::select(\n DB::raw(\"\n conversations.id, \n message_id, \n message_sender, \n contributors.id AS contributor_id,\n name, \n username,\n avatar,\n message,\n conversation_total,\n conversations.created_at\"))\n ->join(DB::raw(\"({$conversation->toSql()}) AS conversations\"), 'conversations.interact_with', '=', 'contributors.id')\n ->orderBy('conversations.created_at', 'desc')\n ->paginate(10);\n\n return $this->preMessageModifier($contributor);\n }", "public function getReadedUserIds($idconv, $dateMessage, $idMessAuthor)\n {\n //si le message est le miens on get les id des users different du miens\n if($idMessAuthor == $this->session->read('auth')->pk_iduser)\n {\n $results = $this->db->query(\"SELECT fk_iduser FROM we__EnregConversation WHERE fk_idconversation = ? AND consultedAt >= ? AND fk_iduser != ?\",[\n $idconv,\n $dateMessage,\n $idMessAuthor\n ])->fetchAll();\n }\n //sinon on get les id de users différent du miens et de l'user\n else{\n $results = $this->db->query(\"SELECT fk_iduser FROM we__EnregConversation WHERE fk_idconversation = ? AND consultedAt >= ? AND fk_iduser != ? AND fk_iduser != ?\",[\n $idconv,\n $dateMessage,\n $this->session->read('auth')->pk_iduser,\n $idMessAuthor\n ])->fetchAll();\n }\n $idusersString = '';\n if($results)\n {\n $idusersArr = array();\n foreach ($results as $result)\n {\n array_push($idusersArr, $result->fk_iduser);\n }\n $idusersString = implode(',',$idusersArr);\n }\n return $idusersString;\n }", "function bp_messages_screen_conversation_mark_notifications() {\n\tif ( bp_is_active( 'notifications' ) ) {\n\t\tglobal $thread_template;\n\n\t\t// get unread PM notifications for the user\n\t\t$new_pm_notifications = BP_Notifications_Notification::get( array(\n\t\t\t'user_id' => bp_loggedin_user_id(),\n\t\t\t'component_name' => buddypress()->messages->id,\n\t\t\t'component_action' => 'new_message',\n\t\t\t'is_new' => 1,\n\t\t) );\n\t\t$unread_message_ids = wp_list_pluck( $new_pm_notifications, 'item_id' );\n\n\t\t// no unread PMs, so stop!\n\t\tif ( empty( $unread_message_ids ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// get the unread message ids for this thread only\n\t\t$message_ids = array_intersect( $unread_message_ids, wp_list_pluck( $thread_template->thread->messages, 'id' ) );\n\n\t\t// mark each notification for each PM message as read\n\t\tforeach ( $message_ids as $message_id ) {\n\t\t\tbp_notifications_mark_notifications_by_item_id( bp_loggedin_user_id(), (int) $message_id, buddypress()->messages->id, 'new_message' );\n\t\t}\n\t}\n}", "public function getMessages(){\n\n $db = $this->db;\n $id = $this->id;\n\n $q = new QueryObject;\n\n try{\n $db->setTable('messages as m');\n \n $q->setRule(['reader_id', '=', $id]);\n $q->setJoin(['INNER', 'users as u', 'u.id', 'm.sender_id']);\n \n $q->setCondition('ORDER BY created ASC');\n \n $messages = $db->whereJoin($q, [\n 'u.name',\n 'u.nickname',\n \n 'm.content',\n 'm.status',\n 'm.created',\n ])->getAll();\n }\n catch(PDOException $e){\n echo $e->getMessage();\n }\n\n $poruke = [];\n\n foreach($messages as $m){\n\n $m['date-diff'] = contentAge($m['created']);\n die($m['date-diff']);\n\n if($m['status'])\n $poruke['read'][] = $m;\n else\n $poruke['unread'][] = $m;\n\n \n\n }\n\n return $poruke;\n }", "public function updateSendNowcampaign($data) {\n// if($data instanceof ArrayObject){\n if (count($data) == 0) {\n return NULL;\n }\n $rs = null;\n foreach ($data as $id => $msgs) {\n $rs = $this->query(\"update wklymonthlyreoccurance set sended=1, messages=$msgs where campaignid='$id'\");\n }\n return $rs;\n// }\n// return false;\n }", "public function fetchMessages()\n\t{\n\t\t$data_result=[];\n\t\t$message = $this->ws_messages->find()->where('post_id ='.$this->post_id. ' AND post_type = '.$this->chat_type)->orderBy(['created_at'=> SORT_ASC])->with('user','user.profile')->all();\n\t\tforeach ($message as $key => $value) {\n\t\t\t# code...\n\t\t\tif($value->first_msg == 0){\n\t\t\t\tif($value->user->id == $this->current_user){\n\t\t\t\t\t$pchat = ChatPrivate::find()->where(['user_id'=>$value->user->id, 'post_id'=>$this->post_id])->one();\n\t\t\t\t\t$profile = Profile::find()->where(['user_id'=>$pchat->user_id_guest])->one();\n \t\t$current_date = date('Y-m-d H:i:s');\n\t\t\t\t\t$time1 = date_create($profile->dob);\n\t\t\t\t\t$time2 = date_create($current_date);\n\t\t\t\t\t$year_old = $time1->diff($time2)->y;\n\n\t\t\t\t\t$smg = nl2br($profile->first_name . \" \" . $profile->last_name . \", \" . $year_old . \"\\n\" . $value->msg);\n\t\t\t\t\t$time = UtilitiesFunc::FormatTimeChat($value->created_at);\n\t\t\t\t\tif ($profile->photo == null){\n\t\t\t\t\t\t$image = '/img/icon/no_avatar.jpg';\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$image = '/uploads/'.$pchat->user_id_guest.'/'.$profile->photo;\n\t\t\t\t\t}\n\n\t\t\t\t\t$item = array(\n\t\t\t\t\t\t'id'=>$pchat->user_id_guest,\n\t\t\t\t\t\t'name'=>$profile->first_name .\" \".$profile->last_name,\n\t\t\t\t\t\t'avatar'=> $image,\n\t\t\t\t\t\t'msg'=> $smg,\n\t\t\t\t\t\t'msg_type' => 1,\n\t\t\t\t\t\t'created_at'=> $time,\n\t\t\t\t\t\t'post_id'=> $value->post_id,\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\t$profile = Profile::find()->where(['user_id'=>$value->user->id])->one();\n\t\t\t\t\t$current_date = date('Y-m-d H:i:s');\n\t\t\t\t\t$time1 = date_create($profile->dob);\n\t\t\t\t\t$time2 = date_create($current_date);\n\t\t\t\t\t$year_old = $time1->diff($time2)->y;\n\n\t\t\t\t\t$smg = nl2br($profile->first_name . \" \" . $profile->last_name . \", \" . $year_old . \"\\n\" . $value->msg);\n\t\t\t\t\t$time = UtilitiesFunc::FormatTimeChat($value->created_at);\n\t\t\t\t\tif ($profile->photo == null){\n\t\t\t\t\t\t$image = '/img/icon/no_avatar.jpg';\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$image = '/uploads/'.$value->user->id.'/'.$value->user->profile->photo;\n\t\t\t\t\t}\n\n\t\t\t\t\t$item = array(\n\t\t\t\t\t\t'id'=>$value->user->id,\n\t\t\t\t\t\t'name'=>$value->user->profile->first_name .\" \".$value->user->profile->last_name,\n\t\t\t\t\t\t'avatar'=> $image,\n\t\t\t\t\t\t'msg'=> $smg,\n\t\t\t\t\t\t'msg_type' => 1,\n\t\t\t\t\t\t'created_at'=> $time,\n\t\t\t\t\t\t'post_id'=> $value->post_id,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$smg = nl2br($value->msg);\n\t\t\t\t$time = UtilitiesFunc::FormatTimeChat($value->created_at);\n\t\t\t\tif ($value->user->profile->photo == null){\n\t\t\t\t\t$image = '/img/icon/no_avatar.jpg';\n\t\t\t\t}else{\n\t\t\t\t\t$image = '/uploads/'.$value->user->id.'/'.$value->user->profile->photo;\n\t\t\t\t}\n\t\t\t\t$item = array(\n\t\t\t\t\t'id'=>$value->user->id,\n\t\t\t\t\t'name'=>$value->user->profile->first_name .\" \".$value->user->profile->last_name,\n\t\t\t\t\t'avatar'=> $image,\n\t\t\t\t\t'msg'=> $smg,\n\t\t\t\t\t'msg_type' => $value->msg_type,\n\t\t\t\t\t'created_at'=> $time,\n\t\t\t\t\t'post_id'=> $value->post_id,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tarray_push($data_result,$item);\n\t\t}\n\t\treturn $data_result;\n\t}", "protected function doMetadataLastMessageDates()\n {\n foreach ($this->metadata as $meta) {\n foreach ($this->getMessages() as $message) {\n if ($meta->getParticipant()->getId() !== $message->getSender()->getId()) {\n if (null === $meta->getLastMessageDate() || $meta->getLastMessageDate()->getTimestamp() < $message->getTimestamp()) {\n $meta->setLastMessageDate($message->getCreatedAt());\n }\n } else {\n if (null === $meta->getLastParticipantMessageDate() || $meta->getLastParticipantMessageDate()->getTimestamp() < $message->getTimestamp()) {\n $meta->setLastParticipantMessageDate($message->getCreatedAt());\n }\n }\n }\n }\n }", "public static function getGetLastChatMessageEdit($chat_id, $user_id)\n {\n $db = ezcDbInstance::get();\n $stmt = $db->prepare('SELECT lh_msg.* FROM lh_msg INNER JOIN ( SELECT id FROM lh_msg WHERE chat_id = :chat_id AND user_id = :user_id ORDER BY id DESC LIMIT 1 OFFSET 0) AS items ON lh_msg.id = items.id');\n $stmt->bindValue( ':chat_id',$chat_id,PDO::PARAM_INT);\n $stmt->bindValue( ':user_id',$user_id,PDO::PARAM_INT);\n $stmt->setFetchMode(PDO::FETCH_ASSOC);\n $stmt->execute();\n $row = $stmt->fetch();\n\n return $row;\n }", "public function setMessageToAlreadyRead($conn, $username, $recipient)\n {\n $query = \"UPDATE explicafeup.chat SET itwasread=true \n WHERE ((userfrom='\".$username.\"' and userTo ='\".$recipient.\"') or (userto='\".$username.\"' and userfrom='\".$recipient.\"'))\";\n $result = pg_exec($conn, $query);\n return $result;\n }", "function update_msg_statuses() {\n $data = array(\n 'status' => 'READ'\n );\n $this->db->where('status', 'unread');\n $this->db->update($this->table, $data);\n if ($this->db->affected_rows() > 0 ) {\n return TRUE;\n }\n return FALSE;\n }", "function getUnreadChatMessages()\n{\n\n $messages = \\App\\Models\\TaskAssigned::join('task', 'task.id', '=', 'task_assigned.task_id')\n ->where('task_assigned.user_id', \\Auth::user()->id)\n ->where('task.status', 1)\n ->select([\"task.name\", \"task_assigned.last_message\", \"task_assigned.user_id\", \"task_assigned.task_id\" ])\n ->get();\n\n $data = array();\n foreach ($messages as $value) {\n $getLastMessageId = \\App\\Models\\TaskChat::where('task_id', $value['task_id'])->where('user_id', '!=' , $value['user_id'])->orderBy('id', 'desc')->first();\n //echo $getLastMessageId->id.' '.$value['last_message'].'<br>';\n if(isset($getLastMessageId) && !empty($getLastMessageId->id)){\n if($getLastMessageId->id > $value['last_message'] || $value['last_message']==0){\n $data[] = $value;\n //echo 'New message in task #'.$value['task_id'].'<br>';\n }\n }\n }\n\n return $data;\n}", "public function readConversation(Request $request)\n {\n // validate the info, create rules for the request\n $rules = array(\n 'user_id' => 'required',\n 'partner_id' => 'required'\n );\n\n // run the validation rules on the request data\n $validator = Validator::make($request->all(), $rules);\n\n // if the validator fails, response to client\n if ($validator->fails()) {\n return response()->json([\"code\" => 221,\n \"message\" => \"Invalid params: \".$validator->errors()->first()]);\n }\n\n //checking user existed\n $user = User::find($request->input('user_id'));\n if (!$user) \n {\n return response()->json([\"code\" => 221,\n \"message\" => \"User does not exist!\"]);\n }\n\n //checking partner existed\n $partner = User::find($request->input('partner_id'));\n if (!$partner) \n {\n return response()->json([\"code\" => 221,\n \"message\" => \"Partner does not exist!\"]);\n }\n\n //checking conversation \n $conversation = Conversation::where([\n ['user1_id','=',$user->id],\n ['user2_id','=',$partner->id],\n ])\n ->orWhere([\n ['user1_id','=',$partner->id],\n ['user2_id','=',$user->id],\n ])->first();\n if (!$conversation) \n {\n //if there is no message send before\n return response()->json([\"code\" => 221,\n \"message\" => \"Conversation does not exist!\"]);\n }\n\n //searching to update messages in conversation\n Message::where('conversation_id','=',$conversation->id)\n ->where('reciever_id','=',$user->id)\n ->where('is_read','=',false)\n ->update(array('is_read' => true));\n\n //get data to response\n $data_conver = array('user_id' => $user->id,\n 'partner_id' => $partner->id);\n\n //response to client\n return response()->json([\"code\" => 200,\n \"message\" => \"Success!\",\n \"data\" => $data_conver]);\n }", "public function getAllMessagesForChat(int $id) : array {\n $query = \"SELECT * FROM chats \n JOIN messages \n ON chats.id = messages.chat_id \n JOIN users \n ON messages.sender_id =users.id \n WHERE chats.id = :chatId\";\n $pdostm = $this->db->prepare($query);\n $pdostm->bindValue(\":chatId\", $id, PDO::PARAM_INT);\n $pdostm->execute();\n\n $chatDB = $pdostm->fetchAll(PDO::FETCH_OBJ);\n // var_dump($chatDB);\n $chats = array();\n\n foreach ($chatDB as $c) {\n $chat = new Chat();\n $sender = new User();\n $message = new Message();\n\n $message->setBody($c->body);// set the body of message\n $chat->setMessage($message);\n // var_dump($message);\n\n $chat->setId($c->chat_id); // getting the chat Id\n $chat->setSubject($c->subject);\n\n $chat->setDateCreated($c->date);\n $sender->setUsername($c->username); // passing the username retrieved from database\n $chat->setUser($sender); // from the User object in Chat class\n\n array_push($chats, $chat);\n }\n\n return $chats;\n }", "public function actionRecoverMessages()\r\n {\r\n echo \"test\";\r\n $username = Yii::app()->user->name;\r\n $ids = $_REQUEST['messages'];\r\n foreach ($ids as $id)\r\n {\r\n $theId = intval($id);\r\n $message = Message::model()->findByPK($theId);\r\n\r\n // Recover the \r\n if ($username == $message->FK_sender && $message->sender_deleted == 1)\r\n {\r\n $message->sender_deleted = 0;\r\n $message->save(false);\r\n }\r\n\r\n // Recover for receiver.\r\n if ($username == $message->FK_receiver && $message->been_deleted == 1)\r\n {\r\n // Check if message has been not read. \r\n if($message->been_read == 0) // Then actualize the notification.\r\n Notification::markMessageAsUnRead($theId);\r\n \r\n $message->been_deleted = 0;\r\n $message->save(false);\r\n }\r\n }\r\n }", "function smfapi_deleteMessages($personal_messages, $folder = null, $owner = null)\n{\n\tglobal $user_info, $smcFunc;\n\n\tif ($owner === null) {\n\t\t$owner = array($user_info['id']);\n } elseif (empty($owner)) {\n\t\treturn false;\n } elseif (!is_array($owner)) {\n\t\t$owner = array($owner);\n }\n\n\tif (null !== $personal_messages) {\n\t\tif (empty($personal_messages) || !is_array($personal_messages)) {\n\t\t\treturn false;\n }\n\n\t\tforeach ($personal_messages as $index => $delete_id) {\n\t\t\t$personal_messages[$index] = (int) $delete_id;\n }\n\n\t\t$where = 'AND id_pm IN ({array_int:pm_list})';\n\t} else {\n\t\t$where = '';\n }\n\n\tif ('sent' == $folder || null === $folder) {\n\t\t$smcFunc['db_query']('', '\n\t\t\tUPDATE {db_prefix}personal_messages\n\t\t\tSET deleted_by_sender = {int:is_deleted}\n\t\t\tWHERE id_member_from IN ({array_int:member_list})\n\t\t\t\tAND deleted_by_sender = {int:not_deleted}' . $where,\n\t\t\tarray(\n\t\t\t\t'member_list' => $owner,\n\t\t\t\t'is_deleted' => 1,\n\t\t\t\t'not_deleted' => 0,\n\t\t\t\t'pm_list' => $personal_messages !== null ? array_unique($personal_messages) : array(),\n\t\t\t)\n\t\t);\n\t}\n\n\tif ('sent' != $folder || null === $folder) {\n\t\t// calculate the number of messages each member's gonna lose...\n\t\t$request = $smcFunc['db_query']('', '\n\t\t\tSELECT id_member, COUNT(*) AS num_deleted_messages, CASE WHEN is_read & 1 >= 1 THEN 1 ELSE 0 END AS is_read\n\t\t\tFROM {db_prefix}pm_recipients\n\t\t\tWHERE id_member IN ({array_int:member_list})\n\t\t\t\tAND deleted = {int:not_deleted}' . $where . '\n\t\t\tGROUP BY id_member, is_read',\n\t\t\tarray(\n\t\t\t\t'member_list' => $owner,\n\t\t\t\t'not_deleted' => 0,\n\t\t\t\t'pm_list' => $personal_messages !== null ? array_unique($personal_messages) : array(),\n\t\t\t)\n\t\t);\n\t\t// ...and update the statistics accordingly - now including unread messages\n\t\twhile ($row = $smcFunc['db_fetch_assoc']($request)) {\n\t\t\tif ($row['is_read']) {\n\t\t\t\tsmfapi_updateMemberData($row['id_member'], array('instant_messages' => $where == '' ? 0 : 'instant_messages - '\n . $row['num_deleted_messages']));\n } else {\n\t\t\t\tsmfapi_updateMemberData($row['id_member'], array('instant_messages' => $where == '' ? 0 : 'instant_messages - '\n . $row['num_deleted_messages'], 'unread_messages' => $where == '' ? 0 : 'unread_messages - '\n . $row['num_deleted_messages']));\n }\n\n\t\t\t// if this is the current member we need to make their message count correct\n\t\t\tif ($user_info['id'] == $row['id_member']) {\n\t\t\t\t$user_info['messages'] -= $row['num_deleted_messages'];\n\t\t\t\tif (!($row['is_read']))\n\t\t\t\t\t$user_info['unread_messages'] -= $row['num_deleted_messages'];\n\t\t\t}\n\t\t}\n\n\t\t$smcFunc['db_free_result']($request);\n\n\t\t// do the actual deletion\n\t\t$smcFunc['db_query']('', '\n\t\t\tUPDATE {db_prefix}pm_recipients\n\t\t\tSET deleted = {int:is_deleted}\n\t\t\tWHERE id_member IN ({array_int:member_list})\n\t\t\t\tAND deleted = {int:not_deleted}' . $where,\n\t\t\tarray(\n\t\t\t\t'member_list' => $owner,\n\t\t\t\t'is_deleted' => 1,\n\t\t\t\t'not_deleted' => 0,\n\t\t\t\t'pm_list' => $personal_messages !== null ? array_unique($personal_messages) : array(),\n\t\t\t)\n\t\t);\n\t}\n\n\t// if sender and recipients all have deleted their message, it can be removed\n\t$request = $smcFunc['db_query']('', '\n\t\tSELECT pm.id_pm AS sender, pmr.id_pm\n\t\tFROM {db_prefix}personal_messages AS pm\n\t\t\tLEFT JOIN {db_prefix}pm_recipients AS pmr ON (pmr.id_pm = pm.id_pm AND pmr.deleted = {int:not_deleted})\n\t\tWHERE pm.deleted_by_sender = {int:is_deleted}\n\t\t\t' . str_replace('id_pm', 'pm.id_pm', $where) . '\n\t\tGROUP BY sender, pmr.id_pm\n\t\tHAVING pmr.id_pm IS null',\n\t\tarray(\n\t\t\t'not_deleted' => 0,\n\t\t\t'is_deleted' => 1,\n\t\t\t'pm_list' => $personal_messages !== null ? array_unique($personal_messages) : array(),\n\t\t)\n\t);\n\n\t$remove_pms = array();\n\n\twhile ($row = $smcFunc['db_fetch_assoc']($request)) {\n\t\t$remove_pms[] = $row['sender'];\n }\n\n\t$smcFunc['db_free_result']($request);\n\n\tif (!empty($remove_pms)) {\n\t\t$smcFunc['db_query']('', '\n\t\t\tDELETE FROM {db_prefix}personal_messages\n\t\t\tWHERE id_pm IN ({array_int:pm_list})',\n\t\t\tarray(\n\t\t\t\t'pm_list' => $remove_pms,\n\t\t\t)\n\t\t);\n\n\t\t$smcFunc['db_query']('', '\n\t\t\tDELETE FROM {db_prefix}pm_recipients\n\t\t\tWHERE id_pm IN ({array_int:pm_list})',\n\t\t\tarray(\n\t\t\t\t'pm_list' => $remove_pms,\n\t\t\t)\n\t\t);\n\t}\n\n\t// any cached numbers may be wrong now\n\tsmfapi_cachePutData('labelCounts:' . $user_info['id'], null, 720);\n\n\treturn true;\n}", "public function findIncomingConversations($id_message, $id_user)\n\t{\n\t\t$qb = $this->_em->createQueryBuilder();\n\t\n\t\t$qb->select('c')\n\t\t->from('ProjetUserBundle:Conversation', 'c')\n\t\t->where('c.user != :id')\n\t\t->setParameter('id', $id_user)\n\t\t->andWhere('c.vu = 0')\n\t\t->andWhere('c.message = ?2')\n\t\t->setParameter(2, $id_message)\n\t\t;\n\t\n\t\n\t\treturn $qb->getQuery()\n\t\t->getResult();\n\t}", "function get_user_conversations($user_id) {\n\t //database query\n\t $q = $this->db->select('*')\n\t \t\t\t\t ->from('conversations_inbox')\n\t\t\t\t\t ->where('R_id',$user_id)\n\t\t\t\t\t ->order_by('post_time','desc')\n\t\t\t\t\t ->get();\n\t\t$result = $q->result();\n }", "public function update(Request $request, $id) {\n $you_id = auth()->user()->id;\n $session = Session::where('sender_id', $you_id)\n ->where('receiver_id', $id)\n ->orWhere('sender_id', $id)\n ->where('receiver_id', $you_id)\n ->first();\n $read = $request->input('read');\n if ($session) {\n $chats = Chat::where('session_id', $session->id)->where('user_id', $id)->where('type', 0)->where('read', 0)->get();\n if ($chats) {\n foreach ($chats as $chat) {\n $chat->read = $read;\n $chat->read_at = $this->getTime();\n $chat->update();\n }\n\n $messages = $session->messages;\n $chatsRead = Chat::where('session_id', $session->id)->where('user_id', $id)->get();\n }\n }\n $data = [\n 'messages'=>$messages ,\n 'chats'=>$chatsRead,\n ];\n return response()->json($data);\n }", "function mark_thread_messages_read($message_thread_code) {\n $current_user = $this->session->userdata('login_type') . '-' . $this->session->userdata('login_user_id');\n $this->db->where('sender !=', $current_user);\n $this->db->where('message_thread_code', $message_thread_code);\n $this->db->update('message', array('read_status' => 1));\n }", "public function multiple_activity_update()\n { \n $result = array();\n \n $activity_id =explode(',',$this->_request['activity_id']);\n $head_id=$this->_request['head_id'];\n $activity_name=$this->_request['activity_name'];\n $description=$this->_request['description'];\n $activity_list=json_decode($activity_name,true);\n $description_list=json_decode($description,true);\n \n if(empty($activity_id))\n {\n $result['status'] = \"0\";\n $result['message']=\"Invalid data provided!\";\n $this->response($this->json($result), 200);\n }\n \n $count=count($activity_id);\n for ($i=0;$i<$count;$i++) {\n/*\".$activity_list[$i]['Activity'].\"','\".$description_list[$i]['Description'].\"'*/\n $sql=mysql_query(\"UPDATE tbl_activities set ActivityHeadID='\".$head_id.\"', ActivityName='\".$activity_list[$i]['Activity'].\"', ActivityDescription='\".$description_list[$i]['Description'].\"' where ActivityID='\".$activity_id[$i].\"'\", $this->db) or die(mysql_error());\n \n }\n $result['message'] = \"Updated\";\n $result['status'] = '1';\n $this->response($this->json($result), 200);\n \n \n \n }", "function fetch_user_chat_history() {\n $last_history_chat = $this->db->query(\"\n select * from (SELECT DBMS_LOB.SUBSTR(dit.message,4000), dit.fecha_creacion, dit.from_user_id, dit.chatblchat_pk_chat FROM MODULCHAT.chatblmessage dit\n WHERE (dit.from_user_id = \" . $this->session->userdata['usuario']['PK_ENT_CODIGO'] . \"\n AND dit.to_user_id = \" . $this->session->userdata['dataChat']['SAC_USER_ID'] . \")\n OR (dit.from_user_id = \" . $this->session->userdata['dataChat']['SAC_USER_ID'] . \"\n AND dit.to_user_id = \" . $this->session->userdata['usuario']['PK_ENT_CODIGO'] . \") \n ORDER BY dit.fecha_creacion asc) even where even.chatblchat_pk_chat =\" . $this->session->userdata['PK_CHAT'] . \"\");\n $last_history_chat = $last_history_chat->result_array;\n $output = '';\n for ($i = 0; $i < count($last_history_chat); $i++) {\n $user_name = '';\n $fromMessage = $this->session->userdata['usuario']['PK_ENT_CODIGO'];\n $nameFromMessage = $this->session->userdata['usuario']['NOMBRE'];\n if ($last_history_chat[$i][\"FROM_USER_ID\"] == $fromMessage) {\n $user_name = '<b class=\"text-success\">Tu</b>';\n } else {\n $user_name = '<b class=\"text-danger\">' . $nameFromMessage . '</b>';\n }\n $message = $last_history_chat[$i][\"DBMS_LOB.SUBSTR(DIT.MESSAGE,4000)\"];\n if ($last_history_chat[$i]['FROM_USER_ID'] === $this->session->userdata['usuario']['PK_ENT_CODIGO']) {\n $output .= '<li>\n <div class=\"msj-rta macro-rta\">\n <div class=\"text text-r\">\n <p>' . urldecode($message) . '</p>\n <p><small>' . $last_history_chat[$i]['FECHA_CREACION'] . '</small></p> \n </div>\n </div>\n </li>\n ';\n } else {\n $output .= '<li>\n <div class=\"msj macro\">\n <div class=\"text text-r\">\n <p>' . urldecode($message) . '</p>\n <p><small>' . $last_history_chat[$i]['FECHA_CREACION'] . '</small></p> \n </div>\n </div>\n </li>\n ';\n }\n }\n $sql = \"BEGIN MODULCHAT.CHATPKGACTUALIZACION.prcupdatestatusmessage(\n parfromuserid=>:parfromuserid,\n partouserid=>:partouserid,\n parrespuesta=>:parrespuesta);\n END;\";\n $conn = $this->db->conn_id;\n $stmt = oci_parse($conn, $sql);\n $parfromuserid = $this->session->userdata['usuario']['PK_ENT_CODIGO'];\n $partouserid = $this->session->userdata['dataChat']['SAC_USER_ID'];\n oci_bind_by_name($stmt, ':parfromuserid', $parfromuserid, 32);\n oci_bind_by_name($stmt, ':partouserid', $partouserid, 32);\n oci_bind_by_name($stmt, ':parrespuesta', $parrespuesta, 32);\n if (!@oci_execute($stmt)) {\n $e = oci_error($stmt);\n var_dump($e);\n }\n if ($parrespuesta == 1) {\n $this->output->set_content_type('text/css');\n $this->output->set_output($output);\n }\n }", "public function getFriendSendMessage() {\n $viewer_id = Engine_Api::_()->user()->getViewer()->getIdentity();\n $getFriednArray = array();\n $messageTable = Engine_Api::_()->getItemTable('messages_message');\n $messageTableName = $messageTable->info('name');\n\n $recipientTable = Engine_Api::_()->getDbtable('recipients', 'messages');\n $recipientTableName = $recipientTable->info('name');\n\n $membershipTable = Engine_Api::_()->getDbtable('membership', 'user');\n $membershipTableName = $membershipTable->info('name');\n\n $select = $recipientTable->select()\n ->setIntegrityCheck(false)\n ->from($recipientTableName, array('user_id'))\n ->joinInner($messageTableName, \"$recipientTableName . conversation_id = $messageTableName . conversation_id\", null)\n ->joinInner($membershipTableName, \"$membershipTableName . resource_id = $recipientTableName . user_id\", null)\n ->where($membershipTableName . '.user_id = ?', $viewer_id);\n\n $fetch = $select->query()->fetchAll();\n foreach ($fetch as $id) {\n $getFriednArray[] = $id['user_id'];\n }\n return $getFriednArray;\n }", "public function set_all_notifications_read($id_membre)\n {\n $this->db->set('new_notification', 0);\n $this->db->set('state', 'read');\n $this->db->where('id_receveur', $id_membre);\n $this->db->update(\"notifications\");\n\n $this->client->del('notification_' . $id_membre);\n }", "public function buscar_nuevos_mensajes_chat($id_conversacion,$id_ultimo_mensaje,$usuario_activo)\n\t{\t\t\t\n\t\t$mensajes=R::getAll(\"SELECT *\n\t\t\t\tFROM mensaje\n\t\t\t\tWHERE conversacion_id=$id_conversacion AND id>$id_ultimo_mensaje\");\n\t\t\n\t\tR::exec( \"UPDATE mensaje SET sw_no_leido=0 WHERE remitente!=$usuario_activo AND conversacion_id={$id_conversacion}\" );\n\t\t\n\t\treturn $mensajes;\n\t}", "function deleteMessages($personal_messages, $folder = null, $owner = null)\n{\n\tglobal $ID_MEMBER, $db_prefix;\n\n\tif ($owner === null)\n\t\t$owner = array($ID_MEMBER);\n\telseif (empty($owner))\n\t\treturn;\n\telseif (!is_array($owner))\n\t\t$owner = array($owner);\n\n\tif ($personal_messages !== null)\n\t{\n\t\tif (empty($personal_messages) || !is_array($personal_messages))\n\t\t\treturn;\n\n\t\tforeach ($personal_messages as $index => $delete_id)\n\t\t\t$personal_messages[$index] = (int) $delete_id;\n\n\t\t$where = '\n\t\t\t\tAND ID_PM IN (' . implode(', ', array_unique($personal_messages)) . ')';\n\t}\n\telse\n\t\t$where = '';\n\n\tif ($folder == 'outbox' || $folder === null)\n\t{\n\t\tdb_query(\"\n\t\t\tUPDATE {$db_prefix}instant_messages\n\t\t\tSET deletedBySender = 1\n\t\t\tWHERE ID_MEMBER_FROM IN (\" . implode(', ', $owner) . \")\n\t\t\t\tAND deletedBySender = 0$where\", __FILE__, __LINE__);\n\t}\n\tif ($folder != 'outbox' || $folder === null)\n\t{\n\t\t// Calculate the number of messages each member's gonna lose...\n\t\t$request = db_query(\"\n\t\t\tSELECT ID_MEMBER, COUNT(ID_PM) AS numDeletedMessages\n\t\t\tFROM {$db_prefix}im_recipients\n\t\t\tWHERE ID_MEMBER IN (\" . implode(', ', $owner) . \")\n\t\t\t\tAND deleted = 0$where\n\t\t\tGROUP BY ID_MEMBER\", __FILE__, __LINE__);\n\t\t// ...And update the statistics accordingly.\n\t\twhile ($row = mysql_fetch_assoc($request))\n\t\t\tupdateMemberData($row['ID_MEMBER'], array('instantMessages' => $where == '' ? 0 : \"instantMessages - $row[numDeletedMessages]\"));\n\t\tmysql_free_result($request);\n\n\t\t// Do the actual deletion.\n\t\tdb_query(\"\n\t\t\tUPDATE {$db_prefix}im_recipients\n\t\t\tSET deleted = 1\n\t\t\tWHERE ID_MEMBER IN (\" . implode(', ', $owner) . \")\n\t\t\t\tAND deleted = 0$where\", __FILE__, __LINE__);\n\t}\n\n\t// If sender and recipients all have deleted their message, it can be removed.\n\t$request = db_query(\"\n\t\tSELECT pm.ID_PM, pmr.ID_PM AS recipient\n\t\tFROM {$db_prefix}instant_messages AS pm\n\t\t\tLEFT JOIN {$db_prefix}im_recipients AS pmr ON (pmr.ID_PM = pm.ID_PM AND deleted = 0)\n\t\tWHERE pm.deletedBySender = 1\n\t\t\t\" . str_replace('ID_PM', 'pm.ID_PM', $where) . \"\n\t\tHAVING recipient IS null\", __FILE__, __LINE__);\n\t$remove_pms = array();\n\twhile ($row = mysql_fetch_assoc($request))\n\t\t$remove_pms[] = $row['ID_PM'];\n\n\tif (!empty($remove_pms))\n\t{\n\t\tdb_query(\"\n\t\t\tDELETE FROM {$db_prefix}instant_messages\n\t\t\tWHERE ID_PM IN (\" . implode(', ', $remove_pms) . \")\n\t\t\tLIMIT \" . count($remove_pms), __FILE__, __LINE__);\n\n\t\tdb_query(\"\n\t\t\tDELETE FROM {$db_prefix}im_recipients\n\t\t\tWHERE ID_PM IN (\" . implode(', ', $remove_pms) . ')', __FILE__, __LINE__);\n\t}\n}", "function update_mail_sent($campaign_id, $users_this_email) {\n foreach ($users_this_email as $userid) {\n $str = \"insert into mail_sent \";\n $str .= \"set mc_ident = '$campaign_id', \";\n $str .= \"user_id = '$userid'\";\n print \"$str\\n\";\n $result = mysql_query($str) or die(\"Query failed: \" . mysql_error() . \"\\n\");\n }\n }", "protected function apiUpdateMessages($args)\n {\n // Load thread\n $thread = $this->getWurrdThread($args['threadId'], $args['token']);\n\n // Check variables\n self::checkParams($args, array('user', 'lastId'));\n\n // Check access\n if (!$args['user']) {\n $operator = $this->checkOperator();\n\n\t\t\t// Check for reassign here. Normally this is done by the apiUpdate() method. \n\t\t\t$thread->checkForReassign($operator);\t\t\n }\n\n // Send new messages\n $last_message_id = $args['lastId'];\n $messages = array_map(\n 'sanitize_message',\n $thread->getMessages($args['user'], $last_message_id)\n );\n\n\n\t\t// Ping the thread here. Normally this is done by the apiUpdate() method. \n\t\t// However this method will be called when checking for updates for multiple threads\n\t\t// at the same time in the background process when the operator is not actively engaged in this thread.\n\t\t// At this time the operator can't indicate that they are typing or not.\n\t\t// It is also not satisfactory to say the operator is not typing because the background operation could be\n\t\t// triggered even when the operator is actively chatting.\n\t\t$thread->operatorPing(null);\n\t\t\n return array(\n 'messages' => $messages,\n 'lastId' => $last_message_id,\n );\n }", "public function updateLastRead(array $data);", "private function setStatusForMessages(array $ids): int\n {\n return self::updateAll(['status' => self::STATUS_MESSAGE_READ], ['in', 'id', $ids]);\n }", "function fetch_user_chat_history_sac($idCliente, $pkchat) {\n\n $last_history_chat = $this->db->query(\"\n select * from (SELECT DBMS_LOB.SUBSTR(dit.message,4000), dit.fecha_creacion, dit.from_user_id, dit.chatblchat_pk_chat FROM MODULCHAT.chatblmessage dit\n WHERE (dit.from_user_id = \" . $this->session->userdata['PK_ENT_CODIGO'] . \"\n AND dit.to_user_id = \" . $idCliente . \")\n OR (dit.from_user_id = \" . $idCliente . \"\n AND dit.to_user_id = \" . $this->session->userdata['PK_ENT_CODIGO'] . \") \n ORDER BY dit.fecha_creacion asc) even where even.chatblchat_pk_chat =\" . $pkchat . \"\");\n $last_history_chat = $last_history_chat->result_array;\n $output = '';\n for ($i = 0; $i < count($last_history_chat); $i++) {\n $user_name = '';\n $fromMessage = $this->session->userdata['PK_ENT_CODIGO'];\n $nameFromMessage = $this->session->userdata['NOMBRE'];\n if ($last_history_chat[$i][\"FROM_USER_ID\"] == $fromMessage) {\n $user_name = '<b class=\"text-success\">Tu</b>';\n } else {\n $user_name = '<b class=\"text-danger\">' . $nameFromMessage . '</b>';\n }\n $message = $last_history_chat[$i][\"DBMS_LOB.SUBSTR(DIT.MESSAGE,4000)\"];\n if ($last_history_chat[$i]['FROM_USER_ID'] === $this->session->userdata['PK_ENT_CODIGO']) {\n $output .= '<li style=\"list-style-type: none;\">\n <div class=\"msj-rta macro-rta\">\n <div class=\"text text-r\">\n <p>' . urldecode($message) . '</p>\n <p><small>' . $last_history_chat[$i]['FECHA_CREACION'] . '</small></p> \n </div>\n </div>\n </li>\n ';\n } else {\n $output .= '<li style=\"list-style-type: none;\">\n <div class=\"msj macro\">\n <div class=\"text text-r\">\n <p>' . urldecode($message) . '</p>\n <p><small>' . $last_history_chat[$i]['FECHA_CREACION'] . '</small></p> \n </div>\n </div>\n </li>\n ';\n }\n }\n\n $sql = \"BEGIN MODULCHAT.CHATPKGACTUALIZACION.prcupdatestatusmessage(\n parfromuserid=>:parfromuserid,\n partouserid=>:partouserid,\n parrespuesta=>:parrespuesta);\n END;\";\n $conn = $this->db->conn_id;\n $stmt = oci_parse($conn, $sql);\n $parfromuserid = $this->session->userdata['usuario']['PK_ENT_CODIGO'];\n $partouserid = $this->session->userdata['dataChat']['SAC_USER_ID'];\n oci_bind_by_name($stmt, ':parfromuserid', $parfromuserid, 32);\n oci_bind_by_name($stmt, ':partouserid', $partouserid, 32);\n oci_bind_by_name($stmt, ':parrespuesta', $parrespuesta, 32);\n if (!@oci_execute($stmt)) {\n $e = oci_error($stmt);\n var_dump($e);\n }\n if ($parrespuesta == 1) {\n $this->output->set_content_type('text/css');\n $this->output->set_output($output);\n return $output;\n }\n }", "public function findConversations(array $user_ids, array $arguments = array(), $limit = 1){\n\n if(!is_array($user_ids) || count($user_ids) < 2){\n throw new \\Exception('You need at least 2 users for a conversation', 1410783987);\n }\n\n //Get all conversations of the first user and check if\n //the other users are in these conversations too.\n $userClass = EloquentBase::userClass();\n\n $firstUser = $userClass::find($user_ids[0]);\n $conversations = $firstUser->conversations()->with('users')->with('messages')->get();\n\n $filteredConversations = array();\n\n foreach($conversations as $conversation){\n\n if(count($conversation->users) == count($user_ids)) {\n\n $argumentsFitting = true;\n foreach($arguments as $column => $value){\n if($conversation->$column != $value){\n $argumentsFitting = false;\n break;\n }\n }\n\n if(!$argumentsFitting) continue;\n\n $usersFitting = true;\n foreach($conversation->users as $convUser){\n if(!in_array($convUser->id, $user_ids)){\n $usersFitting = false;\n break;\n }\n\n }\n\n if(!$usersFitting) continue;\n\n $filteredConversations[] = $conversation;\n\n if(count($filteredConversations) == $limit)\n break;\n }\n }\n\n return $filteredConversations;\n\n }", "public function batchActionEventUserUpdateRoles($scorers,$current_event_id,$role_scorer2_id){\n $error=false;\n \n foreach ($scorers as $scorer) {\n $event_user_id= $scorer->getId();\n $update_role = $this->get('request')->get(\"event_user_\".$event_user_id);\n \n $sql = \"UPDATE Nwp\\AssessmentBundle\\Entity\\EventUser eu set eu.role = \".$update_role.\" WHERE eu.id = \".$event_user_id; \n \n try {\n $em = $this->getDoctrine()->getManager();\n $q = $em->createQuery($sql);\n $numUpdated = $q->execute(); \n \n //update any papers with status \"Submitted\" to status \"Accepted\" if scorer 1 became scorer 2\n if ($update_role==$role_scorer2_id) {\n $status_submitted = $em->getRepository('NwpAssessmentBundle:ScoringItemStatus')->findOneBy(array('name' => 'Submitted'));\n \n $queryBuilder = $em->getRepository('NwpAssessmentBundle:EventScoringItemStatusList')\n ->createQueryBuilder('esu')\n ->select('esu')\n ->where('esu.createdBy='.$scorer->getUser()->getId()) \n ->AndWhere('esu.status='.$status_submitted->getId())\n ->andWhere('esu.event='.$current_event_id)\n ->andWhere('esu.gradeLevelId='.$scorer->getGradeLevel()->getId());\n \n $query = $queryBuilder->getQuery();\n $submitted_papers= $query->getResult();\n \n \n if (count($submitted_papers)>0) {\n $status_accepted = $em->getRepository('NwpAssessmentBundle:ScoringItemStatus')->findOneBy(array('name' => 'Accepted'));\n \n foreach ($submitted_papers as $sp) { \n $entity=$this->CreateEventScoringItemStatus($sp,$status_accepted); \n $post_processing=$this->EventScoringItemStatusPostProcessing($current_event_id,$entity,$status_accepted); \n }\n }\n \n }//finish updating papers from status \"Submitted\" to \"Accepted\"\n } catch(\\Doctrine\\DBAL\\DBALException $e) {\n $error = true;\n }\n }\n if ($error ==true) {\n $this->get('session')->getFlashBag()->add('error', 'One or more roles could not be updated.');\n } else {\n $this->get('session')->getFlashBag()->add('info', 'Status has been successfully updated.');\n }\n return $error;\n }", "public function index()\n\t{\n\n\t\t// queries the DB for any existing conversations retrieving data from the last message sent/received\n\t\t$_conversations = DB::table('conversations')\n\t\t\t->select('*', 'conversations.id as id')\n\t\t\t->join('messages', 'conversations.last_message_id', '=', 'messages.id')\n\t\t\t->whereRaw('conversations.uid1 = ? or conversations.uid2 = ?', [$this->authUserId, $this->authUserId])\n\t\t\t->orderBy('conversations.updated_at', 'desc')\n\t\t\t->get();\n\n\t\t$conversations = array();\n\n\t\t// prepares a conversations array for output from the query data retrieved\n\t\tforeach ($_conversations as $i => $conversation)\n\t\t{\n\t\t\tif ($this->authUserId != $conversation->uid1)\n\t\t\t{\n\t\t\t\t$otherUserId \t\t= $conversation->uid1;\n\t\t\t\t$authUserLastRead \t= $conversation->u2_last_message_read_id;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$otherUserId \t\t= $conversation->uid2;\n\t\t\t\t$authUserLastRead \t= $conversation->u1_last_message_read_id;\n\t\t\t}\n\n\t\t\t$otherUser = Account::find($otherUserId);\n\n\t\t\t$conversations[$i]['username'] \t= $otherUser->username;\n\t\t\t// // whether you are the last sender or not\n\t\t\t$conversations[$i]['isSender'] \t= $this->authUserId == $conversation->sender_id ? true : false;\n\t\t\t$conversations[$i]['text'] \t\t= $conversation->text;\n\t\t\t$conversations[$i]['sentAt'] \t= $conversation->created_at;\n\n\t\t\t$unreadMessages = DB::table('messages')\n\t\t\t\t->where('conversation_id', $conversation->id)\n\t\t\t\t->where('sender_id', $otherUserId)\n\t\t\t\t->where('id', '>', $authUserLastRead)\n\t\t\t\t->get();\n\n\t\t\t$conversations[$i]['unreadMessagesExist'] = !empty($unreadMessages) ? true : false;\n\t\t}\n\n\t\treturn View::make('conversation.index', compact('conversations'));\n\t}", "function messageSeen($arrArgs = array()) {\r\n\t\tif (! empty ( $arrArgs )) {\r\n\t\t\t$id=$arrArgs['id'];\r\n\t\t\t$friendId=$arrArgs['friend_id'];\r\n\t\t\t$data=array(\r\n\t\t\t\t\t\"seen\"=>\"1\"\r\n\t\t\t\t\t);\r\n\t\t\t$conditions=array(\r\n\t\t\t\t\t\"user_id\"=>$id,\r\n\t\t\t\t\t\"friend_id\"=>$friendId,\r\n\t\t\t\t\t);\r\n\t\t\t$this->db->update(\"message\",$data,$conditions);\r\n\t\t}\r\n\t}", "public function updated(ChatMessage $chatMessage)\n {\n //\n }", "public function setUpdatedMessaging() {\n $this->readedAt = new \\DateTime();\n $this->setIsReaded(true);\n }", "function get_conversation_friends_follow($user_id, $howmany)\t\r\n\t{\r\n\t\tglobal $wpdb, $current_user, $xoouserultra;\t\t\r\n\t\t\r\n\t\t$all_conversa = array();\r\n\t\t\t\r\n \r\n\t\t$sql = \"SELECT * FROM \" . $wpdb->prefix . \"usersultra_wall WHERE comment_wall_user_id = '\".(int)$user_id.\"'\";\t$sql .= \" ORDER BY comment_id DESC LIMIT \".$howmany.\" \";\r\n\t\t\t\t\r\n\t\t$rows = $wpdb->get_results($sql);\r\n\t\t\r\n\t\tif ( !empty( $rows ) )\r\n\t\t{\r\n\t\t\tforeach ( $rows as $reply ) //creat reply array\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\t$all_conversa[$reply->comment_id] = array(\r\n\t\t\t\t'comment_id' =>$reply->comment_id,\r\n\t\t\t\t'comment_message' =>$reply->comment_message,\r\n\t\t\t\t'comment_title' =>$reply->comment_title, \r\n\t\t\t\t 'comment_date' =>$reply->comment_date , \r\n\t\t\t\t 'comment_posted_by_id' =>$reply->comment_posted_by_id ,\r\n\t\t\t\t 'comment_module' =>$reply->comment_module ,\r\n\t\t\t\t 'comment_module_item_id' =>$reply->comment_module_item_id,\r\n\t\t\t\t 'comment_wall_user_id' =>$reply->comment_wall_user_id,\r\n\t\t\t\t\t'comment_visible_to' =>$reply->comment_visible_to,\r\n\t\t\t\t\t'comment_direct_source_path' =>$reply->comment_direct_source_path);\t \t\t\t\t\r\n\t\t\t}\t\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//get friend's messages\r\n\t\t\r\n\t\t$my_friends = $this->uultra_get_my_friends_col($user_id);\r\n\t\t\r\n\t\t//echo \"friends: \". $my_friends;\r\n\t\t\r\n\t\tif($my_friends!='')\r\n\t\t{\r\n\t\t\r\n\t\t\t$sql = \"SELECT * FROM \" . $wpdb->prefix . \"usersultra_wall WHERE comment_wall_user_id IN(\".$my_friends.\") \";\t\t$sql .= \" ORDER BY comment_id DESC LIMIT \".$howmany.\" \";\r\n\t\t\t\t\t\r\n\t\t\r\n\t\t\t$rows = $wpdb->get_results($sql);\r\n\t\t\t\r\n\t\t\tif ( !empty( $rows ) )\r\n\t\t\t{\r\n\t\t\t\tforeach ( $rows as $reply ) //creat reply array\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\t$all_conversa[$reply->comment_id] = array(\r\n\t\t\t\t\t'comment_id' =>$reply->comment_id,\r\n\t\t\t\t\t'comment_message' =>$reply->comment_message,\r\n\t\t\t\t\t'comment_title' =>$reply->comment_title, \r\n\t\t\t\t\t 'comment_date' =>$reply->comment_date , \r\n\t\t\t\t\t 'comment_posted_by_id' =>$reply->comment_posted_by_id ,\r\n\t\t\t\t\t 'comment_module' =>$reply->comment_module ,\r\n\t\t\t\t\t 'comment_module_item_id' =>$reply->comment_module_item_id,\r\n\t\t\t\t\t\t'comment_wall_user_id' =>$reply->comment_wall_user_id,\r\n\t\t\t\t\t\t'comment_visible_to' =>$reply->comment_visible_to,\r\n\t\t\t\t\t\t'comment_direct_source_path' =>$reply->comment_direct_source_path);\t \t\t\t\r\n\t\t\t\t}\t\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\r\n\t\t}\t\t\r\n\t\t\r\n\t\t krsort($all_conversa);\r\n\t\treturn $all_conversa;\t\t\t\r\n\t\r\n\t}", "public function actionUpdateNotifications( $userId, $lastSeen ){\n Yii::$app->response->format = Response::FORMAT_JSON;\n Notification::updateAll([ 'is_read' => 1, 'read_at' => time() ], 'created_at <= :lastSeen AND to_user = :id' , [':lastSeen' => $lastSeen , ':id' => $userId ]);\n return true;\n }", "function markRead($a_mail_ids)\n\t{\n\n\t\tglobal $ilDB;\n\n\t\t$data = array();\n\t\t$data_types = array();\n\n\t\t$query = \"UPDATE \". $this->table_mail .\"\n\t\t\t\tSET m_status = %s\n\t\t\t\tWHERE user_id = %s \";\n\t\tarray_push($data_types, 'text', 'integer');\n\t\tarray_push($data, 'read', $this->user_id);\n\n\t\t$cnt_mail_ids = count($a_mail_ids);\n\n\t\t\tif (is_array($a_mail_ids) &&\n\t\t\tcount($a_mail_ids) > 0)\n\t\t{\n\n\t\t\t$in = 'mail_id IN (';\n\t\t\t$counter = 0;\n\t\t\tforeach($a_mail_ids as $a_mail_id)\n\t\t\t{\n\t\t\t\tarray_push($data, $a_mail_id);\n\t\t\t\tarray_push($data_types, 'integer');\n\n\t\t\t\tif($counter > 0) $in .= ',';\n\t\t\t\t$in .= '%s';\n\t\t\t\t++$counter;\n\t\t\t}\n\t\t\t$in .= ')';\n\n\t\t\t$query .= ' AND '.$in;\n\t\t}\n\n\t\t$res = $ilDB->manipulateF($query, $data_types, $data);\n\n\t\treturn true;\n\t}", "public function update(ChatMessage $chatMessage)\n {\n }", "public function processConversationCallbackRequest(Request $request)\n {\n Log::info('POST - fbNewMessage');\n $content = $request->json();\n Log::debug('Callback Content: ' . print_r($content, true));\n\n //TODO check validity\n $valid = true;\n if ($valid) {\n Log::debug('Valid update received');\n\n $this->fb = new Facebook([\n 'app_id' => env('APP_ID'),\n 'app_secret' => env('APP_SECRET'),\n 'default_graph_version' => 'v2.5',\n ]);\n $this->fb->setDefaultAccessToken(env('PAGE_ACCESS_TOKEN'));\n\n $this->matchedUsers = DB::table('userMatch')->pluck('matchId');\n $userRows = DB::table('user')->get();\n if ($userRows === null) {\n Log::error('Error retrieving users');\n exit();\n }\n foreach($userRows as $user)\n {\n $this->fbIdsToUserIds[$user->fbId] = $user->id;\n $this->idsToUsers[$user->id] = $user;\n if (!in_array($user->id, $this->matchedUsers)) {\n $this->availableUsers[] = $user;\n }\n }\n\n $entries = $content->get('entry');\n\n\n //first count how many messages were sent\n $newMessageCountByConversationId = array();\n foreach ($entries as $entry) {\n $changes = $entry['changes'];\n\n foreach ($changes as $change) {\n if ($change['value'] !== null && $change['value']['thread_id'] !== null) {\n $conversationId = $change['value']['thread_id'];\n if (array_key_exists($conversationId, $newMessageCountByConversationId)) {\n $newMessageCountByConversationId[$conversationId] += 1;\n } else {\n $newMessageCountByConversationId[$conversationId] = 1;\n }\n }\n }\n }\n\n foreach ($newMessageCountByConversationId as $conversationId => $count) {\n $this->processNewMessages($conversationId, $count);\n }\n }\n }", "public function getAllConversations()\n\t{\n\t\t$conversations = Chat::conversations()->for(Auth::user())->get();\n\n\t\tforeach($conversations as $conv)\n\t\t{\t\n\t\t\t$user = ConversationUser::where('user_id', '<>', Auth::user()->id)->where('conversation_id', $conv['id'])->first();\n\n\t\t\t$user_data = User::with(['getRole'])->where('id', $user['user_id'])->first();\n\n\t\t\t$conv['user'] = $user_data;\n\n\t\t\t/* Get unread message count */\n\t\t\t$count = Chat::conversation($conv)->for(Auth::user())->unreadCount();\n\n\t\t\t$conv['unread_count'] = $count;\n\t\t}\n\t\t\n\t\t$users = User::with(['getRole'])->whereHas('roles', function($q){\n \t\t\t$q->where('name', 'admin');\n \t\t })->get();\n\n\t\treturn view('host.conversations')->with(['conversations' => $conversations, 'users' => $users]);\n\t}", "function allMessageDelete($business_profile_id = '', $business_to_profile_id = '') {\n// $this->db->set('is_message_to_delete', \"CASE WHEN `message_to_profile_id` ='\".$business_profile_id.\"' THEN '1' ELSE '0' END\", FALSE);\n// $this->db->where(\"(message_from_profile_id='\" . $business_profile_id . \"' AND message_to_profile_id='\" . $business_to_profile_id . \"' ) OR (message_to_profile_id='\" . $business_profile_id . \"' AND message_from_profile_id='\" . $business_to_profile_id . \"') \");\n// $update_data = $this->db->update('messages');\n// return $update_data;\n\n\n $this->db->select(\"*\")->from(\"messages\");\n $this->db->where(\"(message_from_profile_id='\" . $business_profile_id . \"' AND message_to_profile_id='\" . $business_to_profile_id . \"') OR (message_to_profile_id='\" . $business_profile_id . \"' AND message_from_profile_id='\" . $business_to_profile_id . \"') AND is_deleted = '0' and message_from_profile = '5' AND message_to_profile = '5'\");\n $query1 = $this->db->get();\n $result_array1 = $query1->result_array();\n\n foreach ($result_array1 as $result) {\n if ($result['message_from_profile_id'] == $business_profile_id && $result['message_to_profile_id'] == $business_to_profile_id) {\n $data = array('is_message_from_delete' => '1', 'is_message_to_delete' => $result['is_message_to_delete']);\n $this->db->where('id='.$result['id']);\n } else {\n $data = array('is_message_to_delete' => '1', 'is_message_from_delete' => $result['is_message_from_delete']);\n $this->db->where('id='.$result['id']);\n }\n $update_data = $this->db->update('messages', $data);\n }\n return $update_data;\n }", "public function pullUnreadMessages()\n {\n try {\n $result = $this->getBootic()->getAccountMessages();\n } catch (Exception $e) {\n // We do nothing\n return;\n }\n\n $messages = array_reverse($result->getData());\n\n foreach ($messages as $message) {\n $booticMessage = Mage::getModel('bootic/message')->load($message['id']);\n\n if ($booticMessage->isObjectNew()) {\n $content = 'From <strong>' . $message['user_name'] . '</strong><br/>';\n $content .= $message['content'];\n\n $magentoMessage = Mage::getModel('adminnotification/inbox');\n $magentoMessage->setSeverity(2);\n $magentoMessage->setTitle($message['subject']);\n $magentoMessage->setDescription($content);\n $magentoMessage->setDateAdded($message['date']);\n $magentoMessage->save();\n\n $booticMessage->setMagentoMessageId($magentoMessage->getId());\n $booticMessage->setBooticMessageId($message['id']);\n $booticMessage->save();\n }\n }\n }", "public function add_last_activity_for_all_users() {\n\t\t\tglobal $wpdb;\n\t\t\t\n\t\t\t$sql = $wpdb->prepare( \"\n\t\t\t\tSELECT\n\t\t\t\t\tu.ID\n\t\t\t\tFROM\n\t\t\t\t\t$wpdb->users AS u\n\t\t\t\t\tLEFT JOIN $wpdb->usermeta m ON u.ID = m.user_id AND m.meta_key = 'last_activity'\n\t\t\t\tWHERE\n\t\t\t\t\tm.meta_value IS NULL\" );\n\t\t\t$userids = $wpdb->get_col( $sql );\n\t\t\t\n\t\t\tif ( $userids ) {\n\t\t\t\tforeach ( $userids as $userid ) {\n\t\t\t\t\tupdate_user_meta( $userid, 'last_activity', current_time( 'mysql' ) );\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function recup_conversation()\n{\n\n $bdd = connexion_bdd();\n $results= array();\n $reponse = $bdd->query(\"\n\tSELECT conversations_messages.pseudo_exp,\n conversations_messages.texte_message,\n\t\t conversations_messages.date_message\n\t\t FROM conversations_messages\n\t\t INNER JOIN conversations_membres ON conversations_messages.id_conversations=conversations_membres.id_conversations\n\t\t WHERE conversations_membres.pseudo_des='admin@gmail.com'\n\t\t GROUP BY conversations_messages.id_conversations\n\t\t ORDER BY conversations_messages.date_message DESC\n\t\")or die(print_r($bdd->errorInfo()));\n\n\twhile($row= $reponse->fetch())\n {\n $results[]=$row;\n }\n\treturn $results;\n}", "function GetUsersInConversation( $Conversation_Id ){\n\n\tif( ! is_int( $Conversation_Id ) )\n\t\treturn( \"Param error: Conversation_Id - wrong type or empty.\" );\n\n\t// get the user ids within a conversation\n\t$Sql = \"SELECT UserId_List FROM ChatConversations WHERE Id = $Conversation_Id LIMIT 1\";\n\t$result = mysql_query( $Sql );\n\t$errno = mysql_errno();\n\tif( 0 != $errno )\n\t\treturn( \"mysql error: $errno\" );\n\t$row = mysql_fetch_row( $result );\n\tmysql_free_result( $result );\n\n\t// get the usernames of the ids..\n\t$Sql = \"SELECT Id,CONCAT( FirstName, ' ', LastName ) AS Name FROM User WHERE Id IN ( {$row[0]} )\";\n\t$result = mysql_query( $Sql );\n\t$errno = mysql_errno();\n\tif( 0 != $errno )\n\t\treturn( \"mysql error: $errno\" );\n\t\n\t$Users = array();\n\twhile( $row = mysql_fetch_array( $result, MYSQL_ASSOC ) ){\n\t\t// convert Id to int.\n\t\t$row[0] = (int)$row[0];\n\t\t$Users[] = $row;\n\t}\n\tmysql_free_result( $result );\n\n\t/*\n\t// final array returned should be:\n\tarray(\n\t\t\"Conversation_Id\" => (int)$Conversation_Id, \n\t\t\"User_Array\" => array(\n\t\t\t\t\t\t\tarray( \"Id\" = > 1, Name => \"Chris Veeneman\" ),\n\t\t\t\t\t\t\tarray( \"Id\" = > 2, Name => \"Fredrik Nygren\" )\n\t\t\t\t\t\t)\n\t\t)\n\t*/\n\treturn( array( \"Conversation_Id\" => (int)$Conversation_Id, \"User_Array\" => $Users ) );\n}", "function update_message_notification_view($message_id)\n{\n $ci = & get_instance();\n $ci->db->where('receiver',$ci->session->user_id);\n $ci->db->where('id',$message_id);\n $ci->db->update('ci_inbox',array('receiver_view' => 1));\n return true;\n}", "function mark_read($thread_id, $user_id) {\n good_query(\"UPDATE msgs_rec SET status = '1', del = '1' WHERE tid = $thread_id AND recipient_id = $user_id LIMIT 1\");\n}", "public function action_generalUpdate()\n\t{\n\t\t$myUser = Auth::user();\n\t\t$laraUser = new Larachat\\Models\\User($myUser, $myUser->name);\n\t\t$generalUpdate;\n\t\t$lastGeneralID = Input::get('generalID');\n\n\t\t// update my timestamps\n\t\t$laraUser->updateTimestamps();\n\n\t\t// return active users\n\t\t$generalUpdate['online_users'] = Larachat\\Models\\User::getOnline();\n\n\t\t// get offline users\n\t\t$generalUpdate['offline_users'] = Larachat\\Models\\User::getOffline();\n\n\t\t// get messages from general chat\n\t\t$generalUpdate['generalUnread'] = Larachat\\Models\\Message::where('to', '=', '-1')\n\t\t\t\t\t\t\t\t\t\t\t\t ->where('id', '>', $lastGeneralID)\n\t\t\t\t\t\t\t\t\t\t\t\t ->get();\n\n\t\t// get unread messages\n\t\t$generalUpdate['privateUnread'] = $laraUser->getPrivateUnread();\n\n\t\t// get open messages, left open\n\t\t$generalUpdate['openChats'] = $laraUser->getStoredChatsFromCache();\n\n\t\treturn Response::json($generalUpdate);\n\t}", "function selectAllUnreadChat() {\n $stmt = prepareQuery(\"\n SELECT\n LEFT(CONCAT(`user`.`fname`, ' ', `user`.`lname`), 12) as `fullname`,\n `user`.`userID`,\n IFNULL(\n `profilepicture`,\n '../img/avatar-standard.png'\n ) AS profilepicture,\n LEFT(`private_message`.`content`, 15) AS `content`\n FROM\n `private_message`,\n `friendship`,\n `user`\n WHERE\n (`friendship`.user2ID = `private_message`.`origin` AND\n `friendship`.user1ID = `private_message`.`destination` AND\n (`friendship`.chatLastVisted1 < `private_message`.`creationdate` OR\n `friendship`.chatLastVisted1 IS NULL) OR\n `friendship`.user1ID = `private_message`.`origin` AND\n `friendship`.user2ID = `private_message`.`destination` AND\n (`friendship`.chatLastVisted2 < `private_message`.`creationdate` OR\n `friendship`.chatLastVisted2 IS NULL)) AND\n `private_message`.`origin` = `user`.`userID` AND\n `private_message`.`destination` = :userID AND\n `user`.`role` != 'banned' AND\n `friendship`.`status` = 'confirmed'\n \n GROUP BY `user`.`userID`\n\n \");\n\n $stmt->bindParam(':userID', $_SESSION[\"userID\"]);\n\n $stmt->execute();\n\n return json_encode($stmt->fetchAll());\n}", "public function findUserMessages($teams, $activities, $user, $page, $size, $lastCreatedAt = null);", "public function editarClientePagador($id_cliente, $id_contacto, $id_datos_personales, $datos){\n /*extract($datos); \n $this->db->where('id_contacto', $id_contacto);\n $this->db->update($this->tabla_contacto, $datosContacto);\n\n $this->db->where('id_datos_personales', $id_datos_personales);\n $this->db->update($this->tabla_datosPersonales, $datosPersonales);\n\n $this->db->where('id_cliente', $id_cliente);\n $this->db->update($this->tabla_clientePagador, $datosClientePa);\n $datosAuditoria=array(\n 'usr_regmod' => $this->session->userdata('id_usuario'),\n 'fec_regmod' => date('Y-m-d'),\n );\n $this->db->where('cod_reg', $id_cliente)->where('tabla', $this->tabla_clientePagador);\n $this->db->update('auditoria', $datosAuditoria);*/\n //-------------------------------------------------------------------------------------\n //MIGRACION MONGO DB\n //-------------------------------------------------------------------------------------\n $fecha = new MongoDB\\BSON\\UTCDateTime();\n\n $id_usuario = new MongoDB\\BSON\\ObjectId($this->session->userdata('id_usuario'));\n\n $id_con = new MongoDB\\BSON\\ObjectId($id_contacto);\n\n extract($datos); \n //Modifico tabla contacto\n $mod_con = $this->mongo_db->where(array('_id'=>$id_con))->set($datosContacto)->update($this->tabla_contacto);\n //Auditoria...\n $data_auditoria = array(\n 'cod_user'=>$id_usuario,\n 'nom_user'=>$this->session->userdata('nombre'),\n 'fecha'=>$fecha,\n 'accion'=>'Modificar contacto',\n 'operacion'=>''\n );\n $mod_auditoria = $this->mongo_db->where(array('_id'=>$id_con))->push('auditoria',$data_auditoria)->update($this->tabla_contacto);\n //-------------------------------------------------\n //Modifico tabla datosPersonales\n $id_dp = new MongoDB\\BSON\\ObjectId($id_datos_personales);\n $mod_dp = $this->mongo_db->where(array('_id'=>$id_dp))->set($datosPersonales)->update($this->tabla_datosPersonales);\n //Auditoria...\n $data_auditoria2 = array(\n 'cod_user'=>$id_usuario,\n 'nom_user'=>$this->session->userdata('nombre'),\n 'fecha'=>$fecha,\n 'accion'=>'Modificar datos personales',\n 'operacion'=>''\n );\n $mod_auditoria2 = $this->mongo_db->where(array('_id'=>$id_dp))->push('auditoria',$data_auditoria2)->update($this->tabla_datosPersonales);\n //-------------------------------------------------\n //Modifico tabla \n $id_cli = new MongoDB\\BSON\\ObjectId($id_cliente);\n $mod_dp = $this->mongo_db->where(array('_id'=>$id_cli))->set($datosClientePa)->update($this->tabla_clientePagador);\n //Auditoria...\n $data_auditoria3 = array(\n 'cod_user'=>$id_usuario,\n 'nom_user'=>$this->session->userdata('nombre'),\n 'fecha'=>$fecha,\n 'accion'=>'Modificar cliente pagador',\n 'operacion'=>''\n );\n $mod_auditoria3 = $this->mongo_db->where(array('_id'=>$id_cli))->push('auditoria',$data_auditoria3)->update($this->tabla_clientePagador);\n //-------------------------------------------------------------------------------------\n }", "public function messages($id)\n {\n $data = array(); \n $data2 = array(); \n if(session()->get('utype') == \"assistant\"){\n $user = User::find(session()->get('asdr'));\n }else{ \n $user = User::find(Auth::id());\n }\n $profInfo = DB::table('professional_information')\n ->where('user', $user->id)\n ->get();\n if(count($profInfo) == 0){ \n $messages = DB::table('items_conversations')\n ->join('conversations', 'items_conversations.conversation', '=', 'conversations.id')\n ->join('users', 'items_conversations.by', '=', 'users.id')\n ->where('conversations.id_record', $id)\n ->select('items_conversations.*', 'conversations.name as namec', 'conversations.created_at as datec', 'users.profile_photo','conversations.doctor')\n ->orderBy('items_conversations.created_at')\n ->get();\n\n if(count($messages) > 0){\n $messagesAll = DB::table('items_conversations')\n ->join('conversations', 'items_conversations.conversation', '=', 'conversations.id')\n ->join('users', 'items_conversations.by', '=', 'users.id')\n ->where('items_conversations.by', $messages[0]->by)\n ->where('conversations.doctor', $messages[0]->doctor)\n ->select('items_conversations.*', 'conversations.name as namec', 'conversations.id_record','conversations.created_at as datec', 'users.profile_photo')\n ->orderBy('items_conversations.created_at')\n ->get(); \n \n }else{\n $doc = DB::table('medical_appointments')->where('id', $id)->first(); \n $messagesAll = DB::table('items_conversations')\n ->join('conversations', 'items_conversations.conversation', '=', 'conversations.id')\n ->join('users', 'items_conversations.by', '=', 'users.id')\n ->where('items_conversations.by', $user->id)\n ->where('conversations.doctor', $doc->user_doctor)\n ->select('items_conversations.*', 'conversations.name as namec', 'conversations.id_record','conversations.created_at as datec', 'users.profile_photo')\n ->orderBy('items_conversations.created_at')\n ->get(); \n }\n $chats = $messagesAll->unique('conversation'); \n $messagesAll2 = DB::table('items_conversations')\n ->join('conversations', 'items_conversations.conversation', '=', 'conversations.id')\n ->join('users', 'items_conversations.by', '=', 'users.id')\n ->select('items_conversations.*', 'conversations.name as namec', 'conversations.id_record','conversations.created_at as datec', 'users.profile_photo','conversations.id_record')\n ->orderBy('items_conversations.created_at')\n ->get(); \n foreach($chats as $c){\n foreach($messagesAll2 as $all){\n if($c->conversation == $all->conversation){ \n array_push($data2, $all);\n }\n }\n } \n\n array_push($data, $data2);\n\n array_push($data, json_decode($profInfo)); \n \n }else{\n \n $conv= DB::table('conversations')\n ->join('items_conversations', 'conversations.id', '=', 'items_conversations.conversation')\n ->join('users', 'items_conversations.by', '=', 'users.id')\n ->where('conversations.doctor', $user->id)\n ->where('items_conversations.by','!=', $user->id)\n ->where( 'items_conversations.created_at', '>', Carbon::now()->subDays(8))\n ->select('conversations.*', 'users.profile_photo', 'users.name as nameu', 'users.id as uid', 'items_conversations.created_at as cre')\n ->orderBy('items_conversations.created_at', 'desc')\n ->get();\n\n if($id != 0){\n $com = $id;\n }else{\n if(count($conv) > 0){\n $com = $conv[0]->id;\n }else{\n $com = 0;\n } \n } \n $messages = DB::table('items_conversations')\n ->join('conversations', 'items_conversations.conversation', '=', 'conversations.id')\n ->join('users', 'items_conversations.by', '=', 'users.id')\n ->where('conversations.id', $com)\n ->where( 'items_conversations.created_at', '>', Carbon::now()->subDays(8))\n ->select('items_conversations.*', 'conversations.name as namec', 'conversations.id_record','conversations.created_at as datec', 'users.profile_photo')\n ->orderBy('items_conversations.created_at')\n ->get();\n if(count($messages) > 0){\n $messagesAll = DB::table('items_conversations')\n ->join('conversations', 'items_conversations.conversation', '=', 'conversations.id')\n ->join('users', 'items_conversations.by', '=', 'users.id')\n ->where('items_conversations.by', $messages[0]->by)\n ->where('conversations.doctor', $user->id)\n ->select('items_conversations.*', 'conversations.name as namec', 'conversations.id_record','conversations.created_at as datec', 'users.profile_photo')\n ->orderBy('items_conversations.created_at')\n ->get(); \n $chats = $messagesAll->unique('conversation'); \n $messagesAll2 = DB::table('items_conversations')\n ->join('conversations', 'items_conversations.conversation', '=', 'conversations.id')\n ->join('users', 'items_conversations.by', '=', 'users.id')\n ->select('items_conversations.*', 'conversations.name as namec', 'conversations.id_record','conversations.created_at as datec', 'users.profile_photo','conversations.id_record')\n ->orderBy('items_conversations.created_at')\n ->get(); \n foreach($chats as $c){\n foreach($messagesAll2 as $all){\n if($c->conversation == $all->conversation){ \n array_push($data2, $all);\n }\n }\n } \n array_push($data, $data2);\n }else{\n array_push($data, json_decode($messages));\n }\n $conversations2 = $conv->unique('uid'); \n array_push($data, json_decode($profInfo));\n array_push($data, $conversations2->values()->all()); \n }\n return response()->json($data); \n }", "public function putNotificationsReadallAction(Request $request)\n {\n $this->authorize();\n\n $qb = $this->getDoctrine()\n ->getManager()\n ->getRepository('NaturaPassNotificationBundle:NotificationReceiver')\n ->createQueryBuilder('nr');\n\n $notifications = $qb\n ->select('nr')\n ->where('nr.receiver = :receiver')\n ->andWhere('nr.state = :unread')\n ->setParameter('receiver', $this->getUser())\n ->setParameter('unread', NotificationReceiver::STATE_UNREAD)\n ->getQuery()\n ->getResult();\n\n $manager = $this->getDoctrine()->getManager();\n foreach ($notifications as $notification) {\n $notification->setState(NotificationReceiver::STATE_READ);\n $manager->persist($notification);\n }\n $manager->flush();\n return $this->view($this->success(), Codes::HTTP_OK);\n }", "protected function setMsgs() {\r\n if($list = $this->getMysqlRows('*', $this->table, \"WHERE `user`='$this->user' AND LENGTH(`msg`)>4\", 'ORDER BY `id` ASC')) {\r\n $nrmsg = $this->startrow; // to show the message number\r\n\r\n for($i=0; $i<$this->affected_rows; $i++) {\r\n \r\n $name = $list[$i]['name'];\r\n $nametitle_id = '';\r\n if($list[$i]['fbuserid'] != '0') $nametitle_id = ' title=\"'. $list[$i]['fbuserid'] .'\"';\r\n else if($list[$i]['social'] != '0') $nametitle_id = ' title=\"'. $list[$i]['social'] .'\"';\r\n\r\n $email = (intval($list[$i]['amail'])===1 || intval($list[$i]['amail'])===3) ? $list[$i]['email'] : ''; // show e-mail only if `amail` is 1 or 3\r\n $msg = $list[$i]['msg'];\r\n $data = date('j-M-Y, &\\n\\b\\sp; G:i ', $list[$i]['dt']);\r\n $id = $list[$i]['id'];\r\n $ip = $list[$i]['ip'];\r\n $nrmsg++;\r\n\r\n \r\n if(isset($_SESSION['usritspage']) && $_SESSION['usritspage']===1) {\r\n GLOBAL $functions; // gets the object with functions\r\n\r\n // html code with comments, for admin\r\n $this->msgs .= \"\\r\\n\".'<div class=\"coms'.($nrmsg%2).'\"><div class=\"n_coms\"'. $nametitle_id .'> &#1440; '.$name.'</div><q>- IP: '.$ip.'</q>\r\n <div class=\"nr_coms\"> <input type=\"checkbox\" name=\"delcomm[]\" value=\"'.$id.'\" class=\"delsel\" id=\"dcm'.$id.'\" /><label for=\"dcm'.$id.'\">'.$this->lsite['delete'].'</label></div>\r\n <span id=\"e'.$id.'\" class=\"e_coms\">'. $email. '</span>\r\n <em class=\"d_coms\">'. $data. '</em> &nbsp; &nbsp; &nbsp;\r\n <br/><div id=\"c'.$id.'\" class=\"c_coms\">'. $msg. '</div></div><hr class=\"linie_coms\"/>'.\"\\r\\n\";\r\n }\r\n else { // html code with comments, for visitors\r\n $this->msgs .= \"\\r\\n\".'<div class=\"coms'.($nrmsg%2).'\"><div class=\"n_coms\"'. $nametitle_id .'> &#1440; '.$name.'</div> <div class=\"nr_coms\"> '.$nrmsg.' </div><span class=\"e_coms\">'. $email. '</span><em class=\"d_coms\">'. $data. '</em> &nbsp; &nbsp; &nbsp;\r\n <br/><div class=\"c_coms\">'. $msg. '</div></div><hr class=\"linie_coms\"/>'.\"\\r\\n\";\r\n }\r\n }\r\n $this->setLinkspgs(); // sets the pagination links in $linkspgs\r\n }\r\n else $this->msgs = '<h3>'.$this->lsite['msgs']['nomsg'].'</h3>';\r\n }", "public function updateUsersBatch($usersBatchData = array()) {\n $users = array();\n\n foreach($usersBatchData as $userData) {\n if (is_null($userData)) {\n throw new Exception('Moesif UpdateUser with a null userData object');\n }\n \n if (!isset($userData['user_id'])) {\n throw new Exception('Moesif updateUser requires user_id field to be set');\n }\n $users[] = $userData;\n }\n \n $this->_sendProducer->updateUsersBatch($users);\n }", "function failedParticipants()\n{\n $mycon = databaseConnect();\n $dataRead = New DataRead();\n $dataWrite = New DataWrite();\n\n //find all the matching details\n $todaydate = date(\"Y-m-d H:i:s\");\n $matchingdetails = $dataRead->matching_getallactivestatus($mycon, '5');\n $mycon->beginTransaction();\n foreach ($matchingdetails as $row)\n {\n if (strtotime($row['expirydate']) < strtotime($todaydate))\n {\n //get the transfer details and block the participants\n $transferdetails = $dataRead->member_getbyid($mycon, $row['transfer_id']);\n //update the participants status to 0 to show blocked member\n $updatestatus = $dataWrite->members_updatestatus($mycon, $transferdetails['member_id'], '5');\n if (!$updatestatus)\n {\n $mycon->rollBack();\n echo \"failed update 1\";\n }\n\n //send email to participants to inform their present status\n $message = \"<div class='container'>\n <p>Hello \".$transferdetails['username'].\",</p>\n <p>We are sorry to inform you that due to failure to complete your transfer order details, hence the system has automatically disabled your account for the main time. </p>\n <p>If you are ready to participate mutually and wants your accounts running again, please contact support at support@welathfundglobal.com or chat using our installed livechat.</p>\n <p>Regards.</p>\n <p><small><em>This message is auto-generated, please do not reply via your email.</em></small></p>\n </div>\";\n if (sendEmail($transferdetails['email'], \"Account Blocked - Wealth Fund Global\", $message))\n {\n //update the\n //set the matching status to 4 which shows remerge\n $matchingupdate = $dataWrite->updateMatchingStatus($mycon, $row['matching_id'], '4');\n if (!$matchingupdate)\n {\n $mycon->rollBack();\n echo \"failed matching update\";\n }\n\n //get the donation details of the receiver\n $receiverdonationdetails = $dataRead->donations_getbyiddonation($mycon, $row['receivefund_id']);\n $difference = $receiverdonationdetails['donation_gh'] - $row['amount'];\n\n //update the former recieve request\n $receivefundupdate = $dataWrite->donation_update_gh($mycon, $difference, $row['receivefund_id']);\n if (!$receivefundupdate)\n {\n $mycon->rollBack();\n echo \"failed receiving fund update\";\n }\n\n //create a new receive fund request for the receiver\n //calculate 3 days from now to transfer fund request again\n $readydonation_ph = date(\"Y-m-d H:i:s\", strtotime(\"+3 days\"));\n $readydonation_gh = date(\"Y-m-d H:i:s\");\n\n //add to the donation table\n $donation_id = $dataWrite->donation_add_gh($mycon,$row['amount'],$row['receive_id'],$readydonation_ph,$readydonation_gh,$row['accountdetail_id'],'1');\n if (!$donation_id)\n {\n $mycon->rollBack();\n echo \"failed updating the donation\";\n }\n \n }\n }\n\n $mycon->commit();\n }\n\n}", "function detachMessage($input_array){\n\t\t//$this->db->delete('red_member_message',$input_array);\t\n\t\t$this->db->update('red_member_message',array('is_deleted'=>1),$input_array);\t\t\n\t\treturn $this->db->affected_rows();\t\n\t}", "public function update_users($chatId,$input1,$nama_update,$kontak_update,$kelompok_update,$level,$where_kontak){\n $kontak_pengirim =str_replace('@c.us','',$chatId);\n require_once 'users.php';\n $users = new users();\n $res2 = $users->get_users($kontak_pengirim);\n // $nama_pengirim =$res2['nama'];\n $level_user =$res2['level']; \n//cek level kontak\n// jika level 1 level=1 else level=2\n// $level_user=2; \nif($level_user==1){\n $level_update=$level;\n $where_kontak_update=$where_kontak;\n}else{\n $level_update=2;\n $where_kontak_update=str_replace('@c.us','',$chatId);\n}\n$result = $users->update($nama_update,$kontak_update,$kelompok_update,$level_update,$where_kontak_update);\nif($result){\n $this->sendMessage($chatId,\n \"--------------------------------------------------------\\n\". \n \"--------------------------------------------------------\\n\". \n \" \".$chatId.\" \\n\".\n \"UPDATE \".$input1.\" \\n\".\n // \"SET \".$input3.\" \\n\".\n \"NAMA \".$nama_update.\" \\n\".\n \"KONTAK \".$kontak_update.\" \\n\".\n \"KELOMPOK \".$kelompok_update.\" \\n\".\n \"LEVEL \".$level_update.\" \\n\".\n \"NO_KONTAK_UPDATE \".$where_kontak_update.\" \\n\".\n \"--------------------------------------------------------\"\n );\n \n}else{\n $this->sendMessage($chatId,\n \"--------------------------------------------------------\\n\". \n \"GAGAL UPDATE \\n\".\n \"--------------------------------------------------------\"\n );\n}\n \n }", "public function recievedConversations()\n {\n return $this->hasMany('App\\Conversation', 'user2_id');\n }", "public function markMessagesAsUnread($userid, $messageids, $folder) {\r\n\t\t// sanity checks\r\n\t\tif (!is_numeric($userid)) return false;\r\n\t\tif (!is_numeric($folder)) return false;\r\n\t\t$tableName = $this->getTableNameForFolder($folder);\r\n\t\tif ($tableName == NULL) return false;\r\n\t\tif (!$this->array_contains_only_numeric_values($messageids)) return false;\r\n\r\n\t\t$useridfield = \"user_to\";\r\n\t\tif ($folder == MESSAGES_GET_SENT_MESSAGES) $useridfield = \"user_from\";\r\n\r\n\t\t$this->dbConnector->where($useridfield, $userid);\r\n\t\t$this->dbConnector->where(\"id IN (\".implode(',',$messageids).\")\");\r\n\t\t$data = array(\"message_read\" => \"0\");\r\n\t\treturn $this->dbConnector->update($tableName, $data);\r\n\t}", "function update_user_complain($unique_id,$rollno,$result1){\n\t$row=fetch_array($result1);\n\t$comp_id=json_decode($row['complain_ids']);\n\t$to_add=array();\n\t$comp_id[]=$unique_id;\n\t$ids=json_encode($comp_id);\n\t$sql=\"UPDATE users set complain_ids='$ids' where rollno='$rollno'\";\n\t$result=query($sql);\n\tconfirm($result);\n}" ]
[ "0.54812247", "0.5395084", "0.5365171", "0.52720004", "0.52615255", "0.52101547", "0.5194421", "0.519151", "0.5179355", "0.5174167", "0.51727647", "0.51579106", "0.51503325", "0.514385", "0.5123578", "0.5120785", "0.49562293", "0.49424025", "0.49310806", "0.49177518", "0.4917015", "0.4892978", "0.48702425", "0.48534983", "0.48531896", "0.48364037", "0.48258975", "0.48242632", "0.48201278", "0.4796499", "0.4788684", "0.47830522", "0.47701162", "0.4767653", "0.47614336", "0.47602296", "0.47566277", "0.47437853", "0.4723018", "0.47220206", "0.47160968", "0.4713496", "0.47105506", "0.46948665", "0.4693444", "0.46930957", "0.46857527", "0.4670175", "0.4667445", "0.46541303", "0.46463078", "0.46412823", "0.46411052", "0.4638319", "0.46357587", "0.46284056", "0.46216276", "0.4621118", "0.46196678", "0.46169773", "0.4613069", "0.46000823", "0.45989728", "0.4592352", "0.45899823", "0.45871913", "0.45869502", "0.4584372", "0.45780772", "0.45663476", "0.4552666", "0.4545622", "0.4528573", "0.4526405", "0.45206285", "0.45173854", "0.4513194", "0.45021304", "0.44998273", "0.44925228", "0.44888437", "0.4488247", "0.44854367", "0.44851837", "0.44850028", "0.4482681", "0.44719055", "0.44617558", "0.44593623", "0.44564098", "0.444794", "0.44460157", "0.4445893", "0.44445413", "0.44428208", "0.44424808", "0.44319734", "0.44309172", "0.44308576", "0.44267476" ]
0.70691985
0
Echo the title of a post. The genesis_post_title_text filter is applied on the text of the title, while the genesis_post_title_output filter is applied on the echoed markup.
Отобразить заголовок поста. Фильтр genesis_post_title_text применяется к тексту заголовка, а фильтр genesis_post_title_output — к отображаемому разметке.
function maw_genesis_do_post_title() { $title = apply_filters( 'genesis_post_title_text', get_the_title() ); if ( 0 == strlen( $title ) ) return; if ( is_singular() ) $title = sprintf( '<h2><span>%s</span></h2>', $title ); elseif ( apply_filters( 'genesis_link_post_title', true ) ) $title = sprintf( '<h2><span><a href="%s" title="%s" rel="bookmark">%s</a></span></h2>', get_permalink(), the_title_attribute( 'echo=0' ), apply_filters( 'genesis_post_title_text', $title ) ); else $title = sprintf( '<h2><span>%s</span></h2>', $title ); echo apply_filters( 'genesis_post_title_output', "$title \n" ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function post_title() {\r\n\t\t\techo '<div class=\"single-title post-title is-big-title entry-title\">';\r\n\t\t\techo '<h1>';\r\n\t\t\tthe_title();\r\n\t\t\techo '</h1>';\r\n\t\t\techo '</div><!--#single title-->';\r\n\t\t}", "public function title() {\n if ($this->no_results)\n return false;\n\n # Excerpts are likely to have some sort of markup module applied to them;\n # if the current instantiation is not filtered, make one that is.\n $post = ($this->filtered) ? $this : new Post($this->id) ;\n\n $title = Feathers::$instances[$this->feather]->title($post);\n return Trigger::current()->filter($title, \"title\", $post);\n }", "function indieweb_post_title( $title ) {\n\t// TODO: This needs to only be applied to the main title somehow.\n\tif ( is_single() && in_the_loop() && is_main_query() ) {\n\t\treturn '<span class=\"p-name\">' . $title . '</span>';\n\t}\n\n\treturn $title;\n}", "public static function outputTitleTag() {\n echo '<title>', self::getTitle(), '</title>', PHP_EOL;\n }", "function alienship_do_entry_title() {\n\n\t$title = get_the_title();\n\n\tif ( is_singular() ) {\n\t\t$entry_title = sprintf( '<h1 class=\"entry-title\">%s</h1>', $title );\n\n\t} else {\n\t\t$entry_title = sprintf( '<h2 class=\"entry-title\"><a class=\"entry-title\" title=\"%s\" rel=\"bookmark\" href=\"%s\">%s</a></h2>', the_title_attribute( 'echo=0' ), get_permalink(), $title );\n\n\t}\n\techo apply_filters( 'alienship_entry_title_text', $entry_title );\n}", "public function get_title() {\n\t\treturn apply_filters( 'socialchef_entity_title', $this->post ? $this->post->post_title : '', $this );\n\t}", "public function title()\n\t{\n\t\t$title = '';\n\t\tif ( !is_single() ) {\n\t\t\t$title = '<a href=\"'.get_permalink().'\">' . get_the_title() . '</a>';\n\t\t} else {\n\t\t\t$title = get_the_title();\n\t\t}\n\t\t\n\t\treturn apply_filters( 'firestarter_title', $title );\n\t}", "function pendrell_entry_title( $title = '' ) {\n if ( empty( $title ) )\n $title = get_the_title();\n if ( !is_singular() )\n $title = '<a href=\"' . get_permalink() . '\" rel=\"bookmark\">' . $title . '</a>';\n echo apply_filters( 'pendrell_entry_title', '<h2 class=\"entry-title p-name\" itemprop=\"headline\">' . $title . '</h2>' );\n}", "public static function showTitleTag() {\n \tglobal $runPlugin;\n \teval(callHook('startShowtitleTag'));\n \t$data = $runPlugin->getTitleTag();\n \teval(callHook('endShowtitleTag'));\n \techo $data;\n }", "public function get_post_title()\n {\n }", "public static function alter_title( $args, $instance ) {\n\t\tif ( 'singular_portfolio' == $instance ) {\n\t\t\t$blocks = wpex_portfolio_single_blocks();\n\t\t\tif ( is_array( $blocks ) && ! in_array( 'title', $blocks ) ) {\n\t\t\t\t$args['string'] = single_post_title( '', false );\n\t\t\t\t$args['html_tag'] = 'h1';\n\t\t\t}\n\t\t}\n\t\treturn $args;\n\t}", "function alienship_do_site_title() {\n\n\t// Use H1 on home, paragraph elsewhere\n\t$element = is_front_page() || is_home() ? 'h1' : 'p';\n\n\t// Title content that goes inside wrapper\n\t$site_name = sprintf( '<a href=\"%s\" title=\"%s\" rel=\"home\">%s</a>', trailingslashit( home_url() ), esc_attr( get_bloginfo( 'name' ) ), get_bloginfo( 'name' ) );\n\n\t// Put it all together\n\t$title = '<' . $element . ' id=\"site-title\" class=\"site-title\">' . $site_name . '</' . $element .'>';\n\n\t// Echo the title\n\techo apply_filters( 'alienship_site_title_content', $title );\n}", "function mbt_filter_the_title($title) {\n\tif (in_the_loop() && is_single()) {\n\t\t$title = $title . \" (I was here)\";\n\t}\n\treturn $title;\n}", "protected function get_post_title()\n {\n }", "protected function get_post_title()\n {\n }", "public function getTitle()\n\t{\n\t\treturn $this->_getData('post_title');\n\t}", "function book_post_title( $echo = true ) {\r\n global $book;\r\n\r\n if ( !book_has_post() )\r\n return;\r\n\r\n $post = get_post($book->post);\r\n\r\n if ( $echo )\r\n echo $post->post_title;\r\n return $post->post_title;\r\n}", "public function title(): string|false {\n if ($this->no_results)\n return false;\n\n # Excerpts are likely to have some sort of markup module applied;\n # if the current instantiation is not filtered, make one that is.\n $post = ($this->filtered) ?\n $this : new self($this->id, array(\"skip_where\" => true)) ;\n\n $title = Feathers::$instances[$this->feather]->title($post);\n return Trigger::current()->filter($title, \"title\", $post);\n }", "function publisher_theme_slug_render_title() {\n\n\t\t\t?>\n\t\t\t<title><?php wp_title( '|', true, 'right' ); ?></title>\n\t\t\t<?php\n\t\t}", "function carawebs_post_title(){\n\n\techo '<h1 class=\"headline project_headline\">' . get_the_title();\n\techo ' - ';\n\techo get_the_date('d/m/y') . '</h1>';\n\n}", "function publisher_the_title( $before = '', $after = '', $echo = true ) {\n\n\t\tif ( $echo ) {\n\t\t\techo $before, publisher_get_the_title(), $after;\n\t\t} else {\n\t\t\treturn $before . publisher_get_the_title() . $after;\n\t\t}\n\t}", "public function enter_title_here($text, $post)\n {\n }", "private function _render_title()\n\t{\n\t\t$out = '<title>';\n\t\t\n\t\tif ($this->title_append)\n\t\t{\n\t\t\t$out .= $this->site_title.$this->title_append_str;\n\t\t}\n\t\t\n\t\t$out.= $this->title.'</title>'.PHP_EOL;\n\t\t\n\t\treturn $out;\n\t}", "function llorix_one_lite_render_title() {\n\t\t?>\n\t\t<title><?php wp_title( '|', true, 'right' ); ?></title>\n\t\t<?php\n\t}", "function themify_theme_entry_title_tag( $echo = true ) {\n\t\tglobal $themify;\n\t\t$tag = is_singular() && empty($themify->is_shortcode) ? 'h1' : 'h2';\n\t\t$tag = apply_filters( 'themify_entry_title_tag', $tag );\n\t\tif( ! $echo )\n\t\t\treturn $tag;\n\t\techo $tag;\n\t}", "public function title_func() {\n global $post;\n $post = $this->single;\n setup_postdata($post);\n $item = get_the_title();\n return $item;\n }", "public function get_title() {\n\t\treturn __( 'Text', 'elementor-press-widgets' );\n\t}", "function accesspress_mag_render_title() {\r\n\t\t?>\r\n\t\t<title><?php wp_title( '|', true, 'right' ); ?></title>\r\n\t\t<?php\r\n\t}", "public function getFeedTitle(){\n \n echo '\n \n <h3 align=\"left\">' . $this->Title . ' News</h3>\n \n '; \n }", "private function title() {\r\n\t\tif($this->pageTitle == \"\") {\r\n\t\t\t$title = $this->preTitle;\r\n\t\t} else {\r\n\t\t\tif($this->titleSeperator == \"\") {\r\n\t\t\t\t$this->titleSeperator = ' - ';\r\n\t\t\t}\r\n\t\t\t$title = $this->preTitle.$this->titleSeperator.$this->pageTitle;\r\n\t\t}\r\n\t\t$regex = \"#([<]!--%TITLE%--[>])#\";\r\n\t\t$this->template = preg_replace($regex,$title,$this->template);\r\n\t}", "function mediadesk_edge_get_title_text() {\n\t\t$id = mediadesk_edge_get_page_id();\n\t\t$title = get_the_title( $id );\n\t\t\n\t\tif ( ( is_home() && is_front_page() ) || is_singular( 'post' ) ) {\n\t\t\t$title = get_option( 'blogname' );\n\t\t} elseif ( is_tag() ) {\n\t\t\t$title = single_term_title( '', false ) . esc_html__( ' Tag', 'mediadesk' );\n\t\t} elseif ( is_date() ) {\n\t\t\t$title = get_the_time( 'F Y' );\n\t\t} elseif ( is_author() ) {\n\t\t\t$title = esc_html__( 'Author:', 'mediadesk' ) . \" \" . get_the_author();\n\t\t} elseif ( is_category() ) {\n\t\t\t$title = single_cat_title( '', false );\n\t\t} elseif ( is_archive() ) {\n\t\t\t$title = esc_html__( 'Archive', 'mediadesk' );\n\t\t} elseif ( is_search() ) {\n\t\t\t$title = esc_html__( 'Search results for: ', 'mediadesk' ) . get_search_query();\n\t\t} elseif ( is_404() ) {\n\t\t\t$title_404 = mediadesk_edge_options()->getOptionValue( '404_title' );\n\t\t\t$title = ! empty( $title_404 ) ? $title_404 : esc_html__( '404 - Page not found', 'mediadesk' );\n\t\t}\n\t\t\n\t\treturn apply_filters( 'mediadesk_edge_filter_title_text', $title );\n\t}", "function _wp_render_title_tag()\n{\n}", "public function getTitle()\n {\n if (empty($this->_data['title'])) {\n $this->_data['title'] = $this->getDefaultTitle();\n }\n if (!Mage::registry('my_title')) {\n Mage::register('my_title', $this->_data['title']);\n } else {\n $this->_data['title'] = Mage::registry('my_title');\n }\n return htmlspecialchars(html_entity_decode(trim($this->_data['title']), ENT_QUOTES, 'UTF-8'));\n }", "function wptitle($x) {\n if (!isset($x)) {\n echo \"Please request the post id to display title\";\n } else\n if (is_numeric($x)) {\n $my_postid = $x;\n $content_post = get_post($my_postid);\n $content = $content_post->post_title;\n $content = apply_filters('the_content', $content);\n $content = str_replace(']]>', ']]&gt;', $content);\n echo $content;\n } else {\n echo \"Post id must be a number\";\n }\n }", "public function renderPostTitle($sTitle) {\n\t\tif ($this->checkIfOneightyArticle(get_the_ID()) === true) {\n\n\t\t\t// Meta property\n\t\t\t$sMetaProperty = str_replace('{nameSpace}', $this->getNamespace(), Whv_Config::Get('wordPress', 'postMetaKeyData'));\n\n\t\t\t// Set the title\n\t\t\t$sTitle = $this->getArticle()->aSyndicationData[$sMetaProperty]->title;\n\t\t}\n\n\t\t// Return the title, whether\n\t\t// or not it has been modified\n\t\treturn $sTitle;\n\t}", "public function rewriteTitle() {\n\t\t$content = apply_filters( 'aioseo_flush_output_buffer', true ) ? ob_get_clean() : ob_get_contents();\n\t\t$split = explode( '</head>', $content );\n\t\t$head = $split[0] . '</head>';\n\n\t\tunset( $split[0] );\n\t\t$body = implode( '</head>', $split );\n\n\t\t// Remove all existing title tags.\n\t\t$head = preg_replace( '#<title.*?\\/title>#s', '', $head );\n\n\t\t// Add the new title tag to our own comment block.\n\t\t$pageTitle = aioseo()->helpers->escapeRegexReplacement( $this->getTitle() );\n\t\t$head = preg_replace( '#(<!--\\sAll\\sin\\sOne\\sSEO[a-zA-Z\\s0-9.]+\\s-->)#', \"$1\\r\\n\\t\\t<title>$pageTitle</title>\", $head, 1 );\n\n\t\t$content = $head . $body;\n\t\techo $content; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped\n\t}", "public function getTitle(){\n if(!empty($this->title))\n $title = $this->title;\n else\n $title = $this->name;\n return htmlspecialchars($title);\n }", "public function getTitle()\r\n {\r\n return htmlspecialchars($this->title);\r\n }", "public function alter_title( $args ) {\n\t\tif ( is_singular( 'testimonials' ) ) {\n\t\t\tif ( ! get_theme_mod( 'testimonials_labels' )\n\t\t\t\t&& $author = get_post_meta( get_the_ID(), 'wpex_testimonial_author', true )\n\t\t\t) {\n\t\t\t\t$title = sprintf( esc_html__( 'Testimonial by: %s', 'total-theme-core' ), $author );\n\t\t\t} else {\n\t\t\t\t$title = single_post_title( '', false );\n\t\t\t}\n\t\t\t$args['string'] = $title;\n\t\t\t$args['html_tag'] = 'h1';\n\t\t}\n\t\treturn $args;\n\t}", "public function get_title() {\n\t\treturn __( 'Post Meta field', 'elementor-pro' );\n\t}", "function carawebs_blog_archive_post_title(){\n\n\techo '<h2 class=\"headline overlay_headline\">' . get_the_title();\n\techo ' - ';\n\techo get_the_date('d/m/y') . '</h2>';\n\n}", "function blogfused_the_headline(){\n global $post;\n \n if(is_category()):\n printf(__('Category Archives: %s', 'fused'), '<span>' . single_cat_title('', false) . '</span>');\n \n elseif(is_search()):\n printf( __( 'Search Results for: %s', 'fused' ), '<span>' . get_search_query() . '</span>' );\n elseif(is_archive()):\n if(is_day()):\n printf(__('Daily Archives: %s', 'fused'), '<span>' . get_the_date() . '</span>');\n elseif(is_month()):\n printf(__('Monthly Archives: %s', 'fused'), '<span>' . get_the_date(_x('F Y', 'monthly archives date format', 'fused')) . '</span>'); \n elseif(is_year()):\n printf(__('Yearly Archives: %s', 'fused'), '<span>' . get_the_date(_x('Y', 'yearly archives date format', 'fused')) . '</span>');\n \n else:\n _e('Blog Archives', 'fused');\n endif;\n \n elseif(is_singular()):\n \n echo get_the_title($post->ID);\n \n endif; \n \n \n}", "public static function getTitle() {\n global $page, $paged;\n\n $return = '';\n\n // If Wordpress SEO is activated (Yoast Wordpress SEO)\n if (is_plugin_active('wordpress-seo/wp-seo.php')) {\n $return .= wp_title('');\n } else {\n\n $return .= wp_title('|', false, 'right');\n $return .= get_bloginfo('name');\n $site_description = get_bloginfo('description', 'display');\n if($site_description && (is_home() || is_front_page()))\n $return .= \" | $site_description\";\n\n // Add a page number if necessary:\n if($paged >= 2 || $page >= 2)\n $return .= ' | ' . sprintf(__('Page %s', 'ait' ), max($paged, $page));\n }\n\n return $return;\n }", "public static function renderPageTitle() {\n\t\t\n\t\tif ( is_single() ) { \n\t\t\tsingle_post_title(); \n\t\t} elseif ( is_home() || is_front_page() ) { \n\t\t\tbloginfo('name'); \n\t\t\tprint ' | '; \n\t\t\tbloginfo('description'); \n\t\t\tget_page_number(); \n\t\t} elseif ( is_page() ) { \n\t\t\tsingle_post_title(''); \n\t\t} elseif ( is_search() ) { \n\t\t\tbloginfo('name'); \n\t\t\tprint ' | Search results for ' . wp_specialchars($s); \n\t\t\tget_page_number(); \n\t\t} elseif ( is_404() ) { \n\t\t\tbloginfo('name'); \n\t\t\tprint ' | Not Found'; \n\t\t} else { \n\t\t\tbloginfo('name'); \n\t\t\twp_title('|'); \n\t\t\tget_page_number(); \n\t\t}\n\t\t\n\t}", "function filter_single_post_title( $title, $_post ) {\n\n\t\t$title = trim( $title );\n\n\t\tif ( '' == $title ) {\n\t\t\t$cats = get_the_category( $_post->ID );\n\t\t\t$num_terms = count( $cats );\n\t\t\tif ( $cats ) {\n\t\t\t\t$term = $cats[0]; // only care about the first cat\n\t\t\t\tif ( 'notes' == $term->slug ) {\n\t\t\t\t\t$title .= 'Note';\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$title .= $term->name;\n\t\t\t\t}\n\t\t\t\t$title .= '—';\n\t\t\t\t$title .= get_the_date( get_option( 'date_format' ) . ', ' . get_option( 'time_format' ) );\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn $title;\n\t}", "public function getTitle()\n {\n return htmlspecialchars($this->getBlock()->getTitle());\n }", "public function getBlogPostTitle($html = true) {\n\t\t\n\t\tif (isset($this->bp_title)) {\n\t\t\treturn ($html) ? htmlentities($this->bp_title, ENT_QUOTES, \"UTF-8\") : $this->bp_title;\n\t\t}\n\t\t\n\t\treturn \"\";\n\t}", "function boardwalk_render_title() {\r\n\t\t?>\r\n\t\t<title><?php wp_title( '|', true, 'right' ); ?></title>\r\n\t\t<?php\r\n\t}", "public static function authorPageTitle(WP_Post $post)\n {\n if (is_page('anthonys-famous-quotes') && isset($_GET['author'])) {\n $uri = get_option('afk-api_uri');\n $key = get_option('afk-api_key');\n\n $client = new Client($uri, $key);\n\n try {\n $author = $client->getAuthorByName($_GET['author']);\n $post->post_title = sprintf(\"Famous Quotes by %s\", $author->getName());\n } catch (ApiErrorException $e) {\n $post->post_title = 'Anthony\\'s Famous Quotes';\n }\n }\n }", "function publisher_the_title_attribute( $before = '', $after = '', $echo = true ) {\n\n\t\t$data = publisher_get_post_cache( 'title_attribute' );\n\n\t\tif ( ! is_null( $data ) ) {\n\t\t\treturn $data;\n\t\t}\n\n\t\t$data = publisher_get_the_title();\n\n\t\tif ( empty( $data ) ) {\n\t\t\t$data = esc_attr( $data );\n\t\t}\n\n\t\tpublisher_set_post_cache( 'title_attribute', $data );\n\n\t\tif ( $echo ) {\n\t\t\techo $before, $data, $after;\n\t\t} else {\n\t\t\treturn $before . $data . $after;\n\t\t}\n\t}", "public function get_title() {\n\t\treturn __( 'portfolio-about-edu-and-exp-widget', 'portfolio-elementor' );\n\t}", "public function getTitle()\n\t{\n\t\tif ($this->pageTitle)\n\t\t{\n\t\t\treturn '<title>' . $this->pageTitle . \"</title>\\n\";\n\t\t}\n\t}", "public function outputTitle()\n {\n // Check if output should be modified.\n if ($this->modifyOutputTitle == false) {\n $navigation = $this->navigation->navigation;\n if (isset($navigation[$this->configuration['m']]['node_name'])) {\n print $this->mod->title($navigation[$this->configuration['m']]['node_name'], $this->configuration['scripts_name_version']);\n } else {\n print $this->core->haltController['message'];\n }\n } else {\n print $this->modifyOutputTitle;\n }\n }", "public static function title_header() {\n\t\t$object = get_queried_object();\n\t\t$description = isset( $object->taxonomy )\n\t\t\t? term_description( $object->term_id, $object->taxonomy )\n\t\t\t: false;\n\n\t\tif ( ! self::has_logo() && ! $description )\n\t\t\treturn;\n\n\t\tif ( is_home() || is_front_page() )\n\t\t\treturn;\n\n\t\t?>\n\t\t<header class=\"entry-header\">\n\t\t\t<?php\n\n\t\t\tif ( self::has_logo() ) {\n\t\t\t\tprintf( '<h1 class=\"page-title\">%s</h1>', self::get_title( false ) );\n\t\t\t}\n\n\t\t\tif ( $description ) {\n\n\t\t\t\t$tax = $object->taxonomy == 'post_tag' ? 'tag' : $object->taxonomy;\n\n\t\t\t\t// add a filter and show our taxonomy term description\n\t\t\t\techo apply_filters( \"{$tax}_archive_meta\", sprintf( '<div class=\"taxonomy-description\">%s</div>', $description ) );\n\t\t\t}\n\n\t\t\t?>\n\t\t</header><!-- .page-header -->\n\t\t<?php\n\t}", "function woocommerce_template_loop_product_title() {\n echo '<h2 class=\"title is-4\">' . get_the_title() . '</h2>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped\n }", "private function render_title() {\n\t\tswitch ( $this->action ) {\n\t\t\tcase self::ADD:\n\t\t\t\techo '' .\n\t\t\t\t\t'\t<h1 class=\"add-entry\">' . esc_html__( 'Add glossary entry', 'glossary-by-arteeo' ) . '</h1>' .\n\t\t\t\t\t'\t<p>' . esc_html__( 'Add a new entry to the glossary.', 'glossary-by-arteeo' ) . '</p>';\n\t\t\t\tbreak;\n\t\t\tcase self::EDIT:\n\t\t\t\techo '' .\n\t\t\t\t\t'\t<h1 class=\"edit-entry\">' .\n\t\t\t\t\t\t\tesc_html__( 'Edit glossary entry', 'glossary-by-arteeo' ) .\n\t\t\t\t\t'\t</h1>' .\n\t\t\t\t\t'\t<p>' . esc_html__( 'Adjust the entry from the glossary.', 'glossary-by-arteeo' ) . '</p>';\n\t\t\t\tbreak;\n\t\t}\n\t}", "function members_directory_title_output($title, $post_ID = '') {\r\n\tglobal $wpdb, $current_site, $post, $members_directory_base, $members_directory_multisite_query;\r\n\tif ( in_the_loop() && $post->post_name == $members_directory_base && $post_ID == $post->ID) {\r\n\t\t$members_directory = members_directory_url_parse();\r\n\t\tif ( $members_directory['page_type'] == 'landing' ) {\r\n\t\t\tif ( $members_directory['page'] > 1 ) {\r\n\t\t\t\t$title = '<a href=\"http://' . $current_site->domain . $current_site->path . $members_directory_base . '/\">' . $post->post_title . '</a> &raquo; ' . '<a href=\"http://' . $current_site->domain . $current_site->path . $members_directory_base . '/' . $members_directory['page'] . '/\">' . $members_directory['page'] . '</a>';\r\n\t\t\t} else {\r\n\t\t\t\t$title = '<a href=\"http://' . $current_site->domain . $current_site->path . $members_directory_base . '/\">' . $post->post_title . '</a>';\r\n\t\t\t}\r\n\t\t} else if ( $members_directory['page_type'] == 'search' ) {\r\n\t\t\tif ( $members_directory['page'] > 1 ) {\r\n\t\t\t\t$title = '<a href=\"http://' . $current_site->domain . $current_site->path . $members_directory_base . '/\">' . $post->post_title . '</a> &raquo; <a href=\"http://' . $current_site->domain . $current_site->path . $members_directory_base . '/search/\">' . __('Search', 'members-directory') . '</a> &raquo; ' . '<a href=\"http://' . $current_site->domain . $current_site->path . $members_directory_base . '/search/' . urlencode($members_directory['phrase']) . '/' . $members_directory['page'] . '/\">' . $members_directory['page'] . '</a>';\r\n\t\t\t} else {\r\n\t\t\t\t$title = '<a href=\"http://' . $current_site->domain . $current_site->path . $members_directory_base . '/\">' . $post->post_title . '</a> &raquo; <a href=\"http://' . $current_site->domain . $current_site->path . $members_directory_base . '/search/\">' . __('Search', 'members-directory') . '</a>';\r\n\t\t\t}\r\n\t\t} else if ( $members_directory['page_type'] == 'user' ) {\r\n\t\t\t$user_count = $wpdb->get_var($wpdb->prepare(\"SELECT COUNT(*) FROM \" . $wpdb->base_prefix . \"users WHERE user_nicename = %s\".$members_directory_multisite_query, $members_directory['user'] ));\r\n\t\t\tif ( $user_count > 0 ) {\r\n\t\t\t\t$user_details = $wpdb->get_row($wpdb->prepare(\"SELECT * FROM \" . $wpdb->base_prefix . \"users WHERE user_nicename = %s\", $members_directory['user']));\r\n\t\t\t\t$title = '<a href=\"http://' . $current_site->domain . $current_site->path . $members_directory_base . '/\">' . $post->post_title . '</a> &raquo; <a href=\"http://' . $current_site->domain . $current_site->path . $members_directory_base . '/' . $members_directory['user'] . '/\">' . ucfirst($user_details->display_name) . '</a>';\r\n\t\t\t} else {\r\n\t\t\t\t$title = '<a href=\"http://' . $current_site->domain . $current_site->path . $members_directory_base . '/\">' . $post->post_title . '</a> &raquo; ' . __('Invalid User', 'members-directory');\r\n\t\t\t}\r\n\t\t} else if ( $members_directory['page_type'] == 'user_posts' ) {\r\n\t\t\t$user_count = $wpdb->get_var($wpdb->prepare(\"SELECT COUNT(*) FROM \" . $wpdb->base_prefix . \"users WHERE user_nicename = %s\".$members_directory_multisite_query, $members_directory['user']));\r\n\t\t\tif ( $user_count > 0 ) {\r\n\t\t\t\t$user_details = $wpdb->get_row($wpdb->prepare(\"SELECT * FROM \" . $wpdb->base_prefix . \"users WHERE user_nicename = %s\", $members_directory['user']));\r\n\t\t\t\t$title = '<a href=\"http://' . $current_site->domain . $current_site->path . $members_directory_base . '/\">' . $post->post_title . '</a> &raquo; <a href=\"http://' . $current_site->domain . $current_site->path . $members_directory_base . '/' . $members_directory['user'] . '/\">' . ucfirst($user_details->display_name) . '</a> &raquo; <a href=\"http://' . $current_site->domain . $current_site->path . $members_directory_base . '/' . $members_directory['user'] . '/posts/\">' . __('Posts', 'members-directory') . '</a>';\r\n\t\t\t} else {\r\n\t\t\t\t$title = '<a href=\"http://' . $current_site->domain . $current_site->path . $members_directory_base . '/\">' . $post->post_title . '</a> &raquo; ' . __('Invalid User', 'members-directory');\r\n\t\t\t}\r\n\t\t} else if ( $members_directory['page_type'] == 'user_comments' ) {\r\n\t\t\t$user_count = $wpdb->get_var($wpdb->prepare(\"SELECT COUNT(*) FROM \" . $wpdb->base_prefix . \"users WHERE user_nicename = %s\".$members_directory_multisite_query, $members_directory['user']));\r\n\t\t\tif ( $user_count > 0 ) {\r\n\t\t\t\t$user_details = $wpdb->get_row($wpdb->prepare(\"SELECT * FROM \" . $wpdb->base_prefix . \"users WHERE user_nicename = %s\", $members_directory['user'] ));\r\n\t\t\t\t$title = '<a href=\"http://' . $current_site->domain . $current_site->path . $members_directory_base . '/\">' . $post->post_title . '</a> &raquo; <a href=\"http://' . $current_site->domain . $current_site->path . $members_directory_base . '/' . $members_directory['user'] . '/\">' . ucfirst($user_details->display_name) . '</a> &raquo; <a href=\"http://' . $current_site->domain . $current_site->path . $members_directory_base . '/' . $members_directory['user'] . '/comments/\">' . __('Comments', 'members-directory') . '</a>';\r\n\t\t\t} else {\r\n\t\t\t\t$title = '<a href=\"http://' . $current_site->domain . $current_site->path . $members_directory_base . '/\">' . $post->post_title . '</a> &raquo; ' . __('Invalid User', 'members-directory');\r\n\t\t\t}\r\n\t\t} else if ( $members_directory['page_type'] == 'user_friends' ) {\r\n\t\t\t$user_count = $wpdb->get_var($wpdb->prepare(\"SELECT COUNT(*) FROM \" . $wpdb->base_prefix . \"users WHERE user_nicename = %s\".$members_directory_multisite_query, $members_directory['user'] ));\r\n\t\t\tif ( $user_count > 0 ) {\r\n\t\t\t\t$user_details = $wpdb->get_row($wpdb->prepare(\"SELECT * FROM \" . $wpdb->base_prefix . \"users WHERE user_nicename = %s\", $members_directory['user'] ));\r\n\t\t\t\t$title = '<a href=\"http://' . $current_site->domain . $current_site->path . $members_directory_base . '/\">' . $post->post_title . '</a> &raquo; <a href=\"http://' . $current_site->domain . $current_site->path . $members_directory_base . '/' . $members_directory['user'] . '/\">' . ucfirst($user_details->display_name) . '</a> &raquo; <a href=\"http://' . $current_site->domain . $current_site->path . $members_directory_base . '/' . $members_directory['user'] . '/friends/\">' . __('Friends', 'members-directory') . '</a>';\r\n\t\t\t} else {\r\n\t\t\t\t$title = '<a href=\"http://' . $current_site->domain . $current_site->path . $members_directory_base . '/\">' . $post->post_title . '</a> &raquo; ' . __('Invalid User', 'members-directory');\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn $title;\r\n}", "private function render_title() {\n\t\t?>\n\t\t<# if ( data.label ) { #>\n\t\t<span class=\"customize-control-title\">\n\t\t\t\t<span>{{{ data.label }}}</span>\n\t\t\t\t<# if ( data.description ) { #>\n\t\t\t\t\t<i class=\"dashicons dashicons-editor-help\" style=\"vertical-align: text-bottom;\"\n\t\t\t\t\t\t\ttitle=\"{{{ data.description }}}\"></i>\n\t\t\t\t<# } #>\n\t\t</span>\n\t\t<# if( data.media_query === true && data.hide_responsive_switches === false ) { #>\n\t\t<?php $this->render_responsive_switches(); ?>\n\t\t<# } #>\n\t\t<# } #>\n\t\t<?php\n\t}", "public static function title()\n {\n if (is_home()) {\n if ($home = get_option('page_for_posts', true)) {\n return get_the_title($home);\n }\n return __('Latest Posts', 'sage');\n }\n if (is_archive()) {\n return get_the_archive_title();\n }\n if (is_search()) {\n return sprintf(__('Search Results for %s', 'sage'), get_search_query());\n }\n if (is_404()) {\n return __('Not Found', 'sage');\n }\n return get_the_title();\n }", "function filter_default_title( $title, $post )\n\t\t{\n\t\t\treturn $title;\n\t\t}", "public function get_title() {\n\t\treturn __( 'Blog', 'qazana' );\n\t}", "public function title( string $title = null ) {\n\t\treturn $this->post_field( 'post_title', $title );\n\t}", "public function title_callback()\n {\n printf(\n '<input type=\"text\" id=\"title\" name=\"ew_options_data[title]\" value=\"%s\" />',\n isset( $this->options['title'] ) ? esc_attr( $this->options['title']) : ''\n );\n }", "function wprss_change_title_text() {\n return __( 'Name this feed (e.g. WP Mayor)', WPRSS_TEXT_DOMAIN );\n }", "public static function post_title_sg_grid(){\n ?>\n <h3 class=\"post-title\"><a href=\"<?php the_permalink(); ?>\"><?php the_title(); ?></a></h3>\n <?php\n }", "private function prepareTitleTemplate() {\n $templatePostTitle = $this->getSetting('_post_template_title');\n\n // If there is no template, stop.\n if(!$templatePostTitle) return;\n\n $this->replaceShortCode($templatePostTitle, \"wcc-main-title\", $this->postData->getTitle() ? $this->postData->getTitle() : '');\n $this->replaceCustomShortCodes($templatePostTitle);\n\n // Clear remaining predefined short codes\n $this->clearRemainingPredefinedShortCodes($templatePostTitle);\n\n $this->postData->setTitle($templatePostTitle);\n }", "function get_my_title_tag() {\n\tglobal $post; \n\t\n\tif(is_front_page()) {//the front page\n\t\tbloginfo('description');\n\t}\n\telseif (is_page() || is_single()) {//page and postings\n\t\tthe_title(); //title of page posting\n\t}\n\t\n\telse {\n\t\tbloginfo('description'); \n\t}\n\tif ($post->post_parent) { //if there is a parent\n\t\techo ' | ';\n\t\techo get_the_title($post->post_parent); \n\t\t}\n\techo ' | '; //separator with space\n\tbloginfo('name'); //site name\n\techo ' | ';\n\techo 'Seattle, WA';\n\t}", "public function title($sanitize = true){\n if($sanitize){\n return Sanitize::html($this->getValue(\"title\"));\n }\n return $this->getValue(\"title\");\n }", "function VLUDIO_title(){\n\t\n\tglobal $page, $paged;\n\n\twp_title( '|', true, 'right' );\n\n\t// Add the blog name.\n\tbloginfo( 'name' );\n\n\t// Add the blog description for the home/front page.\n\t$site_description = get_bloginfo( 'description', 'display' );\n\tif ( $site_description && ( is_home() || is_front_page() ) )\n\t\techo \" | $site_description\";\n\n\t// Add a page number if necessary:\n\tif ( $paged >= 2 || $page >= 2 )\n\t\techo ' | ' . sprintf( __( 'Page %s', 'studioviq_theme' ), max( $paged, $page ) );\t\n}", "function _draft_or_post_title( $post = 0 ) {\n\t$title = get_the_title( $post );\n\tif ( empty( $title ) )\n\t\t$title = __( '(no title)' );\n\treturn esc_html( $title );\n}", "function mediadesk_edge_get_title() {\n\t\t$page_id = mediadesk_edge_get_page_id();\n\t\t$show_title_area_meta = mediadesk_edge_get_meta_field_intersect( 'show_title_area', $page_id ) == 'yes' ? true : false;\n\t\t$show_title_area = apply_filters( 'mediadesk_edge_filter_show_title_area', $show_title_area_meta );\n\t\t\n\t\tif ( $show_title_area ) {\n\t\t\t$type_meta = mediadesk_edge_get_meta_field_intersect( 'title_area_type', $page_id );\n\t\t\t$type = ! empty( $type_meta ) ? $type_meta : 'standard';\n\t\t\t$template_path = apply_filters( 'mediadesk_edge_filter_title_template_path', $template_path = 'types/' . $type . '/templates/' . $type . '-title' );\n\t\t\t$module = apply_filters( 'mediadesk_edge_filter_title_module', $module = 'title' );\n\t\t\t$layout = apply_filters( 'mediadesk_edge_filter_title_layout', $layout = '' );\n\t\t\t\n\t\t\t$title_tag_meta = mediadesk_edge_get_meta_field_intersect( 'title_area_title_tag', $page_id );\n\t\t\t$title_tag = ! empty( $title_tag_meta ) ? $title_tag_meta : 'h1';\n\t\t\t\n\t\t\t$subtitle_tag_meta = mediadesk_edge_get_meta_field_intersect( 'title_area_subtitle_tag', $page_id );\n\t\t\t$subtitle_tag = ! empty( $subtitle_tag_meta ) ? $subtitle_tag_meta : 'h6';\n\t\t\t\n\t\t\t$parameters = array(\n\t\t\t\t'holder_classes' => mediadesk_edge_get_title_holder_classes(),\n\t\t\t\t'holder_styles' => mediadesk_edge_get_title_holder_styles(),\n\t\t\t\t'holder_data' => mediadesk_edge_get_title_holder_data(),\n\t\t\t\t'wrapper_styles' => mediadesk_edge_get_title_wrapper_styles(),\n\t\t\t\t'title_image' => mediadesk_edge_get_title_background_image(),\n\t\t\t\t'title' => mediadesk_edge_get_title_text(),\n\t\t\t\t'title_tag' => $title_tag,\n\t\t\t\t'title_styles' => mediadesk_edge_get_title_styles(),\n\t\t\t\t'subtitle' => mediadesk_edge_subtitle_text(),\n\t\t\t\t'subtitle_tag' => $subtitle_tag,\n\t\t\t\t'subtitle_styles' => mediadesk_edge_get_subtitle_styles(),\n\t\t\t);\n\t\t\t$parameters = apply_filters( 'mediadesk_edge_filter_title_area_params', $parameters );\n\t\t\t\n\t\t\tmediadesk_edge_get_module_template_part( $template_path, $module, $layout, $parameters );\n\t\t}\n\t}", "function get_my_title_tag(){\nglobal $post;\n if(is_front_page()){\n bloginfo('description');\n \n }\nelse if(is_page()|| is_single()){\nthe_title();\n}\nelse{ \n bloginfo('description');\n}\nif($post->post_parent){\necho'|';\n echo get_the_title($post->post_parent);\n}\necho'|';\nbloginfo('name');\necho'|';\necho'Seattle,WA.';\n}", "function carawebs_thinking_archive_title(){\n\n\techo '<h1 class=\"headline project_headline\"><a href=\"'. get_permalink() . '\">' . get_the_title();\n\t//echo '<h1 class=\"headline project_headline\">' . get_the_title();\n\techo ' - ';\n\techo get_the_date('d/m/y') . '</h1>';\n\n}", "public function get_title() {\n\t\treturn __( 'Elementor Posts Widget Connector', 'alm-elementor' );\n\t}", "function get_post_title($post, $field, $post_id = 0, $is_search = 0)\n {\n }", "function get_post_title($post, $field, $post_id = 0, $is_search = 0)\n {\n }", "function get_post_title($post, $field, $post_id = 0, $is_search = 0)\n {\n }", "public static function get_title( $echo = true ) {\n\t\tif ( self::$title !== 'no' ) {\n\t\t\tif ( $echo )\n\t\t\t\techo self::$title;\n\t\t\treturn self::$title;\n\t\t}\n\n\t\t$object = get_queried_object();\n\n\t\tself::$title = '';\n\t\tif ( is_category() ) :\n\t\t\tself::$title = sprintf( __( '%s', 'apptheme' ), '<span>' . single_cat_title( '', false ) . '</span>' );\n\n\t\telseif ( is_tag() ) :\n\t\t\tself::$title = sprintf( __( '%s', 'apptheme' ), '<span>' . single_tag_title( '', false ) . '</span>' );\n\n\t\telseif ( isset( $object->taxonomy ) ) :\n\t\t\tself::$title = sprintf( __( '%s', 'apptheme' ), '<span>' . single_term_title( '', false ) . '</span>' );\n\n\t\telseif ( is_author() ) :\n\t\t\t/* Queue the first post, that way we know\n\t\t\t * what author we're dealing with (if that is the case).\n\t\t\t*/\n\t\t\tthe_post();\n\t\t\tself::$title = sprintf( __( '%s', 'apptheme' ), '<span class=\"vcard\"><a class=\"url fn n\" href=\"' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '\" title=\"' . esc_attr( get_the_author() ) . '\" rel=\"me\">' . get_the_author() . '</a></span>' );\n\t\t\t/* Since we called the_post() above, we need to\n\t\t\t * rewind the loop back to the beginning that way\n\t\t\t * we can run the loop properly, in full.\n\t\t\t */\n\t\t\trewind_posts();\n\n\t\telseif ( is_day() ) :\n\t\t\tself::$title = sprintf( __( '%s', 'apptheme' ), '<span>' . get_the_date() . '</span>' );\n\n\t\telseif ( is_month() ) :\n\t\t\tself::$title = sprintf( __( '%s', 'apptheme' ), '<span>' . get_the_date( 'F Y' ) . '</span>' );\n\n\t\telseif ( is_year() ) :\n\t\t\tself::$title = sprintf( __( '%s', 'apptheme' ), '<span>' . get_the_date( 'Y' ) . '</span>' );\n\n\t\telseif ( is_404() ) :\n\t\t\tself::$title = __( 'Missing', 'apptheme' );\n\n\t\telseif ( is_search() ) :\n\t\t\tself::$title = sprintf( __( 'Search: %s', 'apptheme' ), '<span>' . get_search_query() . '</span>' );\n\n\t\telseif ( is_singular() || is_page() ) :\n\t\t\tself::$title = single_post_title( '', false );\n\n\t\telse :\n\t\t\tself::$title = get_bloginfo( 'name' );\n\t\tendif;\n\n\t\tif ( $echo )\n\t\t\techo self::$title;\n\n\t\treturn self::$title;\n\t}", "public function show(Post $post)\n {\n return $post->title;\n }", "public function get_title() {\n\t\treturn __( 'Flip Banner', 'elementor-listeo' );\n\t}", "public static function showMainTitle($format = '<h1>[mainTitle]</h1>') {\n \tglobal $runPlugin;\n \teval(callHook('startShowMainTitle'));\n \tif(getCoreConf('hideTitles') == 0 && $runPlugin->getMainTitle() != ''){\n \t\t$data = $format;\n \t\t$data = str_replace('[mainTitle]', $runPlugin->getMainTitle(), $data);\n \t}\n \telse $data = '';\n \teval(callHook('endShowMainTitle'));\n \techo $data;\n }", "private function prepareTitle() {\n $postTitleSelectors = $this->getSetting('_post_title_selectors');\n $findAndReplacesForTitle = $this->prepareFindAndReplaces($this->getSetting('_post_find_replace_title'));\n\n if($title = $this->extractData($this->crawler, $postTitleSelectors, \"text\", false, true, true)) {\n $title = $this->findAndReplace($findAndReplacesForTitle, $title);\n $this->postData->setTitle($title);\n }\n }", "public function the_title( $title, $id ) {\n global $post;\n if ( ! $this->is_local( $post ) ) {\n $title = '<span class=\"title-span\">' . $title . '</span>' . $this->append_badge( $post->site_id );\n }\n\n return $title;\n }", "protected function post_type_title() {\n\t\t}", "function kvell_edge_get_title_text() {\n\t\t$page_id = kvell_edge_get_page_id();\n\t\t$title = get_the_title( $page_id );\n\t\t\n\t\tif ( ( is_home() && is_front_page() ) || is_singular( 'post' ) ) {\n\t\t\t$title = get_option( 'blogname' );\n\t\t} elseif ( is_tag() ) {\n\t\t\t$title = single_term_title( '', false ) . esc_html__( ' Tag', 'kvell' );\n\t\t} elseif ( is_date() ) {\n\t\t\t$title = get_the_time( 'F Y' );\n\t\t} elseif ( is_author() ) {\n\t\t\t$title = esc_html__( 'Author:', 'kvell' ) . \" \" . get_the_author();\n\t\t} elseif ( is_category() ) {\n\t\t\t$title = single_cat_title( '', false );\n\t\t} elseif ( is_archive() ) {\n\t\t\t$title = esc_html__( 'Archive', 'kvell' );\n\t\t} elseif ( is_search() ) {\n\t\t\t$title = esc_html__( 'Search results for: ', 'kvell' ) . get_search_query();\n\t\t} elseif ( is_404() ) {\n\t\t\t$title_404 = kvell_edge_options()->getOptionValue( '404_title' );\n\t\t\t$title = ! empty( $title_404 ) ? $title_404 : esc_html__( '404 - Page not found', 'kvell' );\n\t\t}\n\t\t\n\t\treturn apply_filters( 'kvell_edge_title_text', $title );\n\t}", "protected function renderTitle()\n {\n if ($this->title !== null) {\n return Html::tag('h1', $this->title, ['class' => 'uk-article-title']);\n } else {\n return null;\n }\n }", "function gridbox_blog_title() {\r\n\r\n\t\t// Get theme options from database.\r\n\t\t$theme_options = gridbox_theme_options();\r\n\r\n\t\t// Set blog title and descripton.\r\n\t\t$blog_title = $theme_options['blog_title'];\r\n\t\t$blog_description = $theme_options['blog_description'];\r\n\r\n\t\t// Display Blog Title.\r\n\t\tif ( '' !== $blog_title || '' !== $blog_description || is_customize_preview() ) : ?>\r\n\r\n\t\t\t<header class=\"page-header blog-header clearfix\">\r\n\r\n\t\t\t\t<?php // Display Blog Title.\r\n\t\t\t\tif ( '' !== $blog_title || is_customize_preview() ) : ?>\r\n\r\n\t\t\t\t\t<h2 class=\"archive-title blog-title\"><?php echo wp_kses_post( $blog_title ); ?></h2>\r\n\r\n\t\t\t\t<?php endif;\r\n\r\n\t\t\t\t// Display Blog Description.\r\n\t\t\t\tif ( '' !== $blog_description || is_customize_preview() ) : ?>\r\n\r\n\t\t\t\t\t<p class=\"blog-description\"><?php echo wp_kses_post( $blog_description ); ?></p>\r\n\r\n\t\t\t\t<?php endif; ?>\r\n\r\n\t\t\t</header>\r\n\r\n\t\t<?php endif;\r\n\t}", "function docothemes_titles(){\n\t\tif (function_exists('is_tag') && is_tag()) {\n\t\t single_tag_title('Все с тегом &quot;'); echo '&quot; - ';\n\t\t} elseif (is_archive()) {\n\t\t echo ' Тема '; wp_title(''); echo ' - ';\n\t\t} elseif (is_search()) {\n\t\t echo 'Search for &quot;'.wp_specialchars($s).'&quot; - ';\n\t\t} elseif (!(is_404()) && (is_single()) || (is_page())) {\n\t\t wp_title(''); \n\t\t} elseif (is_404()) {\n\t\t echo 'Страница не найдена - ';\n\t\t}\n\t\tif (is_home()) {\n\t\t bloginfo('name'); \n\t\t} \t\t\n\t}", "protected function print_pagetitle() {\n global $OUTPUT;\n $html = '';\n\n $html .= $OUTPUT->container_start();\n $html .= $OUTPUT->heading(format_string($this->title), 2, 'socialwiki_headingtitle');\n $html .= $OUTPUT->container_end();\n echo $html;\n }", "private function filterTitle($postID, $postTitle) {\n $guestsCompanyName = get_field('guests_company_name', $postID);\n $podcastTitle = get_field('podcast_title', $postID);\n\n if (get_post_type($postID) == 'podcast' && !empty($guestsCompanyName) && !empty($podcastTitle)) {\n return $guestsCompanyName . ' ' . __('on') . ' ' . $podcastTitle;\n }\n\n return $postTitle;\n }", "final public function _enter_title_here( $title, \\WP_Post $post ) {\n\t\t\tif ( get_post_type( $post ) == $this->post_type )\n\t\t\t\tif ( $custom_title = $this->post_type_title() )\n\t\t\t\t\treturn $custom_title;\n\t\t\treturn $title;\n\t\t}", "function widget_dev_social_icons_output_widget_title( $args, $instance ) {\r\n\r\n\t// if we have before widget content.\r\n\tif ( ! empty( $instance['title'] ) ) {\r\n\r\n\t\t// if we have before title content.\r\n\t\tif ( ! empty( $args['before_title'] ) ) {\r\n\r\n\t\t\t// output the before title content.\r\n\t\t\techo wp_kses_post( $args['before_title'] );\r\n\r\n\t\t}\r\n\r\n\t\t// output the before widget content.\r\n\t\techo esc_html( $instance['title'] );\r\n\r\n\t\t// if we have after title content.\r\n\t\tif ( ! empty( $args['after_title'] ) ) {\r\n\r\n\t\t\t// output the after title content.\r\n\t\t\techo wp_kses_post( $args['after_title'] );\r\n\r\n\t\t}\r\n\t}\r\n\r\n}", "private function Title() {\n\t\tif ($this->HtmlTitle !== null)\n\t\t\treturn \"title=\\\"$this->HtmlTitle\\\" \";\n\t}", "function get_my_title_tag(){\r\n \r\n global $post;//this is making it global! \r\n \r\n if (is_front_page() || is_home()){//front or blog page\r\n bloginfo('description');\r\n } \r\n elseif (is_page() || is_single()){//page or posting\r\n echo get_the_title($post->ID);\r\n } \r\n else{//404, etc.\r\n bloginfo('description');//tag line\r\n }\r\n if($post->post_parent){\r\n echo ' | ';\r\n echo get_the_title($post->post_parent); \r\n }\r\n \r\n echo ' | ';\r\n bloginfo('name');//site name\r\n echo ' | ';\r\n echo 'Seattle, WA';//location \r\n \r\n }", "public function title_callback()\n {\n printf(\n '<input type=\"text\" id=\"title\" name=\"my_option_name[title]\" value=\"%s\" />',\n isset( $this->options['title'] ) ? esc_attr( $this->options['title']) : ''\n );\n }", "public function title_callback()\n {\n printf(\n '<input type=\"text\" id=\"title\" name=\"my_option_name[title]\" value=\"%s\" />',\n isset( $this->options['title'] ) ? esc_attr( $this->options['title']) : ''\n );\n }", "function xtreme_widget_post_headline( $tag = 'h2', $link = TRUE, $echo = TRUE, $custom_posttitle = '' ) {\n\n\t\t$default_allowed_tags = array( 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' );\n\t\t// Hook for change the allowed tags\n\t\t$allowed_tags = apply_filters( 'xtreme_widget_allowed_tags_post_headline', $default_allowed_tags );\n\t\t$open_link = '';\n\t\t$close_link = '';\n\n\t\tif ( ! in_array( $tag, $allowed_tags ) )\n\t\t\t$tag = 'h2';\n\n\t\tif ( $link ) {\n\t\t\t$open_link = sprintf( '<a href=\"%s\" rel=\"bookmark\" title=\"' . esc_attr__( 'Permalink to %s', XF_TEXTDOMAIN ) . '\">', get_permalink(), the_title_attribute( 'echo=0' ) );\n\t\t\t$close_link = '</a>';\n\t\t}\n\n\t\tdo_action( 'xtreme_widget_before_post_headline' );\n\n\t\t$output = sprintf( '<%1$s class=\"posttitle\">%3$s%2$s%4$s</%1$s>', $tag, ( $custom_posttitle != '' ? $custom_posttitle : get_the_title() ), $open_link, $close_link );\n\t\tif ( $echo )\n\t\t\techo $output;\n\t\telse\n\t\t\treturn $output;\n\n\t\tdo_action( 'xtreme_widget_after_post_headline' );\n\t}", "function kvell_edge_get_title() {\n\t\t$page_id = kvell_edge_get_page_id();\n\t\t$show_title_area_meta = kvell_edge_get_meta_field_intersect( 'show_title_area', $page_id ) == 'yes' ? true : false;\n\t\t$show_title_area = apply_filters( 'kvell_edge_show_title_area', $show_title_area_meta );\n\t\t\n\t\tif ( $show_title_area ) {\n\t\t\t$type_meta = kvell_edge_get_meta_field_intersect( 'title_area_type', $page_id );\n\t\t\t$type = ! empty( $type_meta ) ? $type_meta : 'standard';\n\t\t\t$template_path = apply_filters( 'kvell_edge_title_template_path', $template_path = 'types/' . $type . '/templates/' . $type . '-title' );\n\t\t\t$module = apply_filters( 'kvell_edge_title_module', $module = 'title' );\n\t\t\t$layout = apply_filters( 'kvell_edge_title_layout', $layout = '' );\n\t\t\t\n\t\t\t$title_tag_meta = kvell_edge_get_meta_field_intersect( 'title_area_title_tag', $page_id );\n\t\t\t$title_tag = ! empty( $title_tag_meta ) ? $title_tag_meta : 'h1';\n\t\t\t\n\t\t\t$subtitle_tag_meta = kvell_edge_get_meta_field_intersect( 'title_area_subtitle_tag', $page_id );\n\t\t\t$subtitle_tag = ! empty( $subtitle_tag_meta ) ? $subtitle_tag_meta : 'h6';\n\t\t\t\n\t\t\t$parameters = array(\n\t\t\t\t'holder_classes' => kvell_edge_get_title_holder_classes(),\n\t\t\t\t'holder_styles' => kvell_edge_get_title_holder_styles(),\n\t\t\t\t'holder_data' => kvell_edge_get_title_holder_data(),\n\t\t\t\t'wrapper_styles' => kvell_edge_get_title_wrapper_styles(),\n\t\t\t\t'title_image' => kvell_edge_get_title_background_image(),\n\t\t\t\t'title' => kvell_edge_get_title_text(),\n\t\t\t\t'title_tag' => $title_tag,\n\t\t\t\t'title_styles' => kvell_edge_get_title_styles(),\n\t\t\t\t'subtitle' => kvell_edge_subtitle_text(),\n\t\t\t\t'subtitle_tag' => $subtitle_tag,\n\t\t\t\t'subtitle_styles' => kvell_edge_get_subtitle_styles(),\n\t\t\t);\n\t\t\t$parameters = apply_filters( 'kvell_edge_title_area_params', $parameters );\n\t\t\t\n\t\t\tkvell_edge_get_module_template_part( $template_path, $module, $layout, $parameters );\n\t\t}\n\t}", "function toughbubbles_postheader_posttitle() {\n global $id, $post, $authordata;\n\n \n if (is_single() || is_page()) {\n $posttitle = '<h1 class=\"entry-title\">' . get_the_title() . \"</h1>\\n\";\n $posttitle .= get_the_subheading($id,\"<h3 class='subtitle'>\",\"</h3>\",FALSE);\n } elseif (is_404()) { \n $posttitle = '<h1 class=\"entry-title\">' . __('Not Found', 'thematic') . \"</h1>\\n\";\n } else {\n $posttitle = '<h2 class=\"entry-title\"><a href=\"';\n $posttitle .= get_permalink();\n $posttitle .= '\" title=\"';\n $posttitle .= __('Permalink to ', 'thematic') . the_title_attribute('echo=0');\n $posttitle .= '\" rel=\"bookmark\">';\n $posttitle .= get_the_title(); \n $posttitle .= \"</a> </h2>\\n\";\n $posttitle .= get_the_subheading($id,\"<h3 class='subtitle'>\",\"</h3>\",FALSE);\n\t}\n\n\n\treturn $posttitle;\n}", "public function title()\n {\n if ($this->view->name() !== 'partials.page-header') {\n return get_the_title();\n }\n\n if (is_home()) {\n if ($home = get_option('page_for_posts', true)) {\n return get_the_title($home);\n }\n return __('Latest Bites', 'tb');\n }\n\n if (is_archive()) {\n return get_the_archive_title();\n }\n\n if (is_search()) {\n return sprintf(\n __('Search Results for %s', 'tb'),\n get_search_query()\n );\n }\n\n if (is_404()) {\n return __('Page not found', 'tb');\n }\n\n return get_the_title();\n }" ]
[ "0.72182053", "0.7154993", "0.71176565", "0.70930976", "0.70409596", "0.69600683", "0.68654716", "0.6801719", "0.6775993", "0.6756393", "0.6695168", "0.66945124", "0.6684915", "0.6654778", "0.66547406", "0.6611083", "0.6609375", "0.6604867", "0.657711", "0.656961", "0.65618205", "0.65558577", "0.65239674", "0.65077466", "0.6507657", "0.65057135", "0.64746004", "0.64603287", "0.6453189", "0.6450248", "0.64396757", "0.643709", "0.64349294", "0.6425794", "0.6424167", "0.64224845", "0.6408953", "0.6387453", "0.6385429", "0.63827115", "0.63619035", "0.6361066", "0.63510436", "0.6350458", "0.6339363", "0.6338629", "0.6334864", "0.6329832", "0.6318739", "0.6316034", "0.6301368", "0.6277355", "0.6257808", "0.6251808", "0.6250594", "0.6242258", "0.62372226", "0.6222712", "0.62180734", "0.62158275", "0.6205065", "0.62020767", "0.6199537", "0.6198735", "0.61943513", "0.6185529", "0.6180151", "0.61680275", "0.61661994", "0.61648923", "0.6162611", "0.61611027", "0.6155978", "0.6143008", "0.6142125", "0.6142125", "0.6142125", "0.61414766", "0.6138332", "0.6134425", "0.6132912", "0.6130489", "0.6117806", "0.61177975", "0.6115615", "0.61055046", "0.60926604", "0.6092432", "0.60853803", "0.6081793", "0.6077983", "0.6076755", "0.6074128", "0.6071189", "0.6067716", "0.6067716", "0.60559416", "0.60540015", "0.6049831", "0.60461265" ]
0.7638614
0
/ recherche de personnes
/ поиск людей
function searchPerson($ar){ $p = new XParam($ar, array()); $nom = trim($p->get('nom')); if (empty($nom)){ die(json_encode(array('ok'=>1, 'nb'=>0))); } $searchmode = $p->get('searchmode'); $person = array('NOM'=>trim($nom), 'PRENOM'=>($searchmode==1)?trim($p->get('prenom')):'', 'DOB'=>''); $ta = $this->modresort->lookForPerson($person); // alpha nom puis prenom usort($ta['liste'], function($a, $b){ $ka = $a['NOM'].$a['PRENOM']; $kb = $b['NOM'].$b['PRENOM']; return strcmp(strtoupper($ka), strtoupper($kb)); }); // tri par nom et prénom alpha die(json_encode($ta)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function searchPersons() {\r\n $this->checkRole();\r\n $this->checkMessages();\r\n \r\n echo new \\view\\Main(array(\r\n \"body\" => new \\view\\administrator\\PersonSearch(array(\r\n \"errorMessage\" => $this->errorMessage,\r\n \"resultMessage\" => $this->resultMessage\r\n )),\r\n \"title\" => \"Pretraga\"\r\n ));\r\n }", "function buscarPersonas($nombre){\r\n $campos=\"*\";\r\n $tabla=\"personas\"; \r\n if($nombre == \"\"){\r\n $nombre = \"\";\r\n }else{\r\n $nombre = \"%\".$nombre.\"%\";\r\n }\r\n $donde = \" WHERE (nombres LIKE '\".$nombre.\"' or apellidos LIKE '\".$nombre.\"') AND id_estatus=2\";\r\n $resultado = $this->invoco->Consultar($tabla,$campos,$donde,\"buscarPersonas\");//echo\"Resultado=\";print_r($resultado);die;\r\n if(count($resultado)>0){\r\n return $resultado;\r\n }\r\n \r\n }", "public function searchPersona($value){\n #Se guarda la consulta en una variable\n $sql = \"SELECT * FROM persona WHERE dui like ? OR nombres like ? ORDER BY nombres\";\n #se guardan los parametros (datos recogidos) en una variable,como un arreglo\n $params = array(\"$value%\",\"%$value%\");\n #Retorna los datos que devuelve el metodo getRows \n\t\treturn Database::getRows($sql, $params);\n }", "function rechercheNomSociete($rechercher)\n{\n\n\t$modif = false;\n\t\n\t$pdo = connexion();\n\t\n\tif($pdo != false)\n\t{\n\t\t\t\n\t\t$req = \"\tselect id,NomSociete,Adresse,CodePostal,Ville,idUtilisateurs,Telephone from fichesociete where NomSociete like '%$rechercher%'\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\";\n\t\t\n\t\t$res = $pdo -> query($req)->fetchall();\n\t\t\n\t\t\n\t\t\n\t}\n\n\treturn $res;\n}", "public function search();", "public function search();", "public function rechercheAction()\n {\n\n $this->_helper->layout()->setLayout('layoutpublic');\n $filiere = new Application_Model_EuFiliereMapper();\n $acteursmembremorale = new Application_Model_EuMembreMoraleMapper();\n $this->view->selectfiliere = $filiere->fetchAll2();\n if(isset($_POST['ok']) && $_POST['ok']==\"ok\"){\n $this->view->entries = $acteursmembremorale->fetchAllrecherche($_POST['id_filiere'], $_POST['quartier'], $_POST['ville']);\n }\n }", "function getSearchableData() {\n $persons = churchdb_getAllowedPersonData('', 'person_id p_id, person_id id, familienstand_no, geschlecht_no, hochzeitsdatum, nationalitaet_id,\n erstkontakt, zugehoerig, eintrittsdatum, austrittsdatum, taufdatum, plz, geburtsort, imageurl, cmsuserid, lastlogin');\n foreach ($persons as $arr) {\n unset($persons[$arr->id]->p_id);\n $persons[$arr->id]->auth = getAuthForPerson($arr->id);\n }\n return $persons;\n}", "public function search() {}", "function getPeople($params){\n\ttry{\n\t\t//print(count($params));\n\t\t$searchString = ( is_array($params) && isset($params[3]) && strlen($params[3]) )? trim(urldecode($params[3])) : null;\n\t\t$sql = \"\";\n\t\t$sql_select = 'COALESCE(d1.ID, d5.ID, d4.ID) \"ID\", COALESCE(d1.NAME, d5.NAME, d4.NAME) \"NAME\", COALESCE(d1.FIRST_NAME, d5.FIRST_NAME, d4.FIRST_NAME) \"FNAME\", COALESCE(d1.LAST_NAME, d5.LAST_NAME, d4.LAST_NAME) \"LNAME\", COALESCE(d1.EMAIL, d5.EMAIL, d4.EMAIL) \"EMAIL\", COALESCE(d1.JOB_TITLE, d4.EMERITII_TITLE) \"TITLE\", COALESCE(d1.DEPT_NAME, d4.ACADEMIC_UNIT_NAME) \"UNIT\", d1.OFFICE_ADDRESS, d1.OFFICE_CITY_ST_ZIP, d1.OFFICE_PHONE';\n\t\t$sql_from = 'WPVDIR1 d1 FULL OUTER JOIN WPVDIR5 d5 ON d1.ID = d5.ID FULL OUTER JOIN WPVDIR4 d4 ON d5.ID = d4.ID';\n\n\t\tif (count($userID = explode('uid::', $searchString)) > 1) { // assume search by ID\n\t\t\t\t$sql = \"SELECT $sql_select FROM $sql_from WHERE ( d1.ID = :mySearchString OR d5.ID = :mySearchString OR d4.ID = :mySearchString )\";\n\t\t\t\t$searchString = api_decrypt($userID[1]);\n\t\t} elseif (empty($searchString)) {\n\t\t\t\tthrow new Exception('', 400);die;\n\t\t} elseif (isValidEmail($searchString)) { // assume search by email\n\t\t\t\t$sql = \"SELECT $sql_select FROM $sql_from WHERE ( UPPER(d1.EMAIL) LIKE :mySearchString OR UPPER(d5.EMAIL) LIKE :mySearchString OR UPPER(d4.EMAIL) LIKE :mySearchString )\";\n\t\t\t\t$searchString = '%'.$searchString.'%';\n\t\t} elseif (strlen(trim($searchString)) < 3) { // assume exact match ** could be thrown away **\n\t\t\t\t$sql = \"SELECT $sql_select FROM $sql_from WHERE ( d1.SEARCH_LAST_NAME LIKE :mySearchString OR d5.SEARCH_LAST_NAME LIKE :mySearchString OR d4.SEARCH_LAST_NAME LIKE :mySearchString ) OR ( d1.SEARCH_FIRST_NAME LIKE :mySearchString OR d5.SEARCH_FIRST_NAME LIKE :mySearchString OR d4.SEARCH_FIRST_NAME LIKE :mySearchString )\";\n\t\t\t\t$searchString = strtoupper($searchString);\n\t\t} elseif (preg_match('/[A-Za-z]+/', $searchString)) { // assume search by name\n\t\t\t\t$sql = \"SELECT $sql_select FROM $sql_from WHERE ( d1.SEARCH_LAST_NAME LIKE :mySearchString OR d5.SEARCH_LAST_NAME LIKE :mySearchString OR d4.SEARCH_LAST_NAME LIKE :mySearchString ) OR ( d1.SEARCH_FIRST_NAME LIKE :mySearchString OR d5.SEARCH_FIRST_NAME LIKE :mySearchString OR d4.SEARCH_FIRST_NAME LIKE :mySearchString )\";\n\t\t\t\t$searchString = '%'.strtoupper($searchString).'%';\t\t\n\t\t} elseif (preg_match('/^[0-9]+/', $searchString)) { // assume phone number ** this view has formatted phone number 'xxx-xxx-xxxx' so this won't work **\n\t\t\t\t$sql = \"SELECT $sql_select FROM $sql_from WHERE ( d1.OFFICE_PHONE = :mySearchString )\";\n\t\t\t\t$searchString = '%'.$searchString.'%';\t\n\t\t} else {throw new Exception('', 400);die;}\n\t\n\t\t\t$conn = init_database(ENVIROMENT_DB_BANNER);\n\t\t\t$result = oci_parse($conn, $sql);\n\t\t\tif (!$result) {\n\t\t\t\tif(API_DEBUG){\n\t\t\t\t\t$e = oci_error();\n\t\t\t\t\tthrow new Exception(htmlentities($e['message'], ENT_QUOTES), '500');\n\t\t\t\t}else{\n\t\t\t\t\tthrow new Exception('', 500);\n\t\t\t\t\tdie;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\toci_bind_by_name($result, ':mySearchString', $searchString);\n\t\t\t\t\n\t\t\t$r = oci_execute($result);\n\t\t\tif (!$r) {\n\t\t\t\tif(API_DEBUG){\n\t\t\t\t\t$e = oci_error($result); // For oci_execute errors pass the statement handle\n\t\t\t\t\t$tmpMsg = htmlentities($e['message']).\"\\n<pre>\\n\".htmlentities($e['sqltext']).printf(\"\\n%\".($e['offset']+2).\"s\", \"^\").\"\\n</pre>\\n\";\n\t\t\t\t\tthrow new Exception($tmpMsg, '500');\n\t\t\t\t}else{\n\t\t\t\t\tthrow new Exception('', 500);\n\t\t\t\t\tdie;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//return array\n\t\t\t$people = array();\n\t\t\twhile (($person = oci_fetch_array($result, OCI_ASSOC+OCI_RETURN_NULLS+OCI_RETURN_LOBS))) {\n\t\t\t\t$person['ID'] = 'uid::'.api_encrypt($person['ID']);\n\t\t\t\t$people[] = $person;\n\t\t\t}\n\t\t\toci_free_statement($result);\n\t\t\toci_close($conn);\n\t\t\t\n\t\t\treturn $people;\n\t\t\n\t}catch(Exception $e){RestUtils::sendResponse($e->getCode(), $e->getMessage());}\n}", "public function recherchePersonne($email,$pass) {\n\t\t \t$req = $this->bdd->query(\"SELECT * FROM personne Where email='$email' and password='$pass'\") ;\n\t\t \treturn $req; \n\t\t}", "function _churchdb_getPersonByName($searchpattern, $withMyDepartment = false) {\n global $user;\n // check for view all permisson\n $auth = user_access(\"view alldata\", \"churchdb\");\n\n if ($withMyDepartment) {\n if ($auth) $auth = array_merge($auth, churchdb_getAllowedDeps());\n else $auth = churchdb_getAllowedDeps();\n }\n\n $data = null;\n if ($auth) {\n // get matching persons by departement and searchpattern\n $res = db_query(\n \"SELECT p.*, gp.imageurl\n FROM {cdb_person} p, {cdb_gemeindeperson} gp, {cdb_bereich_person} bp\n WHERE p.archiv_yn=0 AND bp.person_id=p.id AND gp.person_id=p.id AND bp.bereich_id IN (\". db_implode($auth). \")\n AND (UPPER(name) LIKE UPPER(CONCAT(:searchpattern, '%')) OR UPPER(vorname) LIKE UPPER(CONCAT(:searchpattern, '%'))\n OR ( CONCAT(UPPER(vorname),' ',UPPER(name)) LIKE UPPER(CONCAT(:searchpattern, '%')) )\n OR ( CONCAT(UPPER(spitzname),' ',UPPER(name)) LIKE UPPER(CONCAT(:searchpattern, '%')) )\n OR ( UPPER(email) LIKE UPPER(CONCAT(:searchpattern, '%')) )\n ) ORDER BY vorname, name\", array(':searchpattern' => $searchpattern));\n\n foreach ($res as $p) {\n $data[$p->id][\"id\"] = $p->id;\n if ($p->spitzname) {\n $data[$p->id][\"name\"] = \"$p->vorname ($p->spitzname) $p->name\";\n $data[$p->id][\"shortname\"] = \"$p->spitzname $p->name\";\n }\n else {\n $data[$p->id][\"name\"] = $p->vorname. \" \". $p->name;\n $data[$p->id][\"shortname\"] = \"$p->vorname $p->name\";\n }\n $data[$p->id][\"imageurl\"] = $p->imageurl;\n }\n }\n // get groups i have view permission for\n $g_ids = churchdb_getMyGroups($user->id, true, false);\n // get matching persons from this groups\n if (count($g_ids)) {\n $res = db_query(\"SELECT p.name, p.vorname, p.id, gp.imageurl\n\t\t FROM {cdb_gemeindeperson} gp, {cdb_person} p, {cdb_gemeindeperson_gruppe} gpg\n WHERE p.archiv_yn=0 AND gpg.gemeindeperson_id = gp.id AND gp.person_id = p.id\n AND gpg.gruppe_id IN (\". db_implode($g_ids). \")\n AND (UPPER(p.vorname) LIKE UPPER(CONCAT(:searchpattern, '%'))\n OR UPPER(p.vorname) LIKE UPPER(CONCAT(:searchpattern, '%')))\n ORDER BY p.vorname, p.name\", array(':searchpattern' => $searchpattern));\n foreach ($res as $p) if (!isset($data[$p->id])) { // if person not already inserted, add them\n $arr = array (); // TODO: why not $data[$p->id] here? If not important replace with code below\n $arr[\"id\"] = $p->id;\n $arr[\"name\"] = $p->vorname. \" \". $p->name;\n $arr[\"imageurl\"] = $p->imageurl;\n $data[] = $arr;\n// $data[$p->id][\"id\"] = $p->id;\n// $data[$p->id][\"name\"] = $p->vorname. \" \". $p->name;\n// $data[$p->id][\"imageurl\"] = $p->imageurl;\n }\n }\n $arrs[\"result\"] = \"ok\";\n $arrs[\"data\"] = $data;\n return $arrs;\n}", "public function buscar_persona($dato)\n\t{\n\t\t$parametros = array ();\n\t\t$where = \"\";\n\n\t\tif (is_numeric ($dato))\n\t\t{\n\t\t\t$where .= \" person.person LIKE :person \";\n\t\t\t$where .= \" OR LTRIM(LTRIM(perdoc.docno, '0')) LIKE LTRIM(LTRIM(:docno, '0')) \";\n\t\t\t$where .= \" OR LTRIM(LTRIM(personca.nrodechip, '0')) LIKE LTRIM(LTRIM(:tarjeta, '0')) \";\n\n\t\t\t$dato = str_replace ('.', '', $dato);\n\t\t\t$dato = str_replace (' ', '', $dato);\n\n\t\t\t$parametros[] = $dato;\n\t\t\t$parametros[] = $dato;\n\t\t\t$parametros[] = $dato;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$where .= \" UPPER(person.lname) LIKE UPPER(:lname) \";\n\t\t\t$where .= \" OR UPPER(person.fname) LIKE UPPER(:fname) \";\n\n\t\t\t$dato = str_replace (' ', \"%\", $dato);\n\n\t\t\t$dato = \"%\" . $dato . \"%\";\n\n\t\t\t$parametros[] = $dato;\n\t\t\t$parametros[] = $dato;\n\t\t}\n\t\t$where = ($where != \"\") ? \" AND \" . $where : \"\";\n\n\t\t$sql = \"SELECT person.person FROM appgral.person\n\t\t\t\t\tINNER JOIN appgral.perdoc ON perdoc.person = person.person\n\t\t\t\t\tFULL JOIN appgral.personca ON personca.person = person.person\n\t\t\t\tWHERE 1 = 1 \" . $where;\n\n\t\t$result = $this->db->query ($sql, true, $parametros);\n\n\t\tif ($datos = $this->db->fetch_all ($result))\n\t\t{\n\t\t\treturn $datos['PERSON'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "protected function search_komplain(){\n $cari = null;\n if(isset($_GET['cari'])){\n $cari = str_replace(\"'\",\"\",$_GET['cari']);\n }\n $query = $this->query(\"select * from komplain where username like '%$cari%' \");\n $row = mysqli_num_rows($query);\n if($row > 0){\n while($show = mysqli_fetch_assoc($query)){\n $build[] = $show;\n }\n }else{\n \n return false;\n }\n return $build;\n }", "public function recherche(){\n\n if( !empty($_POST['term'])){\n $produits = $this->getModel()->getResultSearch($_POST['term']);\n\n $nbResultat = ($produits) ? count($produits) : 0;\n\n $title = 'Recherche de '.$_POST['term'];\n $params = array(\n 'title' => $title,\n 'produits' => $produits,\n 'nbresult' => $nbResultat\n );\n $this->render('layout.html','recherche.html',$params);\n }\n else{\n $this->all();\n }\n\n }", "private function searchForPersonOneString($name, $teacher=false) {\n\t\t$ret = array();\n $name=trim($name);\n if( intval($name)>1930 && intval($name)<2100 ) {\n $where = \"graduationYear=\".intval($name);\n } elseif( strlen($name)>0 ) {\n\n $where =\"(\";\n $name = searchSpecialCharsAsRegex($name);\n $where .=\" person.lastname rlike '\".$name.\"' \";\n $where .=\" or person.firstname rlike '\".$name.\"' \";\n $where .=\" or person.birthname rlike '\".$name.\"' \";\n $where .=\" )\";\n\n\t\t} else {\n $where = \" class.id=\".getActClassId();\n }\n $sql =\"select person.*, class.schoolID as schoolID, class.graduationYear as schoolYear, class.eveningClass, class.name as schoolClass, school.Logo as schoolLogo from person\";\n $sql .=\" left join class on class.id=person.classID\";\n $sql .=\" left join school on school.id=class.schoolID\";\n $sql .=\" where (graduationYear != 0 or role not like '%guest%' )\";\t\t//No administator users\n if ($teacher) {\n $sql .=\" and schoolIdsAsTeacher is not null\";\n }\n $sql .=\" and ( person.changeForID is null and \".$where;\n $sql .=\" and person.id not in ( select changeForID from person where \".$this->dataBase->getSqlAnonymous(\"person.\").\" ) \";\n $sql.=\") or (\".$this->dataBase->getSqlAnonymous(\"person.\").\"and \".$where.\") limit 150\";\n\n $persons = $this->dataBase->queryArray($sql);\n foreach ($persons as $person) {\n if (isset($person[\"changeForID\"]))\n $person[\"id\"]=$person[\"changeForID\"];\n if (array_search($person[\"id\"],array_column($ret,\"id\"))===false) {\n if ($person[\"schoolID\"]==NULL && $person[\"schoolIdsAsTeacher\"]) {\n $person[\"schoolID\"] = substr($person[\"schoolIdsAsTeacher\"], 1, strpos($person[\"schoolIdsAsTeacher\"], \")\") - 1);\n $person[\"schoolLogo\"] = $this->getSchoolById($person[\"schoolID\"])[\"logo\"];\n }\n array_push($ret, $person);\n }\n }\n usort($ret, \"compareAlphabetical\");\n\t\treturn $ret;\n\t}", "protected function search_pengembalian(){\n $cari = null;\n if(isset($_GET['cari'])){\n $cari = str_replace(\"'\",\"\",$_GET['cari']);\n }\n $query = $this->query(\"select * from pengembalian where username like '%$cari%'\");\n $row = mysqli_num_rows($query);\n if($row > 0){\n while($show = mysqli_fetch_assoc($query)){\n $build[] = $show;\n }\n }else{\n return false;\n }\n return $build;\n }", "public function testCanGetPersonsByName()\n {\n $params = array(\n 'term' => 'testing'\n );\n $this->pipedrive->persons->getPersonsByName($params);\n }", "public function search() {\n\t\t\t$Recherches = $this->Components->load( 'WebrsaRecherchesOrientsstructs' );\n\t\t\t$Recherches->search();\n\t\t}", "protected function user_search(){\n $cari = null;\n if(isset($_GET['cari'])){\n $cari = str_replace(\"'\",\"\", $_GET['cari']);\n }\n $query = $this->query(\"select * from user where (username like '%$cari%' or phone_number like '%$cari%' or address like '%$cari%') and role_id = '2' \");\n $row = mysqli_num_rows($query);\n if($row > 0){\n while($show = mysqli_fetch_assoc($query)){\n $build[] = $show;\n }\n }else{\n echo \"<script>\n alert('data tidak ditemukan!');\n window.location='allmember.php';\n </script>\n \";\n return false;\n }\n return $build;\n }", "public static function recherche($requete,$category='None',$niveau='None'){\n\t\tif( $category =='None' and $niveau=='None'){\n\t\t\treturn App::getDb()->query2('\n\t\t\t\tSELECT *\n\t\t\t\tFROM membres\n\t\t\t\tWHERE nom LIKE \"%'.$requete.'%\" OR prenom LIKE \"%'.$requete.'%\"\n\t\t\t\t');\n\t\t}\n\t}", "function buscarPorApellido(){\n\t\tif(!is_blank($this->params['q'])){\n\t\t\t\n\t\t\t$cod_programa = upper($this->params['cod_programa']);\n if(is_user_login(COD_TIPO_VISITANTE_1))\n $cod_programa = '001';\n\t\t\telseif($cod_programa != NULL && $cod_programa != 'ALL'){\n\t\t\t\tif($cod_programa == 'CURRENT'){\n\t\t\t\t\t$this->includeModel('TPrograma');\n\t\t\t\t\t$cod_programa = TPrograma::actual();\n\t\t\t\t}\n\t\t\t}\n $this->params['cod_programa'] = $cod_programa;\n\t\t\t$personas = TPersona::buscarPorApellido($this->params['q'], $this->params); \n\t\t\t$this->vista->set('personas', $personas);\n\t\t\t$this->vista->display();\n\t\t}\n\t}", "function consultaPersonas($cedula){\r\n $campos=\"t1.id, t1.nombres, t1.apellidos, t1.cedula, t1.fnacimiento, t1.genero, t1.telefono, t1.correo, t1.direccion, t1.estado_civil, t1.hijos, t1.grupo_sangre, t1.nivel_academico, t1.id_estatus, t1.evaluado, t1.fecha_ingreso, t2.id as id_cargo, t2.nombre as cargo\";\r\n $tabla=\"personas t1 LEFT JOIN cargos t2 ON t1.id_cargo = t2.id\";\r\n $donde = \"WHERE t1.cedula=?\";\r\n $resultado = $this->invoco->ConsultaPreparada($tabla,$campos,$donde,'i',array($cedula),\"consultaPersonas\");//echo\"Resultado=\";print_r($resultado);die;\r\n if(count($resultado)>0){\r\n return $resultado;\r\n }\r\n \r\n }", "function filtroDocente($params){\n $this->db->join('persona p', 'd.idPersona=p.idPersona','left');\n $this->db->join('escuelaProfesional ep','d.idEscuelaProfesional=ep.idEscuelaProfesional','left');\n return $this->db->get_where('docente d',$params)->result_array();\n }", "function rechercheNom($nom){\n global $connexion;\n $result = $connexion -> prepare( \"SELECT * FROM Corbeille where Nom = :n\");\n $result -> bindParam(':n', $nom);\n $result -> execute();\n $data = $result->fetch(PDO::FETCH_ASSOC);\n if($data){\n return $data;\n }\n else{ \n $result = $connexion -> prepare(\"SELECT * FROM Puits where Nom_puits = :nom\");\n $result -> bindParam(':nom', $nom);\n $result -> execute();\n $data = $result->fetch(PDO::FETCH_ASSOC);\n if($data){\n return $data;\n }\n }\n return NULL;\n }", "public static function search(){\n \n }", "public function searchRepresentatives($search)\n {\n\n $field = trim($search);\n if ($field != \"\") {\n\n $representantes = Persona::whereHas('representantes', function ($query) use ($field) {\n $query->where('num_doc', 'LIKE', '%' . $field . '%')\n ->orWhere('nombres', 'LIKE', '%' . $field . '%')\n ->orWhere('apellidos', 'LIKE', '%' . $field . '%');\n })\n ->orderBy('created_at', 'DESC')->get();\n\n }\n return view('online.preinscripcions.listSearch', compact('representantes'));\n\n }", "public function search(){\n $modelCass = $this->models[2];\n $field = $this->data['field'];\n $what = $this->data['recherche'];\n if(!empty($what) && !empty($field)){\n if($this->$modelCass->isDateUsFr($what)){\n $what = $this->$modelCass->dateUs($what);\n }\n $d['searchResults'] = $this->$modelCass->search(array('field' => $field,\n 'what' => $what));\n if($d['searchResults']){\n foreach ($d['searchResults'] as $key => $value){\n $d['searchResults'][$key]['date_sortie'] = $this->$modelCass->dateFr($value['date_sortie']);\n }\n }\n $this->set($d);\n }\n }", "public function searchForPerson($name) {\n $rteacherRegexp = '(tanár|tanár\\\\súr|tanárnő|Tanár|Tanár\\\\súr|Tanárnő|tanar|tanar\\\\sur|tanarno|Tanar|Tanar\\\\sur|Tanarno)';\n $teacher =(preg_match($rteacherRegexp, $name) === 1) ;\n $name = preg_replace($rteacherRegexp,\"\",$name);\n $ret = array();\n\t\t$nameItems=explode(' ', trim($name));\n\t\tforeach ($nameItems as $nameWord) {\n\t\t\t\t$ret=$this->arrayMergeByFieldId($ret,$this->searchForPersonOneString($nameWord,$teacher));\n\t\t}\n\t\tusort($ret, \"compareAlphabetical\");\n\t\treturn $ret;\n\t}", "function pmb_recuperer_champs_recherche($langue=0) {\n\t$tresultat = Array();\n\t\n\ttry {\n\t\t$ws = pmb_webservice();\n\t\t$result = $ws->pmbesSearch_getAdvancedSearchFields('opac|search_fields',$langue,true);\n\t\t$cpt=0;\n\t\tif (is_array($result)) {\n\t\t\tforeach ($result as &$res) {\n\t\t\t\t$tresultat[$cpt] = Array();\n\t\t\t\t$tresultat[$cpt]['id'] = $res->id;\n\t\t\t\t$tresultat[$cpt]['label'] = $res->label;\n\t\t\t\t$tresultat[$cpt]['type'] = $res->type;\n\t\t\t\t$tresultat[$cpt]['operators'] = $res->operators;\n\t\t\t\t$tresultat[$cpt]['values'] = Array();\n\t\t\t\t$cpt2=0;\n\t\t\t\tif (is_array($res->values)) {\n\t\t\t\t\tforeach ($res->values as &$value) {\n\t\t\t\t\t\t$tresultat[$cpt]['values'][$cpt2]['value_id'] = $value->value_id;\n\t\t\t\t\t\t$tresultat[$cpt]['values'][$cpt2]['value_caption'] = $value->value_caption;\n\t\t\t\t\t\t$cpt2++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$cpt++;\n\t\t\t}\n\t\t}\n\t} catch (Exception $e) {\n\t\t echo 'Exception reçue (9) : ', $e->getMessage(), \"\\n\";\n\t} \n\treturn $tresultat;\n}", "function searchDisplay($term) {\n $p = new PDOAgent(\"mysql\",DBUSER,DBPASSWD,\"localhost\", DBNAME);\n $p->connect();\n $bindParams = [];\n $results = $p->query(\"SELECT * FROM Owners;\",$bindParams);\n\n $p->disconnect();\n\n $term = strtolower($term);\n $searchList = [];\n\n foreach($results as $result) {\n if(strpos(strtolower($result->Name), $term) !== false){\n $searchList[] = $result;\n }elseif(strpos(strtolower($result->City), $term) !== false){\n $searchList[] = $result;\n }elseif(strpos(strtolower($result->Gender), $term) !== false){\n $searchList[] = $result;\n }elseif(strpos(strtolower($result->FamilySize), $term) !== false){\n $searchList[] = $result;\n }elseif(strpos(strtolower($result->OwnerID), $term) !== false){\n $searchList[] = $result;\n }\n }\n return $searchList;\n }", "function selectDixPersonne()\n {\n $requete_prepare = $this->connexion->prepare(\n \"SELECT * from Personne LIMIT 10\"\n );\n $requete_prepare->execute();\n // Retourne un tableau contenant tous les objets\n $liste_personne = $requete_prepare->fetchAll(PDO::FETCH_OBJ);\n return $liste_personne;\n }", "function searchProduit($recherche,$ask){\n $conditions = array();\n array_push($conditions, array('nameChamps'=> 'marque','type'=>'=','name'=>'recherche' ,'value'=>$recherche ,'operator'=>'OR'));\n array_push($conditions, array('nameChamps'=> 'nom','type'=>'like','name'=>'recherche2','value'=>$recherche.'%','operator'=>'OR' ));\n array_push($conditions, array('nameChamps'=>'etatDuProduit','type'=>'!=','name'=>'etatDuProduit','value'=>'2'));\n\n if(isset($_GET['order'])){\n $order =array();\n array_push($order, array('nameChamps'=>'prix','sens'=>$_GET['order']));\n $req = new myQueryClass('produit',$conditions,$order);\n }else{\n $req = new myQueryClass('produit',$conditions);\n }\n $r = $req->myQuerySelect();\n\treturn $r;\n}", "function search_author(){\n\t\t\t $names = explode(' ', $_GET['searchfor']);\n\t\t\t $query = \"SELECT * FROM books NATURAL JOIN authors\n\t\t\t \t\t\t\t\t WHERE Fname LIKE '%\" . $names[0] . \"%' and Lname LIKE '%\" . $names[1] . \"%'\";\n\t\t\t if($_GET['category'] != 'all')\n\t\t\t\t\t$query .= \" AND category LIKE '%\" . $_GET['category'] . \"%'\";\n\t\t\t return $query;\n\t\t }", "function rechercheTelephone($rechercher)\n{\n\n\t$modif = false;\n\t\n\t$pdo = connexion();\n\t\n\tif($pdo != false)\n\t{\n\t\n\n\t\t\n\t\t$req = \"\tSELECT id, NomSociete, Adresse, Telephone, TelMobileI, NomI, PrenomI,IdInterlocuteur\n\t\t\t\t\tFROM interlocuteur\n\t\t\t\t\tINNER JOIN fichesociete ON interlocuteur.IdFicheSociete = fichesociete.id\n\t\t\t\t\t\n\t\t\t\t\tWHERE Telephone LIKE '%$rechercher%'\n\t\t\t\t\tOR TelMobileI LIKE '%$rechercher%'\n\t\t\t\t\torder by NomSociete\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\";\n\t\n\t\t$res = $pdo -> query($req)->fetchall();\n\t\t\n\t}\n\n\treturn $res;\n}", "static public function rechercherIdOrNameRetraite($search)\n {\n $search = explode(' ', $search);\n $search = $search[0];\n\n $pdo = DB::getInstance()->getPDO();\n\n $req =\n '\n SELECT * from Militaires\n WHERE matricule IN(\n SELECT matricule\n FROM Actifs\n WHERE eligible_retraite = 1\n ) AND nom like concat(\"%\",:search,\"%\") \n OR matricule IN(\n SELECT matricule\n FROM Actifs\n WHERE eligible_retraite = 1\n ) AND matricule = :search\n ';\n $stmt = $pdo->prepare($req);\n $data = ['search'=>$search];\n $stmt->execute($data);\n\n $result = $stmt->fetchAll();\n $stmt->closeCursor();\n\n $dossier = array();\n foreach ($result as $attributs) {\n $dossier[] = new Dossier($attributs);\n }\n return $dossier;\n }", "private function simpleSearch(&$persons, &$companies)\n {\n\t\t$text = $this->request->getQuery('text');\n\n\t\t// Check if the submitted form input contains word characters. If not, return without modifying the results.\n if(!isset($text) || preg_match('/\\w/', $text) === 0) return;\n\n // UNCOMMENT these lines instead of the above ones if you want to return zero results for an empty query text:\n // if(!isset($text) || preg_match('/\\w/', $text) === 0){\n // $persons->where(['Persons.id' => 0]);\n // $companies->where(['Companies.id' => 0]);\n // }\n\n\t\t// Split the text around any number of commas, points and whitespaces\n\t\t$tokens = preg_split('/[,.\\s]+/', $text);\n\n\t\t// For each token\n\t\t// Search for persons/companies that contain the current token in either one of the specified data base fields\n\t\tforeach($tokens as $token){\n\n\t\t\t$persons\n\t\t\t\t->leftJoinWith('Addresses')\n\t\t\t\t->leftJoinWith('Addresses.Streets')\n\t\t\t\t->where([\n\t\t\t\t\t'OR' => [\n\t\t\t\t\t\t['Persons.surname LIKE' => '%'.$token.'%'],\n\t\t\t\t\t\t['Persons.first_name LIKE' => '%'.$token.'%'],\n\t\t\t\t\t\t['Persons.title LIKE' => '%'.$token.'%'],\n\t\t\t\t\t\t['Persons.profession_verbatim LIKE' => '%'.$token.'%'],\n\t\t\t\t\t\t['Persons.specification_verbatim LIKE' => '%'.$token.'%'],\n\t\t\t\t\t\t['Persons.name_predicate LIKE' => '%'.$token.'%'],\n\t\t\t\t\t\t['Streets.name_old_clean LIKE' => '%'.$token.'%'],\n\t\t\t\t\t\t['Streets.name_new LIKE' => '%'.$token.'%'],\n\t\t\t\t\t\t['Addresses.address_specification_verbatim LIKE' => '%'.$token.'%']\n\t\t\t\t\t]\n\t\t\t\t])\n\t\t\t\t->group('Persons.id');\n\n\t\t\t$companies\n\t\t\t\t->leftJoinWith('Addresses')\n\t\t\t\t->leftJoinWith('Addresses.Streets')\n\t\t\t\t->where([\n\t\t\t\t\t'OR' => [\n\t\t\t\t\t\t['Companies.name LIKE' => '%'.$token.'%'],\n\t\t\t\t\t\t['Companies.profession_verbatim LIKE' => '%'.$token.'%'],\n\t\t\t\t\t\t['Companies.specification_verbatim LIKE' => '%'.$token.'%'],\n\t\t\t\t\t\t['Streets.name_old_clean LIKE' => '%'.$token.'%'],\n\t\t\t\t\t\t['Streets.name_new LIKE' => '%'.$token.'%'],\n\t\t\t\t\t\t['Addresses.address_specification_verbatim LIKE' => '%'.$token.'%']\n\t\t\t\t\t]\n\t\t\t\t])\n ->group('Companies.id');\n\t\t}\n }", "function rechercheAnciens($T, $cnx)\n{\n\t$noms = explode(\" \", trim($T[\"nom\"])) ;\n\tif ( ($T[\"civilite\"] != 'Monsieur') AND (trim($T[\"nom_jf\"])!=\"\") ) {\n\t\t$noms_jf = explode(\" \", trim($T[\"nom_jf\"])) ;\n\t}\n\telse {\n\t\t$noms_jf = array() ;\n\t}\n\n\t$req = \"SELECT id_ancien FROM anciens WHERE \" ;\n\tif ( $T[\"email1\"] != \"\" ) {\n\t\t$req .= \" courriel LIKE '%\".mysqli_real_escape_string($cnx, trim($T[\"email1\"])).\"%' OR ( \" ;\n\t}\n\t$req .= \" naissance='\".$T[\"naissance\"].\"' AND\n\t\t\t(FALSE \" ;\n\tforeach($noms as $nom) {\n\t\t$req .= \" OR nom LIKE '%\".mysqli_real_escape_string($cnx, trim($nom)).\"%' \" ;\n\t}\n\treset($noms) ;\n\tif ( $T[\"civilite\"] != 'Monsieur' ) {\n\t\tforeach($noms as $nom) {\n\t\t\t$req .= \" OR nom_jf LIKE '%\".mysqli_real_escape_string($cnx, trim($nom)).\"%' \";\n\t\t}\n\t\treset($noms) ;\n\t\tforeach($noms_jf as $nom_jf) {\n\t\t\t$req .= \" OR nom LIKE '%\".mysqli_real_escape_string($cnx, trim($nom_jf)).\"%' \";\n\t\t}\n\t\treset($noms_jf) ;\n\t\tforeach($noms_jf as $nom_jf) {\n\t\t\t$req .= \" OR nom_jf LIKE '%\".mysqli_real_escape_string($cnx, trim($nom_jf)).\"%'\";\n\t\t}\n\t\treset($noms_jf) ;\n\t}\n\tif ( $T[\"email1\"] != \"\" ) {\n\t\t$req .= \" )\" ;\n\t}\n\t$req .= \") ORDER BY id_ancien\" ; \n//\techo \"<p>$req</p>\" ;\n\t$res = mysqli_query($cnx, $req) ;\n\n\t$ids_ancien = array() ;\n\twhile ( $enr = mysqli_fetch_assoc($res) ) {\n\t\t$ids_ancien[] = $enr[\"id_ancien\"] ;\n\t}\n\treturn $ids_ancien ;\n}", "function search_all_authors($bdd)\n {\n $reponse = $bdd->prepare('select a.firstname, a.username, a.id, a.email, a.apropos, a.avatar\n from authors as a ');\n $reponse->execute();\n $list_authors = array();\n while ($author = $reponse->fetch()) {\n \n $list_authors[] = $author;\n }\n $reponse->closeCursor();\n return $list_authors;\n \n }", "public function getAllPersonnes() {\n $listePersonnes = array();\n\n $requete = $this->db->prepare('SELECT * FROM personne ORDER BY 1');\n $requete->execute();\n\n while ($personnes = $requete->fetch(PDO::FETCH_OBJ))\n $listePersonnes[] = new Personne($personnes);\n\n $requete->closeCursor();\n return $listePersonnes;\n }", "public function actionSearch($name)\n {\n \t$name = isset($name) ? $name : '';\n \t$list = array();\n \t$name = trim($name);\n \tif($name != '')\n \t{\n \t\t$query = UsersBase::find()->select(['id', 'fname', 'lname', 'status'])\n \t\t->where(['status' => 1, 'usertype' => UsersBase::UserTypeCandidate])\n \t\t->andFilterWhere(['or', ['like' , 'lname', $name],['like' , 'fname', $name]])\n \t\t->orderBy(['lname' => SORT_ASC, 'fname' => SORT_ASC]);\n \t\t$list = $query->all();\n \t\t//echo $query->createCommand()->sql; exit;\n \t}\n \n \tif(count($list) == 0)\n \t{\n \t\techo Yii::t('app', 'keine Ergebnisse');\n \t\texit;\n \t}\n \n \tforeach ($list as $item)\n \t{\n \t\techo '<li data-id=\"' . $item->id . '\">' . $item->fullname() . '</li>';\n \t}\n \texit;\n }", "function search() {\n $area = $this->input->post('select_area');\n $tipo = $this->input->post('select_tipo');\n\n $this->presupuesto_library->printListado($area, $tipo);\n }", "public function selectPersonne() {\n\t\t \t$req = $this->bdd->query(\"SELECT * FROM personne\") ;\n\t\t \treturn $req; \n\t\t}", "function selectAllPersonne()\n {\n $requete_prepare = $this->connexion->prepare(\n \"SELECT * from Personne\"\n );\n $requete_prepare->execute();\n // Retourne un tableau contenant tous les objets\n $liste_personne = $requete_prepare->fetchAll(PDO::FETCH_OBJ);\n return $liste_personne;\n }", "function search()\n\t{\n\t\t$search=$this->input->post('search');\n\t\t$data_rows=get_people_manage_table_data_rows($this->Customer->search($search,$this->config->item('number_of_items_per_page') ? (int)$this->config->item('number_of_items_per_page') : 20),$this);\n\t\techo $data_rows;\n\t}", "public function search()\n\t{\n\n\t}", "public function search()\n\t{\n\t}", "public function search()\n\t{\n\t}", "function getListaEstudios($id,$filter,$page,$model){\r\n $where=\" WHERE id = :id AND titulo LIKE :titulo\";\r\n $param=array(\r\n 'id'=>$id,\r\n 'titulo' => '%'.$filter.'%',\r\n );\r\n $columns=\"cod_da,nivel_educativo,titulo,institucion,estado,grado,soporte\";\r\n //return $this->db->select1($columns,\"persona\",$where,$array);\r\n //Users es la función que esta en el js getUsers\r\n return $model->paginador($columns,\"persona_datos_academicos\",\"ListaEstudios\",$page,$where,$param);\r\n \r\n }", "public function search()\r\n {\r\n }", "public function find()\n {\n $match = Input::get('find');\n if($match) {\n $articles = Article::select('id', 'title', 'intro_text')\n ->orderBy('created_at', 'desc')\n ->where('intro_text', 'like', '%'.$match.'%')\n ->orwhere('full_text', 'like', '%'.$match.'%')\n ->get(); \n Session::flash('flash_notice', 'Résultats pour la recherche du terme '.$match);\n return $this->gen_accueil($articles);\n } \n return Redirect::to('/')->with('flash_error', 'Il faudrait entrer un terme pour la recherche !');\n }", "public function searchVille($ville){\n }", "public function searchPrint()\n {\n // should not be searched.\n $lookup_type = 'minatpekerjaan';\n $criteria=new CDbCriteria;\n\n\t\t\tif(!empty($this->lookup_id)){\n\t\t\t\t$criteria->addCondition(\"lookup_id = \".$this->lookup_id);\t\t\t\n\t\t\t}\n $criteria->compare('LOWER(lookup_name)',strtolower($this->lookup_name),true);\n $criteria->compare('LOWER(lookup_value)',strtolower($this->lookup_value),true);\n $criteria->compare('LOWER(lookup_type)',strtolower($lookup_type),true);\n $criteria->compare('lookup_urutan',$this->lookup_urutan);\n $criteria->compare('LOWER(lookup_kode)',strtolower($this->lookup_kode),true);\n $criteria->compare('lookup_aktif',isset($this->lookup_aktif)?$this->lookup_aktif:true);\n $criteria->order = 'lookup_type, lookup_urutan';\n $criteria->limit = -1;\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n 'pagination'=>false,\n ));\n }", "public function user_search($query) \n {\n \n }", "public function search()\r\n\t{\r\n\r\n }", "function find_users() {\n\t\tmain()->NO_GRAPHICS = true;\n\t\tif (!$_POST || !main()->USER_ID || IS_ADMIN != 1) {\n\t\t\techo '';\n\t\t}\n\t\t// Continue execution\n\t\t$Q = db()->query(\n\t\t\t\"SELECT id, nick \n\t\t\tFROM \".db('user').\" \n\t\t\tWHERE \"._es($_POST[\"search_field\"]).\" LIKE '\"._es($_POST[\"param\"]).\"%' \n\t\t\tLIMIT \".intval($this->USER_RESULTS_LIMIT));\n\t\twhile($A = db()->fetch_assoc($Q)) {\n\t\t\t$finded_users[$A['id']] = $A['nick'];\n\t\t}\n\t\techo $finded_users ? json_encode($finded_users) : '*';\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('personnummer',$this->personnummer,true);\n\t\t$criteria->compare('skadedatum',$this->skadedatum,true);\n\t\t$criteria->compare('socialt',$this->socialt,true);\n\t\t$criteria->compare('alder_skadan',$this->alder_skadan);\n\t\t$criteria->compare('forsta_und_dat',$this->forsta_und_dat,true);\n\t\t$criteria->compare('yrke_fore_sk',$this->yrke_fore_sk,true);\n\t\t$criteria->compare('klass_yrke',$this->klass_yrke,true);\n\t\t$criteria->compare('klass_hoger',$this->klass_hoger,true);\n\t\t$criteria->compare('klass_vanster',$this->klass_vanster,true);\n\t\t$criteria->compare('traumatyp',$this->traumatyp,true);\n\t\t$criteria->compare('skadeniva',$this->skadeniva,true);\n\t\t$criteria->compare('muskler_hoger',$this->muskler_hoger,true);\n\t\t$criteria->compare('muskler_vanster',$this->muskler_vanster,true);\n\t\t$criteria->compare('dom_hand_pre',$this->dom_hand_pre,true);\n\t\t$criteria->compare('dom_hand_post',$this->dom_hand_post,true);\n\t\t$criteria->compare('avslutad',$this->avslutad,true);\n\t\t$criteria->compare('avslutad_dat',$this->avslutad_dat,true);\n\t\t$criteria->compare('undersoknings_pl',$this->undersoknings_pl,true);\n\t\t$criteria->compare('barn',$this->barn,true);\n\t\t$criteria->compare('amdat',$this->amdat,true);\n\t\t$criteria->compare('rollstol',$this->rollstol,true);\n\t\t$criteria->compare('annan_sjd',$this->annan_sjd,true);\n\t\t$criteria->compare('planerat_op',$this->planerat_op,true);\n\t\t$criteria->compare('planerat_ab',$this->planerat_ab,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function Search($param = null) {\n\n global $smarty;\n\n if (isset($_POST[\"query\"])) {\n\n $query = (sql::result(\"SELECT * FROM `user` WHERE `userName` LIKE '%\" . $_POST['query'] . \"%'\"));\n } else {\n $query = sql::result(\"SELECT * FROM `user` ORDER BY `userID`\");\n }\n\n $result = $query['result'];\n// print_rr($result);\n if (count($result) > 0) {\n\n// print_rr($query);\n assign('user', $result);\n// print_rr($result);\n// assign('user', $user->read_multi_filter([]));\n echo $smarty->fetch('style/lomixa/routes/user-form-edit.tpl');\n } else {\n\n echo 'USer Not Found';\n }\n }", "public function cautaPersoana(){\n\t\t\tif(isset($_POST['firstname']))\n\t\t\t\t$prenume = $_POST['firstname'];\n\t\t\telse\n\t\t\t\t$prenume = null;\n\n\t\t\tif(isset($_POST['lastname']))\n\t\t\t\t$nume = $_POST['lastname'];\n\t\t\telse\n\t\t\t\t$nume = null;\n\n\t\t\t$url = \"https://www.google.org/personfinder/test/api/search?key=43HxMWGBijFaYEr5&q=\" . $nume . \"+\" . $prenume;\n\t\t\t//echo $url;\n\t\t\t$xml = simplexml_load_file($url, null, null, 'pfif', true);\n\t\t\treturn $xml;\n\t\t}", "public function search_for($query);", "public function search()\n\t{\n\t\tif($this->session->userdata('uid')==1){\n\t\t\t$data['authorized']=true;\n\t\t}else{\n\t\t\t$data['authorized']=false;\n\t\t}\n\t\tif(isset($_GET['find'])){\n\t\t\t$data['query']=$_GET['find'];\n\t\t}else{\n\t\t\t$data['query']=\"\";\n\t\t}\n\n\t\t$this->load->view('result',$data);\n\t\t$this->load->view('common/footer');\n\t}", "public function searchPrint()\n {\n // should not be searched.\n\n $criteria=new CDbCriteria;\n\t\t$criteria->compare('sumberdana_id',$this->sumberdana_id);\n\t\t$criteria->compare('LOWER(sumberdana_nama)',strtolower($this->sumberdana_nama),true);\n\t\t$criteria->compare('LOWER(sumberdana_namalainnya)',strtolower($this->sumberdana_namalainnya),true);\n\t\t$criteria->compare('sumberdana_aktif',isset($this->sumberdana_aktif)?$this->sumberdana_aktif:true);\n $criteria->order='sumberdana_nama';\n $criteria->limit=-1; \n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n 'pagination'=>false,\n ));\n }", "public function searchRegistros()\n\t{\n $visitante = $this->input->post('visitante').\"<br>\";\n $empleado = $this->input->post('empleado').\"<br>\";\n $empresa = $this->input->post('empresa').\"<br>\";\n $razon = $this->input->post('razon').\"<br>\";\n $genero1 = $this->input->post('genero_persona').\"<br>\";\n $genero2 = $this->input->post('genero_act').\"<br>\";\n \t}", "public function getPeople($text,$peopleId,$lastName,$name,$advanced,$page,$typePeople){\n\t\t$cadena = \"(\";\n\t\t$this->db->distinct('tblPeople.pkPeopleId');\n $this->db->select('tblPeople.pkPeopleId as ID, tblPeople.Name, tblPeople.SecondName, tblPeople.LName, tblPeople.LName2');\n\t\t\n\t\t$this->db->select('tblPeople.fkGenderId,tblPeople.BirthDayMonth, tblPeople.BirthDayDay, tblPeople.BirthDayYear');\n\t\t$this->db->select('CONVERT(VARCHAR(11),tblPeople.Anniversary,106) as Anniversary, Q.QualificationDesc as Qualification, tblPeople.Nationality');\n\t\t$this->db->select('tblAddress.Street1, tblAddress.Street2, tblAddress.City, tblAddress.ZipCode');\n\t\t$this->db->select('tblState.StateDesc, tblCountry.CountryDesc');\n $this->db->from('tblPeople');\n\t\t$this->db->join('tblPeopleType', 'tblPeopleType.pkPeopleTypeId = tblPeople.fkPeopleTypeId', 'inner');\n\t\t$this->db->join('tblPeopleAddress', 'tblPeopleAddress.fkPeopleId = tblPeople.pkPeopleId', 'left');\n\t\t$this->db->join('tblAddress', 'tblAddress.pkAddressid = tblPeopleAddress.fkAddressId', 'left');\n\t\t$this->db->join('tblState', 'tblState.pkStateId = tblAddress.FkStateId', 'left');\n\t\t$this->db->join('tblCountry', 'tblCountry.pkCountryId = tblAddress.fkCountryId', 'left');\n\t\t$this->db->join('tblQualification Q', 'tblPeople.Qualification = Q.pkQualificationId', 'LEFT');\n\t\tif($advanced == \"tblEmail.EmailDesc\"){\n\t\t\t$this->db->join('tblPeopleEmail', 'tblPeopleEmail.fkPeopleId = tblPeople.pkPeopleId', 'left');\n\t\t\t$this->db->join('tblEmail', 'tblEmail.pkEmail = tblPeopleEmail.fkEmailId', 'left');\n\t\t}\n\t\tif($advanced == \"tblRes.Folio\" || $advanced == \"tblRes.ResCode\"){\n\t\t\t$this->db->join('tblResPeopleAcc', 'tblResPeopleAcc.fkPeopleId = tblPeople.pkPeopleId', 'left');\n\t\t\t$this->db->join('tblRes', 'tblRes.pkResId = tblResPeopleAcc.fkResId', 'left');\n\t\t}\n\t\tif($advanced == \"tblFloorPlan.FloorPlanDesc\"){\n\t\t\t$this->db->join('tblResPeopleAcc', 'tblResPeopleAcc.fkPeopleId = tblPeople.pkPeopleId', 'left');\n\t\t\t$this->db->join('tblRes', 'tblRes.pkResId = tblResPeopleAcc.fkResId', 'left');\n\t\t\t$this->db->join('tblResOcc', 'tblResOcc.fkResId = tblRes.pkResId', 'left');\n\t\t\t$this->db->join('tblResInvt', 'tblResInvt.pkResInvtId = tblResOcc.fkResInvtId', 'left');\n\t\t\t$this->db->join('tblFloorPlan', 'tblFloorPlan.pkFloorPlanID = tblResInvt.fkFloorPlanId', 'left');\n\t\t}\n\t\tif($peopleId == \"true\"){\n\t\t\t$cadena = $cadena . 'tblPeople.pkPeopleId LIKE \\'%'.$text.'%\\'';\n\t\t}\n\t\tif($lastName == \"true\" && $name == \"true\"){\n\t\t\t$texto = str_replace(' ', '', $text);\n\t\t\t$cadena = $cadena . 'RTRIM(tblPeople.Name) '. ' + '. ' RTRIM(tblPeople.LName) LIKE \\'%'.$texto.'%\\'';\n\t\t}else{\n\t\t\tif($lastName == \"true\"){\n\t\t\t\tif($cadena != \"(\"){\n\t\t\t\t\t$cadena = $cadena . ' OR';\n\t\t\t\t}\n\t\t\t\t$cadena = $cadena . ' tblPeople.LName LIKE \\'%'.$text.'%\\' or tblPeople.LName2 LIKE \\'%'.$text.'%\\'';\n\t\t\t}\n\t\t\tif($name == \"true\"){\n\t\t\t\tif($cadena != \"(\"){\n\t\t\t\t\t$cadena = $cadena . ' OR';\n\t\t\t\t}\n\t\t\t\t$cadena = $cadena . ' tblPeople.Name LIKE \\'%'.$text.'%\\'';\n\t\t\t}\n\t\t}\n\t\tif($advanced != \"\"){\n\t\t\tif($cadena != \"(\"){\n\t\t\t\t$cadena = $cadena . ' OR ';\n\t\t\t}\n\t\t\t$cadena = $cadena . $advanced . ' LIKE \\'%'.$text.'%\\'';\n\t\t}\n\t\tif($cadena != \"(\"){\n\t\t\t$cadena = $cadena . \")\";\n\t\t\t$this->db->where($cadena, NULL);\n\t\t}\n\t\tif($typePeople == \"maid\"){\n\t\t\t$this->db->where(\"tblPeopleType.ynMaid\", 1);\n\t\t}else if($typePeople == \"superior\"){\n\t\t\t$this->db->where(\"tblPeopleType.ynSup\", 1);\n\t\t}\n\t\t$this->db->order_by('tblPeople.pkPeopleId', 'DESC');\n\t\treturn $this->db->get()->result();\n\t}", "function SEARCH()\n{\n $sql = \"SELECT USER.login, user.nombre, user.apellido, user.password, user.dni, USER.email, USER.pais, USER.pais, USER.sexo, USER.telefono, USER.fecha, USER.foto, ROL.rol AS rol FROM USER INNER JOIN rol ON USER.rol_id = ROL.id_rol\";\n\n // si se produce un error en la busqueda mandamos el mensaje de error en la consulta\n if (!($resultado = $this->bd->query($sql))){\n\t\treturn 'Error en la consulta sobre la base de datos';\n\t}\n else{ // si la busqueda es correcta devolvemos el recordset resultado\n\t\treturn $resultado;\n\t}\n\n\n}", "public function ReturnResearch( string $valeur1,$valeur2,$valeur3 )\n{\n \n $em = $this->em;\n\n // $motcle=$request->request->get('form')['recherche'];\n // $motcle=$valeur;\n\n // $sql = \"SELECT o FROM App\\Entity\\CjOffres o WHERE o.slug LIKE '%$motcle%' \";.\n $sql = \"SELECT o FROM App\\Entity\\CjOffres o WHERE o.type = $valeur1 AND o.niveau = $valeur2 AND o.metier = $valeur3 \"; \n $query = $em->createQuery($sql); \n $result = $query->getResult();\n // return ($result);\n return ( $result);\n \n\n \n }", "function search_readers()\n\t{\n\t\t$term = $this->input->post('term');\n\t\t$search_field = $this->input->post('search_field');\n\n\t\t$this->load->model('user_model');\n\n\t\t$names = $this->user_model->search_by($term, $search_field);\n\n\t\t// Return data\n\t\techo json_encode($names);\n\t}", "public static function search($last, $first, $dob = null, $sex = null) {\n global $myLogin;\n $birth = dateToString($dob);\n $matches = array();\n $rec = new Client();\n $rec->active = true;\n $rec->userGroupId = $myLogin->userGroupId;\n $rec->lastName = $last;\n $rec->firstName = $first;\n $rec->sex = $sex;\n $rec->birth = $birth;\n if (Client::_search($matches, $rec) > 0) // last, first, dob, sex\n return $matches;\n $rec->firstName = CriteriaValue::startsWith(substr($first, 0, 1));\n Client::_search($matches, $rec); // last, first1%, dob, sex\n $rec->firstName = null;\n if (Client::_search($matches, $rec) > 0) // last, dob, sex\n return $matches;\n $rec->lastName = null;\n if ($rec->birth) {\n $rec->birth = null;\n $rec->lastName = $last;\n $rec->firstName = $first;\n if (Client::_search($matches, $rec) > 0) // last, first, sex\n return $matches;\n $rec->firstName = null;\n $rec->lastName = null;\n $rec->birth = $birth;\n Client::_search($matches, $rec); // dob, sex\n $rec->birth = null;\n $rec->lastName = $last;\n $rec->firstName = CriteriaValue::startsWith(substr($first, 0, 1));\n Client::_search($matches, $rec); // last, first1%, sex\n $rec->firstName = null;\n if (Client::_search($matches, $rec) > 0) // last, sex\n return $matches;\n }\n $rec->lastName = CriteriaValue::startsWith(substr($last, 0, 4));\n $rec->firstName = $first;\n Client::_search($matches, $rec); // last4%, first, sex\n $rec->firstName = null;\n Client::_search($matches, $rec); // last4%, sex\n if (count($matches) == 0) {\n $rec->firstName = $first;\n $rec->lastName = CriteriaValue::startsWith(substr($last, 0, 1));\n Client::_search($matches, $rec); // last1%, first, sex\n $rec->lastName = null;\n $rec->birth = null;\n Client::_search($matches, $rec); // first, sex\n }\n return $matches;\n }", "public function selectAllPersonne (){\n // On prépare notre requête select\n $requete_prepare = $this->connexion->prepare(\n \"SELECT id, nom, prenom, url_photo, date_naissance, statut_couple FROM Personne\"\n );\n //On exécute la requête \n $requete_prepare->execute ();\n // Met un tableau d'objets dans la variable resultat\n // Le nom de chaque colonne correspond à une propriété de l'objet\n $resultat=$requete_prepare->fetchAll (PDO::FETCH_OBJ);\n return $resultat;\n }", "public function findAllByPerson($translit){\n return $this->repo->findAllByPerson($translit);\n }", "function consultaReportePersona($cedula){\r\n $campos =\"T1.id,T1.nombres, T1.apellidos, T1.cedula, T1.correo, T1.fnacimiento, T1.genero, T1.telefono, T1.direccion, T1.grupo_sangre,T1.estado_civil,T1.nivel_academico,T1.hijos,T2.documentos, T1.evaluado, T2.prueba_tecnica,T2.prueba_psico,T2.observaciones_psico,T2.comentarios\";\r\n $tabla =\"personas T1 LEFT JOIN evaluaciones T2 ON T1.id=T2.id_persona\";\r\n $donde = \"WHERE T1.cedula=?\";\r\n $resultado = $this->invoco->ConsultaPreparada($tabla,$campos,$donde,'i',array($cedula),\"consultaReportePersona\");//echo\"Resultado=\";print_r($resultado);die;\r\n if(count($resultado)>0){\r\n return $resultado;\r\n }\r\n \r\n }", "public function search_result(){\r\n\t\t$this->GetEblastRecipients();\r\n\r\n\t}", "public function index()\n {\n //\n $search = \\Request::get('key');\n $classement = \\Request::get('classement');\n $status = \\Request::get('status');\n\n $people = Person::where(function($query) use ( $search , $classement, $status ){\n $query->where('first_name', 'like', '%'.$search .'%');\n\n if($classement && $status){\n $query->where('status', '=', $status)\n ->where('table_name', '=', $classement );\n }\n else if($classement)\n $query->where('table_name', '=', $classement );\n\n else if($status)\n $query->where('status', '=', $status);\n })->orWhere('order_number','=', $search)->paginate(50);\n\n return view('people.member-list', compact('people', 'search', 'classement','status'));\n }", "public function find();", "public function find();", "public function displayPersons() {\r\n $this->checkRole();\r\n $this->checkMessages();\r\n $osobe = array();\r\n $osoba = new \\model\\DBOsoba();\r\n\t\t$clanovi = array();\r\n\t\t\r\n\t\ttry {\r\n\t\t\t$pom = $osoba->getAllActiveOzsn();\r\n\t\t\tif ($pom && count($pom)) {\r\n\t\t\t\tforeach ($pom as $v) {\r\n\t\t\t\t\t$clanovi[] = $v->getPrimaryKey();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (\\PDOException $e) {\r\n\t\t\t$this->createMessage(\"Dogodila se greška! Pokušajte kasnije!\");\r\n\t\t}\r\n \r\n\t\tif (get(\"type\")) {\r\n\t\t\t// generate file\r\n\t\t\t$pomPolje = array(\"Ime\", \"Prezime\", \"Email\", \"Mobitel\", \"JMBAG\", \"Spol\", \"Datum rođenja\", \"Osobna iskaznica\", \"Vrijedi do\",\r\n\t\t\t\t\"Putovnica\", \"Vrijedi do\", \"Aktivan dokument\", \"MBO\", \"OIB\");\r\n\t\t\t$array = array();\r\n\t\t\t$array[] = $pomPolje;\r\n\t\t\tif (session('search') === 'all') {\r\n\t\t\t\t$osobe = $osoba->getAllPersons();\r\n\t\t\t} else {\r\n\t\t\t\t$polje = unserialize(session('search'));\r\n\t\t\t\t$osobe = $osoba->find($polje[0], $polje[1], $polje[2], $polje[3], $polje[4]);\r\n\t\t\t}\r\n\t\t\tif($osobe !== false && count($osobe)) {\r\n\t\t\t\tforeach ($osobe as $v) {\r\n\t\t\t\t\t$array[] = array($v->ime, $v->prezime, $v->mail, $v->brojMob, $v->JMBAG, ($v->spol == \"M\" ? \"Muško\" : \"Žensko\"),\r\n\t\t\t\t\t\t$v->datRod, $v->brOsobne, $v->osobnaVrijediDo, $v->brPutovnice, $v->putovnicaVrijediDo, \r\n\t\t\t\t\t\t\t\t($v->aktivanDokument == \"0\" ? \"Putovnica\" : \"Osobna\"), $v->MBG, $v->OIB);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$path = $this->generateFile(get(\"type\"), $array);\r\n\r\n\t\t\techo new \\view\\ShowFile(array(\r\n\t\t\t\"path\" => $path,\r\n\t\t\t\"type\" => get(\"type\")\r\n\t\t\t));\r\n\t\t}\r\n\t\r\n if(!postEmpty()) {\r\n // search db\r\n // first validate input\r\n $validacija = new \\model\\MediumPersonSearchFormModel(array(\r\n\t\t\t\t\t'ferId' => post('ferId'),\r\n\t\t\t\t\t'ime' => post('ime'), \r\n\t\t\t\t\t'prezime' => post('prezime'),\r\n\t\t\t\t\t'OIB' => post('OIB'),\r\n\t\t\t\t\t'JMBAG' => post('JMBAG')\r\n\t\t\t\t));\r\n \r\n $pov = $validacija->validate();\r\n if($pov !== true) {\r\n $this->errorMessage = $validacija->decypherErrors($pov);\r\n } else {\r\n // ok the data is correct now lets find what they're looking for\r\n $osobe = $osoba->find(post('ime'), post('prezime'), post('ferId'), post('OIB'), post('JMBAG'));\r\n\t\t\r\n\t\t\t\t$_SESSION['search'] = serialize(array(post('ime'), post('prezime'), post('ferId'), post('OIB'), post('JMBAG')));\r\n\t\t\r\n if($osobe === false)\r\n $this->errorMessage = \"Nije pronađena niti jedna osoba!\";\r\n }\r\n } else if (get(\"a\") !== false) {\r\n // get all persons\r\n $osobe = $osoba->getAllPersons();\r\n\t\t\t$_SESSION['search'] = 'all';\r\n if($osobe === false)\r\n $this->errorMessage = \"Ne postoji niti jedna osoba!\";\r\n } else {\r\n preusmjeri(\\route\\Route::get('d3')->generate(array(\r\n \"controller\" => \"administrator\",\r\n \"action\" => \"searchPersons\"\r\n )) . '?msg=param');\r\n }\r\n \r\n echo new \\view\\Main(array(\r\n \"body\" => new \\view\\administrator\\PersonList(array(\r\n \"osobe\" => $osobe,\r\n \"errorMessage\" => $this->errorMessage,\r\n \"resultMessage\" => $this->resultMessage,\r\n\t\t\t\t\"clanovi\" => $clanovi\r\n )),\r\n \"title\" => \"Popis osoba\",\r\n \"script\" => new \\view\\scripts\\administrator\\PersonListJs\r\n ));\r\n }", "static function searchFilmByAuthor() : string\n {\n return \"SELECT film.* \n FROM film\n WHERE LOCATE( :Author , film.author) > 0;\";\n }", "public function searchPrint()\n {\n // should not be searched.\n\n $criteria=new CDbCriteria;\n\t\t$criteria->compare('refhasilrad_id',$this->refhasilrad_id);\n\t\t$criteria->compare('pemeriksaanrad_id',$this->pemeriksaanrad_id);\n\t\t$criteria->compare('LOWER(refhasilrad_kode)',strtolower($this->refhasilrad_kode),true);\n\t\t$criteria->compare('LOWER(refhasilrad_hasil)',strtolower($this->refhasilrad_hasil),true);\n\t\t$criteria->compare('LOWER(refhasilrad_kesan)',strtolower($this->refhasilrad_kesan),true);\n\t\t$criteria->compare('LOWER(refhasilrad_kesimpulan)',strtolower($this->refhasilrad_kesimpulan),true);\n\t\t$criteria->compare('LOWER(refhasilrad_keterangan)',strtolower($this->refhasilrad_keterangan),true);\n\t\t$criteria->compare('refhasilrad_aktif',$this->refhasilrad_aktif);\n // Klo limit lebih kecil dari nol itu berarti ga ada limit \n $criteria->limit=-1; \n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n 'pagination'=>false,\n ));\n }", "function search(){\n\t\tif($this->dist_pv_id==\"\"){ $pv ='%';}//search by province_id\n\t\telse{ $pv = $this->dist_pv_id ;}\n\t\tif($this->dist_amph_id==\"\"){ $amph ='%';}//search by amphur_id\n\t\telse{ $amph = $this->dist_amph_id ;}\n\t\t$sql = \"SELECT *\n\t\t\t\tFROM \".$this->hr_db.\".hr_district \n\t\t\t\tWHERE dist_name LIKE '%\".$this->dist_name.\"%'\n\t\t\t\tAND dist_pv_id LIKE '\".$pv.\"'\n\t\t\t\tAND dist_amph_id LIKE '\".$amph.\"' \n\t\t\t\tAND dist_active='Y'\";\n\t\t$query = $this->hr->query($sql);\n\t\t//echo $this->hr->last_query();\n\t\treturn $query;\n\t}", "function rechercheMotifs($rechercher,$IdFicheSociete)\n{\n\n\t$modif = false;\n\t\n\t$pdo = connexion();\n\t\n\tif($pdo != false)\n\t{\n\t\n\n\t\t\n\t\t$req = \" SELECT IdNumSerie, NumeroSerie, IdActions, M.IdMotifs\n\t\t\t\tFROM numeroserie N, Motifs M\n\t\t\t\tWHERE N.IdMotifs = $rechercher\n\t\t\t\tAND N.IdMotifs = M.IdMotifs\n\t\t\t\t\";\n\t\t\n\t\t$res = $pdo -> query($req)->fetchall();\n\t\t\n\t\t\n\t\t\n\t}\n\n\treturn $res;\n}", "public abstract function searchQuery();", "public function listar()\n\t\t{\n\t\t\t$sql=\"SELECT * FROM tblpersona\";\n\t\t\treturn ejecutarconsulta($sql);\n\t\t}", "public function findMotRecherche($mot){\n $query= $this->createQueryBuilder('a');\n if($mot!=null){\n $query->where('MATCH_AGAINST(a.firstname, a.lastname) AGAINST \n (:mots boolean)>0')\n ->setParameter('mots',$mot);\n }\n return $query->getQuery()->getResult();\n }", "function search($filter = \"\") {\n return $this->manager->search($this->ou . ',' . $this->dc, $filter);\n }", "private function detailedSearch(&$persons, &$companies)\n {\n // Get param values for fields existing in persons as well as in companies\n\t\t$name = $this->request->getQuery('name');\n\t\t$prof = $this->request->getQuery('prof');\n\t\t$street = $this->request->getQuery('street');\n\t\t$profCat = $this->request->getQuery('prof_cat');\n\t\t$arrOld = $this->request->getQuery('arr_old');\n\t\t$arrNew = $this->request->getQuery('arr_new');\n\t\t$bold = $this->request->getQuery('bold');\n\t\t$advert = $this->request->getQuery('advert');\n\n // Get param values for fields existing only in persons\n\t\t$firstName = $this->request->getQuery('first_name');\n\t\t$dlI = $this->request->getQuery('institut');\n\t\t$ldh = $this->request->getQuery('ldh_rank');\n\t\t$gender = $this->request->getQuery('gender');\n\t\t$soc = $this->request->getQuery('soc_stat');\n\t\t$mil = $this->request->getQuery('mil_stat');\n\t\t$occup = $this->request->getQuery('occ_stat');\n\n // Checking if all values for company or person are empty and either empty the query object\n // for companies or return without modifying the query objects\n\t\tif(empty($name.$street.$prof.$profCat.$arrOld.$arrNew) && $bold === null && $advert === null){\n if(empty($firstName.$soc.$mil.$occup.$ldh) && $dlI === null && $gender === null) return;\n $companies->where(['Companies.id' => 0]);\n }\n\n // UNCOMMENT these lines instead of the above ones if you want to return zero results for an empty query form:\n // if(empty($name.$street.$prof.$profCat.$arrOld.$arrNew) && $bold === null && $advert === null){\n // if(empty($firstName.$soc.$mil.$occup.$ldh) && $dlI === null && $gender === null){\n // $persons->where(['Persons.id' => 0]);\n // $companies->where(['Companies.id' => 0]);\n // return;\n // }\n // $companies->where(['Companies.id' => 0]);\n // }\n\n\t\t// Query for $name (surname of persons/name of companies)\n\t\tif(!empty($name)){\n\t\t\t$persons->where(['Persons.surname LIKE' => '%'.$name.'%']);\n\t\t\t$companies->where(['Companies.name LIKE' => '%'.$name.'%']);\n\t\t}\n\n\t\t// Query for $prof (given profession of a person or company)\n\t\tif(!empty($prof)){\n\t\t\t$persons->where(['Persons.profession_verbatim LIKE' => '%'.$prof.'%']);\n\t\t\t$companies->where(['Companies.profession_verbatim LIKE' => '%'.$prof.'%']);\n\t\t}\n\n // Query for $street (a person or company, that has at least one associated\n // street that contains the given string as old or new street name)\n\t\tif(!empty($street)){\n\t\t\t$persons->matching('Addresses.Streets', function($q) use ($street){\n\t\t\t\t\treturn $q->where(['OR' => [\n ['Streets.name_old_clean LIKE' => '%'.$street.'%'],\n ['Streets.name_new LIKE' => '%'.$street.'%']\n\t\t\t\t\t]]);\n\t\t\t\t}\n\t\t\t);\n\t\t\t$companies->matching('Addresses.Streets', function($q) use ($street){\n\t\t\t\t\treturn $q->where(['OR' => [\n ['Streets.name_old_clean LIKE' => '%'.$street.'%'],\n ['Streets.name_new LIKE' => '%'.$street.'%']\n\t\t\t\t\t]]);\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\t//Query for $profCat (profession category of person/company)\n\t\tif(!empty($profCat)){\n\t\t\t$persons->where(['Persons.prof_category_id' => $profCat]);\n\t\t\t$companies->where(['Companies.prof_category_id' => $profCat]);\n\t\t}\n\n //Query for $arrOld/$arrNew (a person or company, that has at least one associated\n // street that lies at least partially within the given arrondissement)\n\t\t$arrs = [];\n\t\tif(!empty($arrOld)){\n\t\t\tarray_push($arrs, intval($arrOld));\n\t\t}\n\t\tif(!empty($arrNew)){\n\t\t\tarray_push($arrs, intval($arrNew));\n\t\t}\n\t\tforeach($arrs as $arr){\n\t\t\t$persons->matching('Addresses.Streets.Arrondissements', function ($q) use ($arr){\n\t\t\t\treturn $q->where(['Arrondissements.id' => $arr]);\n\t\t\t});\n\t\t\t$companies->matching('Addresses.Streets.Arrondissements', function ($q) use ($arr){\n\t\t\t\treturn $q->where(['Arrondissements.id' => $arr]);\n\t\t\t});\n\t\t}\n\n\t\t// Query for $bold (the fact, that a person's/company's name is written bold in the address book)\n\t\tif($bold === '1'){\n\t\t\t$persons->where(['Persons.bold' => true]);\n\t\t\t$companies->where(['Companies.bold' => true]);\n\t\t} elseif($bold === '0'){\n\t\t\t$persons->where(['Persons.bold' => false]);\n\t\t\t$companies->where(['Companies.bold' => false]);\n\t\t}\n\n // Query for $advert (the fact, that a person's/company's name appears in the entreprise list of\n // the address book)\n\t\tif($advert === '1'){\n\t\t\t$persons->where(['Persons.advert' => true]);\n\t\t\t$companies->where(['Companies.advert' => true]);\n\t\t} elseif($advert === '0'){\n\t\t\t$persons->where(['Persons.advert' => false]);\n\t\t\t$companies->where(['Companies.advert' => false]);\n\t\t}\n\n\t\t/* Queries that only concern persons */\n\n\t\t//Query for $firstName (first name of person)\n\t\tif(!empty($firstName)){\n\t\t\t$persons->where(['Persons.first_name LIKE' => '%'.$firstName.'%']);\n\t\t}\n\n\t\t// Query for $dlI (the fact, that a person is marked \"de l'Institut\" in the address book)\n\t\tif($dlI === '1'){\n\t\t\t$persons->where(['Persons.de_l_institut' => true]);\n\t\t} elseif($dlI === '0'){\n\t\t\t$persons->where(['Companies.de_l_institut' => false]);\n\t\t}\n\n\t\t//Query for $ldh (a person's rank in the Légion d'Honneur)\n\t\tif(!empty($ldh)){\n\t\t\t$persons->where(['Persons.ldh_rank_id' => $ldh]);\n\t\t}\n\n\t\t//Query for $gender (a person's gender)\n\t\tif(!empty($gender)){\n\t\t\t$persons->where([strtolower('Persons.gender') => $gender]);\n\t\t}\n\n\t\t// Query for $soc (the social status of a person)\n\t\tif(!empty($soc)){\n\t\t\t$persons->where(['Persons.social_status_id' => $soc]);\n\t\t}\n\n\t\t// Query for $mil (the military status of a person)\n\t\tif(!empty($mil)){\n\t\t\t$persons->where(['Persons.military_status_id' => $mil]);\n\t\t}\n\n\t\t// Query for $occup (the occupational status of a person)\n\t\tif(!empty($occup)){\n\t\t\t$persons->where(['Persons.occupation_status_id' => $occup]);\n\t\t}\n\t}", "public function search()\n {\n return view('jeux/rechercheJeu');\n }", "function listar_personas($objeto) {\n\t// Si el objeto viene vacio(llamado desde el index) se le asigna el $_REQUEST que manda el Index\n\t// Si no conserva su valor normal\n\t\t$objeto = (empty($objeto)) ? $_REQUEST : $objeto;\n\n\t// Carga la vista\n\t\trequire ('views/comandas/listar_personas.php');\n\t}", "public function testCanGetPersonsWithParams()\n {\n $params = array(\n 'limit' => '1',\n 'start' => '1'\n );\n $this->pipedrive->persons->getPersons($params);\n }", "public function searchAction()\n {\n $kosts = $this->modelsManager\n ->createBuilder()\n ->from(Kost::class)\n ->where('nama LIKE :search:', \n [\n 'search' => '%' . $search . '%',\n ]\n )\n ->getQuery()\n ->execute();\n }", "function search(){ \r\n\t\t\t//Sentencia sql para buscar\r\n\t\t\t$sql = \"SELECT *\r\n\t\t\t\t\tFROM fases_has_contactos\r\n\t\t\t\t\tWHERE\r\n\t\t\t\t\t\t( \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t(`FASES_id_FASES` LIKE '%$this->FASES_id_FASES%') &&\r\n\t\t\t\t\t\t(`FASES_TAREAS_id_TAREAS` LIKE '%$this->FASES_TAREAS_id_TAREAS%') &&\r\n\t\t\t\t\t\t(`CONTACTOS_email` LIKE '%$this->CONTACTOS_email%')\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t)\";\r\n\t\t\t\t\t\r\n\t\r\n\t\tif (!($resultado = $this->mysqli->query($sql))){\r\n\t\t\treturn 'Error en la búsqueda';//Devuelve mensaje de error\t\t\r\n\t\t}else{ \r\n\t\t\treturn $resultado;//Se devuelve el resultado de la consulta\r\n\t\t}\r\n\t}", "public function search()\n {\n\n }", "public function search()\n {\n\n }", "public function searchRecette() {\n return $this->render('commun/recherche-recette.html.twig', []);\n }", "public function consulta_persona($prs) {\n $sqlprs=\"select * from personas where persona_id = '$prs'\";\n $resultprs=pg_query($this->conexion,$sqlprs) or die(\"Error prs: \". pg_last_error());//consulta datos de la persona seleccionada\n $rowprs= pg_fetch_array($resultprs);\n $this->generales=$rowprs;\n \n $sqlbnk=\"select * from data_bank where persona_id = '$prs'\";\n $resultbnk=pg_query($this->conexion,$sqlbnk) or die(\"Error prs: \". pg_last_error());//consulta datos de la persona seleccionada\n $rowbnk= pg_fetch_array($resultbnk);\n $this->bancarios=$rowbnk;\n \n $sqldoc=\"select * from doc_personas where persona_id = '$prs'\";\n $resultdoc=pg_query($this->conexion,$sqldoc) or die(\"Error prs: \". pg_last_error());//consulta datos de la persona seleccionada\n $rowdoc= pg_fetch_array($resultdoc);\n $this->documentos=$rowdoc;\n }", "public function searchPrint()\n\t{\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('premiasuransi_id',$this->premiasuransi_id);\n\t\t$criteria->compare('umur',$this->umur);\n\t\t$criteria->compare('tahun',$this->tahun);\n\t\t$criteria->compare('persen', str_replace(',', '.', $this->persen));\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "public function searchFamiliares($value){\n $sql = \"SELECT id, nombre, apellido, fecha_nacimiento, ocupacion, \n nombre_trabajo, direccion_trabajo, telefono_trabajo, telefono, nivel_estudio, dui, estado \n FROM familiares \n WHERE nombre LIKE ? AND estado = 0\n \";\n $params = array(\"%$value%\");\n return Database::getRows($sql, $params);\n }", "public function actionGetContacts() {\n\t\t$sql = 'SELECT id, CONCAT(firstName,\" \",lastName) as value FROM x2_contacts WHERE firstName LIKE :qterm OR lastName LIKE :qterm OR CONCAT(firstName,\" \",lastName) LIKE :qterm ORDER BY firstName ASC';\n\t\t$command = Yii::app()->db->createCommand($sql);\n\t\t$qterm = $_GET['term'] . '%';\n\t\t$command->bindParam(\":qterm\", $qterm, PDO::PARAM_STR);\n\t\t$result = $command->queryAll();\n\t\techo CJSON::encode($result);\n\t\texit;\n\t}", "public function searchPrint()\n\t{\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('asalrujukan_id',$this->asalrujukan_id);\n\t\t$criteria->compare('LOWER(asalrujukan_nama)',strtolower($this->asalrujukan_nama),true);\n\t\t$criteria->compare('LOWER(asalrujukan_institusi)',strtolower($this->asalrujukan_institusi),true);\n\t\t$criteria->compare('LOWER(asalrujukan_namalainnya)',strtolower($this->asalrujukan_namalainnya),true);\n\t\t$criteria->compare('asalrujukan_aktif',isset($this->asalrujukan_aktif)?$this->asalrujukan_aktif:true);\n\t\t//$criteria->order = 'asalrujukan_id';\n\t\t$criteria->limit = -1;\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n 'pagination'=>false,\n \n\t\t));\n\t}", "public function basicSearch()\n\t{\n\t\t\n\t}", "public function search_presupuesto()\n\t{\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\t\t$criteria->with = array('familia');\n\t\t//$criteria->with = array('familia.idCategoria');\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('LOWER(t.nombre)',strtolower($this->nombre),true);\n\t\t$criteria->compare('id_familia', $this->id_familia);\n\t\t$criteria->compare('familia.id_categoria', $this->id_categoria);\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t'pagination'=>array(\n\t\t\t\t\t'pageSize'=>'5',\n\t\t\t), \n\t\t\t'sort'=>array(\n\t\t\t 'attributes'=>array(\n\t\t\t 'nombre_familia_search'=>array(\n\t\t\t 'asc'=>'familia.nombre',\n\t\t\t 'desc'=>'familia.nombre DESC',\n\t\t\t ),\n\t\t\t '*',\n\t\t\t ),\n\t\t\t ),\n\t\t));\n\t}" ]
[ "0.7650126", "0.7278807", "0.6981606", "0.6973406", "0.6881132", "0.6881132", "0.6713378", "0.6563056", "0.6499674", "0.64926386", "0.64774173", "0.64610404", "0.6420362", "0.64107156", "0.63830453", "0.63769555", "0.6361315", "0.6357329", "0.63490885", "0.631411", "0.6309722", "0.6303712", "0.62898093", "0.6266777", "0.62272674", "0.62102836", "0.62015384", "0.6190783", "0.6179505", "0.61710495", "0.6168876", "0.6166142", "0.6157823", "0.61531115", "0.6143811", "0.61353886", "0.61220187", "0.61060023", "0.6103433", "0.6095019", "0.60811496", "0.60798997", "0.6079687", "0.60767853", "0.6073564", "0.606402", "0.6060615", "0.6060615", "0.6051982", "0.60487795", "0.6048044", "0.60475475", "0.6047227", "0.60342896", "0.60342795", "0.6033871", "0.6026303", "0.6014632", "0.60136676", "0.600075", "0.59962744", "0.59800875", "0.59761524", "0.59625626", "0.5946624", "0.594454", "0.59362775", "0.5935188", "0.59350204", "0.5930033", "0.5921413", "0.59171903", "0.5901324", "0.58975536", "0.58975536", "0.58949184", "0.58948547", "0.58913994", "0.5889693", "0.5884588", "0.5882389", "0.5878473", "0.5874797", "0.58661854", "0.58656836", "0.5864241", "0.5862418", "0.5858601", "0.58564746", "0.5849372", "0.584501", "0.584501", "0.5841478", "0.58365047", "0.58339924", "0.58333874", "0.5830967", "0.58248705", "0.5822723", "0.58197385" ]
0.73237485
1
Returns configured mPDF object
Возвращает настроенный объект mPDF
protected function getPdfObject() { // Get options from TypoScript $pageFormat = ($this->options->getPdfPageFormat()) ? $this->options->getPdfPageFormat() : 'A4'; $pageOrientation = ($orientation = $this->options->getPdfPageOrientation()) ? $orientation : 'L'; $leftMargin = ($this->options->getPdfLeftMargin()) ? $this->options->getPdfLeftMargin() : '15'; $rightMargin = ($this->options->getPdfRightMargin()) ? $this->options->getPdfRightMargin() : '15'; $topMargin = ($this->options->getPdfTopMargin()) ? $this->options->getPdfTopMargin() : '15'; $styleSheet = ($this->options->getPdfStyleSheet()) ? $this->options->getPdfStyleSheet() : 'print'; /* @var $pdf \mPDF */ $pdf = $this->objectManager->get('mPDF', '', $pageFormat . '-' . $pageOrientation); $pdf->SetMargins($leftMargin, $rightMargin, $topMargin); $pdf->CSSselectMedia = $styleSheet; $pdf->AddPage(); return $pdf; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMpdf()\n\t{\n\t\treturn $this->mpdf;\n\t}", "protected function getPDF(){\n return $this->pdf;\n }", "public function getPdf()\n {\n if (func_num_args() === 0)\n {\n $Provider = $this->Provider->getInstance();\n }\n else\n {\n $Provider = call_user_func_array([$this->Provider, 'getInstance'], func_get_args());\n }\n \n // Load template\n $Provider->loadTemplate($this->Template);\n \n return $Provider;\n }", "public function get_pdf() {\n\t\tdo_action( 'wpo_wcpdf_before_pdf', $this->get_type(), $this );\n\t\t\n\t\t$pdf_settings = array(\n\t\t\t'paper_size'\t\t=> apply_filters( 'wpo_wcpdf_paper_format', $this->get_setting( 'paper_size', 'A4' ), $this->get_type() ),\n\t\t\t'paper_orientation'\t=> apply_filters( 'wpo_wcpdf_paper_orientation', 'portrait', $this->get_type() ),\n\t\t\t'font_subsetting'\t=> $this->get_setting( 'font_subsetting', false ),\n\t\t);\n\t\t$pdf_maker = wcpdf_get_pdf_maker( $this->get_html(), $pdf_settings );\n\t\t$pdf = $pdf_maker->output();\n\t\t\n\t\tdo_action( 'wpo_wcpdf_after_pdf', $this->get_type(), $this );\n\t\tdo_action( 'wpo_wcpdf_pdf_created', $pdf, $this );\n\n\t\treturn $pdf;\n\t}", "public function getPDF() {\n\t\treturn $this->pdf->getCheminPDF();\n\t}", "function getPdf () {\r\n $this->articlePDF->addText($this->buffer);\r\n return $this->articlePDF;\r\n }", "public function getPDF()\n {\n $view = config('netcore.module-invoice.pdf.view');\n\n if (!$view || !view()->exists($view)) {\n throw new InvoiceBaseException('PDF view is not set.');\n }\n\n // ---------------------------------------------------------------\n // Merge config on the fly\n // Global config merge can affect other modules using this package\n // ---------------------------------------------------------------\n\n if (config()->has('netcore.module-invoice-snappy')) {\n $originalConfig = config('snappy');\n $overrideConfig = config('netcore.module-invoice-snappy');\n\n config()->set('snappy', array_merge($originalConfig, $overrideConfig));\n }\n\n return PDF::loadView($view, ['invoice' => $this]);\n }", "public function getPdf()\n {\n return $this->pdf;\n }", "protected static function getFacadeAccessor() { return 'phptopdf'; }", "public static function factory($pdf_content = '') {\n\t\t\treturn new IDEAFormPDF($pdf_content);\n\t\t}", "public function createPDF()\n {\n }", "public function createPDF()\n\t{\n //$pdf = \\App::make('dompdf.wrapper');\n\t $pdf = new Dompdf();\n // Loads HTML into generator, can also use file reference to convert.\n $pdf->loadHTML($this->loadPDFtemplate(\"9592954\",\"959292\"));\n\n // Returns PDF\n return $pdf->stream();\n\t}", "function facture_pdf($invoice, $download = true)\n{\n $invoice_number = $invoice->nom;\n\n include(APPPATH . 'third_party/MPDF57/mpdf.php');\n $mpdf = new mPDF('utf-8', 'A4', '', 'freesans', 5, 5, 10, 10, 0, 0);\n $mpdf->SetDisplayMode('fullwidth');\n $mpdf->SetTitle($invoice_number);\n $mpdf->list_indent_first_level = 0;\n $data = '';\n include(APPPATH . 'views/pdf/' . get_option('theme_pdf_facture') . '/facture_pdf.php');\n $mpdf->WriteHTML($data);\n if ($download == true) {\n $mpdf->Output($invoice_number . '.pdf', 'D');\n } else {\n return $mpdf;\n }\n}", "public function createPDF()\n {\n\t\t\n }", "public function pdf();", "function facture_factureinterne_pdf($invoice)\n{\n $invoice_number = $invoice->nom;\n\n $mpdf = new mPDF('utf-8', 'A4', '', 'freesans', 5, 5, 10, 10, 0, 0);\n $mpdf->SetDisplayMode('fullwidth');\n $mpdf->SetTitle($invoice_number);\n $mpdf->list_indent_first_level = 0;\n include(APPPATH . 'views/pdf/' . get_option('theme_pdf_facture') . '/facture_pdf.php');\n $mpdf->WriteHTML($data);\n\n return $mpdf;\n}", "public function actionCreatempdf() {\n $mpdf = new mPDFMod;\n $mpdf->mPDFModRender($this->renderPartial('mpdf'));\n exit;\n }", "public static function PDF( Lumine_Base $obj )\r\n\t{\r\n\t\tLumine::load('Report_PDF');\r\n\t\t$obj = new Lumine_Report_PDF( $obj, 'PDF' );\r\n\t\treturn $obj;\r\n\t}", "public function pdf($value) {\n return $this->setProperty('pdf', $value);\n }", "public function pdf($value) {\n return $this->setProperty('pdf', $value);\n }", "private function initPdf()\n {\n if ( is_object( $this->pdf ) )\n {\n return;\n }\n\n $path2lib = t3lib_extMgm::extPath( 'caddy' ) . 'Resources/Private/Lib/';\n\n require_once( $path2lib . 'pdf/class.tx_caddy_pdf.php' );\n $this->pdf = t3lib_div::makeInstance( 'tx_caddy_pdf' );\n\n // DRS\n if ( $this->drs->drsSession || $this->drsUserfunc )\n {\n $this->pdf->drsUserfunc = true;\n $prompt = __METHOD__ . ': PDF object is initiated.';\n t3lib_div::devlog( '[INFO/USERFUNC] ' . $prompt, $this->extKey, 0 );\n }\n // DRS\n }", "protected function render(): Dompdf\n {\n // Instantiate dompdf\n $this->pdf = new Dompdf($this->options);\n\n // Add metadata\n $this->applyMetadata();\n\n // Load content\n $this->loadContent();\n\n // Render the PDF\n $this->pdf->render();\n\n // Return the PDF\n return $this->pdf;\n }", "public function generate_pdf_object() {\n $doc = $this->prepare_page();\n $this->analysedata();\n $this->computenbpage($doc);\n foreach ($this->template as $elt) {\n $doc->SetFont($elt->font->family, $elt->font->emphasis, $elt->font->size);\n\n if ($elt->type == \"activities\" && isset($this->certificateinfos->activities)) {\n $this->printactivities($doc, $elt, $this->certificateinfos->activities);\n } else {\n $text = $this->handle_type($elt->type);\n if ($elt->type === \"pagenumber\") {\n $text = $this->handle_pagenumber($elt);\n }\n if (isset($elt->lib) && $elt->type != \"pagenumber\") {\n $text = $elt->lib . $text;\n }\n $text = trim($text);\n if (!empty($text)) {\n $this->displaytext($text, $elt, $doc);\n }\n }\n }\n if (isset($this->file)) {\n @unlink($this->file);\n }\n return $doc;\n }", "public function GetPdf()\n {\n return $this->Output('', 'S');\n }", "public function get_pdf() {\r\n\t\t//return ($this->news_new_array);\r\n\t}", "public function __construct()\n {\n\n $this->pdf = new Pdf(base_path('vendor/h4cc/wkhtmltopdf-amd64/bin/wkhtmltopdf-amd64'));\n $this->uploadPath = base_path('storage/app/pdfs/');\n }", "function PDF($pic_path = PDF_PICS_PATH){\n $this->pic_path = $pic_path;\n $this->htmldoc = Conf::get('pdf.htmldoc_path');\n }", "function getPDFtype() {return 'application/pdf'; }", "function bon_livraison_pdf($bon_livraison)\n{\n $bonLivraisonName = $bon_livraison->nom;\n\n include(APPPATH . 'third_party/MPDF57/mpdf.php');\n $mpdf = new mPDF('utf-8', 'A4', '', 'freesans', 5, 5, 10, 10, 0, 0);\n $mpdf->SetDisplayMode('fullwidth');\n $mpdf->SetTitle($bonLivraisonName);\n $mpdf->list_indent_first_level = 0;\n $data = '';\n include(APPPATH . 'views/pdf/' . get_option('theme_pdf_bon_livraison') . '/bon_livraison_pdf.php');\n $mpdf->WriteHTML($data);\n $mpdf->Output($bonLivraisonName . '.pdf', 'D');\n}", "function bon_livraison_customer_pdf($bon_livraison)\n{\n $bon_livraison_number = 'BL-' . date('dmy') . '-' . $bon_livraison->id;\n\n include(APPPATH . 'third_party/MPDF57/mpdf.php');\n $mpdf = new mPDF('utf-8', 'A4', '', 'freesans', 5, 5, 10, 10, 0, 0);\n $mpdf->SetDisplayMode('fullwidth');\n $mpdf->SetTitle($bon_livraison_number);\n $mpdf->list_indent_first_level = 0;\n $data = '';\n include(APPPATH . 'views/pdf/' . get_option('theme_pdf_bon_livraison') . '/bon_livraison_customer_pdf.php');\n $mpdf->WriteHTML($data);\n $mpdf->Output($bon_livraison_number . '.pdf', 'D');\n}", "public function __construct($data = array()){\n require_once(CRM_GET_ROOT_PATH().'/assets/modules/modmanager/Core/Includes/Mpdf/mPDF.php');\n \n $this->data = $data;\n $this->mpdf = new \\mPDF();\n $this->render = new Render();\n }", "public function createPDF() {\n $data = Karyawan::all();\n\n // share data to view\n $pdf = PDF::loadView('karyawan.pdf_view', compact('data', $data));\n\n // download PDF file with download method\n return $pdf->download('karyawan-pdf.pdf');\n }", "protected static function getFacadeAccessor()\n {\n return \\Alhoqbani\\PDF\\Contracts\\PDF::class;\n }", "public function cetak_invoice($kode)\n { \n //load mPDF library\n $this->load->library('m_pdf');\n //load mPDF library\n \n $where=array('kode_resv'=>$kode);\n //now pass the data//\n $data['title']=\"MY PDF TITLE 1.\";\n // $data['pegawai'] = $this->M_user->read_tampil($where);\n\t// $data['pensiun'] = $this->M_user->read_pensiun($where);\n //now pass the data //\n \n \n $html=$this->load->view('owner/cetak_invoice',$data, true); //load the pdf_output.php by passing our data and get all data in $html varriable.\n \n //this the the PDF filename that user will get to download\n $pdfFilePath =\"mypdfName-\".time().\"-download.pdf\";\n \t\n $mpdf->shrink_tables_to_fit = 1;\n //actually, you can pass mPDF parameter on this load() function\n $pdf = $this->m_pdf->load();\n //generate the PDF!\n \n $this->mpdf = new mPDF();\n $this->mpdf->AddPage('L', // L - landscape, P - portrait\n '', '', '', '',\n 4, // margin_left\n 4, // margin right\n\t\t\t4, // margin top\n \t4, // margin bottom\n 4, // margin header\n 4); // margin footer\n $this->mpdf->WriteHTML($html);\n //$this->mpdf->Output($file_name, 'D'); // download force\n $this->mpdf->Output($file_name, 'D'); // view in the explorer\n\n \n }", "public function render()\n {\n if (empty($this->pdf)) {\n $this->monta();\n }\n return $this->pdf->getPdf();\n }", "function pdfRequire(){\n\trequire('pdf/fpdf.php');\n}", "function viewPdf()\n {\n\n $this->layout = 'pdf'; //this will use the pdf.ctp layout\n $this->render();\n }", "function __construct($orientation='P', $unit='mm', $size='A4')\n{\n\t// Some checks\n\t$this->_dochecks();\n\t// Initialization of properties\n\t$this->state = 0;\n\t$this->page = 0;\n\t$this->n = 2;\n\t$this->buffer = '';\n\t$this->pages = array();\n\t$this->PageInfo = array();\n\t$this->fonts = array();\n\t$this->FontFiles = array();\n\t$this->encodings = array();\n\t$this->cmaps = array();\n\t$this->images = array();\n\t$this->links = array();\n\t$this->InHeader = false;\n\t$this->InFooter = false;\n\t$this->lasth = 0;\n\t$this->FontFamily = '';\n\t$this->FontStyle = '';\n\t$this->FontSizePt = 12;\n\t$this->underline = false;\n\t$this->DrawColor = '0 G';\n\t$this->FillColor = '0 g';\n\t$this->TextColor = '0 g';\n\t$this->ColorFlag = false;\n\t$this->WithAlpha = false;\n\t$this->ws = 0;\n\t// Font path\n\tif(defined('FPDF_FONTPATH'))\n\t{\n\t\t$this->fontpath = FPDF_FONTPATH;\n\t\tif(substr($this->fontpath,-1)!='/' && substr($this->fontpath,-1)!='\\\\')\n\t\t\t$this->fontpath .= '/';\n\t}\n\telseif(is_dir(dirname(__FILE__).'/font'))\n\t\t$this->fontpath = dirname(__FILE__).'/font/';\n\telse\n\t\t$this->fontpath = '';\n\t// Core fonts\n\t$this->CoreFonts = array('courier', 'helvetica', 'times', 'symbol', 'zapfdingbats');\n\t// Scale factor\n\tif($unit=='pt')\n\t\t$this->k = 1;\n\telseif($unit=='mm')\n\t\t$this->k = 72/25.4;\n\telseif($unit=='cm')\n\t\t$this->k = 72/2.54;\n\telseif($unit=='in')\n\t\t$this->k = 72;\n\telse\n\t\t$this->Error('Incorrect unit: '.$unit);\n\t// Page sizes\n\t$this->StdPageSizes = array('a3'=>array(841.89,1190.55), 'a4'=>array(595.28,841.89), 'a5'=>array(420.94,595.28),\n\t\t'letter'=>array(612,792), 'legal'=>array(612,1008));\n\t$size = $this->_getpagesize($size);\n\t$this->DefPageSize = $size;\n\t$this->CurPageSize = $size;\n\t// Page orientation\n\t$orientation = strtolower($orientation);\n\tif($orientation=='p' || $orientation=='portrait')\n\t{\n\t\t$this->DefOrientation = 'P';\n\t\t$this->w = $size[0];\n\t\t$this->h = $size[1];\n\t}\n\telseif($orientation=='l' || $orientation=='landscape')\n\t{\n\t\t$this->DefOrientation = 'L';\n\t\t$this->w = $size[1];\n\t\t$this->h = $size[0];\n\t}\n\telse\n\t\t$this->Error('Incorrect orientation: '.$orientation);\n\t$this->CurOrientation = $this->DefOrientation;\n\t$this->wPt = $this->w*$this->k;\n\t$this->hPt = $this->h*$this->k;\n\t// Page rotation\n\t$this->CurRotation = 0;\n\t// Page margins (1 cm)\n\t$margin = 28.35/$this->k;\n\t$this->SetMargins($margin,$margin);\n\t// Interior cell margin (1 mm)\n\t$this->cMargin = $margin/10;\n\t// Line width (0.2 mm)\n\t$this->LineWidth = .567/$this->k;\n\t// Automatic page break\n\t$this->SetAutoPageBreak(true,2*$margin);\n\t// Default display mode\n\t$this->SetDisplayMode('default');\n\t// Enable compression\n\t$this->SetCompression(true);\n\t// Set default PDF version number\n\t$this->PDFVersion = '1.3';\n}", "function facture_cl_pdf($invoice, $download = true)\n{\n $invoice_number = $invoice->nom;\n\n include(APPPATH . 'third_party/MPDF57/mpdf.php');\n $mpdf = new mPDF('utf-8', 'A4', '', 'freesans', 5, 5, 10, 10, 0, 0);\n $mpdf->SetDisplayMode('fullwidth');\n $mpdf->SetTitle($invoice_number);\n $mpdf->list_indent_first_level = 0;\n $data = '';\n include(APPPATH . 'views/pdf/' . get_option('theme_pdf_facture') . '/ecl_pdf.php');\n $mpdf->WriteHTML($data);\n if ($download == true) {\n $mpdf->Output($invoice_number . '.pdf', 'D');\n } else {\n return $mpdf;\n }\n}", "private function getMPdfClassName()\n {\n if ($this->includeFile != null) {\n // MPDF version 5.*\n return '\\mpdf';\n }\n\n // MPDF version > 6.*\n return '\\Mpdf\\Mpdf';\n }", "public function getPdf_id() {\n\t\treturn $this->pdf_id;\n\t}", "function __construct(){\n\trequire_once(site_root.\"html2fpdf/html2fpdf.php\");\n}", "function cetak_pdf($html='Hello Dani', $oriented='P', $LoadCss='', $paperSize='A4', $footer=false, $filename=null)\n {\n $mpdf = new \\Mpdf\\Mpdf(['mode' => 'utf-8', 'format' => $paperSize, 'default_font_size' => 9]);\n $mpdf->showImageErrors = true;\n // @import url(\".base_url().\"assets/common/css/source/components/tables.css);\n $css = \" ;\n @import url(\".base_url().\"assets/common/css/source/helpers/fonts.css);\n\n @page{\n margin: 0;\n background: white;\n }\n \";\n // $url = \"http://identitas.online/cdn/pdf_generator/bootstrap.table.css\";\n $url = base_url().\"assets/modules/css/penjualan/penjualan_sewa_beli_faktur.css\";\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_HEADER, false);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.1 Safari/537.11');\n $style = curl_exec($ch);\n $rescode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n curl_close($ch) ;\n\n if($this->htmlHeader != '') $mpdf->SetHTMLHeader($this->htmlHeader);\n\n $mpdf->AddPage($oriented,'','','','',8,8,$this->marginTop,$this->marginBottom,8,8);\n \n $mpdf->SetTitle($this->title ?? 'Cetak');\n \n if($footer && $this->htmlFooter == '') {\n $mpdf->setFooter($footer);\n }\n\n\n if($LoadCss) {\n $mpdf->WriteHTML($LoadCss, 1);\n } else {\n $mpdf->WriteHTML($style, 1);\n $mpdf->WriteHTML($css, 1);\n }\n $mpdf->WriteHTML($html, 2);\n\n if($this->htmlFooter != '') $mpdf->SetHTMLFooter($this->htmlFooter);\n\n\n $filename = $filename ?? \"faktur_penjualan\".time().\".pdf\";\n $mpdf->Output($filename,\\Mpdf\\Output\\Destination::INLINE);\n // echo $style;\n }", "function PDF($orientation='P', $unit='mm', $size='eti')\n{\n // Call parent constructor\n $this->FPDF($orientation,$unit,$size);\n // Initialization\n $this->B = 0;\n $this->I = 0;\n $this->U = 0;\n $this->HREF = '';\n}", "function facture_interne_pdf($facture_interne, $upload = true, $type = '')\n{\n $invoice_number = $facture_interne->nom;\n\n include(APPPATH . 'third_party/MPDF57/mpdf.php');\n $mpdf = new mPDF('utf-8', 'A4', '', 'freesans', 5, 5, 10, 10, 0, 0);\n $mpdf->SetDisplayMode('fullwidth');\n $mpdf->SetTitle($invoice_number);\n $mpdf->list_indent_first_level = 0;\n if ($type == 'detailles') {\n include(APPPATH . 'views/pdf/facture_interne_detailles_pdf.php');\n } else {\n include(APPPATH . 'views/pdf/facture_interne_pdf.php');\n }\n $mpdf->WriteHTML($data);\n\n if ($upload == true) {\n $mpdf->Output($invoice_number . '.pdf', 'D');\n } else {\n return $mpdf;\n }\n}", "public function createPDF() {\n $data = Delivery::all();\n\n // share data to view\n view()->share('deliveries',$data);\n $pdf = PDF::loadView('admin.pdf.delivery_pdf', $data);\n\n // download PDF file with download method\n return $pdf->download('pdf_file.pdf');\n }", "public function pdfmaker3m(){\n \n $pdf= App::make('dompdf.wrapper');\n \n $semester = DB::table('variables')->where('name', 'semester')->value('value');\n $course = Course::where('course_level', '3M')->where('semester','=', $semester )->select('course_code')->get();\n $m3_st=Student::where('st_level','3M')->orderBy('st_regno','asc')->get();\n $attendances = Attendance_3M_Student::with('student')->get();\n $m3_hourssum = Attendance_3M_Student::groupBy('course_code')->select('course_code',DB::raw('sum(hours) as sum'))->get();\n \n $pdf -> loadview('level_3.3mcourse.3m_reportpdf', compact('course','semester','m3_st','attendances','m3_hourssum'));\n \n return $pdf->stream();\n \n }", "public function getPdf(){\n $prodCartas = DB::table('tprodcarta')->where('estado','=','1')->get();\n $servCartas = DB::table('tservcarta')->where('estado','=','1')->get();\n $view = View::make('cartaPresentacion.pdf', compact('prodCartas', 'servCartas'))->render();\n $pdf = App::make('dompdf.wrapper');\n $pdf->loadHTML($view);\n\n return $pdf->stream('informe'.'.pdf');\n }", "private function prepare_page() {\n $orientation = 'P';\n $this->pageparam = new \\stdClass();\n $this->pageparam->pagewidth = 210;\n $this->pageparam->pageheight = 297;\n\n if (isset($this->filename)) {\n // Set orientation width the size of image.\n $taille = getimagesize($this->file);\n\n if ($taille[0] > $taille[1]) {\n $orientation = 'L';\n $this->pageparam->pagewidth = 297;\n $this->pageparam->pageheight = 210;\n }\n }\n\n $doc = new \\pdf($orientation);\n $doc->setPrintHeader(false);\n $doc->setPrintFooter(false);\n $doc->SetAutoPagebreak(false);\n $doc->SetMargins(0, 0, 0);\n $doc->AddPage();\n\n if (isset($this->filename)) {\n $doc->Image($this->file, 0, 0, $this->pageparam->pagewidth, $this->pageparam->pageheight,\n 'png', '', true);\n }\n\n return $doc;\n }", "public function generateDocument()\n {\n $this->startCreatePdf();\n\n return $this;\n }", "public function getMandatePdf($id)\n {\n if ($id instanceof Mandate) {\n $id = $id->getId();\n }\n\n $endpoint = self::MANDATES;\n $path = $id;\n $headers = $this->headers(['Accept' => 'application/pdf']);\n\n try {\n $response = $this->client->get($this->url($endpoint, $path), [\n 'headers' => $headers\n ]);\n } catch (BadResponseException $ex) {\n $this->handleBadResponseException($ex);\n }\n\n return $response->getBody();\n }", "public function pdf()\n\t{\n\t\t$dompdf = $this->pdf->getContext();\n\t\t$dompdf->loadHtml('hello world');\n\n\t\t// (Optional) Setup the paper size and orientation\n\t\t$dompdf->setPaper('A4', 'landscape');\n\n\t\t// Render the HTML as PDF\n\t\t$dompdf->render();\n\n\t\t// Output the generated PDF to Browser\n\t\t$dompdf->stream();\n\t}", "public function creaPdf( $presupuestoPdf ){\n\n\t\t//$presupuestoPdf = Presupuesto::model()->find('id = '.$idpresupuesto);\n\t\t/*\n\t\t$presupuestoPdf = $presupuesto;*/\n\n\t\t# mPDF\n\t\t$mPDF1 = Yii::app()->ePdf->mpdf();\n\n\t\t# You can easily override default constructor's params\n\t\t$mPDF1 = Yii::app()->ePdf->mpdf('', 'A4');\n\n\t\t$mPDF1->SetCreator('Proston.es');\n\t\t$title = 'Proston.es';\n\n\t\t# Load a stylesheet\n\t\t$stylesheet = file_get_contents(Yii::getPathOfAlias('webroot.themes').\"/blackboot/css/bootstrap.css\");\n\t\t$mPDF1->WriteHTML($stylesheet, 1);\n\n\t\t# Renders image. ESTO DABA ERROR\n\t\t//$mPDF1->WriteHTML(CHtml::image(Yii::getPathOfAlias('webroot.img').'/logo.png' ));\n\n\t\t# render (full page)\n\t\t$mPDF1->WriteHTML($this->renderPartial('pdf', array('presupuesto'=>$presupuestoPdf),true));\t\t\n\n\t\t# Outputs ready PDF\n\t\t$mPDF1->Output();\t\n\n\t\t$to = $presupuestoPdf->email;\n\t\t$cco= 'info@proston.es';\t\t\n\t\t$from = 'info@proston.es';\t\t\n\t\t$subject = 'Presupuesto ' . $presupuestoPdf->id . ' '. $presupuestoPdf->nombre . ' - www.proSton.es';\t\t\n\t\t$message = 'Este email incluye el presupuesto en pdf creado en www.proston.es';\t\n\n\t\t$mPDF1->Output(Yii::getPathOfAlias('webroot.pdfs'). DIRECTORY_SEPARATOR .'presu'. $presupuestoPdf->id .'.pdf', EYiiPdf::OUTPUT_TO_FILE);\n\t\t$rutapdf = Yii::getPathOfAlias('webroot.pdfs'). DIRECTORY_SEPARATOR .'presu'. $presupuestoPdf->id .'.pdf';\n\t\t$this->mailsend($to,$cco,$from,$subject,$message,$rutapdf); \n\t\t$this->render('gracias', array('presupuesto'=>$presupuestoPdf));\n\t\t/*$rutapdf = Yii::getPathOfAlias('webroot.pdfs') .\n DIRECTORY_SEPARATOR . 'presu' .\n $presupuestoPdf->id . '.pdf';*/\n \n\t}", "public function createPdf() {\n\t\t\n\t\t// Throw error if Prince is not installed on the server.\n\t\tif (!file_exists($this->princeBinary)) {\n\t\t\tthrow new \\Exception('Could not find Prince binary. Make sure you installed it on the server. https://www.princexml.com/doc-install/#linux');\n\t\t}\n\n\t\t$intPagesize = 4;\n\t\t\n\t\t// Set page type - default 1\n\t\tif (!isset($_POST['pagetype'])){\n\t\t\t$intPagetype = 1;\n\t\t} else {\n\t\t\t$intPagetype = $_POST['pagetype'];\n\t\t}\n\n\t\tif ($intPagetype == 1) {\n\t\t\tif (!isset($_POST['posts'])){\n\t\t\t\tthrow new \\Exception('No posts selected');\n\t\t\t}\n\t\t\t$selectedChapters = $_POST['posts'];\n\t\t\t$chapters = array();\n\t\t\tforeach ($this->pages as $key => $value) {\n\t\t\t\tif (in_array($value->ID, $selectedChapters)) {\n\t\t\t\t\tarray_push($chapters, $value);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$rendered = self::getChaptersAsHtml($chapters, $intPagesize);\n\t\t}\n\n\t\tif ($intPagetype == 2) {\n\t\t\t$rendered = self::getRekAsHtml($this->rek);\n\t\t}\n\n\t\tif ($intPagetype == 3) {\n\t\t\t$rendered = self::getSskAsHtml($this->ssk);\n\t\t}\n\n \t\t$prince = new PrinceWrapper($this->princeBinary);\n \t\n \t$err = [];\n\t\t\n\t\theader('Content-Type: application/pdf');\n\t\theader('Content-Disposition: attachment; filename=\"tr_' . date(\"Y-m-d\") . '.pdf\"');\n\n\t\t$pdf = $prince->convert_string_to_passthru($rendered, $err);\n\t}", "public function Process(): PdfInfoResponse\r\n {\r\n $client = parent::Init();\r\n\r\n $endPointUrl = rtrim($this->BaseUrl, \"\\0\\t\\n\\x0B\\r \\\\/\") . \"/v1.0/\" . $this->_EndpointName;\r\n curl_setopt($client, CURLOPT_URL, $endPointUrl);\r\n\r\n $errCode = json_last_error();\r\n\r\n $headr = array();\r\n\r\n $headr[] = 'Content-Type: application/pdf';\r\n $headr[] = 'Authorization:Bearer ' . $this->ApiKey;\r\n curl_setopt($client, CURLOPT_HTTPHEADER, $headr);\r\n\r\n curl_setopt($client, CURLOPT_POSTFIELDS, $this->resource->Data);\r\n\r\n //$params = array('startPage' => $this->StartPage,'pageCount' => $this->PageCount);\r\n //$url = Endpoint::$DefaultBaseUrl.\"/\".$this->EndpointName . '?' . http_build_query($params);\r\n //curl_setopt($client, CURLOPT_URL, $url);\r\n\r\n curl_setopt($client, CURLOPT_BINARYTRANSFER, 1);\r\n\r\n ob_start();\r\n $result = curl_exec($client);\r\n $outData = ob_get_contents();\r\n ob_end_clean();\r\n\r\n $retObject = new PdfInfoResponse();\r\n $retObject->IsSuccessful = false;\r\n $retObject->StatusCode = curl_getinfo($client, CURLINFO_RESPONSE_CODE);\r\n\r\n if ($result == true && $retObject->StatusCode == 200) {\r\n $retObject->IsSuccessful = true;\r\n $retObject->JsonContent = $retObject->Content = $outData;\r\n } else {\r\n $retObject->ErrorJson = $outData;\r\n $errObj = json_decode($outData);\r\n $retObject->ErrorMessage = $errObj->message ?? $errObj->title ?? null;\r\n $retObject->ErrorId = $errObj->id ?? $errObj->traceId ?? null;\r\n }\r\n\r\n curl_close($client);\r\n\r\n return $retObject;\r\n }", "public function add_woo_pdf_metabox()\n {\n global $post;\n\n if (!$post) {\n return;\n }\n\n $order = new WC_Order($post->ID);\n\n if (!$order) {\n return;\n }\n\n $invoice = $this->get_invoice($post->ID);\n\n if ((is_array($invoice) && !empty($invoice) && $this->opt['woo_pdf_enabled']) || (!is_array($invoice) && $this->opt['woo_pdf_proforma_enabled'] && ($order->status != 'completed' || $this->opt['woo_pdf_enabled'])) || ($this->opt['woo_pdf_enabled'])) {\n add_meta_box('woo_pdf_metabox', __('PDF Invoices', 'woo_pdf'), array($this, 'woo_pdf_metabox_content'), 'shop_order', 'side', 'default');\n }\n }", "protected static function getFacadeAccessor() { \n\t\treturn 'mpdf.container';\n\t}", "public function generatePDF()\n {\n\n if (version_compare(PHP_VERSION, '7.2.0', '>=')) {\n // Ignores notices and reports all other kinds... and warnings\n error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING);\n // error_reporting(E_ALL ^ E_WARNING); // Maybe this is enough\n }\n \n $data = ['title' => 'Welcome to HDTuto.com'];\n $pdf = PDF::loadView('pdf', $data);\n \n return $pdf->download('pdf');\n \n }", "public function makepdf(Request $request)\n {\n $stylesheet = file_get_contents(__DIR__ . '\\style.css');\n $mpdf = new \\Mpdf\\Mpdf([\n 'mode' => 'utf-8',\n 'format' => [210, 297],\n 'default_font_size' => 14,\n 'default_font' => 'thsarabunnew'\n ]);\n\n $key = $request->keyPO;\n $mpdf->WriteHTML($stylesheet, 1);\n $mpdf->WriteHTML($request->pdf, 2);\n $mpdf->Output(\"pdf/PO$key.pdf\", 'F');\n return response()->json(['msg' => 'Successful']);\n }", "public function printPdf()\n\t{\n\t\t$this->finalize();\n\t\treturn $this->mpdf->Output();\n\t}", "function PDF_init($orientation = 'P', $unit= 'mm', $format = 'A4')\n{\n\tglobal $_GLOBALS;\n\t$_GLOBALS['FPDF_pdfPointer'] = new FPDF($orientation, $unit, $format);\n\t$_GLOBALS['FPDF_pdfPointer']->SetFont('Biolinum_Bd_0.4.1','',14);\n\t$_GLOBALS['FPDF_pdfPointer']->AddPage();\n}", "public function setUploadedPdf(\\Phalcon\\Http\\Request\\File $pdf)\n {\n $this->uploadedPdf = $pdf;\n return $this;\n }", "function profilePdf()\n {\n $pdf = \\App::make('dompdf.wrapper');\n $pdf->loadHTML($this->readProfile());\n return $pdf->stream();\n\n }", "public function actionPdf() {\n \n // setup kartik\\mpdf\\Pdf component\n\n $id_evento = Yii::$app->request->post('evento_idevento'); \n\n $usuario =Yii::$app->request->post('usuario_certificado'); \n\n $model = $this->findModel($id_evento);\n\n $modelUsuario = new User();\n $nomeCoordenador = $modelUsuario->findUser($model->responsavel);\n\n $cargaHoraria = new Inscreve();\n $cargaHoraria = $cargaHoraria->getSomaCargaHorariaPacote($id_evento,$nome= Yii::$app->user->identity->idusuario);\n\n if ($cargaHoraria == null){\n\n $cargaHoraria = $model->cargaHoraria;\n\n } \n \n\n $pdf = new mPDF('utf-8', 'A4-L');\n\n $pdf->WriteHTML('');\n\n if($model->imagem != NULL){\n\n $x=$pdf->WriteHTML(\"\n\n <style>\n body {\n \n body{font-family:Arial;background-image: url(../web/uploads/\".$model->imagem.\") no-repeat;\n background-image-resolution:300dpi;background-image-resize:6;}\n }\n </style>\n\n\n\n \");\n $pdf->Ln(15);\n } \n else{ \n\n $pdf->SetFont(\"Helvetica\",'B', 14);\n $pdf->MultiCell(0,6,\"PODER EXECUTIVO\",0, 'C');\n $pdf->MultiCell(0,6,(\"MINISTÉRIO DA EDUCAÇÃO\"),0, 'C');\n $pdf->MultiCell(0,6,(\"INSTITUTO DE COMPUTAÇÃO\"),0, 'C');\n //$pdf->MultiCell(0,5,(\"-----------------\"),0, 'C');\n $pdf->SetDrawColor(0,0,0);\n $pdf->Line(5,42,290,42);\n $pdf->Image('../web/img/logo-brasil.jpg', 10, 7, 32.32);\n $pdf->Image('../web/img/ufam.jpg', 260, 7, 25.25);\n }\n \n $pdf->Ln(25);\n $pdf->SetFont('Arial','B',22);\n\n if($model->imagem == NULL){\n $pdf->MultiCell(0,4,(\"Certificado\"),0, 'C');\n }\n\n if ($usuario == NULL){\n $nome= Yii::$app->user->identity->nome;\n } \n else {\n $nome = $usuario;\n }\n\n $dia_inicio = (date('d',strtotime($model->dataIni)));\n $dia_inicio = ($dia_inicio == 1 ? '1º' : $dia_inicio); //convertendo o 1 em 1º\n $mes_inicio = $this->converterMes($model->dataIni);\n $ano_inicio = (date('Y',strtotime($model->dataIni)));\n\n $dia_fim = (date('d',strtotime($model->dataFim)));\n $dia_fim = ($dia_fim == 1 ? '1º' : $dia_fim); //convertendo o 1 em 1º\n $mes_fim = $this->converterMes($model->dataFim);\n $ano_fim = (date('Y',strtotime($model->dataFim)));\n\n $pdf->SetFont('Arial','',18);\n\n $pdf->Ln(25);\n\n $tag = $this->tag($dia_inicio,$mes_inicio,$ano_inicio,$dia_fim,$mes_fim,$ano_fim);\n\n $pdf->WriteHTML('<p style=\"font-size: 20px; text-align: justify; text-indent: 80px;\">\n Certificamos que <b>'. $nome.'</b> participou do evento <b>\"'. $model->descricao.'\" \n ('.$model->sigla.')</b>, com carga horária de <b>'.$cargaHoraria.\n ' hora(s)</b>, realizado '.$tag.', na cidade \n de Manaus - AM.</p>');\n \n $pdf->Ln(12);\n \n $current = date('Y/m/d');\n\n $currentTime = strtotime($current);\n\n $mes = $this->converterMes($current);\n \n \n $pdf->Cell(0,5,('Manaus, '. date('d', $currentTime).' de '. $mes. ' de '. \n date('Y', $currentTime).'. '),0,1, 'C');\n\n \n if($model->imagem == NULL){\n\n $pdf->Ln(15);\n\n $pdf->Ln(10);\n\n $pdf->WriteHTML(' <div style = \"border: 0;\n border-bottom: 1px solid #000; margin-left: 25% ; margin-right:25%\"> </div>\n <div align=center> '.$nomeCoordenador->nome.' </div>');\n\n $pdf->SetFont('Helvetica','I',8);\n $pdf->Line(5,185,290,185);\n $pdf->SetXY(10, 180);\n $pdf->MultiCell(0,5,\"\",0, 'C');\n $pdf->MultiCell(0,4,(\"Av. Rodrigo Otávio, 6.200 - Campus Universitário Senador Arthur Virgílio Filho - CEP 69077-000 - Manaus, AM, Brasil\"),0, 'C');\n $pdf->MultiCell(0,4,(\" Tel. (092) 3305-1193/2808/2809 E-mail: secretaria@icomp.ufam.edu.br http://www.icomp.ufam.edu.br\"),0, 'C');\n //$pdf->Image('components/com_portalsecretaria/images/icon_telefone.jpg', '40', '290');\n //$pdf->Image('components/com_portalsecretaria/images/icon_email.jpg', '73', '290');\n //$pdf->Image('components/com_portalsecretaria/images/icon_casa.jpg', '134', '290');\n\n // fim do aqui\n }\n $pdf->Output('');\n exit;\n\n }", "public function get_pdf()\n {\n if (!isset($_GET['p1'])) {\n $text = 'Falta identificador para generar el PDF.';\n $this->_error($text, 404);\n\n return false;\n }\n $this->recepciondocumentos['skRecepcionDocumento'] = $_GET['p1'];\n $this->data['datos'] = parent::read_recepciondocumentos();\n $this->data['config'] = array(\n 'title' => 'Recepción de Documentos', 'date' => date('d-m-Y H:i:s'), 'company' => 'Gomez y Alvez', 'address' => 'Manzanillo, Colima', 'phone' => '3141102645', 'website' => 'www.grupoalvez.royalweb.com.mx', 'background_image' => (SYS_URL).'core/assets/img/logoPdf.png', 'header' => (CORE_PATH).'assets/pdf/tplHeaderPdf.php', 'footer' => (CORE_PATH).'assets/pdf/tplFooterPdf.php', 'style' => (CORE_PATH).'assets/pdf/tplStylePdf.php',\n );\n ob_start();\n $this->load_view('test-pdf', $this->data, false, 'doc/pdf/');\n $content = ob_get_clean();\n Core_Functions::pdf($content, $this->data['config']['title'], 'P', 'A4', 'es', true, 'UTF-8', array(5, 5, 5, 5));\n\n return true;\n }", "public function get_pdf(){\r\n //$data['mobil'] = $this->Model_mobil->getallmobil();\r\n\r\n $data = array(\r\n \"mobil\" => $this->Model_mobil->getallmobil()->result_array(),\r\n );\r\n $this->load->view('admin/cetak/pdf/allmobil',$data);\r\n\r\n $paper_size = 'A4';\r\n $orientation = 'landscape';\r\n $html = $this->output->get_output();\r\n\r\n $this->dompdf->set_paper($paper_size, $orientation);\r\n $this->dompdf->load_html($html);\r\n $this->dompdf->render();\r\n $this->dompdf->output();\r\n $this->dompdf->stream(\"Data Mobil Mobilku.pdf\", array('Attachment'=>0));\r\n }", "public function mpdfOptions(&$mpdf)\n {\n $mpdf->SetFooter(array(\n 'odd' => array(\n 'L' => array(\n 'content' => '',\n 'font-size' => 10,\n 'font-style' => 'B',\n 'font-family' => 'serif',\n 'color' => '#000000'\n ),\n 'C' => array(\n 'content' => '{PAGENO}/{nbpg}',\n 'font-size' => 10,\n 'font-style' => 'N',\n 'font-family' => 'serif',\n 'color' => '#636363'\n ),\n 'R' => array(\n 'content' => $this->model->key,\n 'font-size' => 10,\n 'font-style' => 'N',\n 'font-family' => 'serif',\n 'color' => '#636363'\n ),\n 'line' => 1,\n ),\n ));\n }", "function tbcf_sermon_pdf( $post_id = null ) {\n\n\t$pdf = tbcf_get_sermon_meta( $post_id, 'pdf' );\n\n\tif ( ! empty( $pdf ) ) {\n\t\treturn $pdf;\n\t}\n\n\treturn false;\n\n}", "public function loadFile($file, $config = [])\n\t{\n\t\treturn new Pdf(File::get($file), $config);\n\t}", "public function createMandatePdf($options = [])\n {\n $endpoint = self::HELPERS;\n $path = '/mandate';\n $headers = $this->headers(['Accept' => 'application/pdf']);\n\n try {\n $payload = ['data' => $options];\n\n $response = $this->client->post($this->url($endpoint, $path), [\n 'headers' => $headers,\n 'json' => $payload\n ]);\n } catch (BadResponseException $ex) {\n $this->handleBadResponseException($ex);\n }\n\n return $response->getBody();\n }", "public static function instance()\n {\n static $inst = null;\n if ($inst === null) {\n $inst = new MSMSettingsPage();\n }\n return $inst;\n }", "function crear_mpdf($html, $filename, $gl_footer, $tipo_return) {\n\t\t$mpdf = new mPDF('UTF-8','', 12, '', 15, 10, 10, 15, 9, 5, 'L');\n\t\t$mpdf->ignore_invalid_utf8 = true;\n\t\t\n\t\tif($footer){\n\t\t\t/*\n\t\t\t$footer = '\t<div style=\"width:100%;margin-top:5px;padding-top:3px;border-top:0.5px solid #000;font-size:10px;font-weight:bold\">SECRETAR&Iacute;A REGIONAL MINISTERIAL DE SALUD '.$gl_region.'</div>\n\t\t\t\t\t<div style=\"font-size:9px;font-weight:normal\">Para acceder al documento electr&oacute;nico ingrese a nuestra p&aacute;gina <b><a href=\"http://farmanet.minsal.cl\" target=\"_blank\" style=\"text-decoration: none;color: #000000; \">http://farmanet.minsal.cl</a></b>, opci&oacute;n \\'Ver Documento\\', ingrese el N&uacute;mero de Resoluci&oacute;n <b>'.$resolucion.'</b>.<br/>\n\t\t\t\t\t\t<div style=\"text-align:right;width:100%;font-weight:bold\">{PAGENO} / {nb}</div>\n\t\t\t\t\t</div>';\n\t\t\t\t\t*/\n\t\t\t$footer\t= $gl_footer;\n\t\t}else{\n\t\t\t$footer = 'MINISTERIO DE SALUD <div style=\"text-align:right;width:100%;font-weight:bold\">{PAGENO} / {nb}</div>';\n\t\t\t\n\t\t}\n\n\t\t$mpdf->SetHTMLFooter($footer);\n\t\t$mpdf->defaultfooterfontsize = 2;\n\t\t$mpdf->defaultfooterfontstyle = 'BI';\n\t\t$mpdf->SetCreator('MIDAS');\t\t\n\t\t$mpdf->WriteHTML($html);\n\n\t\t#return $mpdf->Output($filename, 'I');\t//inline.\t\tVer en navegador\n\t\t#return $mpdf->Output($filename, 'D');\t//Download.\t\tDescargar PDF.\n\t\t#return $mpdf->Output($filename, 'F');\t//File write.\tGuarda en el server. Necesita permisos en carpeta\n\t\t#return $mpdf->Output($filename, 'S');\t//String.\t\tRetorno PDF como string. Necesitará base64_encode\n\t\treturn $mpdf->Output($filename, $tipo_return);\n\t}", "function pdf_pro_invoice($id) {\r\n\r\n\r\n \r\n $this->load->model('mdl_quotes');\r\n $data['invoice_info'] = $this->mdl_quotes->get_invoice_info($id);\r\n \t $invoice = $this->mdl_quotes->get_invoice_info($id);\r\n\tforeach ($invoice->result() as $v)\r\n {\r\n \r\n }\r\n\t\t $name = \"Pro-forma Invoice#\".substr(sprintf('%06d', $v->quotes_id),0,6).\".pdf\";\r\n\r\n \r\n //$data['total'] = $this->mdl_sales_orders->total($id);\r\n\t//$this->load->view('pdf_sales_view', $data);\r\n \r\n $html = $this->load->view('pdf/pdf_pro_invoice', $data, TRUE);\r\n\t\r\n\t \t$this->load->library('MPDF/mpdf');\r\n\t\t\t \r\n\t\t$mpdf=new mPDF('utf-8','A4', '12', '', 10, 10, 10, 10, 9, 9); \r\n\t\t//$mpdf=new mPDF('', 'Legal');\r\n\t\t$mpdf->useOnlyCoreFonts = true;\r\n\t\t$mpdf->SetProtection(array('print'));\r\n\t\t$mpdf->SetTitle('Sales_order');\r\n\t\t$mpdf->SetFooter('zenith international Trading Ltd Bank Details: Sort Code 60-21-57 Account number: 53660420');\r\n\t\t//$mpdf->SetDisplayMode('fullpage');\r\n\t\t$mpdf->SetAutoFont();\r\n $stylesheet = file_get_contents(''.base_url('').'assets/pdfcss/css/bootstrap.css');\r\n $mpdf->WriteHTML($stylesheet,1);\r\n \r\n\t\r\n\t\t$search = array(\"<div class=\\\"row-fluid\\\">\", \"<div class=\\\"span6\\\">\", \"<div class=\\\"span5\\\">\", \"<div class=\\\"span5 offset2\\\">\");\r\n\t\t$replace = array(\"<div style='width: 100%;'>\", \"<div style='width: 48%; float: left;'>\", \"<div style='width: 40%; float: left;'>\", \"<div style='width: 40%; float: right;'>\");\r\n\t\t$html = str_replace($search, $replace, $html);\r\n\r\n\t\t$mpdf->WriteHTML($html);\r\n\t\r\n\t\t$mpdf->Output($name, 'D'); \r\n $mpdf->Output('d:/wamp/www/'.$name,'F');//Uploads_inv_pdf\r\n\t\t\r\n\t\t//exit;\r\n\r\n \r\n }", "public function createPDF() {\n // retreive all records from db\n $data = glpi_computers::all();\n\n // share data to view\n view()->share('employee',$data);\n $pdf = PDF::loadView('pdf_view', $data);\n\n // download PDF file with download method\n return $pdf->download('pdf_file.pdf');\n }", "public function pdf_centralizador($id_carrera,$id_paralelo,$bimestre,$id_plan, $id_year)\n {\n // if (($_SESSION['is_type_user'] == 'is_director') || ($_SESSION['is_type_user'] == 'is_teacher')|| ($_SESSION['is_type_user'] == 'is_docente')){\n \n $this->load->library('pdf');\n $pdf = $this->pdf->load();\n\n $tz = 'America/La_Paz';\n $timestamp = time();\n $dt = new DateTime(\"now\", new DateTimeZone($tz)); //first argument \"must\" be a string\n $dt->setTimestamp($timestamp); //adjust the object to correct timestamp\n $curso=$this->Centralizador_model->get_paralelo($id_paralelo);\n $carrera_cursa=$this->Centralizador_model->get_carrera($id_carrera);\n $cent = '';\n\n $materias = $this->Centralizador_model->get_materias($id_carrera, $id_paralelo,$id_plan); \n $cent .='\n <html>\n <title>'.$carrera_cursa->nombre_carrera.' - '.$curso->nombre.'</title>\n <head>\n <style>\n </style>\n </head>\n <body>\n <htmlpagefooter name=\"myfooter\">\n <table width=\"100%\" style=\"border-top: 1px solid #000000; vertical-align: top; font-family:\n serif; font-size: 9pt; color: #000;\"><tr>\n <td width=\"50%\" align=\"left\"><div><span style=\"color:black; font-size:8pt; font-family:courier; font-weight: normal;\n font-style: normal;\">Fecha impresion: '.$dt->format('d-m-Y, H:i:s').'</span></div></td>\t \n <td width=\"50%\" align=\"right\"><div><span style=\"color:black; font-size:8pt; font-family:courier; font-weight: normal;\n font-style: normal;\">Pag. {PAGENO}</span></div></td>\n </tr></table>\n </htmlpagefooter>\n <sethtmlpagefooter name=\"myfooter\" value=\"on\" />\n '; \n $cent .='<table border=\"1\" >'; \n $cent .='<thead>'; \n $cent .='<tr>'; \n $cent .='<th>#</th>'; \n $cent .='<th>APELLIDOS Y NOMBRES</th>';\n $cent .='<th>C.I.</th>';\n foreach ($materias as $materia) {\n $cent .='<th style=\"text-rotate: 90\"><div><span style=\"color:black; font-size:8pt; font-family:courier; font-weight: normal;\n font-style: normal; \">'.$materia->nombre_materia.' - '.$materia->sigla.'</span></div></th>'; \n } \n $cent .='</tr>'; \n $cent .='</thead>'; \n $cent .='<tbody>'; \n $alumnos = $this->Centralizador_model->get_alumnos_cent($id_carrera, $id_paralelo, $id_plan, $id_year);\n $i = 1;\n foreach ($alumnos as $alumno) {\n $cent .= '<tr>';\n $cent .= '<td>'.$i++.'</td>';\n $cent .= '<td>'.$alumno->nombre_completo.'</td>';\n $cent .= '<td>'.$alumno->ci.'</td>';\n foreach ($materias as $materia) {\n $notas = $this->Centralizador_model->get_notas_cent($id_plan, $id_carrera, $id_paralelo, $materia->id_materia, $alumno->id_alumno, $bimestre, $id_year, $id_year);\n\n if (empty($notas)) {\n $fondo = 'style=\"color:black\"';\n $nota = \"-\";\n } else {\n\n $nota = $this->encrypt->decode($notas->$bimestre);\n }\n if ($bimestre === 'final' && $this->encrypt->decode($notas->$bimestre) > 60.40) {\n $cent .= '<td '.$fondo.'><b>'.round($nota,0).'</b></td>';\n } else {\n $bim_2t='segundo_turno'; \n $notas_2t = $this->Centralizador_model->get_notas_cent($id_plan, $id_carrera, $id_paralelo, $materia->id_materia, $alumno->id_alumno,$bim_2t, $id_year);\n $notas_2t = $this->encrypt->decode($notas_2t->$bim_2t);\n if ($this->encrypt->decode($notas->$bimestre) > 39.50 && $this->encrypt->decode($notas->$bimestre) < 60.50 && $notas_2t>=61) {\n $cent .= '<td>'.round($nota,0).'- <span><b>'.$notas_2t.'</b><span></td>';\n }elseif($this->encrypt->decode($notas->$bimestre) >= 39.50 && $this->encrypt->decode($notas->$bimestre) < 60.50 && $notas_2t>0){\n $cent .= '<td>'.round($nota,0).'- <span>'.$notas_2t.'<span></td>'; \n }else{\n if($nota=='-'){\n $cent .= '<td><b>'.$nota.'</b></td>';\n }else{\n $cent .= '<td style=\"background: #e5e5e5;\">'.round($nota,0).'</td>';\n }\n }\n }\n }\n $cent .= '</tr>';\n }\n $cent .= '</tbody>';\n\n $cent .= '</table>';\n\n $cent .='<br>'; \n $cent .='<table width=\"100%\" align=\"center\" >'; \n $cent .='<thead>'; \n $cent .='<tr style=\"background: #e5e5e5;\">'; \n $cent .='<th>Sigla</th>'; \n $cent .='<th>Materia</th>'; \n $cent .='<th>Docente</th>'; \n $cent .='</tr>'; \n $cent .='</thead>'; \n $cent .='<tbody>'; \n \n foreach ($materias as $materia) {\n $cent .='<tr>'; \n $cent .='<td><span style=\"color:black; font-size:8pt; font-family:courier; font-weight: normal;\n font-style: normal; \"><b>'.$materia->sigla.'</b></span></td>'; \n $cent .='<td><span style=\"color:black; font-size:8pt; font-family:courier; font-weight: normal;\n font-style: normal; \">'.$materia->nombre_materia.'</span></td>'; \n $cent .='<td><span style=\"color:black; font-size:8pt; font-family:courier; font-weight: normal;\n font-style: normal; \">'.$materia->nombre_completo.'</span></td>'; \n $cent .='</tr>'; \n } \n \n $cent .='</tbody></table>';\n $cent .='</body>\n </html>';\n $pdf=new mPDF('c','LETTER','','',18,10,27,25,16,13);\n \n //$pdf->SetDisplayMode('fullpage');\n //$pdf->list_indent_first_level = 0; \n\n $header = '<table width=\"100%\" style=\"border-bottom: 1px solid #000000; vertical-align: bottom; font-family:\n serif; font-size: 9pt; color: #000;\"><tr>\n <td width=\"50%\" ><div><span style=\"color:black; font-size:8pt; font-family:courier; font-weight: normal;\n font-style: normal;\"><b>Carrera: </b>'.$carrera_cursa->nombre_carrera.'</span></div><div><span style=\"color:black; font-size:8pt; font-family:courier; font-weight: normal;\n font-style: normal;\"><b>Curso: </b>'.$curso->nombre.'</span></div></td>\n <td width=\"50%\" ><div><span style=\"color:black; font-size:8pt; font-family:courier; font-weight: normal;\n font-style: normal;\"><b>Carrera: </b>'.$bimestre.'</span></div><div><span style=\"color:black; font-size:8pt; font-family:courier; font-weight: normal;\n font-style: normal;\"><b>Plan: </b>'.$id_plan.'</span></div></td>\n </tr></table>\n ';\n $pdf->SetHTMLHeader($header); \n \n \n $pdf->WriteHTML($cent);\n\t\t $pdf->Output(''.$carrera_cursa->nombre_carrera.'-'.$curso->nombre.'.pdf','I');\n exit;\n\n \n }", "public function testComDayCqDamCoreImplAnnotationPdfAnnotationPdfConfig() {\n\n }", "public function to_pdf_report(){\n\t\tif ($this->session->userdata('is_logged_in')){\n\t\t\t$this->load->library('MPDF53/Mpdf');\n\t\t\t$this->load->library('PdfPrint');\n\t\t\t//$mpdf = new mPDF('utf-8', 'Letter',0,'',5,6,5,5,0,10);\n\t\t\t$mpdf = new PdfPrint('utf-8', 'Letter',0,'',7,8,5,1,0,0);\n\t\t\tob_clean();\n\t\t\t$habitacion = $this->input->post('h_cod_hab');\n\t\t\t$datos = $this->Habitaciones_model->datos_habitacion($habitacion);\n\t\t\t$data['clientes'] = $this->Habitaciones_model->lista_clientes($datos->clientes);\n\t\t\t$data['cod_hab'] = $habitacion;\n\t\t\t$mpdf->WriteHTML($this->load->view('report_pdf_view', $data, true));\n\t\t\t$mpdf->AutoPrint(true);\n\t\t\t$mpdf->Output();\n\t\t\tob_clean();\n\t\t} else{\n\t\t\tredirect('Main_controller/restringido');\n\t\t}\n\t}", "public function getPdfDocument()\n {\n return $this->_fields['PdfDocument']['FieldValue'];\n }", "private function load_pdf_ninja_service()\n\t\t{\n\t\t\tif( ! $this->pdf_ninja_service )\n\t\t\t{\n\t\t\t\trequire_once untrailingslashit( dirname( __FILE__ ) ) . '/modules/pdf-ninja.php';\n\t\t\t\t$this->pdf_ninja_service = WPCF7_Pdf_Ninja::get_instance();\n\t\t\t}\n\t\t\t\n\t\t\treturn $this->pdf_ninja_service;\n\t\t}", "public static function getInstance(){\n\t\tif(!self::$instance){\n\t\t\tself::$instance = self::mailerFromConfig();\n\t\t}\n\t\treturn self::$instance;\n\t}", "public function __construct(Pdf $pdf)\n {\n $this->pdf = $pdf;\n }", "public function __construct(PDF $pdf)\n {\n $this->pdf = $pdf;\n }", "public function loadHTML($html, $config = [])\n\t{\n\t $pdf = $this->getPdf($config);\n\t $pdf->getMpdf()->WriteHTML($html);\n\t \n\t return $pdf;\n\t}", "public function loadHTML($html, $config = [])\n\t{\n\t\treturn new Pdf($html, $config);\n\t}", "public function GetPagedefObject($pagedef)\n {\n /** @var $oPageDefinitionFile TCMSPageDefinitionFile */\n $oPageDefinitionFile = new TCMSPageDefinitionFile();\n $fullPageDefPath = $this->PageDefinitionFile($pagedef);\n $pagePath = substr($fullPageDefPath, 0, -strlen($pagedef.'.pagedef.php'));\n\n if (!$oPageDefinitionFile->Load($pagedef, $pagePath)) {\n $oPageDefinitionFile = false;\n }\n\n return $oPageDefinitionFile;\n }", "public function getPDF()\n\t{\n\t\t$pdf = new \\TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);\n\n// set document information\n\t\t$pdf->SetCreator(PDF_CREATOR);\n\t\t$pdf->SetAuthor('Nicola Asuni');\n\t\t$pdf->Settitle('TCPDF Example 001');\n\t\t$pdf->SetSubject('TCPDF Tutorial');\n\t\t$pdf->SetKeywords('TCPDF, PDF, example, test, guide');\n\n// set default header data\n//$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_title.' 001', PDF_HEADER_STRING, array(0,64,255), array(0,64,128));\n\t\t$pdf->setFooterData(array(0, 64, 0), array(0, 64, 128));\n\n// set header and footer fonts\n\t\t$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));\n\t\t$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));\n\n// set default monospaced font\n\t\t$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);\n\n// set margins\n\t\t$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);\n\t\t$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);\n\t\t$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);\n\n// set auto page breaks\n\t\t$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);\n\n// set image scale factor\n\t\t$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);\n\n// set some language-dependent strings (optional)\n\t\tif (@file_exists(dirname(__FILE__) . '/lang/eng.php')) {\n\t\t\trequire_once(dirname(__FILE__) . '/lang/eng.php');\n\t\t\t$pdf->setLanguageArray($l);\n\t\t}\n\n// ---------------------------------------------------------\n// set default font subsetting mode\n\t\t$pdf->setFontSubsetting(true);\n\n// Set font\n// dejavusans is a UTF-8 Unicode font, if you only need to\n// print standard ASCII chars, you can use core fonts like\n// helvetica or times to reduce file size.\n\t\t$pdf->SetFont('dejavusans', '', 14, '', true);\n\n// Add a page\n// This method has several options, check the source code documentation for more information.\n\t\t$pdf->AddPage();\n\n// set text shadow effect\n\t\t$pdf->setTextShadow(array('enabled' => true, 'depth_w' => 0.2, 'depth_h' => 0.2, 'color' => array(196, 196, 196), 'opacity' => 1, 'blend_mode' => 'Normal'));\n\n// Set some content to print\n\t\t$html = <<<EOD\n\nEOD;\n\n// Print text using writeHTMLCell()\n\t\t$pdf->writeHTMLCell(0, 0, '', '', $html, 0, 1, 0, true, '', true);\n\n// ---------------------------------------------------------\n// Close and output PDF document\n// This method has several options, check the source code documentation for more information.\n\t\t$pdf->Output('example_001.pdf', 'I');\n\n//============================================================+\n// END OF FILE\n//============================================================+\n\t}", "public function getPdfLink() {\n\t\treturn Temboo_Results::getSubItemByKey($this->base, \"application/pdf\");\n\t}", "public function createPDF() \n {\n $dadosPaciente = Patient::where('id', '=', $patient->id);\n\n // share data to view\n view()->share('employee',$data);\n $pdf = PDF::loadView('pdf_view', $data);\n\n // download PDF file with download method\n return $pdf->stream('pdf_file.pdf');\n }", "public function getPDFlib($opts = array())\n\t{\n\t\t$this->debug->groupCollapsed(__CLASS__.'->'.__FUNCTION__);\n\t\tdebug('opts', $opts);\n\t\t$optsDefault = array(\n\t\t\t'errorpolicy'\t=> 'return',\t\t// This means we must check return values of load_font() etc.\n\t\t\t'license'\t\t=> null,\n\t\t\t'textformat'\t=> 'utf8',\n\t\t\t// 'avoiddemostamp'=> true,\t\t\t// throws exception when true && invalid license\n\t\t\t'SearchPath'\t=> $_SERVER['DOCUMENT_ROOT'],\n\t\t\t// 'escapesequence'\t=> 'true',\n\t\t);\n\t\t$opts = array_merge($optsDefault, $opts);\n\t\tif (empty($opts['license'])) {\n\t\t\tif (isset($this->cfg['license'])) {\n\t\t\t\t$opts['license'] = $this->cfg['license'];\n\t\t\t} elseif (file_exists($this->cfg['licensefile'])) {\n\t\t\t\t$this->debug->info('licensefile found', $this->cfg['licensefile']);\n\t\t\t\t$opts['license'] = trim(file_get_contents($this->cfg['licensefile']));\n\t\t\t}\n\t\t}\n\t\t$p = new \\PDFlib();\n\t\t$this->p = $p;\n\t\t$pdflibVer = $p->get_parameter('version', 0);\n\t\t$this->debug->info('pdflib version', $pdflibVer);\n\t\t$this->debug->log('opts', $opts);\n\t\ttry {\n\t\t\tif (version_compare($pdflibVer, '9.0.0', '>=')) {\n\t\t\t\t$opt_string = $this->stringifyOpts($opts);\n\t\t\t\t$response = $p->set_option($opt_string);\n\t\t\t} else {\n\t\t\t\tforeach ($opts as $k => $v) {\n\t\t\t\t\t$response = $p->set_parameter($k, $v);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch ( PDFlibException $e ) {\n\t\t\ttrigger_error('PDFlib exception ['.$e->get_errnum().'] '.$e->get_apiname().' : '.$e->get_errmsg());\n\t\t}\n\t\t$this->debug->groupEnd();\n\t\treturn $p;\n\t}", "public function getPritTcpd()\n\t{\n\t\t$pdf = $this->get('white_october.tcpdf')->create();\n\t\t\n\t\t$pdf->setFontSubsetting(true);\n\t\t$pdf->SetFont('dejavusans', '', 8, '', true);\n\t\t\n\t\t// set margins\n\t\t$pdf->SetMargins(PDF_MARGIN_LEFT, 30, PDF_MARGIN_RIGHT);\n\t\t$pdf->SetHeaderMargin(1);\n\t\t$pdf->SetFooterMargin(10);\n\t\t\n\t\t// set image scale factor\n\t\t$pdf->setImageScale(5);\n\t\t\n\t\t$pdf->AddPage();\n\t\t\n\t\treturn $pdf; \n\t}", "function launchpad_pdf_handler() {\n\t$file = trim($_GET['file']);\n\tif(!$file) {\n\t\texit;\n\t}\n\t\n\t$_GET['mpdf'] = true;\n\t\n\t$file = get_bloginfo('wpurl') . '/' . $file . '/?' . http_build_query($_GET);\n\t\n\tinclude $_SERVER['DOCUMENT_ROOT'] . THEME_PATH . '/lib/third-party/mpdf/mpdf.php';\n\t$mpdf = new mPDF('utf-8', 'A4', '10', 'Helvetica', 10, 10, 0, 10, 0, 0); \n\t$mpdf->useOnlyCoreFonts = false;\n\t$mpdf->CSSselectMedia = 'print';\n\t$mpdf->WriteHTML(file_get_contents($file));\n\t$mpdf->Output();\n\texit;\n}", "public function init_tcpdf(){\n\t\t//Init PDF\n\t\t$pdf = null;\n\t\twhile (!class_exists('PDF')) {\n\t\t\t//Init PDF\n\t\t\tApp::import('Vendor', 'PDF', array('file' => 'tcpdf' . DS . 'pdf.php'));\n\t\t}\n\n\t\t$data = $this->Product->find('all');\n\t\t$this->set('data', $data);\n\n\t\t$pdf = new PDF('L', 'mm','A4', true, 'UTF-8', false);\n\t\t$filename = 'materials';\n\t\t$this->set('filename', $filename);\n\t\t$this->set('pdf', $pdf);\n\n\t\t$this->layout = 'pdf';\n\t\t$this->autoRender = false;\n\t\t$this->response->type('application/pdf');\n\n\t\t$this->render('view_pdf');\n\n\t}", "public function withPdfDocument($value)\n {\n $this->setPdfDocument($value);\n return $this;\n }", "public function viewPDF($view){\n\t\t\n\t\t$pdf = App::make('dompdf.wrapper');\n\t\t$pdf->loadHTML($view);\n\n\t\treturn $pdf;\n\t}", "protected function getPDFPath()\n\t{\n\t\treturn $this->folder . '/' . $this->fileName . '.pdf';\n\t}", "function PDF($orientation='P',$unit='mm',$format='A4')\r\n{\r\n $this->FPDF($orientation,$unit,$format);\r\n //Iniciación de variables\r\n $this->B=0;\r\n $this->I=0;\r\n $this->U=0;\r\n $this->HREF='';\r\n}", "public function createPDF($id)\n {\n $examen = tbl_examenes::find($id);;\n\n // share data to view\n view()->share('examen', $examen);\n $pdf = PDF::loadView('reporteExamen');\n\n // download PDF file with download method\n return $pdf->stream();\n }", "public function actionPdf()\n {\n $this->getSearchCriteria();\n $this->layout = static::BLANK_LAYOUT;\n $this->dataProvider->pagination = false;\n $content = $this->render('pdf', [\n 'dataProvider' => $this->dataProvider,\n ]);\n if (isset($_GET['test'])) {\n return $content;\n } else {\n $mpdf = new \\mPDF();\n $mpdf->WriteHTML($content);\n\n Yii::$app->response->getHeaders()->set('Content-Type', 'application/pdf');\n Yii::$app->response->getHeaders()->set('Content-Disposition', 'attachment; filename=\"' . $this->getCompatibilityId() . '.pdf\"');\n return $mpdf->Output($this->getCompatibilityId() . '.pdf', 'S');\n }\n }", "public function gerarPdf() {\n if (isset($_SESSION['pesquisa_anotacao']) and (isset($_SESSION['pesquisa_obs']))):\n $gerarAnotacaoPdf = new ModelsGerarAnotacaoPdf();\n $this->Dados = $gerarAnotacaoPdf->gerarPdf();\n else:\n echo \"Nenhum valor encontrado\";\n endif;\n }", "public function printPdf() {\n $inputs = $this->getPdfParams();\n\n $result = (new TicketModel())->pdf(false, $inputs);\n return $result;\n }" ]
[ "0.74084985", "0.6472614", "0.63614607", "0.6325647", "0.6292673", "0.6289274", "0.62191015", "0.6187841", "0.6001618", "0.59842324", "0.59487957", "0.58932346", "0.5825438", "0.58201236", "0.5813508", "0.57729405", "0.5737202", "0.57172984", "0.56665576", "0.56665576", "0.56349033", "0.5617101", "0.5600101", "0.5599679", "0.55678815", "0.55668205", "0.55443066", "0.55229867", "0.54781586", "0.54600644", "0.5447081", "0.5443401", "0.54348975", "0.5408323", "0.5395701", "0.53291357", "0.532089", "0.53142136", "0.5310724", "0.5288884", "0.52862346", "0.52774084", "0.5270521", "0.52611166", "0.5259448", "0.52557623", "0.5254254", "0.52527857", "0.52525896", "0.5252231", "0.52498734", "0.52431613", "0.52388734", "0.5235336", "0.52337205", "0.5231749", "0.52255535", "0.52252996", "0.52072704", "0.52041847", "0.52036375", "0.5194345", "0.51925045", "0.51911086", "0.5191108", "0.5185063", "0.5183487", "0.5164159", "0.5161967", "0.5161277", "0.5156282", "0.51477015", "0.5144318", "0.51393163", "0.51380247", "0.51296926", "0.51271313", "0.5116883", "0.51153374", "0.51090467", "0.5105633", "0.5103932", "0.5103484", "0.50957984", "0.5079413", "0.50780046", "0.507334", "0.505534", "0.50531316", "0.50450623", "0.5033479", "0.502912", "0.50262696", "0.502616", "0.50235885", "0.5019156", "0.5018934", "0.50170094", "0.500827", "0.49952698" ]
0.75799066
0
Creates a new row in the sys_file_reference table and returns it's uid
Создает новую строку в таблице sys_file_reference и возвращает её uid
protected function createNewFileReferenceRow(): int { return $this->dbService->getQuery('sys_file_reference')->insert([ 'table_local' => 'sys_file', 'sys_language_uid' => TcaUtil::getLanguageUid($this->row, $this->tableName) ?? 0, 'tstamp' => $GLOBALS['EXEC_TIME'], 'crdate' => $GLOBALS['EXEC_TIME'], 'cruser_id' => 0, 'l10n_parent' => 0, 'uid_local' => $this->file->getProperty('uid'), 'tablenames' => $this->tableName, 'uid_foreign' => $this->row['uid'], 'fieldname' => $this->fieldName, 'pid' => $this->row['pid'], ], true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function processNewSysFileReference(int $uid)\n {\n $record = BackendUtility::getRecord('sys_file_reference', $uid);\n\n // Try to find the file\n try {\n $file = GeneralUtility::makeInstance(ResourceFactory::class)->getFileObject($record['uid_local']);\n } catch (FileDoesNotExistException $e) {\n return;\n } catch (\\InvalidArgumentException $e) {\n return;\n }\n\n // Check if it's a file from Bynder\n if ($file->getStorage()->getDriverType() !== BynderDriver::KEY) {\n return;\n }\n\n // @todo: adjust the $uri parameter to post real links\n // left this out for now because we also need to take care\n // of updating the usage is the link changes\n\n // Notify Bynder that the file is used\n GeneralUtility::makeInstance(BynderService::class)->addAssetUsage(\n $file->getIdentifier(),\n $record['tablenames'] . ':' . $record['uid_foreign'],\n $this->getUsageReference($record['tablenames'], $record['uid_foreign'])\n );\n }", "private function createUID()\n {\n $this->connection = new Connect(SERVER,USER,PASSWORD);\n $link = $this->connection;\n $link->setDatabase(DATABASE);\n $query = \"SELECT LAST(UID) AS LastUID FROM USERS\";\n $last_known_UID = $link->getQuery(DATABASE,$query);\n $generator = $last_known_UID['LastUID'];\n $split = explode(\"-\",$generator);\n //generating user ID\n $new_suffix = is_int($split[1])? $split[1] + 1: die(\"fatal error occurred\");\n $pref = substr($this->fname,0,3);\n $comp = compact($pref,$new_suffix);\n $uid = implode(\"-\",$comp);\n return $uid;\n\n }", "public function getDataWithTypeFileReturnsUidOfFileObject() {}", "public function gen_uid() {\n\t\t$this->uid = Util::get_uid();\n\t}", "function storeFile($name, $filetype, $userId) {\n $time = time();\n require_once(dirname(__FILE__) . '/../helpers/database_helper.php');\n\n $sql = sqlSetup();\n $query = \"INSERT INTO FILES (NAME, UID, UPLOADED, ACCESSED, FILETYPE)\n VALUES\n ('$name', $userId, $time, $time, '$filetype')\";\n mysqli_query($sql, $query) or die(\"A MySQL error has occurred.<br />Error: (\" . mysqli_errno($sql) . \") \" . mysqli_error($sql));\n $query = \"SELECT LAST_INSERT_ID()\";\n $result = mysqli_query($sql, $query) or die(\"A MySQL error has occurred.<br />Error: (\" . mysqli_errno($sql) . \") \" . mysqli_error($sql));\n $row = mysqli_fetch_row($result);\n $id = $row[0];\n return $id;\n}", "public function createFileReference(\n FileInterface $file,\n int $uid,\n string $fieldName,\n string $tableName\n ): int\n {\n try {\n $this->file = $file;\n $this->fieldName = $fieldName ?? 'image';\n $this->tableName = NamingUtil::resolveTableName($tableName ?? 'tt_content');\n \n $this->tableQuery = $this->dbService->getQuery($tableName)\n ->withIncludeHidden()\n ->withWhere(['uid' => $uid]);\n \n $this->row = $this->tableQuery->getFirst();\n \n if (empty($this->row)) {\n throw new FalException(\n 'There is no record (' . $tableName . ') with uid: ' . $uid . ' to create a file reference for');\n }\n \n return TcaUtil::runWithResolvedTypeTca($this->row, $this->tableName, function (array $tca) {\n return $this->handleCreationForType($tca);\n });\n } finally {\n $this->reset();\n }\n }", "function file_insert\n(\n\t$parentid /*int(10)*/, \t\t\t/* should have null or 0 value for upper level */\n\t$filename /*varchar(100)*/, \n\t$filetypeid /*int(10)*/, \t\t/* the entry's type. null if $isfolder = 1 */\n\t$isfolder /* bit */, \t\t\t/* the entry is folder */\n\t$isprotected /* bit */,\t\t\t/* the entry is protected (client can't delete entry). for dictionaries */\n\t$comment /*varchar(1000)*/,\n\t$createdby /*varchar(50)*/ \t\t/* client host name */\n) \n{\n\tglobal $dbref;\n\n\topensql();\n\n\t$statement = $dbref->prepare ( 'CALL file_insert (?, ?, ?, ?, ?, ?, ?)' );\n\t\n\t$statement->bind_param( 'isiiiss', $parentid, $filename, $filetypeid, $isfolder, $isprotected, $comment, $createdby );\n\n\t$statement->execute();\n\t$statement->bind_result($result);\n\t$statement->fetch();\n\t$statement->close();\n\n\tclosesql();\n\treturn $result;\n}", "public function insertFile($user, $chef, $file_name){\r\n\t\treturn $this->insertFileIntoDataBase($user, $chef, $file_name);\r\n\t}", "protected function createFileReferenceFromFalFileObject($file, $userUid)\n {\n $fields = [\n 'pid' => (int) $this->extConfig['users.']['storagePid'],\n 'crdate' => time(),\n 'tstamp' => time(),\n 'table_local' => 'sys_file',\n 'uid_local' => $file->getUid(),\n 'tablenames' => 'fe_users',\n 'uid_foreign' => $userUid,\n 'fieldname' => 'image',\n ];\n\n $GLOBALS['TYPO3_DB']->exec_INSERTquery('sys_file_reference', $fields);\n }", "function tv_comSet($uid,$file)\r\n\t\t\t\t {\r\n\t\t\t\t\t$updateArray = array(\r\n\t\t\t\t\t'tstamp'\t\t\t=>\ttime(),\r\n\t\t\t\t\t'fileref'\t\t\t=>\t$file.'.cachetmp',\r\n\t\t\t\t\t'fileref_md5'\t\t=>\tmd5($file.'.cachetmp')\r\n\t\t\t\t\t);\t\t\t\t\t\t\t\r\n\t\t\t\t\t$query = $GLOBALS['TYPO3_DB']->UPDATEquery('tx_templavoila_tmplobj', 'uid=\"'.$uid.'\"', $updateArray);\t\t\r\n\t\t\t\t\t$res = $GLOBALS['TYPO3_DB']->sql(TYPO3_db, $query);\t\t\t\r\n\t\t\t\t }", "public function create($file_column_name = false) {\n if (!$file_column_name)\n $file_column_name = 'userfile';\n if (isset($_FILES[$file_column_name]) and !empty($_FILES[$file_column_name]['name'])) {\n $auth = AuthHandler::getInstance();\n $auth->check();\n $validator = Validator::getInstance();\n $file_data = $validator->ValidateAllByMask($_FILES[$file_column_name], 'fileUploadMask');\n if (!$file_data) {\n ErrorHandler::throwException(FILE_UPLOAD_ERROR,'page');\n }\n $file = new Files(['name'=>$file_data['name'],'tmp_path'=>$_FILES[$file_column_name]['tmp_name']]);\n if (!$file->checkMime()) {\n ErrorHandler::throwException(FILE_UPLOAD_ERROR, 'page');\n }\n $size = filesize($_FILES[$file_column_name]['tmp_name']);\n if (($file_data[\"size\"] > MAX_FILE_UPLOAD_SIZE) or ($size > MAX_FILE_UPLOAD_SIZE)) {\n ErrorHandler::throwException(FILE_SIZE_ERROR,'page');\n }\n $id = $file->generateId();\n $this->last_file_id = $id;\n $conn = DBConnection::getInstance();\n $conn->startTransaction();\n if (!$file->createFile()){\n $conn->rollback();\n ErrorHandler::throwException(FILE_UPLOAD_ERROR,'page');\n }\n if (!$file->createFileRoles()){\n $conn->rollback();\n ErrorHandler::throwException(FILE_UPLOAD_ERROR,'page');\n }\n $file_name = $file->getFileFromBase();\n if (!$file->makeThumbnail()){\n $conn->rollback();\n ErrorHandler::throwException(FILE_UPLOAD_ERROR,'page');\n }\n if ($file->upload(STORAGE.$file_name)) {\n $file->addToZip();\n $conn->commit();\n return $id;\n //ErrorHandler::throwException(FILE_UPLOAD_SUCCESS,'page');\n } else {\n $conn->rollback();\n ErrorHandler::throwException(FILE_UPLOAD_ERROR,'page');\n }\n unset($file);\n unset($conn);\n\n } else{\n return NULL;\n }\n }", "public function new_file_no()\n {\n //get the privious file number and increment it to create a new file number\n $query = $this->new_record_value(\"patient_id\", \"patient\", \"file_no\");\n \n if($query->num_rows() == 1)\n {\n //get previous file number\n $previous_file_no = $query->row(0)->file_no;\n \n //get integer version of the file number\n $file_integer_val = substr($previous_file_no, 2, strlen($previous_file_no));\n \n return $file_no = sprintf(\"FI%08d\", ++$file_integer_val);\n }\n else\n {\n return null;\n }\n }", "function getmyuid()\n{\n\treturn 0;\n}", "public function getExtraUid() {\r\n if (!$this->extra_uid) {\r\n if (!$this->getUid()) {\r\n return 0;\r\n# t3lib_div::debug('tried to call getExtraUid() before a record was written');\r\n# t3lib_div::debug(debug_backtrace());\r\n }\r\n $this->extra_uid = self::createExtraRecord($this->getUid(), $this->getTable());\r\n }\r\n return intval($this->extra_uid);\r\n }", "private static function db_insert_upload($uid, $timestamp, $fileid){\n\t\t\n\t\t$query=OC_DB::prepare('INSERT INTO `*PREFIX*mn_uploads`(`uid`, `timestamp`, `path`) VALUES(?,?,?)');\n\t\t$result=$query->execute(array($uid, $timestamp, $fileid));\n\t\n\t\tif (OC_DB::isError($result) ) {\n\t\t\t\\OCP\\Util::writeLog('mailnotify', 'Failed to add new notification in the notify database Result='.$result, \\OCP\\Util::ERROR);\n\t\t}\t\n\t\treturn $result;\n\t}", "function create_one($owner, $name, $originalName) {\n $this->owner = $owner;\n $this->name = $name;\n $this->original_name = $originalName;\n return ($this->db->insert('files', $this)) ? $this->db->insert_id() : false;\n }", "public function getNewInsertedIdFiles()\n\t{\n\t\t$newInsertedId = $GLOBALS['xoopsDB']->getInsertId();\n\t\treturn $newInsertedId;\n\t}", "function getNewUserNumber() {\n global $fileName;\n if (file_exists($fileName)) {\n $data = file($fileName);\n $lastUserData = explode('!', $data[count($data) - 1]);\n $nextUserNumber = $lastUserData[0] + 1;\n } else {\n checkUsersDataFile();\n $nextUserNumber = 2;\n }\n mkdir('Users' . DIRECTORY_SEPARATOR . $nextUserNumber);\n return $nextUserNumber;\n}", "public static function getUidAndFilename($filename) {\n\t\t$uid = Filesystem::getOwner($filename);\n\t\t$userManager = \\OC::$server->getUserManager();\n\t\t// if the user with the UID doesn't exists, e.g. because the UID points\n\t\t// to a remote user with a federated cloud ID we use the current logged-in\n\t\t// user. We need a valid local user to create the versions\n\t\tif (!$userManager->userExists($uid)) {\n\t\t\t$uid = User::getUser();\n\t\t}\n\t\tFilesystem::initMountPoints($uid);\n\t\tif ($uid != User::getUser()) {\n\t\t\t$info = Filesystem::getFileInfo($filename);\n\t\t\t$ownerView = new View('/'.$uid.'/files');\n\t\t\ttry {\n\t\t\t\t$filename = $ownerView->getPath($info['fileid']);\n\t\t\t\t// make sure that the file name doesn't end with a trailing slash\n\t\t\t\t// can for example happen single files shared across servers\n\t\t\t\t$filename = \\rtrim($filename, '/');\n\t\t\t} catch (NotFoundException $e) {\n\t\t\t\t$filename = null;\n\t\t\t}\n\t\t}\n\t\treturn [$uid, $filename];\n\t}", "protected function handleCreationForType(array $tca): int\n {\n $fieldTca = $tca['columns'][$this->fieldName] ?? null;\n \n if (! is_array($fieldTca) ||\n ($fieldTca['config']['type'] ?? null) !== 'inline' ||\n ($fieldTca['config']['foreign_table'] ?? null) !== 'sys_file_reference') {\n throw new FalException(\n 'The field \"' . $this->fieldName . '\" in table: \"' . $this->tableName .\n '\" is not configured as \"inline\" field for \"sys_file_reference\".');\n }\n \n $existingRelations = $this->findExistingRelations($fieldTca);\n $newRelationUid = $this->createNewFileReferenceRow();\n \n $newRelations = array_merge([$newRelationUid], $existingRelations);\n $newRelations = DataHandlerAdapter::applyFilters($fieldTca, $newRelations);\n \n $this->persistNewRelations($fieldTca, $newRelations);\n \n return $newRelationUid;\n }", "public function getFileId();", "public function getIdForFile(FileReference $ref);", "protected function getMetaDataUidByFileUid($fileUid)\n {\n $row = GlobalUtility::getDatabaseConnection()\n ->exec_SELECTgetSingleRow('uid', 'sys_file_metadata', 'file=' . (int)$fileUid);\n return (isset($row['uid'])) ? $row['uid'] : 0;\n }", "function uniqueId()\n{\n $id = NULL;\n \n if( !is_dir('./work/jobs') )\n mkdir('./work/jobs', 0777, true);\n \n // try locking the context file\n $filename = './work/jobs/uniqueId.dat';\n $file = fopen( $filename, \"a+b\", false);\n if( $file )\n {\n if( flock($file, LOCK_EX) )\n {\n fseek($file, 0, SEEK_SET);\n $num = (int)fread($file, 100);\n $num++;\n \n // go back to the beginning of the file and write out the new value\n fseek($file, 0, SEEK_SET);\n ftruncate($file, 0);\n fwrite($file, $num);\n \n // convert the number to a base-32 string for shorter text\n $id = '';\n $digits = \"0123456789ABCDEFGHJKMNPQRSTVWXYZ\";\n while($num > 0)\n {\n $digitValue = $num % 32;\n $num = (int)($num / 32);\n $id .= $digits[$digitValue];\n }\n $id = strrev($id);\n }\n else\n $id = md5(uniqid(rand(), true));\n\n fclose($file);\n }\n \n return $id;\n}", "public static function create_file($uid, $pid, $options = array(), $check_duplicate = TRUE) {\n global $mysql;\n if (!$uid || !$pid) {\n return FALSE;\n }\n $defaults = array(\n 'title' => 'root',\n 'is_directory' => 1,\n 'path' => '/',\n 'type' => 'text/plain',\n 'ext' => '',\n 'content' => '',\n 'permissions' => 555,\n 'updated' => time(),\n 'created' => time()\n );\n $options = self::check_extension($options) + $defaults;\n $options['uid'] = $uid;\n $options['pid'] = $pid;\n try {\n $file = File::get_file_by_path($pid, $options['path']);\n } catch(PathNotFoundException $e) {\n // Silently ignore\n };\n if ($file) {\n $directory = dirname($file->path);\n throw new DuplicateFileExistsException(\"A file with the same name ($file->title) already exists in the same directory ($directory)\", 400);\n }\n $result = $mysql->query(\"SELECT fid FROM file WHERE path='%s' AND title='%s' AND pid=%d AND is_directory=%d\", $options['path'], $options['title'], $options['pid'], $options['is_directory']);\n $mysql->query(\n \"INSERT INTO file(fid, title, is_directory, path, type, ext, content, uid, pid, permissions, updated, created) VALUES('', '%s', %d, '%s', '%s', '%s', '%s', %d, %d, %d, %d, %d)\", \n $options['title'], $options['is_directory'], $options['path'], $options['type'], $options['ext'], $options['content'], $options['uid'], $options['pid'], $options['permissions'], $options['updated'], $options['created']\n );\n return mysql_insert_id();\n }", "public function ownerUID($value = null);", "public function getFileID()\n\t{\n\t\treturn $this->file_id;\n\t}", "function getCurrentFEUID() {\n if($this->_objUserAuth == null)\t{\n \t$this->initUserAuth();\n }\n \n if(isset($GLOBALS[\"TSFE\"]->fe_user->user['uid'])) {\n \treturn $GLOBALS[\"TSFE\"]->fe_user->user['uid'];\n } else return -1;\n }", "public function uid() {\n\t\t\treturn $this->theme . '_' . $this->unique;\n\t\t}", "function getFileId() {\n\t\tif (Config::getVar('debug', 'deprecation_warnings')) trigger_error('Deprecated function.');\n\t\treturn $this->getId();\n\t}", "public function resolveShUid() {}", "function AddNewFileEntry($file_upload_data, $quant, $db, $organism_id, $standard_identifier_type, $standard_identifier_column)\n{\n\t$lockText = \"LOCK TABLES project_files WRITE\";\n\t$stmt = $db->prepare($lockText);\n\t$result = $stmt->execute();\n\t$insertText = \"INSERT INTO project_files (project_id, uploader_user_id, original_file_name, file_name, delimiter, upload_time, impute_missing_values, log2_transform, identifier, \n\t\tfeature_descriptors, quant, filter, branch_id, set_name, organism_id, standard_id_column, standard_id_type) VALUES (:project_id, :uploader_user_id, :original_file_name, :file_name, :delimiter, :upload_time, :impute_missing_values,\n\t\t:log2_transform, :identifier, :feature_descriptors, :quant, :filter, :branch_id, :set_name, :organism_id, :standard_id_column, :standard_id_type)\";\n\t$query_params = array(':project_id' => $file_upload_data['project_id'], ':uploader_user_id' => $file_upload_data['uploader_user_id'], ':original_file_name' => $file_upload_data['original_file_name'],\n\t\t':file_name' => $file_upload_data['file_name'], ':delimiter' => $file_upload_data['delimiter'],\n\t\t':upload_time' => $file_upload_data['upload_time'], ':impute_missing_values' => $file_upload_data['impute_missing_values'], ':log2_transform' => $file_upload_data['log2_transform'],\n\t\t':identifier' => $file_upload_data['identifier'], ':feature_descriptors' => $file_upload_data['feature_descriptors'], \n\t\t':quant' => json_encode($quant), ':filter' => $file_upload_data['filter'], ':branch_id' => $file_upload_data['branch_id'], ':set_name' => $file_upload_data['set_name'],\n\t\t ':organism_id' => $organism_id, ':standard_id_column' => $standard_identifier_column, ':standard_id_type' => $standard_identifier_type);\n$stmt = $db->prepare($insertText);\n$result = $stmt->execute($query_params);\n$file_id = $db->lastInsertID();\n\n$unlockText = \"UNLOCK TABLES\";\n$stmt = $db->prepare($unlockText);\n$result = $stmt->execute();\n\n$identifier_header_array = json_decode($file_upload_data['identifier'], true);\n$feature_descriptor_header_array = json_decode($file_upload_data['feature_descriptors'], true);\n$quant_header_array = $quant;\n$project_id = $file_upload_data['project_id'];\n\n$insertArray = array();\nforeach ($identifier_header_array as $header) {\n\tarray_push($insertArray, array($_SESSION['user'], $project_id, $file_id, $header['header'], $header['userName'], 1,0,0, \"\", \"\", 0));\n}\nforeach ($feature_descriptor_header_array as $header) {\n\tarray_push($insertArray, array($_SESSION['user'], $project_id, $file_id, $header['header'], $header['userName'], 0,1,0, \"\", \"\", 0));\n}\nforeach ($quant_header_array as $header) {\n\tarray_push($insertArray, array($_SESSION['user'], $project_id, $file_id, $header['header'], \"\", 0,0,1, $header['condName'], $header['repName'], $header['control']===\"Yes\" ? 1 : 0));\n}\n\n$row_length = count($insertArray[0]);\n$nb_rows = count($insertArray);\n$length = $row_length * $nb_rows;\n\n$args = implode(',', array_map(\n\tfunction($el) { return '('.implode(',', $el).')'; },\n\tarray_chunk(array_fill(0, $length, '?'), $row_length)\n\t));\n\n$query_params = array();\nforeach($insertArray as $array)\n{\n\tforeach($array as $value)\n\t{\n\t\t$query_params[] = $value;\n\t}\n}\n\n$insertText = \"INSERT INTO project_file_headers (uploader_user_id, project_id, file_id, header_text, user_header_name, is_unique_id, is_feature_metadata, is_quant_data, condition_name, replicate_name, is_control) VALUES \" . $args;\n$stmt = $db->prepare($insertText);\n$result = $stmt->execute($query_params);\n\nreturn $file_id;\n\n}", "public function multiple_create($file_column_name = false) {\n if (!$file_column_name)\n $file_column_name = 'userfile';\n if (isset($_FILES[$file_column_name]) and !empty($_FILES[$file_column_name]['name'])\n and !in_array(\"4\",$_FILES[$file_column_name]['error'])) {\n $auth = AuthHandler::getInstance();\n $auth->check();\n $validator = Validator::getInstance();\n $file_data = $validator->ValidateAllByMask($_FILES[$file_column_name], 'filesUploadMask');\n if ($file_data === false) {\n ErrorHandler::throwException(FILE_UPLOAD_ERROR,'page');\n }\n $new_files_data=[];\n foreach ($file_data as $key=>$value){\n $i = 0;\n foreach ($value as $item) {\n $new_files_data[$i][$key] = $item;\n $i++;\n }\n }\n $files_id=[];\n $conn = DBConnection::getInstance();\n foreach ($new_files_data as $new_file_data) {\n $file = new Files(['name' => $new_file_data['name'], 'tmp_path' => $new_file_data['tmp_name']]);\n if (!$file->checkMime()) {\n ErrorHandler::throwException(FILE_UPLOAD_ERROR, 'page');\n }\n $size = filesize($new_file_data['tmp_name']);\n if (($new_file_data[\"size\"] > MAX_FILE_UPLOAD_SIZE) or ($size > MAX_FILE_UPLOAD_SIZE)) {\n ErrorHandler::throwException(FILE_SIZE_ERROR, 'page');\n }\n $id = $file->generateId();\n $this->last_file_id = $id;\n $conn->startTransaction();\n if (!$file->createFile()) {\n $conn->rollback();\n ErrorHandler::throwException(FILE_UPLOAD_ERROR, 'page');\n }\n if (!$file->createFileRoles()) {\n $conn->rollback();\n ErrorHandler::throwException(FILE_UPLOAD_ERROR, 'page');\n }\n $file_name = $file->getFileFromBase();\n if (!$file->makeThumbnail()) {\n $conn->rollback();\n ErrorHandler::throwException(FILE_UPLOAD_ERROR, 'page');\n }\n if ($file->upload(STORAGE . $file_name)) {\n $file->addToZip();\n $conn->commit();\n $files_id[] = $id;\n //ErrorHandler::throwException(FILE_UPLOAD_SUCCESS,'page');\n } else {\n $conn->rollback();\n ErrorHandler::throwException(FILE_UPLOAD_ERROR, 'page');\n }\n unset($file);\n }\n unset($conn);\n return $files_id;\n } else{\n return NULL;\n }\n }", "public function uid() { return $this->_m_uid; }", "function _save_file_managed_image($fid) {\n global $user;\n // Load the file via file.fid.\n $file = file_load($fid);\n // Change status to permanent.\n $file->status = FILE_STATUS_PERMANENT;\n // Save.\n file_save($file);\n // Record that the module (in this example, user module) is using the file. \n file_usage_add($file, 'user', 'user', $user->uid);\n}", "public function create_user_id(){\n\t\tglobal $con;\n\t\t$query=mysqli_query($con,\"SELECT user_id FROM system_users ORDER BY user_id DESC LIMIT 1\");\n\t\t$result=mysqli_fetch_assoc($query);\n\t\t$id=$result['user_id'];\n\t\tsettype($id, 'integer');\n\t\t$id=$id+1;\n\n\t\treturn $id;//return new create id\n\t}", "public function getFileCreationNumber()\n\t{\n\t\t$limit = 4;\n\t\treturn sprintf('%0'.$limit.'d', $this->fileCreationNumber);\n\t}", "public function getFile_id()\n {\n return $this->file_id;\n }", "function add_upload_info($db, $username, $filename)\n{\n\t$sql = \"INSERT INTO tmp_tbl (id, val) VALUES (?, ?)\";\n\t$statement = $db->prepare($sql);\n\tif (false == ($statement->execute(array($username, $filename)))) {\n echo 'error executing statement: ' . $statement->errorCode();\n print_r($statement->errorInfo());\n }\n}", "function db_add($user, $filepath)\n\t{\n\t\tif (($serial_tab = db_get($filepath)) === FALSE)\n\t\t\treturn FALSE;\n\t\t$serial_tab[] = $user;\n\t\tif (db_save($serial_tab, $filepath) === FALSE)\n\t\t\treturn FALSE;\n\t\treturn TRUE;\n\t}", "private function Init_Ecld_File_Table()\n\t{\n\t\t$init_ecld_file_query = \"\n\t\t\tINSERT\tINTO ecld_file\n\t\t\t SET\tdate_created = now(),\n\t\t\t\tcompany_id = '{$this->company_id}',\n\t\t\t\tecld_file_content = '',\n\t\t\t\tremote_filename = '',\n\t\t\t\tfile_status = 'created',\n\t\t\t\tclient_identifier = ''\n\t\t\t\";\n\n\t\t$st = $this->db->query($init_ecld_file_query);\n\t\t$this->ecld_file_id = $st->lastInsertId();\n\t}", "public function getFileId()\n {\n return $this->file_id;\n }", "function insert($row) {\n $query = $this->getStatement(\n \"INSERT INTO `$this->table` (\n type_id,\n upload_date,\n file_date,\n file_path\n ) \n VALUES (\n :typeID,\n :uploadDate,\n :fileDate,\n :filePath\n )\"\n );\n $query->execute($row);\n return $this->db->lastInsertId();\n }", "public function getUid() {}", "public function getUid() {}", "public function getUid() {}", "public function getUid() {}", "public function getUid() {}", "public function getFileMigration() {\n return $this->id() . '__file';\n }", "protected function getNewUid()\n {\n $this->_uid = rand(0x00, 0xFFFF);\n return $this->_uid;\n }", "public function getUid() {}", "function generateUID()\n {\n if (method_exists($this->_wrapper, 'generateUID')) {\n return $this->_wrapper->generateUID();\n } else {\n return parent::generateUID();\n }\n }", "function file_name($target_path, $reclam_id)\n{\n global $start;\n $insert = \"INSERT INTO files (file_name , reclam_id) VALUES (?,?)\";\n $request = $start->prepare($insert);\n $request->execute(\n array(\n $target_path,\n $reclam_id\n )\n );\n}", "public function registerUsersFile($usr_id,$filePath){\n\t\t$usr_id = $this->myencode($usr_id);\n\t\t$filePath = $this->myencode($filePath);\n\t\t$date = $this->dategen();\n\t\t\n\t\t$sql = \"INSERT INTO users_file(usr_id, filePath, datereg) VALUES('$usr_id', '$filePath', '$date')\";\n\t\tif(mysqli_query($this->conn(), $sql)){\n\t\t\treturn \"success\";\n\t\t}else{\n\t\t\treturn \"errUnk\";\n\t\t}\n\t}", "function newsItemFile_CreateID( $tbl_newsfile ){\n\t\t$sql = mysql_query(\"SELECT * FROM $tbl_newsfile ORDER BY id DESC\"); \n\t\t$data =\tmysql_fetch_array($sql);\n\t\t$CID = $data[\"id\"];\n\t\t$CID = $CID+1; \n\t\treturn $CID;\n\t}", "function addFile($device, $fileType, $file) {\r\n $md5 = md5_file($file, false);\r\n DB::query(\"INSERT INTO files SET `fileName`=%s, `MD5`=%s, `fileSize`=%s, `deviceName`=%d, `fileType`=%d, `baseName`=%s\",\r\n $file,\r\n $md5,\r\n human_filesize(filesize($file)),\r\n getDeviceId($device),\r\n getFileTypeId($fileType),\r\n basename($file)\r\n );\r\n}", "public function generateUID()\n {\n \tdo {\n \t\t$uid = sha1(microtime());\n \t} while ($this->getQuery()->where('uid', $uid)->count());\n\n \treturn $uid;\n }", "public function uid(){\n return $this->getValue(\"uid\");\n }", "public function getRecordUid(): int\n {\n return (int)($this->rawData['databaseRow']['uid'] ?? 0);\n }", "function insert_image_directly($friendly_name,$file_name,$image_feed) {\n\n\t\t// Register the new image in the database\n\t\t$sql = \"INSERT INTO uploaded_images (filename, friendly_name, image_feed, date_uploaded) VALUES (:file, :name, :feed, now())\";\n\t\t$stmt = $this->pdo->prepare($sql);\n\t\t$stmt->bindValue(\"name\", $friendly_name, PDO::PARAM_STR );\n\t\t$stmt->bindValue(\"file\", $file_name, PDO::PARAM_STR );\n\t\t$stmt->bindValue(\"feed\", $image_feed, PDO::PARAM_STR );\n\t\t$stmt->execute();\n\t\t$this->last_entry_id = $this->pdo->lastInsertId();\n\n\t\treturn $this->last_entry_id;\n\t}", "protected function createFileReference(\n File $file,\n int $uidForeign,\n int $pid,\n int $languageUid = 0,\n string $fileReferenceClass = null\n ): FileReference {\n /** @var FileReference $fileReference */\n $fileReference = GeneralUtility::makeInstance($fileReferenceClass ?? FileReference::class);\n\n $newFileReferenceObject = $this->getResourceFactory()->createFileReferenceObject(\n [\n 'uid_local' => $file->getUid(),\n 'uid_foreign' => $uidForeign,\n 'uid' => uniqid('NEW_')\n ]\n );\n\n $fileReference->setOriginalResource($newFileReferenceObject);\n $fileReference->setPid($pid);\n $fileReference->_setProperty('_languageUid', $languageUid); // Extbase doesn't set this automatically\n\n return $fileReference;\n }", "function posix_getuid()\n{\n\treturn 0;\n}", "public function getFileId() {\r\n\t\treturn (int)$this->file_id;\r\n\t}", "function getFileId($path) {\n global $collection;\n $idFile = Files::getFileId($collection, $path, false);\n if (DB::isError($idFile)) { die($idFile->getUserInfo() . \"\\n\"); }\n if ($idFile < 0) { print \"File '$collection, $path' id is < 0\\n\"; }\n return $idFile;\n}", "function file_copy\n(\n\t$fileid,\n\t$dest_ancestorid /* int(10) */,\n\t$createdby /*varchar(50)*/ \t\t/* client host name */\n)\n{\n\tglobal $dbref;\n\n\topensql();\n\n\tif ($dest_ancestorid == '' || is_null($dest_ancestorid)) $dest_ancestorid = 'null';\n/*\n\techo 'CALL file_copy ('.$fileid.', '.$dest_ancestorid.', \\''.$createdby.'\\')';\n\treturn;\n*/\n\tif (!$dbref->multi_query('CALL file_copy ('.$fileid.', '.$dest_ancestorid.', \\''.$createdby.'\\')')) {\n\t echo \"There was an error during file_copy''s call: (\" . $dbref->errno . \") \" . $dbref->error;\n\t}\n\n\tdo {\n\t if ($res = $dbref->store_result()) {\n\t $result = $res->fetch_all();\n\t $res->free();\n\t } else {\n\t if ($dbref->errno) {\n\t echo 'Cant gather results from file_copy: (' . $dbref->errno . ') ' . $dbref->error;\n\t }\n\t }\n\t} while ($dbref->more_results() && $dbref->next_result());\n\n\n\t/*if ($dest_ancestorid == 0 ) $dest_ancestorid = null;*/\n/*\n\t$statement = $dbref->prepare ( 'CALL file_copy (?, ?, ?)' );\n\t$statement->bind_param( 'iis', $fileid, $dest_ancestorid, $createdby );\n\n\t$statement->execute();\n\n\t$res = $statement->get_result();\n\t$res->fetch_all();\n\t\n\t$statement->bind_result( $result );\n\t$statement->fetch();\n\t\n\t$statement->close();\n*/\n\n\t$result = 1;\n\tclosesql();\n\treturn $result;\t\n}", "public function get_uid() {\n\t\treturn $this->uid;\n\t}", "function mknewDocFeld() {\n\n $newID = uniqid (rand());\n $sql = \"insert into docfelder (beschreibung) values ('$newID')\";\n $rc = $GLOBALS['dbh']->query($sql);\n if ( $rc ) {\n $sql = \"select fid from docfelder where beschreibung = '$newID'\";\n $rs = $GLOBALS['dbh']->getOne($sql);\n if ( $rs ) {\n $id = $rs[\"fid\"];\n } else {\n $id = false;\n }\n } else {\n $id = false;\n }\n return $id;\n}", "public static function UID()\n {\n return 'agixmpp_'.self::$_uid++;\n }", "function referentiel_copy_document_file($referentiel_referentiel_id, $user_creator, $userid, $file_uri) {\r\n // Moodle 1.9 :: $file_uri= 2/moddata/referentiel/1/3/arrete-C2i2eVDef.pdf\r\n // Moodle 2.x :: $file_uri= /contextid/mod_referentiel/document/ID/arrete-C2i2eVDef.pdf\r\n // /153/mod_referentiel/document/4/referentiel-epc.csv\r\n global $CFG;\r\n require_once($CFG->libdir.'/filelib.php');\r\n \r\n $status = 0;\r\n\r\n //First we check that \"user_files\" exists and create it if necessary\r\n //in temp/archive/$backup_code dir\r\n if (referentiel_check_and_create_document_files_dir($referentiel_referentiel_id, $user_creator, $userid)){\r\n $fullpath=$file_uri;\r\n // Traitement de $fullpath\r\n if ($fullpath && preg_match('/\\//', $fullpath)){\r\n $t_fullpath=explode('/',$fullpath,6);\r\n if (!empty($t_fullpath) && empty($t_fullpath[0])){\r\n $garbage=array_shift($t_fullpath);\r\n }\r\n if (!empty($t_fullpath)){\r\n list($contextid, $component, $filearea, $itemid, $path ) = $t_fullpath;\r\n if ($path){\r\n if (preg_match('/\\//', $path)){\r\n $filename=substr($path, strrpos($path, '/')+1);\r\n $path='/'.substr($path, 0, strrpos($path, '/')+1);\r\n }\r\n else{\r\n $filename=$path;\r\n $path='/';\r\n }\r\n }\r\n }\r\n }\r\n\r\n // echo \"<br />DEBUG :: lib.php :: Ligne 5918 ::<br /> $contextid, $component, $filearea, $itemid, $path, $filename\\n\";\r\n // devrait afficher cas 0 :: 0, mod_referentiel, referentiel, 0, /, jf44.png\r\n // devrait afficher cas 1 :: 30, mod_referentiel, referentiel, 0, /rep1/rep2/, jf44.png\r\n // devrait afficher cas 2 :: 51, mod_referentiel, referentiel, 12, /, jf44.png\r\n $fs = get_file_storage();\r\n // Get file\r\n $file = $fs->get_file($contextid, $component, $filearea, $itemid, $path, $filename);\r\n if ($file) {\r\n // DEBUG\r\n // echo \"<br />DEBUG :: 220 :: $filename\\n\";\r\n // print_object($file);\r\n // echo \"<br />CONTENU\\n\";\r\n $contents = $file->get_content();\r\n // echo htmlspecialchars($contents);\r\n // $filesize = $file->get_filesize();\r\n // $filename = $file->get_filename();\r\n // $mimetype = $file->get_mimetype();\r\n // $timecreated = userdate($file->get_timecreated(),\"%Y/%m/%d-%H:%M\",99,false);\r\n // $timemodified = userdate($file->get_timemodified(),\"%Y/%m/%d-%H:%M\",99,false);\r\n // $link= new moodle_url($CFG->wwwroot.'/pluginfile.php/'.$contextid.'/mod_referentiel/'.$filearea.'/'.$itemid.'/'.$filename);\r\n // $url='<a href=\"'.$link.'\" target=\"_blank\">'.$filename.'</a><br />'.\"\\n\";\r\n\r\n $file_dest_path_name=\"document_files/\".$userid.\"/\".$filename;\r\n //exit;\r\n // Moodle 2.0\r\n // $f=fopen($CFG->dataroot.\"/temp/archive/\".$referentiel_referentiel_id.\"/\".$user_creator.\"/\".$file_dest_path_name,\"w\");\r\n // Moodle 22\r\n $path_temp = cleardoubleslashes(get_string('archivetemp', 'referentiel').'/'.$referentiel_referentiel_id.'/'.$user_creator);\r\n // Moodle 2.2\r\n $temp_dir=make_temp_directory($path_temp);\r\n $f=fopen(cleardoubleslashes($temp_dir.\"/\".$file_dest_path_name),\"w\");\r\n\r\n $status=fwrite($f, $contents);\r\n fclose($f);\r\n }\r\n }\r\n if ($status){\r\n return $file_dest_path_name;\r\n }\r\n else{\r\n return '';\r\n }\r\n }", "function mknewDocVorlage() {\n\n $newID = uniqid (rand());\n $sql = \"insert into docvorlage (vorlage) values ('$newID')\";\n $rc = $GLOBALS['dbh']->query($sql);\n if ( $rc ) {\n $sql = \"select docid from docvorlage where vorlage = '$newID'\";\n $rs = $GLOBALS['dbh']->getOne($sql);\n if ( $rs ) {\n $id = $rs[\"docid\"];\n } else {\n $id = false;\n }\n } else {\n $id = false;\n }\n return $id;\n}", "public static function createExtraRecord($uid, $table, $force = false) {\r\n if (!$force) {\r\n /// Check if record is already present in extra table\r\n $row = tx_newspaper::selectZeroOrOneRows(\r\n 'uid', self::$table,\r\n 'extra_table = ' . $GLOBALS['TYPO3_DB']->fullQuoteStr($table, $table) .\r\n ' AND extra_uid = ' . intval($uid)\r\n );\r\n if ($row['uid']) {\r\n return $row['uid'];\r\n }\r\n }\r\n\r\n /// Read Typo3 fields to copy into extra table\r\n $row = tx_newspaper::selectOneRow(\r\n implode(', ', self::$fields_to_copy_into_extra_table),\r\n $table,\r\n 'uid = ' . intval($uid)\r\n );\r\n\r\n /// Write the uid and table into extra table, with the values read above\r\n $row['extra_uid'] = $uid;\r\n $row['extra_table'] = $table;\r\n $row['tstamp'] = time(); /// \\c tstamp is set to now\r\n\r\n return tx_newspaper::insertRows(self::$table, $row);\r\n }", "public function generate_forgotten_password_uid() {\n // Generate the ID\n $uid = uniqid();\n // Associate it with the user (ie. write it to the db)\n $sql = \"UPDATE users SET forgotten_password_uid = '\".$uid.\"' WHERE id = \".$this->id.\"\";\n if (!$query = $this->db->query($sql)) {throw new Exception(\"Unable to generate UID for forgotten password: \".$this->db->error,PEAR_LOG_ERR);}\n // Associate it with this object\n $this->forgotten_password_uid = $uid;\n\n return $uid;\n }", "public function generateUID()\n\t{\n\t\t$this->uid = $this->genUuid();\n\t\t$this->uid = strtoupper($this->uid);\n\t}", "function insert_resource($src, $server, $uid, $file_name, $file_type, $file_size, $file_width, $file_height) {\n $db = $this->App()->db();\n if(empty($src) || empty($server) || empty($uid)) {\n return -1;\n }\n \n if(empty($file_name) \n // || empty($file_type) \n || empty($file_size) \n || empty($file_width) \n || empty($file_height)) \n {\n return -2;\n }\n\n $fields = array(\n 'src' => $src,\n 'server' => $server,\n 'file_name' => $file_name,\n 'file_type' => $file_type,\n 'file_size' => $file_size,\n 'width' => $file_width,\n 'height' => $file_height,\n 'creator_uid' => $uid\n );\n \n \n $sql = $db->insertSQL('images_resource', $fields);\n $result = $db->execute($sql);\n if(!$result) \n return -1;\n\n return $db->get_insert_id();\n }", "private function create_file_name(){ \n $file_name = date('Tmd').'_'.md5( $_FILES['userfile']['name']. microtime());\n return $file_name;\n }", "function b1n_regAddFilePlus($sql, &$ret_msgs, $reg_data, $reg_config)\n{\n if(move_uploaded_file($_FILES['file']['tmp_name'], b1n_UPLOAD_DIR . \"/fil_\" . $reg_data['id']))\n {\n $query = \"\n UPDATE\n \\\"file\\\"\n SET\n fil_fake_name = '\" . b1n_inBd($reg_data['fil_fake_name']) . \"'\n WHERE\n fil_id = '\" . b1n_inBd($reg_data['id']) . \"'\";\n\n $rs = $sql->query($query);\n\n if($rs)\n {\n return true;\n }\n }\n\n b1n_retMsg($ret_msgs, b1n_FIZZLES, \"Unexpected Error! Could not update 'file' table...\");\n return false;\n}", "final protected function generate_uid() {\n\t\treturn md5(uniqid(mt_rand(),true));\n\t}", "protected function getNewRecordPid() {\n\t\treturn $this->getLoggedInUser()->getRegistrationFolderFromGroup();\n\t}", "public function create_user()\n {\n $state = file_exists($this->_PM_['path']['userbase'].'/'.$this->uid.'/core/');\n if (!$state) {\n $state = basics::create_dirtree($this->_PM_['path']['userbase'].'/'.$this->uid.'/core/');\n }\n if (!$state) {\n $this->errortext = 'Could not create dir '.$this->_PM_['path']['userbase'].'/'.$this->uid.'/core/';\n }\n return $state;\n }", "function file_id() {\n // The default file_id is the filename. Destinations can override the file_id if needed.\n return isset($this->file_info['file_id']) ? $this->file_info['file_id'] : $this->filename();\n }", "function makeTempUserId() {\n\t\t// mark as temporary id to prevent confusion with permanent ids\n\t\t$id = \"S\".makeId(5);\n\n \t\t// if not unique, try again\n \t\twhile (isUniqueTempUserId($id) == False) {\n \t\t\t$id = \"S\".makeId(5);\n \t\t}\n\n \t\tsetTempUserId($id);\n\n\t\treturn $id;\n\t}", "public function add($uid, $file, $type = 'primary') {\n $image = new \\Imagick(ROOT_DIR . $file);\n $hash = $this->hash($image);\n $width = $this->width($image);\n $height = $this->height($image);\n $size = $this->size($image);\n $format = $this->format($image);\n\n $query = new \\Peyote\\Insert('media');\n $query->columns(['uid', 'file', 'width', 'height', 'size', 'hash', 'format', 'type'])\n ->values([$uid, $file, $width, $height, $size, $hash, $format, $type]);\n $this->db->fetch($query);//need to verify this was successful\n }", "function setPrimaryResource($content_id, $file_name, $lang){\n\t\tinclude_once(TR_INCLUDE_PATH.'classes/DAO/PrimaryResourcesDAO.class.php');\n\t\t$primaryResourcesDAO = new PrimaryResourcesDAO();\n\t\t\n\t\tif ($primaryResourcesDAO->Create($content_id, $file_name, $lang)){\n\t\t\treturn mysql_insert_id();\n\t\t}\n\t\treturn false;\n\t}", "function insertFile( $fileName, $fileSize, $userFileFrom, $mimeType=\"\" )\r\n {\r\n $fileNameTmp = fileTools::add_ext_on_mime($fileName, $mimeType);\r\n\r\n /*** Handle Scripts files ***/\r\n $fileNameTmp = fileTools::php2phps($fileNameTmp);\r\n if ( fileTools::check_name_exist( $fileNameTmp ) ) {\r\n return 2;\r\n } else {\r\n if( ! $fileName ) {\r\n $fileName = $fileNameTmp;\r\n }\r\n\r\n //$userFileTo = \"/Library/WebServer/Documents/migueloo/var/data/\" . $fileName;\r\n\t\t\t\t\t\t$userFileTo = Util::formatPath(MIGUEL_APPDIR.'var/data/'.$fileName);\r\n move_uploaded_file( $userFileFrom, $userFileTo );\r\n\r\n return 0;\r\n\r\n }\r\n return 2;\r\n }", "public function createIssueIdentifier() {\n\t\treturn md5($this->extensionName . '/' . $this->filePath . '-' . $this->lineNumber);\n\t}", "public function insertUserShip($info)\n { \n $tbName = $this->getTableName($info['uid']);\n $this->_wdb->insert($tbName, $info);\n return $this->_wdb->lastInsertId();\n }", "public function getID() {\n\t\tif(!$this->id) {\n\t\t\tforeach($this->files as $file) {\n\t\t\t\t$this->id = sha1($this->id . sha1_file($file));\n\t\t\t}\n\t\t}\n\t\treturn $this->id;\n\t}", "function hook_file_transfer_alter($file_user, $ip, $fid, $file) {\n $file_data = file_get_contents($file) .\" [insert personalized data]\"; // For large files this might be too memory intensive\n $new_file = tempnam(file_directory_temp(), 'tmp');\n file_put_contents($new_file, $file_data);\n return $new_file;\n}", "public function uid(): int\n {\n return $this->config->uid();\n }", "public function getRevisionedFileMigration() {\n return $this->id() . '__r_file';\n }", "protected function generateID()\r\n {\r\n $id = ftok(__FILE__, \"b\");\r\n return $id;\r\n }", "function getFileId(){\n\n return $this->id;\n }", "function getFileId() {\n\t\treturn $this->getData('fileId');\n\t}", "function filecabinet_doclink_insert_row($docname, $xnid, $nodetype, $linktype) {\n module_load_include('inc', 'filecabinet', 'filecabinet_form');\n $dnid = filecabinet_validate_docname($docname);\n db_query(\"INSERT INTO {org_doclinks} (dnid, xnid, nodetype, linktype) VALUES (%d, %d, '%s', '%s')\",\n $dnid,\n $xnid,\n $nodetype,\n $linktype);\n}", "public function get_uid() {\n return $this->uid;\n }", "function ERP_custom_file_add( $p_bug_id, $p_file, $p_table = 'bug', $p_title = '', $p_desc = '', $p_user_id = null ) {\n\n\tfile_ensure_uploaded( $p_file );\n\t$t_file_name = $p_file['name'];\n\t$t_tmp_file = $p_file['tmp_name'];\n\n\tif( !file_type_check( $t_file_name ) ) {\n\t\ttrigger_error( ERROR_FILE_NOT_ALLOWED, ERROR );\n\t}\n\n\tif( !file_is_name_unique( $t_file_name, $p_bug_id ) ) {\n\t\ttrigger_error( ERROR_DUPLICATE_FILE, ERROR );\n\t}\n\n\tif( 'bug' == $p_table ) {\n\t\t$t_project_id = bug_get_field( $p_bug_id, 'project_id' );\n\t\t$t_bug_id = bug_format_id( $p_bug_id );\n\t} else {\n\t\t$t_project_id = helper_get_current_project();\n\t\t$t_bug_id = 0;\n\t}\n\n\tif( $p_user_id === null ) {\n\t\t$c_user_id = auth_get_current_user_id();\n\t} else {\n\t\t$c_user_id = (int)$p_user_id;\n\t}\n\n\t# prepare variables for insertion\n\t$c_bug_id = db_prepare_int( $p_bug_id );\n\t$c_project_id = db_prepare_int( $t_project_id );\n\t$c_file_type = db_prepare_string( $p_file['type'] );\n\t$c_title = db_prepare_string( $p_title );\n\t$c_desc = db_prepare_string( $p_desc );\n\n\tif( $t_project_id == ALL_PROJECTS ) {\n\t\t$t_file_path = config_get( 'absolute_path_default_upload_folder' );\n\t} else {\n\t\t$t_file_path = project_get_field( $t_project_id, 'file_path' );\n\t\tif( $t_file_path == '' ) {\n\t\t\t$t_file_path = config_get( 'absolute_path_default_upload_folder' );\n\t\t}\n\t}\n\t$c_file_path = db_prepare_string( $t_file_path );\n\t$c_new_file_name = db_prepare_string( $t_file_name );\n\n\t$t_file_hash = ( 'bug' == $p_table ) ? $t_bug_id : config_get( 'document_files_prefix' ) . '-' . $t_project_id;\n\t$t_unique_name = file_generate_unique_name( $t_file_hash . '-' . $t_file_name, $t_file_path );\n\t$t_disk_file_name = $t_file_path . $t_unique_name;\n\t$c_unique_name = db_prepare_string( $t_unique_name );\n\n\t$t_file_size = filesize( $t_tmp_file );\n\tif( 0 == $t_file_size ) {\n\t\ttrigger_error( ERROR_FILE_NO_UPLOAD_FAILURE, ERROR );\n\t}\n\t$t_max_file_size = (int) min( ini_get_number( 'upload_max_filesize' ), ini_get_number( 'post_max_size' ), config_get( 'max_file_size' ) );\n\tif( $t_file_size > $t_max_file_size ) {\n\t\ttrigger_error( ERROR_FILE_TOO_BIG, ERROR );\n\t}\n\t$c_file_size = db_prepare_int( $t_file_size );\n\n\t$t_method = config_get( 'file_upload_method' );\n\n\tswitch( $t_method ) {\n\t\tcase FTP:\n\t\tcase DISK:\n\t\t\tfile_ensure_valid_upload_path( $t_file_path );\n\n\t\t\tif( !file_exists( $t_disk_file_name ) ) {\n\t\t\t\tif( FTP == $t_method ) {\n\t\t\t\t\t$conn_id = file_ftp_connect();\n\t\t\t\t\tfile_ftp_put( $conn_id, $t_disk_file_name, $t_tmp_file );\n\t\t\t\t\tfile_ftp_disconnect( $conn_id );\n\t\t\t\t}\n\n\t\t\t\t// move_uploaded_file replaced with rename function. Needed since files added through the EmailReporting method are not seen as such\n\t\t\t\tif( !rename( $t_tmp_file, $t_disk_file_name ) ) {\n\t\t\t\t\t// Corrected trigger error message name, FILE_MOVE_FAILED should have been ERROR_FILE_MOVE_FAILED\n\t\t\t\t\ttrigger_error( ERROR_FILE_MOVE_FAILED, ERROR );\n\t\t\t\t}\n\n\t\t\t\tchmod( $t_disk_file_name, config_get( 'attachments_file_permissions' ) );\n\n\t\t\t\t$c_content = \"''\";\n\t\t\t} else {\n\t\t\t\ttrigger_error( ERROR_FILE_DUPLICATE, ERROR );\n\t\t\t}\n\t\t\tbreak;\n\t\tcase DATABASE:\n\t\t\t$c_content = db_prepare_binary_string( fread( fopen( $t_tmp_file, 'rb' ), $t_file_size ) );\n\t\t\tbreak;\n\t\tdefault:\n\t\t\ttrigger_error( ERROR_GENERIC, ERROR );\n\t}\n\n\t$t_file_table = db_get_table( 'mantis_' . $p_table . '_file_table' );\n\t$c_id = ( 'bug' == $p_table ) ? $c_bug_id : $c_project_id;\n\n\t$query = \"INSERT INTO $t_file_table\n\t\t\t\t\t\t(\" . $p_table . \"_id, title, description, diskfile, filename, folder, filesize, file_type, date_added, content, user_id)\n\t\t\t\t\t VALUES\n\t\t\t\t\t\t($c_id, '$c_title', '$c_desc', '$c_unique_name', '$c_new_file_name', '$c_file_path', $c_file_size, '$c_file_type', '\" . db_now() . \"', $c_content, $c_user_id)\";\n\tdb_query( $query );\n\n\tif( 'bug' == $p_table ) {\n\n\t\t# updated the last_updated date\n\t\t$result = bug_update_date( $p_bug_id );\n\n\t\t# log new bug\n\t\thistory_log_event_special( $p_bug_id, FILE_ADDED, $t_file_name );\n\t}\n}", "function insertFileData(){\n\t}", "public function getCr_uid() {\n\t\treturn $this->cr_uid;\n\t}", "function _kfield_upload_save($file) {\n $old_path = $file->filepath;\n $new_path = file_destination(str_replace($file->filename, \n $file->uid.'_'.$file->field_id.'_'.$file->filename, $file->filepath),\n FILE_EXISTS_REPLACE); \n /*TODO(paakwesi): Fix the copy operation--it doesn't seem to work\n if(file_copy($file, $new_path)) { //Copy to the new location\n file_delete($old_path); //And delete from old path\n $file->filepath = $new_path ? $new_path: $file->filepath;\n }*/\n file_set_status($file, FILE_STATUS_PERMANENT);\n # Add the file to the upload table\n // Create a new revision, or associate a new file needed.\n if ($file->new) {\n db_query(\"INSERT INTO {upload} (fid, nid, vid, list, description, weight) VALUES (%d, %d, %d, %d, '%s', %d)\", $file->fid, $file->nid, $file->vid, $file->list, $file->description, $file->weight);\n }else {\n // Update existing revision.\n db_query(\"UPDATE {upload} SET list = %d, description = '%s', weight = %d WHERE fid = %d AND vid = %d\", $file->list, $file->description, $file->weight, $file->fid, $file->vid);\n }\n\n return db_query(\"INSERT INTO {kentry_files} (fid, uid, field_id, \n filename, filepath, filemime, filesize, list, description) VALUES \n (%d, %d, %d, '%s', '%s', '%s', %d, %d, '%s')\", $file->fid, $file->uid, \n $file->field_id, $file->filename, $file->filepath, $file->filemime, \n $file->filesize, $file->list, $file->description);\n}", "abstract public function get_uid( $data=false );" ]
[ "0.58760166", "0.5697423", "0.568461", "0.5678052", "0.55164367", "0.5500278", "0.54475665", "0.54241574", "0.54127806", "0.5412347", "0.5372283", "0.53314555", "0.5286101", "0.52786875", "0.5215034", "0.5132681", "0.5121013", "0.51114655", "0.51000595", "0.50273126", "0.49937618", "0.4971373", "0.49443397", "0.49136272", "0.49081612", "0.4898099", "0.4891453", "0.48839968", "0.48662582", "0.48662415", "0.4856064", "0.48247042", "0.48169082", "0.48150706", "0.4810115", "0.48072708", "0.48049143", "0.4800601", "0.4797876", "0.47810027", "0.47725037", "0.47717932", "0.4770586", "0.47577694", "0.47567484", "0.47567484", "0.47567484", "0.47567484", "0.47559685", "0.47556826", "0.47554287", "0.47536466", "0.47500733", "0.47188932", "0.47168806", "0.47159863", "0.4713503", "0.4711825", "0.47052902", "0.47036266", "0.46980178", "0.46950677", "0.4691753", "0.4688825", "0.46875775", "0.46860275", "0.46832022", "0.4681238", "0.4675854", "0.4671838", "0.4670363", "0.46618345", "0.46595812", "0.46587682", "0.46458557", "0.4644807", "0.46417397", "0.46404737", "0.4625814", "0.4621925", "0.46088406", "0.4598775", "0.45940322", "0.45903906", "0.45825693", "0.45818663", "0.4580178", "0.45795196", "0.45777425", "0.4576965", "0.45739317", "0.45665437", "0.4564625", "0.45595697", "0.455824", "0.45543468", "0.45518705", "0.4544276", "0.4541815", "0.4536939" ]
0.7575936
0
Show Help includes (Usage, Arguments, Description, Options).
Показать справку включает (Использование, Аргументы, Описание, Опции).
public function showHelp() { CLI::write(hkm_lang('CLI.helpUsage'), 'yellow'); if (! empty($this->usage)) { $usage = $this->usage; } else { $usage = $this->name; if (! empty($this->arguments)) { $usage .= ' [arguments]'; } } CLI::write(hkm_setPad($usage, 0, 0, 2)); if (! empty($this->description)) { CLI::newLine(); CLI::write(hkm_lang('CLI.helpDescription'), 'yellow'); CLI::write(hkm_setPad($this->description, 0, 0, 2)); } if (! empty($this->arguments)) { CLI::newLine(); CLI::write(hkm_lang('CLI.helpArguments'), 'yellow'); $length = max(array_map('strlen', array_keys($this->arguments))); foreach ($this->arguments as $argument => $description) { CLI::write(CLI::color(hkm_setPad($argument, $length, 2, 2), 'green') . $description); } } if (! empty($this->options)) { CLI::newLine(); CLI::write(hkm_lang('CLI.helpOptions'), 'yellow'); $length = max(array_map('strlen', array_keys($this->options))); foreach ($this->options as $option => $description) { CLI::write(CLI::color(hkm_setPad($option, $length, 2, 2), 'green') . $description); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function showHelp()\n {\n echo $this->help();\n exit(0);\n }", "public function help()\n {\n if ($this->_opts) {\n echo $this->_opts->getUsageMessage();\n echo \"\\n\";\n }\n\n exit(1);\n }", "public function cli_help() {}", "protected function showHelp() {\n echo $this->helpstring;\n }", "public function help() {\n\t\t$this->cli->newline();\n\t\t\t$this->cli->write(\"Summary:\", FALSE, 1);\n\t\t\t\t$this->cli->write(\"Build a pipe from a pipespec\", FALSE, 2);\n\t}", "private static function print_help() {\n\n\t\t//Usage\n\t\tprint self::$help_usage . PHP_EOL;\n\t\t//Short description\n\t\tprint self::$help_short_desc . PHP_EOL;\n\t\t//Arguments list\n\t\tprint self::$help_args_list . PHP_EOL;\n\t}", "public function help() {\n\t\t$this->out('CakePHP Translate Plugin:');\n\t\t$this->out('');\n\n\t\t$this->out('Run `bin/cake i18n extract` first to create POT files.');\n\t\t$this->out('Import them then via `bin/cake translate import`.');\n\t\t$this->out('When done translating, you can export them via `bin/cake translate export`.');\n\n\t\t$this->hr();\n\t}", "public function printHelp()\n {\n echo \"Version: $this->version\\n\";\n echo \"Program options:\\n\";\n echo \" -h print program usage\\n\";\n echo \"Execution mode:\\n\";\n echo \" -c <configuration file> create tables and create partitions\\n\";\n echo \" -m <configuration file> migrate existing table to partitioned table\\n\";\n echo \" -u <configuration file> update partitionned tables with new partitions\\n\";\n echo \" -o <configuration file> optimize tables\\n\";\n echo \" -p <configuration file> purge tables\\n\";\n echo \" -b <configuration file> backup last part for each table\\n\";\n echo \" -l <table> -s <database name> List all partitions for a table.\\n\";\n }", "protected function _showHelp()\n {\n if (empty($this->_args) || isset($this->_args['help'])) {\n die($this->usageHelp());\n }\n }", "public function printHelp()\n {\n echo $this->getHelp();\n }", "public function help() {}", "public static function help()\n {\n echo PHP_EOL;\n echo \"Cli Usage:\";\n echo PHP_EOL;\n echo PHP_EOL;\n\n foreach (static::$commands as $command) {\n $seperator = \" \";\n $seperator = substr($seperator, 0, strlen($seperator) - strlen($command));\n $output = \" \";\n $output .= \"- /{$command}\" . $seperator;\n $output .= \"Create, delete or list {$command}s.\";\n $output .= PHP_EOL;\n echo $output;\n }\n exit;\n }", "public function helpMessage()\n {\n echo \"\n ______ ___ _______ __ _____ _____\n / ____/___ ____ _/_/ ___ / _______/ / \\ / ___/ /____/\n / / / __ \\/ __ \\/ / / / / ______ / /_\\ / / / /____\n / /___/ /_/ / /_/ / /____/ / / /_____/ / ____ / /__/ /___/\n \\____/\\____/\\____/\\______/ /_/ /__/ \\_/\\___/\\____/\n\n Usage:\n command [options] [arguments]\n\n Options:\n --all (-a) Display all the cool faces\n \";\n }", "public function help() {\n pl('This script does not provide any options.');\n pl('Just call it with no arguments.');\n }", "static public function help() {\n\t\t$help = parent::help ();\n\t\t\n\t\t$help [__CLASS__] [\"text\"] = array ();\n\t\t$help [__CLASS__] [\"text\"] [] .= \"\\t--dry-run Affiche les appels sans les executer\";\n\t\t\n\t\treturn $help;\n\t}", "public function get_help(): string {\n\t\t$climate = $this->get_climate();\n\t\t$climate->green( \"Usage:\\nisc \" . $this->get_key() . \" <name of project>\" );\n\t\t$climate->output();\n\t\t$climate->cyan( \"Flags:\" );\n\t\t$climate->green()->inline( \" --share\\t\" );\n\t\t$climate->yellow( 'Puts the dump in the web root and gives you a link you can send to another developer.' );\n\n\t\treturn '';\n\n\t}", "public function help()\n\t{\n\t\t$this->output->addOverview('Add, remove, and update repositories for packages')\n\t\t\t->addTasks($this);\n\t}", "public function help() {\n\n\t\t\t$help = PHP_EOL .'Generator Help'. PHP_EOL;\n\t\t\t$help .= '-----------------------------------'. PHP_EOL;\n\t\t\t\n\t\t\t$help .= 'Methods:'. PHP_EOL;\n\t\t\t$help .= ' - Controller'. PHP_EOL .' - Model'. PHP_EOL .' - Table'. PHP_EOL;\n\n\t\t\t$help .= PHP_EOL .'Arguments:'. PHP_EOL;\n\t\t\t$help .= ' - Name'. PHP_EOL;\n\n\t\t\t$help .= PHP_EOL .'Options/Flags:'. PHP_EOL;\n\t\t\t$help .= ' - restful'. PHP_EOL;\n\t\t\t$help .= ' - override'. PHP_EOL;\n\n\t\t\t$help .= PHP_EOL .'Usage:'. PHP_EOL;\n\t\t\t$help .= '$ php hydrogen generate:method argument --option'. PHP_EOL;\n\n\t\t\treturn $help;\n\n\t\t}", "public function getHelp()\n\t{\n\t\treturn $this->run(array('help'));\n\t}", "public function showHelpMessage()\n {\n echo $this->_description, PHP_EOL, PHP_EOL;\n }", "public function admin_help() {\n\n\t\tpods_view( PODS_DIR . 'ui/admin/help.php', compact( array_keys( get_defined_vars() ) ) );\n\t}", "public function main()\n {\n $this->out($this->getOptionParser()->help());\n }", "function help()\n {\n\n global $argv;\n\n print $argv[0] . \" [ --dry-run | --update ] --verbose ]\\n\";\n print $argv[0] . \" [ [ -d | -U ] -v ]\\n\";\n }", "public function help()\n\t{\n\t\tprint PHP_EOL . 'How to use - php rps.php [options] [item]' . PHP_EOL;\n\t\tprint PHP_EOL . 'Items: rock|paper|scissors' . PHP_EOL;\n\t\tprint 'Options: ' . PHP_EOL;\n\t\tprint '-h ' . \"\\t\" . '- Prints the help options' . PHP_EOL;\n\t\tprint '--id ' . \"\\t\" . '- Reuse an instance of a game given by an ID, e.g --id=1kvllr1clse0g2vghdf5u07c57 [item]' . PHP_EOL;\n\t\tprint '--game ' . \"\\t\" . '- Used to choose between Player vs. Computer or Computer vs. Computer e.g --game=pvc|cvc [item]' . PHP_EOL . PHP_EOL;\n\t}", "function show_help()\n\t{\n\t\tpl('Welcome to PM² a package manager for package managers.');\n\t\tpl( );\n\t\tpl('Usage: ');\n\t\tpl( );\n\t\tpl(' help <command> ');\n\t\tpl(' install <package manager> ');\n\t\tpl(' list ');\n\t\tpl(' update <package manager> ');\n\t\tpl(' upgrade ');\n\t\tpl( );\n\t}", "public function help()\n\t{\n\t\t// You could include a file and return it here.\n\t\treturn \"\";\n\t}", "function show_library_help() {\n $long_desc = $this->get_long_desc($this->get_desc($this->_data));\n echo 'Description:' . PHP_EOL . $long_desc . PHP_EOL . PHP_EOL;\n echo 'type <library> help <command> for detailed command help.' . PHP_EOL . PHP_EOL;\n echo 'Available commands:' . PHP_EOL;\n $this->show_command_list();\n }", "public function main()\n {\n $this->out($this->OptionParser->help());\n }", "public function showHelp() {\r\n echo <<<EOL\r\n == CSV Processor Usage ==\r\n --file [csv file name] – this is the name of the CSV to be parsed\r\n --create_table – this will cause the MySQL users table to be built (and no further action will be taken)\r\n --dry_run – this will be used with the --file directive in case we want to run the script but not insert into the DB. All other functions will be executed, but the database won't be altered\r\n -u – MySQL username\r\n -p – MySQL password\r\n -h – MySQL host\r\n --help – this list of commands again\\n\r\n EOL;\r\n return;\r\n }", "public function help()\n {\n }", "protected function help(): void\n {\n $this->oOutput->writeln('');\n $this->oOutput->writeln('Credentials are stored in 1Password under the Shed AWS login.');\n $this->oOutput->writeln('Look for it under <info>SERVER BACKUPS</info>');\n $this->oOutput->writeln('');\n }", "public function getHelp();", "public function getHelp();", "public function getHelp();", "public function help()\n\t {\n\t return([\n\t \"arguments\" => $this->requiredArguments(),\n\t \"help\" => \"Hello World\"\n\t ]);\n\t }", "public function help()\n\t{\n\t\treturn TRUE;\n\t}", "private function outputHelp()\n {\n $yellow = \"\\e[93m\";\n $green = \"\\e[92m\";\n $default = \"\\e[39m\";\n\n $text = \"$yellow Description: $default \\n\"; \n $text .= \" Run command to remove your temporary .bak files or anything else \\n\\n\";\n \n $text .= \"$yellow Usage: $default \\n\"; \n $text .= \" php clean $green <options> $default \\n\\n\";\n\n $text .= \"$yellow Options: $default \\n\"; \n $text .= \" $green -p $default Directory path \\n\";\n $text .= \" $green -d $default Delete the directory if it is empty \\n\";\n $text .= \" $green -h $default Display this text and exit immediately \\n\";\n $text .= \" $green --ext $default Set extension (default .bak) \\n\";\n \n return $this->output($text);\n }", "public function displayHelp(): void\n {\n $formatter = new ConsoleHelpFormatter();\n \n if ($this->description) {\n $formatter->setDescription($this->description);\n }\n $formatter->setUsage([\"{$this->name} command [options] [arguments]\"]);\n $commands = [];\n \n $list = $this->commandRegistry->list();\n sort($list);\n\n foreach ($list as $name) {\n $command = $this->commandRegistry->get($name);\n $commands[$name] = $command->description();\n }\n $formatter->setCommands($commands);\n $this->io->out($formatter->generate());\n }", "public function help()\n\t{\n\t\t$this->output\n\t\t ->getHelpOutput()\n\t\t ->addOverview('Functions for updating hub user terms of use.')\n\t\t ->render();\n\t}", "public function help(): string;", "public function usageHelp() {\r\r\n return <<<USAGE\r\r\nUsage: php -f inventory.php -- [options]\r\r\n php -f inventory.php \r\r\n\r\r\n\r\r\nUSAGE;\r\r\n }", "public function usageHelp() {\r\r\n return <<<USAGE\r\r\nUsage: php -f inventory.php -- [options]\r\r\n php -f inventory.php \r\r\n\r\r\n\r\r\nUSAGE;\r\r\n }", "public function Help()\n\t{\n\t\treturn view('client/help');\n\t}", "public function displayUsage()\n\t{\n\t\tif($this->description){\n\t\t\techo $this->description, \"\\n\\n\";\n\t\t}\n\t\techo \"Usage:\\n {$this->name}\";\n\t\tif(!empty($this->opts)){\n\t\t\techo \" [options]\";\n\t\t}\n\t\tif($this->arguments){\n\t\t\techo \" {$this->arguments}\";\n\t\t}\n\t\techo \"\\n\";\n\t\tif(empty($this->opts)){\n\t\t\treturn;\n\t\t}\n\n\t\techo \"\\nOptions:\\n\";\n\t\t$w = 0; // indent width.\n\t\tforeach($this->opts as $o){\n\t\t\t$w = min(24,max($w,strlen($this->helpline($o))));\n\t\t}\n\t\t$pad = str_pad('',$w);\n\t\tforeach($this->opts as $o){\n\t\t\t$h = str_pad($this->helpline($o),$w);\n\t\t\techo ' ', $h;\n\t\t\tif(isset($o['description'])){\n\t\t\t\tif(strlen($h)>$w){\n\t\t\t\t\techo \"\\n \", $pad;\n\t\t\t\t}\n\t\t\t\t$d = str_replace(\"\\n\",\"\\n {$pad}\",$o['description']);\n\t\t\t\techo ' ', $d;\n\t\t\t}\n\t\t\techo \"\\n\";\n\t\t}\n\t}", "public function displayHelp()\r\n {\r\n // Name and version\r\n\r\n $text = sprintf(\"%s v. %s\", $this->options['script_name'], $this->options['script_version']);\r\n $underline = str_repeat('-', strlen($text));\r\n echo \"$underline\\n$text\\n$underline\";\r\n\r\n // Description\r\n\r\n if ($this->options['script_description'] != '')\r\n {\r\n $text = CLIUtil_Utils::textAlign($this->options['script_description'], CLIUtil_Utils::TEXT_ALIGN_LEFT,\r\n $this->options['max_output_width'] - 2, \"\\n\", true, 1, 0);\r\n $text = CLIUtil_Utils::textIndent($text, ' ', 1, \"\\n\");\r\n echo \"\\n\\n$text\";\r\n }\r\n\r\n // Parameters\r\n\r\n if (count($this->declared_parameters) > 0)\r\n {\r\n $text = \"Parameters\";\r\n $underline = str_repeat('-', strlen($text));\r\n echo \"\\n\\n$text\\n$underline\";\r\n\r\n foreach ($this->declared_parameters as $declared_parameter_name => $declared_parameter)\r\n {\r\n switch ($this->_get_declared_parameter_type($declared_parameter_name))\r\n {\r\n case self::PARAM_TYPE_INTEGER:\r\n {\r\n $type_name = 'integer';\r\n $default_value = strval($declared_parameter['default']);\r\n break;\r\n }\r\n\r\n case self::PARAM_TYPE_STRING:\r\n {\r\n $type_name = 'string';\r\n $default_value = '\"'. $declared_parameter['default'] . '\"';\r\n break;\r\n }\r\n\r\n case self::PARAM_TYPE_BOOLEAN:\r\n {\r\n $type_name = 'boolean';\r\n $default_value = $declared_parameter['default'] ? 'true' : 'false';\r\n break;\r\n }\r\n\r\n case self::PARAM_TYPE_ARRAY:\r\n {\r\n $type_name = 'array';\r\n $default_value = $declared_parameter['default'];\r\n break;\r\n }\r\n\r\n case self::PARAM_TYPE_TIME_SEC:\r\n {\r\n $type_name = 'time in seconds';\r\n $default_value = $declared_parameter['default'] .\r\n ' (' . CLIUtil_Utils::formatTime($this->_time_sec_to_int($declared_parameter['default'])) . ')';\r\n break;\r\n }\r\n\r\n default:\r\n {\r\n throw new Exception('Wrong parameter type for \"' . $declared_parameter_name . '\"', self::ERROR_MISC);\r\n break;\r\n }\r\n }\r\n\r\n // Parameter usage\r\n $text = printf(\"\\n\\n * %s (%s) [%s]; default: %s\",\r\n $declared_parameter_name, $declared_parameter['alias'], $type_name, $default_value);\r\n $text = CLIUtil_Utils::textAlign($text, CLIUtil_Utils::TEXT_ALIGN_LEFT,\r\n $this->options['max_output_width'] - 2, \"\\n\", true, 1, 0);\r\n\r\n // Parameter description\r\n $text = CLIUtil_Utils::textAlign($declared_parameter['desc'], CLIUtil_Utils::TEXT_ALIGN_LEFT,\r\n $this->options['max_output_width'] - 4, \"\\n\", true, 1, 0);\r\n $text = CLIUtil_Utils::textIndent($text, ' ', 2);\r\n echo \"\\n\\n$text\";\r\n }\r\n }\r\n }", "public function printHelpPage() {\n\t}", "public function help()\n\t{\n\t\t// You could include a file and return it here.\n\t\treturn \"Some Help Stuff\";\n\t}", "public function displayHelp()\n\t{\n\t\t$obj = MpmCommandLineWriter::getInstance();\n\t\t$obj->addText('./migrate.php up [migration #] [--force]');\n\t\t$obj->addText(' ');\n\t\t$obj->addText('This command is used to migrate up to a newer version. You can get a list of all of the migrations available by using the list command.');\n\t\t$obj->addText(' ');\n\t\t$obj->addText('You must specify a migration # (as provided by the list command)');\n\t\t$obj->addText(' ');\n\t\t$obj->addText('If the --force option is provided, then the script will automatically skip over any migrations which cause errors and continue migrating forward.');\n\t\t$obj->addText(' ');\n\t\t$obj->addText('Valid Examples:');\n\t\t$obj->addText('./migrate.php up 14', 4);\n\t\t$obj->addText('./migrate.php up 12 --force', 4);\n\t\t$obj->write();\n\t}", "public function getHelp() {\n\t\t$help = 'Usage: ';\n\t\t\n\t\t$commandShellString = $this->getCommandRunner()->getScriptName().' '.$this->getName();\n\t\t\n\t\t$options = $this->getOptionHelp();\n\t\tif (empty($options)) {\n\t\t\t$options = array(\n\t\t\t\t$this->defaultAction\n\t\t\t);\n\t\t}\n\t\t\n\t\t$usageOptions = array();\n\t\t$usageDescriptions = array();\n\t\t\n\t\tforeach ($options as $option) {\n\t\t\t$usageOptionString = $commandShellString;\n\t\t\t$usageDescriptionString = 'Description';\n\t\t\t\n\t\t\tif (strcmp($option, $this->defaultAction) != 0) {\n\t\t\t\t$usageOptionString .= ' '.$option;\n\t\t\t\t$usageDescriptionString .= \" <{$option}>\";\n\t\t\t}\n\t\t\t$usageOptions[] = $usageOptionString;\n\t\t\t$usageDescriptionString .= \":\\n\".$this->getDescription($option, array());\n\t\t\t$usageDescriptions[] = $usageDescriptionString;\n\t\t}\n\t\t\n\t\t// Options:\n\t\t$help .= implode(\"\\n or: \", $usageOptions);\n\t\t$help .= \"\\n\\n\";\n\t\t\n\t\t// Global Parameters:\n\t\t$help .= \"Possible arguments: \\n\";\n\t\t\n\t\t$classReflection = new ReflectionClass(get_class($this));\n\t\t$publicProperties = $classReflection->getProperties(ReflectionProperty::IS_PUBLIC);\n\t\tif (is_array($publicProperties)) {\n\t\t\t$skippedPublicProperties = array(\n\t\t\t\t'defaultAction'\n\t\t\t);\n\t\t\tforeach ($publicProperties as $publicProperty) {\n\t\t\t\tif (in_array($publicProperty->getName(), $skippedPublicProperties, true)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$propertyHelpString = ' --'.$publicProperty->getName();\n\t\t\t\t\n\t\t\t\t$searches = array(\n\t\t\t\t\t'*',\n\t\t\t\t\t'/',\n\t\t\t\t\t'@var ',\n\t\t\t\t\t\"\\n\",\n\t\t\t\t\t\"\\r\",\n\t\t\t\t);\n\t\t\t\t$propertyDescription = str_replace($searches, '', $publicProperty->getDocComment());\n\t\t\t\t\n\t\t\t\t$propertyDescriptionOffset = 25;\n\t\t\t\t$propertyHelpString .= str_pad(' ', $propertyDescriptionOffset-strlen($propertyHelpString),' ');\t\t\t\t\n\t\t\t\t$propertyHelpString .= $propertyDescription.\"\\n\";\n\t\t\t\t\n\t\t\t\t$help .= $propertyHelpString;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$help .= \"\\n\";\n\t\t\n\t\t// Description:\n\t\t$help .= implode(\"\\n\\n\", $usageDescriptions);\n\t\t$help .= \"\\n\\n\";\n\t\t\n\t\treturn $help;\n\t}", "abstract function help();", "public function help() {\n $lines = array_merge([$this->banner], $this->help);\n\n return implode(PHP_EOL, $lines);\n }", "public function help()\n\t{\n\t\t// You could include a file and return it here.\n\t\treturn \"<h2>Overview</h2>\n\t\t\t\t<p>The Permissions module works together with the User Manager and the Groups module to give PyroCMS access control.</p>\n\t\t\t\t<h2>Setting Permissions</h2>\n\t\t\t\t<p>New groups have no permissions at all by default. Simply check the box\n\t\t\t\tby each module that you want users in that group to be able to access.</p>\";\n\t}", "public function help()\n\t{\n\t\t// You could include a file and return it here.\n\t\treturn \"No documentation has been added for this module.<br />Contact the module developer for assistance.\";\n\t}", "public function help()\n\t{\n\t\t// You could include a file and return it here.\n\t\treturn \"No documentation has been added for this module.<br />Contact the module developer for assistance.\";\n\t}", "function showHelpPage() {\n\t\t$this->setCacheLevelNone();\n\t\t\n\t\t$this->render($this->getTpl('help'));\n\t}", "public function help()\n\t{\n\t\t// You could include a file and return it here.\n\t\treturn \"No documentation has been added for this module.<br/>Contact the module developer for assistance.\";\n\t}", "public function usageHelp()\n {\n $help = 'Available actions: ' . \"\\n\";\n $methods = get_class_methods($this);\n foreach ($methods as $method) {\n if (substr($method, -6) == 'Action') {\n $help .= ' --action ' . substr($method, 0, -6);\n $helpMethod = $method . 'Help';\n if (method_exists($this, $helpMethod)) {\n $help .= ' ' . $this->$helpMethod();\n }\n $help .= \"\\n\";\n }\n }\n return $help;\n }", "public function usageHelp()\n {\n return <<<USAGE\nUsage: php -f fixtures.php -- [options]\n\n generate Generate data\n\nUSAGE;\n }", "public function help()\n\t{\n\t\t$this->output\n\t\t\t->addOverview(\n\t\t\t\t'Create a new component.'\n\t\t\t)\n\t\t\t->addArgument(\n\t\t\t\t'-n, --name: component name',\n\t\t\t\t'Give the component name. The component name can also be provided\n\t\t\t\tas the next word following the command as shown here:\n\t\t\t\t\"muse scaffolding create component awesome\"',\n\t\t\t\t'Example: -n=awesome, --name=awesomer'\n\t\t\t)\n\t\t\t->addArgument(\n\t\t\t\t'--install-dir: installation directory',\n\t\t\t\t'Directory in which the component should be installed. Can be helpful\n\t\t\t\twhen installing a component in some sort of subsite or alternate\n\t\t\t\tconfiguration. Scaffolding with use PATH_CORE as the default.',\n\t\t\t\t'Example: --install-dir=site/groups/1987'\n\t\t\t);\n\t}", "public function help(): void {\n\n }", "public function getHelp()\n\t{\n\t\treturn '\nUSAGE\n authinit\nDESCRIPTION\n This command generates an initial RBAC authorization hierarchy.';\n\n\t}", "public function getHelp() {\n\t\t$help = \"Usage: \";\n\n\t\t$classReflection = new ReflectionClass(get_class($this));\n\n\t\t$commandName = $this->getName();\n\t\t$commandShellString = $this->getCommandRunner()->getScriptName() . ' ' . $commandName;\n\n\t\t$options = $this->getOptionHelp();\n\t\tif (empty($options)) {\n\t\t\t$options = array(\n\t\t\t\t$this->defaultAction\n\t\t\t);\n\t\t}\n\n\t\t$usageOptions = array();\n\t\t$usageDescriptions = array();\n\n\t\tforeach ($options as $option) {\n\t\t\t$usageOptionString = $commandShellString;\n\t\t\t$usageDescriptionString = 'Description';\n\n\t\t\tif (strcmp($option, $this->defaultAction) != 0) {\n\t\t\t\t$usageOptionString .= ' '.$option;\n\t\t\t\t$usageDescriptionString .= \" <{$commandName} {$option}>\";\n\t\t\t} else {\n\t\t\t\t$usageDescriptionString .= \" <{$commandName}>\";\n\t\t\t}\n\t\t\t$usageOptions[] = $usageOptionString;\n\t\t\t\n\t\t\tlist($actionMethodName) = explode(' ', $option);\n\t\t\t$actionMethodReflection = $classReflection->getMethod('action' . $actionMethodName);\n\t\t\t$searches = array(\n\t\t\t\t'*',\n\t\t\t\t'/',\n\t\t\t\t'@param ',\n\t\t\t\t\"\\n\",\n\t\t\t\t\"\\r\",\n\t\t\t\t\"\\t\",\n\t\t\t\t'@return boolean success.',\n\t\t\t\t'@return boolean success',\n\t\t\t);\n\t\t\t$actionMethodDescription = str_replace($searches, '', $actionMethodReflection->getDocComment());\n\t\t\t$actionMethodDescription = str_replace('$', '--', $actionMethodDescription);\n\n\t\t\t$usageDescriptionString .= \":\\n\" . $actionMethodDescription;\n\n\t\t\t$usageDescriptions[] = $usageDescriptionString;\n\t\t}\n\n\t\t// Options:\n\t\t$help .= implode(\"\\n or: \", $usageOptions);\n\t\t$help .= \"\\n\\n\";\n\n\t\t// Global Parameters:\n\t\t$help .= \"Possible arguments: \\n\";\n\n\t\t$publicProperties = $classReflection->getProperties(ReflectionProperty::IS_PUBLIC);\n\t\tif (is_array($publicProperties)) {\n\t\t\t$skippedPublicProperties = array(\n\t\t\t\t'defaultAction'\n\t\t\t);\n\t\t\tforeach ($publicProperties as $publicProperty) {\n\t\t\t\tif (in_array($publicProperty->getName(), $skippedPublicProperties, true)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$propertyHelpString = ' --' . $publicProperty->getName();\n\n\t\t\t\t$searches = array(\n\t\t\t\t\t'*',\n\t\t\t\t\t'/',\n\t\t\t\t\t'@var ',\n\t\t\t\t\t\"\\n\",\n\t\t\t\t\t\"\\r\",\n\t\t\t\t\t\"\\t\",\n\t\t\t\t);\n\t\t\t\t$propertyDescription = str_replace($searches, '', $publicProperty->getDocComment());\n\n\t\t\t\t$propertyDescriptionOffset = 18;\n\t\t\t\t$propertyHelpString .= str_pad('', $propertyDescriptionOffset-strlen($propertyHelpString), ' ');\n\t\t\t\t$propertyHelpString .= $propertyDescription . \"\\n\";\n\n\t\t\t\t$help .= $propertyHelpString;\n\t\t\t}\n\t\t}\n\n\t\t$help .= \"\\n\";\n\n\t\t// Description:\n\t\t$help .= implode(\"\\n\\n\", $usageDescriptions);\n\t\t$help .= \"\\n\\n\";\n\n\t\treturn $help;\n\t}", "public function help()\n {\n // You could include a file and return it here.\n return \"No documentation has been added for this module.<br />Contact the module developer for assistance.\";\n }", "public function usageHelp()\n {\n return <<<USAGE\nUsage: php -f FixProductDescription.php -- [options]\n\n\n help This help\nUSAGE;\n }", "function help() {\n\t\t\n\t\treturn 'Wbot is an administrative command to control Warmachine.';\n\t\t\n\t}", "private static function _showHelp($argHelp)\n {\n echo \"Usage: $_SERVER[PHP_SELF] options...\\n\";\n // Add the actual help option to the help descriptions\n $argHelp['help|h'] = Array('help' => \"This help\");\n ksort($argHelp);\n foreach ($argHelp as $synonyms => $help) {\n echo \" $synonyms : $help[help]\\n\";\n }\n }", "public function actionHelp() {\n // using the default layout 'protected/views/layouts/main.php'\n $this->render('help');\n }", "public function show_help() {\n\t\t$screen = get_current_screen();\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'plugin_options_help',\n\t\t\t'title' => 'Setup',\n\t\t\t'content' => \"<h2>Mendeley Plugin Setup</h2>\",\n\t\t\t'callback' => array( $this, 'show_help_content' )\n\t\t) );\n\t}", "protected function help()\n {\n\t\t$help =\"\n\t\tUse this script to count everything in texts.\n\t\t\n\t\tUsage: ./Count.php [-t <text>]\n\t\t\n\t\tOptions\n\t\t -t\tThe text you want to use.\n\t\t \";\n\t\treturn $help;\n }", "protected function displayHelpIndex() {}", "public function help()\n\t{\n\t\t$help = '<p>'. _t( 'Feedburner plugin for Habari allows you to redirect your feeds to FeedBurner. It also adds a dashboard module displaying the feed statistics for each feed.' ) . '</p>';\n\t\t$help .= '<h3>' . _t( 'Usage:') .'</h3>';\n\t\t$help .= '<ul><li>' . _t( 'Feed Assignments: Enter the name you\\'ve assigned to your respective entries and comments feeds on Feedburner. This is the last part of the FeedBurner URL. For example, if your FeedBurner feed URL is http://feeds.feedburner.com/MainFeed, then enter \"MainFeed\" into the appropriate box.') . '</li>';\n\t\t$help .= '<li>' . _t( 'Exclusions: Use this section to specify user agents and IP addresses that you do not wish to be redirected to FeedBurner. The default values provided are there to prevent FeedBurner\\'s bots being redirected back to itself, so do NOT delete these.') . '</li>';\n\t\t$help .= '</ul></p>';\n\t\treturn $help;\n\t}", "public function usageHelp()\n {\n return <<<USAGE\nUsage: php migrator.php -- [options]\n\n --module <module> --reset Delete <module> resource name entry from core_resource\n --module <module> --to <version> Migrate module in database to <version> (in core_resource)\n help This help\n\nUSAGE;\n }", "public function renderHelp()\n\t\t{\n\n\n\t\t}", "public function usageHelp()\n {\n return <<<USAGE\nUsage: php -f hermesImporter.php -- [options]\n\n <file> Import file\n <flags> Comma separated list of flags (debug, test, new_categories, etc.)\n\nExample: php -f hermesImporter.php /path/to/file.csv debug,test\nUSAGE;\n }", "public function getHelp(): string;", "static public function help() {\n\t\t$help = parent::help ();\n\t\t\n\t\t$help [__CLASS__] [\"text\"] = array ();\n\t\t$help [__CLASS__] [\"text\"] [] .= \"itop Datas :\";\n\t\t$help [__CLASS__] [\"text\"] [] .= \"\\t--itop_machines_serveur {Donnees du/des serveur/s} Donnees contenus dans le fichier de configuration\";\n\t\t\n\t\treturn $help;\n\t}", "public function getHelp()\n {\n $this->attachHelp();\n\n if (empty($this->name) && isset($this->tokens[0])) {\n $this->name = $this->tokens[0];\n }\n\n $color = new Color();\n\n $help = '';\n\n $help .= $color(Terminal::header(' '.$this->name))\n ->white()->bg('green')->bold().PHP_EOL;\n\n $help = $this->appendToString($help, $this->wrapToTerminal($this->help), true, true);\n $help = $this->appendToString($help, '', true);\n $keys = $this->getSortedOptionKeys();\n $help = $this->addOptionHelp($help, $keys);\n\n return $help;\n }", "function showHelp()\n{\n echo \"usage: quizzer [options]\\n\";\n echo \" -a <arg> URL to the answers file\\n\";\n echo \" -h Show this help\\n\";\n echo \" -o <arg> Generate output in the specified format (json or xml)\\n\";\n echo \" -q <arg> URL to the questions file\\n\";\n echo \" -s Show questions statistics\\n\";\n echo \" -t <arg> Validate assessments in tests file\\n\";\n}", "static public function help() {\n\t\t$help = parent::help ();\n\t\t\n\t\t$help [__CLASS__] [\"text\"] = array ();\n\t\t\n\t\treturn $help;\n\t}", "static public function help() {\n\t\t$help = parent::help ();\n\t\t\n\t\t$help [__CLASS__] [\"text\"] = array ();\n\t\t\n\t\treturn $help;\n\t}", "static public function help() {\n\t\t$help = parent::help ();\n\t\t\n\t\t$help [__CLASS__] [\"text\"] = array ();\n\t\t\n\t\treturn $help;\n\t}", "static public function help() {\n\t\t$help = parent::help ();\n\t\t\n\t\t$help [__CLASS__] [\"text\"] = array ();\n\t\t\n\t\treturn $help;\n\t}", "static public function help() {\n\t\t$help = parent::help ();\n\t\t\n\t\t$help [__CLASS__] [\"text\"] = array ();\n\t\t\n\t\treturn $help;\n\t}", "static public function help() {\n\t\t$help = parent::help ();\n\t\t\n\t\t$help [__CLASS__] [\"text\"] = array ();\n\t\t\n\t\treturn $help;\n\t}", "function help( $_, $assoc ) {\n\t\thelp::run();\n\t}", "public function options_help() {\r\n\r\n\t\t$help = '<p>Add your Help text here</p>';\r\n\r\n\t\t$sidebar = '<p>Add sidebar help links if required</p>';\r\n\r\n\t\t$screen = get_current_screen();\r\n\r\n\t\tif ( method_exists( $screen, 'add_help_tab' ) ) {\r\n\r\n\t\t\t$screen->add_help_tab( array(\r\n\t\t\t\t'title' => __( 'Overview' ),\r\n\t\t\t\t'id' => 'theme-options-help',\r\n\t\t\t\t'content' => $help,\r\n\t\t\t) );\r\n\r\n\t\t\t$screen->set_help_sidebar( $sidebar );\r\n\r\n\t\t}\r\n\r\n\t}", "function displayHelp()\n{\n echo <<<HELP\n \nBasic usage: \n>> php build.php [options]\n\nIt will try to download the latest CLDR sources defined by version used. Do not manually change the version, \nexcept you really need it for anything.\n\nOptions:\n --cldr-version - override CLDR version\n --post-clean - try to clean temporary directory after build;\n --debug - generate readable json files;\n --all-locales - generate the full list of available locales; by default the most popular languages are processed;\n --help - display this help.\\n\\n\nHELP;\n\n exit(0);\n}", "static public function help() {\n\t\t$help = parent::help ();\n\t\t\n\t\t$help [__CLASS__] [\"text\"] = array ();\n\t\t$help [__CLASS__] [\"text\"] [] .= \"Gestion des utilisateurs\";\n\t\t$help [__CLASS__] [\"text\"] [] .= \"\\t--{entete au choix}_username Nom de l'utilisateur \";\n\t\t$help [__CLASS__] [\"text\"] [] .= \"\\t--{entete au choix}_password Password de l'utilisateur \";\n\t\t$help [__CLASS__] [\"text\"] [] .= \"\\t--{entete au choix}_crypt_password Password crypte de l'utilisateur \";\n\t\t\n\t\treturn $help;\n\t}", "public function help( $help ) {\n\t\treturn $this->__set( 'help', $help );\n\t}", "protected function showUsage() {\n print <<<EOF\nUsage: php2odp [switches] <source.php> <target.odp>\n\n -h, --help Prints this usage information\n -v, --version Prints the version and exits\n\n\nEOF;\n }", "public function usageHelp()\n {\n extract($this->_commonVars);\n $helpMessages = array(\n OutputCLI::columnize('status', 2, 'Shows a quick summary of magento status.', self::SECOND_COLUMN_LEFT),\n OutputCLI::columnize('-c, --clean', 2, 'Clean magento caches.', self::SECOND_COLUMN_LEFT),\n OutputCLI::columnize('-i, --index', 2, 'Magento reindex. Format is: \"php '.$_script.' -i [all|index]\". You can specify which index should be reindexed, use ? to show help (\"php '.$_script.' -i ?\").', self::SECOND_COLUMN_LEFT),\n OutputCLI::columnize('-m, --index-mode', 2, 'Change Magento index mode. Format is: \"php '.$_script.' -i [all|index] [realtime|manual]\". You can specify which index should be reindexed, use ? to show help (\"php '.$_script.' -m ?\").', self::SECOND_COLUMN_LEFT),\n OutputCLI::columnize('-d, --database', 2, 'Sets user, password, database and host in the magento local.xml. Format is: \"dbuser;dbpassword;dbname[;dbhost]\"', self::SECOND_COLUMN_LEFT),\n OutputCLI::columnize('-u, --user', 2, 'Especify the user to change password.', self::SECOND_COLUMN_LEFT),\n OutputCLI::columnize('-p, --password', 2, 'Especify the new password (if no password is entered or if this option is missing \"admin\" will be used). Only works if user is specified.', self::SECOND_COLUMN_LEFT),\n OutputCLI::columnize('-l, --url', 2, 'Especify an URL to be used as the magento base url (remember that the url must begin with \"http://\" or \"https://\" and end with \"/\"). If the url is \"\" the value will be deleted.', self::SECOND_COLUMN_LEFT),\n OutputCLI::columnize('-s, --secure-url', 2, 'Especify an URL to be used as the magento secure base url (remember that the url must begin with \"http://\" or \"https://\" and end with \"/\"). If the url is \"\" the value will be deleted.', self::SECOND_COLUMN_LEFT),\n OutputCLI::columnize('-h, --hints', 2, 'Enables and disables magento template hints for the specified store. If ? is used, a list of the store codes will be shown.', self::SECOND_COLUMN_LEFT),\n OutputCLI::columnize('-e, --exec', 2, 'Executes the php file in the provided path. Takes a relative file path as an argument.', self::SECOND_COLUMN_LEFT),\n OutputCLI::columnize('--fix-perms', 6, 'Fix permissions for development enviroment for the specified OS, on the project directory. Supported OS: debian, centos', self::SECOND_COLUMN_LEFT),\n OutputCLI::columnize('--scope', 6, 'Tries to perform the current action in the selected scope (this option does not always have effect). Format is: \"website:code\" or \"store:code\"', self::SECOND_COLUMN_LEFT),\n OutputCLI::columnize('--help', 6, 'This help.', self::SECOND_COLUMN_LEFT),\n );\n \n echo 'Usage: php ', $_script, ' [OPTION]', $n, $n;\n echo 'List of options:', $n;\n\n foreach ($helpMessages as $msg) {\n echo $msg, $n;\n }\n }", "private function printHelp()\n {\n if (!$this->reflectionMethod) {\n $doc = $this->reflection->getDocComment()\n ?: \"No documentation found for {$this->printableAppName()}\";\n $this->printFormattedDocs($doc);\n $this->printUsage();\n return;\n }\n\n $commandName = $this->printableCommandName();\n $doc = $this->reflectionMethod->getDocComment()\n ?: \"No documentation found for $commandName\";\n $this->printFormattedDocs($doc);\n $reflectionParameters = $this->reflectionMethod->getParameters();\n if (empty($reflectionParameters)) {\n echo \"'$commandName' does not require any parameters.\\n\";\n } else {\n echo \"'$commandName' has the following parameters:\\n\";\n foreach ($reflectionParameters as $reflectionParameter) {\n echo $reflectionParameter, \"\\n\";\n }\n }\n }", "public function printOutHelpCommands(): void\n {\n $helpCommands = [];\n $helpCommands[] = '--file [csv file name] – this is the name of the CSV to be parsed';\n $helpCommands[] = '--create_table – this will cause the MySQL users table to be built (and no further action will be taken)';\n $helpCommands[] = '--dry_run – this will be used with the --file directive in case we want to run the script but not insert into the DB. All other functions will be executed, but the\ndatabase won\\'t be altered';\n $helpCommands[] = '-u – MySQL username';\n $helpCommands[] = '-p – MySQL password';\n $helpCommands[] = '-h – MySQL host';\n if ($this->printHelp) {\n foreach ($helpCommands as $helpCommand) {\n print $helpCommand . PHP_EOL;\n }\n }\n }", "public function get_help(): string {\n\t\t$help = \"Usage:\\nisc \" . $this->get_key() . \"\\n\\n\";\n\n\t\treturn $help;\n\n\t}", "public function help()\n {\n return [\n 'force' => '-f | -force ',\n // 'save' => '-s',\n 'delete' => '-d | -delete',\n ];\n }", "public function help() {\n echo 'Usage: ' . self::$command . \" feed <action> [site/rss url]\\n\";\n echo \"Actions: \\n\";\n echo \" add [site/rss url] - will add feed to database. If URL to page is provided, \\n\".\n \" feedapi will determine all the feeds in that page and \\n\".\n \" offer a choice of the feed if multiple found. If only \\n\".\n \" one feed is found, it will be added automatically \\n\";\n echo \" fetch - fetches all new items for the feeds\\n\";\n echo \" show - lists all feeds in database\\n\";\n echo \" remove - allows user to delete feeds\\n\";\n }", "#[CLI\\Command(name: self::HELP)]\n #[CLI\\Argument(name: 'command_name', description: 'A command name')]\n #[CLI\\Usage(name: 'drush help pm:uninstall', description: 'Show help for a command.')]\n #[CLI\\Usage(name: 'drush help pmu', description: 'Show help for a command using an alias.')]\n #[CLI\\Usage(name: 'drush help --format=xml', description: 'Show all available commands in XML format.')]\n #[CLI\\Usage(name: 'drush help --format=json', description: 'All available commands, in JSON format.')]\n #[CLI\\Bootstrap(level: DrupalBootLevels::MAX)]\n #[CLI\\Topics(topics: [DocsCommands::README])]\n public function help($command_name = '', $options = ['format' => 'helpcli', 'include-field-labels' => false, 'table-style' => 'compact']): DrushHelpDocument\n {\n $application = Drush::getApplication();\n $command = $application->get($command_name);\n if ($command instanceof AnnotatedCommand) {\n $command->optionsHook();\n }\n $helpDocument = new DrushHelpDocument($command);\n\n // This serves as example about how a command can add a custom Formatter.\n $formatter = new HelpCLIFormatter();\n $formatterManager = Drush::getContainer()->get('formatterManager');\n $formatterManager->addFormatter('helpcli', $formatter);\n\n return $helpDocument;\n }", "static public function help() {\n\t\t$help = parent::help ();\n\t\t\n\t\t$help [__CLASS__] [\"text\"] = array ();\n\t\t$help = array_merge ( $help, zabbix_wsclient::help () );\n\t\t\n\t\treturn $help;\n\t}", "public function usageHelp()\n {\n return <<<USAGE\nUsage: php -f integrity.php -- [options]\n\n --local <name>\t\t\t\tList local classes for a given namespace, name. This is in addition to the default checks for Mage, Enterprise, Varien and Zend.\n --output <file>\t\t\t\tSave results of this scan to a file, based in the Magento root directory. Root must be writeable.\n diff\t\t\t\t\t\t\tCreate diffs of local files found in _DIFFS\n silent\t\t\t\t\t\tHides the echo of the result for this scan.\n help Displays this usage text.\n\nUSAGE;\n }", "public function showhelp()\n {\n return view('atypik.help');\n }" ]
[ "0.83484936", "0.83144957", "0.8268957", "0.8132672", "0.8026131", "0.8014356", "0.793721", "0.7925517", "0.792493", "0.79146385", "0.7908727", "0.7746654", "0.7744488", "0.7742208", "0.7729575", "0.7710249", "0.7692481", "0.7688769", "0.76769495", "0.766561", "0.7646882", "0.7636002", "0.7621049", "0.7612028", "0.7602785", "0.7592243", "0.7579289", "0.7577092", "0.756232", "0.754091", "0.7536647", "0.7517132", "0.7517132", "0.7517132", "0.74908173", "0.74815744", "0.7465796", "0.746018", "0.7428597", "0.74089533", "0.740891", "0.740891", "0.73928964", "0.7386411", "0.73721117", "0.7371561", "0.73623145", "0.73520535", "0.7343945", "0.73420703", "0.7315942", "0.7309535", "0.72782403", "0.72782403", "0.72710896", "0.72709984", "0.72642225", "0.7246464", "0.7241199", "0.7233822", "0.7212967", "0.72099245", "0.7206032", "0.7193548", "0.7187987", "0.7182521", "0.7182302", "0.7178422", "0.71782136", "0.7171085", "0.7163896", "0.71496534", "0.7145327", "0.71348983", "0.7133282", "0.712344", "0.71147096", "0.71099", "0.7108844", "0.7108844", "0.7108844", "0.7108844", "0.7108844", "0.7108844", "0.71087736", "0.70914954", "0.7077837", "0.7074207", "0.7066327", "0.70599085", "0.7056406", "0.70506185", "0.7047801", "0.7045284", "0.7025636", "0.7020195", "0.7019915", "0.7014272", "0.6984269", "0.6983608" ]
0.8362985
0
Get the EC private key in octet string representation.
Получите приватный ключ EC в виде строки октетов.
public function privateKeyOctets(): string { return $this->string(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function privateKeyOctets(): string\n {\n return $this->_privateKey;\n }", "public function getPrivateKey() {\n\t\treturn $this->getKey('priv');\n\t}", "public function getPrivateKey()\n {\n return Arr::get($this->keys, 'private');\n }", "public function getPrivateKey() {}", "public function getPrivateKeyPem() {\n openssl_pkey_export($this->keyPair, $priKey);\n return $priKey;\n }", "protected function generatePrivateKey()\n {\n return Math\\Rand::getBytes(strlen($this->getPrime()), true);\n }", "public function getPrivkey()\n {\n return $this->getService()->getPrivateKey();\n }", "public function privateKeyOctets() {\n\t\treturn $this->_privateKey;\n\t}", "public function getPrivateKey()\n {\n return $this->private_key;\n }", "public function getPrivateKey()\n {\n return $this->privateKey;\n }", "public function getPrivateKey()\n {\n return $this->privateKey;\n }", "public function getPrivateKey()\n {\n return $this->privateKey;\n }", "protected function getKey()\n {\n // first create a sha256 hash of the key\n $hash = hash('sha256', $this->key);\n\n // create a binary string from the hash\n $binary = hex2bin($hash);\n\n // limit the key size based on our encryption method\n $keySize = AesEnum::getKeySize($this->method);\n $key = substr($binary, 0, $keySize);\n\n return $key;\n }", "public function getPrivateKey()\n {\n return $this->key_private;\n }", "public function getKey()\n {\n return $this->handler->getPrivateKey();\n }", "public static function mnemonicToPrivateKey(string $mnemonic): string\n {\n $seed = BIP39::mnemonicToSeedHex($mnemonic, '');\n return BIP44::fromMasterSeed($seed)->derive(self::BIP44_SEED_ADDRESS_PATH)->privateKey;\n }", "private function generatePrivateECKey(): JWK\n {\n if ($this->privateKeyContent) {\n $content = $this->privateKeyContent;\n } elseif ($this->privateKeyPath) {\n $content = \\file_get_contents($this->privateKeyPath);\n } else {\n throw new \\InvalidArgumentException('Unable to find private key.');\n }\n\n return JWKFactory::createFromKey($content, $this->privateKeySecret, [\n 'kid' => $this->keyId,\n 'alg' => 'ES512',\n 'use' => 'sig'\n ]);\n }", "public function getPrivateKey()\n {\n if (!file_exists($this->_keyPath)) {\n $this->createPrivateKey();\n }\n require $this->_keyPath;\n\n return PI_PRIVATE_KEY;\n }", "public function getPrivateKey() {\n $this->db->select('bf_private_key');\n $this->db->where(\"login_security_config_id\", '1');\n $this->db->limit(1, 0);\n $query = $this->db->get(\"login_security_config\");\n if(!empty($query) && $query->num_rows() > 0){\n $private_key = $query->row()->bf_private_key;\n if(!empty($private_key) && $private_key != NULL){\n return $private_key;\n }else{\n return '-';\n }\n }else{\n return '-';\n }\n }", "public function getPrivateKey()\n\t{\n\t\treturn $this->_privateKey;\n\t}", "private function parsePrivateKey() {\n return openssl_get_privatekey($this->privateKey, $this->passphrase);\n }", "public function getPrivateKey()\n {\n if (!file_exists($this->_keyPath)) {\n $this->createPrivateKey();\n }\n require_once $this->_keyPath;\n return PI_PRIVATE_KEY;\n }", "public function getPrivateKey()\n {\n if (!empty($this->private_key)) {\n return $this->private_key;\n }\n $key = new Crypt_RSA();\n $key->loadKey($this->getLocalKey());\n return $key;\n }", "public function getCertPrivateKey() {\r\n return ipworksencrypt_certmgr_get($this->handle, 8 );\r\n }", "public function exportPrivateKey(PrivateKey $privateKey): string\n {\n return vscf_key_provider_export_private_key_php($this->ctx, $privateKey->getCtx());\n }", "function get_private_server_key() {\n\t$keys = apply_filters( 'wo_server_keys', array(\n\t\t'public' => WOABSPATH . '/library/keys/public_key.pem',\n\t\t'private' => WOABSPATH . '/library/keys/private_key.pem',\n\t) );\n\n\treturn file_get_contents( $keys['private'] );\n}", "public function getKid()\n {\n return implode(':', array_slice(str_split(rtrim(Base32::encode(hash('sha256', $this->getPublicKey(true), true)), '='), 4), 0, 12));\n }", "public function __toString(): string\n {\n return $this->toPEM()->string();\n }", "public static function fromPrivateKey(EccPrivateKey $privateKey, AbstractNetwork $network = null): string\n {\n $digest = Hash::ripemd160($privateKey->getPublicKey()->getBuffer());\n\n return (new PayToPubKeyHashAddress($digest))->getAddress($network);\n }", "public function toPEM(): PEM\n {\n $n = $this->modulusParameter()->number()->base10();\n $e = $this->exponentParameter()->number()->base10();\n $pk = new RSAPublicKey($n, $e);\n return PublicKeyInfo::fromPublicKey($pk)->toPEM();\n }", "public function __toString(): string\n {\n return $this->toPEM()\n ->string();\n }", "public function cloudfront_private_key() {\n return $this->get('cloudfront_private_key');\n }", "public function getEdek(): Bytes\n {\n return $this->edek;\n }", "public function getPublicKeyPem(): string\n {\n $key = $this->getPublicKeyBinary();\n\n // Described in RFC 5480\n // Just use an OID calculator to figure out *that* encoding\n $der = hex2bin(\n '3059' // SEQUENCE, length 89\n .'3013' // SEQUENCE, length 19\n .'0607' // OID, length 7\n .'2a8648ce3d0201' // 1.2.840.10045.2.1 = EC Public Key\n .'0608' // OID, length 8\n .'2a8648ce3d030107' // 1.2.840.10045.3.1.7 = P-256 Curve\n .'0342' // BIT STRING, length 66\n .'00' // prepend with NUL - pubkey will follow\n );\n\n $der .= $key;\n $pem = \"-----BEGIN PUBLIC KEY-----\\r\\n\";\n $pem .= chunk_split(base64_encode($der), 64);\n $pem .= \"-----END PUBLIC KEY-----\";\n return $pem;\n }", "public function dumpPrivKey(string $address): string\n {\n return $this->request('dumpPrivKey', [$address]);\n }", "public function keyString();", "public function getKey() {\r\n return ipworksencrypt_rc4_get($this->handle, 5 );\r\n }", "public function getAuthKey()\n {\n return $this->ec_salt;\n }", "public static function wifPrivateToPrivateHex(string $privateKey)\n {\n return substr(Utils::checkDecode($privateKey), 2);\n }", "public function getP256dh(): string\n {\n return $this->p256dh;\n }", "private static function getPubKey(){\n\t\t#This is a 2048 bit key using SHA256 with RSA. \n\t\t$key = <<<ENDKEY\n-----BEGIN CERTIFICATE-----\nMIIDrTCCApWgAwIBAgIJAIg6Va5tcvwyMA0GCSqGSIb3DQEBCwUAMG0xCzAJBgNV\nBAYTAlVTMRMwEQYDVQQIDApXYXNoaW5ndG9uMRAwDgYDVQQHDAdTZWF0dGxlMRIw\nEAYDVQQKDAlXb3JkZmVuY2UxCzAJBgNVBAsMAklUMRYwFAYDVQQDDA13b3JkZmVu\nY2UuY29tMB4XDTE1MDMxMjA1NTIzMFoXDTM1MDMwNzA1NTIzMFowbTELMAkGA1UE\nBhMCVVMxEzARBgNVBAgMCldhc2hpbmd0b24xEDAOBgNVBAcMB1NlYXR0bGUxEjAQ\nBgNVBAoMCVdvcmRmZW5jZTELMAkGA1UECwwCSVQxFjAUBgNVBAMMDXdvcmRmZW5j\nZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC/9Ogj1PIQsuZu\ndTUNWlG0zaDNWpeY1ZiB/6oBS/YXkGFuG8R/nZ/kYsRmBm6yRp/3jC/HiPjg+7Zc\nbA/CKoHdUlNjFZ+10DmS369wVX+c0oV9f720b/a0xN0qeKxJTiN2NsAl5szYv2CQ\nBvzjeb5VfKgrfV9tgYr38swudxvexponYaK0OlDL3u/Xca4SLRKmB+ZYCcZJttoG\nSNFsQMlLHWWmM0FJH9qZ3x8MtRM5KsNEWO+/op511Rr36ZnLJdzUnETsaxHKwuCv\n0+D9b0mwk8K/c67l63v4+zywXNkdYIslgo7Aeeyb6t0lyyfruXutEyMinmApACT2\nsDMAbYk7AgMBAAGjUDBOMB0GA1UdDgQWBBTstr/AoPQyLLIt4/peFSjj0FFXHzAf\nBgNVHSMEGDAWgBTstr/AoPQyLLIt4/peFSjj0FFXHzAMBgNVHRMEBTADAQH/MA0G\nCSqGSIb3DQEBCwUAA4IBAQA9HsK+XdZh2MGP2SDdggA+MxkNBCCFBtcsmQrpiLUW\n67xt59FPRMwTgSA9Lt8uqcWaXoHXiaTnXTRtN/BKZR0F71HQfiV6zy511blIRlk2\nnV+vYzwLUENCZ31hQEZsY+uYqBSTiHecUKohn8A9pOOEpis2YEn2zVo4cobdyGa1\nzCnaAN99KT8s9lOO0UW0J52qZhvv4y8YhELtrXKBsFatGEsVIM0NFI+ZDsNpMnSQ\ncmUtLiIJtk5hxNbOaIz2vzbOkbzJ3ehzODJ1X5rya7X0v2akLLhwP9jqz5ua6ttP\nduLv4Q6v3LY6pwDoyKQMDqNNxVjaFmx5HyFWRPofpu/T\n-----END CERTIFICATE-----\nENDKEY;\n\t\treturn $key;\n\t}", "public function getPrivateKeyFile()\n {\n return $this->privateKeyFile;\n }", "public function getEncryptionResponseKey();", "public function toString() {\n\t\treturn implode('.', $this->_octets);\n\t}", "public function getCryptoAddress(): string\n {\n return $this->cryptoAddress;\n }", "public function getCryptoAddress(): string\n {\n return $this->cryptoAddress;\n }", "private function getKey() : string\n {\n return openssl_digest(app()->getKey(), 'SHA256', true);\n }", "public function getPrivateKey($format = self::FORMAT_NUMBER)\n {\n if (!$this->hasPrivateKey()) {\n $this->setPrivateKey($this->generatePrivateKey(), self::FORMAT_BINARY);\n }\n\n return $this->convert($this->privateKey, self::FORMAT_NUMBER, $format);\n }", "public static function getRSAPrivateKey()\n {\n $key = keys_path() . 'rsa-private-key.key';\n\n if (!file_exists($key)) {\n throw new KeyException('The key has not been set yet!');\n }\n\n return file_get_contents($key);\n }", "protected function exportPrivateKeyString(&$privateKeyResource)\n {\n $privateKeyString = '';\n $privateExport = openssl_pkey_export($privateKeyResource, $privateKeyString);\n\n if (empty($privateKeyString) || $privateExport === false) {\n throw new \\RuntimeException(\n 'Failed to export the private key to a string, probably because of a misconfigured OpenSSL library.'\n );\n }\n\n return $privateKeyString;\n }", "public function getCertEncoded() {\r\n return ipworksencrypt_certmgr_get($this->handle, 2 );\r\n }", "public function getDek(): Bytes\n {\n return $this->dek;\n }", "protected function getPrivateToken()\n {\n return Str::after($this->ably->options->key, ':');\n }", "protected function getSignKey()\n {\n return $this->getPrivateKey(JWT::$supported_algs[$this['options']['signing_algorithm']][0] !== 'openssl');\n }", "public function getKeyPassword() {\r\n return ipworksencrypt_rc4_get($this->handle, 6 );\r\n }", "public function testGetPrivateKey()\n {\n\n $key = new \\Phactor\\Key;\n $info = $key->GenerateKeypair();\n $priv_hex = $key->getPrivateKey();\n $priv_dec = $key->getPrivateKey(false);\n\n $this->assertEquals($info['private_key_hex'], $priv_hex);\n $this->assertEquals($info['private_key_dec'], $priv_dec);\n }", "public function get_private_key( $reset = false ) {\n\t\t$private_key = get_option( self::KEYS_OPTION_PRIVATE_KEY, false );\n\n\t\tif ( ( ! $private_key ) || $reset ) {\n\t\t\t$private_key = $this->generate_keys( false );\n\t\t}\n\n\t\treturn $private_key;\n\t}", "public function getPrvKey()\n {\n $matches = array();\n preg_match('/-----BEGIN PRIVATE KEY-----.*-----END PRIVATE KEY-----/s', $this->getKey(), $matches);\n return $matches[0];\n }", "public static function coerceBinaryPrivateKey($privateKeyBinary) {\n $pem = chunk_split(base64_encode($privateKeyBinary), 64, \"\\n\");\n $pem = \"-----BEGIN RSA PRIVATE KEY-----\\n\".$pem.\"-----END RSA PRIVATE KEY-----\\n\";\n return $pem;\n }", "public function toString(string $type, array $options = []): string\n {\n $type = self::validatePlugin('Keys', $type, 'savePrivateKey');\n\n if (!isset($this->publicKey)) {\n $this->publicKey = $this->base->powMod($this->privateKey, $this->prime);\n }\n\n return $type::savePrivateKey($this->prime, $this->base, $this->privateKey, $this->publicKey, $this->password, $options);\n }", "protected static function getSecretKey() : string\n {\n // TODO: check if the config field is set\n // TODO: catch \\SodiumException --- thrown if the secret key is corrupted or written incorrectly\n return sodium_base642bin(Config::app('key'), \\SODIUM_BASE64_VARIANT_ORIGINAL_NO_PADDING);\n }", "public function toOctetString() {\n\t\treturn new OctetString($this->_octets);\n\t}", "public function getKey() {\r\n return ipworksencrypt_hash_get($this->handle, 6 );\r\n }", "protected function secret_key() {\n\t\tif ( $this->is_test() ) {\n\t\t\treturn $this->payment_settings['test_private_key'];\n\t\t}\n\n\t\treturn $this->payment_settings['live_private_key'];\n\t}", "public function getKeyLong(): string {\n if ($this->amazon_domain && $this->asin) {\n $key = $this->amazon_domain . '~' . $this->asin;\n } elseif ($this->url) {\n $key = $this->url;\n } else {\n throw new \\InvalidArgumentException('Could not create a key for the OfferRequest - it must contain amazon_domain + asin, or an URL');\n }\n $key .= '~' . $this->getFiltersString() . '~' . $this->page;\n return $key;\n }", "public function privateKeyToDer($privateKey, $privateKyePassword = '');", "function createPrivateKey($string){\n\t$base64Str = base64_encode($string);\n\t$hashStr = md5($base64Str);\n\t$privateKey = substr($hashStr, 0, 10);\n\treturn $privateKey;\n}", "public function getCertPrivateKeyContainer() {\r\n return ipworksencrypt_certmgr_get($this->handle, 10 );\r\n }", "public function getCrtKey()\n {\n $matches = array();\n preg_match('/-----BEGIN CERTIFICATE-----.*-----END CERTIFICATE-----/s', $this->getCrt(), $matches);\n return $matches[0];\n }", "function decodeTotpKey(string $key): string\n {\n if (openssl_private_decrypt(base64_decode($key), $decrypted, $this->getKey(\"priv\"), OPENSSL_PKCS1_OAEP_PADDING)) {\n return $decrypted;\n } else {\n throw new TOTPException(_(\"Une erreur est survenue pendant le déchiffrement de la clé secrète\"));\n }\n }", "public function serialize()\n {\n if (is_null($this->bin)) {\n return '';\n }\n\n $length_prefixed_bin = strlen($this->bin) . ':' . $this->bin;\n\n if (is_null($this->key)) {\n return $length_prefixed_bin . ':';\n }\n return $length_prefixed_bin . ':' . $this->key;\n }", "public function outputKey() : string;", "public function getPublicKeyPem() {\n $pubKey = openssl_pkey_get_details($this->keyPair);\n return $pubKey[\"key\"];\n }", "public function getCertIssuerPublicKey() : string\n {\n return $this->certIssuerPublicKey;\n }", "public function getClientPublicKey(): string;", "public function toPEM(): PEM\n {\n return new PEM(PEM::TYPE_ATTRIBUTE_CERTIFICATE, $this->toDER());\n }", "public static function savePrivateKey(BigInteger $privateKey, BaseCurve $curve, array $publicKey, ?string $secret = null, ?string $password = null, array $options = []): string\n {\n self::initialize_static_variables();\n\n $public = explode(' ', OpenSSH::savePublicKey($curve, $publicKey));\n $name = $public[0];\n $public = Strings::base64_decode($public[1]);\n [, $length] = unpack('N', Strings::shift($public, 4));\n Strings::shift($public, $length);\n\n // PuTTY pads private keys with a null byte per the following:\n // https://github.com/github/putty/blob/a3d14d77f566a41fc61dfdc5c2e0e384c9e6ae8b/sshecc.c#L1926\n if (!$curve instanceof TwistedEdwardsCurve) {\n $private = $privateKey->toBytes();\n if (!(strlen($privateKey->toBits()) & 7)) {\n $private = \"\\0$private\";\n }\n }\n\n $private = $curve instanceof TwistedEdwardsCurve ?\n Strings::packSSH2('s', $secret) :\n Strings::packSSH2('s', $private);\n\n return self::wrapPrivateKey($public, $private, $name, $password, $options);\n }", "public static function coerceBinaryEncryptedPrivateKey($privateKeyBinary) {\n $pem = chunk_split(base64_encode($privateKeyBinary), 64, \"\\n\");\n $pem = \"-----BEGIN ENCRYPTED PRIVATE KEY-----\\n\".$pem.\"-----END ENCRYPTED PRIVATE KEY-----\\n\";\n return $pem;\n }", "public function getRawKey(): string\n {\n return $this->rawKey;\n }", "protected function getPrivateKey($decode = false)\n {\n return $this->openKey($this['options']['private_key'], $decode);\n }", "public function generateKey() {\n\n\t\treturn substr(hash(\"sha256\", sha1(microtime(TRUE).mt_rand(10000, 90000))), 0, mcrypt_get_key_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB));\n\t}", "public function getPubkey()\n {\n return $this->getService()->getPublicKey();\n }", "function getInstancePrivateIP() {\n\t\t# Though this is unintuitive, privateDnsName is the private IP\n\t\treturn (string)$this->instance->instancesSet->item->privateDnsName;\n\t}", "public function getKey()\n {\n return md5($this->__toString());\n }", "private static function getKey() {\n return \"92F4BF7FABFF40DA1F0BDA16ABF12AF9\";\n }", "public function key()\n {\n return $this->o->key->raw();\n }", "public function getGpgKey()\n {\n return $this->gpg_key;\n }", "public static function getKey()\n {\n return Encryption::$key;\n }", "function SERVER_getPublicSSHKeyOfm23Server()\n{\n\treturn(SERVER_getFileContents('/m23/data+scripts/packages/baseSys/authorized_keys'));\n}", "public function index()\n\t{\n\t\t$privateKey = <<<EOD\n-----BEGIN RSA PRIVATE KEY-----\nMIICXAIBAAKBgQC8kGa1pSjbSYZVebtTRBLxBz5H4i2p/llLCrEeQhta5kaQu/Rn\nvuER4W8oDH3+3iuIYW4VQAzyqFpwuzjkDI+17t5t0tyazyZ8JXw+KgXTxldMPEL9\n5+qVhgXvwtihXC1c5oGbRlEDvDF6Sa53rcFVsYJ4ehde/zUxo6UvS7UrBQIDAQAB\nAoGAb/MXV46XxCFRxNuB8LyAtmLDgi/xRnTAlMHjSACddwkyKem8//8eZtw9fzxz\nbWZ/1/doQOuHBGYZU8aDzzj59FZ78dyzNFoF91hbvZKkg+6wGyd/LrGVEB+Xre0J\nNil0GReM2AHDNZUYRv+HYJPIOrB0CRczLQsgFJ8K6aAD6F0CQQDzbpjYdx10qgK1\ncP59UHiHjPZYC0loEsk7s+hUmT3QHerAQJMZWC11Qrn2N+ybwwNblDKv+s5qgMQ5\n5tNoQ9IfAkEAxkyffU6ythpg/H0Ixe1I2rd0GbF05biIzO/i77Det3n4YsJVlDck\nZkcvY3SK2iRIL4c9yY6hlIhs+K9wXTtGWwJBAO9Dskl48mO7woPR9uD22jDpNSwe\nk90OMepTjzSvlhjbfuPN1IdhqvSJTDychRwn1kIJ7LQZgQ8fVz9OCFZ/6qMCQGOb\nqaGwHmUK6xzpUbbacnYrIM6nLSkXgOAwv7XXCojvY614ILTK3iXiLBOxPu5Eu13k\neUz9sHyD6vkgZzjtxXECQAkp4Xerf5TGfQXGXhxIX52yH+N2LtujCdkQZjXAsGdm\nB2zNzvrlgRmgBrklMTrMYgm1NPcW+bRLGcwgW2PTvNM=\n-----END RSA PRIVATE KEY-----\nEOD;\n\n$publicKey = <<<EOD\n-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC8kGa1pSjbSYZVebtTRBLxBz5H\n4i2p/llLCrEeQhta5kaQu/RnvuER4W8oDH3+3iuIYW4VQAzyqFpwuzjkDI+17t5t\n0tyazyZ8JXw+KgXTxldMPEL95+qVhgXvwtihXC1c5oGbRlEDvDF6Sa53rcFVsYJ4\nehde/zUxo6UvS7UrBQIDAQAB\n-----END PUBLIC KEY-----\nEOD;\n\n$payload = array(\n \"iss\" => \"example.org\",\n \"aud\" => \"example.com\",\n \"iat\" => 1356999524,\n \"nbf\" => 1357000000\n);\n\n$jwt = JWT::encode($payload, $privateKey, 'RS256');\necho \"Encode:\\n\" . print_r($jwt, true) . \"\\n\";\n\n$decoded = JWT::decode($jwt, $publicKey, array('RS256'));\n\n/*\n NOTE: This will now be an object instead of an associative array. To get\n an associative array, you will need to cast it as such:\n*/\n\n$decoded_array = (array) $decoded;\necho \"Decode:\\n\" . print_r($decoded_array, true) . \"\\n\";\n\t\t// $this->load->view('welcome_message');\n\t}", "public function getExtensionKey(): string\n {\n return $this->extensionKey;\n }", "public static function genKey() {\r\n\t\treturn base64_encode(mcrypt_create_iv(40, MCRYPT_DEV_URANDOM));\r\n\t}", "public function getKey(): string\n {\n if (!$this->key) {\n $this->key = sha1($this->ip.$this->route);\n }\n\n return $this->key;\n }", "private function getKey($type = \"priv\")\n {\n $contents = \"\";\n if ($type == \"priv\" || $type == \"pub\") {\n $type == \"priv\" ? $filename = $this->privateKey : $filename = $this->pubKey;\n if (file_exists($filename)) {\n $handle = fopen($filename, \"r\");\n if ($handle ) {\n $contents = fread($handle, filesize($filename));\n if (!$contents) {\n throw new TOTPException(\"key \" . $filename . \" is empty\");\n }\n fclose($handle);\n } else {\n throw new TOTPException($filename . \" could not be open\");\n }\n } else {\n throw new TOTPException(\"key \" . $filename . \" not found\");\n }\n } else {\n throw new TOTPException(\"open key : type not specified\");\n }\n return $contents;\n }", "public function getConsumerKey();", "public function getConsumerKey();", "public function getUnsecureKey(){\r\n \t$key = \":\".$this->valPrefix.$this->valVar.'opoink';\r\n \t$this->valVar++;\r\n \treturn $key;\r\n }", "public function getCertKeyPassword() {\r\n return ipworksencrypt_certmgr_get($this->handle, 7 );\r\n }", "public function key() {\n return serialize($this->currentKey);\n }", "protected function signingKey()\n {\n return array_reduce($this->signatureData(), function ($key, $data) {\n return $this->keyHash($data, $key);\n }, 'AWS4' . $this->secret);\n }" ]
[ "0.74838275", "0.66025186", "0.6523395", "0.6513327", "0.641475", "0.6412446", "0.63767374", "0.63754994", "0.62270564", "0.6209741", "0.6209741", "0.6209741", "0.6208903", "0.6181936", "0.6161917", "0.6147834", "0.60542375", "0.60421854", "0.60421294", "0.6018881", "0.6007689", "0.5983986", "0.59745985", "0.59657604", "0.5946986", "0.59467065", "0.5916816", "0.58987135", "0.587413", "0.583873", "0.58329993", "0.58112586", "0.5810167", "0.58058363", "0.57728827", "0.57541806", "0.5736194", "0.57139736", "0.56720656", "0.56328875", "0.5625555", "0.56055045", "0.5594019", "0.5574232", "0.5572983", "0.5572983", "0.5551321", "0.5544927", "0.5520503", "0.5517125", "0.5509382", "0.54939455", "0.5487761", "0.54848963", "0.5483177", "0.54715246", "0.54612285", "0.54542243", "0.5434727", "0.5412408", "0.5410311", "0.53997016", "0.5389812", "0.53833425", "0.53403825", "0.53345084", "0.5332072", "0.5330515", "0.53263724", "0.53248215", "0.5313296", "0.52994704", "0.5298513", "0.5290976", "0.52906114", "0.5279103", "0.5260919", "0.52492946", "0.52468145", "0.5240522", "0.523011", "0.5224629", "0.5220894", "0.52152216", "0.5209021", "0.52055717", "0.52000976", "0.5185669", "0.5182676", "0.5177207", "0.5176616", "0.5175785", "0.5165779", "0.51641816", "0.5161446", "0.5161446", "0.51530594", "0.5136652", "0.51338816", "0.5127968" ]
0.7181921
1
Including the css in html/head section. codeyml type: widget data: plugin: 'davegandy/fontawesome450' method: include code
Включение css в раздел html/head. codeyml тип: widget данные: плагин: 'davegandy/fontawesome450' метод: include код
public static function widget_include(){ $element = wfDocument::createHtmlElement('link', null, array('href' => '/plugin/davegandy/fontawesome450/css/font-awesome.css', 'rel' => 'stylesheet', 'id' => 'PluginDavegandyFontawesome450')); wfDocument::renderElement(array($element)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function theme58090_include_custom_assets() {\n\t// Get the theme prefix.\n\t$prefix = cherry_get_prefix();\n\n\twp_enqueue_style( 'font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css', false, '4.4.0', 'all' );\n\twp_enqueue_style( 'fl-bigmug-line', get_stylesheet_directory_uri() . '/assets/css/fl-bigmug-line.css', false, '1.0', 'all' );\n\twp_enqueue_script( $prefix . 'script', CHILD_URI . '/assets/js/script.js', array( 'jquery' ), '1.0', true );\n}", "function bbmustache_custom_field_assets(){\r\n if ( class_exists( 'FLBuilderModel' ) && FLBuilderModel::is_builder_active() ) {\r\n wp_enqueue_style( 'bbmustache-custom-fields', BBMUSTACHE_MODULE_URL . 'settings/css/settings.css', array( 'font-awesome' ), '' );\r\n }\r\n}", "function font_awesome() {\n\t\twp_enqueue_style('fontawesome', 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css');\n\t}", "public function register_fontawesome_before_elementor_styles() {\n\t\t\t$suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';\n\t\t\twp_register_style( 'font-awesome', get_template_directory_uri() . '/assets/vendors/fontawesome/css/all' . $suffix . '.css', '', '5.12.0' );\n\t\t}", "function fontawesome_scripts() {\n\twp_enqueue_style( 'seed-fontawesome', get_template_directory_uri() . '/vendor/fonts/font-awesome/css/fontawesome-all.min.css' );\n}", "function add_font_awesome() {\n\twp_enqueue_style( 'font-awesome', 'https://use.fontawesome.com/releases/v5.6.3/css/all.css' );\n}", "protected function addHeadIncludes() {\n\n $this->_renderSlider();\n\n ob_start();\n $content = $this->_frameworkHelper->do_action('wp_footer');\n $content = ob_get_contents();\n ob_clean();\n ob_end_clean();\n\n // TODO: Check about including this\n //$content .= Mage::helper('nwdrevslider')->includeEnqueuedAssets();\n\n foreach ($this->_frameworkHelper->getRegisteredStyles() as $_style) {\n $content .= '<link rel=\"stylesheet\" type=\"text/css\" media=\"all\" href=\"' . $_style . '\" />';\n }\n\n $content .= $this->_frameworkHelper->getLocalizeScriptsHtml();\n\n return $content;\n }", "function loadFontAwesome(){\n wp_enqueue_style(\"fontawesome\", 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css');\n}", "public function enqueue()\n {\n\n $script_uri = YATRI_THEME_URI . 'mantrabrain-theme/customizer/controls/icon-picker/';\n $fs_script_uri = YATRI_THEME_URI . 'mantrabrain-theme/assets/lib/font-awesome/css/font-awesome.min.css';\n\n\n $icon_lists = array(\n 'font_awesome' => array(\n 'title' => esc_html__('Font Awesome', 'yatri'),\n 'icons' => Mantrabrain_Theme_Helper::font_awesome_icon_list()\n )\n );\n\n wp_enqueue_script('yatri-icon-picker-control-js', $script_uri . 'icon-picker.js', array('jquery'), YATRI_THEME_VERSION, true);\n wp_localize_script('yatri-icon-picker-control-js', 'yatriAllIcons', $icon_lists);\n\n\n wp_register_style('yatri-font-awesome', $fs_script_uri, array(), YATRI_THEME_VERSION);\n wp_enqueue_style('yatri-icon-picker-control-css', $script_uri . 'icon-picker.css', array('yatri-font-awesome'), YATRI_THEME_VERSION);\n\n\n }", "function font_awesome()\n{\n wp_enqueue_style('font_awesome', '//use.fontawesome.com/releases/v5.6.3/css/all.css');\n}", "function enqueue_our_required_stylesheets() {\r\r\n\twp_enqueue_style('font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css'); \r\r\n}", "function enqueue_our_required_stylesheets(){\r\n\twp_enqueue_style('font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css'); \r\n}", "function hackeryou_styles(){\n\twp_enqueue_style('style', get_stylesheet_uri() );\n\n\twp_enqueue_style('fontawesome', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css');\n}", "protected function addStylesAndJavascriptToForm() { \n $extCssRel = ExtensionManagementUtility::extRelPath('t3kit_extension_tools') . 'Resources/Public/Css/BE/iconFontSelector.css';\n $pageRenderer = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance(\\TYPO3\\CMS\\Core\\Page\\PageRenderer::class);\n $pageRenderer->addCssFile(BasicFileUtility::slashPath($this->cssFileInformation['relativePath']) . $this->cssFileInformation['basename']);\n $pageRenderer->addCssFile($extCssRel);\n }", "function addHeaderCode() {\r\n\twp_enqueue_style('socialConnect-style', plugins_url('/social-connect-widget/css/socialConnect-style.php'));\r\n\twp_enqueue_style('tipTip-style', plugins_url('/social-connect-widget/css/tipTip.css'));\r\n\r\n\twp_enqueue_script('jquery');\r\n\twp_enqueue_script('tipTip', plugins_url('/social-connect-widget/js/jquery.tipTip.js'), __FILE__, '' , 'all');\r\n\twp_enqueue_script('socialConnectScripts', plugins_url('/social-connect-widget/js/socialConnect.scripts.js'), __FILE__, '' , 'all');\r\n\tif (get_option('sc_displayModal')) {\r\n\t\twp_enqueue_style('simpleModal-style', plugins_url('/social-connect-widget/css/simpleModal.php'));\r\n\t\twp_enqueue_script('simpleModal', plugins_url('/social-connect-widget/js/jquery.simplemodal.js'), __FILE__, '' , 'all');\r\n\t}\r\n}", "function picassopro_fontawesome(){\n wp_enqueue_style('font-awesome', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css'); \n}", "function falcon_scripts() {\n wp_enqueue_style( 'oppan-falcon-style', get_stylesheet_uri() );\n wp_enqueue_style( 'font-awesome', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css' );\n}", "function includeHead() { \n $str = ''; \n $str .= $this->Html->script('farbtastic'); \n $str .= $this->Html->css('farbtastic'); \n return $str; \n }", "function admin_register_head() {\n $siteurl = get_option('siteurl');\n $url = $siteurl . '/wp-content/plugins/' . basename(dirname(__FILE__)) . '/css/tabinfo.css';\n echo \"<link rel='stylesheet' type='text/css' href='$url' />\\n\";\n echo '<link href=\"https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css\" rel=\"stylesheet\" integrity=\"sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN\" crossorigin=\"anonymous\">';\n}", "function head_css() {\n\n $this->url_path = REPORTQA_PLUGIN_BASE_DIR_NAME;\n $this->content['css_src'][] = REPORTQA_PLUGIN_BASE_DIR_NAME . '/css/report_style.css';\n // First vendor css\n $this->content['css_src'][] = '//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css';\n $this->content['css_src'][] = '//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css';\n $this->content['css_src'][] = $this->url_path . '/css/jquery-ui.css';\n $this->content['css_src'][] = $this->url_path . '/css/magic-check.css';\n\n // Second app css\n // IMPORTANT: Add new custom css after vendor\n $this->content['css_src'][] = $this->url_path . '/css/style.css';\n $this->content['css_src'][] = $this->url_path . '/css/style_font.css';\n $this->content['css_src'][] = $this->url_path . '/css/themestyle.css';\n qa_html_theme_base::head_css();\n }", "public function admin_enqueue_fontawesomeBlock(){\n\t\t}", "public function registerCss()\n\t{\n\t\t$path = '/css/font-awesome.css';\n\t\tif($this->minified == true){\n\t\t\t$path = '/css/font-awesome.min.css';\n\t\t}\n\t\tYii::app()->clientScript->registerCssFile($this->getAssetsUrl().$path);\n\t}", "function prefix_enqueue_awesome() {\n\twp_enqueue_style( 'prefix-font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css', array(), '4.2.0' ); \n\t}", "function reme_admin_enqueue_scripts() {\r\n\twp_enqueue_style( 'reach-me-font-awesome', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css', array(), null );\r\n}", "function overlap_custom_head_script(){ \r\n ob_start();\r\n include_once get_template_directory() .'/css/custom-css.php';\r\n $head_content = ob_get_clean();\r\n echo '<style type=\"text/css\" data-name=\"overlap-color-scheme\">' .$head_content.'</style>';\r\n\r\n if( overlap_get_option('head_script') ){\r\n /**\r\n *Extra HTML/JavaScript/Stylesheet from theme options > advanced - head content\r\n */\r\n echo apply_filters('overlap_head_content', overlap_get_option('head_script') ); \r\n } \r\n}", "function enqueue_load_fa() {\n wp_enqueue_style('font-awesome-free', '//cdnjs.cloudflare.com/ajax/libs/font-awesome/5.10.2/css/all.min.css'); \n\n wp_enqueue_script('font-awesome-free');\n}", "function setup(){\r\n //wp_enqueue_style('font-awesome',);\r\n wp_enqueue_style('all', 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.9.0/css/all.css');\r\n //wp_enqueue_style('fontawesome', get_template_directory_uri().\"/fontawesome.css\");\r\n wp_enqueue_style('fontawesome','https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.9.0/css/fontawesome.css');\r\n wp_enqueue_style('style',get_stylesheet_uri(),NULL,microtime());\r\n wp_enqueue_script(\"main\",get_theme_file_uri('/js/main.js'),NULL,microtime(),true);\r\n}", "function enqueue_our_required_stylesheets(){\n\twp_enqueue_style('font-awesome', get_stylesheet_directory_uri() . '/css/font-awesome.css'); \n}", "private function registerFontAwesome()\n {\n $postfix = YII_DEBUG ? '' : '.min';\n $clientScript = Yii::app()->clientScript;\n $assetsDir = __DIR__ . DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR;\n $css = '/css/font-awesome' . $postfix . '.css';\n $url = Yii::app()->assetManager->publish($assetsDir\n . 'font-awesome');\n $clientScript->registerCssFile($url . $css);\n }", "function enqueue_font_awesome_stylesheets(){\n\twp_enqueue_style('font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css'); \n}", "function add_custom_css_framework(){\n require_once plugin_dir_path(__FILE__).'lib/api/layout/functions.php';\n require_once plugin_dir_path(__FILE__).'lib/api/uikit/class-beans-uikit.php';\n require_once plugin_dir_path(__FILE__).'lib/api/uikit/functions.php';\n}", "function dc_resources_admin_head() {\n\tglobal $plugin_dir;\n\t\n\twp_enqueue_script( 'dc_plugin_js', $plugin_dir . '/resources/js/wp-download-codes.js', 'jquery', '1.0' );\n\techo '<link rel=\"stylesheet\" type=\"text/css\" href=\"' . $plugin_dir . '/resources/css/wp-download-codes.css\" type=\"text/css\" />' . \"\\n\";\n}", "function redux_queue_font_awesome() {\n wp_register_style( 'fontawesome', get_template_directory_uri() . '/assets/css/fontawesome.css', array(), time(), 'all' );\n wp_enqueue_style( 'fontawesome' );\n}", "private function add_head_elements()\n {\n $this->mvc->head->add_link\n (\n array\n (\n 'rel' => 'stylesheet',\n 'type' => 'text/css',\n 'href' => MIDGARDMVC_STATIC_URL . '/midgardmvc_account/css/account.css'\n )\n );\n }", "function awesome_script_enqueue(){\n\t wp_enqueue_style('customstyle',get_template_directory_uri().'/css/awesome.css',array(),\n\t\t filemtime(get_template_directory() . '/css/awesome.css'),'all');\n\n\t //this\n\t wp_enqueue_script('customjs',get_template_directory_uri().'/js/javascript.js',array(),\n\t\t filemtime(get_template_directory() . '/js/javascript.js'),true);\n\t}", "function enqueue_font_awesome() {\n \nwp_enqueue_style( 'font-awesome', '/wp-content/themes/Neue-Portfolio/library/css/font-awesome.min.css' );\n \n}", "function sociallocker_icon_admin_assets($hook)\n\t{\n\n\t\tif( onp_build('free') ) {\n\t\t\t?>\n\t\t\t<style>\n\t\t\t\t#menu-posts-opanda-item a[href*=\"premium-sociallocker-next\"] {\n\t\t\t\t\tcolor: #43b8e3 !important;\n\t\t\t\t}\n\t\t\t</style>\n\t\t\t<?php\n\n\t\t\treturn;\n\t\t} else {\n\n\t\t\tif( !onp_license('free') ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t?>\n\t\t\t<style>\n\t\t\t\t#toplevel_page_license-manager-sociallocker-next div.wp-menu-image,\n\t\t\t\t#toplevel_page_license-manager-sociallocker-next:hover div.wp-menu-image,\n\t\t\t\t#toplevel_page_license-manager-sociallocker-next.wp-has-current-submenu div.wp-menu-image {\n\t\t\t\t\tbackground-position: 8px -30px !important;\n\t\t\t\t}\n\t\t\t</style>\n\t\t<?php\n\t\t}\n\t}", "public function control_panel__add_to_head()\n\t{\n\t\treturn $this->css->link('boilerplate.css');\n\t}", "private function includes() {\n\n\t\twp_enqueue_style( 'profile-cct-addon', PROFILE_Addon_CCT_DIR_URL.'/css/profile-addon.css' );\n\t\trequire( PROFILE_Addon_CCT_DIR_PATH . 'fields/ao-publications.php' );\n\t\trequire( PROFILE_Addon_CCT_DIR_PATH . 'fields/ao-courses.php' );\n\t\trequire( PROFILE_Addon_CCT_DIR_PATH . 'fields/ao-research.php' );\n\t\trequire( PROFILE_Addon_CCT_DIR_PATH . 'libs/profile-cct-addon-shortcodes.php' );\n\t}", "public function themeslug_enqueue_style() {\n\t\twp_enqueue_style( 'awesome-font', URL_ADMIN_IU . '/font-awesome-4.7.0/css/font-awesome.min.css', false );\n\t}", "public function insertCss() {\r\n wp_enqueue_style('thickbox');\r\n $theme = self::get('theme', 'simple');\r\n wp_register_style('ipenelo-calendar-public', $this->_pluginUrl . '/themes/' . $theme . '/css/styles-public.css', array());\r\n wp_enqueue_style('ipenelo-calendar-public');\r\n }", "function sunset_load_admin_scripts(){ \n wp_enqueue_style( 'wpb-fa', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css' );\n wp_enqueue_style( 'wpb-bootstrap', plugin_dir_url(__FILE__).'/assets/css/styles.css' );\n}", "public function supercar_plugin_admin_head() {\n\n // Enqueue jQuery UI CSS\n //\n // UI Style (prefered CDN vendors - Note the SSL negociation)\n wp_enqueue_style( 'jquery-ui-style', '//ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/themes/smoothness/jquery-ui.css', true);\n wp_enqueue_script( 'jquery-ui-style', '//code.jquery.com/ui/1.11.4/jquery-ui.js' ); // Distant git from jQuery CDN\n\n // Enqueue Datepicker\n //\n // Datepicker widget (finally the entries have no calendar date)\n //wp_enqueue_script( 'jquery-ui-datepicker', plugins_url('/core/js/jquery-datepicker.js', __FILE__), false, null); // Local available\n\n // Internationalisaton | FR options & Elements scripting behaviors (attaching datepicker to needed IDs if used)\n wp_enqueue_script( 'plugin-supercar-runtime-apps', plugins_url('/core/js/plugin-runtime.js', __FILE__), array(), null, false);\n wp_enqueue_style( 'plugin-supercar-runtime-apps', plugins_url('/core/css/plugin-runtime.css', __FILE__), array(), null );\n\n }", "public function supercar_plugin_admin_head() {\n\n // Enqueue jQuery UI CSS\n //\n // UI Style (prefered CDN vendors - Note the SSL negociation)\n wp_enqueue_style( 'jquery-ui-style', '//ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/themes/smoothness/jquery-ui.css', true);\n wp_enqueue_script( 'jquery-ui-style', '//code.jquery.com/ui/1.11.4/jquery-ui.js' ); // Distant git from jQuery CDN\n\n // Enqueue Datepicker\n //\n // Datepicker widget (finally the entries have no calendar date)\n //wp_enqueue_script( 'jquery-ui-datepicker', plugins_url('/core/js/jquery-datepicker.js', __FILE__), false, null); // Local available\n\n // Internationalisaton | FR options & Elements scripting behaviors (attaching datepicker to needed IDs if used)\n wp_enqueue_script( 'plugin-supercar-runtime-apps', plugins_url('/core/js/plugin-runtime.js', __FILE__), array(), null, false);\n wp_enqueue_style( 'plugin-supercar-runtime-apps', plugins_url('/core/css/plugin-runtime.css', __FILE__), array(), null );\n\n }", "public static function enqueue_element_styles() {\r\r\n wp_enqueue_style( 'super-font-awesome', SUPER_PLUGIN_FILE . 'assets/css/fonts/font-awesome.min.css', array(), SUPER_VERSION );\r\r\n wp_enqueue_style( 'super-elements', SUPER_PLUGIN_FILE . 'assets/css/frontend/elements.min.css', array(), SUPER_VERSION );\r\r\n }", "function awesome_script_enque()\n{\n wp_enqueue_style('customstyle', get_template_directory_uri().'/css/awesome.css', array(), '1.0.0', 'all');\n wp_enqueue_script('customscript', get_template_directory_uri.'/js/awesome.js', array(), '1.0.0', true);\n}", "function wppractice2_enqueue_scripts(){\n\n wp_enqueue_style('font-awesome', 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css');\n\n wp_enqueue_style('bootstrap-css', get_stylesheet_directory_uri() . '/bootstrap.min.css', [], time(), 'all');\n\n wp_enqueue_style('main-css', get_stylesheet_directory_uri() . '/style.css', [], time(), 'all');\n\n // JS scripts\n wp_enqueue_script('wppractice2-scripts', get_template_directory_uri() . '/assets/js/functions.js', [ 'jquery' ], null, false);\n\n\n }", "function housico_custom_css() {\n\t\t\techo '<style type=\"text/css\" id=\"housico_custom-css\">'. housico_custom_css() .'</style>';\n\t\t}", "public function setup_admin_head() {\n echo '<link rel=\"stylesheet\" type=\"text/css\" href=\"' . plugins_url( 'css/clockwork.css', __FILE__ ) . '\">';\n }", "function add_scripts() {\n\twp_enqueue_style( 'parent-style', get_stylesheet_uri() );\n\twp_enqueue_style( 'prefix-font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css', array(), '4.5.0' );\n\twp_enqueue_script( 'scripts', get_theme_root_uri().'/zerif-lite-child/js/scripts.js', array('jquery') );\n}", "public function appendAssets()\n\t\t{\n\t\t\tAdministration::instance()->Page->addStylesheetToHead(URL . '/extensions/switches/assets/switches.css');\n\t\t}", "public function css() {\n\t\tif ($this->css != false) {\n\t\t\tif($this->scriptTo) {\n\t\t\t\t$elem = pzk_element($this->scriptTo);\n\t\t\t\tif(file_exists('default/skin/'.pzk_app()->getPathByName() . '/themes/' . pzk_request()->getDefaultTheme() .'/css/'.$this->css.'.css')) {\n\t\t\t\t\t$elem->append(pzk_parse('<html.css src=\"/default/skin/'.pzk_app()->getPathByName() . '/themes/' . pzk_request()->getDefaultTheme() .'/css/'.$this->css.'.css\" />'));\n\t\t\t\t} else if(file_exists('default/skin/'.pzk_app()->getPathByName().'/css/'.$this->css.'.css')) {\n\t\t\t\t\t$elem->append(pzk_parse('<html.css src=\"/default/skin/'.pzk_app()->getPathByName().'/css/'.$this->css.'.css\" />'));\n\t\t\t\t} else if (file_exists('default/skin/'.pzk_app()->getPackageByName().'/css/'.$this->css.'.css')) {\n\t\t\t\t\t$elem->append(pzk_parse('<html.css src=\"/default/skin/'.pzk_app()->getPackageByName().'/css/'.$this->css.'.css\" />'));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif($page = pzk_page())\n\t\t\t\t\t$page->addObjCss($this->css);\n\t\t\t}\n\n\t\t}\n\t\tif ($this->cssExternalLink != false) {\n\t\t\tif($this->scriptTo) {\n\t\t\t\t$elem = pzk_element($this->scriptTo);\n\t\t\t\t$elem->append(pzk_parse('<html.css src=\"'.$this->cssExternalLink.'\" />'));\n\t\t\t} else {\n\t\t\t\tif($page = pzk_page()) {\n\t\t\t\t\t$page->addExternalCss($this->cssExternalLink);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t}", "function gogreen_custom_head_script(){ \n ob_start();\n include_once( get_template_directory() .'/css/custom-css.php' );\n $head_content = ob_get_clean();\n echo '<style type=\"text/css\" data-name=\"gogreen-color-scheme\">' .$head_content.'</style>';\n\n if( gogreen_get_option('head_script') ){\n /**\n *Extra HTML/JavaScript/Stylesheet from theme options > advanced - head content\n */\n echo apply_filters('gogreen_head_content', gogreen_get_option('head_script') ); \n } \n}", "function admin_foobar_css_enqueue() {\r\n $this->register_and_enqueue_css(FOOBAR_FILE_CSS);\r\n }", "function webrupee_css() {\n echo '<!-- WebRupee plugin -->' ;\n echo '<link rel=\"stylesheet\" type=\"text/css\" href=\"http://cdn.webrupee.com/font\">' ;\n echo '<!-- /WebRupee plugin -->' ;\n }", "function sm_scripts() {\r\n\t\twp_enqueue_style( 'dashicons' );\r\n\t}", "function wf_theme_styles() {\n wp_enqueue_style( 'font-awesome-free', '//use.fontawesome.com/releases/v5.7.0/css/all.css' );\n wp_enqueue_style('style_css', get_template_directory_uri() . '/style.css');\n}", "public function css_includes()\n {\n }", "public function insert_inline_scripts() {\n }", "public function insert_inline_scripts() {\n }", "function beaver_extender_fe_css_builder() {\r\n\r\n\techo '<span id=\"beaver-extender-fe-css-builder-css\" style=\"display:none;\"><span class=\"dashicons dashicons-sos\"></span></span>' . \"\\n\";\r\n\techo '<span id=\"beaver-extender-fe-css-builder-highlight-css\"></span>' . \"\\n\";\r\n\t\r\n\tif ( PHP_VERSION >= 5.3 )\r\n\t\techo '<span id=\"css-builder-hooks-map\"><span class=\"dashicons dashicons-location-alt\"></span></span>' . \"\\n\";\r\n\t\r\n}", "function socialConnect_loadCSS() {\r\n\twp_enqueue_style('socialConnect_settingsCSS', plugins_url().'/social-connect-widget/css/socialConnect-settings.css', __FILE__, '', 'all');\r\n\twp_enqueue_style('sinple-slider-css', plugins_url().'/social-connect-widget/css/simple-slider.css', __FILE__, '', 'all');\r\n\twp_enqueue_script('simpleSlider', plugins_url('/social-connect-widget/js/jquery.simple-slider.js'), __FILE__, '' , 'all');\r\n\twp_enqueue_script('socialConnect_settingsJS', plugins_url('/social-connect-widget/js/socialConnect.settings-scripts.js'), __FILE__, '' , 'all');\r\n\tadd_action('admin_init', 'addHeaderCode');\r\n?>\r\n<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css' />\r\n<link href='http://fonts.googleapis.com/css?family=Droid+Sans:regular,bold' rel='stylesheet' type='text/css' />\r\n<?php\r\n}", "function creative_theme_assets() {\n\twp_enqueue_style( 'style', get_template_directory_uri() . '/dist/style.css' );\n\twp_enqueue_script( 'siema', get_template_directory_uri() . '/vendor/siema.min.js', $deps = array(), $ver = false, $in_footer = true );\n\twp_enqueue_script( 'details-polyfill', get_template_directory_uri() . '/vendor/details-element-polyfill.js', $deps = array(), $ver = false, $in_footer = true );\n\twp_enqueue_script( 'script', get_template_directory_uri() . '/dist/app.js', $deps = array(), $ver = false, $in_footer = true );\n}", "function perfex_office_theme_includes()\n{\n echo '<link href=\"' . module_dir_url(PERFEX_OFFICE_THEME, 'assets/css/clients/clients.css') . '\" rel=\"stylesheet\" type=\"text/css\" >';\n echo '<script src=\"' . module_dir_url(PERFEX_OFFICE_THEME, 'assets/js/third-party/nanobar.js') . '\"></script>';\n}", "function adelman_font_awesome() {\n wp_dequeue_style('et-font-awesome');\n wp_deregister_style('et-font-awesome');\n wp_enqueue_style('et-font-awesome', get_template_directory_uri().'/css/font-awesome.css', array());\n}", "function _head_styles()\n {\n\t\t$screen = get_current_screen();\n\t\t\n\t\t// only load our styles if on one of our screens\n\t\tif ( strpos($screen->base,'pagely') !== false ) \n\t\t{\n $src = plugin_dir_url(dirname(__DIR__).'/foo').'css/pagely_styles.css';\n\t\t\twp_enqueue_style( 'pagely-styles', $src, false, false, false ); \n\t\t\tpagely_load_font_awesome();\n\t\t}\n\t}", "function my_theme_scripts() {\n\t\t//wp_enqueue_style( 'my-form-style', plugin_dir_url( __FILE__ ). '/css/bootstrap.min.css');\n\t\twp_enqueue_style( 'my-form-style1', plugin_dir_url( __FILE__ ). '/css/font-awesome.css');\n\t\twp_enqueue_style( 'my-form-style2', plugin_dir_url( __FILE__ ). '/css/custom-form.css');\n\t}", "public static function add_css() {\n\t\t$style= plugins_url('module-distribution/css/studio-admin.css',dirname(__FILE__)) ;\n\t\techo \"<link rel='stylesheet' href='\".$style.\"'>\";\n\n\t}", "function registerHead()\r\n\t{\r\n\t\t$url = WP_PLUGIN_URL.'/'.basename(dirname(__FILE__)).'/auto-content-links.css';\r\n\t\techo \"<link rel=\\\"stylesheet\\\" type=\\\"text/css\\\" href=\\\"\".$url.\"\\\" />\\n\";\t\r\n\t}", "function rpg_headinformation() { \r\n //bindet das js ein\r\n echo '<script src=\"'.get_site_url().'/wp-content/plugins/rpg/jquery/jquery-ui.js\"></script>';\r\n echo '<link rel=\"stylesheet\" href=\"'.get_site_url().'/wp-content/plugins/rpg/css/rpg_styles.css\">';\r\n}", "function ins_admin_js_and_css(){\n\n wp_register_style( 'adminStyle', plug_infos('url') . '/inc/css/'.plug_infos('name').'.css', array(), 'all' );\n wp_register_style( 'fa', plug_infos('url') . '/inc/vendor/font-awesome/css/font-awesome.min.css', array(), 'all' );\n wp_register_style( 'Bootstrap', plug_infos('url') . '/inc/vendor/bootstrap.min.css', array(), 'all' );\n\n ##################| [ Scripts - fontEnd ] |###################### \n wp_register_script( 'adminScripts', plug_infos('url') . '/inc/js/'.plug_infos('name').'.js', array('jquery'), true );\n wp_register_script( 'Bootstrap', plug_infos('url') . '/inc/vendor/bootstrap.min.js', array('jquery'), true );\n\n ##################| [ enqueing all ] |###################### \n \n $stylEnqueu_adm = [\n 'adminStyle','Bootstrap','fa'\n ];\n $scriptEnque_adm = [\n 'adminScripts','Bootstrap'\n ];\n\n foreach ($stylEnqueu_adm as $style ) { wp_enqueue_style( $style ); }\n foreach ($scriptEnque_adm as $script ) { wp_enqueue_script( $script ); }\n}", "public function onTwigSiteVariables() {\n if ($this->config->get('plugins.printfriendly.built_in_css')) {\n $this->grav['assets']->addCss('plugins://printfriendly/assets/css/printfriendly.css');\n }\n\n if ($this->config->get('plugins.printfriendly.jqueryui.version')){\n $version = (string)$this->config->get('plugins.printfriendly.jqueryui.version');\n } else {\n $version = '1.12.0';\n }\n if ( $this->config->get('plugins.printfriendly.jqueryui.source') == 'maxcdn' ) {\n $themes_source = 'https://code.jquery.com/ui/'.$version.'/themes/';\n $jquery_ui_source = 'https://code.jquery.com/ui/'.$version.'/';\n } else {\n $themes_source = 'plugin://printfriendly/assets/jquery-ui-themes-'.$version.'/themes/';\n $jquery_ui_source = 'plugin://printfriendly/assets/jquery-ui-'.$version.'/';\n }\n \n $themes = $this->config->get('plugins.printfriendly.jqueryui.themes');\n if($themes){\n $this->grav['assets']->addCss($themes_source.$themes.'/jquery-ui.css');\n } else {\n $this->grav['assets']->addCss($themes_source.'smoothness/jquery-ui.css');\n }\n \n if ($this->config->get('plugins.printfriendly.awesome.use_font')) {\n $this->grav['assets']->addCss('plugin://printfriendly/assets/css/font-awesome.min.css');\n }\n\n $this->grav['assets']\n ->add('jquery', 101)\n ->addJs('plugin://printfriendly/assets/js/printThis.js')\n ->addJs('plugin://printfriendly/assets/js/printfriendly.js')\n ->addJs($jquery_ui_source.'jquery-ui.min.js');\n }", "public static function custom_head_css() {\n\t\t\n\t\t\tslp_pvw_plugin_framework::pvw_head_css();\n\t\t\n\t\t}", "public function head()\n {\n foreach($this->_assets as $asset) {\n echo $asset->getAllCssIncludes();\n }\n }", "function custom_admin_head() {\n $css = '';\n\n $css = 'td.media-icon img[src$=\".svg\"] { width: 100% !important; height: auto !important; }';\n\n echo '<style type=\"text/css\">'.$css.'</style>';\n}", "function add_attribs_to_scripts( $tag, $handle, $src ) {\n$fontAwsome = array(\n\t'fontawesome',\n);\n\nif ( in_array( $handle, $fontAwsome ) ) {\n return '<script src=\"' . $src . '\" crossorigin=\"anonymous\" type=\"text/javascript\"></script>' . \"\\n\";\n}\nreturn $tag;\n}", "function webm_project_head() {\n \t$siteurl = get_option('siteurl');\n $pluginfolder = get_bloginfo('url') . '/' . PLUGINDIR . '/' . dirname(plugin_basename(__FILE__));\n\n\twp_enqueue_script('jquery');\n\twp_enqueue_script('jquery-ui-core');\n\twp_enqueue_script('jquery-ui-datepicker');\n\twp_enqueue_script('jquery-ui-slider');\n\t//wp_enqueue_script('jquery-ui-datepicker,jquery-ui-slider', $pluginfolder . '/js/jquery-ui.js', array('jquery','jquery-ui-core'));\n\twp_enqueue_style('jquery.ui.theme', $pluginfolder . '/css/jquery-ui-custom.css');\n\t\n\twp_register_style('admin.css',$pluginfolder . '/admin.css'); \n\twp_enqueue_style('admin.css');\n\t\n}", "function tinytheme_scripts_and_styles_setup() {\n\t\twp_enqueue_style( 'tinytheme-icon-font', get_template_directory_uri() . '/stylesheet/font-awesome.min.css' );\n\t\twp_enqueue_style( 'tinytheme-icon-font-ie', get_template_directory_uri() . '/stylesheet/font-awesome-ie7.min.css', array( 'tinytheme-icon-font' ) );\n\t\twp_style_add_data( 'tinytheme-icon-font-ie', 'conditional', 'IE 7' );\n\t}", "protected function addHeader() {\n Administration::instance()->Page->addScriptToHead(URL . '/extensions/datetime/assets/jquery-ui.js', 100, true);\n Administration::instance()->Page->addScriptToHead(URL . '/extensions/datetime/assets/datetime.js', 201, false);\n Administration::instance()->Page->addStylesheetToHead(URL . '/extensions/datetime/assets/datetime.css', 'screen', 202, false);\n\t}", "function sua_formatura_scripts()\n{\n // CSS\n wp_enqueue_style('all', get_theme_file_uri('/css/all.css'), array(), '1.6');\n wp_enqueue_style('font-awesome', get_theme_file_uri('/assets/font-awesome/css/font-awesome.min.css'), array(), '1.0');\n wp_enqueue_style('iconmoon', get_theme_file_uri('/assets/iconmoon/css/iconmoon.css'), array(), '1.0');\n wp_enqueue_style('app', get_theme_file_uri('/css/app.css'), array('all'), '1.8');\n wp_enqueue_style('custom', get_theme_file_uri('/css/custom.css'), array('app'), '1.8');\n // JS\n wp_enqueue_script('all', get_theme_file_uri('/js/all.js'), array('jquery'), '1.5', true);\n wp_enqueue_script('app', get_theme_file_uri('/js/app.js'), array('jquery'), '1.5', true);\n}", "public function insert_widget_css() {\n echo \"<style type='text/css'>\\n\", PingFmCustomUrlOptions::factory()->user_css, \"</style>\\n\";\n }", "public function hookHeader()\r\n {\r\n $this->context->controller->addJS($this->_path.'/views/js/whatsapp.js');\r\n $this->context->controller->addCSS($this->_path.'/views/css/whatsapp.css');\r\n }", "function frontend_foobar_js_and_css() {\r\n if ( !$this->frontend_has_foobar() ) return;\r\n \r\n $this->admin_foobar_css_enqueue();\r\n $this->admin_foobar_js_enqueue();\r\n }", "public function addCss () {\n }", "function add_styles_scripts() {\n require('includes/front/enqueue.php'); \n }", "function customPageHeader(){\n?>\n<!-- Add any CSS or JS files here -->\n <link rel=\"stylesheet\" href=\"./css/styles.css\" />\n<?php }", "function customPageHeader(){\n?>\n<!-- Add any CSS or JS files here -->\n <link rel=\"stylesheet\" href=\"./css/styles.css\" />\n<?php }", "function themeprefix_fontawesome_styles() {\n\twp_register_style( 'fontawesome' , 'https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css', '' , '4.4.0', 'all' );\n\twp_enqueue_style( 'fontawesome' );\n}", "public static function admin_head_widgets() {\n\t\t?>\n\t\t<style type=\"text/css\">\n\t\t.widget .widget-inside .blazersix-widget-image-form .blazersix-media-control { padding: 20px 0; text-align: center; border: 1px dashed #aaa;}\n\t\t.widget .widget-inside .blazersix-widget-image-form .blazersix-media-control.has-image { padding: 10px; text-align: left; border: 1px dashed #aaa;}\n\t\t.widget .widget-inside .blazersix-widget-image-form .blazersix-media-control img { display: block; margin-bottom: 10px; max-width: 100%; height: auto;}\n\t\t</style>\n\t\t<?php\n\t}", "function overlap_load_admin_styles(){ \r\n \r\n //Deregister font icons from Visual Composer\r\n wp_deregister_style('font-awesome');\r\n wp_deregister_style('vc_openiconic');\r\n wp_deregister_style('vc_typicons');\r\n wp_deregister_style('vc_entypo');\r\n wp_deregister_style('vc_linecons');\r\n\r\n // Register font icons\r\n wp_register_style('theme-icons', get_template_directory_uri() .'/css/icons.css', null, null);\r\n wp_enqueue_style('theme-icons');\r\n do_action( 'overlap_enqueue_icon_font' );\r\n\r\n}", "function arends_scripts() {\n wp_enqueue_style( 'uikit_css', 'https://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-rc.17/css/uikit.min.css' );\n wp_enqueue_style( 'custom_css', get_template_directory_uri() . '/css/custom.css' );\n wp_enqueue_script( 'uikit_js', 'https://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-rc.17/js/uikit.min.js', array( 'jquery' ), true );\n wp_enqueue_script( 'uikit_icons_js', 'https://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-rc.17/js/uikit-icons.min.js' );\n wp_enqueue_script( 'uikit_lightbox_js', 'https://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-rc.17/js/components/lightbox.min.js' );\n wp_enqueue_script( 'uikit_slider_js', 'https://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-rc.17/js/components/slider.min.js' );\n}", "function conditional_widgets_css_admin() {\n\t\n\t// CSS and Javascript for HTML HEAD\n\t?>\n\t<!-- Conditional Widgets Admin CSS -->\n\t<link rel=\"stylesheet\" href=\"<?php echo plugins_url('css/conditional-widgets-admin.css',__FILE__)?>\" type=\"text/css\" />\n\n <?php \n}", "public function insertAdminCss() {\r\n wp_enqueue_style('thickbox');\r\n wp_register_style('ipenelo-calendar', $this->_pluginUrl . '/css/styles.css', array());\r\n wp_enqueue_style('ipenelo-calendar');\r\n return;\r\n }", "function client_side_print_compose_head() {\n $this->head_print_js_css();\n // wp_print_scripts( array( 'sack' )); // Define custom A J A X respond at Client side\n }", "function wpdocs_theme_name_scripts() {\n\t$customJsPath = bpc_cc_plugin_url. '/public/js/custom-coding.js';\n\t$customStylePath = bpc_cc_plugin_url . '/public/css/custom-coding.css'; \n wp_enqueue_style( 'custom-coding-style', $customStylePath );\n wp_enqueue_script( 'custom-coding-js', $customJsPath , array(), '1.0.0', true );\n}", "function add_wp_head() {\n return; /* not use theme */\n /*\n $theme = 'vrin_01';\n $theme = 'vrnn_01';\n $theme = 'vrnq_01';\n $theme = 'vlin_01';\n $theme = 'vliq_01';\n $theme = 'vlnq_01';\n $theme = 'vlnn_01';\n $theme = 'hlnq_01';\n $theme = 'vriq_01';\n $basedir = WP_PLUGIN_URL . '/fixed-menu/themes';\n $themedir = $basedir . '/' . $theme;\n $js = $themedir . '/fm.js';\n $css = $themedir . '/fm.css';\n \n echo '<script type=\"text/javascript\" src=\"' . $js . '\"></script>' . \"\\n\";\n echo '<link rel=\"stylesheet\" href=\"' . $css . '\" type=\"text/css\" />'.\"\\n\";\n */\n}", "function plugin_header() {\n\t\t?>\n\t <style>\n\t\t\t.icon32-posts-<?php echo 'my_contest'; ?> { background:transparent url('<?php echo $this->pluginUrl . \"/inc/images/contest-icon32.png\";?>') no-repeat !important; }\n \t\t</style>\n\t\t<?php\n\t}", "function control_panel__add_to_head()\n\t{\n\t\tif (URL::getCurrent() == '/publish') {\n\t\t\treturn $this->css->link('spotify.css');\n\t\t}\n\t}", "function add_stylesheet_to_head()\n{\n echo \"<!-- CUSTOM JS Parlay-->\";\n echo \"<link href='\" . get_template_directory_uri() . \"/calculator/parley/calculator.css?v=4.4' rel='stylesheet' type='text/css'>\";\n echo \"<script defer src='\" . get_template_directory_uri() . \"/calculator/parley/calculcator.js?v=4.4'></script>\";\n}", "function enqueue_assets()\n{\n wp_enqueue_style('dashicons');\n\n wp_enqueue_script(\n 'collapsible-content-plugin-script',\n COLLAPSIBLE_CONTENT_URL . 'assets/js/jquery.plugin.js',\n array('jquery'),\n '1.0.1',\n true\n );\n \n $script_parameters = array(\n 'showIcon' => 'dashicons dashicons-arrow-down-alt2',\n 'hideIcon' => 'dashicons dashicons-arrow-up-alt2',\n );\n \n wp_localize_script('collapsible-content-plugin-script', 'scriptParameters', $script_parameters);\n}" ]
[ "0.7194629", "0.68886346", "0.68027765", "0.6758039", "0.67354566", "0.6732843", "0.6705558", "0.6703883", "0.6686077", "0.66773194", "0.6665173", "0.66289943", "0.6627519", "0.66099006", "0.66034144", "0.66021097", "0.66002387", "0.65892124", "0.6583109", "0.65668803", "0.6560691", "0.65484", "0.6542088", "0.65360755", "0.6520679", "0.6518157", "0.6506958", "0.6486586", "0.6465707", "0.64570445", "0.64454293", "0.6437283", "0.6430161", "0.64143455", "0.6409641", "0.6402035", "0.63953364", "0.63812894", "0.63765585", "0.6369523", "0.636889", "0.6337887", "0.63287306", "0.63287306", "0.63117075", "0.62839425", "0.62782264", "0.62776184", "0.62769294", "0.62661004", "0.6261867", "0.625359", "0.6251833", "0.6251765", "0.62455124", "0.6240579", "0.6231684", "0.62276685", "0.62224096", "0.62224096", "0.62205064", "0.6219582", "0.6215231", "0.6210991", "0.62023854", "0.61960644", "0.6185009", "0.61849135", "0.6184725", "0.61824983", "0.61820745", "0.61789256", "0.6176822", "0.6175453", "0.6173818", "0.6170377", "0.61681354", "0.61571306", "0.6148126", "0.61419255", "0.6140239", "0.6129396", "0.6127522", "0.6115767", "0.6114159", "0.6111243", "0.6111243", "0.6111219", "0.61106545", "0.6107943", "0.6100459", "0.6096048", "0.6084373", "0.6083058", "0.60818535", "0.6081092", "0.6074156", "0.6071569", "0.6070296", "0.6068126" ]
0.8063795
0
Render an i tag with Fontawesome class. Set data/spin as true to make icon spin. Set data/size to one of lg, 2x, 3x, 4x or 5x to make icon larger. codeyml type: widget data: plugin: 'davegandy/fontawesome450' method: 'render' data: icon: 'plug' code
Отобразить тег i с классом Fontawesome. Установите data/spin в true, чтобы сделать иконку вращающейся. Установите data/size в одно из значений lg, 2x, 3x, 4x или 5x, чтобы увеличить размер иконки. codeyml тип: widget данные: плагин: 'davegandy/fontawesome450' метод: 'render' данные: иконка: 'plug' code
public static function widget_render($data){ $default = array( 'icon' => 'windows', 'size' => null, 'spin' => false, ); $default = array_merge($default, $data['data']); $class = 'fa fa-'.wfArray::get($default, 'icon'); if(wfArray::get($default, 'size')){ $class .= ' fa-'.wfArray::get($default, 'size'); } if(wfArray::get($default, 'spin')){ $class .= ' fa-spin'; } $element = wfDocument::createHtmlElement('i', null, array('class' => $class)); wfDocument::renderElement(array($element)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function font_awesome($icon){\n\treturn \"<span class='fa fa-fw $icon'></span>\";\n}", "function i($code)\n{\n $icon = '<i class=\"fa fa-' . $code . ' \" ></i>';\n return $icon;\n}", "public function renderIcon($attrs);", "function MyMod_Interface_Icon($icon,$options=array())\n {\n $options[ \"CLASS\" ]=$icon;\n\n return $this->HtmlTags(\"I\",\"\",$options);\n }", "public function render()\n {\n return function (array $data) {\n $iconset = config('laravolt.ui.iconset');\n\n return svg(\"$iconset-{$this->name}\", null, $data['attributes']->merge(['class' => 'x-icon'])->getAttributes())\n ->width($this->size.'px')\n ->toHtml();\n };\n }", "public function icon ($icon) {\n return '<i class=\"fa fa-'.$icon.'\"></i>' ; \n }", "public function icon()\n\t{\n\t\t$input = [\n\t\t\t[icon('plane'), \"icon('plane');\", ],\n\t\t\t[icon('bolt'), \"icon('bolt');\", ],\n\t\t\t[icon('bolt', '#FF00FF'), \"icon('bolt', '#FF00FF');\", ],\n\t\t\t[icon('info', 'info'), \"icon('info', 'info');\", ],\n\t\t\t[icon(true), \"icon(true);\", ],\n\t\t\t[icon(false), \"icon(false);\", ],\n\t\t];\n\t\t$data = array_reduce($input, function ($output, $arr)\n\t\t{\n\t\t\t$output[] = (object) ['code' => $arr[1], 'icon' => $arr[0]];\n\t\t\treturn $output;\n\t\t}, []);\n\t\treturn view('sketchpad::help/helpers/icon', compact('data'));\n\t}", "function dfFontAwesome($atts) {\n\textract(shortcode_atts(array(\n\t\t'type' => '',\n\t\t'size' => '',\n\t\t'class' => '',\n\n\t), $atts));\n\n\t$classes = ($type) ? $type. ' ' : 'fa-star';\n\t$classes .= ($size) ? $size.' ' : '';\n\t$classes .= ($class) ? ' '.$class : '';\n\n\t$theAwesomeFont = '<i class=\"fa '.esc_html($classes).'\"></i>';\n\n\treturn $theAwesomeFont;\n}", "function bs_icon($atts, $content = null) {\n $atts = array_change_key_case((array)$atts, CASE_LOWER);\n $atts = shortcode_atts(array(\n \"prefix\" => false,\n \"name\" => false,\n \"class\" => false,\n \"data\" => false\n ) , $atts);\n\n $class = array();\n $class[] = ($atts['prefix']) ? $atts['prefix'] : 'fas';\n $class[] = ($atts['name']) ? 'fa-' . $atts['name'] : '';\n\n $data_props = $this->parse_data_attributes($atts['data']);\n\n return sprintf('<i%s%s>%s</i>', $this->class_output($class, $atts[\"class\"]) , $data_props, do_shortcode($content));\n }", "function bttk_get_icon_list(){\r\n require BTTK_BASE_PATH . '/includes/assets/fontawesome.php';\r\n echo '<div class=\"bttk-font-awesome-list\"><ul class=\"bttk-font-group\">';\r\n foreach( $fontawesome as $font ){\r\n echo '<li><i class=\"' . esc_attr( $font ) . '\"></i></li>';\r\n }\r\n echo '</ul></div>';\r\n \r\n }", "protected function output()\n {\n $attrs = '';\n $classes = $this->style . ' fa-' . $this->icon;\n $transforms = '';\n $mask = '';\n\n if (!empty($this->classes) && count($this->classes) > 0) {\n $classes .= ' ' . implode(' ', $this->classes);\n }\n\n if (!empty($this->attributes) && count($this->attributes) > 0) {\n foreach ($this->attributes as $attr => $val) {\n $attrs .= ' ' . $attr . '=\"' . $val . '\"';\n }\n }\n\n if (!empty($this->transforms) && count($this->transforms) > 0) {\n $transformList = array();\n foreach ($this->transforms as $transform) {\n $transformList[] = implode('-', $transform);\n }\n $transforms = ' data-fa-transform=\"' . implode(' ', $transformList) . '\"';\n }\n\n if($this->mask) {\n $mask = ' data-fa-mask=\"' . $this->mask . '\"';\n }\n\n $htmlOutput = sprintf(self::ICON_HTML, $classes, $attrs, $transforms, $mask);\n\n return $this->resetAndOutput($htmlOutput);\n }", "public function icon($icon = null, $size = null)\n {\n\n // Set class\n $this->class('bi-' . $icon);\n\n // Check for size\n if (!is_null($size))\n {\n\n $this->astyle('font-size: ' . $size . 'px;');\n\n }\n\n // Return element\n return html::make()->i();\n\n }", "function font_awesome_shortcode( $atts ) {\n extract( shortcode_atts( array(\n 'icon' => 'fa-question-circle',\n 'color' => '#555555'\n ), $atts ) );\n return \"<span class='fa {$icon}' style='color:{$color}'></span>\";\n }", "public function setFontAwesomeIcon(): string\n {\n return '<i class=\"fa fa-picture-o\" aria-hidden=\"true\"></i>';\n }", "function sc_icon($attr) {\n\t$classes = $attr['classes'];\n\tob_start();\n?>\n\t<span class=\"<?php echo $classes; ?>\"></span>\n<?php\n\treturn ob_get_clean();\n}", "public static function icon($icon) {\n }", "function ut_icon_file( $atts, $content = null ) {\n\textract(shortcode_atts(array(\n\t\t\"color\" => '#'\n\t), $atts));\n return '<span class=\"uticon icon-file '.$color.'\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M15 2v5h5v15h-16v-20h11zm1-2h-14v24h20v-18l-6-6z\"/></svg>' . do_shortcode($content) . '</span> ';\n}", "public static function icon($icon, array $attrs = array(), $tab = false)\n\t{\n\t\tif (is_array($icon))\n\t\t{\n\t\t\t$attrs = $icon;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$attrs['icon'] = $icon;\n\t\t}\n\t\t\n\t\tstatic::$helper->add_template($attrs);\n\t\t\n\t\t$class = array('icon icon-'.$attrs['icon']);\n\t\t\n\t\tstatic::$helper->merge_classes($attrs, $class)->clean_attrs('icon', $attrs);\n\t\t\n\t\treturn html_tag('i', $attrs, $tab === true ? '&nbsp;' : '');\n\t}", "public function icon($icon);", "public function icon($icon, $options = [])\n {\n if ($icon === false) {\n $this->parts['{icon}'] = '';\n return $this;\n }\n\n $options = array_merge($this->iconOptions, $options);\n\n if ($icon !== null) {\n\n $uikit = ArrayHelper::remove($options, 'uikit', true);\n $tag = ArrayHelper::remove($options, 'tag', 'span');\n\n Html::addCssClass($options, 'uk-form-icon');\n if (ArrayHelper::remove($options, 'flip', false)) {\n Html::addCssClass($options, 'uk-form-icon-flip');\n }\n\n if ($uikit) {\n IconAsset::register($this->form->view);\n\n $options['uk-icon'] = $icon;\n $this->parts['{icon}'] = Html::tag($tag, '', $options);\n\n } else {\n $this->parts['{icon}'] = Html::tag($tag, $icon, $options);\n }\n }\n\n return $this;\n }", "function ufclas_emily_icon($atts, $content = NULL ) {\n\n\textract( shortcode_atts(\n\t\tarray(\n\t\t\t'name' => 'file',\n\t\t\t'icon_class' => ''\n\t\t), $atts )\n\t);\n\n\t$classes = array( 'img-icon glyphicon glyphicon-' . esc_attr( $name ) );\n\n\tif ( !empty( $icon_class ) ){\n\t\t$classes[] = esc_attr( $icon_class );\n\t}\n\n\treturn '<div class=\"img-icon-wrap\"><span class=\"' . join(' ', $classes) . '\"></span></div>';\n}", "public function admin_enqueue_fontawesomeBlock(){\n\t\t}", "public function get_icon() {\n return 'fa fa-plug';\n }", "public function icon();", "public function icon_attr() {\n\n\t\t$attr = array();\n\n\t\t$attr['class'] = 'fa ' . FusionBuilder::font_awesome_name_handler( self::$args['icon'] );\n\n\t\tif ( 'yes' !== self::$args['icon_divider'] ) {\n\t\t\t$attr['class'] .= ' button-icon-' . self::$args['icon_position'];\n\t\t}\n\n\t\tif ( self::$args['icon_color'] !== self::$args['accent_color'] ) {\n\t\t\t$attr['style'] = 'color:' . self::$args['icon_color'] . ';';\n\t\t}\n\n\t\treturn $attr;\n\n\t}", "public static function icon()\n {\n return '<i class=\"fas fa-tag sidebar-icon\"></i>';\n }", "function svgicon( $icon, $render = true ) {\n\t$html = '<svg class=\"svg-icon\" role=\"presentation\">';\n\t$html .= '<use xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:href=\"/assets/dist/img/icons.svg#' . $icon . '\"></use>';\n\t$html .= '</svg>';\n\n\tif( $render ) {\n\t\techo $html;\n\n\t} else {\n\t\treturn $html;\n\t}\n}", "function ut_icon_download( $atts, $content = null ) {\n\textract(shortcode_atts(array(\n\t\t\"color\" => '#'\n\t), $atts));\n return '<span class=\"uticon icon-download '.$color.'\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M15 10h4l-7 8-7-8h4v-10h6v10zm3.213-8.246l-1.213 1.599c2.984 1.732 5 4.955 5 8.647 0 5.514-4.486 10-10 10s-10-4.486-10-10c0-3.692 2.016-6.915 5-8.647l-1.213-1.599c-3.465 2.103-5.787 5.897-5.787 10.246 0 6.627 5.373 12 12 12s12-5.373 12-12c0-4.349-2.322-8.143-5.787-10.246z\"/></svg>' . do_shortcode($content) . '</span> ';\n}", "function cs_shortcode_pb_icon($atts, $content = \"\") {\n if (!isset($atts['border'])){ $atts['border'] = '';}\n if (!isset($atts['color'])){ $atts['color'] = '';}\n if (!isset($atts['bgcolor'])){ $atts['bgcolor'] = '';}\n if (!isset($atts['type'])){ $atts['type'] = '';}\n if (!isset($atts['class'])){ $atts['class'] = '';}\n\t$icon_border = \"\";\n if ( $atts[\"border\"] == \"yes\" ){ $icon_border = \"icon-border\";}\n\t$html = '<i class=\"'.$atts[\"class\"].' '.$atts[\"type\"].' '.$atts[\"size\"].' '.$icon_border.'\" style=\"color:'.$atts[\"color\"].'; background-color:'.$atts[\"bgcolor\"].'\"></i>';\n\treturn $html;\n}", "public function get_icon() {\n\t\treturn 'fa fa-plug';\n\t}", "public static function getImageIconeTagForType($type)\n {\n $iconTag = '';\n switch (strtolower($type)) {\n case 'folder':\n $iconTag = '<i class=\"fa fa-2x fa-folder\" aria-hidden=\"true\"></i>';\n break;\n case 'previous_folder':\n $iconTag = '<i class=\"fa fa-2x fa-folder\" aria-hidden=\"true\"></i>';\n break;\n case 'pdf':\n $iconTag = '<i class=\"fa fa-2x fa-file-pdf-o\" aria-hidden=\"true\"></i>';\n break;\n case 'xls':\n case 'xlsx':\n case 'ods':\n $iconTag = '<i class=\"fa fa-2x fa-file-excel-o\" aria-hidden=\"true\"></i>';\n break;\n case 'doc':\n case 'docx':\n case 'odt':\n $iconTag = '<i class=\"fa fa-2x fa-file-word-o\" aria-hidden=\"true\"></i>';\n break;\n case 'ppt':\n case 'pptx':\n case 'odp':\n $iconTag = '<i class=\"fa fa-2x fa-file-powerpoint-o\" aria-hidden=\"true\"></i>';\n break;\n case 'avi':\n case 'mpeg':\n case 'mp4':\n case 'mov':\n case 'flv':\n case 'youtube':\n case 'vimeo':\n case 'dailymotion':\n $iconTag = '<i class=\"fa fa-2x fa-file-video-o\" aria-hidden=\"true\"></i>';\n break;\n case 'jpg':\n case 'jpeg':\n case 'svg':\n case 'png':\n case 'bmp':\n case 'gif':\n case 'eps':\n case 'tiff':\n $iconTag = '<i class=\"fa fa-2x fa-file-image-o\" aria-hidden=\"true\"></i>';\n break;\n case 'mp3':\n case 'oga':\n case 'ogg':\n case 'midi':\n $iconTag = '<i class=\"fa fa-2x fa-file-audio-o\" aria-hidden=\"true\"></i>';\n break;\n default:\n $iconTag = '<i class=\"fa fa-2x fa-file-text-o\" aria-hidden=\"true\"></i>';\n break;\n }\n return $iconTag;\n }", "function icon($icon, $title = null, $size = null)\n{\n $icon = strtolower($icon);\n\n if (is_string($title) && trim($title) != '') $title = ' title=\"'.$title.'\"';\n else $title = '';\n\n if (is_null($size)) $size = '14';\n\n $vgc_icons = Config::get('vgc.icons');\n $glyphicons = Config::get('vgc.glyphicons');\n\n if (array_key_exists($icon, $vgc_icons)) {\n $html = '<img src=\"'.URL::to($vgc_icons[$icon]).'\" alt=\"$icon icon\" width=\"'.$size.'px\" height=\"'.$size.'px\" '.$title.'>';\n } elseif (in_array($icon, $glyphicons)) {\n $html = '<i class=\"icon-'.$icon.'\" '.$title.'></i>';\n } else $html = '';\n\n return $html;\n}", "public function sc_atc_icons() {\n\n\t\t$options \t= get_option( $this->group . '-options' );\n\t\t$option \t= isset( $options['sc-atc-icons']) ? $options['sc-atc-icons'] : 1;\n\t\t$id \t\t= $this->group.'-options[sc-atc-icons]';\n\t\t?>\n\t\t<input type=\"hidden\" name=\"<?php echo $id; ?>\" value=\"false\">\n\t\t<input type=\"checkbox\" id=\"<?php echo $id; ?>\" name=\"<?php echo $id; ?>\" value=\"1\" <?php checked($option, 1); ?> />\n\t\t<label for=\"<?php echo $id; ?>\">Show preloader/check icon while adding to cart.</label> <?php\n\t}", "public function run()\n {\n // Child icon\n $icons = [\n [\n 'description' => 'Child',\n 'unicode' => 'f1ae',\n 'html' => 'fas fa-child',\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\"),\t \n ],\n // Home icon\n [\n 'description' => 'Home',\n 'unicode' => 'f015',\n 'html' => 'fas fa-home',\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\"),\t \n ],\n // Building icon\n [\n 'description' => 'Building',\n 'unicode' => 'f1ad',\n 'html' => 'fas fa-building',\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\"),\t \n ],\n // Store icon\n [\n 'description' => 'Child',\n 'unicode' => 'f54e',\n 'html' => 'fas fa-store',\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\"),\t \n ],\n // University icon\n [\n 'description' => 'University',\n 'unicode' => 'f19c',\n 'html' => 'fas fa-university',\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\"),\t \n ]\n ];\n \n Icon::insert($icons);\n }", "public function iconAction()\n {\n return $this->render('fonctionalite/icon.html.twig');\n }", "public function stdWrap_editIconsDataProvider() {}", "public static function icon($icon, $htmlOptions = array(), $prefix = self::ICON_FA_PREFIX) {\n if (is_string($htmlOptions))\n $htmlOptions = array('class' => $htmlOptions);\n $content = self::popArrayValue('content', $htmlOptions, '');\n self::addCssClass(array(static::ICON_CLASS, $prefix . $icon), $htmlOptions);\n return CHtml::tag('i', $htmlOptions, $content);\n }", "protected function getIcon()\n\t{\n\t\treturn Html::el('span class=\"input-group-addon\">')\n\t\t\t->add(Html::el('i class=\"fa fa-calendar\"'));\n\t}", "function widget_dev_output_social_icons_widget_content( $args, $instance ) {\r\n\r\n\t// get the array of social profiles.\r\n\t$social_profiles = widget_dev_social_profiles();\r\n\r\n\t// if we have any social profiles.\r\n\tif ( ! empty( $social_profiles ) ) {\r\n\r\n\t\t// start the output markup.\r\n\t\t?>\r\n\t\t<ul class=\"hd-espw-social-icons\">\r\n\t\t<?php\r\n\r\n\t\t// loop through each profile.\r\n\t\tforeach ( $social_profiles as $social_profile ) {\r\n\r\n\t\t\t// get the value for this social profile - the profile url.\r\n\t\t\t$profile_url = get_theme_mod( $social_profile['id'] );\r\n\r\n\t\t\t// if we have a no value - url.\r\n\t\t\tif ( empty( $profile_url ) ) {\r\n\t\t\t\tcontinue; // continue to the next social profile.\r\n\t\t\t}\r\n\r\n\t\t\t// if we don't have a specified class.\r\n\t\t\tif ( empty ( $social_profile['class'] ) ) {\r\n\r\n\t\t\t\t// use the label for form a class.\r\n\t\t\t\t$social_profile['class'] = strtolower( sanitize_title_with_dashes( $social_profile['label'] ) );\r\n\r\n\t\t\t}\r\n\r\n\t\t\t// build the markup for this social profile.\r\n\t\t\t?>\r\n\r\n\t\t\t<li class=\"hd-espw-social-icons__item hd-espw-social-icons__item--<?php echo esc_attr( $social_profile['class'] ); ?>\">\r\n\t\t\t\t<a target=\"_blank\" class=\"hd-espw-social-icons__item-link\" href=\"<?php echo esc_url( $profile_url ); ?>\">\r\n\t\t\t\t\t<i class=\"icon-<?php echo esc_attr( $social_profile['class'] ); ?>\"></i> <span><?php echo esc_html( $social_profile['label'] ); ?></span>\r\n\t\t\t\t</a>\r\n\t\t\t</li>\r\n\r\n\t\t\t<?php\r\n\r\n\t\t}\r\n\r\n\t\t// end the output markup.\r\n\t\t?>\r\n\t\t</ul>\r\n\t\t<?php\r\n\r\n\t}\r\n\r\n}", "protected function initIcons()\n {\n $notBs3 = !$this->isBs(3);\n $prefix = $this->getDefaultIconPrefix();\n foreach (static::$_icons as $icon => $setting) {\n if (!isset($this->$icon)) {\n $css = !$notBs3 ? $setting[0] : $setting[1];\n $this->$icon = Html::tag('i', '', ['class' => $prefix.$css]);\n }\n }\n }", "function icono_activo($estado){\n if($estado==0){ return '<i class=\"fas fa-toggle-off text-danger\" title=\"Inactivo\"></i>'; }\n else{return '<i class=\"fas fa-toggle-on text-info\" title=\"Activo\"></i>';}\n}", "function enqueue_load_fa() {\n wp_enqueue_style('font-awesome-free', '//cdnjs.cloudflare.com/ajax/libs/font-awesome/5.10.2/css/all.min.css'); \n\n wp_enqueue_script('font-awesome-free');\n}", "public function icon ($icon, $color = 'black') {\n return '<i class=\"icon-'.$icon.' icon-'.$color.'\"></i>' ; \n }", "public function __construct($options = array()) {\n\n $this->options = array(\n 'fontawesome' => array(\n 'family' => 'fontawesome',\n 'text' => __('Font Awesome', 'victheme_core'),\n 'version' => '4.2.0',\n 'asset' => 'font-awesome',\n 'iconset' => 'adjust,anchor,archive,area-chart,arrows,arrows-h,arrows-v,asterisk,at,automobile,ban,bank,bar-chart,bar-chart-o,barcode,bars,beer,bell,bell-o,bell-slash,bell-slash-o,bicycle,binoculars,birthday-cake,bolt,bomb,book,bookmark,bookmark-o,briefcase,bug,building,building-o,bullhorn,bullseye,bus,cab,calculator,calendar,calendar-o,camera,camera-retro,car,caret-square-o-down,caret-square-o-left,caret-square-o-right,caret-square-o-up,cc,certificate,check,check-circle,check-circle-o,check-square,check-square-o,child,circle,circle-o,circle-o-notch,circle-thin,clock-o,close,cloud,cloud-download,cloud-upload,code,code-fork,coffee,cog,cogs,comment,comment-o,comments,comments-o,compass,copyright,credit-card,crop,crosshairs,cube,cubes,cutlery,dashboard,database,desktop,dot-circle-o,download,edit,ellipsis-h,ellipsis-v,envelope,envelope-o,envelope-square,eraser,exchange,exclamation,exclamation-circle,exclamation-triangle,external-link,external-link-square,eye,eye-slash,eyedropper,fax,female,fighter-jet,file-archive-o,file-audio-o,file-code-o,file-excel-o,file-image-o,file-movie-o,file-pdf-o,file-photo-o,file-picture-o,file-powerpoint-o,file-sound-o,file-video-o,file-word-o,file-zip-o,film,filter,fire,fire-extinguisher,flag,flag-checkered,flag-o,flash,flask,folder,folder-o,folder-open,folder-open-o,frown-o,futbol-o,gamepad,gavel,gear,gears,gift,glass,globe,graduation-cap,group,hdd-o,headphones,heart,heart-o,history,home,image,inbox,info,info-circle,institution,key,keyboard-o,language,laptop,leaf,legal,lemon-o,level-down,level-up,life-bouy,life-buoy,life-ring,life-saver,lightbulb-o,line-chart,location-arrow,lock,magic,magnet,mail-forward,mail-reply,mail-reply-all,male,map-marker,meh-o,microphone,microphone-slash,minus,minus-circle,minus-square,minus-square-o,mobile,mobile-phone,money,moon-o,mortar-board,music,navicon,newspaper-o,paint-brush,paper-plane,paper-plane-o,paw,pencil,pencil-square,pencil-square-o,phone,phone-square,photo,picture-o,pie-chart,plane,plug,plus,plus-circle,plus-square,plus-square-o,power-off,print,puzzle-piece,qrcode,question,question-circle,quote-left,quote-right,random,recycle,refresh,remove,reorder,reply,reply-all,retweet,road,rocket,rss,rss-square,search,search-minus,search-plus,send,send-o,share,share-alt,share-alt-square,share-square,share-square-o,shield,shopping-cart,sign-in,sign-out,signal,sitemap,sliders,smile-o,soccer-ball-o,sort,sort-alpha-asc,sort-alpha-desc,sort-amount-asc,sort-amount-desc,sort-asc,sort-desc,sort-down,sort-numeric-asc,sort-numeric-desc,sort-up,space-shuttle,spinner,spoon,square,square-o,star,star-half,star-half-empty,star-half-full,star-half-o,star-o,suitcase,sun-o,support,tablet,tachometer,tag,tags,tasks,taxi,terminal,thumb-tack,thumbs-down,thumbs-o-down,thumbs-o-up,thumbs-up,ticket,times,times-circle,times-circle-o,tint,toggle-down,toggle-left,toggle-off,toggle-on,toggle-right,toggle-up,trash,trash-o,tree,trophy,truck,tty,umbrella,university,unlock,unlock-alt,unsorted,upload,user,users,video-camera,volume-down,volume-off,volume-up,warning,wheelchair,wifi,wrench,file,file-o,file-text,file-text-o,cc-amex,cc-discover,cc-mastercard,cc-paypal,cc-stripe,cc-visa,google-wallet,paypal,bitcoin,btc,cny,dollar,eur,euro,gbp,ils,inr,jpy,krw,rmb,rouble,rub,ruble,rupee,shekel,sheqel,try,turkish-lira,usd,won,yen,align-center,align-justify,align-left,align-right,bold,chain,chain-broken,clipboard,columns,copy,cut,dedent,files-o,floppy-o,font,header,indent,italic,link,list,list-alt,list-ol,list-ul,outdent,paperclip,paragraph,paste,repeat,rotate-left,rotate-right,save,scissors,strikethrough,subscript,superscript,table,text-height,text-width,th,th-large,th-list,underline,undo,unlink,angle-double-down,angle-double-left,angle-double-right,angle-double-up,angle-down,angle-left,angle-right,angle-up,arrow-circle-down,arrow-circle-left,arrow-circle-o-down,arrow-circle-o-left,arrow-circle-o-right,arrow-circle-o-up,arrow-circle-right,arrow-circle-up,arrow-down,arrow-left,arrow-right,arrow-up,arrows-alt,caret-down,caret-left,caret-right,caret-up,chevron-circle-down,chevron-circle-left,chevron-circle-right,chevron-circle-up,chevron-down,chevron-left,chevron-right,chevron-up,hand-o-down,hand-o-left,hand-o-right,hand-o-up,long-arrow-down,long-arrow-left,long-arrow-right,long-arrow-up,backward,compress,eject,expand,fast-backward,fast-forward,forward,pause,play,play-circle,play-circle-o,step-backward,step-forward,stop,youtube-play,adn,android,angellist,apple,behance,behance-square,bitbucket,bitbucket-square,codepen,css3,delicious,deviantart,digg,dribbble,dropbox,drupal,empire,facebook,facebook-square,flickr,foursquare,ge,git,git-square,github,github-alt,github-square,gittip,google,google-plus,google-plus-square,hacker-news,html5,instagram,ioxhost,joomla,jsfiddle,lastfm,lastfm-square,linkedin,linkedin-square,linux,maxcdn,meanpath,openid,pagelines,pied-piper,pied-piper-alt,pinterest,pinterest-square,qq,ra,rebel,reddit,reddit-square,renren,skype,slack,slideshare,soundcloud,spotify,stack-exchange,stack-overflow,steam,steam-square,stumbleupon,stumbleupon-circle,tencent-weibo,trello,tumblr,tumblr-square,twitch,twitter,twitter-square,vimeo-square,vine,vk,wechat,weibo,weixin,windows,wordpress,xing,xing-square,yahoo,yelp,youtube,youtube-square,ambulance,h-square,hospital-o,medkit,stethoscope,user-md',\n 'base' => 'fa',\n 'prefix' => 'fa-',\n 'element' => 'i',\n ),\n 'glyphicon' => array(\n 'family' => 'glyphicon',\n 'text' => __('Bootstrap Glyphicon', 'victheme_core'),\n 'version' => '3.1.1',\n 'asset' => 'bootstrap-glyphicon',\n 'iconset' => 'asterisk,plus,euro,minus,cloud,envelope,pencil,glass,music,search,heart,star,star-empty,user,film,th-large,th,th-list,ok,remove,zoom-in,zoom-out,off,signal,cog,trash,home,file,time,road,download-alt,download,upload,inbox,play-circle,repeat,refresh,list-alt,lock,flag,headphones,volume-off,volume-down,volume-up,qrcode,barcode,tag,tags,book,bookmark,print,camera,font,bold,italic,text-height,text-width,align-left,align-center,align-right,align-justify,list,indent-left,indent-right,facetime-video,picture,map-marker,adjust,tint,edit,share,check,move,step-backward,fast-backward,backward,play,pause,stop,forward,fast-forward,eject,chevron-left,chevron-right,plus-sign,minus-sign,remove-sign,ok-sign,question-sign,info-sign,screenshot,remove-circle,ok-circle,ban-circle,arrow-left,arrow-right,arrow-up,arrow-down,share-alt,resize-full,resize-small,exclamation-sign,gift,leaf,fire,eye-open,eye-close,warning-sign,plane,calendar,random,comment,magnet,chevron-up,chevron-down,retweet,shopping-cart,folder-close,folder-open,resize-vertical,resize-horizontal,hdd,bullhorn,bell,certificate,thumbs-up,thumbs-down,hand-right,hand-left,hand-up,hand-down,circle-arrow-right,circle-arrow-left,circle-arrow-up,circle-arrow-down,globe,wrench,tasks,filter,briefcase,fullscreen,dashboard,paperclip,heart-empty,link,phone,pushpin,usd,gbp,sort,sort-by-alphabet,sort-by-alphabet-alt,sort-by-order,sort-by-order-alt,sort-by-attributes,sort-by-attributes-alt,unchecked,expand,collapse-down,collapse-up,log-in,flash,log-out,new-window,record,save,open,saved,import,export,send,floppy-disk,floppy-saved,floppy-remove,floppy-save,floppy-open,credit-card,transfer,cutlery,header,compressed,earphone,phone-alt,tower,stats,sd-video,hd-video,subtitles,sound-stereo,sound-dolby,sound-5-1,sound-6-1,sound-7-1,copyright-mark,registration-mark,cloud-download,cloud-upload,tree-conifer,tree-deciduous',\n 'base' => 'glyphicon',\n 'prefix' => 'glyphicon-',\n 'element' => 'span',\n ),\n 'eleganticon' => array(\n 'family' => 'eleganticon',\n 'text' => __('Elegant Icon', 'victheme_core'),\n 'version' => '',\n 'asset' => 'icon-eleganticon',\n 'iconset' => 'arrow_up,arrow_up,arrow_down,arrow_down,arrow_left,arrow_left,arrow_right,arrow_right,arrow_left-up,arrow_left-up,arrow_right-up,arrow_right-up,arrow_right-down,arrow_right-down,arrow_left-down,arrow_left-down,arrow-up-down,arrow-up-down,arrow_up-down_alt,arrow_up-down_alt,arrow_left-right_alt,arrow_left-right_alt,arrow_left-right,arrow_left-right,arrow_expand_alt2,arrow_expand_alt2,arrow_expand_alt,arrow_expand_alt,arrow_condense,arrow_condense,arrow_expand,arrow_expand,arrow_move,arrow_move,arrow_carrot-up,arrow_carrot-up,arrow_carrot-down,arrow_carrot-down,arrow_carrot-left,arrow_carrot-left,arrow_carrot-right,arrow_carrot-right,arrow_carrot-2up,arrow_carrot-2up,arrow_carrot-2down,arrow_carrot-2down,arrow_carrot-2left,arrow_carrot-2left,arrow_carrot-2right,arrow_carrot-2right,arrow_carrot-up_alt2,arrow_carrot-up_alt2,arrow_carrot-down_alt2,arrow_carrot-down_alt2,arrow_carrot-left_alt2,arrow_carrot-left_alt2,arrow_carrot-right_alt2,arrow_carrot-right_alt2,arrow_carrot-2up_alt2,arrow_carrot-2up_alt2,arrow_carrot-2down_alt2,arrow_carrot-2down_alt2,arrow_carrot-2left_alt2,arrow_carrot-2left_alt2,arrow_carrot-2right_alt2,arrow_carrot-2right_alt2,arrow_triangle-up,arrow_triangle-up,arrow_triangle-down,arrow_triangle-down,arrow_triangle-left,arrow_triangle-left,arrow_triangle-right,arrow_triangle-right,arrow_triangle-up_alt2,arrow_triangle-up_alt2,arrow_triangle-down_alt2,arrow_triangle-down_alt2,arrow_triangle-left_alt2,arrow_triangle-left_alt2,arrow_triangle-right_alt2,arrow_triangle-right_alt2,arrow_back,arrow_back,icon_minus-06,icon_minus-06,icon_plus,icon_plus,icon_close,icon_close,icon_check,icon_check,icon_minus_alt2,icon_minus_alt2,icon_plus_alt2,icon_plus_alt2,icon_close_alt2,icon_close_alt2,icon_check_alt2,icon_check_alt2,icon_zoom-out_alt,icon_zoom-out_alt,icon_zoom-in_alt,icon_zoom-in_alt,icon_search,icon_search,icon_box-empty,icon_box-empty,icon_box-selected,icon_box-selected,icon_minus-box,icon_minus-box,icon_plus-box,icon_plus-box,icon_box-checked,icon_box-checked,icon_circle-empty,icon_circle-empty,icon_circle-slelected,icon_circle-slelected,icon_stop_alt2,icon_stop_alt2,icon_stop,icon_stop,icon_pause_alt2,icon_pause_alt2,icon_pause,icon_pause,icon_menu,icon_menu,icon_menu-square_alt2,icon_menu-square_alt2,icon_menu-circle_alt2,icon_menu-circle_alt2,icon_ul,icon_ul,icon_ol,icon_ol,icon_adjust-horiz,icon_adjust-horiz,icon_adjust-vert,icon_adjust-vert,icon_document_alt,icon_document_alt,icon_documents_alt,icon_documents_alt,icon_pencil,icon_pencil,icon_pencil-edit_alt,icon_pencil-edit_alt,icon_pencil-edit,icon_pencil-edit,icon_folder-alt,icon_folder-alt,icon_folder-open_alt,icon_folder-open_alt,icon_folder-add_alt,icon_folder-add_alt,icon_info_alt,icon_info_alt,icon_error-oct_alt,icon_error-oct_alt,icon_error-circle_alt,icon_error-circle_alt,icon_error-triangle_alt,icon_error-triangle_alt,icon_question_alt2,icon_question_alt2,icon_question,icon_question,icon_comment_alt,icon_comment_alt,icon_chat_alt,icon_chat_alt,icon_vol-mute_alt,icon_vol-mute_alt,icon_volume-low_alt,icon_volume-low_alt,icon_volume-high_alt,icon_volume-high_alt,icon_quotations,icon_quotations,icon_quotations_alt2,icon_quotations_alt2,icon_clock_alt,icon_clock_alt,icon_lock_alt,icon_lock_alt,icon_lock-open_alt,icon_lock-open_alt,icon_key_alt,icon_key_alt,icon_cloud_alt,icon_cloud_alt,icon_cloud-upload_alt,icon_cloud-upload_alt,icon_cloud-download_alt,icon_cloud-download_alt,icon_image,icon_image,icon_images,icon_images,icon_lightbulb_alt,icon_lightbulb_alt,icon_gift_alt,icon_gift_alt,icon_house_alt,icon_house_alt,icon_genius,icon_genius,icon_mobile,icon_mobile,icon_tablet,icon_tablet,icon_laptop,icon_laptop,icon_desktop,icon_desktop,icon_camera_alt,icon_camera_alt,icon_mail_alt,icon_mail_alt,icon_cone_alt,icon_cone_alt,icon_ribbon_alt,icon_ribbon_alt,icon_bag_alt,icon_bag_alt,icon_creditcard,icon_creditcard,icon_cart_alt,icon_cart_alt,icon_paperclip,icon_paperclip,icon_tag_alt,icon_tag_alt,icon_tags_alt,icon_tags_alt,icon_trash_alt,icon_trash_alt,icon_cursor_alt,icon_cursor_alt,icon_mic_alt,icon_mic_alt,icon_compass_alt,icon_compass_alt,icon_pin_alt,icon_pin_alt,icon_pushpin_alt,icon_pushpin_alt,icon_map_alt,icon_map_alt,icon_drawer_alt,icon_drawer_alt,icon_toolbox_alt,icon_toolbox_alt,icon_book_alt,icon_book_alt,icon_calendar,icon_calendar,icon_film,icon_film,icon_table,icon_table,icon_contacts_alt,icon_contacts_alt,icon_headphones,icon_headphones,icon_lifesaver,icon_lifesaver,icon_piechart,icon_piechart,icon_refresh,icon_refresh,icon_link_alt,icon_link_alt,icon_link,icon_link,icon_loading,icon_loading,icon_blocked,icon_blocked,icon_archive_alt,icon_archive_alt,icon_heart_alt,icon_heart_alt,icon_printer,icon_printer,icon_calulator,icon_calulator,icon_building,icon_building,icon_floppy,icon_floppy,icon_drive,icon_drive,icon_search-2,icon_search-2,icon_id,icon_id,icon_id-2,icon_id-2,icon_puzzle,icon_puzzle,icon_like,icon_like,icon_dislike,icon_dislike,icon_mug,icon_mug,icon_currency,icon_currency,icon_wallet,icon_wallet,icon_pens,icon_pens,icon_easel,icon_easel,icon_flowchart,icon_flowchart,icon_datareport,icon_datareport,icon_briefcase,icon_briefcase,icon_shield,icon_shield,icon_percent,icon_percent,icon_globe,icon_globe,icon_globe-2,icon_globe-2,icon_target,icon_target,icon_hourglass,icon_hourglass,icon_balance,icon_balance,icon_star_alt,icon_star_alt,icon_star-half_alt,icon_star-half_alt,icon_star,icon_star,icon_star-half,icon_star-half,icon_tools,icon_tools,icon_tool,icon_tool,icon_cog,icon_cog,icon_cogs,icon_cogs,arrow_up_alt,arrow_up_alt,arrow_down_alt,arrow_down_alt,arrow_left_alt,arrow_left_alt,arrow_right_alt,arrow_right_alt,arrow_left-up_alt,arrow_left-up_alt,arrow_right-up_alt,arrow_right-up_alt,arrow_right-down_alt,arrow_right-down_alt,arrow_left-down_alt,arrow_left-down_alt,arrow_condense_alt,arrow_condense_alt,arrow_expand_alt3,arrow_expand_alt3,arrow_carrot_up_alt,arrow_carrot_up_alt,arrow_carrot-down_alt,arrow_carrot-down_alt,arrow_carrot-left_alt,arrow_carrot-left_alt,arrow_carrot-right_alt,arrow_carrot-right_alt,arrow_carrot-2up_alt,arrow_carrot-2up_alt,arrow_carrot-2dwnn_alt,arrow_carrot-2dwnn_alt,arrow_carrot-2left_alt,arrow_carrot-2left_alt,arrow_carrot-2right_alt,arrow_carrot-2right_alt,arrow_triangle-up_alt,arrow_triangle-up_alt,arrow_triangle-down_alt,arrow_triangle-down_alt,arrow_triangle-left_alt,arrow_triangle-left_alt,arrow_triangle-right_alt,arrow_triangle-right_alt,icon_minus_alt,icon_minus_alt,icon_plus_alt,icon_plus_alt,icon_close_alt,icon_close_alt,icon_check_alt,icon_check_alt,icon_zoom-out,icon_zoom-out,icon_zoom-in,icon_zoom-in,icon_stop_alt,icon_stop_alt,icon_menu-square_alt,icon_menu-square_alt,icon_menu-circle_alt,icon_menu-circle_alt,icon_document,icon_document,icon_documents,icon_documents,icon_pencil_alt,icon_pencil_alt,icon_folder,icon_folder,icon_folder-open,icon_folder-open,icon_folder-add,icon_folder-add,icon_folder_upload,icon_folder_upload,icon_folder_download,icon_folder_download,icon_info,icon_info,icon_error-circle,icon_error-circle,icon_error-oct,icon_error-oct,icon_error-triangle,icon_error-triangle,icon_question_alt,icon_question_alt,icon_comment,icon_comment,icon_chat,icon_chat,icon_vol-mute,icon_vol-mute,icon_volume-low,icon_volume-low,icon_volume-high,icon_volume-high,icon_quotations_alt,icon_quotations_alt,icon_clock,icon_clock,icon_lock,icon_lock,icon_lock-open,icon_lock-open,icon_key,icon_key,icon_cloud,icon_cloud,icon_cloud-upload,icon_cloud-upload,icon_cloud-download,icon_cloud-download,icon_lightbulb,icon_lightbulb,icon_gift,icon_gift,icon_house,icon_house,icon_camera,icon_camera,icon_mail,icon_mail,icon_cone,icon_cone,icon_ribbon,icon_ribbon,icon_bag,icon_bag,icon_cart,icon_cart,icon_tag,icon_tag,icon_tags,icon_tags,icon_trash,icon_trash,icon_cursor,icon_cursor,icon_mic,icon_mic,icon_compass,icon_compass,icon_pin,icon_pin,icon_pushpin,icon_pushpin,icon_map,icon_map,icon_drawer,icon_drawer,icon_toolbox,icon_toolbox,icon_book,icon_book,icon_contacts,icon_contacts,icon_archive,icon_archive,icon_heart,icon_heart,icon_profile,icon_profile,icon_group,icon_group,icon_grid-2x2,icon_grid-3x3,icon_music,icon_music,icon_pause_alt,icon_pause_alt,icon_phone,icon_phone,icon_upload,icon_upload,icon_download,icon_download,icon_rook,icon_rook,icon_printer-alt,icon_printer-alt,icon_calculator_alt,icon_calculator_alt,icon_building_alt,icon_building_alt,icon_floppy_alt,icon_floppy_alt,icon_drive_alt,icon_drive_alt,icon_search_alt,icon_search_alt,icon_id_alt,icon_id_alt,icon_id-2_alt,icon_id-2_alt,icon_puzzle_alt,icon_puzzle_alt,icon_like_alt,icon_like_alt,icon_dislike_alt,icon_dislike_alt,icon_mug_alt,icon_mug_alt,icon_currency_alt,icon_currency_alt,icon_wallet_alt,icon_wallet_alt,icon_pens_alt,icon_pens_alt,icon_easel_alt,icon_easel_alt,icon_flowchart_alt,icon_flowchart_alt,icon_datareport_alt,icon_datareport_alt,icon_briefcase_alt,icon_briefcase_alt,icon_shield_alt,icon_shield_alt,icon_percent_alt,icon_percent_alt,icon_globe_alt,icon_globe_alt,icon_clipboard,icon_clipboard,social_facebook,social_facebook,social_twitter,social_twitter,social_pinterest,social_pinterest,social_googleplus,social_googleplus,social_tumblr,social_tumblr,social_tumbleupon,social_tumbleupon,social_wordpress,social_wordpress,social_instagram,social_instagram,social_dribbble,social_dribbble,social_vimeo,social_vimeo,social_linkedin,social_linkedin,social_rss,social_rss,social_deviantart,social_deviantart,social_share,social_share,social_myspace,social_myspace,social_skype,social_skype,social_youtube,social_youtube,social_picassa,social_picassa,social_googledrive,social_googledrive,social_flickr,social_flickr,social_blogger,social_blogger,social_spotify,social_spotify,social_delicious,social_delicious,social_facebook_circle,social_facebook_circle,social_twitter_circle,social_twitter_circle,social_pinterest_circle,social_pinterest_circle,social_googleplus_circle,social_googleplus_circle,social_tumblr_circle,social_tumblr_circle,social_stumbleupon_circle,social_stumbleupon_circle,social_wordpress_circle,social_wordpress_circle,social_instagram_circle,social_instagram_circle,social_dribbble_circle,social_dribbble_circle,social_vimeo_circle,social_vimeo_circle,social_linkedin_circle,social_linkedin_circle,social_rss_circle,social_rss_circle,social_deviantart_circle,social_deviantart_circle,social_share_circle,social_share_circle,social_myspace_circle,social_myspace_circle,social_skype_circle,social_skype_circle,social_youtube_circle,social_youtube_circle,social_picassa_circle,social_picassa_circle,social_googledrive_alt2,social_googledrive_alt2,social_flickr_circle,social_flickr_circle,social_blogger_circle,social_blogger_circle,social_spotify_circle,social_spotify_circle,social_delicious_circle,social_delicious_circle,social_facebook_square,social_facebook_square,social_twitter_square,social_twitter_square,social_pinterest_square,social_pinterest_square,social_googleplus_square,social_googleplus_square,social_tumblr_square,social_tumblr_square,social_stumbleupon_square,social_stumbleupon_square,social_wordpress_square,social_wordpress_square,social_instagram_square,social_instagram_square,social_dribbble_square,social_dribbble_square,social_vimeo_square,social_vimeo_square,social_linkedin_square,social_linkedin_square,social_rss_square,social_rss_square,social_deviantart_square,social_deviantart_square,social_share_square,social_share_square,social_myspace_square,social_myspace_square,social_skype_square,social_skype_square,social_youtube_square,social_youtube_square,social_picassa_square,social_picassa_square,social_googledrive_square,social_googledrive_square,social_flickr_square,social_flickr_square,social_blogger_square,social_blogger_square,social_spotify_square,social_spotify_square,social_delicious_square,social_delicious_square',\n 'base' => 'eleicon',\n 'prefix' => 'eleicon-',\n 'element' => 'i'\n ),\n 'foundation' => array(\n 'family' => 'foundation',\n 'text' => __('Foundation', 'victheme_core'),\n 'version' => '3.0',\n 'asset' => 'icon-foundation',\n 'iconset' => 'address-book,alert,align-center,align-justify,align-left,align-right,anchor,annotate,archive,arrow-down,arrow-left,arrow-right,arrow-up,arrows-compress,arrows-expand,arrows-in,arrows-out,asl,asterisk,at-sign,background-color,battery-empty,battery-full,battery-half,bitcoin-circle,bitcoin,blind,bluetooth,bold,book-bookmark,book,bookmark,braille,burst-new,burst-sale,burst,calendar,camera,check,checkbox,clipboard-notes,clipboard-pencil,clipboard,clock,closed-caption,cloud,comment-minus,comment-quotes,comment-video,comment,comments,compass,contrast,credit-card,crop,crown,css3,database,die-five,die-four,die-one,die-six,die-three,die-two,dislike,dollar-bill,dollar,download,eject,elevator,euro,eye,fast-forward,female-symbol,female,filter,first-aid,flag,folder-add,folder-lock,folder,foot,foundation,graph-bar,graph-horizontal,graph-pie,graph-trend,guide-dog,hearing-aid,heart,home,html5,indent-less,indent-more,info,italic,key,laptop,layout,lightbulb,like,link,list-bullet,list-number,list-thumbnails,list,lock,loop,magnifying-glass,mail,male-female,male-symbol,male,map,marker,megaphone,microphone,minus-circle,minus,mobile-signal,mobile,monitor,mountains,music,next,no-dogs,no-smoking,page-add,page-copy,page-csv,page-delete,page-doc,page-edit,page-export-csv,page-export-doc,page-export-pdf,page-export,page-filled,page-multiple,page-pdf,page-remove,page-search,page,paint-bucket,paperclip,pause,paw,paypal,pencil,photo,play-circle,play-video,play,plus,pound,power,previous,price-tag,pricetag-multiple,print,prohibited,projection-screen,puzzle,quote,record,refresh,results-demographics,results,rewind-ten,rewind,rss,safety-cone,save,share,sheriff-badge,shield,shopping-bag,shopping-cart,shuffle,skull,social-500px,social-adobe,social-amazon,social-android,social-apple,social-behance,social-bing,social-blogger,social-delicious,social-designer-news,social-deviant-art,social-digg,social-dribbble,social-drive,social-dropbox,social-evernote,social-facebook,social-flickr,social-forrst,social-foursquare,social-game-center,social-github,social-google-plus,social-hacker-news,social-hi5,social-instagram,social-joomla,social-lastfm,social-linkedin,social-medium,social-myspace,social-orkut,social-path,social-picasa,social-pinterest,social-rdio,social-reddit,social-skillshare,social-skype,social-smashing-mag,social-snapchat,social-spotify,social-squidoo,social-stack-overflow,social-steam,social-stumbleupon,social-treehouse,social-tumblr,social-twitter,social-vimeo,social-windows,social-xbox,social-yahoo,social-yelp,social-youtube,social-zerply,social-zurb,sound,star,stop,strikethrough,subscript,superscript,tablet-landscape,tablet-portrait,target-two,target,telephone-accessible,telephone,text-color,thumbnails,ticket,torso-business,torso-female,torso,torsos-all-female,torsos-all,torsos-female-male,torsos-male-female,torsos,trash,trees,trophy,underline,universal-access,unlink,unlock,upload-cloud,upload,usb,video,volume-none,volume-strike,volume,web,wheelchair,widget,wrench,x-circle,x,yen,zoom-in,zoom-out',\n 'base' => ' ',\n 'prefix' => 'fi-',\n 'element' => 'i'\n ),\n 'typicons' => array(\n 'family' => 'typicons',\n 'text' => __('Typicons', 'victheme_core'),\n 'version' => '2.0.7',\n 'asset' => 'icon-typicons',\n 'iconset' => 'adjust-brightness,adjust-contrast,anchor-outline,anchor,archive,arrow-back-outline,arrow-back,arrow-down-outline,arrow-down-thick,arrow-down,arrow-forward-outline,arrow-forward,arrow-left-outline,arrow-left-thick,arrow-left,arrow-loop-outline,arrow-loop,arrow-maximise-outline,arrow-maximise,arrow-minimise-outline,arrow-minimise,arrow-move-outline,arrow-move,arrow-repeat-outline,arrow-repeat,arrow-right-outline,arrow-right-thick,arrow-right,arrow-shuffle,arrow-sorted-down,arrow-sorted-up,arrow-sync-outline,arrow-sync,arrow-unsorted,arrow-up-outline,arrow-up-thick,arrow-up,at,attachment-outline,attachment,backspace-outline,backspace,battery-charge,battery-full,battery-high,battery-low,battery-mid,beaker,beer,bell,book,bookmark,briefcase,brush,business-card,calculator,calendar-outline,calendar,camera-outline,camera,cancel-outline,cancel,chart-area-outline,chart-area,chart-bar-outline,chart-bar,chart-line-outline,chart-line,chart-pie-outline,chart-pie,chevron-left-outline,chevron-left,chevron-right-outline,chevron-right,clipboard,cloud-storage,cloud-storage-outline,code-outline,code,coffee,cog-outline,cog,compass,contacts,credit-card,css3,database,delete-outline,delete,device-desktop,device-laptop,device-phone,device-tablet,directions,divide-outline,divide,document-add,document-delete,document-text,document,download-outline,download,dropbox,edit,eject-outline,eject,equals-outline,equals,export-outline,export,eye-outline,eye,feather,film,filter,flag-outline,flag,flash-outline,flash,flow-children,flow-merge,flow-parallel,flow-switch,folder-add,folder-delete,folder-open,folder,gift,globe-outline,globe,group-outline,group,headphones,heart-full-outline,heart-half-outline,heart-outline,heart,home-outline,home,html5,image-outline,image,infinity-outline,infinity,info-large-outline,info-large,info-outline,info,input-checked-outline,input-checked,key-outline,key,keyboard,leaf,lightbulb,link-outline,link,location-arrow-outline,location-arrow,location-outline,location,lock-closed-outline,lock-closed,lock-open-outline,lock-open,mail,map,media-eject-outline,media-eject,media-fast-forward-outline,media-fast-forward,media-pause-outline,media-pause,media-play-outline,media-play-reverse-outline,media-play-reverse,media-play,media-record-outline,media-record,media-rewind-outline,media-rewind,media-stop-outline,media-stop,message-typing,message,messages,microphone-outline,microphone,minus-outline,minus,mortar-board,news,notes-outline,notes,pen,pencil,phone-outline,phone,pi-outline,pi,pin-outline,pin,pipette,plane-outline,plane,plug,plus-outline,plus,point-of-interest-outline,point-of-interest,power-outline,power,printer,puzzle-outline,puzzle,radar-outline,radar,refresh-outline,refresh,rss-outline,rss,scissors-outline,scissors,shopping-bag,shopping-cart,social-at-circular,social-dribbble-circular,social-dribbble,social-facebook-circular,social-facebook,social-flickr-circular,social-flickr,social-github-circular,social-github,social-google-plus-circular,social-google-plus,social-instagram-circular,social-instagram,social-last-fm-circular,social-last-fm,social-linkedin-circular,social-linkedin,social-pinterest-circular,social-pinterest,social-skype-outline,social-skype,social-tumbler-circular,social-tumbler,social-twitter-circular,social-twitter,social-vimeo-circular,social-vimeo,social-youtube-circular,social-youtube,sort-alphabetically-outline,sort-alphabetically,sort-numerically-outline,sort-numerically,spanner-outline,spanner,spiral,star-full-outline,star-half-outline,star-half,star-outline,star,starburst-outline,starburst,stopwatch,support,tabs-outline,tag,tags,th-large-outline,th-large,th-list-outline,th-list,th-menu-outline,th-menu,th-small-outline,th-small,thermometer,thumbs-down,thumbs-ok,thumbs-up,tick-outline,tick,ticket,time,times-outline,times,trash,tree,upload-outline,upload,user-add-outline,user-add,user-delete-outline,user-delete,user-outline,user,vendor-android,vendor-apple,vendor-microsoft,video-outline,video,volume-down,volume-mute,volume-up,volume,warning-outline,warning,watch,waves-outline,waves,weather-cloudy,weather-downpour,weather-night,weather-partly-sunny,weather-shower,weather-snow,weather-stormy,weather-sunny,weather-windy-cloudy,weather-windy,wi-fi-outline,wi-fi,wine,world-outline,world,zoom-in-outline,zoom-in,zoom-out-outline,zoom-out,zoom-outline,zoom',\n 'base' => 'typcn',\n 'prefix' => 'typcn-',\n 'element' => 'i'\n ),\n 'iconic' => array(\n 'family' => 'openiconic',\n 'text' => __('Open Iconic', 'victheme_core'),\n 'version' => '1.1.1',\n 'asset' => 'icon-open-iconic',\n 'iconset' => 'account-login,account-logout,action-redo,action-undo,align-center,align-left,align-right,aperture,arrow-bottom,arrow-circle-bottom,arrow-circle-left,arrow-circle-right,arrow-circle-top,arrow-left,arrow-right,arrow-thick-bottom,arrow-thick-left,arrow-thick-right,arrow-thick-top,arrow-top,audio-spectrum,audio,badge,ban,bar-chart,basket,battery-empty,battery-full,beaker,bell,bluetooth,bold,bolt,book,bookmark,box,briefcase,british-pound,browser,brush,bug,bullhorn,calculator,calendar,camera-slr,caret-bottom,caret-left,caret-right,caret-top,cart,chat,check,chevron-bottom,chevron-left,chevron-right,chevron-top,circle-check,circle-x,clipboard,clock,cloud-download,cloud-upload,cloud,cloudy,code,cog,collapse-down,collapse-left,collapse-right,collapse-up,command,comment-square,compass,contrast,copywriting,credit-card,crop,dashboard,data-transfer-download,data-transfer-upload,delete,dial,document,dollar,double-quote-sans-left,double-quote-sans-right,double-quote-serif-left,double-quote-serif-right,droplet,eject,elevator,ellipses,envelope-closed,envelope-open,euro,excerpt,expand-down,expand-left,expand-right,expand-up,external-link,eye,eyedropper,file,fire,flag,flash,folder,fork,fullscreen-enter,fullscreen-exit,globe,graph,grid-four-up,grid-three-up,grid-two-up,hard-drive,header,headphones,heart,home,image,inbox,infinity,info,italic,justify-center,justify-left,justify-right,key,laptop,layers,lightbulb,link-broken,link-intact,list-rich,list,location,lock-locked,lock-unlocked,loop-circular,loop-square,loop,magnifying-glass,map-marker,map,media-pause,media-play,media-record,media-skip-backward,media-skip-forward,media-step-backward,media-step-forward,media-stop,medical-cross,menu,microphone,minus,monitor,moon,move,musical-note,paperclip,pencil,people,person,phone,pie-chart,pin,play-circle,plus,power-standby,print,project,pulse,puzzle-piece,question-mark,rain,random,reload,resize-both,resize-height,resize-width,rss-alt,rss,script,share-boxed,share,shield,signal,signpost,sort-ascending,sort-descending,spreadsheet,star,sun,tablet,tag,tags,target,task,terminal,text,thumb-down,thumb-up,timer,transfer,trash,underline,vertical-align-bottom,vertical-align-center,vertical-align-top,video,volume-high,volume-low,volume-off,warning,wifi,wrench,x,yen,zoom-in,zoom-out',\n 'base' => 'oi',\n 'prefix' => 'oi-',\n 'element' => 'i'\n ),\n 'entypo' => array(\n 'family' => 'entypo',\n 'text' => __('Entypo', 'victheme_core'),\n 'version' => '',\n 'asset' => 'icon-entypo',\n 'iconset' => 'icon-note,icon-note-beamed,icon-music,icon-search,icon-flashlight,icon-mail,icon-heart,icon-heart-empty,icon-star,icon-star-empty,icon-user,icon-users,icon-user-add,icon-video,icon-picture,icon-camera,icon-layout,icon-menu,icon-check,icon-cancel,icon-cancel-circled,icon-cancel-squared,icon-plus,icon-plus-circled,icon-plus-squared,icon-minus,icon-minus-circled,icon-minus-squared,icon-help,icon-help-circled,icon-info,icon-info-circled,icon-back,icon-home,icon-link,icon-attach,icon-lock,icon-lock-open,icon-eye,icon-tag,icon-bookmark,icon-bookmarks,icon-flag,icon-thumbs-up,icon-thumbs-down,icon-download,icon-upload,icon-upload-cloud,icon-reply,icon-reply-all,icon-forward,icon-quote,icon-code,icon-export,icon-pencil,icon-feather,icon-print,icon-retweet,icon-keyboard,icon-comment,icon-chat,icon-bell,icon-attention,icon-alert,icon-vcard,icon-address,icon-location,icon-map,icon-direction,icon-compass,icon-cup,icon-trash,icon-doc,icon-docs,icon-doc-landscape,icon-doc-text,icon-doc-text-inv,icon-newspaper,icon-book-open,icon-book,icon-folder,icon-archive,icon-box,icon-rss,icon-phone,icon-cog,icon-tools,icon-share,icon-shareable,icon-basket,icon-bag,icon-calendar,icon-login,icon-logout,icon-mic,icon-mute,icon-sound,icon-volume,icon-clock,icon-hourglass,icon-lamp,icon-light-down,icon-light-up,icon-adjust,icon-block,icon-resize-full,icon-resize-small,icon-popup,icon-publish,icon-window,icon-arrow-combo,icon-down-circled,icon-left-circled,icon-right-circled,icon-up-circled,icon-down-open,icon-left-open,icon-right-open,icon-up-open,icon-down-open-mini,icon-left-open-mini,icon-right-open-mini,icon-up-open-mini,icon-down-open-big,icon-left-open-big,icon-right-open-big,icon-up-open-big,icon-down,icon-left,icon-right,icon-up,icon-down-dir,icon-left-dir,icon-right-dir,icon-up-dir,icon-down-bold,icon-left-bold,icon-right-bold,icon-up-bold,icon-down-thin,icon-left-thin,icon-right-thin,icon-up-thin,icon-ccw,icon-cw,icon-arrows-ccw,icon-level-down,icon-level-up,icon-shuffle,icon-loop,icon-switch,icon-play,icon-stop,icon-pause,icon-record,icon-to-end,icon-to-start,icon-fast-forward,icon-fast-backward,icon-progress-0,icon-progress-1,icon-progress-2,icon-progress-3,icon-target,icon-palette,icon-list,icon-list-add,icon-signal,icon-trophy,icon-battery,icon-back-in-time,icon-monitor,icon-mobile,icon-network,icon-cd,icon-inbox,icon-install,icon-globe,icon-cloud,icon-cloud-thunder,icon-flash,icon-moon,icon-flight,icon-paper-plane,icon-leaf,icon-lifebuoy,icon-mouse,icon-briefcase,icon-suitcase,icon-dot,icon-dot-2,icon-dot-3,icon-brush,icon-magnet,icon-infinity,icon-erase,icon-chart-pie,icon-chart-line,icon-chart-bar,icon-chart-area,icon-tape,icon-graduation-cap,icon-language,icon-ticket,icon-water,icon-droplet,icon-air,icon-credit-card,icon-floppy,icon-clipboard,icon-megaphone,icon-database,icon-drive,icon-bucket,icon-thermometer,icon-key,icon-flow-cascade,icon-flow-branch,icon-flow-tree,icon-flow-line,icon-flow-parallel,icon-rocket,icon-gauge,icon-traffic-cone,icon-cc,icon-cc-by,icon-cc-nc,icon-cc-nc-eu,icon-cc-nc-jp,icon-cc-sa,icon-cc-nd,icon-cc-pd,icon-cc-zero,icon-cc-share,icon-cc-remix,icon-github,icon-github-circled,icon-flickr,icon-flickr-circled,icon-vimeo,icon-vimeo-circled,icon-twitter,icon-twitter-circled,icon-facebook,icon-facebook-circled,icon-facebook-squared,icon-gplus,icon-gplus-circled,icon-pinterest,icon-pinterest-circled,icon-tumblr,icon-tumblr-circled,icon-linkedin,icon-linkedin-circled,icon-dribbble,icon-dribbble-circled,icon-stumbleupon,icon-stumbleupon-circled,icon-lastfm,icon-lastfm-circled,icon-rdio,icon-rdio-circled,icon-spotify,icon-spotify-circled,icon-qq,icon-instagrem,icon-dropbox,icon-evernote,icon-flattr,icon-skype,icon-skype-circled,icon-renren,icon-sina-weibo,icon-paypal,icon-picasa,icon-soundcloud,icon-mixi,icon-behance,icon-google-circles,icon-vkontakte,icon-smashing,icon-sweden,icon-db-shape,icon-logo-db',\n 'base' => 'entypo',\n 'prefix' => 'entypo-',\n 'element' => 'i'\n )\n );\n\n $this->merge((array) $options);\n $this->sanitizer = new $this->sanitizerClass();\n\n // Other plugin can register or modify the library here!\n do_action('vtcore_wordpress_alter_icons_library', $this);\n\n // Other plugin can disable / enable the assets here!\n do_action('vtcore_wordpress_alter_icons_status', $this);\n\n }", "function fontawesome_icon_dashboard() {\n echo \"<style type='text/css' media='screen'>\n #adminmenu #menu-posts-produto div.wp-menu-image:before { font-family:'FontAwesome' !important; content:'\\\\f0a4'; } \n </style>\";\n }", "protected function render() {\n\t\tif ( ! defined( 'SM_ENQUEUE_SCRIPTS_STYLES' ) ) {\n\t\t\tdefine( 'SM_ENQUEUE_SCRIPTS_STYLES', true );\n\t\t}\n\n\t\t$settings = $this->get_settings();\n\t\t$template_tags = new Template_Tags();\n\n\t\tif ( ! empty( $settings['icon_list'] ) ) {\n\t\t\tforeach ( $settings['icon_list'] as $field ) {\n\t\t\t\tswitch ( $field['type'] ) {\n\t\t\t\t\tcase 'date preached':\n\t\t\t\t\t\t$type = 'preached_date';\n\n\t\t\t\t\t\t$custom_date_format = empty( $field['custom_date_format'] ) ? 'F j, Y' : $field['custom_date_format'];\n\t\t\t\t\t\t$format_options = array(\n\t\t\t\t\t\t\t'default' => 'F j, Y',\n\t\t\t\t\t\t\t'0' => 'F j, Y',\n\t\t\t\t\t\t\t'1' => 'Y-m-d',\n\t\t\t\t\t\t\t'2' => 'm/d/Y',\n\t\t\t\t\t\t\t'3' => 'd/m/Y',\n\t\t\t\t\t\t\t'custom' => $custom_date_format,\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$date_format = $format_options[ $field['date_format'] ];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'service type':\n\t\t\t\t\t\t$type = 'service_type';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'bible book':\n\t\t\t\t\t\t$type = 'books';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$type = $field['type'];\n\t\t\t\t}\n\n\t\t\t\t$template_tags->the_metadata(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'meta_data' => array( $type ),\n\t\t\t\t\t\t'inline' => true,\n\t\t\t\t\t\t'before' => $field['text_prefix'],\n\t\t\t\t\t\t'link' => 'yes' === $field['link'],\n\t\t\t\t\t\t'date_format' => ! empty( $date_format ) ? $date_format : '',\n\t\t\t\t\t\t'verse_init' => 'passage' === $field['type'] && $field['link'],\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}", "public function icon() {\n\t\treturn 'custom_html';\n\t}", "function font_awesome()\n{\n wp_enqueue_style('font_awesome', '//use.fontawesome.com/releases/v5.6.3/css/all.css');\n}", "function social_icons( array $settings = [], array $data = [], array $fm_fields = [] ) : Social_Icons {\n\treturn new Social_Icons( $settings, $data );\n}", "private function registerFontAwesome()\n {\n $postfix = YII_DEBUG ? '' : '.min';\n $clientScript = Yii::app()->clientScript;\n $assetsDir = __DIR__ . DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR;\n $css = '/css/font-awesome' . $postfix . '.css';\n $url = Yii::app()->assetManager->publish($assetsDir\n . 'font-awesome');\n $clientScript->registerCssFile($url . $css);\n }", "static function customSize($size, $icon){\n\t\treturn str_replace(\"fa fa-\", \"fa fa-$size fa-\", $icon);\n\t}", "public function useFontAwesome(string $path = '') {\n $this->head()->appendScriptSrc(\"https://use.fontawesome.com/releases/v5.0.11/js/all.js\")->setDefer(true);\n return $this;\n }", "private function icons() {\n\n\t\t$icons = array(\n\t\t\t\"fa-f000\" => \"fa-glass\",\n\t\t\t\"fa-f001\" => \"fa-music\",\n\t\t\t\"fa-f002\" => \"fa-search\",\n\t\t\t\"fa-f003\" => \"fa-envelope-o\",\n\t\t\t\"fa-f004\" => \"fa-heart\",\n\t\t\t\"fa-f005\" => \"fa-star\",\n\t\t\t\"fa-f006\" => \"fa-star-o\",\n\t\t\t\"fa-f007\" => \"fa-user\",\n\t\t\t\"fa-f008\" => \"fa-film\",\n\t\t\t\"fa-f009\" => \"fa-th-large\",\n\t\t\t\"fa-f00a\" => \"fa-th\",\n\t\t\t\"fa-f00b\" => \"fa-th-list\",\n\t\t\t\"fa-f00c\" => \"fa-check\",\n\t\t\t\"fa-f00d\" => \"fa-times\",\n\t\t\t\"fa-f00e\" => \"fa-search-plus\",\n\t\t\t\"fa-f010\" => \"fa-search-minus\",\n\t\t\t\"fa-f011\" => \"fa-power-off\",\n\t\t\t\"fa-f012\" => \"fa-signal\",\n\t\t\t\"fa-f013\" => \"fa-cog\",\n\t\t\t\"fa-f014\" => \"fa-trash-o\",\n\t\t\t\"fa-f015\" => \"fa-home\",\n\t\t\t\"fa-f016\" => \"fa-file-o\",\n\t\t\t\"fa-f017\" => \"fa-clock-o\",\n\t\t\t\"fa-f018\" => \"fa-road\",\n\t\t\t\"fa-f019\" => \"fa-download\",\n\t\t\t\"fa-f01a\" => \"fa-arrow-circle-o-down\",\n\t\t\t\"fa-f01b\" => \"fa-arrow-circle-o-up\",\n\t\t\t\"fa-f01c\" => \"fa-inbox\",\n\t\t\t\"fa-f01d\" => \"fa-play-circle-o\",\n\t\t\t\"fa-f01e\" => \"fa-repeat\",\n\t\t\t\"fa-f021\" => \"fa-refresh\",\n\t\t\t\"fa-f022\" => \"fa-list-alt\",\n\t\t\t\"fa-f023\" => \"fa-lock\",\n\t\t\t\"fa-f024\" => \"fa-flag\",\n\t\t\t\"fa-f025\" => \"fa-headphones\",\n\t\t\t\"fa-f026\" => \"fa-volume-off\",\n\t\t\t\"fa-f027\" => \"fa-volume-down\",\n\t\t\t\"fa-f028\" => \"fa-volume-up\",\n\t\t\t\"fa-f029\" => \"fa-qrcode\",\n\t\t\t\"fa-f02a\" => \"fa-barcode\",\n\t\t\t\"fa-f02b\" => \"fa-tag\",\n\t\t\t\"fa-f02c\" => \"fa-tags\",\n\t\t\t\"fa-f02d\" => \"fa-book\",\n\t\t\t\"fa-f02e\" => \"fa-bookmark\",\n\t\t\t\"fa-f02f\" => \"fa-print\",\n\t\t\t\"fa-f030\" => \"fa-camera\",\n\t\t\t\"fa-f031\" => \"fa-font\",\n\t\t\t\"fa-f032\" => \"fa-bold\",\n\t\t\t\"fa-f033\" => \"fa-italic\",\n\t\t\t\"fa-f034\" => \"fa-text-height\",\n\t\t\t\"fa-f035\" => \"fa-text-width\",\n\t\t\t\"fa-f036\" => \"fa-align-left\",\n\t\t\t\"fa-f037\" => \"fa-align-center\",\n\t\t\t\"fa-f038\" => \"fa-align-right\",\n\t\t\t\"fa-f039\" => \"fa-align-justify\",\n\t\t\t\"fa-f03a\" => \"fa-list\",\n\t\t\t\"fa-f03b\" => \"fa-outdent\",\n\t\t\t\"fa-f03c\" => \"fa-indent\",\n\t\t\t\"fa-f03d\" => \"fa-video-camera\",\n\t\t\t\"fa-f03e\" => \"fa-picture-o\",\n\t\t\t\"fa-f040\" => \"fa-pencil\",\n\t\t\t\"fa-f041\" => \"fa-map-marker\",\n\t\t\t\"fa-f042\" => \"fa-adjust\",\n\t\t\t\"fa-f043\" => \"fa-tint\",\n\t\t\t\"fa-f044\" => \"fa-pencil-square-o\",\n\t\t\t\"fa-f045\" => \"fa-share-square-o\",\n\t\t\t\"fa-f046\" => \"fa-check-square-o\",\n\t\t\t\"fa-f047\" => \"fa-arrows\",\n\t\t\t\"fa-f048\" => \"fa-step-backward\",\n\t\t\t\"fa-f049\" => \"fa-fast-backward\",\n\t\t\t\"fa-f04a\" => \"fa-backward\",\n\t\t\t\"fa-f04b\" => \"fa-play\",\n\t\t\t\"fa-f04c\" => \"fa-pause\",\n\t\t\t\"fa-f04d\" => \"fa-stop\",\n\t\t\t\"fa-f04e\" => \"fa-forward\",\n\t\t\t\"fa-f050\" => \"fa-fast-forward\",\n\t\t\t\"fa-f051\" => \"fa-step-forward\",\n\t\t\t\"fa-f052\" => \"fa-eject\",\n\t\t\t\"fa-f053\" => \"fa-chevron-left\",\n\t\t\t\"fa-f054\" => \"fa-chevron-right\",\n\t\t\t\"fa-f055\" => \"fa-plus-circle\",\n\t\t\t\"fa-f056\" => \"fa-minus-circle\",\n\t\t\t\"fa-f057\" => \"fa-times-circle\",\n\t\t\t\"fa-f058\" => \"fa-check-circle\",\n\t\t\t\"fa-f059\" => \"fa-question-circle\",\n\t\t\t\"fa-f05a\" => \"fa-info-circle\",\n\t\t\t\"fa-f05b\" => \"fa-crosshairs\",\n\t\t\t\"fa-f05c\" => \"fa-times-circle-o\",\n\t\t\t\"fa-f05d\" => \"fa-check-circle-o\",\n\t\t\t\"fa-f05e\" => \"fa-ban\",\n\t\t\t\"fa-f060\" => \"fa-arrow-left\",\n\t\t\t\"fa-f061\" => \"fa-arrow-right\",\n\t\t\t\"fa-f062\" => \"fa-arrow-up\",\n\t\t\t\"fa-f063\" => \"fa-arrow-down\",\n\t\t\t\"fa-f064\" => \"fa-share\",\n\t\t\t\"fa-f065\" => \"fa-expand\",\n\t\t\t\"fa-f066\" => \"fa-compress\",\n\t\t\t\"fa-f067\" => \"fa-plus\",\n\t\t\t\"fa-f068\" => \"fa-minus\",\n\t\t\t\"fa-f069\" => \"fa-asterisk\",\n\t\t\t\"fa-f06a\" => \"fa-exclamation-circle\",\n\t\t\t\"fa-f06b\" => \"fa-gift\",\n\t\t\t\"fa-f06c\" => \"fa-leaf\",\n\t\t\t\"fa-f06d\" => \"fa-fire\",\n\t\t\t\"fa-f06e\" => \"fa-eye\",\n\t\t\t\"fa-f070\" => \"fa-eye-slash\",\n\t\t\t\"fa-f071\" => \"fa-exclamation-triangle\",\n\t\t\t\"fa-f072\" => \"fa-plane\",\n\t\t\t\"fa-f073\" => \"fa-calendar\",\n\t\t\t\"fa-f074\" => \"fa-random\",\n\t\t\t\"fa-f075\" => \"fa-comment\",\n\t\t\t\"fa-f076\" => \"fa-magnet\",\n\t\t\t\"fa-f077\" => \"fa-chevron-up\",\n\t\t\t\"fa-f078\" => \"fa-chevron-down\",\n\t\t\t\"fa-f079\" => \"fa-retweet\",\n\t\t\t\"fa-f07a\" => \"fa-shopping-cart\",\n\t\t\t\"fa-f07b\" => \"fa-folder\",\n\t\t\t\"fa-f07c\" => \"fa-folder-open\",\n\t\t\t\"fa-f07d\" => \"fa-arrows-v\",\n\t\t\t\"fa-f07e\" => \"fa-arrows-h\",\n\t\t\t\"fa-f080\" => \"fa-bar-chart\",\n\t\t\t\"fa-f081\" => \"fa-twitter-square\",\n\t\t\t\"fa-f082\" => \"fa-facebook-square\",\n\t\t\t\"fa-f083\" => \"fa-camera-retro\",\n\t\t\t\"fa-f084\" => \"fa-key\",\n\t\t\t\"fa-f085\" => \"fa-cogs\",\n\t\t\t\"fa-f086\" => \"fa-comments\",\n\t\t\t\"fa-f087\" => \"fa-thumbs-o-up\",\n\t\t\t\"fa-f088\" => \"fa-thumbs-o-down\",\n\t\t\t\"fa-f089\" => \"fa-star-half\",\n\t\t\t\"fa-f08a\" => \"fa-heart-o\",\n\t\t\t\"fa-f08b\" => \"fa-sign-out\",\n\t\t\t\"fa-f08c\" => \"fa-linkedin-square\",\n\t\t\t\"fa-f08d\" => \"fa-thumb-tack\",\n\t\t\t\"fa-f08e\" => \"fa-external-link\",\n\t\t\t\"fa-f090\" => \"fa-sign-in\",\n\t\t\t\"fa-f091\" => \"fa-trophy\",\n\t\t\t\"fa-f092\" => \"fa-github-square\",\n\t\t\t\"fa-f093\" => \"fa-upload\",\n\t\t\t\"fa-f094\" => \"fa-lemon-o\",\n\t\t\t\"fa-f095\" => \"fa-phone\",\n\t\t\t\"fa-f096\" => \"fa-square-o\",\n\t\t\t\"fa-f097\" => \"fa-bookmark-o\",\n\t\t\t\"fa-f098\" => \"fa-phone-square\",\n\t\t\t\"fa-f099\" => \"fa-twitter\",\n\t\t\t\"fa-f09a\" => \"fa-facebook\",\n\t\t\t\"fa-f09b\" => \"fa-github\",\n\t\t\t\"fa-f09c\" => \"fa-unlock\",\n\t\t\t\"fa-f09d\" => \"fa-credit-card\",\n\t\t\t\"fa-f09e\" => \"fa-rss\",\n\t\t\t\"fa-f0a0\" => \"fa-hdd-o\",\n\t\t\t\"fa-f0a1\" => \"fa-bullhorn\",\n\t\t\t\"fa-f0f3\" => \"fa-bell\",\n\t\t\t\"fa-f0a3\" => \"fa-certificate\",\n\t\t\t\"fa-f0a4\" => \"fa-hand-o-right\",\n\t\t\t\"fa-f0a5\" => \"fa-hand-o-left\",\n\t\t\t\"fa-f0a6\" => \"fa-hand-o-up\",\n\t\t\t\"fa-f0a7\" => \"fa-hand-o-down\",\n\t\t\t\"fa-f0a8\" => \"fa-arrow-circle-left\",\n\t\t\t\"fa-f0a9\" => \"fa-arrow-circle-right\",\n\t\t\t\"fa-f0aa\" => \"fa-arrow-circle-up\",\n\t\t\t\"fa-f0ab\" => \"fa-arrow-circle-down\",\n\t\t\t\"fa-f0ac\" => \"fa-globe\",\n\t\t\t\"fa-f0ad\" => \"fa-wrench\",\n\t\t\t\"fa-f0ae\" => \"fa-tasks\",\n\t\t\t\"fa-f0b0\" => \"fa-filter\",\n\t\t\t\"fa-f0b1\" => \"fa-briefcase\",\n\t\t\t\"fa-f0b2\" => \"fa-arrows-alt\",\n\t\t\t\"fa-f0c0\" => \"fa-users\",\n\t\t\t\"fa-f0c1\" => \"fa-link\",\n\t\t\t\"fa-f0c2\" => \"fa-cloud\",\n\t\t\t\"fa-f0c3\" => \"fa-flask\",\n\t\t\t\"fa-f0c4\" => \"fa-scissors\",\n\t\t\t\"fa-f0c5\" => \"fa-files-o\",\n\t\t\t\"fa-f0c6\" => \"fa-paperclip\",\n\t\t\t\"fa-f0c7\" => \"fa-floppy-o\",\n\t\t\t\"fa-f0c8\" => \"fa-square\",\n\t\t\t\"fa-f0c9\" => \"fa-bars\",\n\t\t\t\"fa-f0ca\" => \"fa-list-ul\",\n\t\t\t\"fa-f0cb\" => \"fa-list-ol\",\n\t\t\t\"fa-f0cc\" => \"fa-strikethrough\",\n\t\t\t\"fa-f0cd\" => \"fa-underline\",\n\t\t\t\"fa-f0ce\" => \"fa-table\",\n\t\t\t\"fa-f0d0\" => \"fa-magic\",\n\t\t\t\"fa-f0d1\" => \"fa-truck\",\n\t\t\t\"fa-f0d2\" => \"fa-pinterest\",\n\t\t\t\"fa-f0d3\" => \"fa-pinterest-square\",\n\t\t\t\"fa-f0d4\" => \"fa-google-plus-square\",\n\t\t\t\"fa-f0d5\" => \"fa-google-plus\",\n\t\t\t\"fa-f0d6\" => \"fa-money\",\n\t\t\t\"fa-f0d7\" => \"fa-caret-down\",\n\t\t\t\"fa-f0d8\" => \"fa-caret-up\",\n\t\t\t\"fa-f0d9\" => \"fa-caret-left\",\n\t\t\t\"fa-f0da\" => \"fa-caret-right\",\n\t\t\t\"fa-f0db\" => \"fa-columns\",\n\t\t\t\"fa-f0dc\" => \"fa-sort\",\n\t\t\t\"fa-f0dd\" => \"fa-sort-desc\",\n\t\t\t\"fa-f0de\" => \"fa-sort-asc\",\n\t\t\t\"fa-f0e0\" => \"fa-envelope\",\n\t\t\t\"fa-f0e1\" => \"fa-linkedin\",\n\t\t\t\"fa-f0e2\" => \"fa-undo\",\n\t\t\t\"fa-f0e3\" => \"fa-gavel\",\n\t\t\t\"fa-f0e4\" => \"fa-tachometer\",\n\t\t\t\"fa-f0e5\" => \"fa-comment-o\",\n\t\t\t\"fa-f0e6\" => \"fa-comments-o\",\n\t\t\t\"fa-f0e7\" => \"fa-bolt\",\n\t\t\t\"fa-f0e8\" => \"fa-sitemap\",\n\t\t\t\"fa-f0e9\" => \"fa-umbrella\",\n\t\t\t\"fa-f0ea\" => \"fa-clipboard\",\n\t\t\t\"fa-f0eb\" => \"fa-lightbulb-o\",\n\t\t\t\"fa-f0ec\" => \"fa-exchange\",\n\t\t\t\"fa-f0ed\" => \"fa-cloud-download\",\n\t\t\t\"fa-f0ee\" => \"fa-cloud-upload\",\n\t\t\t\"fa-f0f0\" => \"fa-user-md\",\n\t\t\t\"fa-f0f1\" => \"fa-stethoscope\",\n\t\t\t\"fa-f0f2\" => \"fa-suitcase\",\n\t\t\t\"fa-f0a2\" => \"fa-bell-o\",\n\t\t\t\"fa-f0f4\" => \"fa-coffee\",\n\t\t\t\"fa-f0f5\" => \"fa-cutlery\",\n\t\t\t\"fa-f0f6\" => \"fa-file-text-o\",\n\t\t\t\"fa-f0f7\" => \"fa-building-o\",\n\t\t\t\"fa-f0f8\" => \"fa-hospital-o\",\n\t\t\t\"fa-f0f9\" => \"fa-ambulance\",\n\t\t\t\"fa-f0fa\" => \"fa-medkit\",\n\t\t\t\"fa-f0fb\" => \"fa-fighter-jet\",\n\t\t\t\"fa-f0fc\" => \"fa-beer\",\n\t\t\t\"fa-f0fd\" => \"fa-h-square\",\n\t\t\t\"fa-f0fe\" => \"fa-plus-square\",\n\t\t\t\"fa-f100\" => \"fa-angle-double-left\",\n\t\t\t\"fa-f101\" => \"fa-angle-double-right\",\n\t\t\t\"fa-f102\" => \"fa-angle-double-up\",\n\t\t\t\"fa-f103\" => \"fa-angle-double-down\",\n\t\t\t\"fa-f104\" => \"fa-angle-left\",\n\t\t\t\"fa-f105\" => \"fa-angle-right\",\n\t\t\t\"fa-f106\" => \"fa-angle-up\",\n\t\t\t\"fa-f107\" => \"fa-angle-down\",\n\t\t\t\"fa-f108\" => \"fa-desktop\",\n\t\t\t\"fa-f109\" => \"fa-laptop\",\n\t\t\t\"fa-f10a\" => \"fa-tablet\",\n\t\t\t\"fa-f10b\" => \"fa-mobile\",\n\t\t\t\"fa-f10c\" => \"fa-circle-o\",\n\t\t\t\"fa-f10d\" => \"fa-quote-left\",\n\t\t\t\"fa-f10e\" => \"fa-quote-right\",\n\t\t\t\"fa-f110\" => \"fa-spinner\",\n\t\t\t\"fa-f111\" => \"fa-circle\",\n\t\t\t\"fa-f112\" => \"fa-reply\",\n\t\t\t\"fa-f113\" => \"fa-github-alt\",\n\t\t\t\"fa-f114\" => \"fa-folder-o\",\n\t\t\t\"fa-f115\" => \"fa-folder-open-o\",\n\t\t\t\"fa-f118\" => \"fa-smile-o\",\n\t\t\t\"fa-f119\" => \"fa-frown-o\",\n\t\t\t\"fa-f11a\" => \"fa-meh-o\",\n\t\t\t\"fa-f11b\" => \"fa-gamepad\",\n\t\t\t\"fa-f11c\" => \"fa-keyboard-o\",\n\t\t\t\"fa-f11d\" => \"fa-flag-o\",\n\t\t\t\"fa-f11e\" => \"fa-flag-checkered\",\n\t\t\t\"fa-f120\" => \"fa-terminal\",\n\t\t\t\"fa-f121\" => \"fa-code\",\n\t\t\t\"fa-f122\" => \"fa-reply-all\",\n\t\t\t\"fa-f123\" => \"fa-star-half-o\",\n\t\t\t\"fa-f124\" => \"fa-location-arrow\",\n\t\t\t\"fa-f125\" => \"fa-crop\",\n\t\t\t\"fa-f126\" => \"fa-code-fork\",\n\t\t\t\"fa-f127\" => \"fa-chain-broken\",\n\t\t\t\"fa-f128\" => \"fa-question\",\n\t\t\t\"fa-f129\" => \"fa-info\",\n\t\t\t\"fa-f12a\" => \"fa-exclamation\",\n\t\t\t\"fa-f12b\" => \"fa-superscript\",\n\t\t\t\"fa-f12c\" => \"fa-subscript\",\n\t\t\t\"fa-f12d\" => \"fa-eraser\",\n\t\t\t\"fa-f12e\" => \"fa-puzzle-piece\",\n\t\t\t\"fa-f130\" => \"fa-microphone\",\n\t\t\t\"fa-f131\" => \"fa-microphone-slash\",\n\t\t\t\"fa-f132\" => \"fa-shield\",\n\t\t\t\"fa-f133\" => \"fa-calendar-o\",\n\t\t\t\"fa-f134\" => \"fa-fire-extinguisher\",\n\t\t\t\"fa-f135\" => \"fa-rocket\",\n\t\t\t\"fa-f136\" => \"fa-maxcdn\",\n\t\t\t\"fa-f137\" => \"fa-chevron-circle-left\",\n\t\t\t\"fa-f138\" => \"fa-chevron-circle-right\",\n\t\t\t\"fa-f139\" => \"fa-chevron-circle-up\",\n\t\t\t\"fa-f13a\" => \"fa-chevron-circle-down\",\n\t\t\t\"fa-f13b\" => \"fa-html5\",\n\t\t\t\"fa-f13c\" => \"fa-css3\",\n\t\t\t\"fa-f13d\" => \"fa-anchor\",\n\t\t\t\"fa-f13e\" => \"fa-unlock-alt\",\n\t\t\t\"fa-f140\" => \"fa-bullseye\",\n\t\t\t\"fa-f141\" => \"fa-ellipsis-h\",\n\t\t\t\"fa-f142\" => \"fa-ellipsis-v\",\n\t\t\t\"fa-f143\" => \"fa-rss-square\",\n\t\t\t\"fa-f144\" => \"fa-play-circle\",\n\t\t\t\"fa-f145\" => \"fa-ticket\",\n\t\t\t\"fa-f146\" => \"fa-minus-square\",\n\t\t\t\"fa-f147\" => \"fa-minus-square-o\",\n\t\t\t\"fa-f148\" => \"fa-level-up\",\n\t\t\t\"fa-f149\" => \"fa-level-down\",\n\t\t\t\"fa-f14a\" => \"fa-check-square\",\n\t\t\t\"fa-f14b\" => \"fa-pencil-square\",\n\t\t\t\"fa-f14c\" => \"fa-external-link-square\",\n\t\t\t\"fa-f14d\" => \"fa-share-square\",\n\t\t\t\"fa-f14e\" => \"fa-compass\",\n\t\t\t\"fa-f150\" => \"fa-caret-square-o-down\",\n\t\t\t\"fa-f151\" => \"fa-caret-square-o-up\",\n\t\t\t\"fa-f152\" => \"fa-caret-square-o-right\",\n\t\t\t\"fa-f153\" => \"fa-eur\",\n\t\t\t\"fa-f154\" => \"fa-gbp\",\n\t\t\t\"fa-f155\" => \"fa-usd\",\n\t\t\t\"fa-f156\" => \"fa-inr\",\n\t\t\t\"fa-f157\" => \"fa-jpy\",\n\t\t\t\"fa-f158\" => \"fa-rub\",\n\t\t\t\"fa-f159\" => \"fa-krw\",\n\t\t\t\"fa-f15a\" => \"fa-btc\",\n\t\t\t\"fa-f15b\" => \"fa-file\",\n\t\t\t\"fa-f15c\" => \"fa-file-text\",\n\t\t\t\"fa-f15d\" => \"fa-sort-alpha-asc\",\n\t\t\t\"fa-f15e\" => \"fa-sort-alpha-desc\",\n\t\t\t\"fa-f160\" => \"fa-sort-amount-asc\",\n\t\t\t\"fa-f161\" => \"fa-sort-amount-desc\",\n\t\t\t\"fa-f162\" => \"fa-sort-numeric-asc\",\n\t\t\t\"fa-f163\" => \"fa-sort-numeric-desc\",\n\t\t\t\"fa-f164\" => \"fa-thumbs-up\",\n\t\t\t\"fa-f165\" => \"fa-thumbs-down\",\n\t\t\t\"fa-f166\" => \"fa-youtube-square\",\n\t\t\t\"fa-f167\" => \"fa-youtube\",\n\t\t\t\"fa-f168\" => \"fa-xing\",\n\t\t\t\"fa-f169\" => \"fa-xing-square\",\n\t\t\t\"fa-f16a\" => \"fa-youtube-play\",\n\t\t\t\"fa-f16b\" => \"fa-dropbox\",\n\t\t\t\"fa-f16c\" => \"fa-stack-overflow\",\n\t\t\t\"fa-f16d\" => \"fa-instagram\",\n\t\t\t\"fa-f16e\" => \"fa-flickr\",\n\t\t\t\"fa-f170\" => \"fa-adn\",\n\t\t\t\"fa-f171\" => \"fa-bitbucket\",\n\t\t\t\"fa-f172\" => \"fa-bitbucket-square\",\n\t\t\t\"fa-f173\" => \"fa-tumblr\",\n\t\t\t\"fa-f174\" => \"fa-tumblr-square\",\n\t\t\t\"fa-f175\" => \"fa-long-arrow-down\",\n\t\t\t\"fa-f176\" => \"fa-long-arrow-up\",\n\t\t\t\"fa-f177\" => \"fa-long-arrow-left\",\n\t\t\t\"fa-f178\" => \"fa-long-arrow-right\",\n\t\t\t\"fa-f179\" => \"fa-apple\",\n\t\t\t\"fa-f17a\" => \"fa-windows\",\n\t\t\t\"fa-f17b\" => \"fa-android\",\n\t\t\t\"fa-f17c\" => \"fa-linux\",\n\t\t\t\"fa-f17d\" => \"fa-dribbble\",\n\t\t\t\"fa-f17e\" => \"fa-skype\",\n\t\t\t\"fa-f180\" => \"fa-foursquare\",\n\t\t\t\"fa-f181\" => \"fa-trello\",\n\t\t\t\"fa-f182\" => \"fa-female\",\n\t\t\t\"fa-f183\" => \"fa-male\",\n\t\t\t\"fa-f184\" => \"fa-gratipay\",\n\t\t\t\"fa-f185\" => \"fa-sun-o\",\n\t\t\t\"fa-f186\" => \"fa-moon-o\",\n\t\t\t\"fa-f187\" => \"fa-archive\",\n\t\t\t\"fa-f188\" => \"fa-bug\",\n\t\t\t\"fa-f189\" => \"fa-vk\",\n\t\t\t\"fa-f18a\" => \"fa-weibo\",\n\t\t\t\"fa-f18b\" => \"fa-renren\",\n\t\t\t\"fa-f18c\" => \"fa-pagelines\",\n\t\t\t\"fa-f18d\" => \"fa-stack-exchange\",\n\t\t\t\"fa-f18e\" => \"fa-arrow-circle-o-right\",\n\t\t\t\"fa-f190\" => \"fa-arrow-circle-o-left\",\n\t\t\t\"fa-f191\" => \"fa-caret-square-o-left\",\n\t\t\t\"fa-f192\" => \"fa-dot-circle-o\",\n\t\t\t\"fa-f193\" => \"fa-wheelchair\",\n\t\t\t\"fa-f194\" => \"fa-vimeo-square\",\n\t\t\t\"fa-f195\" => \"fa-try\",\n\t\t\t\"fa-f196\" => \"fa-plus-square-o\",\n\t\t\t\"fa-f197\" => \"fa-space-shuttle\",\n\t\t\t\"fa-f198\" => \"fa-slack\",\n\t\t\t\"fa-f199\" => \"fa-envelope-square\",\n\t\t\t\"fa-f19a\" => \"fa-wordpress\",\n\t\t\t\"fa-f19b\" => \"fa-openid\",\n\t\t\t\"fa-f19c\" => \"fa-university\",\n\t\t\t\"fa-f19d\" => \"fa-graduation-cap\",\n\t\t\t\"fa-f19e\" => \"fa-yahoo\",\n\t\t\t\"fa-f1a0\" => \"fa-google\",\n\t\t\t\"fa-f1a1\" => \"fa-reddit\",\n\t\t\t\"fa-f1a2\" => \"fa-reddit-square\",\n\t\t\t\"fa-f1a3\" => \"fa-stumbleupon-circle\",\n\t\t\t\"fa-f1a4\" => \"fa-stumbleupon\",\n\t\t\t\"fa-f1a5\" => \"fa-delicious\",\n\t\t\t\"fa-f1a6\" => \"fa-digg\",\n\t\t\t\"fa-f1a7\" => \"fa-pied-piper\",\n\t\t\t\"fa-f1a8\" => \"fa-pied-piper-alt\",\n\t\t\t\"fa-f1a9\" => \"fa-drupal\",\n\t\t\t\"fa-f1aa\" => \"fa-joomla\",\n\t\t\t\"fa-f1ab\" => \"fa-language\",\n\t\t\t\"fa-f1ac\" => \"fa-fax\",\n\t\t\t\"fa-f1ad\" => \"fa-building\",\n\t\t\t\"fa-f1ae\" => \"fa-child\",\n\t\t\t\"fa-f1b0\" => \"fa-paw\",\n\t\t\t\"fa-f1b1\" => \"fa-spoon\",\n\t\t\t\"fa-f1b2\" => \"fa-cube\",\n\t\t\t\"fa-f1b3\" => \"fa-cubes\",\n\t\t\t\"fa-f1b4\" => \"fa-behance\",\n\t\t\t\"fa-f1b5\" => \"fa-behance-square\",\n\t\t\t\"fa-f1b6\" => \"fa-steam\",\n\t\t\t\"fa-f1b7\" => \"fa-steam-square\",\n\t\t\t\"fa-f1b8\" => \"fa-recycle\",\n\t\t\t\"fa-f1b9\" => \"fa-car\",\n\t\t\t\"fa-f1ba\" => \"fa-taxi\",\n\t\t\t\"fa-f1bb\" => \"fa-tree\",\n\t\t\t\"fa-f1bc\" => \"fa-spotify\",\n\t\t\t\"fa-f1bd\" => \"fa-deviantart\",\n\t\t\t\"fa-f1be\" => \"fa-soundcloud\",\n\t\t\t\"fa-f1c0\" => \"fa-database\",\n\t\t\t\"fa-f1c1\" => \"fa-file-pdf-o\",\n\t\t\t\"fa-f1c2\" => \"fa-file-word-o\",\n\t\t\t\"fa-f1c3\" => \"fa-file-excel-o\",\n\t\t\t\"fa-f1c4\" => \"fa-file-powerpoint-o\",\n\t\t\t\"fa-f1c5\" => \"fa-file-image-o\",\n\t\t\t\"fa-f1c6\" => \"fa-file-archive-o\",\n\t\t\t\"fa-f1c7\" => \"fa-file-audio-o\",\n\t\t\t\"fa-f1c8\" => \"fa-file-video-o\",\n\t\t\t\"fa-f1c9\" => \"fa-file-code-o\",\n\t\t\t\"fa-f1ca\" => \"fa-vine\",\n\t\t\t\"fa-f1cb\" => \"fa-codepen\",\n\t\t\t\"fa-f1cc\" => \"fa-jsfiddle\",\n\t\t\t\"fa-f1cd\" => \"fa-life-ring\",\n\t\t\t\"fa-f1ce\" => \"fa-circle-o-notch\",\n\t\t\t\"fa-f1d0\" => \"fa-rebel\",\n\t\t\t\"fa-f1d1\" => \"fa-empire\",\n\t\t\t\"fa-f1d2\" => \"fa-git-square\",\n\t\t\t\"fa-f1d3\" => \"fa-git\",\n\t\t\t\"fa-f1d4\" => \"fa-hacker-news\",\n\t\t\t\"fa-f1d5\" => \"fa-tencent-weibo\",\n\t\t\t\"fa-f1d6\" => \"fa-qq\",\n\t\t\t\"fa-f1d7\" => \"fa-weixin\",\n\t\t\t\"fa-f1d8\" => \"fa-paper-plane\",\n\t\t\t\"fa-f1d9\" => \"fa-paper-plane-o\",\n\t\t\t\"fa-f1da\" => \"fa-history\",\n\t\t\t\"fa-f1db\" => \"fa-circle-thin\",\n\t\t\t\"fa-f1dc\" => \"fa-header\",\n\t\t\t\"fa-f1dd\" => \"fa-paragraph\",\n\t\t\t\"fa-f1de\" => \"fa-sliders\",\n\t\t\t\"fa-f1e0\" => \"fa-share-alt\",\n\t\t\t\"fa-f1e1\" => \"fa-share-alt-square\",\n\t\t\t\"fa-f1e2\" => \"fa-bomb\",\n\t\t\t\"fa-f1e3\" => \"fa-futbol-o\",\n\t\t\t\"fa-f1e4\" => \"fa-tty\",\n\t\t\t\"fa-f1e5\" => \"fa-binoculars\",\n\t\t\t\"fa-f1e6\" => \"fa-plug\",\n\t\t\t\"fa-f1e7\" => \"fa-slideshare\",\n\t\t\t\"fa-f1e8\" => \"fa-twitch\",\n\t\t\t\"fa-f1e9\" => \"fa-yelp\",\n\t\t\t\"fa-f1ea\" => \"fa-newspaper-o\",\n\t\t\t\"fa-f1eb\" => \"fa-wifi\",\n\t\t\t\"fa-f1ec\" => \"fa-calculator\",\n\t\t\t\"fa-f1ed\" => \"fa-paypal\",\n\t\t\t\"fa-f1ee\" => \"fa-google-wallet\",\n\t\t\t\"fa-f1f0\" => \"fa-cc-visa\",\n\t\t\t\"fa-f1f1\" => \"fa-cc-mastercard\",\n\t\t\t\"fa-f1f2\" => \"fa-cc-discover\",\n\t\t\t\"fa-f1f3\" => \"fa-cc-amex\",\n\t\t\t\"fa-f1f4\" => \"fa-cc-paypal\",\n\t\t\t\"fa-f1f5\" => \"fa-cc-stripe\",\n\t\t\t\"fa-f1f6\" => \"fa-bell-slash\",\n\t\t\t\"fa-f1f7\" => \"fa-bell-slash-o\",\n\t\t\t\"fa-f1f8\" => \"fa-trash\",\n\t\t\t\"fa-f1f9\" => \"fa-copyright\",\n\t\t\t\"fa-f1fa\" => \"fa-at\",\n\t\t\t\"fa-f1fb\" => \"fa-eyedropper\",\n\t\t\t\"fa-f1fc\" => \"fa-paint-brush\",\n\t\t\t\"fa-f1fd\" => \"fa-birthday-cake\",\n\t\t\t\"fa-f1fe\" => \"fa-area-chart\",\n\t\t\t\"fa-f200\" => \"fa-pie-chart\",\n\t\t\t\"fa-f201\" => \"fa-line-chart\",\n\t\t\t\"fa-f202\" => \"fa-lastfm\",\n\t\t\t\"fa-f203\" => \"fa-lastfm-square\",\n\t\t\t\"fa-f204\" => \"fa-toggle-off\",\n\t\t\t\"fa-f205\" => \"fa-toggle-on\",\n\t\t\t\"fa-f206\" => \"fa-bicycle\",\n\t\t\t\"fa-f207\" => \"fa-bus\",\n\t\t\t\"fa-f208\" => \"fa-ioxhost\",\n\t\t\t\"fa-f209\" => \"fa-angellist\",\n\t\t\t\"fa-f20a\" => \"fa-cc\",\n\t\t\t\"fa-f20b\" => \"fa-ils\",\n\t\t\t\"fa-f20c\" => \"fa-meanpath\",\n\t\t\t\"fa-f20d\" => \"fa-buysellads\",\n\t\t\t\"fa-f20e\" => \"fa-connectdevelop\",\n\t\t\t\"fa-f210\" => \"fa-dashcube\",\n\t\t\t\"fa-f211\" => \"fa-forumbee\",\n\t\t\t\"fa-f212\" => \"fa-leanpub\",\n\t\t\t\"fa-f213\" => \"fa-sellsy\",\n\t\t\t\"fa-f214\" => \"fa-shirtsinbulk\",\n\t\t\t\"fa-f215\" => \"fa-simplybuilt\",\n\t\t\t\"fa-f216\" => \"fa-skyatlas\",\n\t\t\t\"fa-f217\" => \"fa-cart-plus\",\n\t\t\t\"fa-f218\" => \"fa-cart-arrow-down\",\n\t\t\t\"fa-f219\" => \"fa-diamond\",\n\t\t\t\"fa-f21a\" => \"fa-ship\",\n\t\t\t\"fa-f21b\" => \"fa-user-secret\",\n\t\t\t\"fa-f21c\" => \"fa-motorcycle\",\n\t\t\t\"fa-f21d\" => \"fa-street-view\",\n\t\t\t\"fa-f21e\" => \"fa-heartbeat\",\n\t\t\t\"fa-f221\" => \"fa-venus\",\n\t\t\t\"fa-f222\" => \"fa-mars\",\n\t\t\t\"fa-f223\" => \"fa-mercury\",\n\t\t\t\"fa-f224\" => \"fa-transgender\",\n\t\t\t\"fa-f225\" => \"fa-transgender-alt\",\n\t\t\t\"fa-f226\" => \"fa-venus-double\",\n\t\t\t\"fa-f227\" => \"fa-mars-double\",\n\t\t\t\"fa-f228\" => \"fa-venus-mars\",\n\t\t\t\"fa-f229\" => \"fa-mars-stroke\",\n\t\t\t\"fa-f22a\" => \"fa-mars-stroke-v\",\n\t\t\t\"fa-f22b\" => \"fa-mars-stroke-h\",\n\t\t\t\"fa-f22c\" => \"fa-neuter\",\n\t\t\t\"fa-f22d\" => \"fa-genderless\",\n\t\t\t\"fa-f230\" => \"fa-facebook-official\",\n\t\t\t\"fa-f231\" => \"fa-pinterest-p\",\n\t\t\t\"fa-f232\" => \"fa-whatsapp\",\n\t\t\t\"fa-f233\" => \"fa-server\",\n\t\t\t\"fa-f234\" => \"fa-user-plus\",\n\t\t\t\"fa-f235\" => \"fa-user-times\",\n\t\t\t\"fa-f236\" => \"fa-bed\",\n\t\t\t\"fa-f237\" => \"fa-viacoin\",\n\t\t\t\"fa-f238\" => \"fa-train\",\n\t\t\t\"fa-f239\" => \"fa-subway\",\n\t\t\t\"fa-f23a\" => \"fa-medium\",\n\t\t\t\"fa-f23b\" => \"fa-y-combinator\",\n\t\t\t\"fa-f23c\" => \"fa-optin-monster\",\n\t\t\t\"fa-f23d\" => \"fa-opencart\",\n\t\t\t\"fa-f23e\" => \"fa-expeditedssl\",\n\t\t\t\"fa-f240\" => \"fa-battery-full\",\n\t\t\t\"fa-f241\" => \"fa-battery-three-quarters\",\n\t\t\t\"fa-f242\" => \"fa-battery-half\",\n\t\t\t\"fa-f243\" => \"fa-battery-quarter\",\n\t\t\t\"fa-f244\" => \"fa-battery-empty\",\n\t\t\t\"fa-f245\" => \"fa-mouse-pointer\",\n\t\t\t\"fa-f246\" => \"fa-i-cursor\",\n\t\t\t\"fa-f247\" => \"fa-object-group\",\n\t\t\t\"fa-f248\" => \"fa-object-ungroup\",\n\t\t\t\"fa-f249\" => \"fa-sticky-note\",\n\t\t\t\"fa-f24a\" => \"fa-sticky-note-o\",\n\t\t\t\"fa-f24b\" => \"fa-cc-jcb\",\n\t\t\t\"fa-f24c\" => \"fa-cc-diners-club\",\n\t\t\t\"fa-f24d\" => \"fa-clone\",\n\t\t\t\"fa-f24e\" => \"fa-balance-scale\",\n\t\t\t\"fa-f250\" => \"fa-hourglass-o\",\n\t\t\t\"fa-f251\" => \"fa-hourglass-start\",\n\t\t\t\"fa-f252\" => \"fa-hourglass-half\",\n\t\t\t\"fa-f253\" => \"fa-hourglass-end\",\n\t\t\t\"fa-f254\" => \"fa-hourglass\",\n\t\t\t\"fa-f255\" => \"fa-hand-rock-o\",\n\t\t\t\"fa-f256\" => \"fa-hand-paper-o\",\n\t\t\t\"fa-f257\" => \"fa-hand-scissors-o\",\n\t\t\t\"fa-f258\" => \"fa-hand-lizard-o\",\n\t\t\t\"fa-f259\" => \"fa-hand-spock-o\",\n\t\t\t\"fa-f25a\" => \"fa-hand-pointer-o\",\n\t\t\t\"fa-f25b\" => \"fa-hand-peace-o\",\n\t\t\t\"fa-f25c\" => \"fa-trademark\",\n\t\t\t\"fa-f25d\" => \"fa-registered\",\n\t\t\t\"fa-f25e\" => \"fa-creative-commons\",\n\t\t\t\"fa-f260\" => \"fa-gg\",\n\t\t\t\"fa-f261\" => \"fa-gg-circle\",\n\t\t\t\"fa-f262\" => \"fa-tripadvisor\",\n\t\t\t\"fa-f263\" => \"fa-odnoklassniki\",\n\t\t\t\"fa-f264\" => \"fa-odnoklassniki-square\",\n\t\t\t\"fa-f265\" => \"fa-get-pocket\",\n\t\t\t\"fa-f266\" => \"fa-wikipedia-w\",\n\t\t\t\"fa-f267\" => \"fa-safari\",\n\t\t\t\"fa-f268\" => \"fa-chrome\",\n\t\t\t\"fa-f269\" => \"fa-firefox\",\n\t\t\t\"fa-f26a\" => \"fa-opera\",\n\t\t\t\"fa-f26b\" => \"fa-internet-explorer\",\n\t\t\t\"fa-f26c\" => \"fa-television\",\n\t\t\t\"fa-f26d\" => \"fa-contao\",\n\t\t\t\"fa-f26e\" => \"fa-500px\",\n\t\t\t\"fa-f270\" => \"fa-amazon\",\n\t\t\t\"fa-f271\" => \"fa-calendar-plus-o\",\n\t\t\t\"fa-f272\" => \"fa-calendar-minus-o\",\n\t\t\t\"fa-f273\" => \"fa-calendar-times-o\",\n\t\t\t\"fa-f274\" => \"fa-calendar-check-o\",\n\t\t\t\"fa-f275\" => \"fa-industry\",\n\t\t\t\"fa-f276\" => \"fa-map-pin\",\n\t\t\t\"fa-f277\" => \"fa-map-signs\",\n\t\t\t\"fa-f278\" => \"fa-map-o\",\n\t\t\t\"fa-f279\" => \"fa-map\",\n\t\t\t\"fa-f27a\" => \"fa-commenting\",\n\t\t\t\"fa-f27b\" => \"fa-commenting-o\",\n\t\t\t\"fa-f27c\" => \"fa-houzz\",\n\t\t\t\"fa-f27d\" => \"fa-vimeo\",\n\t\t\t\"fa-f27e\" => \"fa-black-tie\",\n\t\t\t\"fa-f280\" => \"fa-fonticons\",\n\t\t\t\"fa-f281\" => \"fa-reddit-alien\",\n\t\t\t\"fa-f282\" => \"fa-edge\",\n\t\t\t\"fa-f283\" => \"fa-credit-card-alt\",\n\t\t\t\"fa-f284\" => \"fa-codiepie\",\n\t\t\t\"fa-f285\" => \"fa-modx\",\n\t\t\t\"fa-f286\" => \"fa-fort-awesome\",\n\t\t\t\"fa-f287\" => \"fa-usb\",\n\t\t\t\"fa-f288\" => \"fa-product-hunt\",\n\t\t\t\"fa-f289\" => \"fa-mixcloud\",\n\t\t\t\"fa-f28a\" => \"fa-scribd\",\n\t\t\t\"fa-f28b\" => \"fa-pause-circle\",\n\t\t\t\"fa-f28c\" => \"fa-pause-circle-o\",\n\t\t\t\"fa-f28d\" => \"fa-stop-circle\",\n\t\t\t\"fa-f28e\" => \"fa-stop-circle-o\",\n\t\t\t\"fa-f290\" => \"fa-shopping-bag\",\n\t\t\t\"fa-f291\" => \"fa-shopping-basket\",\n\t\t\t\"fa-f292\" => \"fa-hashtag\",\n\t\t\t\"fa-f293\" => \"fa-bluetooth\"\n\t\t);\n\n\t\t$icons = apply_filters( \"megamenu_fontawesome_icons\", $icons );\n\n\t\treturn $icons;\n\n\t}", "function add_font_awesome() {\n\twp_enqueue_style( 'font-awesome', 'https://use.fontawesome.com/releases/v5.6.3/css/all.css' );\n}", "function icon ($icon = null);", "function widget_dev_register_social_icons_widget() {\r\n\tregister_widget( 'widget_dev_Social_Icons_Widget' );\r\n}", "function font_awesome() {\n\t\twp_enqueue_style('fontawesome', 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css');\n\t}", "function jet_engine_icon_html( $value = null ) {\n\n\t$format = apply_filters(\n\t\t'jet-engine/listings/icon-html-format',\n\t\t'<i class=\"fa %s\"></i>'\n\t);\n\n\treturn sprintf( $format, $value );\n\n}", "public function icon_attr( $atts ) {\n\t\t$index = $atts['index'];\n\t\treturn array(\n\t\t\t'class' => 'fa fontawesome-icon ' . FusionBuilder::font_awesome_name_handler( $this->tabs[ $index ]['icon'] ),\n\t\t);\n\t}", "function loadFontAwesome(){\n wp_enqueue_style(\"fontawesome\", 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css');\n}", "function gvf_print_icon( $icon, $args = array() ) {\n\n gvf_get_template( 'icon-'.$icon.'.php', $args, 'images/icons' );\n}", "function ut_icon_map( $atts, $content = null ) {\n\textract(shortcode_atts(array(\n\t\t\"color\" => '#'\n\t), $atts));\n return '<span class=\"uticon icon-map '.$color.'\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M17.492 15.432c-.433 0-.855-.087-1.253-.259l.467-1.082c.25.107.514.162.786.162.222 0 .441-.037.651-.11l.388 1.112c-.334.118-.683.177-1.039.177zm-10.922-.022c-.373 0-.741-.066-1.093-.195l.407-1.105c.221.081.451.122.686.122.26 0 .514-.05.754-.148l.447 1.09c-.382.157-.786.236-1.201.236zm8.67-.783l-1.659-.945.583-1.024 1.66.945-.584 1.024zm-6.455-.02l-.605-1.011 1.639-.981.605 1.011-1.639.981zm3.918-1.408c-.243-.101-.5-.153-.764-.153-.23 0-.457.04-.674.119l-.401-1.108c.346-.125.708-.188 1.075-.188.42 0 .83.082 1.217.244l-.453 1.086zm7.327-.163c-.534 0-.968.433-.968.968 0 .535.434.968.968.968.535 0 .969-.434.969-.968 0-.535-.434-.968-.969-.968zm-16.061 0c-.535 0-.969.433-.969.968 0 .535.434.968.969.968s.969-.434.969-.968c0-.535-.434-.968-.969-.968zm18.031-.832v6.683l-4 2.479v-4.366h-1v4.141l-4-2.885v-3.256h-2v3.255l-4 2.885v-4.14h-1v4.365l-4-2.479v-13.294l4 2.479v3.929h1v-3.927l4-2.886v4.813h2v-4.813l1.577 1.138c-.339-.701-.577-1.518-.577-2.524l.019-.345-2.019-1.456-5.545 4-6.455-4v18l6.455 4 5.545-4 5.545 4 6.455-4v-11.618l-.039.047c-.831.982-1.614 1.918-1.961 3.775zm2-8.403c0-2.099-1.9-3.801-4-3.801s-4 1.702-4 3.801c0 3.121 3.188 3.451 4 8.199.812-4.748 4-5.078 4-8.199zm-5.5.199c0-.829.672-1.5 1.5-1.5s1.5.671 1.5 1.5-.672 1.5-1.5 1.5-1.5-.671-1.5-1.5zm-.548 8c-.212-.992-.547-1.724-.952-2.334v2.334h.952z\"/></svg>' . do_shortcode($content) . '</span> ';\n}", "function icono_reg_uso($cantidad){\n $cantidad=trim($cantidad);\n if($cantidad==0){\n return '<i class=\"fa fa-lock-open text-success\" aria-hidden=\"true\" title=\"Registro sin uso ('.$cantidad.') \"></i>';\n }else{\n return '<i class=\"fa fa-lock text-secondary\" aria-hidden=\"true\" title=\"Registro en uso ('.$cantidad.')\"></i>';\n }\n}", "public function icon($name, $prefix = 'fas fa-'){\n return \"<i class='{$prefix}{$name}'></i>\";\n }", "function ut_icon_arrow_up( $atts, $content = null ) {\n\textract(shortcode_atts(array(\n\t\t\"color\" => '#'\n\t), $atts));\n return '<span class=\"uticon icon-arrow-up '.$color.'\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M0 16.67l2.829 2.83 9.175-9.339 9.167 9.339 2.829-2.83-11.996-12.17z\"/></svg>' . do_shortcode($content) . '</span> ';\n}", "public function getIcon(){\r\n $icons = [\r\n 'delete' => 'times',\r\n 'add' => 'plus',\r\n 'back' => 'step-backward',\r\n 'reset' => 'refresh',\r\n 'duplicate' => 'copy',\r\n 'confirm' => 'check',\r\n 'save' => 'save',\r\n 'deliver' => 'truck',\r\n ];\r\n\r\n if(isset($icons[$this->getType()]))\r\n return 'fa-'.$icons[$this->getType()];\r\n elseif(isset($icons[$this->getName()]))\r\n return 'fa-'.$icons[$this->getName()];\r\n else\r\n return 'fa-'.$this->getName();\r\n }", "public function loadFileTypeIcon() {\r\n parent::afterFind();\r\n if ($this->filetype == 'dir'){\r\n $this->icon = 'dir-icon';\r\n }else{\r\n // TODO: load confing\r\n $this->icon = 'file-icon';\r\n }\r\n //$this->attributes['icon'] = $this->icon;\r\n //Shared::debug($this->icon);\r\n }", "function my_custom_icon_about_widget () {\n return 'user';\n}", "function picassopro_fontawesome(){\n wp_enqueue_style('font-awesome', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css'); \n}", "protected function initIcon($type)\n {\n $prop = $type . 'ArrowStyle';\n if (!isset($this->pluginOptions[$prop])) {\n $prefix = !$this->isBs(3) ? 'fas fa-' : 'glyphicon glyphicon-';\n $this->pluginOptions[$prop] = $prefix . 'chevron-' . $type;\n }\n }", "function redux_queue_font_awesome() {\n wp_register_style( 'fontawesome', get_template_directory_uri() . '/assets/css/fontawesome.css', array(), time(), 'all' );\n wp_enqueue_style( 'fontawesome' );\n}", "function icono($file,$title,$width = '24px',$height = false,$extra = false,$alt = false,$echo = false) \n {\n if (!$alt)\n $alt = $title;\n if (!$height)\n $height = $width;\n $URL = URL_IMG.\"icons/$file\";\n $img = <<<____IMG\n <img src=\"$URL\" width=\"$width\" height=\"$height\" alt=\"$alt\" title=\"$title\" $extra />\n____IMG;\n if ($echo)\n echo $img;\n else\n return $img;\n return;\n }", "public function get_icon() {\n return 'fa fa-code';\n }", "public function render($name, $value = null, $attributes = array(), $errors = array())\n {\n if ($value)\n {\n return sprintf('<span class=\"ui-icon %s\"></span>', $this->getOption('icon'));\n }\n }", "function icon_text_function( $atts ) {\n\t$output = '';\n\t$array = shortcode_atts( array(\n 'icon' => '',\n 'text' => '',\n ), $atts );\n\treturn sprintf('<span class=\"rkt_icon_text\">\n\t\t\t\t\t <i class=\"%s\"> </i> %s\n\t\t\t\t\t</span>',$array['icon'],$array['text']);\n}", "function cyon_inline_icon( $atts, $content = null ) {\n\t$atts = shortcode_atts(\n\t\tarray(\n\t\t\telement\t\t=> 'span',\n\t\t\tclassname\t=> '',\n\t\t\turl\t\t\t=> '',\n\t\t\ttitle\t\t=> '',\n\t\t\ticon\t\t=> '',\n\t\t\tsize\t\t=> ''\n\t\t), $atts);\n\t$classname = '';\n\tif($atts['size']=='large'){\n\t\t$classname .= 'has-icon2x';\n\t\t$iconsize = '2x';\n\t}else{\n\t\t$classname .= 'has-icon';\n\t\t$iconsize = '';\n\t}\n\t$element = $atts['element'];\n\tif($atts['classname']){\n\t\t$classname .= ' '.$atts['classname'];\n\t}\n\t$title = '';\n\tif($atts['title']){\n\t\t$classname .= ' hastip';\n\t\t$title = ' title=\"'. $atts['title'] . '\"';\n\t}\n\t$url = '';\n\tif($atts['url'] || $atts['element']=='a'){\n\t\t$url = ' href=\"'. $atts['url'] . '\"';\n\t\t$element = 'a';\n\t}\n\tif($atts['icon']=='' && ($atts['url'] || $atts['element']=='a')){\n\t\t$icon = 'icon'.$iconsize.'-share';\n\t\t$element = 'a';\n\t}elseif($atts['icon']==''){\n\t\t$icon = 'icon'.$iconsize.'-question-sign';\n\t}else{\n\t\t$icon = 'icon'.$iconsize.'-'.$atts['icon'];\n\t}\n\t$html = '<'.$element.' class=\"'.$classname.'\"'.$title.$url.'><span class=\"'.$icon.'\"></span> ' . $content . '</'.$element.'>';\n\treturn $html;\n}", "public function ui_icon($icon, $width, $height, $dir='images/ui/', $id=\"ui-icon\")\n\t\t\t{\n\t\t\t\t// Construct an instyle\n\t\t\t\t$instyle = 'style=\"width:'.$width.'px; height:'.$height.'px; background:url('.$dir.$icon.')\"';\n\n\t\t\t\t// return to the caller\n\t\t\t\treturn '<div id=\"'.$id.'\" class=\"ui-icon\" '.$instyle.'></div>';\n\t\t\t}", "protected function buildIcon($attributes)\n {\n return '<i '.$attributes.'></i>';\n }", "function identity_social_icon( $atts, $content = null ) {\r\n\textract(shortcode_atts(array('link' => '' , 'socialicon' => ''), $atts));\r\n\t\t\t\r\n\t$return_string = '<div class=\"social-icon\">\r\n\t\t\t\t\t\t\t<a target=\"_blank\" href=\"' . esc_url($link) . '\"><i class=\"fa fa-' . $socialicon . ' fa-3x\"></i></a>\r\n\t\t\t\t\t\t</div>';\r\n\t\r\n\treturn $return_string;\t\r\n}", "function getIcons($data){\r $codeIcon = 'img/icons/'.$data.'.png';\r return '<img src=\"'.$codeIcon.'\">';\r }", "public function addonIcon(string $icon, array $options = []): string\n {\n $prefix = Arr::get($options, 'prefix', $this->getIconPrefix());\n\n return '<div class=\"input-group-addon\"><span ' . $this->html->attributes($options) . '><i class=\"' . $prefix . $icon . '\"></i></span></div>';\n }", "function show_sidebar_icon($icon){\n\tswitch($icon){\n\t\tcase 'home':\n\t\t\treturn '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" class=\"sidebar_icon\">\n\t\t\t\t\t<path d=\"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z\"></path>\n\t\t\t\t\t<polyline points=\"9 22 9 12 15 12 15 22\"></polyline>\n\t\t\t\t</svg>';\n\t\tcase 'paper':\n\t\t\treturn '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" class=\"sidebar_icon\">\n\t\t\t\t\t<path d=\"M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z\"></path>\n\t\t\t\t\t<polyline points=\"13 2 13 9 20 9\"></polyline>\n\t\t\t\t</svg>';\n\t\tcase 'bar_chart':\n\t\t\treturn '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" class=\"sidebar_icon\">\n\t\t\t\t\t\t\t<line x1=\"18\" y1=\"20\" x2=\"18\" y2=\"10\"></line>\n\t\t\t\t\t\t\t<line x1=\"12\" y1=\"20\" x2=\"12\" y2=\"4\"></line>\n\t\t\t\t\t\t\t<line x1=\"6\" y1=\"20\" x2=\"6\" y2=\"14\"></line>\n\t\t\t\t\t\t</svg>';\n\t\tcase 'pie_chart':\n\t\t\treturn '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" class=\"sidebar_icon\">\n\t\t\t\t\t\t\t\t<path d=\"M21.21 15.89A10 10 0 1 1 8 2.83\"></path>\n\t\t\t\t\t\t\t\t<path d=\"M22 12A10 10 0 0 0 12 2v10z\"></path>\n\t\t\t\t\t\t\t</svg>';\n\t\tcase 'document':\n\t\t\treturn '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" class=\"sidebar_icon\">\n\t\t\t\t\t\t\t\t<path d=\"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z\"></path>\n\t\t\t\t\t\t\t\t<polyline points=\"14 2 14 8 20 8\"></polyline>\n\t\t\t\t\t\t\t\t<line x1=\"16\" y1=\"13\" x2=\"8\" y2=\"13\"></line>\n\t\t\t\t\t\t\t\t<line x1=\"16\" y1=\"17\" x2=\"8\" y2=\"17\"></line>\n\t\t\t\t\t\t\t\t<polyline points=\"10 9 9 9 8 9\"></polyline>\n\t\t\t\t\t\t\t</svg>';\n\t\tcase 'envelope':\n\t\t\treturn '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" class=\"sidebar_icon\">\n\t\t\t\t\t\t\t<path d=\"M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z\"></path>\n\t\t\t\t\t\t\t<polyline points=\"22,6 12,13 2,6\"></polyline>\n\t\t\t\t\t\t\t</svg>';\n case 'setting':\n\t\t\treturn '<svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"sidebar_icon\"><circle cx=\"12\" cy=\"12\" r=\"3\"></circle><path d=\"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z\"></path></svg>';\n \n\t\tcase 'sign_out':\n\t\t\treturn '<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" class=\"sidebar_icon\">\n\t\t\t\t\t\t\t<path d=\"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4\"/>\n\t\t\t\t\t\t\t<polyline points=\"16 17 21 12 16 7\"/>\n\t\t\t\t\t\t\t<line x1=\"21\" y1=\"12\" x2=\"9\" y2=\"12\"/>\n\t\t\t\t\t\t\t</svg>';\n\t\tdefault:\n\t\t\treturn false;\n\t}\n}", "function icon_shortcode_handler($atts){\n switch ($atts['img']) {\n case \"tip\":\n $output = \"<img src=\\\"/wp-content/plugins/recipe-icons/img/Tip.gif\\\" alt=\\\"!\\\" width=\\\"17\\\" height=\\\"21\\\">\";\n break;\n case \"warning\":\n $output = \"<img src=\\\"/wp-content/plugins/recipe-icons/img/Becareful.gif\\\" alt=\\\"!\\\" width=\\\"17\\\" height=\\\"21\\\">\";\n break;\n case \"serve\":\n $nb = $atts['nb'];\n $output = str_repeat(\"<img src=\\\"/wp-content/plugins/recipe-icons/img/serve.gif\\\" alt=\\\"serve\\\" width=\\\"19\\\" height=\\\"19\\\">\",$nb);\n break;\n case \"star\":\n $nb = $atts['nb'];\n $output = str_repeat(\"<img src=\\\"/wp-content/plugins/recipe-icons/img/star.gif\\\" alt=\\\"Star\\\" width=\\\"14\\\" height=\\\"14\\\">\",$nb);\n break; \n }\n return $output;\n}", "public function get_icon() {\r\n return 'fas fa-file-code';\r\n }", "function markup() {\n $output = '<hr />';\n $output .= '<h3><i class=\"' . $this->full_icon_class($this->example_icon) . '\"></i> ' . $this->name . '</h3>';\n $output .= '<div class=\"puzzle-icon-choices-container\">';\n \n foreach ($this->icons as $icon) {\n $output .= '<button class=\"puzzle-icon-choice\"><i class=\"' . $this->full_icon_class($icon) . '\"></i>' . ppb_humanize($icon) . '</button>';\n }\n \n $output .= '</div>';\n \n return $output;\n }", "function theme_helper_picker_icon_content() {\n $icons = array(\n 'Web Application Icons' => array(\n 'fa-address-book','fa-address-book-o','fa-address-card','fa-address-card-o','fa-adjust','fa-american-sign-language-interpreting','fa-anchor','fa-archive','fa-area-chart','fa-arrows','fa-arrows-v','fa-asl-interpreting','fa-assistive-listening-systems','fa-asterisk','fa-at','fa-audio-description','fa-automobile','fa-balance-scale','fa-ban','fa-bank','fa-bar-chart','fa-bar-chart-o','fa-barcode','fa-bars','fa-bath','fa-bathtub','fa-battery','fa-battery-0','fa-battery-1','fa-battery-2','fa-battery-3','fa-battery-4','fa-battery-empty','fa-battery-full','fa-battery-half','fa-battery-quarter','fa-battery-three-quarters','fa-bed','fa-beer','fa-bell','fa-bell-o','fa-bell-slash','fa-bell-slash-o','fa-bicycle','fa-binoculars','fa-birthday-cake','fa-blind','fa-bluetooth','fa-bluetooth-b','fa-bolt','fa-bomb','fa-book','fa-bookmark','fa-bookmark-o','fa-braille','fa-briefcase','fa-bug','fa-building','fa-building-o','fa-bullhorn','fa-bullseye','fa-bus','fa-cab','fa-calculator','fa-calendar','fa-calendar-check-o','fa-calendar-minus-o','fa-calendar-o','fa-calendar-plus-o','fa-calendar-times-o','fa-camera','fa-camera-retro','fa-car','fa-caret-square-o-down','fa-caret-square-o-left','fa-caret-square-o-right','fa-caret-square-o-up','fa-cart-arrow-down','fa-cart-plus','fa-cc','fa-certificate','fa-check','fa-check-circle','fa-check-circle-o','fa-check-square','fa-check-square-o','fa-child','fa-circle','fa-circle-o','fa-circle-o-notch','fa-circle-thin','fa-clock-o','fa-clone','fa-close','fa-cloud','fa-cloud-download','fa-cloud-upload','fa-code','fa-code-fork','fa-coffee','fa-cog','fa-cogs','fa-comment','fa-comment-o','fa-commenting','fa-commenting-o','fa-comments','fa-comments-o','fa-compass','fa-copyright','fa-creative-commons','fa-credit-card','fa-credit-card-alt','fa-crop','fa-crosshairs','fa-cube','fa-cubes','fa-cutlery','fa-dashboard','fa-database','fa-deaf','fa-deafness','fa-desktop','fa-diamond','fa-dot-circle-o','fa-download','fa-drivers-license-o','fa-edit','fa-ellipsis-h','fa-ellipsis-v','fa-envelope','fa-envelope-o','fa-envelope-open','fa-envelope-open-o','fa-envelope-square','fa-eraser','fa-exchange','fa-exclamation','fa-exclamation-circle','fa-exclamation-triangle','fa-external-link','fa-external-link-square','fa-eye','fa-eye-slash','fa-eyedropper','fa-fax','fa-feed','fa-female','fa-fighter-jet','fa-file-archive-o','fa-file-audio-o','fa-file-code-o','fa-file-excel-o','fa-file-image-o','fa-file-movie-o','fa-file-pdf-o','fa-file-photo-o','fa-file-picture-o','fa-file-powerpoint-o','fa-file-sound-o','fa-file-video-o','fa-file-word-o','fa-file-zip-o','fa-film','fa-filter','fa-fire','fa-fire-extinguisher','fa-flag','fa-flag-checkered','fa-flag-o','fa-flash','fa-flask','fa-folder','fa-folder-o','fa-folder-open','fa-folder-open-o','fa-frown-o','fa-futbol-o','fa-gamepad','fa-gavel','fa-gear','fa-gears','fa-gift','fa-glass','fa-globe','fa-graduation-cap','fa-group','fa-hand-grab-o','fa-hand-lizard-o','fa-hand-paper-o','fa-hand-peace-o','fa-hand-pointer-o','fa-hand-rock-o','fa-hand-scissors-o','fa-hand-spock-o','fa-hand-stop-o','fa-handshake-o','fa-hard-of-hearing','fa-hashtag','fa-hdd-o','fa-headphones','fa-heart','fa-heart-o','fa-heartbeat','fa-history','fa-home','fa-hotel','fa-hourglass','fa-hourglass-1','fa-hourglass-2','fa-hourglass-3','fa-hourglass-end','fa-hourglass-half','fa-hourglass-o','fa-hourglass-start','fa-i-cursor','fa-id-badge','fa-id-card','fa-id-card-o','fa-image','fa-inbox','fa-industry','fa-info','fa-info-circle','fa-institution','fa-key','fa-keyboard-o','fa-language','fa-laptop','fa-leaf','fa-legal','fa-lemon-o','fa-level-down','fa-level-up','fa-life-bouy','fa-life-buoy','fa-life-ring','fa-life-saver','fa-lightbulb-o','fa-line-chart','fa-location-arrow','fa-lock','fa-low-vision','fa-magic','fa-magnet','fa-mail-forward','fa-mail-reply','fa-mail-reply-all','fa-male','fa-map','fa-map-marker','fa-map-o','fa-map-pin','fa-map-signs','fa-meh-o','fa-microchip','fa-microphone','fa-microphone-slash','fa-minus','fa-minus-circle','fa-minus-square','fa-minus-square-o','fa-mobile','fa-mobile-phone','fa-money','fa-moon-o','fa-mortar-board','fa-motorcycle','fa-mouse-pointer','fa-music','fa-navicon','fa-newspaper-o','fa-object-group','fa-object-ungroup','fa-paint-brush','fa-paper-plane','fa-paper-plane-o','fa-paw','fa-pencil','fa-pencil-square','fa-pencil-square-o','fa-percent','fa-phone','fa-phone-square','fa-photo','fa-picture-o','fa-pie-chart','fa-plane','fa-plug','fa-plus','fa-plus-circle','fa-plus-square','fa-plus-square-o','fa-podcast','fa-power-off','fa-print','fa-puzzle-piece','fa-qrcode','fa-question','fa-question-circle','fa-question-circle-o','fa-quote-left','fa-quote-right','fa-random','fa-recycle','fa-refresh','fa-registered','fa-remove','fa-reorder','fa-reply','fa-reply-all','fa-retweet','fa-road','fa-rocket','fa-rss','fa-rss-square','fa-s15','fa-search','fa-search-minus','fa-search-plus','fa-send','fa-send-o','fa-server','fa-share','fa-share-alt','fa-share-alt-square','fa-share-square','fa-share-square-o','fa-shield','fa-ship','fa-shopping-bag','fa-shopping-basket','fa-shopping-cart','fa-shower','fa-sign-in','fa-sign-language','fa-sign-out','fa-signal','fa-signing','fa-sitemap','fa-sliders','fa-smile-o','fa-snowflake-o','fa-soccer-ball-o','fa-sort','fa-sort-alpha-asc','fa-sort-alpha-desc','fa-sort-amount-asc','fa-sort-amount-desc','fa-sort-asc','fa-sort-desc','fa-sort-down','fa-sort-numeric-asc','fa-sort-numeric-desc','fa-sort-up','fa-space-shuttle','fa-spinner','fa-spoon','fa-square','fa-square-o','fa-star','fa-star-half','fa-star-half-empty','fa-star-half-full','fa-star-half-o','fa-star-o','fa-sticky-note','fa-sticky-note-o','fa-street-view','fa-suitcase','fa-sun-o','fa-support','fa-tablet','fa-tachometer','fa-tag','fa-tags','fa-tasks','fa-taxi','fa-television','fa-terminal','fa-thermometer','fa-thermometer-0','fa-thermometer-1','fa-thermometer-2','fa-thermometer-3','fa-thermometer-4','fa-thermometer-empty','fa-thermometer-full','fa-thermometer-half','fa-thermometer-quarter','fa-thermometer-three-quarters','fa-thumb-tack','fa-thumbs-down','fa-thumbs-o-down','fa-thumbs-o-up','fa-thumbs-up','fa-ticket','fa-times','fa-times-circle','fa-times-circle-o','fa-times-rectangle','fa-times-rectangle-o','fa-tint','fa-toggle-down','fa-toggle-left','fa-toggle-off','fa-toggle-on','fa-toggle-right','fa-toggle-up','fa-trademark','fa-trash','fa-trash-o','fa-tree','fa-trophy','fa-truck','fa-tty','fa-tv','fa-umbrella','fa-universal-access','fa-university','fa-unlock','fa-unlock-alt','fa-unsorted','fa-upload','fa-user','fa-user-circle','fa-user-circle-o','fa-user-o','fa-user-plus','fa-user-secret','fa-user-times','fa-users','fa-vcard','fa-vcard-o','fa-video-camera','fa-volume-control-phone','fa-volume-down','fa-volume-off','fa-volume-up','fa-warning','fa-wheelchair','fa-wheelchair-alt','fa-wifi','fa-window-close','fa-window-close-o','fa-window-maximize','fa-window-minimize','fa-window-restore','fa fa-wrench',\n ),\n 'Accessibility Icons' => array(\n 'fa-american-sign-language-interpreting','fa-asl-interpreting','fa-assistive-listening-systems','fa-audio-description','fa-blind','fa-braille','fa-cc','fa-deaf','fa-deafness','fa-hard-of-hearing','fa-low-vision','fa-question-circle-o','fa-sign-language','fa-signing','fa-tty','fa-universal-access','fa-volume-control-phone','fa-wheelchair','fa-wheelchair-alt',\n ),\n 'Hand Icons' => array(\n 'fa-hand-grab-o','fa-hand-lizard-o','fa-hand-o-down','fa-hand-o-left','fa-hand-o-right','fa-hand-o-up','fa-hand-paper-o','fa-hand-peace-o','fa-hand-pointer-o','fa-hand-rock-o','fa-hand-scissors-o','fa-hand-spock-o','fa-hand-stop-o','fa-thumbs-down','fa-thumbs-o-down','fa-thumbs-o-up','fa-thumbs-up',\n ),\n 'Transportation Icons' => array(\n 'fa-ambulance','fa-automobile','fa-bicycle','fa-bus','fa-cab','fa-car','fa-fighter-jet','fa-motorcycle','fa-plane','fa-rocket','fa-ship','fa-space-shuttle','fa-subway','fa-taxi','fa-train','fa-truck','fa-wheelchair','fa-wheelchair-alt',\n ),\n 'Gender Icons' => array(\n 'fa-genderless','fa-intersex','fa-mars','fa-mars-double','fa-mars-stroke','fa-mars-stroke-h','fa-mars-stroke-v','fa-mercury','fa-neuter','fa-transgender','fa-transgender-alt','fa-venus','fa-venus-double','fa-venus-mars',\n ),\n 'File Type Icons' => array(\n 'fa-file','fa-file-archive-o','fa-file-audio-o','fa-file-code-o','fa-file-excel-o','fa-file-image-o','fa-file-movie-o','fa-file-o','fa-file-pdf-o','fa-file-photo-o','fa-file-picture-o','fa-file-powerpoint-o','fa-file-sound-o','fa-file-text','fa-file-text-o','fa-file-video-o','fa-file-word-o','fa-file-zip-o',\n ),\n 'Spinner Icons' => array(\n 'fa-circle-o-notch','fa-cog','fa-gear','fa-refresh','fa fa-spinner',\n ),\n 'Form Control Icons' => array(\n 'fa-check-square','fa-check-square-o','fa-circle','fa-circle-o','fa-dot-circle-o','fa-minus-square','fa-minus-square-o','fa-plus-square','fa-plus-square-o','fa-square','fa-square-o',\n ),\n 'Payment Icons' => array(\n 'fa-cc-amex','fa-cc-diners-club','fa-cc-discover','fa-cc-jcb','fa-cc-mastercard','fa-cc-paypal','fa-cc-stripe','fa-cc-visa','fa-credit-card','fa-credit-card-alt','fa-google-wallet','fa fa-paypal',\n ),\n 'Chart Icons' => array(\n 'fa-area-chart','fa-bar-chart','fa-bar-chart-o','fa-line-chart','fa-pie-chart',\n ),\n 'Currency Icons' => array(\n 'fa-bitcoin','fa-btc','fa-cny','fa-dollar','fa-eur','fa-euro','fa-gbp','fa-gg','fa-gg-circle','fa-ils','fa-inr','fa-jpy','fa-krw','fa-money','fa-rmb','fa-rouble','fa-rub','fa-ruble','fa-rupee','fa-shekel','fa-sheqel','fa-try','fa-turkish-lira','fa-usd','fa-won','fa-yen',\n ),\n 'Text Editor Icons' => array(\n 'fa-align-center','fa-align-justify','fa-align-left','fa-align-right','fa-bold','fa-chain','fa-chain-broken','fa-clipboard','fa-columns','fa-copy','fa-cut','fa-dedent','fa-eraser','fa-file','fa-file-o','fa-file-text','fa-file-text-o','fa-files-o','fa-floppy-o','fa-font','fa-header','fa-indent','fa-italic','fa-link','fa-list','fa-list-alt','fa-list-ol','fa-list-ul','fa-outdent','fa-paperclip','fa-paragraph','fa-paste','fa-repeat','fa-rotate-left','fa-rotate-right','fa-save','fa-scissors','fa-strikethrough','fa-subscript','fa-superscript','fa-table','fa-text-height','fa-text-width','fa-th','fa-th-large','fa-th-list','fa-underline','fa-undo','fa fa-unlink',\n ),\n 'Directional Icons' => array(\n 'fa-angle-double-down','fa-angle-double-left','fa-angle-double-right','fa-angle-double-up','fa-angle-down','fa-angle-left','fa-angle-right','fa-angle-up','fa-arrow-circle-down','fa-arrow-circle-left','fa-arrow-circle-o-down','fa-arrow-circle-o-left','fa-arrow-circle-o-right','fa-arrow-circle-o-up','fa-arrow-circle-right','fa-arrow-circle-up','fa-arrow-down','fa-arrow-left','fa-arrow-right','fa-arrow-up','fa-arrows','fa-arrows-alt','fa-arrows-h','fa-arrows-v','fa-caret-down','fa-caret-left','fa-caret-right','fa-caret-square-o-down','fa-caret-square-o-left','fa-caret-square-o-right','fa-caret-square-o-up','fa-caret-up','fa-chevron-circle-down','fa-chevron-circle-left','fa-chevron-circle-right','fa-chevron-circle-up','fa-chevron-down','fa-chevron-left','fa-chevron-right','fa-chevron-up','fa-exchange','fa-hand-o-down','fa-hand-o-left','fa-hand-o-right','fa-hand-o-up','fa-long-arrow-down','fa-long-arrow-left','fa-long-arrow-right','fa-long-arrow-up','fa-toggle-down','fa-toggle-left','fa-toggle-right','fa-toggle-up',\n ),\n 'Video Player Icons' => array(\n 'fa-arrows-alt','fa-backward','fa-compress','fa-eject','fa-expand','fa-fast-backward','fa-fast-forward','fa-forward','fa-pause','fa-pause-circle','fa-pause-circle-o','fa-play','fa-play-circle','fa-play-circle-o','fa-random','fa-step-backward','fa-step-forward','fa-stop','fa-stop-circle','fa-stop-circle-o','fa-youtube-play',\n ),\n 'Brand Icons' => array(\n 'fa-500px','fa-adn','fa-amazon','fa-android','fa-angellist','fa-apple','fa-bandcamp','fa-behance','fa-behance-square','fa-bitbucket','fa-bitbucket-square','fa-bitcoin','fa-black-tie','fa-bluetooth','fa-bluetooth-b','fa-btc','fa-buysellads','fa-cc-amex','fa-cc-diners-club','fa-cc-discover','fa-cc-jcb','fa-cc-mastercard','fa-cc-paypal','fa-cc-stripe','fa-cc-visa','fa-chrome','fa-codepen','fa-codiepie','fa-connectdevelop','fa-contao','fa-css3','fa-dashcube','fa-delicious','fa-deviantart','fa-digg','fa-dribbble','fa-dropbox','fa-drupal','fa-edge','fa-eercast','fa-empire','fa-envira','fa-etsy','fa-expeditedssl','fa-fa','fa-facebook','fa-facebook-f','fa-facebook-official','fa-facebook-square','fa-firefox','fa-first-order','fa-flickr','fa-font-awesome','fa-fonticons','fa-fort-awesome','fa-forumbee','fa-foursquare','fa-free-code-camp','fa-ge','fa-get-pocket','fa-gg','fa-gg-circle','fa-git','fa-git-square','fa-github','fa-github-alt','fa-github-square','fa-gitlab','fa-gittip','fa-glide','fa-glide-g','fa-google','fa-google-plus','fa-google-plus-circle','fa-google-plus-official','fa-google-plus-square','fa-google-wallet','fa-gratipay','fa-grav','fa-hacker-news','fa-houzz','fa-html5','fa-imdb','fa-instagram','fa-internet-explorer','fa-ioxhost','fa-joomla','fa-jsfiddle','fa-lastfm','fa-lastfm-square','fa-leanpub','fa-linkedin','fa-linkedin-square','fa-linode','fa-linux','fa-maxcdn','fa-meanpath','fa-medium','fa-meetup','fa-mixcloud','fa-modx','fa-odnoklassniki','fa-odnoklassniki-square','fa-opencart','fa-openid','fa-opera','fa-optin-monster','fa-pagelines','fa-paypal','fa-pied-piper','fa-pied-piper-alt','fa-pied-piper-pp','fa-pinterest','fa-pinterest-p','fa-pinterest-square','fa-product-hunt','fa-qq','fa-quora','fa-ra','fa-ravelry','fa-rebel','fa-reddit','fa-reddit-alien','fa-reddit-square','fa-renren','fa-resistance','fa-safari','fa-scribd','fa-sellsy','fa-share-alt','fa-share-alt-square','fa-shirtsinbulk','fa-simplybuilt','fa-skyatlas','fa-skype','fa-slack','fa-slideshare','fa-snapchat','fa-snapchat-ghost','fa-snapchat-square','fa-soundcloud','fa-spotify','fa-stack-exchange','fa-stack-overflow','fa-steam','fa-steam-square','fa-stumbleupon','fa-stumbleupon-circle','fa-superpowers','fa-telegram','fa-tencent-weibo','fa-themeisle','fa-trello','fa-tripadvisor','fa-tumblr','fa-tumblr-square','fa-twitch','fa-twitter','fa-twitter-square','fa-usb','fa-viacoin','fa-viadeo','fa-viadeo-square','fa-vimeo','fa-vimeo-square','fa-vine','fa-vk','fa-wechat','fa-weibo','fa-weixin','fa-whatsapp','fa-wikipedia-w','fa-windows','fa-wordpress','fa-wpbeginner','fa-wpexplorer','fa-wpforms','fa-xing','fa-xing-square','fa-y-combinator','fa-y-combinator-square','fa-yahoo','fa-yc','fa-yc-square','fa-yelp','fa-yoast','fa-youtube','fa-youtube-play','fa fa-youtube-square',\n ),\n 'Medical Icons' => array(\n 'fa-ambulance','fa-h-square','fa-heart','fa-heart-o','fa-heartbeat','fa-hospital-o','fa-medkit','fa-plus-square','fa-stethoscope','fa-user-md','fa-wheelchair','fa-wheelchair-alt',\n ),\n );\n foreach( $icons as $group => $classes ) {\n echo '<span class=\"icone-section-title\">'.$group.'</span>';\n foreach( $classes as $classe ) {\n echo '<div data-value=\"fa '.$classe.'\"><i class=\"fa '.$classe.'\"></i></div>';\n } \n }\n}", "public function isIconsEnabled();", "public function setIcon($value);", "function atto_templates4u_get_fontawesome_icon_map() {\n return [\n 'atto_templates4u:icon' => 'fa-wpforms'\n ];\n}", "public function createIcon($iconName, $options=[])\n\t{\n\t\t//replace icon name if necessary\n\t\t$iconName = $this->replaceIconName($iconName);\n\n\t\t//create the actual icon\n\t\tif (is_callable($this->createIconCallback)) {\n\t\t\treturn call_user_func($this->createIconCallback, $iconName, $options);\n\t\t} else {\n\t\t\tif ($this->hasExtFa5) {\n\t\t\t\t$fa5Class = 'FAS';\n\t\t\t\tif (preg_match('/^fa[srlb]-/', $iconName)) {\n\t\t\t\t\t$fa5Class = strtoupper(substr($iconName, 0, 3));\n\t\t\t\t\t$iconName = substr($iconName, 4);\n\t\t\t\t} else if (isset(static::$FA_SHIMS[$iconName])) {\n\t\t\t\t\t$shimData = static::$FA_SHIMS[$iconName];\n\t\t\t\t\tif ($shimData[0] !== null) $fa5Class = strtoupper($shimData[0]);\n\t\t\t\t\tif ($shimData[1] !== null) $iconName = $shimData[1];\n\t\t\t\t}\n\n\t\t\t\treturn call_user_func(['rmrevin\\yii\\fontawesome\\\\' . $fa5Class, 'icon'], $iconName, $options);\n\t\t\t} else if ($this->hasExtFa4) {\n\t\t\t\treturn call_user_func(['rmrevin\\yii\\fontawesome\\FA', 'icon'], $iconName, $options);\n\t\t\t} else {\n\t\t\t\tHtml::addCssClass($options, 'glyphicon');\n\t\t\t\tHtml::addCssClass($options, 'glyphicon-' . $iconName);\n\t\t\t\treturn Html::tag('span', '', $options);\n\t\t\t}\n\t\t}\n\t}", "function my_custom_icon_register () {\n return 'user';\n}", "function identity_homepage_icons_section($atts, $content = null){\r\n\textract(shortcode_atts(array('icon' => 'icon-mobile','animationtype' => '','circle' => '' ,'title' => 'Title Goes Here', 'text' => 'Content and Text goes here'), $atts));\r\n\t\r\n\tif($circle == 'circle'){$circleClass = 'icon-circular';} else {$circleClass = 'icon-box';}\r\n\t\r\n\treturn '<div class=\"feature-content text-center ' . $animationtype . '\">\r\n\t\t<div class=\"' . $circleClass . '\">\r\n\t\t\t<i class=\"fa fa-' . $icon . ' fa-5x\"></i>\r\n\t\t</div>\r\n\t\t<h4>' . esc_attr($title) . '</h4>\r\n\t\t ' . esc_attr($text) .'\r\n\t</div>';\r\n}", "public static function widget_include(){\r\n $element = wfDocument::createHtmlElement('link', null, array('href' => '/plugin/davegandy/fontawesome450/css/font-awesome.css', 'rel' => 'stylesheet', 'id' => 'PluginDavegandyFontawesome450'));\r\n wfDocument::renderElement(array($element));\r\n }", "public function setIcon($icon)\n{\n$this->icon = $icon;\n\nreturn $this;\n}", "function post_type_icon_venue() {\n\techo '<style type=\"text/css\">\n\t\t\t#menu-posts-venue div.wp-menu-image:before {\n\t\t\t\tcontent: \"\\f19c\" !important;\n\t\t\t\tfont-family: \"FontAwesome\" !important;\n \t\t\t\tfont-size: 18px !important;\n\t\t\t}\n\t\t</style>';\n}", "public function useFontAwesome(string $id = null) {\n $this->head()->set((new ScriptSrc(\"https://kit.fontawesome.com/$id.js\"))\n ->setDefer(true));\n return $this;\n }", "public function run()\n {\n icons::insert([\n 'icons_name' => 'fa fa-address-book',\n 'icons_link' => 'South Dakota',\n 'icons_color' => 'f',\n 'icons_status' => 1,\n ]);\n\n }", "public function getIcon() {}", "public function getIconAttribute() {\n $icon = 'add';\n\n // Negative points (reward redemption)\n //if ($this->points < 0) $icon = 'remove';\n if ($this->points < 0) $icon = 'fas fa-gift';\n\n switch ($this->event) {\n case 'Sign up bonus': $icon = 'sentiment_satisfied_alt'; break;\n }\n return $icon;\n }", "public function icon($name)\n {\n return '<span class=\"glyphicon glyphicon-'.$name.'\"></span>';\n }" ]
[ "0.6148088", "0.6109923", "0.606604", "0.60266554", "0.6024111", "0.60229087", "0.6004468", "0.5938415", "0.5867488", "0.58541524", "0.58481514", "0.58276397", "0.5826917", "0.5813581", "0.57662684", "0.56982154", "0.567814", "0.56652313", "0.5663785", "0.56308585", "0.5616854", "0.5594023", "0.5578954", "0.55170697", "0.54856914", "0.5465179", "0.54095", "0.53953546", "0.53845024", "0.5383813", "0.5348286", "0.53381634", "0.53337276", "0.53331393", "0.5330022", "0.53131914", "0.5302851", "0.52865773", "0.5286238", "0.52797", "0.5279069", "0.5276833", "0.5268963", "0.5266367", "0.52623487", "0.5260624", "0.52588004", "0.5251585", "0.5245624", "0.52454185", "0.52415764", "0.5227948", "0.5219939", "0.52140564", "0.52097595", "0.5200178", "0.51969874", "0.51839894", "0.5179133", "0.51722264", "0.51689935", "0.51646394", "0.5152235", "0.5138477", "0.5138219", "0.5137446", "0.51307225", "0.5129525", "0.5128134", "0.51279116", "0.51273036", "0.5122498", "0.511584", "0.5112135", "0.51116085", "0.51112545", "0.5103936", "0.509837", "0.50843763", "0.50720024", "0.50709593", "0.5066034", "0.5060797", "0.50531954", "0.50490624", "0.504656", "0.5044356", "0.5040031", "0.50346696", "0.5023798", "0.5018996", "0.5018515", "0.5018514", "0.5014326", "0.5010844", "0.5005044", "0.5000053", "0.49941224", "0.49904308", "0.49878392" ]
0.70532095
0
Returns admin auth id, in this case email
Возвращает идентификатор администратора для аутентификации, в данном случае email
private function identity() { return $this->authService->getIdentity()->admin_email; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getAdminId()\n {\n return self::where('name', 'admin')->first()->id;\n }", "public function getAdminId()\n {\n return $this->_adminId;\n }", "public function getAdminId(): int\n {\n return $this->adminId;\n }", "function getAdminUserId() {\n\t\t$user = $_SESSION[\"loginUser\"];\n\t\treturn $user->getId();\n\t}", "public function getAdminId()\n\t{\n\t\t$temp = $this->application;\n\t\treturn $temp->adminId;\n\t}", "public function getAdminEmail(): string\n {\n return $this->authSession->getUser()->getEmail();\n }", "function get_user_id() {\n // not pretty but just a proof of concept\n return 1; // just hard code the admin for illustration\n }", "function get_authenticateadminID()\n\t{\t\t\n\t\t$CI =& get_instance();\n\t\treturn $CI->session->userdata('AdminId');\n\t}", "public function getAdminEmail()\n {\n return $this->adminEmail;\n }", "public function getIdAdmin()\n {\n return $this->idAdmin;\n }", "public function getId_admin()\n {\n return $this->id_admin;\n }", "public function id()\n {\n $admin_account_id = null;\n if (!$this->_hasCheckSum()) {\n return $admin_account_id;\n }\n $checkSum = \\Cookie::get(self::COOKIE_CHECKSUM);\n $admin_account_id = $this->_getRedisKey($checkSum.self::REDIS_ADMIN_ID);\n return $admin_account_id;\n }", "function getIdAdmin() {\n return $this->idAdmin;\n }", "public function getIdUsuarioAdmin () {\n\t\treturn $this->gu_usuario_admin_id;\n\t}", "private function getAdminId()\n {\n $user = User::whereProfileId(User::ADMIN_ID)->first();\n\n if (!$user) {\n throw new LogicException('El Sistema no tiene Administradores.');\n }\n\n return $user->id;\n }", "public function get_admin_provider_id() {\n $provider_id = get_option('pediodosonline_provider');\n if ($provider_id) {\n return $provider_id;\n }\n $options = get_option('pediodosonline_option_name');\n $result = $this->interface->request('api/users/login.json', 'post', array('email' => $options['email'], 'password' => $options['password']));\n if ($result->status == \"success\") {\n $token = $result->data->access_token;\n $data = array('access_token' => $token);\n $parameters = http_build_query($data);\n $user = $this->interface->request('api/users/getId.json?' . $parameters);\n if ($user->status == \"success\") {\n $id = $user->data->id;\n $result = $this->interface->request('api/users/get/' . $id . '.json?' . $parameters);\n if ($result->status == \"success\") {\n if (isset($result->data->Provider->id)) {\n update_option('pediodosonline_provider', $result->data->Provider->id);\n return $result->data->Provider->id;\n }\n } else {\n return 0;\n }\n }\n } else {\n echo '<h1>' . __('There is an error in the server of clipe or is not configured at administrator account on the backend of Worpress', 'clipe') . '</h1>';\n exit;\n }\n }", "public function getAuthId () {\n\t\treturn $this->getAuth()->uid;\n\t}", "public function getIdUsuarioAdmin () {\n\t\treturn $this->idUsuarioAdmin;\n\t}", "public function getAdminEmail() {\n $admin_email = '';\n $sql = \"SELECT * FROM admin_tab\";\n $resultnew = $this->db->query($sql);\n\n foreach ($resultnew->result_array() as $row) {\n $admin_email = $row['admin_email'];\n }\n return $admin_email;\n }", "public function getAuthId(): string\n {\n return $this->authId;\n }", "public function getAuthIdentifierName()\n {\n return $this->email;\n }", "public static function getAdminUserGroupId(){\n return config('admin_usergroup_id',static::$ADMIN_USERGROUP_ID);\n }", "function id()\n{\n return auth('id');\n}", "public static function getActiveAdminId()\n\t{\n\t\t$key = '';\n\t\t$cacheName = 'ActiveAdminId';\n\t\tif (Cache::has($cacheName, $key)) {\n\t\t\treturn Cache::get($cacheName, $key);\n\t\t}\n\t\t$adminId = 1;\n\t\tif (\\App\\Config::performance('ENABLE_CACHING_USERS')) {\n\t\t\t$users = PrivilegeFile::getUser('id');\n\t\t\tforeach ($users as $id => $user) {\n\t\t\t\tif ('Active' === $user['status'] && 'on' === $user['is_admin']) {\n\t\t\t\t\t$adminId = $id;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$adminId = (new Db\\Query())->select(['id'])\n\t\t\t\t->from('vtiger_users')\n\t\t\t\t->where(['is_admin' => 'on', 'status' => 'Active'])\n\t\t\t\t->orderBy(['id' => SORT_ASC])\n\t\t\t\t->limit(1)->scalar();\n\t\t}\n\t\tCache::save($cacheName, $key, $adminId, Cache::LONG);\n\n\t\treturn $adminId;\n\t}", "public function getAdminmail( )\n {\n return $this->orgesab_orgesabAdminEmail;\n }", "private function getauthID(){\n\t}", "function get_site_emailId()\n{\n\n\tif(get_option('ptthemes_site_email'))\n\t{\n\t\treturn get_option('ptthemes_site_email');\n\t}\n\treturn get_option('admin_email');\n}", "public function getAuthIdentifier()\n {\n return $this->user_id;\n }", "public function getAuthIdentifier()\n\t{\n\t\treturn $this->id;\n\t}", "public function getAuthId()\n {\n }", "public function getAdminUsername()\n {\n return $this->_username;\n }", "public function getAdminAttribute()\n {\n return $this->user_id;\n }", "public function getDefaultAdminUsername()\n {\n $config = $this->getApplicationConfig();\n return isset($config['adminLogin']) ? $config['adminLogin'] : null;\n }", "public function getAuthIdentifier()\n {\n return $this->id;\n }", "public function getAuthIdentifier()\n {\n return $this->id;\n }", "public function getAuthIdentifier()\n {\n return $this->id;\n }", "public function getAuthIdentifier()\n {\n return $this->id;\n }", "public function getAuthIdentifier()\n {\n return $this->id;\n }", "public function getAuthIdentifier()\n {\n return $this->id;\n }", "public function getAuthIdentifier()\n {\n return $this->id;\n }", "public function id()\n {\n if ($user = $this->user()) {\n return $this->user()->getAuthIdentifier();\n }\n }", "public function getIdAdministrator()\n {\n return $this->idAdministrator;\n }", "public function getCurrentAdmin()\n {\n return Auth::user()->username;\n }", "function getSuperAdminEmail(){\r\n\t\t$select = \"SELECT email FROM admin WHERE accesslevel='0'\";\r\n\t\t$result = doQuery($select);\r\n\t\t$row = mysql_fetch_array($result);\r\n\t\t$email = $row['email'];\r\n\t}", "public function get_id()\n {\n return \"authName\";\n }", "protected function getLoggedInUserId()\n {\n try {\n if (Auth::guard('user')->check()) {\n return Auth::guard('user')->user()->getAuthIdentifier();\n }\n\n else if (Auth::guard('admin')->check()) {\n return Auth::guard('admin')->user()->getAuthIdentifier();\n }\n } catch (\\Exception $e) {\n return;\n }\n }", "public function getEmailid()\n {\n return $this->emailid;\n }", "function get_admin_email()\n\t\t{\n\t\t\n\t\t\t$resObj = $this->db->where('default_account_id',2)->get('ox_users');\n\t\t\t\n\t\t\tif($resObj->num_rows >0)\n\t\t\t\t{\n\t\t\t\n\t\t\t\t\t$temp = $resObj->result();\n\t\t\t\n\t\t\t\t\treturn $temp[0]->email_address;\n\t\t\t\t}\n\t\t\t\t\n\t\t\telse\n\t\t\t\t{\n\t\t\t\n\t\t\treturn FALSE;\n\t\t\t\t}\n\t\t}", "function adminAuthenticate()\n{\n\t$token = getToken();\n\t//Try to authenticate the request, we succeed if the token is\n\t//valid and if the token is for an admin\n\t$userObj = authenticate(\"login\", $token);\n\tif($userObj == NULL || $userObj['admin'] != 1)\n\t{\n\t\theader(\"HTTP/1.1 401 Unauthorized\");\n\t\techo \"Unauthorized\";\n\t\texit;\n\t}\n\treturn $userObj['rcsid'];\n}", "public function admin_user();", "function admin()\n {\n return auth('admin')->user();\n }", "public function getID(): string {\n\t\treturn 'auth';\n\t}", "protected function getAdminUser()\n {\n return $this->getUserById(1);\n }", "public function getUserId()\n {\n $id = Auth::id();\n return $id;\n\n }", "public function getAuthIdentifier()\n {\n return 1;\n }", "protected function get_admin_user()\n {\n $users = User::role('admin')->get();\n return $users[0];\n }", "public function getAuthUserId()\n {\n $user_id = null;\n $user = $this->getAuthUser();\n if ($user) {\n $user_id = $user->user_id;\n }\n return $user_id;\n }", "public function getAdminName(): string\n {\n return $this->adminName;\n }", "public function getAuthIdentifier()\n {\n return $this->model->getAuthIdentifier();\n }", "public function getEmailId()\n {\n return $this->emailId;\n }", "public function getEmailId()\n {\n return $this->emailId;\n }", "public function getAdminName()\n {\n return $this->adminName;\n }", "public static function getAdmin(){\n\t\tself::parseUrl();\n\t\tif(isset(self::$urlSegments[0]) && self::$urlSegments[0] == 'admin'){\n\t\t\treturn 'admin';\n\t\t}\n\t\treturn null;\n\t}", "public function getAuthIdentifier(): string;", "function getEmailID(){\n return $this->email_ad;\n }", "public function getAuthIdentifierName()\n {\n return 'id';\n }", "public function getAuthIdentifier()\n {\n return $this->{$this->getAuthIdentifierName()};\n }", "public function getAuthIdentifier()\n {\n return $this->{$this->getAuthIdentifierName()};\n }", "public function getAuthIdentifier()\n {\n return $this->{$this->getAuthIdentifierName()};\n }", "public function getAuthIdentifier()\n\t{\n\t\treturn $this->model->username;\n\t}", "public function getAuthIdentifier()\n {\n\treturn $this->getKey();\n }", "function getUid()\n {\n return $this->getEmail();\n }", "public function getEmail() {\n return $this->auth_data->email;\n }", "public function getAuthIdentifier()\n\t{\n\t\treturn $this->getKey();\n\t}", "public function getAuthIdentifier()\n\t{\n\t\treturn $this->getKey();\n\t}", "public function getAuthIdentifier()\n\t{\n\t\treturn $this->getKey();\n\t}", "public function getAuthIdentifier()\n\t{\n\t\treturn $this->getKey();\n\t}", "public function getAuthIdentifier()\n\t{\n\t\treturn $this->getKey();\n\t}", "public function getAuthIdentifier()\n\t{\n\t\treturn $this->getKey();\n\t}", "public function getAuthIdentifier()\n\t{\n\t\treturn $this->getKey();\n\t}", "public function getAuthIdentifier()\n\t{\n\t\treturn $this->getKey();\n\t}", "public function getAuthIdentifier()\n\t{\n\t\treturn $this->getKey();\n\t}", "public function getAuthIdentifier()\n\t{\n\t\treturn $this->getKey();\n\t}", "public function getAuthIdentifier()\n\t{\n\t\treturn $this->getKey();\n\t}", "public function getAuthIdentifier()\n\t{\n\t\treturn $this->getKey();\n\t}", "public function getAuthIdentifier()\n\t{\n\t\treturn $this->getKey();\n\t}", "public function getAuthIdentifier()\n\t{\n\t\treturn $this->getKey();\n\t}", "public function getAuthIdentifier()\n\t{\n\t\treturn $this->getKey();\n\t}", "public function getAuthIdentifier()\n\t{\n\t\treturn $this->getKey();\n\t}", "public function getAuthIdentifier()\n\t{\n\t\treturn $this->getKey();\n\t}", "public function getAuthIdentifier()\n\t{\n\t\treturn $this->getKey();\n\t}", "public function getAuthIdentifier()\n\t{\n\t\treturn $this->getKey();\n\t}", "public function getAuthIdentifier()\n\t{\n\t\treturn $this->getKey();\n\t}", "public function getAuthIdentifier()\n\t{\n\t\treturn $this->getKey();\n\t}", "public function getAuthIdentifier()\n\t{\n\t\treturn $this->getKey();\n\t}", "public function getAuthIdentifier()\n\t{\n\t\treturn $this->getKey();\n\t}", "public function getAuthIdentifier()\n\t{\n\t\treturn $this->getKey();\n\t}", "public function getAuthIdentifier()\n\t{\n\t\treturn $this->getKey();\n\t}", "public function getAuthIdentifier()\n\t{\n\t\treturn $this->getKey();\n\t}", "public function getAuthIdentifier()\n\t{\n\t\treturn $this->getKey();\n\t}" ]
[ "0.7829392", "0.762353", "0.7596112", "0.7545505", "0.7473447", "0.74266887", "0.73756725", "0.73725325", "0.73287404", "0.7303456", "0.72154707", "0.7210484", "0.7210145", "0.70377463", "0.7035744", "0.6976088", "0.6934805", "0.6920211", "0.69015867", "0.6843923", "0.6819702", "0.67907935", "0.67626595", "0.6745032", "0.6731072", "0.6730757", "0.6727567", "0.66962755", "0.6606671", "0.6591526", "0.6590032", "0.6579795", "0.657916", "0.6564866", "0.6564866", "0.6564866", "0.6564866", "0.6564866", "0.6564866", "0.6564866", "0.6515626", "0.6486748", "0.64769286", "0.6472841", "0.64718556", "0.64642406", "0.64632905", "0.6457904", "0.6455592", "0.6448733", "0.6444556", "0.6440296", "0.6433599", "0.64275354", "0.64229184", "0.6413019", "0.64039147", "0.63794935", "0.63703215", "0.63696516", "0.63696516", "0.6358661", "0.6355955", "0.6333156", "0.6329399", "0.63201916", "0.6303388", "0.6303388", "0.6303388", "0.6301533", "0.6296468", "0.6286956", "0.6285673", "0.62825215", "0.62825215", "0.62825215", "0.62825215", "0.62825215", "0.62825215", "0.62825215", "0.62825215", "0.62825215", "0.62825215", "0.62825215", "0.62825215", "0.62825215", "0.62825215", "0.62825215", "0.62825215", "0.62825215", "0.62825215", "0.62825215", "0.62825215", "0.62825215", "0.62825215", "0.62825215", "0.62825215", "0.62825215", "0.62825215", "0.62825215" ]
0.77768666
1
asserts that created filter is same as original filter
утверждает, что созданный фильтр такой же, как оригинальный фильтр
protected function assertOriginalFilter(stubFilter $filter, $createdFilter) { parent::assertOriginalFilter($filter, $createdFilter->getDecoratedFilter()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testFilterShouldNotLog()\n {\n /** @var MockObject|LoggerInterface $mock */\n $mock = $this->createMock(LoggerInterface::class);\n\n /** @var MockObject|callable $filter1 */\n $filter1 = $this->createPartialMock(CallableMock::class, ['__invoke']);\n $filter1->expects($this->once())\n ->method('__invoke')\n ->with(new Record('warning', 'Please do not show me!', []))\n ->willReturn(false);\n\n /** @var MockObject|callable $filter2 */\n $filter2 = $this->createPartialMock(CallableMock::class, ['__invoke']);\n\n $log = new Filter($mock, $filter1, $filter2);\n $log->warning('Please do not show me!');\n }", "public function testGetInputFilter()\n {\n $log = new Log();\n $if = $log->getInputFilter();\n \n $this->assertInstanceOf(\"Zend\\InputFilter\\InputFilter\", $if);\n return $if;\n }", "public function testFilter() {\n\n\t\t$filter = SlackFactory::filter();\n\n\t\t$this->assertInstanceOf('HybridLogic\\Slack\\SlashFilter', $filter);\n\n\t}", "public function testMakeWithWrongFilter()\n {\n $this->expectException(\\Folklore\\Image\\Exception\\FilterMissingException::class);\n $image = $this->handler->make('image.jpg', [\n 'wrong' => true\n ]);\n }", "public function __clone() {\n foreach ($this->filters as $i => $filter) {\n if (is_object($filter)) {\n $this->filters[$i] = clone $filter;\n }\n }\n }", "public function withFilter(FilterInterface $filter): static;", "function CheckFilter() {}", "function equals( $filter ) {\n\t\treturn false;\n\t}", "public function _preview_filter($original)\n {\n }", "public function testFilter() {\n\t\t$arr1 = new LINQArray([1, 2, 3]);\n\t\t// And keep all the even ones\n\t\t$filtered = $arr1->filter(function($x) { return $x % 2 == 0; })->toArray();\n\t\t// We should get one item\n\t\t$this->assertEquals(1, count($filtered));\n\t\t// But it's not going to be the same as [2]\n\t\t$this->assertNotEquals([2], $filtered);\n\t\t// It will instead keep its position (PHP arrays are not real arrays)\n\t\t$this->assertEquals(array(1=>2), $filtered);\n\t}", "public function testFilter()\n {\n $tests = array(\n array(\n 'label' => __LINE__ .': null fields, null values, null options',\n 'values' => null,\n 'options' => null,\n 'expected' => array(),\n 'copy' => false,\n ),\n array(\n 'label' => __LINE__ .': null fields, null values, inverse filter',\n 'values' => null,\n 'options' => array(P4_Model_Iterator::FILTER_INVERSE),\n 'expected' => array('A', 'B', 'C', 'a', 'b', 'c'),\n 'copy' => false,\n ),\n array(\n 'label' => __LINE__ .': null fields, simple match values, null options',\n 'values' => array('A', 'C'),\n 'options' => null,\n 'expected' => array('A', 'C'),\n 'copy' => false,\n ),\n array(\n 'label' => __LINE__ .': null fields, simple match values, inverse filter',\n 'values' => array('A', 'C'),\n 'options' => array(P4_Model_Iterator::FILTER_INVERSE),\n 'expected' => array('B', 'a', 'b', 'c'),\n 'copy' => false,\n ),\n array(\n 'label' => __LINE__ .': null fields, regex match values, null options',\n 'values' => array('(3|5|6)'),\n 'options' => array(P4_Model_Iterator::FILTER_REGEX),\n 'expected' => array('C', 'b', 'c'),\n 'copy' => false,\n ),\n array(\n 'label' => __LINE__ .': null fields, regex match values, inverse filter',\n 'values' => array('(3|5|6)'),\n 'options' => array(P4_Model_Iterator::FILTER_REGEX, P4_Model_Iterator::FILTER_INVERSE),\n 'expected' => array('A', 'B', 'a'),\n 'copy' => false,\n ),\n array(\n 'label' => __LINE__ .': null fields, simple match values, no case',\n 'values' => array('a'),\n 'options' => array(P4_Model_Iterator::FILTER_NO_CASE),\n 'expected' => array('A', 'a'),\n 'copy' => false,\n ),\n array(\n 'label' => __LINE__ .': null fields, simple match values, no case inverse filter',\n 'values' => array('a'),\n 'options' => array(P4_Model_Iterator::FILTER_NO_CASE, P4_Model_Iterator::FILTER_INVERSE),\n 'expected' => array('B', 'C', 'b', 'c'),\n 'copy' => false,\n ),\n array(\n 'label' => __LINE__ .': null fields, regex match values, no case',\n 'values' => array('/b/'),\n 'options' => array(P4_Model_Iterator::FILTER_REGEX, P4_Model_Iterator::FILTER_NO_CASE),\n 'expected' => array('B', 'b'),\n 'copy' => false,\n ),\n array(\n 'label' => __LINE__ .': null fields, regex match values, no case inversed filter',\n 'values' => array('/B/'),\n 'options' => array(\n P4_Model_Iterator::FILTER_REGEX,\n P4_Model_Iterator::FILTER_NO_CASE,\n P4_Model_Iterator::FILTER_INVERSE\n ),\n 'expected' => array('A', 'C', 'a', 'c'),\n 'copy' => false,\n ),\n array(\n 'label' => __LINE__ .': null fields, contains match values',\n 'values' => array('0'),\n 'options' => array(P4_Model_Iterator::FILTER_CONTAINS),\n 'expected' => array('B', 'a', 'b'),\n 'copy' => false,\n ),\n array(\n 'label' => __LINE__ .': null fields, contains match values, inverted filter',\n 'values' => array('0'),\n 'options' => array(P4_Model_Iterator::FILTER_CONTAINS, P4_Model_Iterator::FILTER_INVERSE),\n 'expected' => array('A', 'C', 'c'),\n 'copy' => false,\n ),\n array(\n 'label' => __LINE__ .': null fields, match all values #1',\n 'values' => array('/3/', '/e/'),\n 'options' => array(P4_Model_Iterator::FILTER_MATCH_ALL, P4_Model_Iterator::FILTER_REGEX),\n 'expected' => array('C', 'c'),\n 'copy' => false,\n ),\n array(\n 'label' => __LINE__ .': null fields, match all values #2',\n 'values' => array('/3/', '/e/', '/c/'),\n 'options' => array(P4_Model_Iterator::FILTER_MATCH_ALL, P4_Model_Iterator::FILTER_REGEX),\n 'expected' => array('c'),\n 'copy' => false,\n ),\n array(\n 'label' => __LINE__ .': null fields, match all values #3, no case',\n 'values' => array('/3/', '/e/', '/c/'),\n 'options' => array(\n P4_Model_Iterator::FILTER_MATCH_ALL,\n P4_Model_Iterator::FILTER_REGEX,\n P4_Model_Iterator::FILTER_NO_CASE\n ),\n 'expected' => array('C', 'c'),\n 'copy' => false,\n ),\n array(\n 'label' => __LINE__ .': null fields, match all values #4, no case inverted filter',\n 'values' => array('/3/', '/e/', '/c/'),\n 'options' => array(\n P4_Model_Iterator::FILTER_MATCH_ALL,\n P4_Model_Iterator::FILTER_REGEX,\n P4_Model_Iterator::FILTER_NO_CASE,\n P4_Model_Iterator::FILTER_INVERSE\n ),\n 'expected' => array('A', 'B', 'a', 'b'),\n 'copy' => false,\n ),\n array(\n 'label' => __LINE__ .': null fields, null values, with copy',\n 'values' => null,\n 'options' => array(P4_Model_Iterator::FILTER_COPY),\n 'expected' => array(),\n 'copy' => true,\n ),\n array(\n 'label' => __LINE__ .': null fields, simple match values, with copy',\n 'values' => array('A'),\n 'options' => array(P4_Model_Iterator::FILTER_COPY),\n 'expected' => array('A'),\n 'copy' => true,\n ),\n array(\n 'label' => __LINE__ .': null fields, boolean values',\n 'values' => array(false),\n 'options' => array(P4_Model_Iterator::FILTER_COPY),\n 'expected' => array(false),\n 'copy' => true,\n 'extraData' => array(true, false, true),\n ),\n array(\n 'label' => __LINE__ .': null fields, object values',\n 'values' => array('@'),\n 'options' => array(P4_Model_Iterator::FILTER_COPY),\n 'expected' => array('@'),\n 'copy' => true,\n 'extraData' => array(new stdClass, '@', new stdClass),\n ),\n array(\n 'label' => __LINE__ .': null fields, nested values, implode enabled',\n 'values' => array('Z'),\n 'options' => array(P4_Model_Iterator::FILTER_IMPLODE, P4_Model_Iterator::FILTER_CONTAINS),\n 'expected' => array(array('@', 'Y', 'Z')),\n 'copy' => false,\n 'extraData' => array(9, array('@', 'Y', 'Z'), new stdClass),\n ),\n array(\n 'label' => __LINE__ .': null fields, nested values, implode disabled',\n 'values' => array('Z'),\n 'options' => array(P4_Model_Iterator::FILTER_CONTAINS),\n 'expected' => array(),\n 'copy' => false,\n 'extraData' => array(9, array('@', 'Y', 'Z'), new stdClass),\n ),\n array(\n 'label' => __LINE__ .': null fields, null value',\n 'values' => array(null),\n 'options' => array(P4_Model_Iterator::FILTER_CONTAINS),\n 'expected' => array(1),\n 'copy' => false,\n 'extraData' => array(new stdClass, 1, null),\n ),\n array(\n 'label' => __LINE__ .': null fields, \\'null\\' value',\n 'values' => array(null),\n 'options' => array(P4_Model_Iterator::FILTER_CONTAINS),\n 'expected' => array(),\n 'copy' => false,\n 'extraData' => array(new stdClass, 1, 'null'),\n )\n // see testSearch for tests involving specified/multiple fields\n );\n\n foreach ($tests as $test) {\n $label = $test['label'];\n\n // test the contents prior to filtering\n $extraData = null;\n $original = array('A', 'B', 'C', 'a', 'b', 'c');\n if (array_key_exists('extraData', $test)) {\n $extraData = $test['extraData'];\n array_unshift($original, $extraData[1]);\n }\n $iterator = $this->_getTestIterator($extraData);\n $actual = $iterator->sortBy('bar')->invoke('getValue', array('bar'));\n $this->assertSame($original, $actual, \"$label - expected initial items\");\n\n // test the content after filtering\n $copy = $iterator->filter(null, $test['values'], $test['options']);\n $actual = $copy->sortBy('bar')->invoke('getValue', array('bar'));\n $this->assertSame($test['expected'], $actual, \"$label - expected final items\");\n\n // verify modification, or lack thereof, to original iterator\n if ($test['copy']) {\n $actual = $iterator->sortBy('bar')->invoke('getValue', array('bar'));\n $this->assertSame($original, $actual, \"$label - expected no iterator change\");\n } else {\n $expected = $actual;\n $actual = $iterator->sortBy('bar')->invoke('getValue', array('bar'));\n $this->assertSame($expected, $actual, \"$label - expected iterator change\");\n }\n }\n }", "public function filter($filter)\n {\n }", "public function applyFilter();", "public function testFilterShouldLog()\n {\n /** @var MockObject|LoggerInterface $mock */\n $mock = $this->createMock(LoggerInterface::class);\n $mock->expects($this->once())\n ->method('log')\n ->with('warning', 'Please show me!', []);\n\n /** @var MockObject|callable $filter1 */\n $filter1 = $this->createPartialMock(CallableMock::class, ['__invoke']);\n $filter1->expects($this->once())\n ->method('__invoke')\n ->with(new Record('warning', 'Please show me!', []))\n ->willReturn(true);\n\n /** @var MockObject|callable $filter2 */\n $filter2 = $this->createPartialMock(CallableMock::class, ['__invoke']);\n $filter2->expects($this->once())\n ->method('__invoke')\n ->with(new Record('warning', 'Please show me!', []))\n ->willReturn(true);\n\n $log = new Filter($mock, $filter1, $filter2);\n $log->warning('Please show me!');\n }", "public function ensureFilter(FilterInterface $filter);", "protected function createFilter()\n {\n return new stubPasswordFilter($this->getMock('stubRequestValueErrorFactory'));\n }", "private function _fFilter($filter)\n {\n // Filter is a Where object?\n if ($filter instanceof Where) {\n return clone $filter;\n }\n\n // Filter is a legacy array?\n if (is_array($filter)) {\n $where = new Where();\n $where->filter($filter);\n\n return $where;\n }\n\n return clone $this->where;\n }", "public function testAddFilterWithSameSharedCatalogId()\n {\n $this->filter->expects($this->once())->method('getValue')->willReturn($this->filterValue);\n $this->filter->expects($this->once())->method('getField')->willReturn('shared_catalog_id');\n $this->storage->expects($this->atLeastOnce())->method('getSharedCatalogId')->willReturn($this->sharedCatalogId);\n $this->catalogRepository->expects($this->at(0))\n ->method('get')->with($this->sharedCatalogId)->willReturn($this->sharedCatalog);\n $this->collection->expects($this->once())->method('addIdFilter')\n ->with($this->assignedCompaniesIds, !$this->filterValue);\n $this->storage->expects($this->once())\n ->method('getAssignedCompaniesIds')->willReturn($this->assignedCompaniesIds);\n $this->collectionFactory->expects($this->once())->method('create')->willReturn($this->collection);\n $this->sharedCatalog->expects($this->once())->method('getId')->willReturn($this->filterValue);\n $this->companyDataProvider->addFilter($this->filter);\n }", "protected function newFilter($filter)\n {\n return new Filter($filter);\n }", "public function testAddFilter()\n {\n $field = 'test field';\n $conditionType = 'test condition type';\n $this->filter->expects($this->once())->method('getValue')->willReturn($this->filterValue);\n $this->filter->expects($this->exactly(2))->method('getField')->willReturn($field);\n $this->filter->expects($this->once())->method('getConditionType')->willReturn($conditionType);\n $this->collection->expects($this->once())\n ->method('addFieldToFilter')->with($field, [$conditionType => $this->filterValue])->willReturnSelf();\n $this->collectionFactory->expects($this->once())->method('create')->willReturn($this->collection);\n $this->companyDataProvider->addFilter($this->filter);\n }", "protected function mock_filter( $filter, $return_value = null ) {\n\n\t\t$mock = new WordPoints_PHPUnit_Mock_Filter( $return_value );\n\n\t\tadd_filter( $filter, array( $mock, 'filter' ) );\n\n\t\treturn $mock;\n\t}", "function testFiltersAreRegistered() {\n\t}", "public function testFilter()\n {\n // so here we just verify that the params are passed correctly internally\n $project_repository = $this->getMockBuilder(ServiceRepository::class)\n ->disableOriginalConstructor()\n ->setMethods(['scopeByRateGroup'])->getMock();\n\n // with rate group\n $project_repository->expects($this->once())->method('scopeByRateGroup')\n ->with($this->equalTo('badabing'));\n $project_repository->filter(['rateGroup' => 'badabing']);\n\n // default\n $this->expectException(\\Exception::class);\n $project_repository->filter(['anything' => 'anything']);\n }", "public function inOriginal();", "protected function filter(): Filter\n {\n return new Filter($this);\n }", "final public static function filter()\n\t{\n\t\treturn Filter::getInstance();\n\t}", "public function testOriginal()\n {\n }", "public function testFilters()\n {\n $request = $this->createMock(Request::class);\n\n $this->assertIsArray($this->resource->filters($request));\n }", "public function testSameLengthAsSpecifiedLength()\n {\n $string = 'This string shouldn\\'t be shorter';\n $this->assertSame($string, $this->_filter2->filter($string));\n }", "public function filter()\n {\n \n }", "abstract protected function assertViewWithFiltersResults();", "public function testFilterDataInvalid()\n {\n $factory = $this->create([\n 'columns' => [\n 'title' => [\n 'type' => 'property',\n ],\n ],\n 'filters' => [\n 'title' => [\n 'type' => 'string',\n ],\n ],\n ]);\n $grid = $factory->createGrid(Article::class, [\n 'filter' => [\n 'title' => new \\stdClass(),\n ],\n ]);\n $grid->createView();\n }", "public function testSanitizeCustomLambdaFalseTrue()\n {\n $this->specify(\n \"lambda custom filter does not return true\",\n function () {\n\n $filter = new PhTFilter();\n\n $filter->add(\n 'md5',\n function ($value) {\n $filtered = preg_replace('/[^0-9a-f]/', '', $value);\n\n return (strlen($filtered) != 32) ? false : $value;\n }\n );\n\n $expected = md5('why?');\n $actual = $filter->sanitize($expected, 'md5');\n expect($actual)->equals($expected);\n }\n );\n }", "public function testImplementsZfFilterInterface()\n {\n $this->assertInstanceOf('\\Zend\\Filter\\FilterInterface', $this->filter);\n }", "public function testLegacyFiltersBasicSignature() {\n\t\terror_reporting(($original = error_reporting()) & ~E_USER_DEPRECATED);\n\n\t\t$subject = new Chain([\n\t\t\t'class' => 'Foo',\n\t\t\t'method' => 'bar',\n\t\t\t'filters' => [\n\t\t\t\tfunction($self, $params, $chain) {\n\t\t\t\t\t$params['body'] = compact('self', 'params', 'chain');\n\t\t\t\t\treturn $chain->next($self, $params, $chain);\n\t\t\t\t}\n\t\t\t]\n\t\t]);\n\t\t$result = $subject->run(['foo' => 'bar'], function($params) {\n\t\t\treturn $params['body'];\n\t\t});\n\n\t\t$this->assertEqual('Foo', $result['self']);\n\t\t$this->assertEqual(['foo' => 'bar'], $result['params']);\n\t\t$this->assertInstanceOf('\\lithium\\aop\\Chain', $result['chain']);\n\n\t\terror_reporting($original);\n\t}", "public function testFilter()\n {\n $expected = 'a9a5079a7e416683be1e24ddca8d22a2';\n $stream = tmpfile();\n stream_filter_append(\n $stream,\n 'cryptal.mac',\n STREAM_FILTER_READ,\n array(\n 'algorithm' => MacEnum::MAC_CMAC(),\n 'innerAlgorithm' => CipherEnum::CIPHER_AES_128(),\n 'key' => pack('H*', '0f0e0d0c0b0a09080706050403020100'),\n\n // Since both the CMAC implementation and the AES stub\n // are based on userland PHP code, this must be set to true.\n 'allowUnsafe' => true,\n )\n );\n fwrite($stream, \"hello world!\\n\");\n fseek($stream, 0, SEEK_SET);\n $this->assertSame($expected, bin2hex(stream_get_contents($stream)));\n }", "function is_filtered()\n {\n }", "public function testInexistentFilter()\n\t{\n\t\t$this->setExpectedException('Jyxo_Input_Exception');\n\t\t$this->factory->getFilterByName('foo');\n\t}", "public function assetsInlineConstructFilterSet(UnitTester $I)\n {\n $I->wantToTest('Assets\\Asset - __construct() - filter set');\n $content = 'p {color: #000099}';\n $asset = new Css($content, false);\n\n $actual = $asset->getFilter();\n $I->assertFalse($actual);\n }", "public function testAddFilterWithIsCurrent()\n {\n $this->filter->expects($this->once())->method('getValue')->willReturn($this->filterValue);\n $this->filter->expects($this->once())->method('getField')->willReturn('is_current');\n $this->collection->expects($this->once())->method('addIdFilter')\n ->with($this->assignedCompaniesIds, !$this->filterValue);\n $this->storage->expects($this->once())\n ->method('getAssignedCompaniesIds')->willReturn($this->assignedCompaniesIds);\n $this->collectionFactory->expects($this->once())->method('create')->willReturn($this->collection);\n $this->companyDataProvider->addFilter($this->filter);\n }", "public function testCustomFilterPrefix()\n\t{\n\t\t$filterName = 'Some_Filter';\n\t\t$filterPrefix = 'SomePrefix_';\n\n\t\t// Ensure that there is no such class loaded\n\t\tif (class_exists($filterName, false)) {\n\t\t\t$this->markTestSkipped(sprintf('Class %s exists', $filterName));\n\t\t}\n\n\t\ttry {\n\t\t\t$this->factory->getFilterByName($filterName);\n\t\t\t$this->fail('Jyxo_Input_Exception expected');\n\t\t} catch (PHPUnit_Framework_ExpectationFailedException $e) {\n\t\t\tthrow $e;\n\t\t} catch (Exception $e) {\n\t\t\t$this->assertInstanceOf('Jyxo_Input_Exception', $e);\n\t\t}\n\n\t\t$this->factory->addFilterPrefix($filterPrefix);\n\t\t$filter = $this->factory->getFilterByName($filterName);\n\t}", "public function testGetType(): void\n {\n $propertyHolder = $this->getMockBuilder(PropertyHolder::class)\n ->disableOriginalConstructor()\n ->onlyMethods(['isOutputProperty'])\n ->getMock();\n\n $propertyHolder\n ->expects(static::never())\n ->method('isOutputProperty');\n\n $object = new FullFilter($propertyHolder);\n\n static::assertSame(FilterInterface::TYPE_FULL, $object->getType());\n }", "public function should_allow_setting_filters_to_remove()\n {\n $sut = new Filters([\n 'remove' => [\n [ 'some-filter', 'some_callback', 23 ],\n [ 'some-other-filter', 'some_callback' ],\n [ 'some-filter', 'some_callback' ],\n ]\n ]);\n\n $removed = [];\n $sut->removeWith(function ($tag, $callback, $priority) use (&$removed) {\n $removed[] = [ $tag, $callback, $priority ];\n\n return true;\n });\n\n $sut->toRemove()->remove();\n\n $this->assertEquals([\n [ 'some-filter', 'some_callback', 23 ],\n [ 'some-other-filter', 'some_callback', 10 ],\n [ 'some-filter', 'some_callback', 10 ],\n ], $removed);\n }", "public function testRemove()\n {\n $filter = 'testfilter';\n $class = Filter::class;\n $function = 'remove';\n $priority = 10;\n $this->assertFalse(\n Filter::remove($filter, $class, $function),\n 'Should not be able te remove a filter that is not added'\n );\n $filter = 'testfilter';\n $class = Filter::class;\n $function = 'remove';\n $priority = 10;\n add_filter($filter, [$class, $function], $priority, 0);\n $this->assertTrue(\n Filter::remove($filter, $class, $function),\n 'Should be able te remove a filter that is added'\n );\n add_filter($filter, [$class, 'test'], $priority, 0);\n $this->assertFalse(\n Filter::remove($filter, $class, $function),\n 'Should not be able to remove a filter of which the function doesn\\'t exist'\n );\n $this->assertFalse(\n Filter::remove($filter, $class, $function),\n 'Should not be able te remove a filter that is not added'\n );\n }", "public function testItSupportsShortenedVersionForEqual()\n {\n $callBack = function (array $filter) {\n $this->assertEquals(['test[is]' => 'something'], $filter);\n };\n\n $filterBuilder = new FilterBuilder($callBack);\n\n $filterBuilder->where('test', 'something')->get();\n }", "public function filter();", "public function resetFilter() {\n if (!isset($this->originalCollection)) return $this;\n $this->collection = $this->originalCollection;\n $this->originalCollection = null;\n return $this;\n }", "public function getFilter(): callable;", "public function testGetFiltersReturnRightCollection(): void\n {\n $filters = $this->getEntityManager()->getFilters();\n\n /** @noinspection UnnecessaryAssertionInspection Test of actual returned instance */\n self::assertInstanceOf(FilterCollectionInterface::class, $filters);\n }", "public function testSanitizeCustomLambdaFalseTrue()\n\t{\n\t\t$filter = new PhFilter();\n\n\t\t$filter->add(\n\t\t\t'md5',\n\t\t\tfunction ($value) {\n\t\t\t\t$filtered = preg_replace('/[^0-9a-f]/', '', $value);\n\n\t\t\t\treturn (strlen($filtered) != 32) ? false : $value;\n\t\t\t}\n\t\t);\n\n\t\t$expected = md5('why?');\n\t\t$actual = $filter->sanitize(md5('why?'), 'md5');\n\n\t\t$this->assertEquals(\n\t\t\t$expected,\n\t\t\t$actual,\n\t\t\t'Lambda Custom filter is not correct True'\n\t\t);\n\t}", "public function testIfIsRelevantFunctionIsReturningFalse()\n {\n $postFilter = new PostFilter();\n $this->assertFalse($postFilter->isRelevant());\n }", "public function testComDayCqDamCommonsMetadataXmpFilterBlackWhite() {\n\n }", "function equals( $filter ) {\n\t\tif( !( $filter instanceof self ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tif( $filter->field != $this->field ) {\n\t\t\treturn false;\n\t\t}\n\t\tif( $filter->value != $this->value ) {\n\t\t\treturn false;\n\t\t}\n\t\tif( $filter->op != $this->op ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public function useFilter()\n\t\t{\n\t\t\t$this->_filterStatus = 1;\n\t\t\treturn $this;\n\t\t}", "public function testIsOutput(): void\n {\n $propertyHolder = $this->getMockBuilder(PropertyHolder::class)\n ->disableOriginalConstructor()\n ->onlyMethods(['isOutputProperty'])\n ->getMock();\n\n $propertyHolder\n ->expects(static::never())\n ->method('isOutputProperty');\n\n $object = new FullFilter($propertyHolder);\n\n $division = $this->createMock(Division::class);\n\n static::assertTrue($object->isOutput($division));\n }", "public function testGetOriginal(): void\n {\n $entity = new Entity(\n ['false' => false, 'null' => null, 'zero' => 0, 'empty' => ''],\n ['markNew' => true]\n );\n $this->assertNull($entity->getOriginal('null'));\n $this->assertFalse($entity->getOriginal('false'));\n $this->assertSame(0, $entity->getOriginal('zero'));\n $this->assertSame('', $entity->getOriginal('empty'));\n\n $entity->set(['false' => 'y', 'null' => 'y', 'zero' => 'y', 'empty' => '']);\n $this->assertNull($entity->getOriginal('null'));\n $this->assertFalse($entity->getOriginal('false'));\n $this->assertSame(0, $entity->getOriginal('zero'));\n $this->assertSame('', $entity->getOriginal('empty'));\n }", "public function testCheckFiltersWithoutFilters() {\n $stub_s['data'] = [];\n $stub_n['webform']['components'] = [];\n $submission = new Submission((object) $stub_n, (object) $stub_s);\n $redirect = new Redirect([]);\n $this->assertTrue($redirect->checkFilters($submission));\n }", "public function testInvalidFilterThrowsException(): void\n {\n $entityManager = new EntityManager($this->getEntityManager());\n $filters = $entityManager->getFilters();\n\n $this->expectException(ORMException::class);\n\n $filters->enable('invalid');\n }", "public function testApply()\n {\n $effectsMock = new EffectsMock();\n $imageMock = new ImageMock($effectsMock);\n\n $this->filter->apply($imageMock, 30);\n $this->assertEquals('rotate', $imageMock->called);\n $this->assertEquals(30, $imageMock->callValue);\n }", "public function testSanitizeCustomLambdaFalse()\n {\n $this->specify(\n \"lambda custom filter does not return false\",\n function () {\n\n $filter = new PhTFilter();\n\n $filter->add(\n 'md5',\n function ($value) {\n $filtered = preg_replace('/[^0-9a-f]/', '', $value);\n\n return (strlen($filtered) != 32) ? false : $value;\n }\n );\n\n $actual = $filter->sanitize('Lladlad12', 'md5');\n expect($actual)->false();\n }\n );\n }", "function doing_filter($filter = \\null)\n{\n}", "public function testFilterLogs()\n {\n }", "public function testMake()\n {\n $returnImage = $this->handler->open('image.jpg');\n $returnImage = with(new ResizeFilter())->apply($returnImage, [\n 'width' => 100,\n 'height' => 90,\n 'crop' => false\n ]);\n $returnImage = with(new RotateFilter())->apply($returnImage, 90);\n\n $rotateFilterMock = $this->getMockBuilder(RotateFilter::class)\n ->setMethods(['apply'])\n ->getMock();\n\n $rotateFilterMock->expects($this->once())\n ->method('apply')\n ->willReturn($returnImage);\n\n $resizeFilterMock = $this->getMockBuilder(ResizeFilter::class)\n ->setMethods(['apply'])\n ->getMock();\n\n $resizeFilterMock->expects($this->once())\n ->method('apply')\n ->willReturn($returnImage);\n\n app('image')->filter('rotate', $rotateFilterMock);\n app('image')->filter('resize', $resizeFilterMock);\n\n $image = $this->handler->make('image.jpg', [\n 'width' => 100,\n 'height' => 90,\n 'crop' => true,\n 'rotate' => 90\n ]);\n\n $this->assertInstanceOf(ImageInterface::class, $image);\n $this->assertEquals(public_path('image.jpg'), $image->metadata()->get('filepath'));\n $this->assertEquals($returnImage->getSize()->getWidth(), $image->getSize()->getWidth());\n $this->assertEquals($returnImage->getSize()->getHeight(), $image->getSize()->getHeight());\n }", "public function testFilters() {\n\t\t$this->assertTrue( has_filter( 'ups_sidebar' ) );\n\t}", "public function restoreFilters();", "public function testValidatingFilterInvalid() {\n $sch = new Schema([\n 'type' => 'array'\n ]);\n $sch->addFilter('', function ($v) {\n return Invalid::value();\n }, true);\n\n $this->assertFalse($sch->isValid([1, 2, 3]));\n }", "function filter() {\r\n return null;\r\n }", "public function testGetOverrideReturnAddressByFilter()\n {\n }", "public function testFieldSetInputFilterSpec()\n {\n $objectManager = $this->getMock('Doctrine\\Common\\Persistence\\ObjectManager');\n $fieldset = new OvertimeAdminFieldset($objectManager);\n $inputFilterFactory = new \\Zend\\InputFilter\\Factory();\n\n $inputFilter = $inputFilterFactory->createInput($fieldset->getInputFilterSpecification());\n $this->assertInstanceOf('Zend\\InputFilter\\Input', $inputFilter);\n }", "protected function checkFilterPredicates()\n {\n // Override in subclass\n }", "function test_get_the_modified_time_failures_are_filtered() {\n\t\t// Remove global post objet\n\t\t$GLOBALS['post'] = null;\n\n\t\t$expected = 'filtered modified time failure result';\n\t\tadd_filter( 'get_the_modified_time', array( $this, '_filter_get_the_modified_time_failure' ) );\n\t\t$actual = get_the_modified_time();\n\t\t$this->assertEquals( $expected, $actual );\n\t\tremove_filter( 'get_the_modified_time', array( $this, '_filter_get_the_modified_time_failure' ) );\n\t}", "public function testItCanBuildAFilter()\n {\n $callBack = function (array $filter) {\n $this->assertEquals(\n [\n 'planId[is]' => '123',\n 'name[isNot]' => 'testName',\n 'status[in]' => ['active'],\n 'category[notIn]' => ['tech'],\n 'price[isPresent]' => true,\n 'firstName[startsWith]' => 'Jo',\n 'total[gt]' => 999,\n 'sum[gte]' => 99.99,\n 'productsCount[lt]' => 100,\n 'inventory[lte]' => 1000,\n 'age[between]' => [18, 35],\n 'createdAt[on]' => 1456147530,\n 'updatedAt[before]' => 1456147530,\n 'createdAt[after]' => 1456147530\n ],\n $filter\n );\n };\n\n $filterBuilder = new FilterBuilder($callBack);\n\n $filterBuilder\n ->where('planId', '=', '123')\n ->where('name', '!=', 'testName')\n ->where('status', 'in', ['active'])\n ->where('category', 'not in', ['tech'])\n ->where('price', 'isset', true)\n ->where('firstName', 'starts with', 'Jo')\n ->where('total', '>', 999)\n ->where('sum', '>=', 99.99)\n ->where('productsCount', '<', 100)\n ->where('inventory', '<=', 1000)\n ->where('age', 'between', [18, 35])\n ->where('age', 'between', [18, 35])\n ->where('createdAt', 'on', 1456147530)\n ->where('updatedAt', 'before', 1456147530)\n ->where('createdAt', 'after', 1456147530)\n ->get();\n }", "public function initFilter() {\n\t}", "public function initFilter() {\n\t}", "public function passThru()\n {\n $this->assertEquals('defaultValue', $this->defaultValueFilterDecorator->getDefaultValue());\n $this->assertEquals('other', $this->defaultValueFilterDecorator->callDoExecute('other'));\n }", "public function should_allow_readding_removed_filters()\n {\n $sut = new Filters([\n 'remove' => [\n [ 'some-filter', 'some_callback', 23 ],\n [ 'some-other-filter', 'some_callback', 10, 2 ],\n [ 'some-filter', 'some_callback' ],\n ]\n ]);\n\n $added = [];\n $sut->removeWith(function ($tag, $callback, $priority) {\n });\n $sut->addWith(function ($tag, $callback, $priority, $acceptedArgs) use (&$added) {\n $added[] = [ $tag, $callback, $priority, $acceptedArgs ];\n });\n\n $sut->toRemove()->add();\n\n $this->assertEquals([\n [ 'some-filter', 'some_callback', 23, 1 ],\n [ 'some-other-filter', 'some_callback', 10, 2 ],\n [ 'some-filter', 'some_callback', 10, 1 ],\n ], $added);\n }", "public function testSanitizeCustomLambdaFalse()\n\t{\n\t\t$filter = new PhFilter();\n\n\t\t$filter->add(\n\t\t\t'md5',\n\t\t\tfunction ($value) {\n\t\t\t\t$filtered = preg_replace('/[^0-9a-f]/', '', $value);\n\n\t\t\t\treturn (strlen($filtered) != 32) ? false : $value;\n\t\t\t}\n\t\t);\n\n\t\t$expected = false;\n\t\t$actual = $filter->sanitize('Lladlad12', 'md5');\n\n\t\t$this->assertEquals(\n\t\t\t$expected,\n\t\t\t$actual,\n\t\t\t'Lambda Custom filter is not correct False'\n\t\t);\n\t}", "public function _deprecated_filter( $filter, $version, $replacement = null ) {\n\t\t$this->_deprecated_function( 'Filter ' . $filter, $version, $replacement ); // phpcs:ignore -- Wrong asserts, copied method name.\n\t}", "public function testRepeatedWhitespaceReplacementNoReplace()\n {\n $string = ' Remove all repeated ws';\n $this->assertSame($string, $this->_filter2->filter($string));\n }", "public function testValidatingFilterValid() {\n $sch = new Schema([\n 'type' => 'array'\n ]);\n $sch->addFilter('', function ($v) {\n return (int)$v;\n }, true);\n\n $this->assertSame(123, $sch->validate('123'));\n }", "public function isFiltersStateClean(): bool;", "public function testFilter() {\n $this->installEntitySchema('user');\n $this->installEntitySchema('node');\n $this->installEntitySchema('view');\n $this->installSchema('system', ['sequences']);\n $this->installSchema('node', ['node_access']);\n $this->installConfig(['filter']);\n ViewTestData::createTestViews(static::class, ['node_test_views']);\n\n $author = $this->createUser();\n $no_author = $this->createUser();\n\n $expected_result = [];\n // Create one node, with the author as the node author.\n $node = $this->createNode(['uid' => $author->id()]);\n $expected_result[] = ['nid' => $node->id()];\n // Create one node of which an additional revision author will be the\n // author.\n $node = $this->createNode(['revision_uid' => $no_author->id()]);\n $expected_result[] = ['nid' => $node->id()];\n $revision = clone $node;\n // Force to add a new revision.\n $revision->set('vid', NULL);\n $revision->set('revision_uid', $author->id());\n $revision->save();\n\n // Create one node on which the author has neither authorship of revisions\n // or the main node.\n $this->createNode(['uid' => $no_author->id()]);\n\n $view = Views::getView('test_filter_node_uid_revision');\n $view->initHandlers();\n $view->filter['uid_revision']->value = [$author->id()];\n\n $view->preview();\n $this->assertIdenticalResultset($view, $expected_result, ['nid' => 'nid'], 'Make sure that the view only returns nodes which match either the node or the revision author.');\n }", "public function filter($filter)\n {\n $this->filter = $filter;\n return $this;\n }", "public function clearFilter()\n {\n $this->iterator_filters = [];\n\n return $this;\n }", "function test_get_the_modified_date_failures_are_filtered() {\n\t\t// Remove global post objet\n\t\t$GLOBALS['post'] = null;\n\n\t\t$expected = 'filtered modified date failure result';\n\t\tadd_filter( 'get_the_modified_date', array( $this, '_filter_get_the_modified_date_failure' ) );\n\t\t$actual = get_the_modified_date();\n\t\t$this->assertEquals( $expected, $actual );\n\t\tremove_filter( 'get_the_modified_date', array( $this, '_filter_get_the_modified_date_failure' ) );\n\t}", "public function getFilter();", "public function getFilter();", "public function getFilter();", "public function getFilter();", "public function getFilter ();", "public function testCloning(): void\n {\n $a1 = (new AggregateExpression('MyFunction'))->partition('test');\n $a2 = (clone $a1)->partition('new');\n $this->assertNotSame($a1->sql(new ValueBinder()), $a2->sql(new ValueBinder()));\n }", "public function testNotModified()\n {\n $filter = new AssetFilter();\n $time = filemtime(Plugin::path('TestTheme') . 'webroot/img/cake.power.gif');\n $time = new \\DateTime('@' . $time);\n\n $response = $this->getMockBuilder('Cake\\Http\\Response')\n ->setMethods(['send', 'checkNotModified'])\n ->getMock();\n $request = new Request('test_theme/img/cake.power.gif');\n\n $response->expects($this->once())->method('checkNotModified')\n ->with($request)\n ->will($this->returnValue(true));\n $event = new Event('DispatcherTest', $this, compact('request', 'response'));\n\n ob_start();\n $this->assertSame($response, $filter->beforeDispatch($event));\n ob_end_clean();\n $this->assertEquals(200, $response->statusCode());\n $this->assertEquals($time->format('D, j M Y H:i:s') . ' GMT', $response->modified());\n\n $response = $this->getMockBuilder('Cake\\Http\\Response')\n ->setMethods(['_sendHeader', 'checkNotModified', 'send'])\n ->getMock();\n $request = new Request('test_theme/img/cake.power.gif');\n\n $response->expects($this->once())->method('checkNotModified')\n ->with($request)\n ->will($this->returnValue(true));\n $response->expects($this->never())->method('send');\n $event = new Event('DispatcherTest', $this, compact('request', 'response'));\n\n $this->assertSame($response, $filter->beforeDispatch($event));\n $this->assertEquals($time->format('D, j M Y H:i:s') . ' GMT', $response->modified());\n }", "public function testComAdobeGraniteHttpcacheImplOuterCacheFilter() {\n\n }", "public function has_filters()\n {\n }", "public function testIsHandlingFiltersFalse()\n {\n $filterMock = $this->getMockBuilder('ICANS\\Component\\IcansLoggingComponent\\Api\\V1\\HandleFilterInterface')\n ->disableOriginalConstructor()\n ->getMock();\n\n $filterMock->expects($this->once())\n ->method('isRecordToBeHandled')\n ->will($this->returnValue(true));\n\n $thriftFlumeProcessingHandler = new ThriftFlumeProcessingHandler($this->thriftTTransportMock,\n $this->flumeClientMock);\n\n $thriftFlumeProcessingHandler->addHandlingFilter($filterMock);\n\n $this->assertFalse($thriftFlumeProcessingHandler->isHandling(array()));\n }", "protected function isUnchanged() {}", "public function testGetBillOfLadingByFilter()\n {\n }", "public function filterNullNotAllowed()\n {\n $this->expectException(\\TraderInteractive\\Exceptions\\FilterException::class);\n $this->expectExceptionMessage('Value failed filtering, $allowNull is set to false');\n $this->assertNull(DateTimeZone::filter(null, false));\n }", "public function getFilter(): ?\\Closure;", "public function filter($filterChain);" ]
[ "0.63858724", "0.6335551", "0.6285215", "0.6247623", "0.6108243", "0.61018634", "0.60995704", "0.6073411", "0.6066494", "0.6030105", "0.59793043", "0.59664893", "0.5957228", "0.59325606", "0.5901794", "0.59011436", "0.58325464", "0.58265954", "0.57997376", "0.5799033", "0.5776605", "0.572232", "0.57032406", "0.56962144", "0.56961304", "0.56952584", "0.5672391", "0.56586313", "0.56088495", "0.55928683", "0.5579839", "0.5576367", "0.55749875", "0.55744207", "0.5571991", "0.5560809", "0.5544011", "0.5535307", "0.550333", "0.55019736", "0.5498408", "0.5495575", "0.54924995", "0.54771984", "0.5475283", "0.54712164", "0.54679304", "0.5467394", "0.5423921", "0.5419561", "0.5417818", "0.54107815", "0.5409636", "0.5401385", "0.53954744", "0.5393263", "0.5380686", "0.537756", "0.5341371", "0.5335061", "0.53141445", "0.5300027", "0.5296087", "0.5294132", "0.5292525", "0.5288015", "0.52868515", "0.52860606", "0.52850914", "0.5279862", "0.5265655", "0.52574766", "0.5256003", "0.5256003", "0.52501917", "0.5241252", "0.523788", "0.52261096", "0.5224386", "0.52153325", "0.5213547", "0.52125365", "0.51999205", "0.5199723", "0.51992756", "0.5186199", "0.5186199", "0.5186199", "0.5186199", "0.51761234", "0.5169742", "0.5164616", "0.51620543", "0.51544434", "0.5149937", "0.51431096", "0.5137625", "0.51372546", "0.5129976", "0.5125496" ]
0.7627166
0
Instanciate player with name and 0 points
Создать игрока с именем и 0 очками
public function __construct(string $name = null) { $this->type = "Player"; $this->name = $name ? $name : $this->type . rand(1000, 9999); $this->totalPoints = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createPlayer();", "function createPlayer($name)\n\t{\n\t\t$player = array(\"teamkills\" => 0,\n\t\t\t\t\t\t\"teamkilled\" => 0,\n\t\t\t\t\t\t\"chatlines\" => 0,\n\t\t\t\t\t\t\"suicides\" => 0,\n\t\t\t\t\t\t\"votes\" => 0,\n\t\t\t\t\t\t\"kicks\" => 0,\n\t\t\t\t\t\t\"currentspree\" => 0,\n\t\t\t\t\t\t\"freefrags\" => 0,\n\t\t\t\t\t\t\"currentfreefrags\" => 0,\n\t\t\t\t\t\t\"sprees\" => array(),\n\t\t\t\t\t\t\"selfkills\" => array(\"panzerfaust\" => 0, \"artillery\" => 0, \"airstrike\" => 0, \"dynamite\" => 0, \"grenade\" => 0, \"drown\" => 0, \"other\" => 0, \"jump\" => 0, \"crush\" => 0),\n\t\t\t\t\t\t\"kills\" => array(\"grenade\" => array(), \"thompson\" => array(), \"panzerfaust\" => array(), \"mp40\" => array(), \"sten\" => array(), \"luger\" => array(), \"colt\" => array(), \"sniper\" => array(), \"mauser\" => array(), \"venom\" => array(), \"flamethrower\" => array(), \"knife\" => array(), \"support\" => array(), \"artillery\" => array(), \"dynamite\" => array(), \"mg\" => array()),\n\t\t\t\t\t\t\"deaths\" => array(\"grenade\" => array(), \"thompson\" => array(), \"panzerfaust\" => array(), \"mp40\" => array(), \"sten\" => array(), \"luger\" => array(), \"colt\" => array(), \"sniper\" => array(), \"mauser\" => array(), \"venom\" => array(), \"flamethrower\" => array(), \"knife\" => array(), \"support\" => array(), \"artillery\" => array(), \"dynamite\" => array(), \"mg\" => array()),\n\t\t\t\t\t\t\"playername\" => $name\n\t\t\t\t\t\t);\n\t\treturn $player;\n\t}", "public function __construct($name, $players, $computer_player) {\n $this->members[] = $players;\n $this->members[] = $computer_player;\n\n // sum skill points of team members\n $this->attackspeed = $humanPlayer->attackspeed + $computerPlayer->attackspeed;\n $this->abilitypower = $humanPlayer->abilitypower + $computerPlayer->abilitypower;\n $this->attackdamage = $humanPlayer->attackdamage + $computerPlayer->attackdamage;\n $this->armor = $humanPlayer->armor + $computerPlayer->armor;\n\n //how to add tools to a team\n $this->tools = $humanPlayer->tools;\n\n }", "public function create() : PlayerInterface;", "public function __construct($name, $health, $strength, $defence, $speed, $luck) \n { \n $this->name = $name;\n $this->health = $health;\n $this->strength = $strength;\n $this->defence = $defence;\n $this->speed = $speed;\n $this->luck = $luck;\n echo $this->luck;\n echo \"Player created\". '<br>'; \n/*\nName Orderus\nmt_rand() ?\n● Health: 70 - 100\n● Strength: 70 - 80\n● Defence: 45 – 55\n● Speed: 40 – 50\n● Luck: 10% - 30% (0% means no luck, 100% lucky all the time). */\n }", "public function testInitialValueOfNameIsNotNull()\n {\n $url = \"https://www.google.com/\";\n $pos = new Position(0, 0);\n $player = new Player($url, $pos);\n\n $this->assertNotNull($player->name());\n }", "private function createPlayers()\n {\n echo \"Welcome to dominos \\n\";\n\n // Ask the user for how many players will be playing\n do {\n $playerCountInput = readline(\"Please enter how many people are playing (min 2, max 4 players): \"); \n Game::clearDisplay();\n } while( $this->validatePlayerCount($playerCountInput) === false );\n \n for( $i = 0; $i < $playerCountInput; $i++ ) {\n $this->players[] = New Player($i);\n }\n }", "function __construct( $player1, $player2 ){\n $this->player1 = $player1;\n $this->player2 = $player2;\n }", "public static function create(array $data): Player\n {\n $player = new Player();\n parent::fill($data, $player);\n if (is_array($player->clan)) {\n $player->clan = Clan::create($player->clan);\n }\n if (is_array($player->league)) {\n $player->league = League::create($player->league);\n }\n return $player;\n }", "public function createGame($player){\n \t$map = $this->maps[mt_rand(0, count($this->maps) - 1)];\n $this->getPlayerData($player->getName())->setMap($map);\n\n \t$this->getPlugin()->createMap($player, $map);\n\n \t$pos = new Position(100, 52, 100, $this->getPlugin()->getServer()->getLevelByName($map.\"-\".$player->getName()));\n \t$player->teleport($pos);\n $this->getPlayerData($player->getName())->npc = Entity::createEntity(\"CustomNPC\", $player->level, Entity::createBaseNBT(new Vector3(100.5, 51, 100.5)));\n $this->getPlayerData($player->getName())->npc->setPlayer($player);\n }", "public function __construct($player1, $player2) \n {\n $this->player1 = $player1;\n $this->player2 = $player2;\n }", "protected function grabPlayer() {\n if(count($this->player) > 0) {\n $playerModel = new Player($this->world);\n $evaluateModel = false;\n \n foreach($this->player as $player) {\n $this->dataPlayer[$player['id']] = $player;\n \n if($player['showText']) {\n $playerModel = $playerModel->orWhere('playerID', $player['id']);\n $evaluateModel = true;\n }\n }\n\n if($evaluateModel) {\n foreach($playerModel->get() as $player) {\n $this->dataPlayer[$player->playerID]['name'] = BasicFunctions::decodeName($player->name);\n }\n }\n }\n }", "function db_create_player($name, $nickname) {\n\t_db_beginTransaction();\n\t$sql = \"INSERT INTO players (fullname, nickname) VALUES (?, ?)\";\n\t$params = [$name, $nickname];\n\t_db_prepare_execute($sql, $params);\n\t_db_commit();\n}", "function AddPlayer($id,\n $name,\n $nflteam,\n $position,\n $bye, \n $points)\n {\n $query = \"INSERT INTO $this->tableName (ID, Name, NFLTeam, Position, Points, Bye) \n VALUES ('$id', '$name', '$nflteam', '$position', '$points', '$bye');\";\n $this->ExecuteQuery($query);\n }", "public function __construct(IGamePlayer $gamePlayer, $name)\n {\n $classname = get_class($gamePlayer);\n if (strpos($classname, 'Proxy') === false) {\n echo \"can not make role\";\n die;\n } else {\n $this->name = $name;\n }\n }", "public function setPlayers()\n { // $player_count = 2 as params later on?\n // Later on put some crap in here where they can choose to have...\n // computer v computer, human v human, human v computer.\n // use php switch() method\n $this->white = new HumanPlayer(\"White\", \"Supsupin\");\n $this->black = new HumanPlayer(\"Black\", \"Theodore\");\n }", "public function createPlayer($name, $password, $email, $iso, $rank = 0)\n {\n // Check for valid ISO\n $iso = trim($iso);\n if (strlen($iso) != 2)\n throw new ArgumentException('Invalid country ISO passed: '. $iso, 'iso');\n\n // Check length of player name\n $name = preg_replace(\"/[^\". Player::NAME_REGEX .\"]/\", '', trim($name));\n if (empty($name))\n throw new ArgumentException('Empty player name passed', 'name');\n else if (strlen($name) > 32)\n throw new ArgumentException('Player name cannot be longer than 32 characters!', 'name');\n\n // Prepare statement\n\n return $this->pdo->insert('player', [\n 'name' => $name,\n 'password' => md5(trim($password)),\n 'rank_id' => (int)$rank,\n 'email' => trim($email),\n 'country' => $iso\n ]);\n }", "public function add_player($player_name) {\n\t\tif ( array_key_exists('0', $this->names) ) {\n\t\t\t$this->names[0] = '';\n\t\t}\n\n\t\t// Add next Player to the names array\n\t\tarray_push($this->names, $player_name);\n\t}", "public function __construct($points) { }", "private function createPlayers(): array\n {\n $simpleRollingStrategy = new SimpleRollingStrategy();\n $roller = new Roller();\n return [\n new Player($this->faker()->name, $simpleRollingStrategy, $roller),\n new Player($this->faker()->name, $simpleRollingStrategy, $roller),\n new Player($this->faker()->name, $simpleRollingStrategy, $roller),\n new Player($this->faker()->name, $simpleRollingStrategy, $roller),\n ];\n }", "public function run()\n {\n // should be a large enough number to have plenty of all kinds of players\n factory(\\App\\Player::class, 600)->create();\n }", "public function __construct($name,$playerNumber,$size)\n {\n $this->name = $name;\n $this->valve = false;\n if($playerNumber == 1){\n $this->pipeline[] = new TileSource(0,$size/2-3,$name);\n $this->pipeline[] = new TileGaugeBottom($size+1,$size/2-2,$name);\n $this->pipeline[] = new TileGaugeTop($size+1,$size/2-3,$name);\n $this->steamline[]= new TileSteam(1,$size/2-3,TileSteam::W,$name);\n }elseif ($playerNumber == 2){\n $this->pipeline[] = new TileSource(0,$size/2+2,$name);\n $this->pipeline[] = new TileGaugeBottom($size+1,$size/2+1,$name);\n $this->pipeline[] = new TileGaugeTop($size+1,$size/2,$name);\n $this->steamline[] = new TileSteam(1,$size/2+2,TileSteam::W,$name);\n }\n }", "private function gameStarter(string $name)\n {\n $this->game = new Game($name, Carbon::now());\n $this->game->start();\n }", "public function spawnSimpleNPC(Player $player){\r\n $nbt = new CompoundTag;\r\n $nbt->Pos = new ListTag(\"Pos\", [\r\n new DoubleTag(\"\", $player->getX()),\r\n new DoubleTag(\"\", $player->getY()),\r\n new DoubleTag(\"\", $player->getZ())\r\n ]);\r\n\r\n $nbt->Motion = new ListTag(\"Motion\", [\r\n new DoubleTag(\"\", 0) ,\r\n new DoubleTag(\"\", 0),\r\n new DoubleTag(\"\", 0)\r\n ]);\r\n\r\n $nbt->Rotation = new ListTag(\"Rotation\", [\r\n new FloatTag(\"\", $player->getYaw()),\r\n new FloatTag(\"\", $player->getPitch())\r\n ]);\r\n $nbt->Health = new ShortTag(\"Health\", 20);\r\n $nbt->Skin = new CompoundTag(\"Skin\", [\r\n \"Data\" => new StringTag(\"Data\", $player->getSkinData()),\r\n \"Name\" => new StringTag(\"Name\", $player->getSkinId())\r\n ]);\r\n\r\n $npc = new Human($player->chunk, $nbt);\r\n $space = str_repeat(\" \", 10);\r\n $npc->setNameTag($space . Messages::$prefix . $space . \"\\n§9Choose a gamemode and play! \\n §9Current Players§f: \".$this->getPlayersPlayingCount());\r\n $npc->setNameTagVisible((bool) true);\r\n $npc->spawnToAll();\r\n $npc->sendData($player);\r\n $npc->setNameTagAlwaysVisible(true);\r\n }", "public function onPlayerCreation(PlayerCreationEvent $event) {\n\t\t$event->setPlayerClass(CustomPlayer::class);\n\t}", "function __construct() {\n parent::__construct('Players', 'Player');\n }", "public function create()\n {\n $player = new Player();\n return view('players.create')->with(compact('player'));\n }", "public function __construct($name = null) {\n \n if ($name !== null) {\n $this->setName($name);\n }\n \n \n //sane defaults\n $this->setIs_redpill(TRUE);\n $this->setHealth(10);\n $this->setRank(0);\n $this->setIs_jackedin(FALSE);\n $this->setId_hovercraft(NULL);\n \n\n }", "public function __construct($name = 'World') {\n\t\t$this->name = $name;\n\t}", "public function create(){\r\t\tglobal $db;\r\t\tif ($this->pass==''){return false;}\r\t\t$this->email=strtolower($this->email);\r\t\t$db->query(\"insert into player (display_name,email,avatar,pass,balance)\r\t\t\t\t\t\t\t\t\tvalues\r\t\t\t\t\t\t\t\t\t\t('\".$this->display_name.\"',\r\t\t\t\t\t\t\t\t\t\t\t'\".$this->email.\"' ,\r\t\t\t\t\t\t\t\t\t\t\t'\".$this->avatar.\"',\r\t\t\t\t\t\t\t\t\t\t\t'\".$this->pass.\"',\r\t\t\t\t\t\t\t\t\t\t\t'10000'\r\t\t\t\t\t\t\t\t\t\t)\");\r\t\t$this->id=$db->newId();\r\t}", "public static final function initializePlayer(Player $player): void {\n $rankFactory = Essentials::getRankFactory();\n\n if ($rankFactory->getPlayerRank($player->getName()) === null) {\n $rankFactory->setPlayerRank($player->getName());\n\n Essentials::getInstance()->getLogger()->info('Creating rank data for ' . $player->getName() . ' with default rank.');\n }\n\n $rank = $rankFactory->getPlayerRank($player->getName());\n\n $rankString = Essentials::getDefaultScoreboardFormat();\n\n if ($rank !== null && !$rank->isDefault()) $rankString = $rank->getFormat();\n\n Utils::setLines([$player], [\n 12 => '',\n 11 => ' Rango: ' . $rankString,\n 10 => ' Conexión: &a' . $player->getPing(),\n 9 => '',\n 8 => ' Baúles: &a10000',\n 7 => ' Polvo Misterioso: &a100000',\n 6 => '',\n 5 => ' Lobby: &e#' . Essentials::getServerId(),\n 4 => ' Conectados: &a' . count(Server::getInstance()->getOnlinePlayers()),\n 3 => '',\n 2 => '&e mc.onlymc.us'\n ]);\n }", "final public function __construct ($currentPlayer, $width, $height) {\n $this->currentPlayer = $currentPlayer;\n $this->width = $width;\n $this->height = $height;\n }", "public function __construct($points = 0)\n {\n $points = (int) $points;\n if($points <= 0) {\n $points = static::STARTING_POINTS;\n }\n\n $this->_totalPoints = $this->_remainingPoints = $points;\n }", "public function testInitialValueOfUuidIsNotNull()\n {\n $url = \"https://www.google.com/\";\n $pos = new Position(0, 0);\n $player = new Player($url, $pos);\n\n $this->assertNotNull($player->uuid());\n }", "public function __construct() {\r\n $this->username = empty($_POST['name']) ? \"Player\" : $_POST['name'];\r\n }", "public function __construct(CustomPlayer $player) {\n\t\t$this->authString = LifeboatDatabase::AUTH_STRING;\n\t\t$this->playerName = $player->getName();\n\n\t\t$this->playerName = preg_replace('/[^a-z_\\-0-9]/i', '', $this->playerName);\n\t\t$this->dbName = str_replace('_', '\\_', $this->playerName);\n\t}", "public function addPlayer($name)\n {\n if(isset($this->players[$name])) {\n return false;\n }\n\n $this->players[$name] = [\n 'player' => $name,\n 'elapsed' => null\n ];\n\n return true;\n }", "function join($id, $name){\n\t\t$color = ['#00FF00','#FF0000','#0000FF','#fc0adc','#09fc9b','#fcf708'];\n\t\t$choiceColor = sizeof($this->listPlayer);\n\t\t$this->listPlayer[] = new Player($id, $name, $color[$choiceColor]);\n\t}", "private function initDatabase(){\n\t\t\n\t\t$jonas = new Player('Jonas Valenciunas', 26,'Center', '4.66m');\n $this->mPlayers[] = $jonas;\n\n $kyle = new Player('Kyle Lowry', 32, 'Point Guard', '28.7m');\n $this->mPlayers[] = $kyle;\n\n $demar = new Player('Demar DeRozan', 28,'Shooting Guard', '26.54m');\n $this->mPlayers[] = $demar;\n\n $jakob = new Player('Jakob Poeltl', 22,'Center', '2.704m');\n $this->mPlayers[] = $jakob;\n\t}", "public function create_player($username, $password, $email) {\n $login_salt = substr(md5(uniqid(rand(), true)), 0, 5);\n\n $player_insert['username'] = $username;\n $player_insert['password'] = md5($password.$login_salt);\n $player_insert['email'] = $email;\n $player_insert['registered'] = time();\n $player_insert['last_active'] = time();\n $player_insert['ip'] = $_SERVER['REMOTE_ADDR'];\n $player_insert['login_salt'] = $login_salt;\n\n if($this->settings->get['verification_method']==1) {\n $player_insert['verified'] = 1;\n } else {\n $player_insert['verified'] = 0;\n }\n\n $player_insert_query = $this->db->AutoExecute('players', $player_insert, 'INSERT');\n \n if ($player_insert_query) {\n $this->player_id = $this->db->Insert_Id();\n } else {\n $this->player_id = 0;\n }\n\n $this->hooks->get(\"player/create\");\n\n return $this->player_id;\n }", "public function testPlayerName()\n {\n $game = new \\Soln\\Dice\\DiceGame(\"Test name\");\n $this->assertInstanceOf(\"\\Soln\\Dice\\DiceGame\", $game);\n\n $res = $game->playerName()[0];\n $exp = \"Test name\";\n $this->assertEquals($exp, $res);\n }", "public function test_player_created_correctly()\n {\n $faker = \\Faker\\Factory::create();\n\n $lastPlayerId = Player::all()->last()->id;\n\n $name = $faker->name;\n $phoneNumber = $faker->phoneNumber;\n $joinedAt = $faker->date();\n\n $player = [\n 'name' => $name,\n 'phone_number' => $phoneNumber,\n 'joined_at' => $joinedAt\n ];\n\n $response = $this->json('POST', '/api/players', $player);\n\n $response->assertStatus(201)\n ->assertJson([\n 'id' => $lastPlayerId+1,\n 'name' => $name,\n 'phone_number' => $phoneNumber,\n 'joined_at' => $joinedAt,\n ]);\n }", "public function __construct($id)\n {\n $this->player_id = $id;\n }", "public function createOnRequestHumanControlledOnExistingPlayer()\n {\n $player = static::$playerModel->createOnRequestHumanControlled(LoadPlayerData::TEST_HUMAN_PLAYER_EMAIL);\n\n $this->assertEquals(LoadPlayerData::TEST_HUMAN_PLAYER_EMAIL, $player->getName());\n $this->assertFalse(PlayerModel::isAIControlled($player));\n\n /** because player is already persisted */\n $this->assertNotNull($player->getId());\n }", "public function __construct(Player $player, string $status)\n\t{\n\t\t$this->player = $player;\n\t\t$this->status = $status;\n\t}", "public function create (Player $challenger, array $opponents, string $channel) : GameInterface;", "protected function setupNewGame( $players, $options = array() )\n { \n // Set the colors of the players with HTML color code\n // The default below is red/green/blue/orange/brown\n // The number of colors defined here must correspond to the maximum number of players allowed for the gams\n $gameinfos = self::getGameinfos();\n $default_colors = $gameinfos['player_colors'];\n\n // Create players\n // Note: if you added some extra field on \"player\" table in the database (dbmodel.sql), you can initialize it there.\n $sql = \"INSERT INTO player (player_id, player_color, player_canal, player_name, player_avatar) VALUES \";\n $values = array();\n foreach( $players as $player_id => $player )\n {\n $color = array_shift( $default_colors );\n $values[] = \"('\".$player_id.\"','$color','\".$player['player_canal'].\"','\".addslashes( $player['player_name'] ).\"','\".addslashes( $player['player_avatar'] ).\"')\";\n }\n $sql .= implode( $values, ',' );\n self::DbQuery( $sql );\n self::reattributeColorsBasedOnPreferences( $players, $gameinfos['player_colors'] );\n self::reloadPlayersBasicInfos();\n \n /************ Start the game initialization *****/\n\n foreach( $players as $player_id => $player )\n {\n DBUtil::insertRow('playerinfo', array(\n 'playerid' => $player_id\n )); \n }\n\n self::setGameStateInitialValue('markerPosition', 6);\n self::setGameStateInitialValue('choosenDie', 0);\n self::setGameStateInitialValue('modifiertoken', 0);\n self::setGameStateInitialValue('modifiervalue', 0);\n self::setGameStateInitialValue('dieTotal', 0);\n JSON::create('playerorderround');\n JSON::create('playerorderphase');\n JSON::create('playerpoints');\n JSON::create('flightpath');\n\n $systems = array();\n for ($value = 1; $value <= 17; $value++) {\n $systems[] = array('type' => 'system_' . $value, 'type_arg' => $value, 'nbr' => 1);\n }\n $this->systemcards->createCards($systems);\n $this->systemcards->shuffle('deck');\n\n /************ End of the game initialization *****/\n }", "public function createGame($size, $p1name, $p2name) {\n\n if($size < 6) {\n $size = 6;\n }\n\n $this->size = $size;\n $this->gameOver = false;\n $this->winner = -1;\n\n $this->currentPlayer = 0;\n\n $this->pipeOptions = array();\n for($i = 0; $i < 5; $i++) {\n array_push($this->pipeOptions, $this->getRandomPipe());\n }\n\n $this->players = array();\n array_push($this->players, new Player($p1name));\n array_push($this->players, new Player($p2name));\n\n $this->foundEnds = array();\n array_push($this->foundEnds, false);\n array_push($this->foundEnds, false);\n\n $this->setGrid();\n\n $this->getPlayer(0)->resetFlags();\n $this->getPlayer(0)->getPipes()[0]->indicateLeaks();\n\n $this->getPlayer(1)->resetFlags();\n $this->getPlayer(1)->getPipes()[0]->indicateLeaks();\n }", "public function setName(string $name) : Player\n {\n $this->name = $name;\n return $this;\n }", "abstract protected function setupNewGame(array $players, array $options = []);", "public function testCreateObjectNoAI()\n {\n $isAI = false;\n $name = \"Niko\";\n $amountOfDices = 2;\n\n $player = new Player($isAI, $amountOfDices, $name);\n $this->assertInstanceOf(\"\\Niko\\DiceGame\\Player\\Player\", $player);\n\n $this->assertCount($amountOfDices, $player->getDiceArray());\n $this->assertContainsOnlyInstancesOf(\"\\Niko\\DiceGame\\Dice\\Dice\", $player->getDiceArray());\n\n $this->assertFalse($player->IsAI());\n }", "public function __construct(Player $player,$requestIp)\n {\n $this->player = $player;\n $this->requestIp = $requestIp;\n }", "public function __construct()\n {\n $this->playerPoints = array();\n $this->playerTurnPoints = array();\n $this->computerPoints = array();\n $this->computerTurnPoints = array();\n $this->numberOfDices = 2;\n $this->dice = new Dice();\n }", "public function __construct()\n {\n parent::__construct();\n \n $this->player = env('GAME_PLAYER');\n }", "public function newGame() {\n $this->board = new Board();\n $this->currentPlayer = Colour::WHITE;\n }", "function add_player($name, $birth, $division, $position, $about, $date_signed, $picture){\n\t\t$signed = date($date_signed);\n\t\t$dbirth = date($birth);\n\t\tif ($this->player->add_player($this->dbc, $name, $dbirth, $division, $position, $about, $signed, $picture)) {\n\t\t\t//alert player has been added\n\t\t\techo $name.\" has been added\";\n\t\t}else{ echo $name.\" has not been added\"; }\n\t}", "static public function init($idPlayer, $idLevel, $time, $nbClicks, $nbItems) {\n $instance = new self();\n $instance->id = NULL;\n $instance->idPlayer = $idPlayer;\n $instance->idLevel = $idLevel;\n $instance->time = $time;\n $instance->nbClicks = $nbClicks;\n $instance->nbItems = $nbItems;\n return $instance;\n }", "function test_getName()\n {\n //Arrange\n $name = \"Tonka\";\n $hp = 15;\n // $mail = \"player@place.com\";\n $init = 11;\n $ac = 10;\n $summary = \"myimage.jpg\";\n $id_team = 1;\n $enemy = 0;\n $test_player = new Player($name, $hp, $ac, $init, $summary =\"\", $enemy, $id_team);\n //Act\n $result = $test_player->getName();\n //Assert\n $this->assertEquals($name, $result);\n // echo(\"Name get \\n\");\n }", "public function __construct($id_players = [], $data = [], $message = \"\")\n {\n $this->id_players = $id_players;\n $this->data = $data;\n $this->message = $message;\n }", "public function newPlayer(Request $request) {\n \n Log::debug(\"newPlayer(Request $request)\");\n \n \n // Validate name, required\n $this->validate($request, [\n 'name' => 'required|max:255',\n ]);\n\n $player = new Player();\n $player->name = $request->name;\n $player->save();\n \n return redirect('/');\n }", "protected function create(Request $request)\n {\n $profile = new Profile();\n if (!empty($request['introduction'])) {\n $profile->introduction = $request['introduction'];\n }\n $profile->save();\n\n $player = new Player();\n $player->profile_id = $profile->id;\n $player->name = $request['player']['name'];\n $player->email = $request['player']['email'];\n $player->password = bcrypt($request['player']['password']);\n $player->activation_code = rand(1000000, 9999999);\n $player->save();\n return $player;\n }", "protected function setupNewGame( $players, $options = array() )\r\n { \r\n // Set the colors of the players with HTML color code\r\n // The default below is red/green/blue/orange/brown\r\n // The number of colors defined here must correspond to the maximum number of players allowed for the gams\r\n $gameinfos = self::getGameinfos();\r\n $default_colors = $gameinfos['player_colors'];\r\n \r\n // Create players\r\n // Note: if you added some extra field on \"player\" table in the database (dbmodel.sql), you can initialize it there.\r\n $sql = \"INSERT INTO player (player_id, player_color, player_canal, player_name, player_avatar) VALUES \";\r\n $values = array();\r\n foreach( $players as $player_id => $player )\r\n {\r\n $color = array_shift( $default_colors );\r\n $values[] = \"('\".$player_id.\"','$color','\".$player['player_canal'].\"','\".addslashes( $player['player_name'] ).\"','\".addslashes( $player['player_avatar'] ).\"')\";\r\n }\r\n $sql .= implode( $values, ',' );\r\n self::DbQuery( $sql );\r\n self::reattributeColorsBasedOnPreferences( $players, $gameinfos['player_colors'] );\r\n self::reloadPlayersBasicInfos();\r\n \r\n /************ Start the game initialization *****/\r\n\r\n // Init global values with their initial values\r\n self::setGameStateValue(\"turn_number\", 1);\r\n self::setGameStateValue(\"player_turns_taken\", 0);\r\n self::initCounties();\r\n self::initEdges();\r\n\r\n // Init game statistics\r\n self::initStat(\"player\", \"districts_won\", 0);\r\n self::initStat(\"player\", \"swing_counties_won\", 0);\r\n self::initStat(\"player\", \"total_district_margin\", 0);\r\n self::initStat(\"player\", \"average_district_margin\", 0);\r\n self::initStat(\"player\", \"districts_won_player\", 0);\r\n self::initStat(\"player\", \"total_district_margin_player\", 0);\r\n self::initStat(\"player\", \"average_district_margin_player\", 0);\r\n self::initStat(\"player\", \"districts_won_opponent\", 0);\r\n self::initStat(\"player\", \"total_district_margin_opponent\", 0);\r\n self::initStat(\"player\", \"average_district_margin_opponent\", 0);\r\n\r\n // Activate first player (which is in general a good idea :) )\r\n $this->activeNextPlayer();\r\n\r\n // Create save point for first player.\r\n self::createSavePoint();\r\n\r\n /************ End of the game initialization *****/\r\n }", "public function startGame() : void\n {\n $name = $this->getName();\n $language = $this->getLanguage();\n\n $explanation = \"Would you like to play as a (1) fighter or (2) civilian?\\n\"\n .\"Fighters can challenge their opponents to a game \"\n .\"of Rock, Paper, Scissors. Civilians can play hangman.\";\n Player::displayMessage($explanation, 1);\n\n //Allows user to choose the type of player\n while (true){\n $player = Player::getUserInput(\"Please select a number: \");\n if($player == 1 || $player == 2){\n break;\n }\n }\n //Instantiates a Fighter or Civilian object\n if ($player == 1) {\n $this->setPlayer(new Fighter($name, $language));\n } else {\n $this->setPlayer(new Civilian($name, $language));\n }\n }", "public function create()\n {\n return view('player.create');\n }", "public function testAddPlayerAddsPlayerCorrectly()\n {\n $player_data = [\n 'tig_name' => 'Testy McTesterton',\n 'ibl_team' => 'MAD',\n 'item_type' => 1,\n 'comments' => 'Test item'\n ];\n\n // Create a mock insert object\n $insert = $this->getMockBuilder('stdClass')\n ->setMethods(['into', 'cols'])\n ->getMock();\n $insert->expects($this->once())\n ->method('cols')\n ->will($this->returnValue($insert));\n $insert->expects($this->once())\n ->method('into')\n ->will($this->returnValue($insert));\n\n // Create a mock DB connection\n $db = $this->getMockBuilder('stdClass')\n ->setMethods(['newInsert', 'query'])\n ->getMock();\n $db->expects($this->once())\n ->method('newInsert')\n ->will($this->returnValue($insert));\n $db->expects($this->once())\n ->method('query')\n ->will($this->returnValue(true));\n\n // Create a new roster object\n $roster = new Roster($db);\n\n // Assert that true was returned when adding a player\n $this->assertTrue(\n $roster->addPlayer($player_data),\n 'addPlayer() did not correctly add a new player'\n );\n }", "public function __construct(Player $player, Match $match)\n {\n $this->player = $player;\n $this->match = $match;\n }", "public function __construct($number_of_players) {\n\t\tif (isset($number_of_players)) {\n\t\t\t$this->number = $number_of_players;\n\t\t} else {\n\t\t\t$this->number = '';\n\t\t}\n\n\t\t// Create the array variable names to hold player's names\n\t\t$this->names = array();\n\n\t}", "public function make_player() {\n $this->hooks->get(\"player/make/pre\");\n \n $id = 0;\n if ($_COOKIE['logged_in_user_id']) { // VVV\n $id = $_COOKIE['logged_in_user_id']; // non-user-specific cookie\n } else {\n $id = $_SESSION['logged_in_user_id'];\n }\n code_cookie::set_id($id);\n \n if (is_array($this->joins)) {\n $query_joins = \"\";\n $query_selects = \"\";\n foreach ($this->joins as $table) {\n $query_joins .= \"LEFT JOIN `\".$table.\"` ON `p`.`id` = `\".$table.\"`.`player_id` \";\n $query_selects .= \", `\".$table.\"`.*\";\n }\n $player_query = $this->db->execute(\"SELECT `p`.*\".$query_selects.\" FROM `players` AS `p` \".$query_joins.\"\n WHERE `p`.`id`=?\", array(intval($id)));\n } else {\n $player_query = $this->db->execute(\"SELECT * FROM `players` WHERE `id`=?\", array(intval($id)));\n }\n\n $player_db = $player_query->fetchrow();\n \n $check = md5($player_db['id'].$player_db['password'].$player_db['login_rand']);\n\n if ($check == code_cookie::get('cookie_hash') || $check == $_SESSION['hash']) {\n $this->is_member = true;\n $last_active = time();\n \n $player_db['last_active'] = $last_active;\n \n $this->player_db_to_object($player_db);\n\n $this->registered_date = date(\"l, jS F Y\", $this->registered);\n $this->registered_days = intval((time() - $this->registered)/84600);\n\n $this->update_last_active($last_active);\n \n if ($this->halt_if_suspended()) {\n return false;\n }\n }\n \n $this->hooks->get(\"player/make/post\");\n return $this->halt_if_guest($this->page);\n }", "public function player(){\n\t\t$data = $this->raw('Player.GetActivePlayers');\n\t\t$data = $data->result;\n\t\tif (!$data)return null;\n\t\t\n\t\tif ($data->audio){\n\t\t\treturn new service\\AudioPlayer($this);\n\t\t}elseif($data->picture){\n\t\t\treturn new service\\PicturePlayer($this);\n\t\t}elseif($data->video){\n\t\t\treturn new service\\VideoPlayer($this);\n\t\t}\n\t\treturn null;\n\t}", "public function addPlayer(\\utilpb\\PbMemberInfo $value){\r\n return $this->_add(1, $value);\r\n }", "public function testInitalScoreIsZero()\n {\n $url = \"https://www.google.com/\";\n $pos = new Position(0, 0);\n $player = new Player($url, $pos);\n\n $this->assertEquals(0, $player->score());\n }", "protected function setUp(): void\n {\n $data = $this->getFixtureData('player.json');\n\n $this->player = new Player($this->client, $data);\n }", "public function __construct( $name )\n\t{\n\t\t$this->memberName\t\t= $name;\n\t}", "private function initialize_battle()\n\t{\n\n\t\t$message = \"******************************************\\n\";\n\t\t$message .=\"* \\t Initialising Players *\\n\";\n\t\t$message .=\"******************************************\\n\";\n\t\t$this->display_output($message);\n\t\t$this->set_players($this->initialize_players());\n\t\t\n\t\t\n\t\t$message = \"******************************************\\n\";\n\t\t$message .=\"* \\t Introducing Player STATS *\\n\";\n\t\t$message .=\"******************************************\\n\";\n\n\t\tforeach ($this->players as $player) {\n\t\t\t$message.=(string) $player;\n\t\t}\n\t\t$this->display_output($message);\n\t}", "protected function setupNewGame( $players, $options = array() )\n { \n $sql = \"DELETE FROM player WHERE 1 \";\n self::DbQuery( $sql ); \n\n // Set the colors of the players with HTML color code\n // The default below is red/green/blue/yellow/orange/brown\n // The number of colors defined here must correspond to the maximum number of players allowed for the game\n $default_colors = array( \"ff0000\", \"008000\", \"0000ff\", \"ffff00\", \"ffa500\", \"a52a2a\");\n\n \n // Create players\n // Note: if you added some extra field on \"player\" table in the database (dbmodel.sql), you can initialize it there.\n $sql = \"INSERT INTO player (player_id, player_color, player_canal, player_name, player_avatar) VALUES \";\n $values = array();\n foreach( $players as $player_id => $player )\n {\n $color = array_shift( $default_colors );\n $values[] = \"('\".$player_id.\"','$color','\".$player['player_canal'].\"','\".addslashes( $player['player_name'] ).\"','\".addslashes( $player['player_avatar'] ).\"')\";\n }\n $sql .= implode( $values, ',' );\n self::DbQuery( $sql );\n self::reloadPlayersBasicInfos();\n \n /************ Start the game initialization *****/\n // create round data record\n $sql = \"INSERT INTO data (verb, object) VALUES ('','')\";\n self::DbQuery( $sql );\n \n \n\n // Init global values with their initial values\n $this->setGameStateInitialValue( 'playerBuildingSentence', 0 );\n $this->setGameStateInitialValue( 'topSentenceBuilder', 0 );\n $this->setGameStateInitialValue( 'role', 0 ); // 1 = Hero, 2 = Villain\n $this->setGameStateInitialValue( 'currentRound', 0 );\n $this->setGameStateInitialValue( 'championRole', 0 ); // 1 = Hero, 2 = Villain\n \n if (count($players) < 6) {\n $this->setGameStateInitialValue( 'totalRounds', count($players) *2 );\n } else {\n $this->setGameStateInitialValue( 'totalRounds', count($players) );\n }\n \n // Init game statistics\n // (note: statistics used in this file must be defined in your stats.inc.php file)\n //self::initStat( 'table', 'table_teststat1', 0 ); // Init a table statistics\n //self::initStat( 'player', 'player_teststat1', 0 ); // Init a player statistics (for all players)\n self::initStat( 'table', 'rounds_number', 0 );\n self::initStat( 'player', 'best_memory', FALSE);\n self::initStat( 'player', 'votes_for', 0);\n self::initStat( 'player', 'votes_against', 0);\n self::initStat( 'player', 'votes_percent', 0);\n self::initStat( 'player', 'elections_won', 0);\n self::initStat( 'player', 'total_elections', 0);\n\n\n // TODO: setup the initial game situation here\n // Create cards\n $start_cards = array(); // these will form the first sentence\n foreach( $this->colors as $color_id => $color ) // spade, heart, diamond, club\n {\n\t\t\t$cards = array();\n\t\t\t\n for( $value=2; $value<=$color['num_cards']+1; $value++ ) // 2, 3, 4, ... K, A\n {\n $cards[] = array( 'type' => $color_id, 'type_arg' => $value, 'nbr' => 1);\n }\n\t\t\t$this->cards->createCards( $cards, 'deck-'.$color_id );\n\t\t\t$this->cards->shuffle( 'deck-'.$color_id );\n if ($color_id != 5) { // no orange cards\n\t\t\t $this->cards->pickCardForLocation('deck-'.$color_id, 'top_sentence', rand(1,4) );\n }\n\t\t}\n \n\n // Activate first player (which is in general a good idea :) )\n $this->activeNextPlayer();\n\n /************ End of the game initialization *****/\n }", "public function addplayer($playerid) {\n $player = new player();\n $name = sprintf('Player %d', $playerid);\n $player->name = $name;\n $this->names[] = $name;\n $player->id = $playerid;\n $this->players[$playerid] = $player;\n return $player;\n }", "public function __construct(string $name);", "function __construct(PSK_Object $par_Owner, $par_Name = '')\n\t{\n\t\tparent::__construct($par_Owner, $par_Name);\n\t\t$this->__session = PSK_Session::getInstance();\n\t\t$this->__config = PSK_Config::getInstance();\n\t}", "public function __construct($name)\n{\n\t$this->name = $name; //le personnage sur lequel j'agis\n}", "function newGame()\n\t{\n\t\t//setup the game\n\t\t$this->start();\n\n\t\t//reset the player\n\t\t$this->player = \"X\";\n\t\t$this->totalMoves = 0;\n $this->newBoard();\n\t}", "public function __construct($name){\n // This is a constructor function, this is firstly executed method when class in instantiated\n $this->name = $name;\n $this->age = 18;\n }", "function create($data)\n\t{\n\t\tglobal $database;\n\t\t$this->data = $data;\n\t\t$database->insert('lg_game_teams', $data);\n\t\t\n\t\t//next line not needed at the moment...but who knows. \n\t\t$this->load_players();\n\t}", "public function __construct($name,$annotation, $answers, $points)\n {\n $this->name = $name;\n $this->annotation = $annotation;\n $this->answers = $answers;\n $this->points = $points;\n }", "public function __construct($name, $type, $damage){\n $this->name = $name;\n $this->type = new Pokemon_Type($type);\n $this->damage = $damage;\n }", "public function testInitialValueOfIsKilledIsFalse()\n {\n $url = \"https://www.google.com/\";\n $pos = new Position(0, 0);\n $player = new Player($url, $pos);\n\n $this->assertFalse($player->isKilled());\n }", "public function actionCreate()\n {\n $model=new Player();\n $trans=Yii::$app->db->beginTransaction();\n try\n {\n $model->scenario=\"create\";\n if($model->load(Yii::$app->request->post()) && $model->save())\n {\n $playerSsl=new PlayerSsl();\n $playerSsl->player_id=$model->id;\n $playerSsl->generate();\n $playerSsl->save();\n $trans->commit();\n return $this->redirect(['view', 'id' => $model->id]);\n }\n }\n catch(\\Exception $e)\n {\n $trans->rollBack();\n \\Yii::$app->getSession()->setFlash('error', 'Failed to create player. '.$e->getMessage());\n }\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function run()\n {\n $role = PLayerRole::get();\n for($i=0; $i<10; $i++){\n Player::create([\n 'name' => Rand::get('male', '', 4, 15)->name(),\n 'nick' => Rand::get('male', '', 4, 15)->surname(),\n 'role_id' => ($i % $role->count() + 1),\n 'team_id' => random_int(1, 5),\n ]);\n }\n }", "public function __construct($player, $session)\n {\n $this->player = $player;\n $this->session = $session;\n }", "protected function setupNewGame( $players, $options = array() )\n {\n // The default below is red/green/blue/orange/brown\n // The number of colors defined here must correspond to the maximum number of players allowed for the gams\n $gameinfos = self::getGameinfos();\n $default_colors = $gameinfos['player_colors'];\n \n // Create players\n // Note: if you added some extra field on \"player\" table in the database (dbmodel.sql), you can initialize it there.\n $sql = \"INSERT INTO player (player_id, player_color, player_canal, player_name, player_avatar, player_score, player_score_aux) VALUES \";\n $values = array();\n foreach( $players as $player_id => $player )\n {\n $color = array_shift( $default_colors );\n $values[] = \"('\".$player_id.\"','$color','\".$player['player_canal'].\"','\".addslashes( $player['player_name'] ).\"','\".addslashes( $player['player_avatar'] ).\"',1,1)\";\n }\n $sql .= implode( $values, ',' );\n self::DbQuery( $sql );\n self::reattributeColorsBasedOnPreferences( $players, $gameinfos['player_colors'] );\n self::reloadPlayersBasicInfos();\n\n $crazyPlayers = array();\n foreach(self::loadPlayersBasicInfos() as $player_id => $player) {\n $crazyPlayers[$player['player_no']] = [ CrazyFarmers::get_Color($player['player_color']), strval($player_id), $player['player_name'] ];\n }\n \n\n\n /************ Start the game initialization *****/\n\n // Init global values with their initial values\n //self::setGameStateInitialValue( 'my_first_global_variable', 0 );\n \n // Init game statistics\n // (note: statistics used in this file must be defined in your stats.inc.php file)\n //self::initStat( 'table', 'table_teststat1', 0 ); // Init a table statistics\n //self::initStat( 'player', 'player_teststat1', 0 ); // Init a player statistics (for all players)\n\n // TODO: setup the initial game situation here\n\n self::initStat( \"table\", \"turns_number\", 1);\n self::initStat( \"table\", \"fences_drawn\", 0);\n self::initStat( \"table\", \"fences_cut\", 0);\n self::initStat( \"table\", \"takeovers_number\", 0);\n self::initStat( \"table\", \"biggest_takeover\", 0);\n self::initStat( \"table\", \"freebarns_number\", 0);\n self::initStat( \"table\", \"occupiedbarns_number\", 0);\n self::initStat( \"table\", \"cardsplayed_number\", 0);\n self::initStat( \"table\", \"haybales_number\", 0);\n self::initStat( \"table\", \"dynamites_number\", 0);\n self::initStat( \"table\", \"haybales_max_number\", 0);\n self::initStat( \"table\", \"haybales_moved_number\", 0);\n self::initStat( \"table\", \"helicopters_number\", 0);\n self::initStat( \"table\", \"highvoltages_number\", 0);\n self::initStat( \"table\", \"watchdogs_number\", 0);\n self::initStat( \"table\", \"bribes_number\", 0);\n self::initStat( \"table\", \"nitro1_number\", 0);\n self::initStat( \"table\", \"nitro2_number\", 0);\n self::initStat( \"table\", \"ruts_number\", 0);\n\n self::initStat( \"player\", \"fences_drawn\", 0);\n self::initStat( \"player\", \"fences_cut\", 0);\n self::initStat( \"player\", \"cut_number\", 0);\n self::initStat( \"player\", \"takeovers_number\", 0);\n self::initStat( \"player\", \"biggest_takeover\", 0);\n self::initStat( \"player\", \"freebarns_number\", 0);\n self::initStat( \"player\", \"occupiedbarns_number\", 0);\n self::initStat( \"player\", \"cardsplayed_number\", 0);\n self::initStat( \"player\", \"haybales_number\", 0);\n self::initStat( \"player\", \"dynamites_number\", 0);\n self::initStat( \"player\", \"helicopters_number\", 0);\n self::initStat( \"player\", \"highvoltages_number\", 0);\n self::initStat( \"player\", \"watchdogs_number\", 0);\n self::initStat( \"player\", \"bribes_number\", 0);\n self::initStat( \"player\", \"nitro1_number\", 0);\n self::initStat( \"player\", \"nitro2_number\", 0);\n self::initStat( \"player\", \"ruts_number\", 0);\n self::initStat( \"player\", \"rutted_number\", 0);\n\n switch ($this->gamestate->table_globals[100])\n {\n case 1:\n $goalType = new GoalType_Fast();\n break;\n case 3:\n $goalType = new GoalType_Expert();\n break;\n default:\n $goalType = new GoalType_Regular();\n }\n\n switch ($this->gamestate->table_globals[101])\n {\n case 2:\n $undoType = new UndoType_DontUndoCards();\n break;\n case 3:\n $undoType = new UndoType_NoUndo();\n break;\n default:\n $undoType = new UndoType_FullUndo();\n }\n\n switch ($this->gamestate->table_globals[102])\n {\n case 2:\n $useGameOver = true;\n break;\n default:\n $useGameOver = false;\n }\n\n\n\n $goal = Shared_002EGoalModule___fromType(count($players), $goalType);\n\n $cmd = new BoardCommand_Start(\n new BoardStart(\n FSharpList::ofArray($crazyPlayers),\n $goal,\n $undoType,\n $useGameOver));\n $board = $GLOBALS['Shared_002EBoardModule___initialState'];\n $es = Shared_002EBoardModule___decide($cmd, $board);\n \n self::saveEvents($es);\n \n \n $board = self::fold($board, $es);\n\n\n self::setGameStateInitialValue( 'board', json_encode(convertToJson($board)) );\n\n // Activate first player (which is in general a good idea :) )\n $this->activeNextPlayer();\n\n /************ End of the game initialization *****/\n }", "public function create()\n {\n // show a form for creating a NEW player (route '/spieler/erstellen'; view 'players.create'); followed by store\n return view('players.create');\n }", "public function actionCreate()\n {\n $model = new Player();\n $trans = Yii::$app->db->beginTransaction();\n try {\n $model->scenario = \"create\";\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n $playerSsl = new PlayerSsl();\n $playerSsl->player_id = $model->id;\n $playerSsl->generate();\n $playerSsl->save();\n $trans->commit();\n return $this->redirect(['view', 'id' => $model->id]);\n }\n } catch (\\Exception $e) {\n $trans->rollBack();\n \\Yii::$app->getSession()->setFlash('error', Yii::t('app','Failed to create player. {exception}', ['attribute'=>Html::encode($e->getMessage())]));\n }\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function createOnRequestHumanControlledOnNonExistingPlayer()\n {\n $player = static::$playerModel->createOnRequestHumanControlled('NON-EXISTING-HUMAN-PLAYER');\n\n $this->assertEquals('NON-EXISTING-HUMAN-PLAYER', $player->getName());\n $this->assertFalse(PlayerModel::isAIControlled($player));\n\n /** because player is not persisted yet */\n $this->assertNull($player->getId());\n }", "public function resetPlayer($name)\n {\n if(!isset($this->players[$name])) {\n return false; \n }\n\n $this->players[$name]['elapsed'] = null;\n\n return $this;\n }", "public function __construct(Playground $playground, string $name, bool $public, Phase $phase)\n {\n $this->playground = $playground;\n $this->name = $name;\n $this->public = $public;\n $this->phase = $phase;\n }", "public function __construct(string $name = 'Hentai Tensai Shoujo') {\n $this->name = $name;\n }", "public function create()\n {\n $players = Player::all();\n return view('players/create', ['players' => $players]);\n }", "public function testAddPoints()\n {\n $game = new Game([\"Computer\", \"Me\"], 100, 2);\n $this->assertInstanceOf(\"\\Peo\\Dice\\Game\", $game);\n\n // Roll the dices\n $game->roll();\n $res = $game->getSumCurrent();\n\n // First check that points are null for both players\n $players = $game->getPlayers();\n $this->assertNull($players[\"Computer\"]);\n $this->assertNull($players[\"Me\"]);\n\n // Add the $points\n $game->addPoints(\"Computer\");\n $game->addPoints(\"Me\");\n\n // Check that points are correct after adding\n $players = $game->getPlayers();\n $this->assertEquals($res, $players[\"Computer\"]);\n $this->assertEquals($res, $players[\"Me\"]);\n }", "function __construct($Name = '') // constructor\n\t\t{ $this->Name = $Name; $this->Reset(); $this->PKeys = array(); }", "public function run()\n {\n Game::create([\n 'name' => \"CS:GO\",\n 'description' => \"FPS 1st person\",\n 'players_team' => 5\n ]);\n\n Game::create([\n 'name' => \"LOL\",\n 'description' => \"MOBA\",\n 'players_team' => 5\n ]);\n\n Game::create([\n 'name' => \"Fortnite\",\n 'description' => \"FPS 3rd person\",\n 'players_team' => 5\n ]);\n }", "public function init(){\n\t\t$this->server=ServerAPI::request();\n\t\t$this->dir=$this->server->api->plugin->configPath($this);\n\t\t@mkdir($this->dir.\"players/\");\n\t\t$this->initialize();\n\t}" ]
[ "0.75646675", "0.7030315", "0.66361034", "0.65837073", "0.6536788", "0.6305783", "0.6302668", "0.6270241", "0.6146727", "0.6139227", "0.61200804", "0.6095816", "0.609405", "0.6033344", "0.5997286", "0.597451", "0.59226304", "0.5910229", "0.5876709", "0.58662915", "0.5856563", "0.58184624", "0.5764419", "0.57351196", "0.5701678", "0.56728536", "0.5652529", "0.56409824", "0.55885047", "0.5585649", "0.55758834", "0.55438745", "0.553268", "0.5530376", "0.55213386", "0.5513896", "0.5511743", "0.55072916", "0.5490054", "0.54777414", "0.5470544", "0.5455725", "0.5455324", "0.54469544", "0.54413706", "0.5431662", "0.5419106", "0.5414116", "0.54092175", "0.54054844", "0.53976893", "0.53939635", "0.53776884", "0.53752315", "0.5359734", "0.5351057", "0.53502315", "0.53444135", "0.5335647", "0.5328103", "0.5327124", "0.53243357", "0.5322584", "0.53159714", "0.5315813", "0.53142494", "0.5307137", "0.5307082", "0.53033674", "0.52989984", "0.52937514", "0.52704775", "0.5267224", "0.5259868", "0.5248366", "0.523122", "0.52305245", "0.52272063", "0.522597", "0.52209985", "0.52197164", "0.5219611", "0.5215799", "0.52140766", "0.5202825", "0.5202073", "0.52000666", "0.5195984", "0.51937133", "0.5193221", "0.5191923", "0.5189267", "0.5188108", "0.5170889", "0.51685077", "0.51598316", "0.5159366", "0.51586586", "0.51515114", "0.5146914" ]
0.7788808
0
Returns true if players total points is greater than or equal to 100 else false
Возвращает true, если общая сумма очков игроков больше или равна 100, иначе false
public function hasWon() { return $this->totalPoints >= 100; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function validatePoints()\n {\n $original_points = (int)UserBagQuery::create()->findPk($this->getBagId())->getTotalPoints();\n $original_points += BagsPeer::EXTRA_POINTS;\n // Add extra points allowed by admin\n if ($this->isNew()) {\n $points = $this->getTotalPoints() + ($this->getQuantity() * $this->getPoints());\n if ($points > $original_points) {\n return false;\n }\n } else {\n // If not new than need to figure out whether this is increase points or decrease points\n $totalPoints = 0;\n if ( $this->isColumnModified('user_bag_item.status') && $this->getStatus() == 'Active' ) {\n $totalPoints = (int)$this->getTotalPoints() + (int)($this->getPoints() * $this->getQuantity());\n } else {\n\n $items = UserBagItemQuery::create()\n ->filterByBagId($this->getBagId())\n ->filterByStatus('Active')\n ->find();\n foreach ($items as $item) {\n if ($item->getId() == $this->getId()) {\n $totalPoints = $totalPoints + ($this->getQuantity() * $this->getPoints());\n } else {\n $totalPoints = $totalPoints + ($item->getQuantity() * $item->getPoints());\n }\n }\n }\n\n if ($totalPoints > $original_points) {\n return false;\n }\n }\n return true;\n }", "public function hasTotalpoint(){\n return $this->_has(2);\n }", "private function has_enough_points($user, $points)\n {\n $total_points = WC_Points_Rewards_Manager::get_users_points($user);\n return $total_points >= $points;\n }", "public function compare()\n {\n if ($this->player->overallTotal >= 100) {\n echo \"Winner player\";\n $this->active = false;\n } elseif (100 <= $this->computer->overallTotal) {\n echo \"Winner computer\";\n $this->active = false;\n }\n }", "public function isPointsEnabled()\n {\n if ($this->isModuleEnabled('Enterprise_Reward') && $this->isModuleOutputEnabled('Enterprise_Reward')) {\n if (Mage::helper('enterprise_reward')->isEnabled()) {\n return true;\n }\n }\n\n return false;\n }", "function validate_coins($coinsBet,$coinsWon,$credits){\n\tif ($coinsBet <= $credits)\n\t\tif($coinsWon <= 10000)\n\t\t\treturn true;\n\n\treturn false;\n}", "public function validatePoints()\n {\n if ( $this->points_awarded > 100 ) {\n $this->addError('points_awarded', 'Marks should be less than a hundred');\n }\n }", "function altbetterThanAverage($classPoints, $yourPoints)\n{\n return array_sum($classPoints)/count($classPoints) < $yourPoints ? true : false;\n}", "public function cpuCheckScore()\n {\n $stay = false;\n if ($this->cpuTurnScore > 20) {\n $stay = true;\n if ($this->playerTotalScore > 87) {\n $stay = false;\n }\n }\n return $stay;\n }", "function betterThanAverage($classPoints, $yourPoints)\n{\n $average = array_sum($classPoints)/count($classPoints);\n if ($average < $yourPoints) {\n return true;\n }\n return false;\n}", "public function hasPercentage(): bool;", "public function isPointsAreValid($loyaltyPoints)\n {\n $memberProfile = $this->getMemberInfo();\n if ($memberProfile != null) {\n $points = $memberProfile->getAccount()->getPointBalance();\n if ($points >= $loyaltyPoints) {\n return true;\n }\n } else {\n return false;\n }\n }", "public function hasFightScore(){\r\n return $this->_has(5);\r\n }", "public function hasAssignedPoints(): bool {\n return $this->maxPointsBeforeFirstDeadline !== 0 || $this->maxPointsBeforeSecondDeadline !== 0;\n }", "public function addPetLevelPoints(int $points): bool {\n\t\t$this->levelUp(LevelCalculator::calculateLevelUp($points, $this->getPetLevel(), $remaining));\n\t\t$this->setPetLevelPoints($remaining);\n\t\t$this->calculator->updateNameTag();\n\t\treturn true;\n\t}", "public function exceeded(): bool;", "public function hasPoints(RacesSession $session)\n {\n return $this->checkEntrantsForValue($session, 'points');\n }", "public function testGetPlayersPoints()\n {\n $players = 5;\n $dices = 4;\n $withComputer = false;\n $counter = 0;\n $dicegame = new DiceGame($players, $withComputer, $dices);\n $esp = 0;\n\n while ($counter < 2) {\n $resarray = $dicegame -> rollDiceHand();\n if ($dicegame -> isValidRoll()) {\n $esp += array_sum($resarray);\n $counter++;\n } else {\n $esp = 0;\n $counter = 0;\n }\n }\n\n $dicegame -> nextPlayer();\n $res = $dicegame -> getPlayersPoints();\n $this -> assertEquals($esp, $res[0][1]);\n }", "private function check_if_limit() {\n global $DB;\n\n if ($this->option->limitanswers) {\n $maxplacesavailable = $this->option->maxanswers + $this->option->maxoverbooking;\n $bookedUsers = $DB->count_records(\"booking_answers\", array('optionid' => $this->optionid, 'waitinglist' => 0));\n $waitingUsers = $DB->count_records(\"booking_answers\", array('optionid' => $this->optionid, 'waitinglist' => 1));\n $allUsersCount = $bookedUsers + $waitingUsers;\n\n if ($maxplacesavailable > $allUsersCount) {\n if ($this->option->maxanswers > $bookedUsers) {\n return 0;\n } else {\n return 1;\n }\n } else {\n return FALSE;\n }\n } else {\n return 0;\n }\n }", "private function computerIntelligence() : bool\n {\n $roll = false;\n $computerScoreTotal = $this->computerScore + $this->computerRoundScore;\n $computerRoundScore = $this->computerRoundScore;\n $playerScoreTotal = $this->playerScore + $this->playerRoundScore;\n\n if ($computerRoundScore < 20) {\n $roll = true;\n }\n\n if (($playerScoreTotal - $computerScoreTotal) > 30) {\n $roll = true;\n }\n\n if (($computerScoreTotal) > 90\n || $playerScoreTotal > 90) {\n $roll = true;\n }\n\n if (($computerScoreTotal) > 100) {\n $roll = false;\n }\n\n return $roll;\n }", "public function hasScore(){\n return $this->_has(4);\n }", "public function checkWin(){\n $scores = array();\n foreach ($this->players as $player){\n $ps = $player->getScore();\n \n if ($ps > 42)\n {\n $this->win = TRUE;\n for ($playerid = 0; $playerid < count($this->players); $playerid++)\n {\n if ($this->players[$playerid]->getScore() <= 42)\n {\n array_push($scores, $this->players[$playerid]->getScore());\n }\n else\n {\n array_push($scores, 0);\n }\n }\n \n //print_r($scores);\n \n $winningvalue = max($scores);\n \n // echo $winningvalue;\n \n for ($playerid = 0; $playerid < count($scores); $playerid++)\n {\n if ($scores[$playerid] == $winningvalue)\n {\n echo \"<div class = 'victory'>\";\n echo \" \".$this->players[$playerid]->getName().\" won with a score of \".$this->getScores($playerid). \" \";\n echo \"</div>\";\n }\n }\n return;\n }\n \n }\n \n \n }", "public function testCheckWinnerNotAt100()\n {\n $game = new Game([\"Computer\", \"Me\"], 100, 1);\n $this->assertInstanceOf(\"\\Peo\\Dice\\Game\", $game);\n\n // Loop while both players are below win level\n while ($game->getPlayers()[\"Computer\"] < 100 &&\n $game->getPlayers()[\"Me\"] < 100) {\n // No winner\n $this->assertNull($game->checkWinner());\n\n // Get points for first player\n $game->roll();\n $game->addPoints(\"Computer\");\n\n // Get points for second player\n $game->roll();\n $game->addPoints(\"Me\");\n }\n }", "public function hasFightScore(){\r\n return $this->_has(2);\r\n }", "public function hasFightScore(){\r\n return $this->_has(2);\r\n }", "public function hasFightScore(){\r\n return $this->_has(2);\r\n }", "public function isPointsLimitValid($grandTotal, $loyaltyPoints)\n {\n $pointrate = $this->getPointRate();\n $requiredAmount = $pointrate * $loyaltyPoints;\n if ($requiredAmount <= $grandTotal) {\n return true;\n } else {\n return false;\n }\n }", "public function testAtLeastOneGoaliePlayerPerTeam()\n {\n $leagueStats = User::leagueStats();\n $min = User::$minNumberOfPlayersPerTeam;\n $max = User::$maxNumberOfPlayersPerTeam;\n\n $numPlayersPerTeam = $leagueStats->num_players_per_team;\n $numGoalies = $leagueStats->num_goalies;\n $numTeams = $leagueStats->num_teams;\n\n $this->assertTrue($numPlayersPerTeam >= $min && $numPlayersPerTeam <= $max, \"Number of players per team ($numPlayersPerTeam) not between ($min, $max)\");\n $this->assertTrue($numGoalies > $numTeams, $leagueStats->message ?? '');\n }", "public function isEnded()\n {\n return $this -> round > 3 || $this -> p1score > 100 || $this -> p2score > 100;\n }", "public function shouldRun()\n {\n if ($this->percentage == 0) {\n return false;\n }\n\n $random = $this->generator\n ->generateInt(0, 100);\n return $random <= $this->percentage;\n }", "public function isPoint() : bool\n {\n return $this->min == $this->max;\n }", "private function isInLimit($total)\n {\n $currencyConverter = new CurrencyHelper();\n $currency = \\Context::getContext()->currency;\n\n $minimum = $currencyConverter->convertToCurrency(\n $this->configuration->getField('amount_min'),\n $currency->iso_code\n );\n\n $maximum = $currencyConverter->convertToCurrency(\n $this->configuration->getField('amount_max'),\n $currency->iso_code\n );\n\n if ($minimum > $total || $total > $maximum) {\n return false;\n }\n\n return true;\n }", "public function hasScore(){\n return $this->_has(2);\n }", "function goalTest()\n {\n if ($this->pos == $this->goalpos) {\n return True;\n } else {\n return False;\n }\n }", "public function testAtLeastOneGoaliePlayerPerTeam ()\n {\n\n $players = User::player()->orderBy('ranking')->get();\n $goalies = User::goalie()->orderBy('ranking')->get();\n\n $numberOfGoalies = count($goalies);\n $numberOfPlayers = count($players);\n\n $numberOfTeams = ceil(($numberOfGoalies+$numberOfPlayers)/22);\n if($numberOfTeams % 2 == 1) $numberOfTeams--;\n if($numberOfTeams>$numberOfGoalies)\n {\n ($numberOfGoalies % 2 == 1) ? $numberOfTeams = $numberOfGoalies-1 : $numberOfTeams = $numberOfGoalies;\n }\n\n $this->assertTrue($numberOfGoalies>=$numberOfTeams);\n\n }", "public function isAlive()\n {\n return $this->points > 0;\n }", "public function hasPlayerStats()\n {\n return $this->player_stats !== null;\n }", "public function qualifier($user)\n {\n return $user->getPoints() >= 10;\n }", "public function testExceedingMaxScore()\n {\n $hand = new DiceHandler();\n $hand->p1Save(333);\n $val = $hand->isOver();\n $exp = true;\n $this->assertEquals($exp, $val);\n }", "public function check_branch_point($point) {\n $staff_username = $this->input->post('staff_username');\n $staff_password = $this->input->post('staff_password');\n\n $admin = $this->admin_model->get_admin($staff_username, $staff_password);\n\n if (!empty($admin) && isset($admin)) {\n $credit_balance = $this->point_model->get_branch_point_balance($admin['branch_id']);\n\n if ($point > $credit_balance['point_amt']) {\n $this->form_validation->set_message('check_branch_point', 'Insufficient of Branch Point');\n return FALSE;\n } else {\n return TRUE;\n }\n } else {\n return FALSE;\n }\n }", "public function qualifier($user)\n {\n return $user->getPoints() >= 1000;\n }", "public function points()\n {\n $playmakerIds = explode(',', $this->playmakers);\n // initialize the points with the starting points\n $points = $this->team->playoffs;\n\n // loop through all of the player ids in the playoffs\n foreach(NflStat::whereIn('player_id', $this->allIds())->where('week', '>', 17)->get() as $nflStat) {\n // double the multiplier if playmaker\n $multiplier = (in_array($nflStat->player_id, $playmakerIds)) ? 2 : 1;\n\n // increment the points\n $points += $nflStat->points() * $multiplier;\n }\n\n // return the sum\n return $points;\n }", "private function findPlayerPointsTotal($latestWeekPlayerScores, $playerName, $team) {\n\n foreach ($latestWeekPlayerScores as $id => $playerInfo) {\n // Name, team, points: $row[1], $row[2], $row[3]);\n $latestPlayerName = $playerInfo[0];\n $latestTeam = $playerInfo[1];\n if (($playerName == $latestPlayerName) && ($team == $latestTeam) ) {\n // We have a match so return the points value\n return $playerInfo[2];\n }\n }\n }", "public function checkAchievements($player){\r\n\r\n $res = array();\r\n // 100 pts achievement\r\n if ($player->totalPoints >= 100 && $player->totalPoints < 200){\r\n\r\n $tmpres = $player->addAchievement(\"first100\");\r\n if (!empty( $tmpres)){\r\n $res[] = $tmpres;\r\n }\r\n\r\n \r\n //500 pts achievemnet\r\n }elseif ($player->totalPoints >= 500 && $player->totalPoints < 600){\r\n \r\n $tmpres = $player->addAchievement(\"first500\");\r\n if (!empty( $tmpres)){\r\n $res[] = $tmpres;\r\n }\r\n }\r\n return $res;\r\n }", "function test_passed($mark)\n {\n return (float) $mark > TEST_PASSING_MARK;\n }", "public function hasMaxscore(){\n return $this->_has(5);\n }", "public function getAllPoints() {\r\n if(Mage::getSingleton('customer/session')->isLoggedIn()) {\r\n $customerData = Mage::getSingleton('customer/session')->getCustomer();\r\n $customerId = $customerData->getId();\r\n return Mage::getModel(\"loyalty/loyalty\")->getCollection()->addFieldToFilter('customer_id', $customerId);\r\n } return false;\r\n }", "function winner($totalP1, $totalP2) {\n if ($totalP1 > $totalP2 || $totalP2 === 22) {\n echo \"<br>Player One wins!\";\n } elseif ($totalP1 < $totalP2 || $totalP1 === 22) {\n echo \"<br>Player Two wins!\";\n } elseif ($totalP1 === $totalP2) {\n echo \"<br>Draw, play again\";\n }\n}", "public function hasLimit(): bool;", "public function isPenalty()\n {\n $type = intval($this->record['type']);\n\n return $type >= 70 && $type < 80;\n }", "public function getStats(): bool {}", "public function getStats(): bool {}", "public function check()\n {\n foreach($this->players->all() as $player) {\n\n $bets = $player->getBets();\n\n // Loop all the bets for this player\n foreach($bets as $bet) {\n\n $code = $bet->getHomeTeam() . \"-\" . $bet->getAwayTeam();\n\n // If the bet is an existing match\n if($match = $this->matches->find($code)) {\n\n $match->addBet($bet);\n\n // Compare the player score with the match score if the match is passed\n if($match->isPassed()) {\n\n $points = $this->calculatePoints($match, $bet);\n $bet->setPoints($points);\n $player->addPoints($points);\n\n }\n }\n }\n }\n }", "public function hasMaxskillpos(){\n return $this->_has(3);\n }", "public function reachesMinimumAmount()\n {\n return $this->discounted_total >= static::getMinimumAmount();\n }", "public function arePointsShown(): bool\n {\n return $this->config['showPoints'] ?? true;\n }", "public function isFinished()\n {\n return is_integer($this->options['total']) && $this->options['total'] <= $this->options['offset'];\n }", "public function hasBinlogPlayersCount(){\n return $this->_has(3);\n }", "public function isPassed() {\n\t\tif(!$this->_min) {\n\t\t\treturn $this->_passed = true;\n\t\t}\n\t}", "public function testTeamDistributionWithinParameters ()\n {\n foreach($this->teams as $team => $players) {\n $this->assertThat(\n count($players),\n $this->logicalAnd(\n $this->greaterThanOrEqual(18),\n $this->lessThanOrEqual(22)\n )\n );\n }\n }", "public function meetsThreshold($amount){\n return $amount >= $this->getThreshold();\n }", "public function isHigherTeamWin()\n {\n if ($this->result != self::DRAW\n && !$this->equalsWin()\n && $this->result == $this->higherTeam\n ) {\n return true;\n }\n \n return false;\n }", "public function isAlive(){\n if ($this->lifePoints > 0) {\n return true;\n } else{\n return false;\n }\n }", "public function isAttackSuccessful()\n {\n return ((new Generic())->probabilityCalculator(66));\n }", "public function getPoints()\n\t{\n\t\treturn ((boolean) $this->advertiserScores) ? $this->advertiserScores->amount_sum : 0;\n\t}", "public function points()\n {\n $total = 0;\n foreach ($this->games as $game) {\n $total += $game->points();\n }\n\n return $total;\n }", "public function isLimited(): bool\n {\n return self::UNLIMITED < $this->amount;\n }", "public function isPointsLimitValid($grandTotal, $loyaltyPoints)\n {\n $pointRate = $this->getPointRate();\n $requiredAmount = $pointRate * $loyaltyPoints;\n\n return $requiredAmount <= $grandTotal;\n }", "public function more_than_total($amount) {\n\n\t\t// if not paying, all ok\n\t\tif ($amount == 0) {\n\t\t\treturn TRUE;\n\t\t}\n\n\t\t// convert to float\n\t\t$amount = floatval($amount);\n\t\tif ($this->input->post('balance') > 0) {\n\t\t\t$total = floatval($this->input->post('balance'));\n\t\t} else {\n\t\t\t$total = floatval($this->input->post('total'));\n\t\t}\n\n\t\t// check\n\t\tif ($amount > $total) {\n\t\t\treturn FALSE;\n\t\t}\n\n\t\treturn TRUE;\n\t}", "public function test_When_pointsgiven_recievedpoints()\n {\n //Arrange\n $course = new Course();\n $year = 1;\n $block = 1;\n\n //Act\n $courses = Course::all();\n $count = 0;\n foreach ($courses as $course){\n if($course->year == $year){\n if($course->period == $block){\n $count += $course->points_received;\n }\n }\n }\n\n //Assert\n $this->assertEquals($count, $course->getTotalBlockPoints($year, $block));\n }", "public function testIsBiggerThan100()\n {\n $gameRound = new GameController();\n $bigger = $gameRound->isBigger100(101);\n $this->assertTrue($bigger);\n }", "function _check_player_status($uid) {\n\n $query = new EntityFieldQuery();\n $query->entityCondition('entity_type', 'user')\n ->propertyCondition('uid', $uid, '=')\n ->propertyCondition('status', 1)\n ->fieldCondition('field_suspended', 'value', array(0))\n ->fieldCondition('field_alive', 'value', array(1));\n $entities = $query->execute();\n\n if (count($entities) < 1) return false;\n if (count(_target_death_warrant($uid)) > 0) return false;\n\n return true;\n}", "public function verifyScore() {\n\n\t\t// vars\n\t\t$score = 0;\n\n\t\tforeach( $this->profile_items as $label => $item ) {\n\n\t\t\tswitch($label) {\n\t\t\t\tcase 'visibilityby_relation':\n\t\t\t\t\tif($item == 0 || $item == 3 || $item == 4)\n\t\t\t\t\t\t$score += 400000;\n\n\t\t\t\t\t\t//die('done!');\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'pictures_main':\n\t\t\t\t\tif($item != '')\n\t\t\t\t\t \t$score += 10000;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'pictures_main_cropped':\n\t\t\t\t\tif($item != '')\n\t\t\t\t\t \t$score += 10000;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'profile_longlat':\n\t\t\t\t\tif($item != '')\n\t\t\t\t\t \t$score += 1000;\n\t\t\t\t\tbreak;\n\t\t\t\t// 411,000\n\t\t\t\tcase 'profile_subtitle':\n\t\t\t\t\tif($item != '')\n\t\t\t\t\t\t$score += 10;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'profile_introduction':\n\t\t\t\t\tif($item != '')\n\t\t\t\t\t\t$score += 10;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'profile_height':\n\t\t\t\t\tif($item != '')\n\t\t\t\t\t\t$score += 10;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'profile_weight':\n\t\t\t\t\tif($item != '')\n\t\t\t\t\t\t$score += 10;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'profile_position':\n\t\t\t\t\tif($item != '')\n\t\t\t\t\t\t$score += 10;\n\t\t\t\t\tbreak;\n\n\t\t\t\t// 411,050\n\t\t\t\tcase 'prefer_role':\n\t\t\t\t\tif($item != '')\n\t\t\t\t\t\t$score += 5;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'prefer_agemin':\n\t\t\t\t\tif($item != '')\n\t\t\t\t\t\t$score += 5;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'prefer_agemax':\n\t\t\t\t\tif($item != '')\n\t\t\t\t\t\t$score += 5;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'prefer_weightmin':\n\t\t\t\t\tif($item != '')\n\t\t\t\t\t\t$score += 5;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'prefer_weightmax':\n\t\t\t\t\tif($item != '')\n\t\t\t\t\t\t$score += 5;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'profile_lookingfor':\n\t\t\t\t\tif($item === 0 || $item > 0)\n\t\t\t\t\t\t$score += 5;\n\t\t\t\t\tbreak;\n\t\t\t\t// 411,080\n\t\t\t\tdefault:\n\t\t\t}\n\t\t}\n\n\t\t// update score - if there is a deviation of more than 20 points\n\t\tif( isset( $this->profile_items['profile_score'] ) == true && ( $this->profile_items['profile_score'] > $score + 20 || $this->profile_items['profile_score'] < $score - 20 ) )\n\t\t\t$this->writeScore($score);\n\n\t\t// if no score exists - create it.\n\t\tif( isset( $this->profile_items['profile_score'] ) == false )\n\t\t\t$this->writeScore($score);\n\n\t\treturn $score;\n\n\t}", "public function hasPokecoins()\n {\n return $this->pokecoins !== null;\n }", "function BLpointsForGame( $blurs, $moveCount ) {\n\t//Output: number between 0 -> 1 for suspiciousness\n\n\t//It's squared to make the points drop off faster for lesser blurs.\n\t$output = pow( $blurs / $moveCount, 2 );\n\n\t//Check if the output is within bounds 0 -> 1\n\t$output = ( $output > 1 ) ? 1 : ( ( $output < 0 ) ? 0 : $output );\n\treturn $output;\n}", "public function passes(): bool;", "public function testIfProperReturnsTrue() : void\n {\n\n $this->assertTrue(GeoProgression::has(1, 129));\n }", "function isPokemonMort($numPokemon){\n $res = get_pokemon_hp($numPokemon);\n foreach ($res as $enr) {\n if ($enr['HP'] < 0) {\n return 1;\n } else {\n return 0;\n }\n }\n}", "public function equalsWin()\n {\n if ($this->result != self::DRAW\n && $this->higherTeam == self::TEAMS_EQUAL\n ) {\n return true;\n }\n \n return false;\n }", "public function hasMoreResults()\n\t{\n\t\tif( $this->getStatusCode() !== 1 ) return false;\n\t\t\n\t\t// If there are more total results than the current max, return true\n\t\tif( $this->getNumberOfTotalResults() > $this->getLimit() + $this->getOffset() ) return true;\n\t\t\n\t\t// Fallback false\n\t\treturn false;\t\n\t}", "private function canUserWin(int $wonCash): bool {\n $res = $this->cashPool - $wonCash;\n return $res >= 0;\n }", "public function validateNewPlayer($firstName, $name, $gender, $isYouth, $isVeteran, $ranking, $basePoints){\n $errors = array();\n $errors = $this->validatePlayer($firstName, $name, $gender, $isYouth, $isVeteran, $ranking, $errors);\n if (Utilities::isInt($basePoints) === false ) {\n $errors[] = \"Ongeldige basispunten\";\n }\n else if( $basePoints < 0 || $basePoints > 21){\n $errors[] = \"Basispunten ongeldig\";\n }\n return $errors;\n }", "public function calculatePoints($match, $bet)\n {\n if(($bet->getHomeScore() == $match->getHomeScore()) && ($bet->getAwayScore() == $match->getAwayScore())) {\n return 3;\n }\n\n // if its a draw. and the player also has a draw\n if(($match->getHomeScore() == $match->getAwayScore()) && ($bet->getHomeScore() == $bet->getAwayScore())) {\n return 1;\n }\n\n // if the away team wins. and the player also has the away team winning regardless of score\n if($match->getHomeScore() < $match->getAwayScore() && $bet->getHomeScore() < $bet->getAwayScore()) {\n return 1;\n }\n\n // if the home team wins. and the player also has the home team winning regardless of score\n if($match->getHomeScore() > $match->getAwayScore() && $bet->getHomeScore() > $bet->getAwayScore()) {\n return 1;\n }\n\n return false;\n }", "function areSeatsAvailable ($companyId)\n{\n\t$numUsers = numUsersInCompany($companyId);\n\t$numSeats = totalNumSeats($companyId);\n\tvar_dump($numUsers);\n\techo \"<br>\";echo \"<br>\";\n\tvar_dump($numSeats);\n\techo \"<br>\";echo \"<br>\";\n\tif( $numUsers < $numSeats )\n\t{\n\t\treturn true;\n\t}\n\telse\n\t{\n\t\treturn false;\n\t}\n}", "public function hasPlayer(){\r\n return $this->_has(1);\r\n }", "public function testGoaliePlayersExist()\n {\n $result = User::ofPlayers()\n ->isGoalie()\n ->count();\n $this->assertTrue($result >= 1);\n }", "public function hasPages(): bool\n {\n return $this->total() > $this->limit();\n }", "public function isPositive() : bool {}", "public function hasBattleWinningScorePerDefenderCp()\n {\n return $this->battle_winning_score_per_defender_cp !== null;\n }", "public function step9()\n\t{\n\t\t\\IPS\\Db::i()->update( 'core_member_ranks', 'pips=100', array('pips!=? AND pips IS NOT NULL AND pips>?', '', 100 ) );\n\n\t\treturn TRUE;\n\t}", "public function hasHealthyThreshold(){\n return $this->_has(3);\n }", "function checkTop($x){ return ($x - $this->row >= 0); }", "private function check_minimum_percentile($scores)\n\t{\n\t\t$one = FALSE;\n\t\t$all = TRUE;\n\n\t\tforeach ($scores as $score)\n\t\t{\n\t\t\tif (in_array($score['code'], array('b', 'p')))\n\t\t\t{\n\t\t\t\tif ($score['percentile'] <= NCDI_MINIMUM_PERCENTILE)\n\t\t\t\t{\n\t\t\t\t\t$one = TRUE;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$all = FALSE;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $all ? 2 : ($one ? 1 : 0);\n\t}", "public function canAddRewardPoints()\n {\n return true;\n }", "public function hasPrice(){\n return $this->_has(5);\n }", "public function hasBuddyTotalKmWalked()\n {\n return $this->buddy_total_km_walked !== null;\n }", "public function isShowPoints()\n {\n \\Magento\\Framework\\Profiler::start(__METHOD__);\n if ($this->isProductPage()) {\n $isAllowToShow = $this->config->getDisplayOptionsIsShowPointsOnProductPage();\n } else {\n $isAllowToShow = $this->config->getDisplayOptionsIsShowPointsOnFrontend();\n }\n\n $f = $isAllowToShow && !$this->isOptionPrice();\n \\Magento\\Framework\\Profiler::stop(__METHOD__);\n return $f;\n }", "public function showHitBeePoints(): int\n {\n return $this->hitObj->getPoints();\n }", "public function hasCapacity()\n {\n return $this->users()->count() < $this->slots;\n }", "public function paid(): bool\n {\n return $this->payments->isNotEmpty() && $this->getTotal() <= $this->getTotalPaid();\n }" ]
[ "0.6681627", "0.65634465", "0.6459438", "0.6431436", "0.6335359", "0.6255071", "0.6217004", "0.6205909", "0.61985135", "0.61810035", "0.61215484", "0.6096664", "0.609483", "0.60923815", "0.60782665", "0.6063878", "0.60480016", "0.5989662", "0.5987846", "0.5960834", "0.5921903", "0.59001905", "0.5892136", "0.5881942", "0.5881942", "0.5881942", "0.5857981", "0.58523273", "0.583082", "0.5828931", "0.5803808", "0.580336", "0.5778587", "0.57675", "0.57627785", "0.5757848", "0.57542753", "0.57534695", "0.57456225", "0.573442", "0.57120657", "0.5700689", "0.5676225", "0.5652194", "0.56451", "0.5644549", "0.5644485", "0.5595045", "0.5588634", "0.55858207", "0.55771077", "0.55771077", "0.55740124", "0.5546606", "0.5538018", "0.55312735", "0.5520591", "0.5520349", "0.5519916", "0.5517765", "0.55171967", "0.5512374", "0.550397", "0.5484129", "0.54772484", "0.5472882", "0.5472202", "0.54544145", "0.5453934", "0.5447959", "0.54249835", "0.5420857", "0.5418528", "0.54185134", "0.5410424", "0.5396693", "0.5379231", "0.53706473", "0.5365063", "0.5360726", "0.53590363", "0.53564554", "0.53562784", "0.5354509", "0.5349796", "0.53491205", "0.53358716", "0.5333789", "0.53314173", "0.53301805", "0.5319175", "0.5317966", "0.53176636", "0.53098184", "0.53074867", "0.5295046", "0.52841336", "0.5281773", "0.5279853", "0.52794" ]
0.7160382
0
Display the theme credit
Показать кредит темы
function freshio_credit() { ?> <div class="site-info"> <?php echo apply_filters('freshio_copyright_text', $content = esc_html__('Coppyright', 'freshio') . ' &copy; ' . date('Y') . ' ' . '<a class="site-url" href="' . site_url() . '">' . get_bloginfo('name') . '</a>' . esc_html__('. All Rights Reserved.', 'freshio')); ?> </div><!-- .site-info --> <?php }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function crmpress_do_credits() {\n\n\t?>\n\t<p class=\"credit\"><a href=\"http://www.billerickson.net/wordpress-genesis-crm/\" target=\"_blank\"><?php _e( 'Powered by CRM Press', 'crmpress' ); ?></a></p>\n\t<?php\n\n}", "protected function get_credit() {\n\t\treturn '<p class=\"cs_credit\">Calendar produced using <a href=\"'\n\t\t\t. 'http://www.analysisandsolutions.com/software/calendar/'\n\t\t\t. '\">Calendar Solution</a></p>' . \"\\n\";\n\t}", "function the_credits() {\n\techo(\"<div class=\\\"credit\\\">Powered by DRBGuestbook<br /><a href=\\\"http://www.dbscripts.net/guestbook/\\\">PHP Guestbook</a> &middot; <a href=\\\"http://www.dbscripts.net/\\\">Free PHP Scripts</a></div>\\n\");\n}", "function inline_do_credits() {\n\n\t?>\n\t<p class=\"credit\"><a href=\"http://inline.thomasgriffinmedia.com/\" target=\"_blank\"><?php _e( 'Powered by the inLine Minimal WordPress Theme', 'inline' ); ?></a></p>\n\t<?php\n\n}", "function acc_credits()\n{\n $txt = sprintf('<div id=\"acc-footer\">Copyright &copy; 2012-%s, %s - All rights reserved.<br>',\n date('Y'), get_bloginfo('name')) ;\n $txt .= sprintf('The <a href=\"http://michaelwalsh.org/wordpress-themes/twentyten-acc/\" title=\"TwentyTen-ACC\">TwentyTen-ACC</a> theme (v%s.%s) is a child theme of the <a href=\"http://theme.wordpress.com/themes/twentyten/\">Twenty Ten</a> theme.</div>', ACC_MAJOR_RELEASE, ACC_MINOR_RELEASE) ;\n\n echo $txt ;\n}", "function footer_credits() {\n\t?>\n\t\t<div class=\"footer-credits\">\n\t\t\t<h2>Font Credits:</h2>\n\t\t\t<ul>\n\t\t\t\t<li><a href=\"http://friedrichalthausen.de/2006/01/01/vollkorn/\">Vollkorn</a>: <a href=\"http://creativecommons.org/licenses/by/2.0/de/\">CC-BY</a></li>\n\t\t\t\t<li><a href=\"http://www.exljbris.com\">Fontin</a>: by <a href=\"http://www.exljbris.com\">www.exljbris.nl</a></li>\n\t\t\t</ul>\n\t\t</div>\n\t<?\n}", "private function cszCredit(){\n return $this->config->item('cszcms_credit').' Version '.$this->Csz_model->getVersion();\n }", "function nsp_display_credits_page() {\n\n\tglobal $pagenow;\n\tglobal $credits_introduction;\n\n\t$page = 'nsp-credits';\n\n\t$credits_page_tabs = array(\n\t\t'development' => __( 'Development', 'newstatpress' ),\n\t\t'ressources' => __( 'Ressources', 'newstatpress' ),\n\t\t'translation' => __( 'Translation', 'newstatpress' ),\n\t\t'donation' => __( 'Donation', 'newstatpress' ),\n\t);\n\n\t$support_pluginpage = \"<a href='\" . NSP_SUPPORT_URL . \"' target='_blank'>\" . __( 'the support page', 'newstatpress' ) . '</a>';\n\t$author_linkpage = \"<a href='\" . NSP_PLUGIN_URL . \"/?page_id=2' target='_blank'>\" . __( 'the author', 'newstatpress' ) . '</a>';\n\t$credits_introduction = __( 'If you have found this plugin usefull and you like it, thank you to take a moment to rate it.', 'newstatpress' );\n\t// translators: placeholders to add a link inside the text.\n\t$credits_introduction .= ' ' . sprintf( __( 'You can help to the plugin development by reporting bugs on %1$s or by adding/updating translation by contacting directly %2$s.', 'newstatpress' ), $support_pluginpage, $author_linkpage );\n\t$credits_introduction .= '<br />';\n\t$credits_introduction .= __( 'NewStatPress is provided for free and is maintained only on free time, you can also consider a donation to support further work.', 'newstatpress' );\n\n\t?>\n\n\t<div id=\"pagecredits\" class='wrap'>\n\t<h2><?php esc_html_e( 'Credits', 'newstatpress' ); ?></h2>\n\t<table class='widefat'>\n\t\t<tr>\n\t\t<td>\n\t\t\t<?php\n\t\t\techo wp_kses(\n\t\t\t\t$credits_introduction,\n\t\t\t\tarray(\n\t\t\t\t\t'a' => array(\n\t\t\t\t\t\t'href' => array(),\n\t\t\t\t\t\t'target' => array(),\n\t\t\t\t\t),\n\t\t\t\t\t'br' => array(),\n\t\t\t\t)\n\t\t\t);\n\t\t\t?>\n\t\t</td>\n\t\t<td class='don'>\n\t\t\t<br/>\n\t\t\t<a class=\"button button-primary rate\" href='<?php echo esc_url( NSP_RATING_URL ); ?>' target='_blank'><?php esc_html_e( 'Rate the plugin', 'newstatpress' ); ?></a>\n\t\t\t<br/>\n\t\t\t<a class=\"button button-primary donate\" href='<?php echo esc_url( NSP_DONATE_URL ); ?>' target='_blank'><?php esc_html_e( 'Make a donation', 'newstatpress' ); ?></a>\n\t\t</td>\n\t\t</tr>\n\t</table>\n\n\t<?php\n\tif ( 'admin.php' === $pagenow && isset( $_GET['page'] ) && $page === $_GET['page'] ) {\n\t\t?>\n\n\t<div id=\"usual1\" class=\"usual\">\n\t<ul>\n\t\t<?php\n\t\tforeach ( $credits_page_tabs as $tab => $name ) {\n\t\t\techo \"<li><a href='#\" . esc_attr( $tab ) . \"'>\" . esc_html( $name ) . \"</a></li>\\n\";\n\t\t}\n\t\t?>\n\t</ul>\n\n\t<!-- tab 'development' -->\n\t<div id='development'>\n\t\t<p class=\"dev_intro\"><?php esc_html_e( 'This plugin is a fork of the plugin', 'newstatpress' ); ?><span> Statpress, </span><?php esc_html_e( 'originally developed (and not longer maintened) by', 'newstatpress' ); ?><span class=\"strong\"> Daniele Lippi </span>.</p>\n\t\t<table class='credit'>\n\t\t<thead>\n\t\t\t<tr>\n\t\t\t<th class='cell-l'><?php esc_html_e( 'Contributor', 'newstatpress' ); ?></th>\n\t\t\t<th class='cell-r'><?php esc_html_e( 'Description', 'newstatpress' ); ?></th>\n\t\t\t</tr>\n\t\t</thead>\n\t\t<tbody id=\"addresses\"></tbody>\n\t\t</table>\n\t</div>\n\n\t<!-- tab 'ressources' -->\n\t<div id='ressources'>\n\t\t<table class='credit'>\n\t\t<thead>\n\t\t\t<tr>\n\t\t\t<th class='cell-l'><?php esc_html_e( 'Reference', 'newstatpress' ); ?></th>\n\t\t\t<th class='cell-r'><?php esc_html_e( 'Description', 'newstatpress' ); ?></th>\n\t\t\t<th class='cell-r'><?php esc_html_e( 'Website', 'newstatpress' ); ?></th>\n\t\t\t</tr>\n\t\t</thead>\n\t\t<tbody id=\"ressourceslist\"></tbody>\n\t\t</table>\n\t</div>\n\n\t<!-- tab 'translation' -->\n\t<div id='translation'>\n\t\t<table class='credit'>\n\t\t<thead>\n\t\t\t<tr>\n\t\t\t<th class='cell-l'><?php esc_html_e( 'Language', 'newstatpress' ); ?></th>\n\t\t\t<th class='cell-r'><?php esc_html_e( 'Contributor', 'newstatpress' ); ?></th>\n\t\t\t<th class='cell-r'><?php esc_html_e( 'Status', 'newstatpress' ); ?></th>\n\t\t\t</tr>\n\t\t</thead>\n\t\t<tbody id=\"langr\"></tbody>\n\t\t</table>\n\t</div>\n\n\t<!-- tab 'donation' -->\n\t<div id='donation'>\n\t\t<table class='credit'>\n\t\t<thead>\n\t\t\t<tr>\n\t\t\t<th class='cell-l'><?php esc_html_e( 'Contributor', 'newstatpress' ); ?></th>\n\t\t\t<th class='cell-r'><?php esc_html_e( 'Date', 'newstatpress' ); ?></th>\n\t\t\t</tr>\n\t\t</thead>\n\t\t<tbody id=\"donatorlist\"></tbody>\n\t\t</table>\n\t</div>\n\n\t</div>\n\n\t<table class='credit-footer'>\n\t<tr>\n\t\t<td> <?php esc_html_e( 'Plugin homepage', 'newstatpress' ); ?>\n\t\t<a target='_blank' href='http://newstatpress.altervista.org'>Newstatpress</a>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<td> <?php esc_html_e( 'RSS news', 'newstatpress' ); ?>\n\t\t<a target='_blank' href='http://newstatpress.altervista.org/?feed=rss2'> <?php esc_html_e( 'News', 'newstatpress' ); ?></a>\n\t\t</td>\n\t</tr>\n\t</table>\n\n</div>\n\n\t<script type=\"text/javascript\">\n\t\t//jQuery(\"#usual1 ul\").idTabs(development);\n\t\tjQuery(document).ready(function($){\n\t\t\t$(\"#usual1\").tabs();\n\t\t});\n\t</script>\n\n\t\t<?php\n\t}\n}", "function twentyfifteen_xili_credits () {\n\tprintf( __( 'Multilingual child theme of Twenty Fifteen by %1$s and %2$s', 'twentyfifteen' ),\n\t\t\"<a href=\\\"http://dev.xiligroup.com\\\">dev.xiligroup</a>\",\n\t\t'<span class=\"site-copyright\">' . get_theme_mod('copyright', __('My company','twentyfifteen') ) . '</span>'\n\t\t) ;\n}", "function add_child_theme_credits() {\n\t\t?>\n\t\t<p id=\"child-theme-credits\">Proudly extended by child theme.</p>\n\t\t<?php\n\t}", "function bb_footer_credit () {\n\techo 'Created by <a href=\"http://bybrick.se/\" target=\"_blank\">byBrick</a>. ';\n\techo 'Powered by <a href=\"http://WordPress.org/\" target=\"_blank\">WordPress</a>.';\n}", "function zp_footer() { ?>\n<div id=\"credit\"><?php\n\tif (zp_loggedin()) {\n\tprintUserLogin_out($before='', $after='|', $showLoginForm=NULL, $logouttext=NULL, $show_user=NULL);\n\t} else {\n\t\tprintLink(WEBPATH . '/' . ZENFOLDER .'/admin.php', 'Admin');\n\t}\n?><?php printZenphotoLink(); ?> <?php printVersion();?></a> | Using \"Side Of Chili Theme\" by: <a href=\"http://www.chilifrei.net\" title=\"How Do You Like Your Chili?\">ChiliFrei64</a></div>\n<?php }", "function rsm_sc_site_credit() {\n\n\tob_start();\n\trsm_get_template( 'rsm-site-credit.php' );\n\treturn ob_get_clean();\n}", "function omnicard_credits() {\n\techo '<table class=\"widefat\" style=\"margin-top: .5em\">';\n\n\techo '<thead>';\n\techo '<tr valign=\"top\">';\n\techo '\t<th width=\"25%\">'.__('Useful links', 'wpevents').'</th>';\n\techo '\t<th style=\"text-align:right;\">'.__('Follow Arnan on Facebook', 'wpevents').'</th>';\n\techo '</tr>';\n\techo '</thead>';\n\n\techo '<tbody>';\n\techo '<tr>';\n\n\techo '<td>';\n\techo '&raquo; <a href=\"https://cas.merchant-extranet.sips-atos.com/cas/login?service=https%3A%2F%2Fdashboard.omnikassa.rabobank.nl%2Fportal%2Fhome\" target=\"_blank\">'.__('Omnikassa Dashboard', 'omnicard-lite').'</a><br />';\n\techo '&raquo; <a href=\"http://meandmymac.net/?utm_campaign=homepage&utm_medium=credits&utm_source=omnikassa-lite\" target=\"_blank\">'.__('My Philippines travel blog', 'wpevents').'</a><br />';\n\techo '&raquo; <a href=\"https://ajdg.solutions/products/adrotate-for-wordpress/?utm_campaign=adrotate&utm_medium=credits&utm_source=omnikassa-lite\" target=\"_blank\">Monetize your site with AdRotate Pro</a><br />';\n\techo '&raquo; <a href=\"https://ajdg.solutions/products/?utm_campaign=products&utm_medium=credits&utm_source=omnikassa-lite\" target=\"_blank\">AJdG Solutions plugins</a><br />';\n\techo '</td>';\n\n\techo '<td style=\"text-align:right;\">';\n\techo '<script>(function(d, s, id) {';\n\techo 'var js, fjs = d.getElementsByTagName(s)[0];';\n\techo 'if (d.getElementById(id)) return;';\n\techo 'js = d.createElement(s); js.id = id;';\n\techo 'js.src = \"https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.5\";';\n\techo 'fjs.parentNode.insertBefore(js, fjs);';\n\techo '}(document, \\'script\\', \\'facebook-jssdk\\'));</script>';\n\techo '<div class=\"fb-page\" data-href=\"https://www.facebook.com/Arnandegans\" data-width=\"580\" data-adapt-container-width=\"true\" data-small-header=\"true\" data-hide-cover=\"false\" data-show-facepile=\"false\"></div>';\n\techo '</td>';\n\n\techo '</tr>';\n\techo '</tbody>';\n\n\techo '</table>';\n}", "function wp_credits()\n{\n}", "function crmpress_do_footer() {\n\n\t\tdo_action( 'crmpress_credits' );\n\n}", "function zp_add_site_credits(){\n\tif( is_home() || is_front_page() || is_page_template( 'section_template.php' ) )\n\t\treturn;\n\techo '<div class=\"site_credits\"><p>'.get_bloginfo( 'name' ).' - '.get_bloginfo( 'description' ).'</p></div>';\n}", "public function action_account() {\n $m = Model::get_model();\n $data = $m->currency();\n $this->render(\"account\", $data);\n }", "function credits_user_display($args) {\n\n\tif (!pnSecAuthAction(0, 'Credits::', '::', ACCESS_READ)) {\n return pnVarPrepHTMLDisplay(_MODULENOAUTH);\n }\n\n\tlist($mod,\n\t $filetype) = pnVarCleanFromInput('mod',\n\t\t\t\t\t\t\t\t\t \t 'filetype');\n\t extract($args);\n\n\t// work out the version number, the display name for the module (or core)\n\t// and the directory(ies) to locate the files\n\tif ($mod == 'core') {\n\t\t$modinfo = array();\n\t\t$modinfo['name'] = 'core';\n\t\t$modinfo['version'] = _PN_VERSION_NUM;\n\t\t$modinfo['displayname'] = _PN_VERSION_ID;\n\t\t$moduledir1 = 'docs/';\n\t\t$moduledir2 = '';\n\t} else {\n\t\t$modinfo =& pnModGetInfo(pnModGetIDFromName($mod));\n\t\tif (!is_array($modinfo)) {\n\t\t\treturn pnVarPrepHTMLDisplay(_CREDITSNOEXIST);\n\t\t}\n\t\t$moduledir1 = 'modules/';\n\t\t$moduledir2 = 'system/';\n\t}\n\n // locate the correct file\n // Create output object - this object will store all of our output so that\n // we can return it easily when required\n $pnRender =& new pnRender('Credits');\n\n\t// For caching reasons you must pass a cache ID. This could be done as a\n\t// separate parameter to every method that uses caching (like fetch, is_cached\n\t// etc.) or by assigning the ID to the cache_id property like it is done in\n\t// this case.\n\t// In this case we use hash of the path and filename\n\t$pnRender->cache_id = md5($modinfo['directory'].$filetype);\n\n\t// check out if the contents are cached.\n\t// If this is the case, we do not need to make DB queries.\n\tif ($pnRender->is_cached('credits_user_display.htm')) {\n\t\treturn $pnRender->fetch('credits_user_display.htm');\n\t}\n\n\t// now lets locate the module version info\n\tif ($mod == 'core') {\n\t\tswitch ($filetype) {\n\t\tcase 'credits':\n\t\t\t$filename = 'docs/CREDITS.txt';\n\t\t\tbreak;\n\t\tcase 'help':\n\t\t\t$filename = 'docs/manual.txt';\n\t\t\tbreak;\n\t\tcase 'license':\n\t\t\t$filename = 'docs/COPYING.txt';\n\t\t\tbreak;\n\t\t}\n\t} else {\n\t\t$f = $modinfo['directory'];\n\t\t$fos = pnVarPrepForOS($modinfo['directory']);\n\t\t$modversion = '';\n\t\t$modversion['displayname'] = $modinfo['displayname'];\n\t\t$modversion['filename'] = $f;\n\t\t$modversion['name'] = '';\n\t\t$modversion['version'] = '';\n\t\t$modversion['description'] = '';\n\t\t$modversion['credits'] = '';\n\t\t$modversion['help'] = '';\n\t\t$modversion['changelog'] = '';\n\t\t$modversion['license'] = '';\n\t\t$modversion['official'] = 0;\n\t\t$modversion['author'] = '';\n\t\t$modversion['contact'] = '';\n\t\t$modversion['admin'] = 0;\n\t\tif (file_exists(\"modules/$fos/Version.php\")) {\n\t\t\tinclude \"modules/$fos/Version.php\";\n\t\t\tif (empty($modversion[$filetype])) {\n\t\t\t\treturn pnVarPrepHTMLDisplay(_CREDITSNOEXIST);\n\t\t\t}\n\t\t\t$filename = \"modules/$fos/$modversion[$filetype]\";\n\t\t} else if (file_exists(\"modules/$fos/pnversion.php\")) {\n\t\t\tinclude \"modules/$fos/pnversion.php\";\n\t\t\tif (empty($modversion[$filetype])) {\n\t\t\t\treturn pnVarPrepHTMLDisplay(_CREDITSNOEXIST);\n\t\t\t}\n\t\t\t$filename = \"modules/$fos/$modversion[$filetype]\";\n\t\t} else if (file_exists(\"system/$fos/Version.php\")) {\n\t\t\tinclude \"system/$fos/Version.php\";\n\t\t\tif (empty($modversion[$filetype])) {\n\t\t\t\treturn pnVarPrepHTMLDisplay(_CREDITSNOEXIST);\n\t\t\t}\n\t\t\t$filename = \"system/$fos/$modversion[$filetype]\";\n\t\t} else if (file_exists(\"system/$fos/pnversion.php\")) {\n\t\t\tinclude \"system/$fos/pnversion.php\";\n\t\t\tif (empty($modversion[$filetype])) {\n\t\t\t\treturn pnVarPrepHTMLDisplay(_CREDITSNOEXIST);\n\t\t\t}\n\t\t\t$filename = \"system/$fos/$modversion[$filetype]\";\n\t\t}\n\t}\n\n\tif (file_exists($filename)) {\n\t\t$thefile = implode('',file($filename));\n\t\t$thefile = nl2br(pnVarPrepForDisplay($thefile));\n\t} else {\n\t\t$thefile = pnVarPrepForDisplay(_CREDITSNOEXIST);\n\t}\n\n // assign the values to the template\n $pnRender->assign('heading', constant('_CREDITS' . strtoupper($filetype)));\n $pnRender->assign($modinfo);\n $pnRender->assign('thefile', $thefile);\n $pnRender->assign('filetype', $filetype);\n\n // create a fake numeric item id to allow display hooks work properly\n $pnRender->assign('itemid', $pnRender->cache_id);\n\n return $pnRender->fetch('credits_user_display.htm');\n}", "function artsite_signup_form_creditcard_render() {\n\n\t$ret2 = \"\";\n\t$csp = ARTSITE_CSSPREFIX;\n\n\t$addr1 = isset($_POST[$csp.'_']) ? htmlspecialchars($_POST[$csp.'_addr1']) : \"\";\n\t$town = isset($_POST[$csp.'_']) ? htmlspecialchars($_POST[$csp.'_town']) : \"\";\n\t$state = isset($_POST[$csp.'_']) ? htmlspecialchars($_POST[$csp.'_state']) : \"\";\n\t$zip = isset($_POST[$csp.'_']) ? htmlspecialchars($_POST[$csp.'_zip']) : \"\";\n\t$phoneno = isset($_POST[$csp.'_']) ? htmlspecialchars($_POST[$csp.'_phoneno']) : \"\";\n\n\t$ret2 .= <<<ENDHERE\n\t<div class=\"${csp}_form_row\">\n\t\t<div class=\"${csp}_editform-label\"><label for=\"${csp}_ccnumber\">Credit card number:</label> <input type=\"text\" id=\"${csp}_ccnumber\" class=\"${csp}_form_textinput\" name=\"${csp}_ccnumber\" size=\"32\" value=\"\" data-validate-ccnumber=\"true\" data-validate-presence=\"true\" data-validate-error=\".${csp}_ccnumber-error\"></div>\n\t\t<div class=\"${csp}_error ${csp}_ccnumber-error\"><span class=\"ccnumber-error\">Invalid credit card number</span> <span class=\"blank-error\">Required</span></div>\n\t</div>\n\n\t<div class=\"${csp}_form_row\">\n\t\t<div class=\"${csp}_editform-label\"><label for=\"${csp}_ccexpiry\">Credit card expiry:</label> <input type=\"text\" id=\"${csp}_ccexpiry\" class=\"${csp}_form_textinput\" name=\"${csp}_ccexpiry\" size=\"5\" maxlength=\"5\" value=\"\" data-validate-presence=\"true\" data-validate-format=\"/^(0[0-9]|1[0-2])\\/(1[2-9]|[2-9][0-9])$/\" data-validate-error=\".${csp}_ccexpiry-error\"> <em>Format: MM/YY</em></div>\n\t\t<div class=\"${csp}_error ${csp}_ccexpiry-error\">Enter a valid, future date (two digits each for month and year: MM/YY)</div>\n\t</div>\n\n\t<div class=\"${csp}_form_row\">\n\t\t<div class=\"${csp}_editform-label\"><label for=\"${csp}_cccvc\">CVC code:</label> <input type=\"text\" id=\"${csp}_cccvc\" class=\"${csp}_form_textinput\" name=\"${csp}_cccvc\" size=\"5\" maxlength=\"5\" value=\"\" data-validate-presence=\"true\" data-validate-format=\"/^([0-9]{3,4})$/\" data-validate-error=\".${csp}_cccvc-error\"> <em>(usually found on the back of your card)</em></div>\n\t\t<div class=\"${csp}_error ${csp}_cccvc-error\">Enter a valid CVC code (usually 3 digits)</div>\n\t</div>\n\n\t<div class=\"${csp}_form_row\">\n\t\t<div class=\"${csp}_editform-label\"><label for=\"${csp}_addr1\">Address:</label> <input type=\"text\" id=\"${csp}_addr1\" class=\"${csp}_form_textinput\" name=\"${csp}_addr1\" size=\"32\" maxlength=\"96\" value=\"$addr1\" data-validate-presence=\"true\" data-validate-error=\".${csp}_addr1-error\"></div>\n\t\t<div class=\"${csp}_error ${csp}_addr1-error\">Required (so that your domain name can be properly registered to you)</div>\n\t</div>\n\n\t<div class=\"${csp}_form_row\">\n\t\t<div class=\"${csp}_editform-label\"><label for=\"${csp}_town\">Town/City:</label> <input type=\"text\" id=\"${csp}_town\" class=\"${csp}_form_textinput\" name=\"${csp}_town\" size=\"32\" maxlength=\"96\" value=\"$town\" data-validate-presence=\"true\" data-validate-error=\".${csp}_town-error\"></div>\n\t\t<div class=\"${csp}_error ${csp}_town-error\">Required (so that your domain name can be properly registered to you)</div>\n\t</div>\n\n\t<div class=\"${csp}_form_row\">\n\t\t<div class=\"${csp}_editform-label\"><label for=\"${csp}_state\">State:</label> <input type=\"text\" id=\"${csp}_state\" class=\"${csp}_form_textinput\" name=\"${csp}_state\" size=\"32\" maxlength=\"96\" value=\"$state\" data-validate-presence=\"true\" data-validate-error=\".${csp}_state-error\"></div>\n\t\t<div class=\"${csp}_error ${csp}_state-error\">Required (so that your domain name can be properly registered to you)</div>\n\t</div>\n\n\t<div class=\"${csp}_form_row\">\n\t\t<div class=\"${csp}_editform-label\"><label for=\"${csp}_zip\">Zip:</label> <input type=\"text\" id=\"${csp}_zip\" class=\"${csp}_form_textinput\" name=\"${csp}_zip\" size=\"12\" maxlength=\"8\" value=\"$zip\" data-validate-presence=\"true\" data-validate-error=\".${csp}_zip-error\"></div>\n\t\t<div class=\"${csp}_error ${csp}_zip-error\">Required (so that your domain name can be properly registered to you)</div>\n\t</div>\n\n\t<div class=\"${csp}_form_row\">\n\t\t<div class=\"${csp}_editform-label\"><label for=\"${csp}_country\">Country:</label> \nENDHERE;\n\tob_start();\n\trequire(ARTSIGNUP_DIR.'/includes/countrylist.php');\n\t$ret2 .= ob_get_clean();\n\t$ret2 .= '</div></div>';\n\n\treturn $ret2;\n\n}", "public function creditvoucher()\n {\n $projects = Project::all();\n $banks = Bank::all();\n $lnames = Lname::all();\n return view('voucher.credit', compact('projects','banks','lnames'));\n }", "function attribution()\n\t\t{\n\t\t\t\t\n\t\t\tqa_html_theme_base::attribution();\n\n\t\t\t// modxclub [start] Please erase. Use this theme according to license of Question2Answer.\n\t\t\t$this->output(\n\t\t\t\t'<DIV CLASS=\"qa-designedby\">',\n\t\t\t\t'Designed by <A HREF=\"http://www.axiologic.ro\">Axiologic SaaS</A> and <A HREF=\"http://www.ecofys.com\">Ecofys</A>',\n\t\t\t\t'</DIV>'\n\t\t\t);\n\t\t\t// modxclub [end]\n\t\t}", "function box_credit( $args, $assoc_args ) {\n\t\tlist($args, $assoc_args) = $this->parse_args($args, $assoc_args);\n\n\t\tforeach ($args as $user_id) {\n\t\t\t$customer = new CBCustomer($user_id, $interactive = false);\n\t\t\tWP_CLI::debug(\"User $user_id\");\n\t\t\tif (false !== $this->options->credit) {\n\t\t\t\t$customer->set_meta('extra_box_credits', $this->options->credit);\n\t\t\t}\n\t\t\tif (false !== $this->options->adjustment) {\n\t\t\t\t$customer->set_meta('box_credit_adjustment', $this->options->adjustment);\n\t\t\t}\n\t\t}\n\t}", "function svbk_rcp_profile_company_fields() {\n\t?>\n\t\n\t</fieldset>\n\t<fieldset id=\"billing-info\">\n\t\t<legend><?php esc_html_e( 'Billing Info', 'svbk-rcp-company-details' ); ?></legend>\n\t\t<?php svbk_rcp_print_company_fields();\n}", "public function getCreditsPage()\n {\n return view('pages.credits', [\n 'credits' => SitePage::where('key', 'credits')->first(),\n 'extensions' => DB::table('site_extensions')->get()\n ]);\n }", "function license_tab( $tabs ) {\r\r\n\t\t$tabs['license'] = __( 'Licenses', CF7SKINS_TEXTDOMAIN );\r\r\n\t\treturn $tabs;\r\r\n\t}", "private function invoiceTermOfCredit()\n {\n $termOfCredit = $this->confPdf[ 'invoice.' ][ 'content.' ][ 'termOfCredit.' ];\n $this->writeTextblock( $termOfCredit, 'invoiceTermOfCredit' );\n }", "public function author(){\n\t\t$this->render('themeAuthor', array(), array());\n\t}", "public function hookDisplayCustomerAccount($params) {\n $this->smarty->assign('in_footer', false);\n\treturn $this->display(__FILE__, 'my-account.tpl');\n }", "function woocommerce_account_content()\n {\n }", "function render_account_section( $args ) {\n\t\tesc_html_e( 'Select a Wordpress account for Tidal-contributed content.', 'tidal' );\n\t}", "public function creditsAction()\n\t {\n\t \t$this->_helper->layout()->setLayout('layout_sitemap');\n\t\t$this->view->loginStatus = $this->isLoggedIn();\n\t\t\n\t\t$fitnessPages = new FitnessWebsitePages();\n \t$fitnessPagesMulti= new FitnessWebsitePagesMultilang();\n \t \n \t \n \t $defaultLang = $this->getDefaultLanguage();\n \t $pageId = $fitnessPages->getPageByName('credits');\n \t \n \t \n \t \n \t $pageContent = $fitnessPagesMulti->getPage($pageId['page_id'],$defaultLang);\n \t \n \t $this->view->pageTitle = mb_convert_encoding($pageContent['page_title'],'UTF-8');\n \t $this->view->pageContent = mb_convert_encoding($pageContent['page_content'],'UTF-8');\n\t }", "function kleo_woo_edit_account_screen_content() {\n\t\techo '<div class=\"woocommerce\">';\n\t\twc_get_template( 'myaccount/form-edit-account.php', array( 'user' => get_user_by( 'id', get_current_user_id() ) ) );\n\t\techo '</div>';\n\n\t}", "public function hookDisplayHeader()\n {\n // @TODO Cache configuration array with Cache::getInstance()?\n $id_lang = (int)$this->context->language->id;\n $this->context->smarty->assign(array(\n 'ctheme' => array(\n 'footer' => array(\n 'copyright' => array(\n 'display' => true,\n 'html' => Configuration::get('CT_CFG_COPYRIGHT_CONTENT', $id_lang),\n ),\n ),\n ),\n ));\n }", "function db_admin_edit_footer () {\n echo get_option('db_footer_text') . ' © ' . date('Y');\n }", "function pfund_paypal_section_text() {\n\techo '<p>'.__( 'PayPal settings for personal fundraiser', 'pfund' ).'</p>';\n}", "function pfund_paypal_section_text() {\n\techo '<p>'.__( 'PayPal settings for personal fundraiser', 'pfund' ).'</p>';\n}", "public function getInternationalCredits() {\n $this->renderJson(true, ClassRegistry::init('InternationalNumber')->getAllCredits());\n }", "function add_plugin_credits() {\n //printf(\"\\n\" . '<meta name=\"generator\" content=\"Powered by ' . $this->plugin_name . ' (' . $this->plugin_home_page . ') \" />' . PHP_EOL);\n printf(PHP_EOL . '<!-- ' . PHP_EOL . 'Powered by ' . $this->plugin_name\n . ': ' . $this->app_title . PHP_EOL\n . 'URL: ' . $this->plugin_home_page . PHP_EOL\n . '-->' . PHP_EOL . PHP_EOL);\n }", "public function getCredits() {\n $this->renderJson(true, $this->User->getAllCredits(Configure::read('User.id')));\n }", "public function use_credit()\n {\n if ($this->check_credits()) \n {\n $user_id = $this->session->userdata('userid');\n\n $this->db->set('credits', 'credits-1', FALSE);\n $this->db->where('id', $user_id);\n $this->db->update('user');\n\n }\n }", "private function deliveryorderTermOfCredit()\n {\n $termOfCredit = $this->confPdf[ 'deliveryorder.' ][ 'content.' ][ 'termOfCredit.' ];\n $this->writeTextblock( $termOfCredit, 'deliveryorderTermOfCredit' );\n }", "function pfund_authorize_net_section_text() {\n\techo '<p>'.__( 'Authorize.Net settings for personal fundraiser', 'pfund' ).'</p>';\n}", "function pfund_authorize_net_section_text() {\n\techo '<p>'.__( 'Authorize.Net settings for personal fundraiser', 'pfund' ).'</p>';\n}", "public function getDisplayCredits()\n {\n return $this->displayCredits;\n }", "public function credit_card_form( $args = array(), $fields = array() ) {\n\t\t\t?>\n <style>\n iframe {\n border: 0;\n width: 100%;\n height: 300px;\n z-index: 1;\n }\n </style>\n <div id=\"paydock_cc\"></div>\n\t\t\t<?php\n\t\t}", "public function add_credit_note() {\n $data['sideMenuData'] = fetch_non_main_page_content();\n $data['page_title'] = 'Credit Notes';\n $data['main_content'] = 'classtrainee/add_credit_notes';\n $this->load->view('layout', $data);\n }", "public function actionViewkredit($id)\n {\n return $this->render('viewkredit', [\n 'model' => $this->findModelkredit($id),\n ]);\n }", "public function render_footer_sml_section_1_credit() {\r\n\r\n\t\t\t$output = astra_get_small_footer_custom_text( 'footer-sml-section-1-credit' );\r\n\t\t\treturn do_shortcode( $output );\r\n\t\t}", "function credits_user_main()\n{\n // Security Check\n if (!pnSecAuthAction(0, 'Credits::', '::', ACCESS_READ)) {\n return pnVarPrepForDisplay(_MODULENOAUTH);\n }\n\n // If the user is site admin then get all modules including admin only modules\n if (pnSecAuthAction(0, '::', '::', ACCESS_ADMIN)) {\n $mods = pnModGetAllMods();\n $cacheid = 0;\n } else {\n $mods = pnModGetUserMods();\n $cacheid = 1;\n }\n\n // highly unlikely but check if we have no modules returned\n if ($mods == false) {\n return pnVarPrepHTMLDisplay(_CREDITSNOMODS);\n }\n\n // Create output object - this object will store all of our output so that\n // we can return it easily when required\n $pnRender =& new pnRender('Credits');\n\n // For caching reasons you must pass a cache ID. This could be done as a\n // separate parameter to every method that uses caching (like fetch, is_cached\n // etc.) or by assigning the ID to the cache_id property like it is done in\n // this case.\n // Here the output only changes based on the security check to we use the\n // cacheid flag set earlier\n $pnRender->cache_id = $cacheid;\n\n // check out if the contents are cached.\n // If this is the case, we do not need to make DB queries.\n if ($pnRender->is_cached('credits_user_main.htm')) {\n return $pnRender->fetch('credits_user_main.htm');\n }\n\n $modules = array();\n foreach($mods as $mod) {\n\t\t$f = $mod['directory'];\n\t\t$fos = pnVarPrepForOS($mod['directory']);\n\t\t\n\t\tpnModLangLoad($fos, 'version');\n\t\t\n\t\t// Add applicable actions\n\t\t//$actions = array();\n\t\t$modversion = '';\n\t\t$modversion['displayname'] = $mod['displayname'];\n\t\t$modversion['filename'] = $f;\n\t\t$modversion['name'] = '';\n\t\t$modversion['version'] = '';\n\t\t$modversion['description'] = '';\n\t\t$modversion['credits'] = '';\n\t\t$modversion['help'] = '';\n\t\t$modversion['changelog'] = '';\n\t\t$modversion['license'] = '';\n\t\t$modversion['official'] = 0;\n\t\t$modversion['author'] = '';\n\t\t$modversion['contact'] = '';\n\t\t$modversion['admin'] = 0;\n\t if (file_exists(\"modules/$fos/Version.php\")) {\n include \"modules/$fos/Version.php\";\n \t} else if (file_exists(\"modules/$fos/pnversion.php\")) {\n include \"modules/$fos/pnversion.php\";\n\t } else if (file_exists(\"system/$fos/Version.php\")) {\n include \"system/$fos/Version.php\";\n\t } else if (file_exists(\"system/$fos/pnversion.php\")) {\n include \"system/$fos/pnversion.php\";\n } else {\n $modversion['name'] = $f;\n $modversion['version'] = $mod['version'];\n $modversion['description'] = $mod['description'];\n }\n\n\t\t// check for the existence of the files\n\t\tif (!file_exists('modules/'.$mod['directory'].'/'.$modversion['credits']) &&\n\t\t\t!file_exists('system/'.$mod['directory'].'/'.$modversion['credits'])) {\n\t\t\t$modversion['credits'] = '';\n\t\t}\n\t\tif (!file_exists('modules/'.$mod['directory'].'/'.$modversion['help']) &&\n\t\t\t!file_exists('system/'.$mod['directory'].'/'.$modversion['help'])) {\n\t\t\t$modversion['help'] = '';\n\t\t}\n\t\tif (!file_exists('modules/'.$mod['directory'].'/'.$modversion['changelog']) &&\n\t\t\t!file_exists('system/'.$mod['directory'].'/'.$modversion['changelog'])) {\n\t\t\t$modversion['changelog'] = '';\n\t\t}\n\t\tif (!file_exists('modules/'.$mod['directory'].'/'.$modversion['license']) &&\n\t\t\t!file_exists('system/'.$mod['directory'].'/'.$modversion['license'])) {\n\t\t\t$modversion['license'] = '';\n\t\t}\n\t\n\t\t// explode the contact and author arrays to allow for\n\t\t// multiple authors and contacts\n\t\t$modversion['author'] = explode(',', $modversion['author']);\n\t\t$modversion['contact'] = explode(',', $modversion['contact']);\n\n\t\t// check if an e-mail address is given as the contact\n\t\tforeach($modversion['contact'] as $key => $contact) {\n\t\t\t$contact = trim($contact);\n\t\t\tif (eregi (\"^([a-z0-9_]|\\\\-|\\\\.)+@(([a-z0-9_]|\\\\-)+\\\\.)+[a-z]{2,4}$\", $contact)) {\n\t\t\t\t$modversion['contact'][$key] = 'mailto:' . $contact;\n\t\t\t} else {\n $modversion['contact'][$key] = $contact;\n }\n\t\t}\n\t\t$modules[] = $modversion;\n }\n\n // assign content to user\n $pnRender->assign('modules', $modules);\n\n return $pnRender->fetch('credits_user_main.htm');\n}", "function license_screen() {\n\t\t\n\t\t$license \t= get_option( $this->prefix . 'license_key' );\n\t\t$status \t= get_option( $this->prefix . 'license_status' );\n\t\t\n\t\t?>\n\t\t<div class=\"oxygen-license-wrap <?php echo $this->prefix . 'license-wrap'; ?>\">\n\t\t\t<h2><?php echo $this->addon_name; ?></h2>\n\t\t\t<form method=\"post\" action=\"\">\n\t\t\t\n\t\t\t\t<?php wp_nonce_field( $this->prefix . 'submit_license', $this->prefix . 'license_nonce_field' ); ?>\n\t\t\t\t\n\t\t\t\t<table class=\"form-table\">\n\t\t\t\t\t<tbody>\n\t\t\t\t\t\t<tr valign=\"top\">\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<input id=\"<?php echo $this->prefix; ?>license_key\" name=\"<?php echo $this->prefix; ?>license_key\" type=\"text\" class=\"regular-text\" value=\"<?php esc_attr_e( $license ); ?>\" />\n\t\t\t\t\t\t\t\t<label class=\"description\" for=\"<?php echo $this->prefix; ?>license_key\"><?php echo $status; ?></label>\n\t\t\t\t\t\t\t\t<p class=\"description\"><?php _e('Enter your license key to get updates'); ?></p>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\t\n\t\t\t\t<?php submit_button( __(\"Submit\",\"oxygen\"), \"primary\", $this->prefix.\"submit_license\" ); ?>\n\t\t\t\n\t\t\t</form>\n\t\t</div>\n\t\t<?php\n\t}", "private function line_credit_list(){\n $results = $this->dt->line_credit_list();\n echo $results;\n }", "public function render_view_currency_balances_screen()\n {\n print WCP_Trades_View::currency_balances_build_html();\n }", "public function cszCopyright(){\n /* Please do not remove or change this function */\n $csz_copyright = '<br><span class=\"copyright\">'.$this->cszCredit().'</span>';\n return $csz_copyright;\n }", "function give_simplepay_credit_card_form()\n{\n\n\n}", "public function creditsBox($iWidth = 150) {\n\t\t\t$strHTML = \"<div class=\\\"creditsbox\\\">\"; \n\t\t\t$iPos = intval($iWidth * $this->credits() / (settings(\"startvalues\", \"credits\")*2)); \n\t\t\tif ($iPos > 160) $iPos = 160; \n\t\t\t$strHTML .= \"<span class=\\\"credits\\\" style=\\\"width: \" . $iPos . \"px; \\\"></span>\"; \n\t\t\tglobal $oPage; \n\t\t\tif ($this->iID == $oPage->iUser) {\n\t\t\t\t$strHTML .= \"<span class=\\\"creditsshow\\\">\" . $this->credits() . \" \" . settings(\"credits\", \"name\", \"x\") . \"</span>\"; \n\t\t\t}\n\t\t\t$strHTML .= \"<span class=\\\"stars\\\">\" . str_repeat((\"<img src=\\\"\" . fixPath(\"img/star.png\") . \"\\\" />\"), $this->stars()) . \"</span>\"; \n\t\t\t$strHTML .= \"<span class=\\\"transactions\\\">\" . count($this->payments(\"all\")) . \" transactie\" . ((count($this->payments(\"all\"))!=1)?\"s\":\"\") . \"</span>\"; \n\t\t\t$strHTML .= \"</div>\"; \n\t\t\treturn $strHTML; \n\t\t}", "static function _render_footer_sml_section_1_credit() {\n\n\t\t\t$output = astra_get_small_footer_custom_text( 'footer-sml-section-1-credit' );\n\t\t\treturn do_shortcode( $output );\n\t\t}", "public function ccAction()\n {\n return $this->render('@Dash/Default/apartadoXII.html.twig', array('id' => 1));\n }", "function gridbox_footer_text() {\r\n\t?>\r\n\r\n\t<span class=\"credit-link\">\r\n\t\t<?php printf( esc_html__( 'Develop by %1$s and %2$s.', 'gridbox' ),\r\n\t\t\t'<a href=\"#\">Gridbox</a>',\r\n\t\t\t'<a href=\"#\" title=\"Indieteam\">Indieteam</a>'\r\n\t\t); ?>\r\n\t</span>\r\n\r\n\t<?php\r\n}", "public function become_affiliate()\n {\n return view('users.buybook') \n ->with(Helper::getBasicData());\n }", "public function billing()\n\t{\n\t\t$viewData['payments'] = $this->user->loadPayments();\n\t\t$viewData['user'] = $this->user;\n\n\t\t$this->setupProfileView(Str::properize($this->user->display_name) . ' Billing History')\n\t\t\t->with('page_title', 'Billing History')\n\t\t\t->content = View::make('profile.billing', $viewData);\n\t}", "function displayCopyRight() {\n\t\tglobal $eb_version ;\n\t\techo '<div class=\"copyright\" style=\"text-align:center;margin-top: 5px;\"><a href=\"http://joomdonation.com/index.php?option=com_content&view=article&id=79&Itemid=58\" target=\"_blank\"><strong>Event Booking</strong></a> version '.$eb_version.', Copyright (C) 2010-2011 <a href=\"http://joomdonation.com\" target=\"_blank\"><strong>Ossolution Team</strong></a></div>' ;\n\t}", "function referral()\n\t{\n $output['coinname'] = $this->settingsmodel->showsitesettings('current_currency_coin'); \n \t$output['referal_content'] = $this->settingsmodel->showsitesettings('referal_content');\n \t/*added by revathyjr ends*/\n\t$output['profile']=$this->profilemodel->profile();\n\n $this->load->view('referral',$output);\n\n\n\t}", "function woolman_camp_contribution_form($formName, &$form) {\n drupal_add_css(drupal_get_path('module', 'woolman_camp') . '/css/camp_forms.css');\n $year = woolman_camp_next_year();\n $intro = '<div id=\"woolman-camp-contribution\">';\n if ($cid = woolman_user_cid()) {\n if ($reg = woolman_camp_calc_fees($cid, $year)) {\n $balance = $reg['total_fees'] - $reg['total_discount'] - $reg['total_paid'];\n $intro .= '<table><caption><strong>Your Camp Fees</strong></caption><tbody>\n <tr><td>Camp Tuition and Fees</td><td>$' . $reg['total_fees'] . '</td></tr>\n <tr style=\"font-style:italic;\"><td>Discounts:</td><td class=\"p\">-$' . $reg['total_discount'] . '</td></tr>\n <tr style=\"font-weight:bold;\"><td>Total Fees</td><td>$' . ($reg['total_fees'] - $reg['total_discount']) . '</td></tr>';\n $intro .= '<tr><td>Paid to-date</td><td>$' . $reg['total_paid'] . '</td></tr>';\n $intro .= '<tr style=\"font-weight:bold;\"><td>Balance Due</td><td>$' . $balance . '</td></tr>';\n $intro .= '</tbody></table><p>';\n $defaults = array('price_17' => $balance);\n $form->setDefaults($defaults);\n if ($balance <= 0) {\n $intro .= 'Thank you, your tuition and fees are already paid in full. ' . l('Click here to return to your camp registration page.', '~camp/register/status', array('alias' => TRUE));\n }\n elseif ($reg['total_paid'] >= $reg['deposit']) {\n $intro .= 'You may pay all or part of your remaining balance of $' . $balance . '. The full amount is due on the first day of camp.';\n }\n else {\n $intro .= 'You may pay all fees now, or just the $' . $reg['deposit'] . ' nonrefundable deposit required to reserve your child\\'s place at camp. The full $' . $balance . ' is due on the first day of camp.';\n }\n $intro .= '</p>';\n }\n }\n else {\n $intro .= '<p>Please ' . l('Log In', 'user', array('query' => drupal_get_destination(), 'alias' => TRUE)) . ' to see your camp balance.</p>';\n }\n $intro .= '</div>';\n $form->assign('intro_text', $intro);\n}", "public static function getPaymentbycreditcard(){\n return view('Users/paymentbycreditcard');\n }", "public function copyright_callback() {\n\t\t?>\n\t\t<div class=\"w4p-copyright-wrapper\">\n\t\t\t<label for=\"w4p_copyright\" class=\"w4p-option-label\"><?php esc_html_e( 'Copyright:', 'w4ptheme' ); ?></label>\n\t\t\t<input\n\t\t\t\ttype=\"text\"\n\t\t\t\tid=\"w4p_copyright\"\n\t\t\t\tname=\"w4p_copyright\"\n\t\t\t\tvalue=\"<?php echo ! empty( $this->options['w4p_copyright'] ) ? esc_attr( $this->options['w4p_copyright'] ) : '' ?>\"\n\t\t\t\tplaceholder=\"<?php echo esc_attr( $this->get_default_copyright() ); ?>\"\n\t\t\t/>\n\t\t</div>\n\t<?php }", "public function show(CreditCard $creditCard)\n {\n //\n }", "function displayAccountDetails(\\CodesWholesale\\Resource\\Account $account) {\n echo \"Account full name: \" . $account->getFullName() . \"<br />\";\n echo \"Account email: \" . $account->getEmail() . \"<br />\";\n echo \"Total money to use (balance + credit) : \" . number_format($account->getTotalToUse(), 2) . \"<br />\";\n echo \"Current account balance : \" . number_format($account->getCurrentBalance(), 2) . \"<br />\";\n echo \"Current account credit : \" . number_format($account->getCurrentCredit(), 2) . \"<br />\";\n}", "function foodie_footer_creds_text( $creds ) {\n\treturn sprintf(\n\t\t'[footer_copyright before=\"%s \"] &middot; [footer_childtheme_link before=\"\"] %s <a href=\"http://www.shaybocks.com/\">%s</a> &middot; %s [footer_genesis_link url=\"http://www.studiopress.com/\" before=\"\"] &middot; [footer_wordpress_link before=\" %s\"]',\n\t\t__( 'Copyright', 'foodie' ),\n\t\t__( 'by', 'foodie' ),\n\t\tCHILD_THEME_DEVELOPER,\n\t\t__( 'Built on the ', 'foodie' ),\n\t\t__( 'Powered by ', 'foodie' )\n\t);\n}", "public function action_sportal_credits()\n\t{\n\t\tloadLanguage('SPortalAdmin');\n\n\t\trequire_once(ADMINDIR . '/PortalAdminMain.controller.php');\n\t\t$admin_main = new ManagePortalConfig_Controller();\n\t\t$admin_main->action_information(false);\n\t}", "public function testCreditsFormatter() {\n $value_alpha = 'Here are some credits.';\n $value_beta = 'Moar credits.';\n\n $entity = EntityTest::create([]);\n $entity->{$this->fieldName}[] = ['value' => $value_alpha];\n $entity->{$this->fieldName}[] = ['value' => $value_beta];\n\n /** @var \\Drupal\\fb_instant_articles\\Plugin\\Field\\InstantArticleFormatterInterface $formatter */\n $formatter = $this->display->getRenderer($this->fieldName);\n\n $article = InstantArticle::create();\n $formatter->viewInstantArticle($entity->{$this->fieldName}, $article, Regions::REGION_FOOTER, $this->normalizerMock);\n\n $credits = $article->getFooter()->getCredits();\n $this->assertEquals(2, count($credits));\n $this->assertEquals($value_alpha, $credits[0]->getPlainText());\n $this->assertEquals($value_beta, $credits[1]->getPlainText());\n }", "function give_stripe_ach_credit_card_form( $form_id, $args ) {\n\n\t/**\n\t * This action hook will be used to display billing address only on Stripe ACH.\n\t *\n\t * @since 1.0.0\n\t */\n\tdo_action( 'give_stripe_ach_after_cc_form', $form_id, $args );\n}", "private static function getApiCreditUrl(){\n\t\treturn \"api/credit\";\n\t}", "function filter_footer_creds( $creds_text ) {\n\n\treturn '[footer_copyright first=\"2015\"] &middot; <a href=\"<?php CHILD_THEME_URL; ?>\">Utility Pro</a>.';\n}", "public function display( $order, $checkout ) {\n\t\tglobal $hrb_options;\n\n\t\t$args = array(\n\t\t\t'meta_query' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'key' => 'credits',\n\t\t\t\t\t'value' => 0,\n\t\t\t\t\t'compare' => '>'\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\n\t\t$plans = hrb_get_plans( HRB_PROPOSAL_PLAN_PTYPE, $args );\n\n\t\t// look for selected addons for the current checkout\n\t\t$addons = (array) $checkout->get_data('addons');\n\n $template_vars = array(\n\t\t\t'plans' => $plans,\n\t\t\t'addons' => $addons,\n\t\t\t'hrb_options' => $hrb_options,\n\t\t\t'bt_step_text' => __( 'Continue', APP_TD ),\n\t\t);\n $template_vars = apply_filters( 'hrb_select_plan_template_vars', $template_vars, HRB_PROPOSAL_PLAN_PTYPE );\n\n\t\tappthemes_load_template( 'form-credits-purchase.php', $template_vars );\n\t}", "public function creditos($id)\n {\n return view('admin.users.creditos', compact('id'));\n }", "public function render_footer_sml_section_2_credit() {\r\n\r\n\t\t\t$output = astra_get_small_footer_custom_text( 'footer-sml-section-2-credit' );\r\n\t\t\treturn do_shortcode( $output );\r\n\t\t}", "private function credit_line_list(){\n $results = $this->dt->credit_line_list();\n echo $results;\n }", "public function action_credit()\n\t{\n\t\tBreadcrumbs::add(Breadcrumb::factory()->set_title(__('Renew')));\n\t\t$this->template->title = __('Renew Advertisement');\n\n\t\t//get advertisement\n\t\t$id = $this->request->param('id');\n\n\t\tif ($id===NULL OR !is_numeric($id))\n\t\t\t$this->request->redirect(Route::get('default')->uri(array('controller' => 'ads', 'action' => 'index')));\n\n\t\t$ad = new Model_Ad(NULL,NULL,$id);\n\n\t\tif (!$ad->loaded())\n\t\t\t$this->request->redirect(Route::get('default')->uri(array('controller' => 'ads', 'action' => 'index')));\n\n\t\t//check the owner\n\t\t//god can see it\n\t\tif (Auth::instance()->get_user()->id_role!=1)\n\t\t{\n\t\t\tif (Auth::instance()->get_user()->id_user!==$ad->id_user)\n\t\t\t\t$this->request->redirect(Route::get('default')->uri(array('controller' => 'ads', 'action' => 'index')));\n\t\t}\n\n\t\t//paying\n\t\tif ($this->request->post())\n\t\t{\n\t\t\t$product = new Model_Product(Core::post('product'));\n\n\t\t\t//create order\n\t\t\t$order = new Model_Order();\n\t\t\t$order->id_product \t= $product->id_product;\n\t\t\t$order->id_user \t= Auth::instance()->get_user()->id_user;\n\t\t\t$order->id_ad \t\t= $ad->id_ad;\n\t\t\t$order->amount \t\t= $product->price;\n\t\t\t$order->ip_address \t= ip2long(Request::$client_ip);\n\t\t\t$order->status \t\t= Model_Order::STATUS_CREATED;\n\t\t\t$order->create();\n\t\t\n\t\t\t$this->request->redirect(Route::url('default',array('controller'=>'payment_paypal','action'=>'form','id'=>$order->id_order)));\n\n\t\t}\n\t\t\n\n\t\t$this->template->bind('content', $content); \n $content = View::factory('pages/ads/credit');\n\n $content->ad = $ad;\n $content->products = Model_Product::get_all();\n\n }", "function handle_support_credits($_key,$details,$product)\n{\n\tunset($product);\n\n\t$row=$GLOBALS['SITE_DB']->query_select('credit_purchases',array('member_id','num_credits'),array('purchase_validated'=>0,'purchase_id'=>intval($_key)),'',1);\n\tif (count ($row) != 1) return;\n\t$member_id=$row[0]['member_id'];\n\tif (is_null($member_id)) return;\n\t$num_credits=$row[0]['num_credits'];\n\n\n\trequire_code('mantis');\n\t$cpf_id = strval(get_credits_profile_field_id());\n\tif(is_null($cpf_id)) return;\n\n\t// Increment the number of credits this customer has\n\trequire_code('ocf_members_action2');\n\t$fields=ocf_get_custom_field_mappings($member_id);\n\tocf_set_custom_field($member_id,$cpf_id,intval($fields['field_'.$cpf_id])+intval($num_credits));\n\n\t// Update the row in the credit_purchases table\n\t$GLOBALS['SITE_DB']->query_update('credit_purchases',array('purchase_validated'=>1),array('purchase_id'=>intval($_key)));\n\n}", "static function _render_footer_sml_section_2_credit() {\n\n\t\t\t$output = astra_get_small_footer_custom_text( 'footer-sml-section-2-credit' );\n\t\t\treturn do_shortcode( $output );\n\t\t}", "function displayCopyright(){\n \n echo \"<span id='copyright'> &copy; Ayesha Begum Shaik (2013800) \".date(\"Y\").\"</span>\";\n \n}", "public function view_credit_note($credit_note_number=0) {\n $credit_note_number = $this->input->get('q');\n $data['sideMenuData'] = fetch_non_main_page_content();\n $data['page_title'] = 'Credit Notes';\n $data['tabledata'] = $this->classTraineeModel->get_credit_note($credit_note_number);\n $data['main_content'] = 'classtrainee/view_credit_note';\n $this->load->view('layout', $data);\n }", "public function credit_card_form($args = array(), $fields = array())\n {\n }", "public function card_form_customization()\n\t\t{\n\t\t\tOmise_Page_Card_From_Customization::render();\n\t\t}", "public function create()\n {\n return view('admin.credits.create');\n }", "public function actionCashflow()\n\t{\n\t\t$this->render('cashflow');\n\t}", "function payment_fields()\r\n\t{\r\n\t\tif( isset($this->description) && $this->description!=''){\r\n\t\techo '<p>'.__('Pay via Viva Payments - you can pay with your credit card.', 'hellaspay-for-woocommerce2').'</p>';\r\n\t\t}\r\n\t}", "function inline_do_footer() {\n\n\t\tdo_action( 'inline_credits' );\n\n}", "public function create()\n {\n return view('admin.credit.create');\n }", "public function about_screen() {\r\n\t\t$theme = wp_get_theme( get_template() );\r\n\t\t?>\r\n\t\t<div class=\"wrap about-wrap\">\r\n\t\t\t<?php $this->intro(); ?>\r\n\t\t\t<div class=\"changelog point-releases\">\r\n\t\t\t\t<div class=\"under-the-hood two-col\">\r\n\t\t\t\t\t<div class=\"col\">\r\n\t\t\t\t\t\t<h3><?php esc_html_e( 'Theme Customizer', 'mise' ); ?></h3>\r\n\t\t\t\t\t\t<p><?php esc_html_e( 'All Theme Options are available via Customize screen.', 'mise' ) ?></p>\r\n\t\t\t\t\t\t<p><a href=\"<?php echo esc_url(admin_url( 'customize.php' )); ?>\" class=\"button button-secondary\"><?php esc_html_e( 'Customize', 'mise' ); ?></a></p>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"col\">\r\n\t\t\t\t\t\t<h3><?php esc_html_e( 'Got theme support question?', 'mise' ); ?></h3>\r\n\t\t\t\t\t\t<p><?php esc_html_e( 'Please put it in our support forum.', 'mise' ) ?></p>\r\n\t\t\t\t\t\t<p><a target=\"_blank\" href=\"<?php echo esc_url( 'https://wordpress.org/support/theme/mise/' ); ?>\" class=\"button button-secondary\"><?php esc_html_e( 'Support', 'mise' ); ?></a></p>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"col\">\r\n\t\t\t\t\t\t<h3><?php esc_html_e( 'Need more features?', 'mise'); ?></h3>\r\n\t\t\t\t\t\t<p><?php esc_html_e( 'Upgrade to PRO version for more exciting features.', 'mise' ) ?></p>\r\n\t\t\t\t\t\t<p><a target=\"_blank\" href=\"<?php echo esc_url( 'https://crestaproject.com/downloads/mise/' ); ?>\" class=\"button button-secondary\"><?php esc_html_e( 'Info about PRO version', 'mise' ); ?></a></p>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"col\">\r\n\t\t\t\t\t\t<h3>\r\n\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\tesc_html_e( 'Translate', 'mise' );\r\n\t\t\t\t\t\t\techo ' ' . esc_html($theme->display( 'Name' ));\r\n\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t</h3>\r\n\t\t\t\t\t\t<p><?php esc_html_e( 'Click below to translate this theme into your own language.', 'mise' ) ?></p>\r\n\t\t\t\t\t\t<p>\r\n\t\t\t\t\t\t\t<a target=\"_blank\" href=\"<?php echo esc_url( 'http://translate.wordpress.org/projects/wp-themes/mise/' ); ?>\" class=\"button button-secondary\">\r\n\t\t\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t\t\tesc_html_e( 'Translate', 'mise' );\r\n\t\t\t\t\t\t\t\techo ' ' . esc_html($theme->display( 'Name' ));\r\n\t\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t</a>\r\n\t\t\t\t\t\t</p>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"return-to-dashboard cresta\">\r\n\t\t\t\t<?php if ( current_user_can( 'update_core' ) && isset( $_GET['updated'] ) ) : ?>\r\n\t\t\t\t\t<a href=\"<?php echo esc_url( self_admin_url( 'update-core.php' ) ); ?>\">\r\n\t\t\t\t\t\t<?php is_multisite() ? esc_html_e( 'Return to Updates', 'mise' ) : esc_html_e( 'Return to Dashboard &rarr; Updates', 'mise' ); ?>\r\n\t\t\t\t\t</a> |\r\n\t\t\t\t<?php endif; ?>\r\n\t\t\t\t<a href=\"<?php echo esc_url( self_admin_url() ); ?>\"><?php is_blog_admin() ? esc_html_e( 'Go to Dashboard &rarr; Home', 'mise' ) : esc_html_e( 'Go to Dashboard', 'mise' ); ?></a>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<?php\r\n\t}", "function get_account_detail($f3) {\n // session check\n if ($f3->get(\"SESSION.UserID\") != \"\") {\n // login success\n $charges = 0; // need to add field in view.\n $render_options = array(\n \"session\" => $f3->get(\"SESSION\"),\n \"loan_amount\" => $this->loans->get_loan_count_by_userid($f3->get(\"SESSION.UserID\")),\n \"res_amount\" => $this->reservations->get_reserved_count_by_userid($f3->get(\"SESSION.UserID\")),\n \"charges\"=> $charges\n );\n echo $f3->get(\"twig\")->render(\"user_account.html\", $render_options);\n } else {\n // redirect to home\n $f3->reroute(\"/\");\n }\n }", "public static function before_checkout_billing_form() {\n echo '<p>' . __('Billing details will need to be entered in the safetypage widget', 'woocommerce-gateway-payment') . '</p>';\n }", "public function generate_account_details_html()\n {\n }", "function display_theme($theme)\n{\n}", "public function render_view_user_balances_screen() {\n print WCP_Trades_View::user_balances_build_html();\n }", "public function render_settings_section() {\n printf( __( 'Insert your %s license information to enable future updates (including bug fixes and new features) and gain access to support.', $this->text_domain ), $this->product_name );\n }", "public function _a_displayLicenseNotification() {\n\n\t\tif( App::i()->license->getKey() ) return;\n\n\t\t$linkHtml = sprintf( '<a href=\"%1$s\">%2$s</a>',\n\t\t\tadd_query_arg( 'tab', 'tools' ),\n\t\t\t__( 'Search engine needs active license to work properly.', 'tmc_sp' )\n\t\t);\n\n\t\tprintf( '<div class=\"notice notice-error tmc-notice is-dismissible\"><p>%1$s</p></div>', $linkHtml );\n\n\t}", "function uc_coupon_print($coupon, $code = NULL, $op = 'view') {\n if ($code) {\n $codes = array($code);\n }\n elseif (!$coupon->bulk) {\n $codes = array($coupon->code);\n }\n else {\n $codes = array();\n for ($id = 0; $id < $coupon->data['bulk_number']; $id++) {\n $codes[] = uc_coupon_get_bulk_code($coupon, $id);\n }\n }\n\n $output = '';\n foreach ($codes as $code) {\n $output .= theme('uc_coupon_certificate', $coupon, $code);\n }\n\n drupal_add_css(drupal_get_path('module', 'uc_coupon') . '/uc_coupon.css', 'module');\n\n if ($op == 'print') {\n echo theme('uc_coupon_page', $output);\n exit;\n }\n\n return $output;\n}", "public function cc_details($order_id)\n {\n $order = wc_get_order($order_id);\n\n $omnipay_cc_link = get_post_meta($order->get_id(), 'omnipay_cc_link');\n\n ?>\n <section>\n <h2>Credit Card Payment</h2>\n <p>Please Click the link bellow to make the payment</p>\n <p>\n <a href=\"<?= $omnipay_cc_link ?>\">Pay Now</a>\n </p>\n </section>\n <?php\n\n }" ]
[ "0.7575988", "0.7511154", "0.72472966", "0.69879436", "0.6894115", "0.683733", "0.6796641", "0.6733958", "0.67251027", "0.6669395", "0.65676165", "0.6481012", "0.64719874", "0.64497197", "0.6442072", "0.6434391", "0.64138937", "0.6300934", "0.6290616", "0.62748605", "0.6268955", "0.6248002", "0.62204766", "0.62113416", "0.6197773", "0.6183715", "0.6159965", "0.6091553", "0.6076699", "0.60765535", "0.6055687", "0.60471874", "0.6010855", "0.5937206", "0.59268916", "0.5921656", "0.5921656", "0.5916725", "0.5908658", "0.5902447", "0.58902246", "0.58751345", "0.58740354", "0.58740354", "0.5855547", "0.5852102", "0.5849236", "0.5840969", "0.584076", "0.581337", "0.5798073", "0.5792202", "0.5790647", "0.57799596", "0.57784057", "0.5770951", "0.57700527", "0.57690555", "0.5766768", "0.57551414", "0.57545", "0.57541895", "0.5752963", "0.57524323", "0.57481354", "0.5741775", "0.5738722", "0.5735274", "0.5729401", "0.5728179", "0.5724762", "0.5720971", "0.5715074", "0.5706914", "0.57054096", "0.5701762", "0.56945753", "0.56824833", "0.5657641", "0.56557983", "0.56366974", "0.56278986", "0.56244504", "0.5618819", "0.56093436", "0.5598697", "0.55946434", "0.5587538", "0.5578315", "0.5574047", "0.55703795", "0.5567021", "0.55644804", "0.5557412", "0.55564386", "0.5555041", "0.55543786", "0.55534816", "0.5546365", "0.55447036" ]
0.76516503
0
Site branding wrapper and display
Обертка для брендирования сайта и отображение
function freshio_site_branding() { ?> <div class="site-branding"> <?php echo freshio_site_title_or_logo(); ?> </div> <?php }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function storefront_site_branding() {\n return;\n}", "function the_brand() {\n\n\tif ( function_exists( 'the_custom_logo' ) ) {\n\t\tthe_custom_logo();\n\t} else {\n\t\t$brand = get_bloginfo('name');\n $output = $brand;\n\t}\n}", "public function add_brand()\n\t{\n\t\t$header = $this->loaded_module_admin(0);\n\t\t$footer = $this->loaded_module_admin(1);\n\t\t\n\t\t$data = $this->settings_admin();\n\t\t\n\t\t$header->header_view();\n\t\t$this->load->view('Add_brand_v', $data);\n\t\t$footer->footer_view();\n\t}", "public function slate_head() {\n \t\t$output = '<meta name=\"HandheldFriendly\" content=\"True\">';\n \t\t$output .= '<meta name=\"MobileOptimized\" content=\"320\">';\n \t\techo $this->dbs_make_cdn( $output );\n \t}", "function bm_genesis_before() {\n\techo '<div class=\"ibm_banner\">';\n\t\techo '<a href=\"' . site_url() . '/ibm-watson\"><img class=\"ibm_banner_img\" src=\"https://boydmarketing.com/wp-content/uploads/boyd-marketing-ibm-watson-partner.png\" /></a>';\n\techo '</div>';\n}", "function rec_it_builder_html_header_content() { ?>\n\t<?php if ( is_front_page() ) {?>\n\t\t<h1 class=\"site-logo\">\n\t\t\t<a href=\"<?php bloginfo('url'); ?>\">\n\t\t\t\t<img class=\"alignleft\" src=\"<?php echo get_stylesheet_directory_uri(); ?>/images/logo.png\" title=\"YOUR_SEO_SITE_TITLE\" alt=\"YOUR_SEO_SITE_ALT_TAG\" width=\"300\" height=\"61\" />\n\t\t\t</a>\n\t\t</h1>\n\t<?php } else { ?>\n\t\t<div class=\"site-logo\">\n\t\t\t<a href=\"<?php bloginfo('url'); ?>\">\n\t\t\t\t<img class=\"alignleft\" src=\"<?php echo get_stylesheet_directory_uri(); ?>/images/logo.png\" title=\"YOUR_SEO_SITE_TITLE\" alt=\"YOUR_SEO_SITE_ALT_TAG\" width=\"300\" height=\"61\" />\n\t\t\t</a>\n\t\t</div>\n\t<?php } ?>\n\t\t<div class=\"builder-module-navigation-menu-wrapper\">\n\t\t<?php wp_nav_menu( array(\n\t\t\t\t'container' \t\t=> 'div',\n\t\t\t\t'container_class' \t=> 'builder-module-navigation',\n\t\t\t\t'menu' \t\t\t=> 'Site Menu',\n\t\t\t\t'menu_class' \t\t=> 'menu nav-right it-mobile-nav-menu'\n\t\t\t\t)\n\t\t\t);\n\t\t?>\n\t</div>\n<?php\n}", "function baindesign324_sitewrapper_open()\n\t{\n\t\techo '<div id=\"site-wrapper\">';\n\t}", "protected function render()\n {\n $settings = $this->get_settings();\n ?>\n <div class=\"happyden-site-logo\">\n <a href=\"<?php echo home_url(); ?>\" class=\"happyden-site-logo-wrap\">\n <?php\n\t\t\t\t\n\t\t\t\techo \"<span class='site-logo'>\";\n if ( 'custom' == $settings['logo_type'] && $settings['image']['url']) {\n echo Group_Control_Image_Size::get_attachment_image_html($settings, 'thumbnail', 'image');\n } else {\n echo $this->happyden_get_site_logo( $settings['logo_type'] );\n }\n\t\t\t\techo '</span>'\n \n ?>\n </a>\n </div>\n <?php\n }", "function get_the_brand_logo( $link = true ) {\n $html = '';\n\n if ( $link == true ) {\n $html .= '<a href=\"' . home_url() . '\">';\n }\n\n if ( $logo = ssm_get_field('brand_logo', 'options') ) {\n if ( $icon = ssm_get_field('brand_icon', 'options') ) {\n $html .= '<img src=\"' . $logo['url'] . '\" alt=\"' . $logo['alt'] . '\" class=\"logo show-for-medium\">';\n $html .= '<img src=\"' . $icon['url'] . '\" alt=\"' . $icon['alt'] . '\" class=\"icon hide-for-medium\">';\n } else {\n $html .= '<img src=\"' . $logo['url'] . '\" alt=\"' . $logo['alt'] . '\" class=\"logo\">';\n }\n } else {\n $html .= '<span class=\"site-title\">' . get_bloginfo('name') . '</span>';\n }\n\n if ( $link == true ) {\n $html .= '</a>';\n }\n\n return $html;\n}", "public function renderBrand()\n {\n TerminalUI::bold(\"\n __ _____ _____ __ __\n || || || || || ||\\ /||\n || || || || || || \\/ ||\n ||___ ||___|| ||___|| || ||\n ¨¨¨¨¨ ¨¨¨¨¨ ¨¨¨¨¨ ¨¨ ¨¨\n \");\n CLITinkerer::breakLine();\n }", "public function brand($brand = FALSE)\n\t{\n\t\t$this->load->library('user_check');\n\t\t$brand = str_replace('_', ' ', $brand);\n\t\t$data = $this->data;\n\t\t$data['title'] = \"Brand - \".ucwords($brand);\n\t\t$data['breadcrumb'] = array( '<a href=\"/mall.html\">MALL</a>', 'BRAND', strtoupper($brand));\n\t\t$data['extraJS'] = '<script src=\"/js/mall-brand.js?v=2.2.0.0\"></script>';\n\t\t$data['extraDiv'] = '<div id=\"hiddenBrand\" style=\"display:none\">'.$brand.'</div>';\n\t\t$data['brand'] = $brand;\n\t\t$data['getBook']= true;\n\t\t\n\t\t\n\t\t$this->load->view('templates/header', $data);\n\t\t$this->load->view('templates/menu', $data);\n\t\t$this->load->view('templates/menu_mall', $data);\n\t\t$this->load->view('mall/brand', $data);\n\t\t$this->load->view('templates/footer', $data);\n\t}", "function freshio_site_title_or_logo()\n\t{\n\t\t$logo = freshio_get_theme_option('site_mode') == 'light' ? freshio_get_theme_option('logo_light', ['url' => '']) : freshio_get_theme_option('logo_dark', ['url' => '']);\n\t\t$logo_light = freshio_get_theme_option('logo_light', ['url' => '']);\n\t\t$logo_dark = freshio_get_theme_option('logo_dark', ['url' => '']);\n\t\tif ($logo['url']) {\n\t\t\t$logo = sprintf(\n\t\t\t\t'<a href=\"%1$s\" class=\"custom-logo-link\" rel=\"home\"><img src=\"%2$s\" class=\"logo-light\" alt=\"Logo\"/><img src=\"%3$s\" class=\"logo-dark\" alt=\"Logo\"/></a>',\n\t\t\t\tesc_url(home_url('/')),\n\t\t\t\tesc_url($logo_light['url']),\n\t\t\t\tesc_url($logo_dark['url'])\n\t\t\t);;\n\t\t\t$html = is_home() ? '<h1 class=\"logo\">' . $logo . '</h1>' : $logo;\n\t\t} else {\n\t\t\t$tag = is_home() ? 'h1' : 'div';\n\n\t\t\t$html = '<' . esc_attr($tag) . ' class=\"beta site-title\"><a href=\"' . esc_url(home_url('/')) . '\" rel=\"home\">' . esc_html(get_bloginfo('name')) . '</a></' . esc_attr($tag) . '>';\n\n\t\t\tif ('' !== get_bloginfo('description')) {\n\t\t\t\t$html .= '<p class=\"site-description\">' . esc_html(get_bloginfo('description', 'display')) . '</p>';\n\t\t\t}\n\t\t}\n\n\t\treturn $html;\n\t}", "public function index()\n {\n return view('branding.index');\n }", "function alx_site_title() {\n\n\t$sitename = '<a href=\"'.home_url('/').'\" rel=\"home\"><span class=\"fa-logo\">\n<i class=\"fa fa-angle-left fa-3x\"></i>\n<i class=\"fa fa-paint-brush fa-3x\"></i>\n<i class=\"fa fa-angle-right fa-3x\"></i>\n</span></a>';\n\n\t// Text or image?\n\tif ( ot_get_option('custom-logo') ) {\n\t\t$logo = '<img src=\"'.ot_get_option('custom-logo').'\" alt=\"'.get_bloginfo('name').'\">';\n\t} else {\n\t\t$logo = 'Canvas is <em>Awesome</em>'; //get_bloginfo('name');\n\t}\n\t\n\t$link = '<a href=\"'.home_url('/').'\" rel=\"home\">'.$logo.'</a>';\n\t\n\tif ( is_front_page() || is_home() ) {\n\t\t$sitename .= '<h1 class=\"site-title\">'.$link.'</h1>'.\"\\n\";\n\t} else {\n\t\t$sitename .= '<p class=\"site-title\">'.$link.'</p>'.\"\\n\";\n\t}\n\t\n\treturn $sitename;\n}", "function hoot_attr_branding( $attr ) {\n\n\t$attr['id'] = 'branding';\n\t$attr['class'] = 'site-branding branding';\n\n\treturn $attr;\n}", "public function index() {\n\t\t$this->title_for_layout = 'Butterfly 1.0.2';\n }", "private static function draw_site_name_meta_tag() {\n $blog_name = get_bloginfo();\n if (!empty($blog_name)) {\n echo \"<meta name='shareaholic:site_name' content='\" . $blog_name . \"' />\\n\";\n }\n }", "public function brands(){\n\n\t\t// Get the login session user id\n\t\t$this->admin_info = $this->user_model->get_user_info($this->session->userdata['admin_user_id']);\n\n\t\t$this->admin_info['title']='Brands';\n\t\t\n\t\t$this->breadcrumb->add('Dashboard', 'admin/index', FALSE);\n\t\t$this->breadcrumb->add($this->admin_info['title']);\n\n\t\t$this->load->view('admin/theme/header', $this->admin_info);\n\t\t$this->load->view('admin/brands', $this->admin_info);\t\t\n\t\t$this->load->view('admin/theme/footer');\t\t\n\t}", "public function optin_branding_added_by_default()\n {\n if (!PAnD::is_admin_notice_active('optin-branding-added-by-default-forever')) {\n return;\n }\n\n if (MAILOPTIN_VERSION_NUMBER > '1.1.2.0') return;\n\n $learn_more = 'https://mailoptin.io/article/make-money-mailoptin-branding/?ref=wp_dashboard';\n\n $notice = sprintf(\n __('MailOptin branding is now included on all optin forms unless you explicitly disabled it at \"Configuration\" panel in form builder. %sLearn more%s', 'mailoptin'),\n '<a href=\"' . $learn_more . '\" target=\"_blank\">',\n '</a>'\n );\n\n echo '<div data-dismissible=\"optin-branding-added-by-default-forever\" class=\"update-nag notice notice-warning is-dismissible\">';\n echo \"<p><strong>$notice</strong></p>\";\n echo '</div>';\n }", "function get_site_logo() {\n\t\t$spt_logo = get_option(SPT_OPTION_LOGO);\n\t\t$spt_logo = ($spt_logo)? $spt_logo : get_bloginfo('name');\n\t\t?>\n\t\t<h1 class=\"grid_6 logo\"><a href=\"<?=SPT_HOME;?>\"><?php echo $spt_logo; ?></a></h1>\n\t\t<?php\n\t}", "function branded_header() {\r\n\tglobal $user_identity;\r\n\tget_currentuserinfo();\r\n\t$siteurl = get_bloginfo('siteurl');\r\n\t$blogname = get_bloginfo('name');\r\n\techo '<link rel=\"stylesheet\" type=\"text/css\" href=\"' . get_settings('siteurl') . '/wp-content/plugins/branded-admin/branded-admin.css\" />';\r\n\r\n\techo '<div id=\"wphead_branded\">';\r\n\techo '<img height=35 src=\"' . get_settings('siteurl') . '/wp-content/plugins/branded-admin/images/branded-header.png\" /> </div>';\r\n\r\n\techo '<div id=\"user_info2\" class=\"top_strip\">';\r\n\techo '<div id=\"dashmenu_dashboard\" class=\"top_strip\"><a href=\"index.php\" class=\"top_strip\">Dashboard </a> </div>';\r\n\r\n\techo '<div id=\"dashmenu_login\" class=\"top_strip\"> . <a href=\"'.$siteurl.'/wp-login.php?action=logout\" class=\"top_strip\">Log Out</a></div>';\r\n\r\n\techo '</div>';\r\n}", "function gridbox_site_title() {\r\n\r\n\t\tif ( is_home() or is_page_template( 'template-magazine.php' ) ) : ?>\r\n\r\n\t\t\t<h1 class=\"site-title\"><a href=\"<?php echo esc_url( home_url( '/' ) ); ?>\" rel=\"home\"><?php bloginfo( 'name' ); ?></a></h1>\r\n\r\n\t\t<?php else : ?>\r\n\r\n\t\t\t<p class=\"site-title\"><a href=\"<?php echo esc_url( home_url( '/' ) ); ?>\" rel=\"home\"><?php bloginfo( 'name' ); ?></a></p>\r\n\r\n\t\t<?php\r\n\t\tendif;\r\n\t}", "public function render()\n {\n return view('components.header.logo')\n ->with('name', setting('blog.name'));\n }", "function the_brand_logo( $link = true ) {\n echo get_the_brand_logo( $link );\n}", "public function admin_head()\n\t\t{\n\n\t\t\tremove_submenu_page( 'index.php', 'incipio-welcome' );\n\t\t\tremove_submenu_page( 'index.php', 'incipio-about' );\n\t\t\tremove_submenu_page( 'index.php', 'incipio-help' );\n\n\t\t\t// Badge for welcome page\n\t\t\t$badge_url = get_template_directory_uri() . '/framework/chemistry/admin/assets/images/logo-transparent-black-themeists.png';\n\t\t\t\n\t\t\t?>\n\n\t\t\t<style type=\"text/css\" media=\"screen\">\n\t\t\t/*<![CDATA[*/\n\t\t\t.edd-badge {\n\t\t\t\tpadding-top: 150px;\n\t\t\t\theight: 52px;\n\t\t\t\twidth: 185px;\n\t\t\t\tmargin: 0 -5px;\n\t\t\t\tbackground: url('<?php echo $badge_url; ?>') no-repeat;\n\t\t\t}\n\n\t\t\t.about-wrap .edd-badge {\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: 0;\n\t\t\t\tright: 0;\n\t\t\t}\n\n\t\t\t.videoWrapper {\n\t\t\t\tposition: relative;\n\t\t\t\tpadding-bottom: 51.25%; /* 16:9 */\n\t\t\t\tpadding-top: 25px;\n\t\t\t\theight: 0;\n\t\t\t}\n\t\t\t.videoWrapper iframe {\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t}\n\n\t\t\t/*]]>*/\n\t\t\t</style>\n\n\t\t\t<?php\n\n\t\t}", "public static function header_output() {\n\t\t?>\n\t\t<!-- Customizer CSS -->\n\t\t<style type=\"text/css\">\n\t\t\t#text-logo, #tagline { display: <?php echo get_theme_mod('FCN_hide_header_text'); ?>}\n\t\t\t<?php self::generate_css('.site-footer .site-info a, .site-footer .site-info, .site-header, .site-header a', 'color', 'header_footer_link_color' ); ?>\n\t\t\t<?php self::generate_css('body.login div#login h1 a', 'background-image', 'header_image'); ?>\n\t\t\t<?php self::generate_css('.site-main', 'color', 'content_text_color'); ?>\n\t\t\t<?php self::generate_css('.site-main a, .site-main a:visited', 'color', 'content_link_color'); ?>\n\t\t\t<?php self::generate_css('.site-title #logo', 'color', 'logo_text_color'); ?>\n\t\t\t<?php self::generate_css('#tagline', 'color', 'tagline_text_color'); ?>\n\t\t\t<?php self::generate_css('.site-content h1, .site-content h2, .site-content h3, .site-content h4, .site-content h5, .site-content h6, .site-content h1 a, .site-content h2 a, .site-content h3 a, .site-content h4 a, .site-content h5 a, .site-content h6 a, .entry-meta', 'color', 'article_header_color' ); ?>\n\t\t\t<?php self::generate_css('.site-header, .site-footer', 'background-color', 'header_footer_background_color'); ?>\n\t\t\t<?php self::generate_css('.site-header, .site-footer', 'border-color', 'header_footer_border_color'); ?>\n\t\t\t.site-content .page-side-bar h1, .site-content .page-side-bar h2, .site-content .page-side-bar h3, .site-content .page-side-bar h4, .site-content .page-side-bar h5, .site-content .page-side-bar h6 { color: <?php echo get_theme_mod('side_bar_heading_color'); ?>;}\n\t\t</style>\n\t\t<!-- End Customizer CSS -->\n\t\t<?php\n\t}", "public function get_logo_html()\n {\n global $SITE;\n\n $logoorsitename = \\theme_remui\\toolbox::get_setting('logoorsitename');\n $siteicon = \\theme_remui\\toolbox::get_setting('siteicon');\n $checklogo = \\theme_remui\\toolbox::setting_file_url('logo', 'logo');\n $logohtml = '';\n if (!empty($checklogo)) {\n $logo = $checklogo;\n } else {\n $logo = \\theme_remui\\toolbox::image_url('logo', 'theme');\n }\n\n $checklogomini = \\theme_remui\\toolbox::setting_file_url('logomini', 'logomini');\n if (!empty($checklogomini)) {\n $logomini = $checklogomini;\n } else {\n $logomini = \\theme_remui\\toolbox::image_url('logomini', 'theme');\n }\n\n if ($logoorsitename == 'logo') {\n ?>\n $logohtml .= \"<a href='$CFG->wwwroot;' class='logo'>\n <span class='navbar-brand-logo' style='background-image: url($logomini);background-position: center; height:50px; background-size: contain; background-repeat: no-repeat;'></span>\n <span class='navbar-brand-logo-mini' style='background-image: url($logomini);\n background-position: center; height:50px; background-size: contain; background-repeat: no-repeat;'></span>\n </a>\";\n <?php\n\n } elseif ($logoorsitename == 'sitename') {\n ?>\n <a class=\"logo\" href=\"<?php echo $CFG->wwwroot; ?>\">\n <span class=\"logo-mini\"><i class=\"fa fa-<?php echo $siteicon; ?>\"></i></span>\n <span class=\"logo-lg\">\n <?php echo format_string($SITE->shortname); ?>\n </span>\n </a>\n <?php\n\n } else {\n ?>\n <a class=\"logo\" href=\"<?php echo $CFG->wwwroot; ?>\">\n <span class=\"logo-mini\"><i class=\"fa fa-<?php echo $siteicon; ?>\"></i></span>\n <span class=\"logo-lg\">\n <i class=\"fa fa-<?php echo $siteicon; ?>\"></i>\n <?php echo format_string($SITE->shortname); ?>\n </span>\n </a>\n <?php\n\n }\n\n // $logo = $this->get_compact_logo_url();\n // return !empty($logo) && !$this->should_display_main_logo();\n\n echo $logohtml;\n }", "function cyprus_attr_branding( $attr ) {\n\n\t$attr['id'] = 'branding';\n\t$attr['class'] = 'site-branding';\n\n\treturn $attr;\n}", "public function render_page() {\n\t\t?>\n\t\t<div class=\"wrap block-lab-settings\">\n\t\t\t<?php\n\t\t\t$this->render_page_header();\n\t\t\tinclude block_lab()->get_path() . 'php/views/license.php';\n\t\t\t?>\n\t\t</div>\n\t\t<?php\n\t}", "function meta() {\n\t\t\t// echo \"<link href='https://fonts.googleapis.com/css?family=Josefin+Sans:600,bold,bolditalic' rel='stylesheet' type='text/css'>\";\n\t\t\techo '<meta name=\"google-site-verification\" content=\"rX3Aj4eDqSU0-Q0hBW-qsxVYaIUgxshD-kKYjSQAVb0\" />';\n\t\t\t?>\n\t\t\t<div id=\"fb-root\"></div>\n\t\t\t<script type='text/javascript'>\n\t\t\t\t// Facebook Button\n\t\t\t\t(function(d, s, id) {\n\t\t\t\tvar js, fjs = d.getElementsByTagName(s)[0];\n\t\t\t\tif (d.getElementById(id)) return;\n\t\t\t\tjs = d.createElement(s); js.id = id;\n\t\t\t\tjs.src = \"https://connect.facebook.net/en_US/all.js#xfbml=1&appId=198125846901828\";\n\t\t\t\tfjs.parentNode.insertBefore(js, fjs);\n\t\t\t\t}(document, 'script', 'facebook-jssdk'));\n\n\t\t\t\t//Twitter button\n\t\t\t\t!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=\"//platform.twitter.com/widgets.js\";fjs.parentNode.insertBefore(js,fjs);}}(document,\"script\",\"twitter-wjs\");\n\t\t\t</script>\n\n\t\t\t<?php\n\t\t\tif ( is_singular() ) {\n\t\t\t\tglobal $post;\n\t\t\t\t$img2 = genesis_get_image( array( 'format' => 'url') );\n\t\t\t\techo '<link rel=\"image_src\" href=\"' . $img2 . '\" />';\n\t\t\t} else { ?>\n\t\t\t\t<link rel=\"image_src\" href=\"<?php echo get_stylesheet_directory_uri(); ?>/images/site_image.jpg\" />\n\t\t\t<?php }\n\t}", "function _layoutBanner($bChinese)\n{\n//\tif ($ar[1] == 'woody')\t$strImage = GetImgElement('/woody/image/image.jpg', 'Woody Home Page');\n//\telse\n\t$strImage = GetImgElement('/image/image_palmmicro.jpg', 'Palmmicro Name Logo');\n\t$strLink = GetLinkElement($strImage, '/index'.($bChinese ? 'cn' : '').'.html');\n \n echo <<<END\n\n<div id=\"banner\">\n <div class=\"logo\">$strLink</div>\n <div class=\"blue\"></div>\n</div>\n\n<script>\n\tvar width = window.screen.width;\n\tdocument.cookie = \"screen=\" + width + \"; path=/\";\n</script>\nEND;\n}", "function alienship_do_site_title() {\n\n\t// Use H1 on home, paragraph elsewhere\n\t$element = is_front_page() || is_home() ? 'h1' : 'p';\n\n\t// Title content that goes inside wrapper\n\t$site_name = sprintf( '<a href=\"%s\" title=\"%s\" rel=\"home\">%s</a>', trailingslashit( home_url() ), esc_attr( get_bloginfo( 'name' ) ), get_bloginfo( 'name' ) );\n\n\t// Put it all together\n\t$title = '<' . $element . ' id=\"site-title\" class=\"site-title\">' . $site_name . '</' . $element .'>';\n\n\t// Echo the title\n\techo apply_filters( 'alienship_site_title_content', $title );\n}", "function blog(){\n \n $this->archive();\n \n /**\n * if the user chooses to display a static front page\n * we will use the content from the chosen static page\n * to fill in header values. Else, we'll just use the\n * blog name and description\n */\n \n if('page' == get_option(\"show_on_front\")){\n \n //use content from page for posts, to fill in header values\n \n $post = get_post(get_option('page_for_posts', true));\n $this->Template->set_layout_header($post);\n \n } else {\n \n //use the regular blog info instead\n \n $this->View->add('layout_header_title', get_bloginfo(\"name\"))\n ->add('layout_header_subtitle', get_bloginfo(\"description\"))\n ->add('layout_header_tags', array());\n } \n }", "public function site_library_render() {\n\n\t\tif ( ! empty( $this->config['site_library'] ) ) {\n\n\t\t\t$site_library = $this->config['site_library'];\n\n\t\t\tif ( ! empty( $site_library ) ) {\n\t\t\t\t?>\n\t\t\t\t<div class=\"site-library-section three-col\">\n\t\t\t\t\t<div class=\"tg-site-library-top\">\n\t\t\t\t\t\t<h3><?php esc_html_e( 'Want to import any of the demos below?', 'zakra' ); ?></h3>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"plugin-install-notice\">\n\t\t\t\t\t\t<?php esc_html_e( 'Clicking the \"Import\" button in any of the demos below will install and activate the ThemeGrill demo importer plugin.', 'zakra' ); ?>\n\t\t\t\t\t</div>\n\t\t\t\t\t<?php\n\t\t\t\t\techo Zakra_Site_Library::zakra_site_library_page_content(); // WPCS: XSS OK.\n\t\t\t\t\t?>\n\t\t\t\t</div>\n\t\t\t\t<?php\n\t\t\t}\n\t\t}\n\n\t}", "function display_success_page_top(){\n?>\n <div class=\"navbar_container\">\n <div class=\"brand\">\n <img src=\"cloth/brand.jpg\" alt=\"brand\"/>\n </div>\n </div>\n <div class=\"problem_container\">\n<?php }", "function cyberchimps_header_logo() {\n\n\t$url = ( cyberchimps_get_option( 'custom_logo_url' ) == '1' ) ? cyberchimps_get_option( 'custom_logo_url_link' ) : esc_url( home_url() );\n\tif ( cyberchimps_get_option( 'custom_logo' ) == '1' ) {\n\t\t$logo = cyberchimps_get_option( 'custom_logo_uploader' );\n\t\t?>\n\t\t<div id=\"logo\">\n\t\t\t<a href=\"<?php echo $url; ?>\" title=\"<?php echo get_bloginfo( 'name' ); ?>\"><img src=\"<?php echo stripslashes( $logo ); ?>\" alt=\"<?php echo get_bloginfo( 'name' ); ?>\"></a>\n\t\t</div>\n\t\t<?php\n\t} else {\n\t\tif ( function_exists( 'cyberchimps_header_site_title' ) ) {\n\t\t\tcyberchimps_header_site_title();\n\t\t}\n\t}\n}", "function blogslog_header_start() { ?>\n <div class=\"menu-overlay\"></div>\n\t\t<header id=\"masthead\" class=\"site-header\" role=\"banner\">\n\t\t\t<div class=\"wrapper\">\n\t\t\t \t<div id=\"site-menu\">\n\t\t<?php\n\t}", "function gn_sample_home_genesis_meta() {\n\tif ( is_active_sidebar( 'accueil-haut' ) || is_active_sidebar( 'accueil-matcouleurhaut' ) || is_active_sidebar( 'dkup-woman' ) || is_active_sidebar( 'dkup-man' ) ) {\n\t\t//* Force full-width-content layout setting\n\t\tadd_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );\n\t\t//* Add gn-sample-home body class\n\t\tadd_filter( 'body_class', 'ms_sample_body_class' );\n\t\t//* Remove breadcrumbs\n\t\tremove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' );\n\t\t//* Remove the default Genesis loop\n\t\tremove_action( 'genesis_loop', 'genesis_do_loop' );\n\t\t//* Ajoute la première zône de widget\n\t\tadd_action( 'genesis_loop', 'ms_sample_accueil_premier_widget', 1 );\n\t\t//* Ajoute la deuxième zône de widget\n\t\tadd_action( 'genesis_loop', 'ms_sample_accueil_deuxieme_widget', 2 );\n\t\t//* Ajoute la troisième zône de widget\n\t\tadd_action( 'genesis_loop', 'ms_sample_accueil_troisieme_widget', 3 );\n\t\t//* Ajoute la quatrième zône de widget\n\t\tadd_action( 'genesis_loop', 'ms_sample_accueil_quatrieme_widget', 4 );\n\t\t//* Ajoute la cinquième zône de widget\n\t\tadd_action( 'genesis_loop', 'ms_sample_accueil_cinquieme_widget', 5 );\n\t\t//* Ajoute la sixième zône de widget\n\t\tadd_action( 'genesis_loop', 'ms_sample_accueil_sixieme_widget', 6 );\n\t\t//* Ajoute la septième zône de widget\n\t\tadd_action( 'genesis_loop', 'ms_sample_accueil_septieme_widget', 6 );\n\t}\n}", "function wicked_blogtitle() {\n // load the custom options\n global $childoptions;\n foreach ($childoptions as $value) {\n $$value['id'] = get_option($value['id'], $value['std']);\n }\n\n if('true' == $wicked_show_logo) { ?>\n <div id=\"blog-title\" class=\"header-image\">\n <span><a href=\"<?php bloginfo('url') ?>/\"\n title=\"<?php bloginfo('name') ?>\"\n rel=\"home\"><?php bloginfo('name') ?></a></span>\n </div>\n <?php } else {\n thematic_blogtitle();\n }\n}", "public static function render_banner_slogan() {\n\t\t$slogan = get_post_meta( get_the_ID(), INVENTOR_LISTING_PREFIX . 'slogan', true );\n\n\t\tif ( ! empty( $slogan ) ) {\n\t\t\techo '<h4 class=\"detail-banner-slogan\">' . esc_attr( $slogan ) . '</h4>';\n\t\t}\n\t}", "function lalita_construct_site_title() {\n\t\t$lalita_settings = wp_parse_args(\n\t\t\tget_option( 'lalita_settings', array() ),\n\t\t\tlalita_get_defaults()\n\t\t);\n\n\t\t// Get the title and tagline.\n\t\t$title = get_bloginfo( 'title' );\n\t\t$tagline = get_bloginfo( 'description' );\n\n\t\t// If the disable title checkbox is checked, or the title field is empty, return true.\n\t\t$disable_title = ( '1' == $lalita_settings[ 'hide_title' ] || '' == $title ) ? true : false;\n\n\t\t// If the disable tagline checkbox is checked, or the tagline field is empty, return true.\n\t\t$disable_tagline = ( '1' == $lalita_settings[ 'hide_tagline' ] || '' == $tagline ) ? true : false;\n\n\t\t// Build our site title.\n\t\t$site_title = apply_filters( 'lalita_site_title_output', sprintf(\n\t\t\t'<%1$s class=\"main-title\" itemprop=\"headline\">\n\t\t\t\t<a href=\"%2$s\" rel=\"home\">\n\t\t\t\t\t%3$s\n\t\t\t\t</a>\n\t\t\t</%1$s>',\n\t\t\t( is_front_page() && is_home() ) ? 'h1' : 'p',\n\t\t\tesc_url( apply_filters( 'lalita_site_title_href', home_url( '/' ) ) ),\n\t\t\tget_bloginfo( 'name' )\n\t\t) );\n\n\t\t// Build our tagline.\n\t\t$site_tagline = apply_filters( 'lalita_site_description_output', sprintf(\n\t\t\t'<p class=\"site-description\">\n\t\t\t\t%1$s\n\t\t\t</p>',\n\t\t\thtml_entity_decode( get_bloginfo( 'description', 'display' ) )\n\t\t) );\n\n\t\t// Site title and tagline.\n\t\tif ( false == $disable_title || false == $disable_tagline ) {\n\t\t\techo apply_filters( 'lalita_site_branding_output', sprintf( \n\t\t\t\t'<div class=\"site-branding\">\n\t\t\t\t\t%1$s\n\t\t\t\t\t%2$s\n\t\t\t\t</div>',\n\t\t\t\t( ! $disable_title ) ? $site_title : '',\n\t\t\t\t( ! $disable_tagline ) ? $site_tagline : ''\n\t\t\t) );\n\t\t}\n\t}", "function WPBikeRent_Theme_logo_display(){ \n\t\t$testlogo1 = 'img_site_logo';\n\t\techo $this->WPBikeRent_Theme_image_uploader_field( $testlogo1, get_option('img_site_logo') );\n\t}", "public function site() {\r\n\r\n\t\t// add translations\r\n\t\tforeach (array('LESS_THAN_A_MINUTE_AGO', 'ABOUT_A_MINUTE_AGO', 'X_MINUTES_AGO', 'ABOUT_AN_HOUR_AGO', 'X_HOURS_AGO', 'ONE_DAY_AGO', 'X_DAYS_AGO') as $key) {\r\n\t\t\t$translations[$key] = $this['system']->__($key);\r\n\t\t}\r\n\r\n // add stylesheets/javascripts\r\n $this['asset']->addFile('css', 'twitter:styles/style.css');\r\n $this['asset']->addFile('js', 'twitter:twitter.js');\r\n\t\t$this['asset']->addString('js', sprintf('$widgetkit.trans.addDic(%s);', json_encode($translations)));\r\n \r\n\t\t// rtl\r\n\t\tif ($this['system']->options->get('direction') == 'rtl') {\r\n\t $this['asset']->addFile('css', 'twitter:styles/rtl.css');\r\n\t\t}\r\n\r\n\t}", "public function shareride_head(){\r\n\t\t\t?>\r\n\t\t\t<!DOCTYPE html>\r\n\t\t\t<html>\r\n\t\t\t<head>\r\n\t\t\t\t<title><?= CONF['site']['title'] ?></title>\r\n\t\t\t\t<!-- use iso-8859-1 charset if you need to support languages like French -->\r\n\t\t\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />\r\n\t\t\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\r\n\t\t\t\t<!-- Includes the favicon -->\r\n\t\t\t\t<link rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/favicon.ico\" />\r\n\t\t\t\t<!-- Includes all stylesheets -->\r\n\t\t\t\t<?php\r\n\t\t\t\t\tforeach($_SESSION['reader']['style'] as $style => $stylesheet){\r\n\t\t\t\t\t\techo '<link rel=\"stylesheet\" href=\"/static/css/' . $stylesheet . '\" />'; \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<!-- Include all scripts -->\r\n\t\t\t\t<?php\r\n\t\t\t\t\tforeach($_SESSION['reader']['script'] as $script => $scriptname){\r\n\t\t\t\t\t\techo '<script src=\"/static/js/' . $scriptname . '\"></script>'; \r\n\t\t\t\t\t}\r\n\t\t\t\t?>\r\n\t\t\t</head>\r\n\t\t\t<body>\r\n\t\t\t<?php\r\n\t\t}", "function helix_masthead_logo() {\n\tif ( get_dna('masthead_logo') ) {\n\t\techo '<style> a#masthead-logo { background: url(\"' . get_dna('masthead_logo') . '\") no-repeat 0 0; } </style>';\n\t}\n}", "public function index()\n\t{\n\t\t$header = $this->loaded_module_admin(0);\n\t\t$footer = $this->loaded_module_admin(1);\n\t\t\n\t\t$data = $this->settings_admin();\n\t\t\n\t\t$list_all_brand = $this->Brand_m->get_all_brand();\n\t\t$data[\"list_all_brand\"] = $list_all_brand;\n\t\t\n\t\t$header->header_view();\n\t\t$this->load->view('List_brand_v', $data);\n\t\t$footer->footer_view();\n\t}", "public function render_header_site_title_tagline() {\r\n\t\t\t$display_site_title = astra_get_option( 'display-site-title' );\r\n\t\t\t$display_site_tagline = astra_get_option( 'display-site-tagline' );\r\n\r\n\t\t\t$html = astra_get_site_title_tagline( $display_site_title, $display_site_tagline );\r\n\r\n\t\t\treturn do_shortcode( $html );\r\n\t\t}", "function gridbox_blog_title() {\r\n\r\n\t\t// Get theme options from database.\r\n\t\t$theme_options = gridbox_theme_options();\r\n\r\n\t\t// Set blog title and descripton.\r\n\t\t$blog_title = $theme_options['blog_title'];\r\n\t\t$blog_description = $theme_options['blog_description'];\r\n\r\n\t\t// Display Blog Title.\r\n\t\tif ( '' !== $blog_title || '' !== $blog_description || is_customize_preview() ) : ?>\r\n\r\n\t\t\t<header class=\"page-header blog-header clearfix\">\r\n\r\n\t\t\t\t<?php // Display Blog Title.\r\n\t\t\t\tif ( '' !== $blog_title || is_customize_preview() ) : ?>\r\n\r\n\t\t\t\t\t<h2 class=\"archive-title blog-title\"><?php echo wp_kses_post( $blog_title ); ?></h2>\r\n\r\n\t\t\t\t<?php endif;\r\n\r\n\t\t\t\t// Display Blog Description.\r\n\t\t\t\tif ( '' !== $blog_description || is_customize_preview() ) : ?>\r\n\r\n\t\t\t\t\t<p class=\"blog-description\"><?php echo wp_kses_post( $blog_description ); ?></p>\r\n\r\n\t\t\t\t<?php endif; ?>\r\n\r\n\t\t\t</header>\r\n\r\n\t\t<?php endif;\r\n\t}", "function cyberchimps_logo() {\n\t?>\n\t<header id=\"cc-header\" class=\"row-fluid\">\n\t\t<div class=\"span7\">\n\t\t\t<?php\n\t\t\tif ( function_exists( 'cyberchimps_header_logo' ) ) {\n\t\t\t\tcyberchimps_header_logo();\n\t\t\t}\n\t\t\t?>\n\t\t</div>\n\t</header>\n\t<?php\n}", "public function vxAbout() {\n\t\techo('<div id=\"main\">');\n\t\techo('<div class=\"blank\">');\n\t\t_v_ico_map();\n\t\techo(' <a href=\"/\">' . Vocabulary::site_name . '</a> &gt; ' . $this->lang->about(Vocabulary::site_name) . '</div>');\n\t\t_v_b_l_s();\n\t\techo('<h1 class=\"silver\">');\n\t\techo($this->lang->about(Vocabulary::site_name));\n\t\techo('</h1>');\n\t\tinclude(BABEL_PREFIX . '/res/about/en_us.php');\n\t\t_v_d_e();\n\t\techo('</div>');\n\t}", "function colabsthemes_seo_page(){\r\n\r\n\t\t$themename = get_option( 'colabs_themename' );\r\n\t\t$manualurl = get_option( 'colabs_manual' );\r\n\t$shortname = 'seo_colabs';\r\n\r\n\t\t//Framework Version in Backend Head\r\n\t\t$colabs_framework_version = get_option( 'colabs_framework_version' );\r\n\r\n\t\t//GET themes update RSS feed and do magic\r\n\tinclude_once(ABSPATH . WPINC . '/feed.php' );\r\n\r\n\t$pos = strpos($manualurl, 'documentation' );\r\n\t$theme_slug = str_replace( \"/\", \"\", substr($manualurl, ($pos + 13))); //13 for the word documentation\r\n\r\n\t\t//add filter to make the rss read cache clear every 4 hours\r\n\t\tadd_filter( 'wp_feed_cache_transient_lifetime', create_function( '$a', 'return 14400;' ) );\r\n\r\n\t$inner_pages = array(\t\r\n\t\t\t\t\t\t\t'b' => 'Page title;',\r\n\t\t\t\t\t\t\t'a' => 'Page title; Blog title',\r\n\t\t\t\t\t\t\t'd' => 'Page title; Blog description',\r\n\t\t\t\t\t\t\t'f' => 'Page title; Blog title; Blog description',\r\n\t\t\t\t\t\t\t'c' => 'Blog title; Page title;',\r\n\t\t\t\t\t\t\t'e' => 'Blog title; Page title; Blog description'\r\n\t\t\t\t\t\t);\r\n\r\n\t$seo_options = array();\r\n\r\n\t$seo_options[] = array( \"name\" => __(\"Page Title\",\"colabsthemes\"),\r\n\t\t\t\t\t\"icon\" => \"misc\",\r\n\t\t\t\t\t\"type\" => \"heading\" );\r\n\r\n\t$seo_options[] = array( \"name\" => __(\"Blog Title\",\"colabsthemes\"),\r\n\t\t\t\t\t\"desc\" => __(\"NOTE: This value corresponds to that in the Settings > General tab in the WordPress Dashboard.\",\"colabsthemes\"),\r\n\t\t\t\t\t\"id\" => \"blogname\",\r\n\t\t\t\t\t\"std\" => \"\",\r\n\t\t\t\t\t\"type\" => \"text\" );\r\n\r\n\t$seo_options[] = array( \"name\" => __(\"Blog Description\",\"colabsthemes\"),\r\n\t\t\t\t\t\"desc\" => __(\"NOTE: This value corresponds to that in the Settings > General tab in the WordPress Dashboard.\",\"colabsthemes\"),\r\n\t\t\t\t\t\"id\" => \"blogdescription\",\r\n\t\t\t\t\t\"std\" => \"\",\r\n\t\t\t\t\t\"type\" => \"text\" );\r\n\r\n\t$seo_options[] = array( \"name\" => __(\"Separator\",\"colabsthemes\"),\r\n\t\t\t\t\t\"desc\" => __(\"Set a character that separates elements of your page titles ( eg. |, -, or &raquo; ).\",\"colabsthemes\"),\r\n\t\t\t\t\t\"id\" => $shortname.\"_separator\",\r\n\t\t\t\t\t\"std\" => \"|\",\r\n\t\t\t\t\t\"type\" => \"text\" );\r\n\r\n\t$seo_options[] = array( \"name\" => __(\"Custom Page Titles\",\"colabsthemes\"),\r\n\t\t\t\t\t\"desc\" => __(\"Check this box to gain control over the elements of the page titles (highly recommended).\",\"colabsthemes\"),\r\n\t\t\t\t\t\"id\" => $shortname.\"_wp_title\",\r\n\t\t\t\t\t\"std\" => \"true\",\r\n\t\t\t\t\t\"class\" => \"collapsed\",\r\n\t\t\t\t\t\"type\" => \"checkbox\" );\r\n\r\n\t$seo_options[] = array( \"name\" => __(\"Homepage Title Layout\",\"colabsthemes\"),\r\n\t\t\t\t\t\"desc\" => __(\"Define the order of the title elements.\",\"colabsthemes\"),\r\n\t\t\t\t\t\"id\" => $shortname.\"_home_layout\",\r\n\t\t\t\t\t\"std\" => \"a\",\r\n\t\t\t\t\t\"class\" => \"hidden\",\r\n\t\t\t\t\t\"options\" => array(\t\r\n\t\t\t\t\t\t\t\t\t\t'b' => 'Blog title',\r\n\t\t\t\t\t\t\t\t\t\t'a' => 'Blog title; Blog description',\r\n\t\t\t\t\t\t\t\t\t\t'c' => 'Blog description',\r\n\t\t\t\t\t\t\t\t\t\t'd' => 'Blog description; Blog title'\r\n\t\t\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\"type\" => \"select2\" );\r\n\r\n\t$seo_options[] = array( \"name\" => __(\"Single Title Layout\",\"colabsthemes\"),\r\n\t\t\t\t\t\"desc\" => __(\"Define the order of the title elements.\",\"colabsthemes\"),\r\n\t\t\t\t\t\"id\" => $shortname.\"_single_layout\",\r\n\t\t\t\t\t\"std\" => \"f\",\r\n\t\t\t\t\t\"class\" => \"hidden\",\r\n\t\t\t\t\t\"options\" => $inner_pages,\r\n\t\t\t\t\t\"type\" => \"select2\" );\r\n\r\n\t$seo_options[] = array( \"name\" => __(\"Page Title Layout\",\"colabsthemes\"),\r\n\t\t\t\t\t\"desc\" => __(\"Define the order of the title elements.\",\"colabsthemes\"),\r\n\t\t\t\t\t\"id\" => $shortname.\"_page_layout\",\r\n\t\t\t\t\t\"std\" => \"f\",\r\n\t\t\t\t\t\"class\" => \"hidden\",\r\n\t\t\t\t\t\"options\" => $inner_pages,\r\n\t\t\t\t\t\"type\" => \"select2\" );\r\n\r\n\t$seo_options[] = array( \"name\" => __(\"Archive Title Layout\",\"colabsthemes\"),\r\n\t\t\t\t\t\"desc\" => __(\"Define the order of the title elements.\",\"colabsthemes\"),\r\n\t\t\t\t\t\"id\" => $shortname.\"_archive_layout\",\r\n\t\t\t\t\t\"std\" => \"f\",\r\n\t\t\t\t\t\"class\" => \"hidden\",\r\n\t\t\t\t\t\"options\" => $inner_pages,\r\n\t\t\t\t\t\"type\" => \"select2\" );\r\n\r\n\t$seo_options[] = array( \"name\" => __(\"Page Number\",\"colabsthemes\"),\r\n\t\t\t\t\t\"desc\" => __(\"Define a text string that precedes page number in page titles.\",\"colabsthemes\"),\r\n\t\t\t\t\t\"id\" => $shortname.\"_paged_var\",\r\n\t\t\t\t\t\"std\" => \"Page\",\r\n\t\t\t\t\t\"class\" => \"hidden\",\r\n\t\t\t\t\t\"type\" => \"text\" );\r\n\r\n\t$seo_options[] = array( \"name\" => __(\"Page Number Position\",\"colabsthemes\"),\r\n\t\t\t\t\t\"desc\" => __(\"Define the position of page number in page titles.\",\"colabsthemes\"),\r\n\t\t\t\t\t\"id\" => $shortname.\"_paged_var_pos\",\r\n\t\t\t\t\t\"std\" => \"before\",\r\n\t\t\t\t\t\"class\" => \"hidden\",\r\n\t\t\t\t\t\"options\" => array(\t'before' => 'Before Title',\r\n\t\t\t\t\t\t\t\t\t\t'after' => 'After Title'),\r\n\t\t\t\t\t\"type\" => \"select2\" );\r\n\r\n\t$seo_options[] = array( \"name\" => __(\"Disable Custom Titles\",\"colabsthemes\"),\r\n\t\t\t\t\t\"desc\" => __(\"If you prefer to have uniform titles across you theme. Alternatively they will be generated from custom fields and/or plugin data.\",\"colabsthemes\"),\r\n\t\t\t\t\t\"id\" => $shortname.\"_wp_custom_field_title\",\r\n\t\t\t\t\t\"std\" => \"false\",\r\n\t\t\t\t\t\"class\" => \"hidden hide\",\r\n\t\t\t\t\t\"type\" => \"checkbox\" );\r\n\r\n\t$seo_options[] = array( \"name\" => __(\"Description Meta\",\"colabsthemes\"),\r\n\t\t\t\t\t\"icon\" => \"misc\",\r\n\t\t\t\t\t\"type\" => \"heading\" );\r\n\r\n\t$seo_options[] = array( \"name\" => __(\"Homepage Description\",\"colabsthemes\"),\r\n\t\t\t\t\t\"desc\" => __(\"Choose where to populate the homepage meta description from.\",\"colabsthemes\"),\r\n\t\t\t\t\t\"id\" => $shortname.\"_meta_home_desc\",\r\n\t\t\t\t\t\"std\" => \"b\",\r\n\t\t\t\t\t\t\t\t\t\t\"class\" => \"collapsed\",\r\n\t\t\t\t\t\"options\" => array(\t\"a\" => \"Off\",\r\n\t\t\t\t\t\t\t\t\t\t\"b\" => \"From Site Description\",\r\n\t\t\t\t\t\t\t\t\t\t\"c\" => \"From Custom Homepage Description\"),\r\n\t\t\t\t\t\"type\" => \"radio\" );\r\n\r\n\t$seo_options[] = array( \"name\" => __(\"Custom Homepage Description\",\"colabsthemes\"),\r\n\t\t\t\t\t\"desc\" => __(\"Add a custom meta description to your homepage.\",\"colabsthemes\"),\r\n\t\t\t\t\t\"id\" => $shortname.\"_meta_home_desc_custom\",\r\n\t\t\t\t\t\"std\" => \"\",\r\n\t\t\t\t\t\t\t\t\t\t\"class\" => \"hidden last\",\r\n\t\t\t\t\t\"type\" => \"textarea\" );\r\n\r\n\t$seo_options[] = array( \"name\" => __(\"Single Page/Post Description\",\"colabsthemes\"),\r\n\t\t\t\t\t\"desc\" => __(\"Choose where to populate the single Page/Post meta description from.\",\"colabsthemes\"),\r\n\t\t\t\t\t\"id\" => $shortname.\"_meta_single_desc\",\r\n\t\t\t\t\t\"std\" => \"c\",\r\n\t\t\t\t\t\"options\" => array(\t\"a\" => \"Off *\",\r\n\t\t\t\t\t\t\t\t\t\t\"b\" => \"From Custom Field and/or Plugin Data\",\r\n\t\t\t\t\t\t\t\t\t\t\"c\" => \"Automatically from Post/Page Content\",\r\n\t\t\t\t\t\t\t\t\t\t),\r\n\t\t\t\t\t\"type\" => \"radio\" );\r\n\r\n\t$seo_options[] = array( \"name\" => __(\"Global Post/Page Description\",\"colabsthemes\"),\r\n\t\t\t\t\t\"desc\" => __(\"Add a custom meta description to your posts and pages. This will only show if no other data is available from the selection above. This will still be added even if setting above is set to \\\"Off\\\".\",\"colabsthemes\"),\r\n\t\t\t\t\t\"id\" => $shortname.\"_meta_single_desc_sitewide\",\r\n\t\t\t\t\t\"std\" => \"\",\r\n\t\t\t\t\t\"class\" => \"collapsed\",\r\n\t\t\t\t\t\"type\" => \"checkbox\" );\r\n\r\n\t$seo_options[] = array( \"name\" => __(\"Global Post/Page Description\",\"colabsthemes\"),\r\n\t\t\t\t\t\"desc\" => __(\"Add a global post/page description.\",\"colabsthemes\"),\r\n\t\t\t\t\t\"id\" => $shortname.\"_meta_single_desc_custom\",\r\n\t\t\t\t\t\"std\" => \"\",\r\n\t\t\t\t\t\"class\" => \"hidden\",\r\n\t\t\t\t\t\"type\" => \"textarea\" );\r\n\r\n\t$seo_options[] = array( \"name\" => __(\"Keyword Meta\",\"colabsthemes\"),\r\n\t\t\t\t\t\"icon\" => \"misc\",\r\n\t\t\t\t\t\"type\" => \"heading\" );\r\n\r\n\t$seo_options[] = array( \"name\" => __(\"Homepage Keywords\",\"colabsthemes\"),\r\n\t\t\t\t\t\"desc\" => __(\"Choose where to populate the homepage meta keywords from.\",\"colabsthemes\"),\r\n\t\t\t\t\t\"id\" => $shortname.\"_meta_home_key\",\r\n\t\t\t\t\t\"std\" => \"a\",\r\n\t\t\t\t\t\t\t\t\t\t\"class\" => \"collapsed\",\r\n\t\t\t\t\t\"options\" => array(\t\"a\" => \"Off\",\r\n\t\t\t\t\t\t\t\t\t\t\"c\" => \"From Custom Homepage Keywords\"),\r\n\t\t\t\t\t\"type\" => \"radio\" );\r\n\r\n\t$seo_options[] = array( \"name\" => __(\"Custom Homepage Keywords\",\"colabsthemes\"),\r\n\t\t\t\t\t\"desc\" => __(\"Add a comma-separated list of keywords to your homepage.\",\"colabsthemes\"),\r\n\t\t\t\t\t\"id\" => $shortname.\"_meta_home_key_custom\",\r\n\t\t\t\t\t\"std\" => \"\",\r\n\t\t\t\t\t\t\t\t\t\t\"class\" => \"hidden last\",\r\n\t\t\t\t\t\"type\" => \"textarea\" );\r\n\r\n\t$seo_options[] = array( \"name\" => __(\"Single Page/Post Keywords\",\"colabsthemes\"),\r\n\t\t\t\t\t\"desc\" => __(\"Choose where to populate the single page/post meta keywords from.\",\"colabsthemes\"),\r\n\t\t\t\t\t\"id\" => $shortname.\"_meta_single_key\",\r\n\t\t\t\t\t\"std\" => \"c\",\r\n\t\t\t\t\t\"options\" => array(\t\"a\" => \"Off *\",\r\n\t\t\t\t\t\t\t\t\t\t\"b\" => \"From Custom Fields and/or Plugins\",\r\n\t\t\t\t\t\t\t\t\t\t\"c\" => \"Automatically from Post Tags &amp; Categories\"),\r\n\t\t\t\t\t\"type\" => \"radio\" );\r\n\r\n\t$seo_options[] = array( \"name\" => __(\"Global Post/Page Keywords\",\"colabsthemes\"),\r\n\t\t\t\t\t\"desc\" => __(\"Add custom meta keywords to your posts and pages. These will only show if no other data is available from the selection above. These will still be added even if setting above is set to \\\"Off\\\".\",\"colabsthemes\"),\r\n\t\t\t\t\t\"id\" => $shortname.\"_meta_single_key_sitewide\",\r\n\t\t\t\t\t\"std\" => \"\",\r\n\t\t\t\t\t\"class\" => \"collapsed\",\r\n\t\t\t\t\t\"type\" => \"checkbox\" );\r\n\r\n\t$seo_options[] = array( \"name\" => __(\"Global Post/Page Keywords\",\"colabsthemes\"),\r\n\t\t\t\t\t\"desc\" => __(\"Add a comma-separated list of keywords to your posts and pages.\",\"colabsthemes\"),\r\n\t\t\t\t\t\"id\" => $shortname.\"_meta_single_key_custom\",\r\n\t\t\t\t\t\"std\" => \"\",\r\n\t\t\t\t\t\"class\" => \"hidden\",\r\n\t\t\t\t\t\"type\" => \"textarea\" );\r\n\r\n\t$seo_options[] = array( \"name\" => __(\"Indexing Options\",\"colabsthemes\"),\r\n\t\t\t\t\t\"icon\" => \"misc\",\r\n\t\t\t\t\t\"type\" => \"heading\" );\r\n\r\n\t$seo_options[] = array( \"name\" => __(\"Archive Pages to Index\",\"colabsthemes\"),\r\n\t\t\t\t\t\"desc\" => __(\"Select which archive pages to be indexed. Indexing archive pages may result in duplicate entries in search engines and cause content dilution.\",\"colabsthemes\"),\r\n\t\t\t\t\t\"id\" => $shortname.\"_meta_indexing\",\r\n\t\t\t\t\t\"std\" => \"category\",\r\n\t\t\t\t\t\"type\" => \"multicheck\",\r\n\t\t\t\t\t\"options\" => array(\t'category' => 'Category Archives',\r\n\t\t\t\t\t\t\t\t\t\t'tag' => 'Tag Archives',\r\n\t\t\t\t\t\t\t\t\t\t'author' => 'Author Pages',\r\n\t\t\t\t\t\t\t\t\t\t'search' => 'Search Results',\r\n\t\t\t\t\t\t\t\t\t\t'date' => 'Date Archives'));\r\n\r\n\t$seo_options[] = array( \"name\" => __(\"Add 'follow' Meta to Posts and Pages\",\"colabsthemes\"),\r\n\t\t\t\t\t\"desc\" => __(\"Check this box to add 'follow' meta to all posts and pages. This means that all links on these pages will be crawled by search engines, including those leading away from your site.\",\"colabsthemes\"),\r\n\t\t\t\t\t\"id\" => $shortname.\"_meta_single_follow\",\r\n\t\t\t\t\t\"std\" => \"\",\r\n\t\t\t\t\t\"type\" => \"checkbox\" );\r\n\r\n\t$seo_options[] = array( \"name\" => __(\"Advanced Settings\",\"colabsthemes\"),\r\n\t\t\t\t\t\"icon\" => \"general\",\r\n\t\t\t\t\t\"type\" => \"heading\" );\r\n\r\n\t$seo_options[] = array( \"name\" => __(\"Please Read\",\"colabsthemes\"),\r\n\t\t\t\t\t\"type\" => \"info\",\r\n\t\t\t\t\t\"std\" => \"Data from 3rd party plugin such as All-in-One SEO Pack, Headspace 2 and WordPress SEO By Yoast can also be used where applicable. Use the checkbox below to use 3rd party plugin data.</span>\" );\r\n\r\n\t$seo_options[] = array( \"name\" => __(\"Use 3rd Party Plugin Data\",\"colabsthemes\"),\r\n\t\t\t\t\t\"desc\" => __(\"Meta data added to <strong>custom fields in posts and pages</strong> will be extracted and used where applicable. This typically does not include home page and archive pages and only single post/pages.\",\"colabsthemes\"),\r\n\t\t\t\t\t\"id\" => $shortname.\"_use_third_party_data\",\r\n\t\t\t\t\t\"std\" => \"false\",\r\n\t\t\t\t\t\"type\" => \"checkbox\" );\r\n\r\n\t$seo_options[] = array( \"name\" => __(\"Hide ColorLabs SEO Settings\",\"colabsthemes\"),\r\n\t\t\t\t\t\"desc\" => __(\"Check this box to hide the ColorLabs SEO Settings box in the post and page editing screens.\",\"colabsthemes\"),\r\n\t\t\t\t\t\"id\" => $shortname.\"_hide_fields\",\r\n\t\t\t\t\t\"std\" => \"false\",\r\n\t\t\t\t\t\"type\" => \"checkbox\" );\r\n\r\n\r\n\tupdate_option( 'colabs_seo_template',$seo_options);\r\n\t?>\r\n\r\n\t\t<div class=\"wrap colabs_container\">\r\n\t\t\t<h2 class=\"colabs_admin_page_title\"></h2>\r\n\t\t\t<?php\r\n\t\t\tif(\r\n\t\t\t\tclass_exists( 'All_in_One_SEO_Pack') ||\r\n\t\t\t\tclass_exists( 'Headspace_Plugin') ||\r\n\t\t\t\tclass_exists( 'WPSEO_Admin' ) ||\r\n\t\t\t\tclass_exists( 'WPSEO_Frontend' )\r\n\t\t\t\t) {\r\n\t\t\t\techo \"<div class='error'><p><strong>3rd Party SEO Plugin(s) Detected</strong> - Some \".$themename.\" SEO functionality has been disabled.</p></div>\";\r\n\t\t\t} ?>\r\n\r\n\t\t\t<?php\r\n\t\t\tif ( get_option( 'blog_public') == 0 ) {\r\n\t\t\t\techo \"<div class='error'><p><strong>This site is set to Private</strong> - SEO is disabled, change settings <a href='\". admin_url( 'options-privacy.php' ) . \"'>here</a>.</p></div>\";\r\n\t\t\t} ?>\r\n\r\n\t\t\t<form action=\"\" enctype=\"multipart/form-data\" id=\"colabsform\">\r\n\t\t\t\t<?php\r\n\t\t\t\t// Add nonce for added security.\r\n\t\t\t\tif ( function_exists( 'wp_nonce_field' ) ) { wp_nonce_field( 'colabsframework-seo-options-update' ); } // End IF Statement\r\n\t\t\t\t$colabs_nonce = '';\r\n\t\t\t\tif ( function_exists( 'wp_create_nonce' ) ) { $colabs_nonce = wp_create_nonce( 'colabsframework-seo-options-update' ); } // End IF Statement\r\n\t\t\t\tif ( '' == $colabs_nonce ) {} else { ?>\r\n\t\t\t\t\t<input type=\"hidden\" name=\"_ajax_nonce\" value=\"<?php echo $colabs_nonce; ?>\" />\r\n\t\t\t\t<?php } // End IF Statement ?> \r\n\t\t\t\t<div class=\"clear\"></div>\r\n\r\n\t\t\t\t<?php colabs_theme_check();?>\r\n\t\t\t\t<div id=\"colabs-popup-save\" class=\"colabs-save-popup\"><div class=\"colabs-save-save\"><?php _e(\"Options Updated\",\"colabsthemes\"); ?></div></div>\r\n\t\t\t\t<div id=\"colabs-popup-reset\" class=\"colabs-save-popup\"><div class=\"colabs-save-reset\"><?php _e(\"Options Reset\",\"colabsthemes\"); ?></div></div>\r\n\r\n\t\t\t\t<div class=\"clear\"></div>\r\n\t\t\t\t<?php $return = colabsthemes_machine($seo_options); ?>\r\n\t\t\t\t<div id=\"main\" class=\"menu-item-settings metabox-holder\">\r\n\t\t\t\t\t<div id=\"panel-header\">\r\n\t\t\t\t\t\t<?php colabsthemes_options_page_header('reset_button=false'); ?>\r\n\t\t\t\t\t</div><!-- #panel-header -->\r\n\r\n\t\t\t\t\t<div id=\"sidebar-nav\">\r\n\t\t\t\t\t\t<ul><?php echo $return[1]; ?></ul>\r\n\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t<div id=\"panel-content\">\r\n\t\t\t\t\t\t<div class=\"group help-block\"> <p><?php _e(\"Drag icon on the left and Drop it here to customize\",\"colabsthemes\"); ?></p> </div>\r\n\t\t\t\t\t\t<?php echo $return[0]; ?>\r\n\t\t\t\t\t\t<div class=\"clear\"></div>\r\n\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t<div id=\"panel-footer\">\r\n\t\t\t\t\t\t<ul>\r\n\t\t\t\t\t\t\t<li class=\"docs\"><a title=\"Theme Documentation\" href=\"http://colorlabsproject.com/documentation/<?php echo strtolower( str_replace( \" \",\"\",$themename ) ); ?>\" target=\"_blank\" ><?php _e(\"View Documentation\",\"colabsthemes\"); ?></a></li>\r\n\t\t\t\t\t\t\t<li class=\"forum\"><a href=\"http://colorlabsproject.com/resolve/\" target=\"_blank\"><?php _e(\"Submit a Support Ticket\",\"colabsthemes\"); ?></a></li>\r\n\t\t\t\t\t\t\t<li class=\"idea\"><a href=\"http://ideas.colorlabsproject.com/\" target=\"_blank\"><?php _e(\"Suggest a Feature\",\"colabsthemes\"); ?></a></li>\r\n\t\t\t\t\t\t</ul>\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t<div class=\"save-bar save_bar_top right\">\r\n\t\t\t\t\t\t\t<img style=\"display:none\" src=\"<?php echo get_template_directory_uri(); ?>/functions/images/ajax-loading.gif\" class=\"ajax-loading-img ajax-loading-img-top\" alt=\"Working...\" />\r\n\t\t\t\t\t\t\t<input type=\"submit\" value=\"Save Changes\" class=\"button submit-button button-primary\" />\r\n\t\t\t\t\t\t\t<button class=\"button submit-button reset-button button-highlighted\"><?php _e('Reset Options', 'colabsthemes'); ?></button>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div><!-- #panel-footer -->\r\n\r\n\t\t\t\t</div><!-- #main -->\r\n\t\t\t</form>\r\n\r\n\t\t\t<form action=\"<?php echo esc_attr( $_SERVER['REQUEST_URI'] ); ?>\" method=\"post\" id=\"colabsform-reset\" style=\"display: none\">\r\n\t\t\t\t<?php\r\n\t\t\t\t// Add nonce for added security.\r\n\t\t\t\tif ( function_exists( 'wp_nonce_field' ) ) { wp_nonce_field( 'colabsframework-seo-options-reset' ); } // End IF Statement\r\n\t\t\t\t$colabs_nonce = '';\r\n\t\t\t\tif ( function_exists( 'wp_create_nonce' ) ) { $colabs_nonce = wp_create_nonce( 'colabsframework-seo-options-reset' ); } // End IF Statement\r\n\t\t\t\tif ( '' != $colabs_nonce ) { ?>\r\n\t\t\t\t\t<input type=\"hidden\" name=\"_ajax_nonce\" value=\"<?php echo $colabs_nonce; ?>\" />\r\n\t\t\t\t<?php } // End IF Statement ?>\r\n\t\t\t\t\r\n\t\t\t\t<input name=\"reset\" type=\"submit\" value=\"Reset Options\" class=\"button submit-button reset-button button-highlighted\" onclick=\"return confirm( '<?php _e(\"Click OK to reset all options. All settings will be lost\",\"colabsthemes\"); ?>!' );\" />\r\n\t\t\t\t<input type=\"hidden\" name=\"colabs_save\" value=\"reset\" /> \r\n\t\t\t</form>\r\n\t\t<div style=\"clear:both;\"></div>\r\n\t</div><!--wrap-->\r\n\r\n<?php }", "public function index()\n {\n //\n return view('admin.af-login.brand.index');\n }", "function display_problem_page_top(){\n?>\n <div class=\"navbar_container\">\n <div class=\"brand\">\n <img src=\"cloth/brand.jpg\" alt=\"brand\"/>\n </div>\n </div>\n <div class=\"problem_container\">\n<?php }", "function revive_home_genesis_meta() {\n\nif ( is_active_sidebar( 'home-top-left' ) || is_active_sidebar( 'home-top-right' ) || is_active_sidebar( 'home-middle' ) || is_active_sidebar( 'home-bottom-left' ) || is_active_sidebar( 'home-bottom-right' ) ) {\n\n\t\t//* Force full-width-content layout setting\n\t\tadd_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );\n\n\t\t// Add revive-home body class\n\t\tadd_filter( 'body_class', 'revive_body_class' );\n\n\t\t// Remove the default Genesis loop\n\t\tremove_action( 'genesis_loop', 'genesis_do_loop' );\n\n\t\t// Add homepage widgets\n\t\tadd_action( 'genesis_after_header', 'revive_homepage_widgets' );\n\n\t}\n}", "function bjorn_header_promo_show() {\n $bjorn_theme_options = bjorn_get_theme_options();\n\n echo '<div class=\"header-promo-content\">'.do_shortcode($bjorn_theme_options['header_banner_editor']).'</div>'; // This is safe place and we can't use wp_kses_post or other esc_ functions here because this is ads area where user may use Google Adsense and other Java Script banners code with <script> inside.\n}", "function hospiten_omega_process_page(&$variables) {\n // Hook into color.module.\n if (module_exists('color')) {\n _color_page_alter($variables);\n }\n // Always print the site name and slogan, but if they are toggled off, we'll\n // just hide them visually.\n $variables['hide_site_name'] = theme_get_setting('toggle_name') ? FALSE : TRUE;\n $variables['hide_site_slogan'] = theme_get_setting('toggle_slogan') ? FALSE : TRUE;\n if ($variables['hide_site_name']) {\n // If toggle_name is FALSE, the site_name will be empty, so we rebuild it.\n $variables['site_name'] = filter_xss_admin(variable_get('site_name', 'Drupal'));\n }\n if ($variables['hide_site_slogan']) {\n // If toggle_site_slogan is FALSE, the site_slogan will be empty, so we rebuild it.\n $variables['site_slogan'] = filter_xss_admin(variable_get('site_slogan', ''));\n }\n // Since the title and the shortcut link are both block level elements,\n // positioning them next to each other is much simpler with a wrapper div.\n if (!empty($variables['title_suffix']['add_or_remove_shortcut']) && $variables['title']) {\n // Add a wrapper div using the title_prefix and title_suffix render elements.\n $variables['title_prefix']['shortcut_wrapper'] = array(\n '#markup' => '<div class=\"shortcut-wrapper clearfix\">',\n '#weight' => 100,\n );\n $variables['title_suffix']['shortcut_wrapper'] = array(\n '#markup' => '</div>',\n '#weight' => -99,\n );\n // Make sure the shortcut link is the first item in title_suffix.\n $variables['title_suffix']['add_or_remove_shortcut']['#weight'] = -100;\n }\n}", "function sflu_replace_logo() {\n\t$sf_get_logo = get_theme_mod( 'sflu_logo' );\n \tif ( get_theme_mod( 'sflu_logo' ) )\n \t\techo '<div class=\"site-logo\"><a href=\"' . site_url() . '\"><img src=\"' . $sf_get_logo .'\"></a></div>';\n}", "static function _render_partial_site_title() {\n\n\t\t\t$site_title = astra_get_option( 'display-site-title' );\n\n\t\t\tif ( true == $site_title ) {\n\t\t\t\treturn get_bloginfo( 'name', 'display' );\n\t\t\t}\n\t\t}", "function talemy_output_content_banner() {\n get_template_part( 'templates/content-banner' );\n }", "function displayBanner()\n\t\t{\n\t\t\techo \"\n <div class='bg2'>\n\t\t\t<h2><em>Categories Manager</em></h2>\n\t\t\t<p align='center'>\";\n\t\t\t\n\t\t\t// menus\n\t\t\techo \"\n <a href='categories.php'>Available</a> . \n\t\t\t<a href='categories.php?event=disabled'>Disabled</a> . \n\t\t\t<a href='categoriescompose.php'>Create</a>\";\n\t\t\t\n\t\t\techo \"\n </p>\n\t\t\t</div>\";\n\t\t\t\n\t\t\treturn;\n\t\t}", "function tempera_title_and_description() {\n\t$temperas = tempera_get_theme_options();\n\tforeach ($temperas as $key => $value) { ${\"$key\"} = $value ; }\n\t// Header styling and image loading\n\t// Check if this is a post or page, if it has a thumbnail, and if it's a big one\n\tglobal $post;\n\n\tif (get_header_image() != '') { $himgsrc=get_header_image(); }\n\tif ( is_singular() && has_post_thumbnail( $post->ID ) && $tempera_fheader == \"Enable\" &&\n\t\t( $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'header' ) ) &&\n\t\t$image[1] >= HEADER_IMAGE_WIDTH ) : $himgsrc= $image[0];\n\tendif;\n\n\n\tif (isset($himgsrc) && ($himgsrc != '')) : echo '<img id=\"bg_image\" alt=\"\" title=\"\" src=\"'.$himgsrc.'\" />'; endif;\n?>\n<div id=\"header-container\">\n<?php\n\n\tswitch ($tempera_siteheader) {\n\t\tcase 'Site Title and Description':\n\t\t\techo '<div>';\n\t\t\t$heading_tag = ( is_home() || is_front_page() ) ? 'h1' : 'div';\n\t\t\techo '<'.$heading_tag.' id=\"site-title\">';\n\t\t\techo '<span> <a href=\"'.esc_url( home_url( '/' ) ).'\" title=\"'.esc_attr( get_bloginfo( 'name', 'display' ) ).'\" rel=\"home\">'.get_bloginfo( 'name' ).'</a> </span>';\n\t\t\techo '</'.$heading_tag.'>';\n\t\t\techo '<div id=\"site-description\" >'.get_bloginfo( 'description' ).'</div></div>';\n\t\tbreak;\n\n\t\tcase 'Clickable header image' :\n\t\t\techo '<a href=\"'.esc_url( home_url( '/' ) ).'\" id=\"linky\"></a>' ;\n\t\tbreak;\n\n\t\tcase 'Custom Logo' :\n\t\t\tif (isset($tempera_logoupload) && ($tempera_logoupload != '')) :\n\t\t\t\techo '<div><a id=\"logo\" href=\"'.esc_url( home_url( '/' ) ).'\" ><img title=\"\" alt=\"\" src=\"'.$tempera_logoupload.'\" /></a></div>';\n\t\t\tendif;\n\t\tbreak;\n\n\t\tcase 'Empty' :\n\t\tbreak;\n\t}\n\techo '</div>';\n}", "public function display_header() {\n\t\tif( ! $this->smart ) {\n?>\n<style type=\"text/css\">\n\t.sd-social-icon-text li.share-scoopit a.sd-button > span {\n\t\tbackground: url('<?php echo plugins_url( 'scoopit.png', __FILE__ ); ?>') no-repeat;\n\t\tpadding-left: 20px;\n\t}\n\n\t.sd-social-icon .sd-content ul li[class*='share-'].share-scoopit a.sd-button {\n\t\tbackground: #6cab36 url('<?php echo plugins_url( 'scoopit-white.png', __FILE__ ); ?>') no-repeat;\n\t\tcolor: #fff !important;\n\t\twidth: 16px;\n\t\theight: 16px;\n\t\ttop: 16px;\n\t}\n</style>\n<?php\n\t\t}\n\t}", "abstract protected function getSite();", "function asu_scholar_preprocess_page(&$variables) {\n asu_scholar_check_for_home();\n // Pull in ASU Brand generated blocks.\n module_load_include('inc', 'asu_brand', 'asu_brand.block');\n $header = asu_brand_get_block_header();\n $footer = asu_brand_get_block_footer();\n $variables['page']['asu_brand_header'] = $header;\n $variables['page']['asu_brand_footer'] = $footer;\n\n // Pull in more elements\n if (module_exists('asu_os_boxes')) {\n // Site info (will be header title below ASU logo\n module_load_include('inc', 'asu_os_boxes', 'asu_os_boxes_site_info');\n $site_info = asu_os_boxes_site_info::load('os_box_asu_more_site_info');\n $site_info = $site_info->render();\n $variables['page']['asu_site_title'] = $site_info['content'];\n // Main menu\n module_load_include('inc', 'asu_os_boxes', 'asu_os_boxes_main_menu');\n $main_menu = asu_os_boxes_main_menu::load('os_box_asu_more_main_menu');\n $main_menu = $main_menu->render();\n $variables['page']['asu_main_menu'] = $main_menu['content'];\n }\n // Front page customization\n if ($variables['is_front'] && !(module_exists('vsite') && vsite_get_vsite())) {\n $variables['theme_hook_suggestions'][] = 'page__designerfront';\n // Add CSS for front page\n $options = array(\n 'type' => 'file',\n 'group' => 'CSS_THEME',\n 'every_page' => FALSE,\n 'preprocess' => FALSE,\n );\n drupal_add_css(path_to_theme() . '/css/asu-scholar.front.css', $options);\n }\n // Add Breadcrumb\n if (isset($variables['breadcrumb'])) {\n $variables['breadcrumb'] = _asu_scholar_fix_breadcrumbs($variables['breadcrumb']);\n }\n // Default Open Scholar title\n $variables['page']['default_title'] = '<div class=\"asu-global--inner--padding header__sitename\">' .\n '<span><a class=\"active\" href=\"/\">Open Scholar</a></span>' .\n '</div>';\n}", "private static function shareaholic_tags() {\n echo \"\\n<!-- Shareaholic Content Tags -->\\n\";\n self::draw_site_name_meta_tag();\n self::draw_language_meta_tag();\n self::draw_url_meta_tag();\n self::draw_keywords_meta_tag();\n self::draw_article_meta_tag();\n self::draw_site_id_meta_tag();\n self::draw_plugin_version_meta_tag();\n self::draw_image_meta_tag();\n echo \"\\n<!-- Shareaholic Content Tags End -->\\n\";\n }", "public function index()\n {\n return view('admin.brand.index');\n }", "public function index()\n {\n return view('admin.brand.index');\n }", "function zp_add_site_credits(){\n\tif( is_home() || is_front_page() || is_page_template( 'section_template.php' ) )\n\t\treturn;\n\techo '<div class=\"site_credits\"><p>'.get_bloginfo( 'name' ).' - '.get_bloginfo( 'description' ).'</p></div>';\n}", "function bjorn_header_promo2_show() {\n $bjorn_theme_options = bjorn_get_theme_options();\n\n echo '<div class=\"header-promo-content\">'.do_shortcode($bjorn_theme_options['header_banner2_editor']).'</div>'; // This is safe place and we can't use wp_kses_post or other esc_ functions here because this is ads area where user may use Google Adsense and other Java Script banners code with <script> inside.\n}", "function splitinfinities_login_logo() {\n\t$color = get_field('brand_site_theme', 'options');\n\n\t?>\n\t\t<script>\n\t\t\tsetTimeout(() => {\n\t\t\t\tvar head = document.querySelector('#login h1');\n\t\t\t\thead.innerHTML = '<img src=\"<?php echo get_template_directory_uri() ?>/assets/src/global/images/mark@2x.png\" />';\n\t\t\t})\n\t\t</script>\n\t\t<style type=\"text/css\">\n\t\t\t#svg { display: none; }\n\n\t\t\t#login h1 {\n\t\t\t\tcolor: white;\n\t\t\t\tfill: white;\n\t\t\t\twidth: 180px;\n\t\t\t\tmargin: auto;\n\t\t\t}\n\n\t\t\t#login h1 img {\n\t\t\t\twidth: 180px;\n\t\t\t}\n\t\t</style>\n\t<?php\n}", "public function content() {\n\n ?>\n <h2>SEO Sidebar Links</h2>\n <div class=\"wrap\">\n <div id=\"poststuff\">\n <div id=\"post-body\" class=\"metabox-holder columns-1\">\n <div id=\"post-body-content\">\n <?php $this->seo_link_box(); ?>\n </div><!-- end post-body-content -->\n </div><!-- post-body meta box container -->\n </div>\n <!--poststuff end -->\n </div><!-- wrap end -->\n <?php\n }", "public function brand()\n {\n return $this->brand;\n }", "abstract function renderSite($title);", "function theme_yunomi_ll_recipe_brands($fields) {\n global $language;\n global $user;\n $country = helper_get_site_country();\n // The brand banner\n $brand_data = ll_recipe_get_brand_data();\n $code = $country . '_' . $language->language;\n if (!empty($fields['merknaam']) && !empty($brand_data[$code][$fields['merknaam']])){\n \treturn array('name' => $brand_data[$code][$fields['merknaam']][0], 'logo' => theme('imagecache' , 'll_recipe_banner_brand_img_content_footer_w84' , drupal_get_path('module','ll_recipe') . '/brands/' . $brand_data[$code][$fields['merknaam']][0] . '.png'), 'url' => $brand_data[$code][$fields['merknaam']][1]);\n }\n return array();\n}", "function alienship_header_title_and_description() {\n\n\tif ( !is_front_page() || !is_home() ) { ?>\n\t\t<p id=\"site-title\" class=\"site-title\">\n\t\t\t<span>\n\t\t\t\t<a href=\"<?php echo esc_url( home_url( '/' ) ); ?>\" title=\"<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>\" rel=\"home\"><?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?></a>\n\t\t\t</span>\n\t\t</p>\n\t\t<p id=\"site-description\" class=\"site-description\"><?php echo get_bloginfo( 'description' ); ?></p>\n\n\t<?php } else { ?>\n\n\t\t<h1 id=\"site-title\" class=\"site-title\">\n\t\t\t<a href=\"<?php echo esc_url( home_url( '/' ) ); ?>\" title=\"<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>\" rel=\"home\"><?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?></a>\n\t\t</h1>\n\t\t<h2 id=\"site-description\" class=\"site-description\"><?php echo get_bloginfo( 'description' ); ?></h2>\n\n\t<?php }\n}", "public function index() {\n\n AZ::layout('content', array(\n 'block' => 'index',\n 'page_title' => __('Bootigniter - Another Open Source CMS, A Pack of Codeigniter + Bootstrap', true)\n ));\n\n //$this->content->track(); // uncomment for enabled self tracking into Visitors\n }", "protected function render() {\n\t\t$settings = $this->get_settings_for_display(); \n\t\t$target = $settings['website_link']['is_external'] ? ' target=\"_blank\"' : '';\n\t\t$nofollow = $settings['website_link']['nofollow'] ? ' rel=\"nofollow\"' : '';\n\t\tif(!empty($settings['website_link']['url'])){\n\t\t\t$full_url = 'href=\"' . $settings['website_link']['url'] . '\"' . $target . $nofollow;\t\n\t\t} else {\n\t\t\t$full_url = 'href=\"#\"';\n\t\t}?>\n\n\t\t<!-- Flip banner -->\n\t\t<a <?php echo $full_url; ?>\" class=\"flip-banner parallax\" data-background=\"<?php echo esc_url($settings['background']['url']); ?>\" data-color=\"<?php echo esc_attr($settings['color']); ?>\" data-color-opacity=\"<?php echo esc_attr($settings['opacity']['size']/100); ?>\" data-img-width=\"2500\" data-img-height=\"1600\">\n\n\t\t\t<div class=\"flip-banner-content\">\n\t\t\t\t<h2 class=\"flip-visible\"><?php echo esc_html($settings['text_visible']); ?></h2>\n\t\t\t\t<h2 class=\"flip-hidden\"><?php echo esc_html($settings['text_hidden']); ?> <i class=\"sl sl-icon-arrow-right\"></i></h2>\n\t\t\t</div>\n\t\t</a>\n\t\t<?php\n\t}", "protected function render() {\n\n\t\t$settings = $this->get_settings_for_display();\n\n\t\t$heading = $settings['heading'];\n\t\t$items = $settings['items'];\n\t\t?>\n\t\t<div class=\"sub-hero-section\">\n\t\t\t<div class=\"container\">\n\t\t\t\t<h2 class=\"text-center\"><?php echo esc_html( $heading ); ?></h2>\n\t\t\t\t<div class=\"logo-cards-wrap\">\n\t\t\t\t\t<div class=\"logo-cards-row flex-container\">\n\t\t\t\t\t\t<?php foreach ( $items as $item ) : ?>\n\t\t\t\t\t\t<div class=\"logo-card-item\">\n\t\t\t\t\t\t\t<div class=\"logo-card\">\n\t\t\t\t\t\t\t\t<div class=\"card-front\">\n\t\t\t\t\t\t\t\t\t<div class=\"image-wrap\">\n\t\t\t\t\t\t\t\t\t\t<?php if ( $item['image']['url'] ) : ?>\n\t\t\t\t\t\t\t\t\t\t<a href=\"<?php echo $item['link']['url']; ?>\"<?php echo $item['link']['is_external'] ? ' target=\"_blank\"' : ''; echo $item['link']['nofollow'] ? ' rel=\"nofollow\"' : ''; ?>>\n\t\t\t\t\t\t\t\t\t\t\t<img class=\"role_icon\" src=\"<?php echo $item['image']['url']; ?>\">\n\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t\t<?php endif; ?>\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 class=\"card-reveal\">\n\t\t\t\t\t\t\t\t\t<div class=\"detail-wrap\">\n\t\t\t\t\t\t\t\t\t\t<h4><?php echo esc_html( $item['title'] ); ?></h4>\n\t\t\t\t\t\t\t\t\t\t<hr>\n\t\t\t\t\t\t\t\t\t\t<?php echo wpautop( $item['excerpt'] ); ?>\n\t\t\t\t\t\t\t\t\t\t<div class=\"action-wrap\">\n\t\t\t\t\t\t\t\t\t\t\t<a href=\"<?php echo $item['link']['url']; ?>\" class=\"arrow-link\"<?php echo $item['link']['is_external'] ? ' target=\"_blank\"' : ''; echo $item['link']['nofollow'] ? ' rel=\"nofollow\"' : ''; ?>>\n\t\t\t\t\t\t\t\t\t\t\t\t<?php echo $item['button']; ?>\n\t\t\t\t\t\t\t\t\t\t\t</a>\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</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<?php endforeach; ?>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t}", "function bjorn_header_center_show() {\n $bjorn_theme_options = bjorn_get_theme_options();\n\n // Show header banner\n if((isset($bjorn_theme_options['header_banner_editor'])) && ($bjorn_theme_options['header_banner_editor'] <> '') && (isset($bjorn_theme_options['header_banner_position'])) && ($bjorn_theme_options['header_banner_position'] == 'center')){\n bjorn_header_promo_show();\n }\n\n // Show header banner\n if((isset($bjorn_theme_options['header_banner2_editor'])) && ($bjorn_theme_options['header_banner2_editor'] <> '') && (isset($bjorn_theme_options['header_banner2_position'])) && ($bjorn_theme_options['header_banner2_position'] == 'center')){\n bjorn_header_promo2_show();\n }\n\n // Show header logo\n if((isset($bjorn_theme_options['header_logo_position'])) && ($bjorn_theme_options['header_logo_position'] == 'center')) {\n /* bjorn_logo_show(); #custom remove normal position of logo */\n }\n\n}", "function hys_header() {\n\t\tglobal $hys;\n\t\t\n\t\t//if someone trys to get into the tutorial page whose not logged in, boot\n\t\tif ((isset($hys['settings']['tutid']) && !empty($hys['settings']['tutid'])) && (get_the_ID() == $hys['settings']['tutid']) && !is_user_logged_in()) {\n\t\t\tdie('please login to view this page.');\n\t\t}\n\t\t\t\t\n\t\techo \"\n\t\t\n\t<!-- heyyou -->\\n\";\n\t\t\n\t\tif (@$hys['mobile'] == 1) {\n\t\t\t$viewport = (@$hys['settings']['viewport']) ? @$hys['settings']['viewport'] : 482;\n\t\t\techo \"\n\t<meta name='viewport' content='width={$viewport}' />\";\n\t\t}\n\t\t\n\t\tif (isset($hys['settings']['header_favicon']) && !empty($hys['settings']['header_favicon'])) {\n\t\t\techo \"\n\t\t\t\t<link rel='shortcut icon' href='\".get_bloginfo('stylesheet_directory').\"/{$hys['settings']['header_favicon']}' type='image/x-icon' /> \";\n\t\t}\n\t\t\n\t\techo \"\n\t<link rel='apple-touch-icon' href='\".get_bloginfo('stylesheet_directory').\"/images/apple-touch-icon.png' />\";\n\t\t\n\t\tif (isset($hys['settings']['meta_keywords']) && !empty($hys['settings']['meta_keywords']))\n\t\techo \"\n\t<meta name='keywords' content='{$hys['settings']['meta_keywords']}'>\";\n\t\t\n\t\tif (isset($hys['settings']['meta_description']) && !empty($hys['settings']['meta_description']))\n\t\techo \"\n\t<meta name='description' content='{$hys['settings']['meta_description']}'>\\n\";\n\t\t\n\t\techo \"\n\t<link rel='stylesheet' type='text/css' href='\".get_bloginfo('wpurl').'/wp-content/plugins/heyyou/res/css/hys_style.css'.\"' /> \n\t<style type='text/css'>\";\t\n\t\tif (isset($hys['settings']['tutid']) && !empty($hys['settings']['tutid']) && !is_user_logged_in()) {\n\t\t\techo \".page-item-{$hys['settings']['tutid']}, .menu-item-{$hys['settings']['tutid']} { display:none !important }\";\n\t\t}\t\t\t\n\t\tif (@$hys['hys_page_config']['hidetitle'] == 1 || (@$hys['hys_page_config']['hidetitlesingle'] == 1 && isset($_GET['hypg'])))\n\t\t\techo \"h1.entry-title, .entry-title { display:none !important; }\";\n\t\techo \"</style>\\n\";\n\t\t\n\t\t//include jQuery plugins.. from heyyou settings\n\t\t$jquery_plugins = array(\n\t\t\t'jquery' \t\t\t\t\t=> 'jquery.js',\n\t\t\t'jquery_opacityrollovers' \t=> 'jquery.opacityrollover.js',\n\t\t\t'jquery_cycle' \t\t\t\t=> 'jquery.cycle.js',\n\t\t\t'jquery_fx' \t\t\t\t=> 'jquery.effects.js',\n\t\t\t'jquery_color' \t\t\t\t=> 'jquery.color.js',\n\t\t);\n\t\t\n\t\tif (isset($hys['settings']['header_js']) && !empty($hys['settings']['header_js'])) {\n\t\techo \"\n\t<script type='text/javascript' src='\".get_bliginfo('stylesheet_directory').\"/{$hys['settings']['header_js']}'></script>\";\n\t\t}\n\t\techo \"\n\t<script type='text/javascript' src='{$hys['dir']}/res/js/js.js'></script>\";\n\n\t\tforeach ($jquery_plugins as $kjq => $vjq) {\n\t\t\tif (@$hys['settings'][$kjq] == 1) {\n\t\t\t\tif ($kjq == 'jquery') \n\t\t\t\t\tadd_action('wp_enqueue_scripts', 'hys_load_jquery');\n\t\t\t\telse\n\t\t\t\t\techo \"\t\n\t<script type='text/javascript' src='http://davidsword.me/_use/jquery/{$vjq}'></script>\";\n\t\t\t}\n\t\t}\n\t\tif (@$hys['settings']['jquery_lightbox'] == 1) {\n\t\t\techo \"\n\t<script type='text/javascript' src='http://davidsword.me/_use/jquery/jquery.lightbox.js'></script>\n\t<link rel='stylesheet' href='http://davidsword.me/_use/jquery/css/jquery.lightbox.css' />\\n\";\n\t\t\tif (@$hys['settings']['jquery_lightbox_assign'] == 1) {\n\t\t\techo \"\n\t<script type='text/javascript'>\n\t$(function() {\n\t $('.attachments a, .hys_attach ul li .attach_image a, ul.photo_gallery li a').lightBox({\n\t imageLoading: 'http://davidsword.me/_use/jquery/css/lightbox-ico-loading.gif',\n\t imageBtnPrev: 'http://davidsword.me/_use/jquery/css/lightbox-btn-prev.gif',\n\t imageBtnNext: 'http://davidsword.me/_use/jquery/css/lightbox-btn-next.gif',\n\t imageBtnClose:'http://davidsword.me/_use/jquery/css/lightbox-btn-close.gif',\n\t imageBlank: 'http://davidsword.me/_use/jquery/css/lightbox-blank.gif'\n\t });\n\t});\n\t</script>\";\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\techo \"\n\t<!--[if lt IE 9]><script src='http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js'></script><![endif]-->\";\n\t\t\n//LIGHTBOX...\t\t\nif (@$hys['settings']['lightbox'] == 1) {\n\t\techo \"\n\t<link rel='stylesheet' href='{$hys['dir']}/res/lb/css/lightbox.css' type='text/css' media='screen' />\n\t<script src='{$hys['dir']}/res/lb/js/prototype.js' type='text/javascript'></script>\n\t<script src='{$hys['dir']}/res/lb/js/scriptaculous.js?load=effects,builder' type='text/javascript'></script>\n\t<script src='{$hys['dir']}/res/lb/js/lightbox.js' type='text/javascript'></script>\";\n\t\t\t\n\tif (@$hys['settings']['lightboxcustom'] != 1) {\n\t\techo \"\n\t<script type='text/javascript'>\n\t\t<!--\n\t\tLightboxOptions = Object.extend({\n\t\t fileLoadingImage: '{$hys['dir']}/res/lb/images/loading.gif', \n\t\t fileBottomNavCloseImage: '{$hys['dir']}/res/lb/images/closelabel.gif',\n\t\t overlayOpacity: 0.8, animate: true, resizeSpeed: 8, borderSize: 10,\t\t\t\t\t\n\t\t\tlabelImage: 'Image', labelOf: 'of'\n\t\t}, window.LightboxOptions || {});\n\t\t//-->\n\t</script>\";\n\t}\n\t\n}\n\t\t\n\n//MOOTOOLS...\nif(@$hys['settings']['mootools'] == 1)\n\techo \"\n\t\t<script src='{$hys['dir']}/res/js/mootools-1.2.4.js' type='text/javascript'></script>\\n\";\n\n\t\t\n\t\t\n\t\techo \"\n\t\t\n\t<!-- /heyyou -->\\n\\n\";\n\t}", "function bootstrap_foundation_preprocess_page(&$vars) {\n global $user;\n $vars['path'] = base_path() . path_to_theme() .'/';\n \n $vars['path_parent'] = base_path() . drupal_get_path('theme', 'bootstrap_foundation') . '/';\n $vars['user'] = $user;\n\n // Prep the logo for being displayed\n $site_slogan = (!$vars['site_slogan']) ? '' : ' - '. $vars['site_slogan'];\n $logo_img ='';\n $title = $text = variable_get('site_name', '');\n if ($vars['logo']) {\n $logo_img = \"<img src='\". $vars['logo'] .\"' alt='\". $title .\"' border='0' />\";\n $text = ($vars['site_name']) ? $logo_img . $text : $logo_img;\n }\n $vars['logo_block'] = (!$vars['site_name'] && !$vars['logo']) ? '' : l($text, '', array('attributes' => array('title' => $title . $site_slogan), 'html' => !empty($logo_img)));\n // Even though the site_name is turned off, let's enable it again so it can be used later.\n $vars['site_name'] = variable_get('site_name', '');\n\n //Play nicely with the page_title module if it is there.\n if (!module_exists('page_title')) {\n // Fixup the $head_title and $title vars to display better.\n $title = drupal_get_title();\n $headers = drupal_set_header();\n\n // if this is a 403 and they aren't logged in, tell them they need to log in\n if (strpos($headers, 'HTTP/1.1 403 Forbidden') && !$user->uid) {\n $title = t('Please login to continue');\n }\n $vars['title'] = $title;\n\n if (!drupal_is_front_page()) {\n $vars['head_title'] = $title .' | '. $vars['site_name'];\n if ($vars['site_slogan'] != '') {\n $vars['head_title'] .= ' &ndash; '. $vars['site_slogan'];\n }\n }\n $vars['head_title'] = strip_tags($vars['head_title']);\n }\n\n\n // determine layout\n // 3 columns\n if ($vars['layout'] == 'both') {\n $vars['left_classes'] = 'left-sidebar col-md-3';\n $vars['right_classes'] = 'right-sidebar col-md-3';\n $vars['center_classes'] = 'main-content col-md-6';\n $vars['body_classes'] .= ' ';\n }\n\n // 2 columns\n elseif ($vars['layout'] != 'none') {\n // left column & center\n if ($vars['layout'] == 'left') {\n $vars['left_classes'] = 'left-sidebar col-md-3';\n $vars['center_classes'] = 'main-content col-md-9';\n }\n // right column & center\n elseif ($vars['layout'] == 'right') {\n $vars['right_classes'] = 'right-sidebar col-md-3';\n $vars['center_classes'] = 'main-content col-md-9';\n }\n $vars['body_classes'] .= ' ';\n }\n // 1 column\n else {\n $vars['center_classes'] = 'main-content col-md-12';\n $vars['body_classes'] .= ' ';\n }\n\n $vars['meta'] = '';\n // SEO optimization, add in the node's teaser, or if on the homepage, the mission statement\n // as a description of the page that appears in search engines\n if ($vars['is_front'] && $vars['mission'] != '') {\n $vars['meta'] .= '<meta name=\"description\" content=\"'. bootstrap_foundation_trim_text($vars['mission']) .'\" />'.\"\\n\";\n }\n elseif (isset($vars['node']->teaser) && $vars['node']->teaser != '') {\n $vars['meta'] .= '<meta name=\"description\" content=\"'. bootstrap_foundation_trim_text($vars['node']->teaser) .'\" />'.\"\\n\";\n }\n elseif (isset($vars['node']->body) && $vars['node']->body != '') {\n $vars['meta'] .= '<meta name=\"description\" content=\"'. bootstrap_foundation_trim_text($vars['node']->body) .'\" />'.\"\\n\";\n }\n // SEO optimization, if the node has tags, use these as keywords for the page\n if (isset($vars['node']->taxonomy)) {\n $keywords = array();\n foreach ($vars['node']->taxonomy as $term) {\n $keywords[] = $term->name;\n }\n $vars['meta'] .= '<meta name=\"keywords\" content=\"'. implode(',', $keywords) .'\" />'.\"\\n\";\n }\n\n // SEO optimization, avoid duplicate titles in search indexes for pager pages\n if (isset($_GET['page']) || isset($_GET['sort'])) {\n $vars['meta'] .= '<meta name=\"robots\" content=\"noindex,follow\" />'. \"\\n\";\n }\n\n // Make sure framework styles are placed above all others.\n $vars['css_alt'] = bootstrap_foundation_css_reorder($vars['css']);\n $vars['styles'] = drupal_get_css($vars['css_alt']);\n\n}", "public function nbbrand($content = null, $href = null)\n {\n\n // Declare return\n $return = null;\n\n // Set navbar brand hide\n $this->save('navbarbrandhide', $this->getSetting('hide'));\n\n // Set navbar brand right\n $this->save('navbarbrandright', $this->getSetting('right'));\n\n // Check for content\n if (!is_null($content))\n {\n\n // Set class\n $this->class('navbar-brand');\n\n // Check for href\n if (is_null($href))\n {\n\n // Create element\n $return = $this->span($content);\n\n // href is not null\n } else {\n\n // Create element\n $return = $this->a($content, $href);\n\n }\n\n }\n\n // Save element\n $this->save('navbarbrand', $return);\n\n return $return;\n\n }", "function brand_base_url()\n{\n\t$value=get_value('rebrand_base_url');\n\tif (($value===NULL) || ($value=='')) $value='http://ocportal.com';\n\treturn $value;\n}", "function design()\n{\n\techo '<meta name=\"viewport\" content=\"width=device-width, initial-scale=1, shrink-to-fit=no\">';\n\techo '<meta name=\"description\" content=\"\">';\n\techo '<meta name=\"author\" content=\"\">';\n\techo '<link href=\"https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900\" rel=\"stylesheet\">';\n\techo '<link rel=\"stylesheet\" type=\"text/css\" href=\"public/css/bootstrap.min.css\">';\n}", "private function setSeoMetaHome()\n {\n $metaTitle \t\t\t= \"Chuẩn 100% Game ANIME NHẬT BẢN\";\n $metaImages \t\t= 'https://thonglinhsuh5.com/style/pc/images/sharefb.jpg';\n $metaDescription \t= \"Cực Phẩm Game ANIME NHẬT BẢN Quá Xuất Sắc. Anh Em Lập Bang Chiến Cùng Nhé. Vào Game Nhận Miễn Phí THẦN THÚ + LỄ BAO 10 TRIỆU!\";\n\t\t\n \\Yii::$app->view->registerMetaTag([\n 'name' => 'description',\n 'content' => $metaDescription,\n ]);\n \\Yii::$app->view->registerMetaTag([\n 'name' => 'og:description',\n 'content' => $metaDescription,\n ]);\n\n $this->view->title = $metaTitle;\n \\Yii::$app->view->registerMetaTag([\n 'property' => 'og:title',\n 'content' => $metaTitle,\n ]);\n\n \\Yii::$app->view->registerMetaTag([\n 'property' => 'og:image',\n 'content' => $metaImages,\n ]);\n\n \\Yii::$app->view->registerMetaTag([\n 'property' => 'og:url',\n 'content' => 'https://thonglinhsuh5.com',\n ]);\n $this->view->registerLinkTag([\n 'rel' => 'canonical',\n 'href' => 'https://thonglinhsuh5.com',\n 'type' => 'text/html',\n ]);\n $this->view->registerMetaTag([\n 'name' => 'robots',\n 'content' => 'index,follow',\n ]);\n }", "function getBrandName()\n {\n return $this->brand_name;\n }", "function start_site_logo() {\n\t$output = '';\n\tif ( get_field( 'site_logo', 'option' ) ) :\n\t\t$output .= '<a href=\"' . esc_url( home_url( '/' ) ) . '\"><img src=\"' . get_field( 'site_logo', 'option' ) . '\"></a>';\n\telse :\n\t\t$output .= '<a href=\"' . esc_url( home_url( '/' ) ) . '\">' . get_bloginfo( 'name' ) . '</a>';\n\tendif;\n\n\treturn $output;\n}", "public function defaultMeta()\n {\n SEOMeta::setTitle('Home');\n SEOMeta::setDescription('YourCommerce the new website eccomerce for your solutions bussines');\n SEOMeta::setCanonical(request()->url());\n SEOMeta::addMeta('og:description', 'YourCommerce the new website eccomerce for your solutions bussines', 'property');\n SEOMeta::addMeta('fb:admins', 'hamdan.hanafi.98', 'property');\n SEOMeta::addMeta('name', 'YourCommerce the new website eccomerce for your solutions bussines', 'itemprop');\n SEOMeta::addMeta('description', 'YourCommerce the new website eccomerce for your solutions bussines', 'itemprop');\n SEOMeta::addMeta('Content-Type', 'Content-Type', 'http-equiv');\n SEOMeta::addMeta('robots', 'all,follow', 'name');\n SEOMeta::addMeta('googlebot', 'index,follow,snippet,archive', 'name');\n SEOMeta::addMeta('author', 'Hamdan Hanafi | hamdanhanafi90@gmail.com\"', 'name');\n SEOMeta::addMeta('csrf-token', csrf_token(), 'name');\n\n OpenGraph::setDescription('YourCommerce the new website eccomerce for your solutions bussines');\n OpenGraph::setTitle('Home');\n OpenGraph::setUrl(request()->url());\n OpenGraph::addProperty('type', 'Homepage');\n\n Twitter::setTitle('Home');\n Twitter::setSite('YourCommerce');\n Twitter::addValue('card', 'summary');\n Twitter::setDescription('YourCommerce the new website eccomerce for your solutions bussines');\n return $this;\n }", "public function index()\n {\n //\n\n $brands = Brands::all();\n return view('admin.pages.brand.index', compact('brands'));\n }", "function header_box() {\n\t\t?>\n\n\t\t<p><?php _e( 'Use for site title/logo:', 'genesis' ); ?>\n\t\t\t<select name=\"<?php echo $this->get_field_name( 'blog_title' ); ?>\">\n\t\t\t\t<option value=\"text\"<?php selected( $this->get_field_value( 'blog_title' ), 'text' ); ?>><?php _e( 'Dynamic text', 'genesis' ); ?></option>\n\t\t\t\t<option value=\"image\"<?php selected( $this->get_field_value( 'blog_title' ), 'image' ); ?>><?php _e( 'Image logo', 'genesis' ); ?></option>\n\t\t\t</select>\n\t\t</p>\n\n\t\t<?php\n\n\t}", "public function render_partial_site_title() {\r\n\r\n\t\t\t$site_title = astra_get_option( 'display-site-title' );\r\n\r\n\t\t\tif ( true == $site_title ) {\r\n\t\t\t\treturn get_bloginfo( 'name', 'display' );\r\n\t\t\t}\r\n\t\t}", "public function getBrand()\n {\n return $this->brand;\n }", "public function render_head()\n\t{\n\t\t$config = new Config();\n\n\t\tif ($this->_check_cookie)\n\t\t\t$this->_cookie_login();\n\n\t\tif(array_key_exists($this->_doctype, $this->_doctype_lookup)) {//if the doctype specifies a known item, use it\n\t\t\t$doctype = $this->_doctype_lookup[$this->_doctype];\n\t\t} else {\n\t\t\t$doctype = $this->_doctype; //otherwise, assume doctype manually set\n\t\t}\n\t\t$content = '';\n\n\t\t$content .= '<!DOCTYPE ' . $doctype . '>'; //print the doctype\n\n\t\t$content .= '<html><head>';\n\t\t$content .= '<title>' . $this->_title . '</title>';\n\n\t\t$content .= \"<style>body { padding-top: 60px; }</style>\";\n\n\t\t$content .= '<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">';\n\t\tforeach($this->_styles as $style) {\n\t\t\tif(array_key_exists($style, $this->_style_lookup)) $styleLoc = $this->_style_lookup[$style];\n\t\t\telse $styleLoc = $style;\n\t\t\t$content .= \"<link href='$styleLoc' rel='Stylesheet' type='text/css'>\";\n\t\t}\n\n\t\t$content .= '</head>';\n\n\t\t$content .= '<body>';\n\n\t\t$content .= \"<div class='navbar navbar-fixed-top'><div class='navbar-inner'><div class='container'>\";\n\t\t$content .= \"<a class='brand' href='index.php'>\" .\n\t\t $config->get('club_name', 'Circle K') . '</a>';\n\t\t$navbar_links = $config->get('navbar_links', array());\n\t\tif (count($navbar_links) > 0) {\n\t\t\t$content .= '<ul class=\"nav pull-left\">';\n\t\t\tforeach ($navbar_links as $text => $url) {\n\t\t\t\t$content .= '<li><a href=\"' . $url . '\">' . $text . '</a></li>';\n\t\t\t}\n\t\t\t$content .= '</ul>';\n\t\t}\n\n\t\t$content .= '<a class=\"btn btn-navbar\" data-toggle=\"collapse\" data-target=\".nav-collapse\"><span class=\"icon-bar\"></span><span class=\"icon-bar\"></span><span class=\"icon-bar\"></span></a>';\n\t\t$content .= '<div class=\"nav-collapse\">';\n\n\t\tif (!empty($_SESSION['user_id'])) {\n\t\t\t$content .= \"<ul class='nav pull-right'>\";\n\n\t\t\t$manage_items = '';\n\t\t\tif ($_SESSION['access_level'] >= $config->get('access_manage_committees', ACCESS_EBOARD)) {\n\t\t\t\t$manage_items .= '<li><a href=\"committee_manage.php\">Manage Committees</a></li>';\n\t\t\t}\n\n\t\t\tif ($_SESSION['access_level'] >= $config->get('access_manage_members', ACCESS_CHAIRPERSON)) {\n\t\t\t\t$manage_items .= '<li><a href=\"member_manage.php\">Manage Members</a></li>';\n\t\t\t}\n\n\t\t\tif ($_SESSION['access_level'] >= $config->get('access_view_member_hours', ACCESS_EBOARD))\n\t\t\t\t$manage_items .= '<li><a href=\"hours_export.php\">Export All Hours</a></li>';\n\n\t\t\tif ($manage_items) {\n\t\t\t\t$content .= '<li class=\"dropdown\"><a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\">' .\n\t\t\t\t 'Management <b class=\"caret\"></b></a>';\n\t\t\t\t$content .= '<ul class=\"dropdown-menu\">';\n\t\t\t\t$content .= $manage_items;\n\t\t\t\t$content .= '</ul></li>';\n\t\t\t}\n\n\t\t\t$content .= '<li class=\"dropdown\"><a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\">' .\n\t\t\t $_SESSION['first_name'] . ' ' . $_SESSION['last_name'] .\n\t\t\t ' <b class=\"caret\"></b>' . '</a>';\n\t\t\t$content .= '<ul class=\"dropdown-menu\">';\n\t\t\t$content .= '<li><a href=\"hours.php\">My Hours</a></li>';\n\t\t\t$content .= '<li><a href=\"member_change_password.php\">Change Password</a></li>';\n\t\t\t$content .= '<li><a href=\"logout.php\">Logout</a></li>';\n\t\t\t$content .= '</ul></li>'; //.dropdown .dropdown-menu\n\n\t\t\t$content .= '</ul>';\n\t\t} else {\n\t\t\t$this->include_script('login');\n\t\t\t$content .= '<div class=\"navbar-form pull-right\" id=\"login\">';\n\t\t\t$content .= '<input name=\"email\" id=\"login-email\" type=\"text\" placeholder=\"email\" class=\"span2\" /> ';\n\t\t\t$content .= '<input name=\"password\" id=\"login-pw\" type=\"password\" placeholder=\"password\" class=\"span2\" />';\n\t\t\t$content .= '<label class=\"checkbox inline\"><input name=\"persistent\" id=\"login-persistent\" type=\"checkbox\"> Remember me </label> ';\n\t\t\t$content .= '<button id=\"login-submit\" type=\"submit\" class=\"btn\">Log In</button> ';\n\t\t\t$content .= '<a href=\"member_register.php\"><button class=\"btn\">Register</button></a>';\n\t\t\t$content .= '</form>';\n\t\t}\n\t\t$content .= '</div>'; //.nav-collapse\n\t\t$content .= '</div></div></div>'; //.container .navbar-inner navbar\n\n\t\t$content .= \"<div class='container'>\";\n\n\t\techo $content;\n\t}", "function render_bimber_about_page() {\n\t$version = bimber_get_theme_version();\n\n\tget_template_part( 'includes/admin/about/version-' . $version );\n}", "function theme_enlightlite_marketingspot1() {\n global $CFG, $PAGE;\n\n $status = theme_enlightlite_get_setting('marketingSpot1_status');\n $description = theme_enlightlite_get_setting('mspot1desc');\n $title = theme_enlightlite_lang(theme_enlightlite_get_setting('mspot1title'));\n $media = theme_enlightlite_get_setting('mspot1media', 'format_html');\n if (!empty($media)) {\n $classmedia = 'video-visible';\n } else {\n $classmedia = \"\";\n }\n $content = '';\n if (!empty($title)) {\n $title = explode(' ', $title);\n $title1 = (array_key_exists(0, $title)) ? $title[0] : $title;\n $title2 = array_slice($title, 1);\n $title2 = implode(' ', $title2);\n } else {\n $title1 = $title2 = \"\";\n }\n if (isset($status) && $status == 1 ) {\n $description = theme_enlightlite_lang($description);\n if (!empty($description) || !empty($media)) {\n\n if (!empty($media) && !empty($description) ) {\n $hide = \"display:none\";\n $hide2 = \"\";\n } else if (!empty($media) && empty($description)) {\n $hide = \"\";\n $hide2 = \"display:none\";\n } else {\n $hide = \"\";\n $hide2 = \"display:none\";\n }\n $content .= html_writer::start_tag('div', array('class' => 'site-info' ));\n $content .= html_writer::start_tag('div', array('class' => 'container'));\n\n $content .= html_writer::start_tag('div', array('class' => 'info-content '. $classmedia ));\n $content .= html_writer::tag('h2', html_writer::tag('b', $title1) .\" \".$title2, array('style' => $hide));\n\n \n if (!empty($description)) {\n\n $content .= html_writer::start_tag('div', array('class' => 'info-video','style' => 'max-width:550px;float:left;'));\n $content .= $media;\n $content .= html_writer::end_tag('div');\n $content .= html_writer::start_tag('div', array('class' => 'info-block'));\n $content .= html_writer::tag('h2', html_writer::tag('b', $title1) .\" \".$title2, array('style' => $hide2) );\n $content .= html_writer::tag('p', $description);\n $content .= html_writer::end_tag('div');\n } else {\n\n $content .= html_writer::start_tag('div', array('class' => 'info-video','style' => 'max-width:700px; height: 350px;'));\n $content .= $media;\n $content .= html_writer::end_tag('div');\n }\n $content .= html_writer::end_tag('div');\n $content .= html_writer::end_tag('div');\n $content .= html_writer::end_tag('div');\n }\n\n }\n return $content;\n}", "function understrap_add_site_info() {\n $the_theme = wp_get_theme();\n \n $site_info = sprintf(\n '<a href=\"%1$s\">%2$s</a><span class=\"sep\"> | </span>%3$s(%4$s)',\n esc_url( __( 'http://wordpress.org/', 'understrap' ) ),\n sprintf(\n /* translators:*/\n esc_html__( 'Proudly powered by %s', 'understrap' ), 'WordPress'\n ),\n sprintf( // WPCS: XSS ok.\n /* translators:*/\n esc_html__( 'Theme: %1$s by %2$s.', 'understrap' ), $the_theme->get( 'Name' ), '<a href=\"' . esc_url( __( 'https://poonjo.com', 'understrap' ) ) . '\">Utsargo Roy</a>'\n ),\n sprintf( // WPCS: XSS ok.\n /* translators:*/\n esc_html__( 'Version: %1$s', 'understrap' ), $the_theme->get( 'Version' )\n )\n );\n\n echo apply_filters( 'understrap_site_info_content', $site_info ); // WPCS: XSS ok.\n }", "function oa_widgets_powered_by_render($subtype, $conf, $args, $context = NULL) {\n $block = new stdClass();\n $block->title = '';\n $block->content = l(t('Powered by'), 'http://openatrium.com',\n array('attributes' => array('class' => 'oa_powered_link')));\n return $block;\n}", "function block__after_xf_logo()\n {\n echo \"<a href=\\\"../index.html\\\">HOME</a> - <a href=\\\"../genera.html\\\">Genera and Families</a>\";\n }", "protected function siteName()\n {\n echo \"share maths\";\n }", "function tikkun_largo_header_after_largo_header() {\n\t?>\n\t<span class=\"tagline\" itemprop=\"description\">\n\t<?php\n\t\techo get_bloginfo( 'description');\n\t?>\n\t</span>\n\n\t<?php\n}" ]
[ "0.7185809", "0.6720469", "0.658935", "0.65762866", "0.65745586", "0.6542674", "0.6496781", "0.64410317", "0.6413965", "0.6411489", "0.64052063", "0.6321198", "0.63044196", "0.6251974", "0.6245962", "0.62387174", "0.62237775", "0.62039566", "0.6167225", "0.6156186", "0.61455303", "0.61067426", "0.6056355", "0.60562736", "0.6050816", "0.60484207", "0.60447115", "0.6044144", "0.6032688", "0.60317665", "0.60158896", "0.6007639", "0.6004936", "0.5998046", "0.59953105", "0.5984309", "0.59781843", "0.59753233", "0.59665173", "0.59565324", "0.5953058", "0.59496933", "0.5942141", "0.5916486", "0.59151536", "0.5905737", "0.5900544", "0.5897564", "0.5894705", "0.5893968", "0.5892118", "0.58863145", "0.5885795", "0.5870422", "0.5862298", "0.58595115", "0.58565956", "0.5850551", "0.58498865", "0.58479476", "0.5847324", "0.5843611", "0.5843437", "0.58419365", "0.58399355", "0.58358717", "0.58358717", "0.58333427", "0.5828668", "0.5823505", "0.5818202", "0.5816116", "0.58146495", "0.58123845", "0.5808926", "0.57985973", "0.5788193", "0.5787629", "0.57873565", "0.5785292", "0.578278", "0.57783836", "0.5777246", "0.57752", "0.5766527", "0.57658076", "0.5755464", "0.57509786", "0.57498884", "0.57471585", "0.57418877", "0.5735128", "0.5733875", "0.57231504", "0.5722638", "0.571453", "0.57130635", "0.57117236", "0.57110816", "0.57056195" ]
0.7871283
0
Display navigation to next/previous post when applicable.
Показывать навигацию к следующему/предыдущему посту при наличии.
function freshio_post_nav() { $prev_post = get_previous_post(); $next_post = get_next_post(); $args = array( 'next_text' => get_the_post_thumbnail($next_post->ID, array(110, 110)) . '<span class="nav-content"><span class="reader-text">' . esc_html__('NEXT', 'freshio') . ' </span>%title' . '</span> ', 'prev_text' => get_the_post_thumbnail($prev_post->ID, array(110, 110)) . '<span class="nav-content"><span class="reader-text">' . esc_html__('PREV', 'freshio') . ' </span>%title' . '</span> ', ); the_post_navigation($args); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _kalium_blog_single_post_prev_next_navigation() {\n\tif ( kalium_blog_get_option( 'single/prev_next' ) ) {\n\n\t\t// Args\n\t\t$args = [];\n\n\t\t$adjacent_post_args = apply_filters( 'kalium_blog_single_post_prev_next_navigation', [\n\t\t\t'return' => 'id',\n\t\t\t'loop' => true\n\t\t] );\n\n\t\t$prev_id = previous_post_link_plus( $adjacent_post_args );\n\t\t$next_id = next_post_link_plus( $adjacent_post_args );\n\n\t\t// Previous link\n\t\tif ( $prev_id ) {\n\t\t\t$prev = get_post( $prev_id );\n\t\t\t$args['prev'] = $prev;\n\t\t\t$args['prev_title'] = esc_html__( 'Older Post', 'kalium' );\n\t\t}\n\n\t\t// Next link\n\t\tif ( $next_id ) {\n\t\t\t$next = get_post( $next_id );\n\t\t\t$args['next'] = $next;\n\t\t\t$args['next_title'] = esc_html__( 'Newer Post', 'kalium' );\n\t\t}\n\n\t\t// Post navigation template\n\t\tkalium_get_template( 'global/post-navigation.php', $args );\n\t}\n}", "function post_navigation(){\n\t\t$next= get_next_post();\n\t\t$pre= get_previous_post();\n\t\t?>\n\t\t\n\t\t<div class=\"blog-related-post flw\">\n\t\t\t<?php if (!is_string($pre)) {?>\n\t\t\t\t<div class=\"prev-post\">\n\t\t\t\t\t<div class=\"control-post-img\">\n\t\t\t\t\t\t<?php echo get_the_post_thumbnail($pre->ID); ?>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"control-post-desc\">\n\t\t\t\t\t\t<h3 class=\"control-post-name\"><a href=\"<?php echo $pre->guid; ?>\" rel=\"prev\"><?php echo $pre->post_title ?></a></h3>\n\t\t\t\t\t\t<a href=\"<?php echo $pre->guid; ?>\" class=\"control-post-btn\">Previous</a>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t<?php } ?>\n\t\t\t\n\t\t\t<?php \n\t\t\t\tif (!is_string($next)) {?>\n\t\t\t\t\t<div class=\"next-post\">\n\n\t\t\t\t\t\t<div class=\"control-post-img\">\n\t\t\t\t\t\t\t<?php echo get_the_post_thumbnail($next->ID); ?>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"control-post-desc\">\n\t\t\t\t\t\t\t<h3 class=\"control-post-name\"><a href=\"<?php echo $next->guid; ?>\" rel=\"next\"><?php echo $next->post_title ?></a></h3>\n\t\t\t\t\t\t\t<a href=\"<?php echo $next->guid; ?>\" class=\"control-post-btn\">Next</a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\n\t\t\t<?php }\n\t\t\t\t \n\t\techo \"</div>\"; \n\t}", "function gridbox_post_navigation() {\r\n\r\n\t\t// Get theme options from database.\r\n\t\t$theme_options = gridbox_theme_options();\r\n\r\n\t\tif ( true === $theme_options['post_navigation'] || is_customize_preview() ) {\r\n\r\n\t\t\tthe_post_navigation( array(\r\n\t\t\t\t'prev_text' => '<span class=\"screen-reader-text\">' . esc_html_x( 'Previous Post:', 'post navigation', 'gridbox' ) . '</span>%title',\r\n\t\t\t\t'next_text' => '<span class=\"screen-reader-text\">' . esc_html_x( 'Next Post:', 'post navigation', 'gridbox' ) . '</span>%title',\r\n\t\t\t) );\r\n\r\n\t\t}\r\n\t}", "function wp_experts_post_nav() {\r\n global $post;\r\n // Don't print empty markup if there's nowhere to navigate.\r\n $previous = ( is_attachment() ) ? get_post( $post->post_parent ) : get_adjacent_post( false, '', true );\r\n $next = get_adjacent_post( false, '', false );\r\n\r\n if ( ! $next && ! $previous )\r\n return;\r\n ?>\r\n <?php\r\n $next_post = get_next_post();\r\n $previous_post = get_previous_post();\r\n if( !empty($next_post) )\r\n {\r\n ?>\r\n\t<nav class=\"navigation post-navigation\" role=\"navigation\">\r\n\t\t<div class=\"nav-links row clearfix\">\r\n\t\t\t<div class=\"nav-link-prev col-sm-6 col-xs-12 text-left\">\r\n\t\t\t\t<?php if ( is_a( $previous_post , 'WP_Post' ) && get_the_title( $previous_post->ID ) != '') { ?>\r\n\t\t\t\t\t<a href=\"<?php echo esc_url(get_permalink( $previous_post->ID )); ?>\">\r\n\t\t\t\t\t\t<img src=\"<?php $previousPost = get_previous_post(); $url_prev = wp_get_attachment_url( get_post_thumbnail_id($previousPost->ID));echo esc_url($url_prev);?>\" />\r\n\t\t\t\t\t\t<div class=\"nav-inner\">\r\n\t\t\t\t \t\t\t<span class=\"ft-droid-b-i\"><?php echo esc_html_e('Previous Post', \"wp-experts\") ?></span>\r\n\t\t\t\t\t \t\t<h3><?php echo get_the_title( $previous_post->ID ); ?></h3>\r\n\t\t\t\t\t \t</div>\r\n\t\t\t\t \t</a>\r\n\t\t\t\t<?php } ?>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"nav-link-next col-sm-6 col-xs-12 text-right\">\r\n\t\t\t\t<?php if ( is_a( $next_post , 'WP_Post' ) && get_the_title( $next_post->ID ) != '') { ?>\r\n\t\t\t\t\t<a href=\"<?php echo esc_url(get_permalink( $next_post->ID )); ?>\">\r\n\t\t\t\t\t\t<img src=\"<?php $nextPost = get_next_post(); $url_next = wp_get_attachment_url( get_post_thumbnail_id($nextPost->ID), 'wp_experts_images-sm'); echo esc_url($url_next);?>\" />\r\n\t\t\t\t\t\t<div class=\"nav-inner\">\r\n\t\t\t\t \t\t\t<span class=\"ft-droid-b-i\"><?php echo esc_html_e('Next Post', \"wp-experts\") ?></span>\r\n\t\t\t\t\t \t\t<h3><?php echo get_the_title( $next_post->ID ); ?></h3>\r\n\t\t\t\t\t \t</div>\r\n\t\t\t\t \t</a>\r\n\t\t\t\t<?php } ?>\r\n\t\t\t</div>\r\n\t\t</div><!-- .nav-links -->\r\n\t</nav><!-- .navigation -->\r\n\t<?php\r\n }\r\n}", "function tecscan_prev_next_post_nav_cpt() {\n\tif ( ! is_singular( 'portfolio' ) && ! is_singular( 'product' ) ) {\n\t\treturn;\n\t}\n\n\tgenesis_markup( [\n\t\t'html5' => '<div %s><div class=\"wrap\">',\n\t\t'xhtml' => '<div class=\"navigation\">',\n\t\t'context' => 'adjacent-entry-pagination',\n\t] );\n\n\techo '<div class=\"pagination-previous alignleft\">';\n\tprevious_post_link();\n\techo '</div>';\n\techo '<div class=\"pagination-next alignright\">';\n\tnext_post_link();\n\techo '</div>';\n\n\techo '</div></div>';\n}", "function future_loop_nav_singular_post() {\n\n\tob_start();\n\tprevious_post_link( '%link', __( '&larr; Previous Post', 'future' ) );\n\t$previous_post_link = ob_get_clean();\n\n\tob_start();\n\tnext_post_link( '%link', __( 'Next Post &rarr;', 'future' ) );\n\t$next_post_link = ob_get_clean();\n\n\t$previous_post_link = ( empty( $previous_post_link ) )? '&nbsp;' : $previous_post_link;\n\t$next_post_link = ( empty( $next_post_link ) )? '&nbsp;' : $next_post_link;\n\n?>\n<ul class=\"pager pagination-wrapper pagination-wrapper-single\">\n <li class=\"previous\">\n <?php echo $previous_post_link; ?>\n </li>\n <li class=\"next\">\n <?php echo $next_post_link; ?>\n </li>\n</ul>\n<?php\n}", "function nirmala_post_nav() {\n\t\t$previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true );\n\t\t$next = get_adjacent_post( false, '', false );\n\n\t\tif ( ! $next && ! $previous ) {\n\t\t\treturn;\n\t\t}\n\t\t?>\n\t\t<nav class=\"container-fluid navigation post-navigation mt-12px mb-3\">\n\t\t\t<h2 class=\"sr-only\"><?php esc_html_e( 'Post navigation', 'nirmala' ); ?></h2>\n\t\t\t<div class=\"row nav-links\">\n\t\t\t\t<?php\n\t\t\t\tif ( get_previous_post_link() ) {\n\t\t\t\t\tprevious_post_link( '<div class=\"col px-0 py-12px border-top border-bottom nav-previous\"><i class=\"fa fa-angle-double-left\" aria-hidden=\"true\"></i> %link</div>', _x( '%title', 'Previous post link', 'nirmala' ) );\n\t\t\t\t}\n\t\t\t\tif ( get_next_post_link() ) {\n\t\t\t\t\tnext_post_link( '<div class=\"col px-0 py-12px border-bottom border-top nav-next text-right\">%link <i class=\"fa fa-angle-double-right\" aria-hidden=\"true\"></i></div>', _x( '%title', 'Next post link', 'nirmala' ) );\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t</div><!-- .nav-links -->\n\t\t</nav><!-- .navigation -->\n\t\t<?php\n\t}", "function FG_post_pagination($args = array()) {\n $prev_link = (get_previous_post_link()) ? get_previous_post_link('%link', $args['prev_text']) : '<a class=\"prev home-link\" href=\"'.get_permalink(get_option('page_for_posts')).'\">BACK TO STORIES AND PROGRESS</a>';\n $next_link = (get_next_post_link()) ? get_next_post_link('%link', $args['next_text']) : '<a class=\"next home-link\" href=\"'.get_permalink(get_option('page_for_posts')).'\">BACK TO STORIES AND PROGRESS</a>';\n\n // Only add markup if there's somewhere to navigate to.\n if ( $prev_link || $next_link ) {\n echo _navigation_markup($prev_link . $next_link, ' ', ' ');\n }\n}", "function tnews_post_nav() {\n\t// Don't print empty markup if there's nowhere to navigate.\n\t$previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true );\n\t$next = get_adjacent_post( false, '', false );\n\n\tif ( ! $next && ! $previous ) {\n\t\treturn;\n\t}\n\t?>\n\t<nav class=\"pagination card text-center\" aria-label=\"Pagination\">\n\t\t<h3 class=\"card-divider\"><?php esc_html_e( 'Post navigation', 'tnews' ); ?></h3>\n\t\t<div class=\"nav-links\">\n\t\t\t<?php\n\t\t\t\tprevious_post_link( '<div class=\"pagination-previous prev\">%link</div>', _x( '%title', 'Previous post link', 'tnews' ) );\n\t\t\t\tnext_post_link( '<div class=\"pagination-next next \">%link</div>', _x( '%title', 'Next post link', 'tnews' ) );\n\t\t\t?>\n\t\t</div><!-- .nav-links -->\n\t</nav><!-- .navigation -->\n\t<?php\n}", "function msdlab_prev_next_post_nav() {\n if ( ! is_singular() || is_page() )\n return;\n\t\n $in_same_term = false;\n $excluded_terms = false; \n $previous_post_link = get_previous_post_link('&laquo; %link', '%title', $in_same_term, $excluded_terms, 'category');\n $next_post_link = get_next_post_link('%link &raquo;', '%title', $in_same_term, $excluded_terms, 'category');\n if(is_cpt('project')){\n $taxonomy = 'project_type';\n $prev_post = get_adjacent_post( $in_same_term, $excluded_terms, true, $taxonomy );\n $next_post = get_adjacent_post( $in_same_term, $excluded_terms, false, $taxonomy );\n $size = 'nav-post-thumb';\n $previous_post_link = $prev_post?'<a href=\"'.get_post_permalink($prev_post->ID).'\" style=\"background-image:url('.msdlab_get_thumbnail_url($prev_post->ID, $size).'\")><span class=\"nav-title\"><i class=\"fa fa-angle-double-left\"></i> '.$prev_post->post_title.'</span></a>':'<div href=\"'.get_post_permalink($post->ID).'\" style=\"opacity: 0.5;background-image:url('.msdlab_get_thumbnail_url($post->ID, $size).'\")><span class=\"nav-title\">You are at the beginning of the portfolio.</span></div>';\n $next_post_link = $next_post?'<a href=\"'.get_post_permalink($next_post->ID).'\" style=\"background-image:url('.msdlab_get_thumbnail_url($next_post->ID, $size).'\")><span class=\"nav-title\">'.$next_post->post_title.' <i class=\"fa fa-angle-double-right\"></i></span></a>':'<div href=\"'.get_post_permalink($post->ID).'\" style=\"opacity: 0.5;background-image:url('.msdlab_get_thumbnail_url($post->ID, $size).'\")><span class=\"nav-title\">You are at the end of the portfolio.</span></div>';\n \n }\n\n genesis_markup( array(\n 'html5' => '<div %s>',\n 'xhtml' => '<div class=\"navigation\">',\n 'context' => 'adjacent-entry-pagination',\n ) );\n \n \n\n echo '<div class=\"pagination-previous pull-left col-xs-6\">';\n echo $previous_post_link;\n echo '</div>';\n\n echo '<div class=\"pagination-next pull-right col-xs-6\">';\n echo $next_post_link;\n echo '</div>';\n\n echo '</div>';\n\n}", "function medicplus_post_nav() {\n\t\tglobal $post;\n\t\t// Don't print empty markup if there's nowhere to navigate.\n\t\t$previous = ( is_attachment() ) ? get_post( $post->post_parent ) : get_adjacent_post( false, '', true );\n\t\t$next = get_adjacent_post( false, '', false );\n\t\tif ( ! $next && ! $previous )\n\t\t\treturn;\n\t\t?>\n\t\t<nav class=\"post-navigation row\" >\n\t\t\t<div class=\"col-md-12\">\n\t\t\t\t<div class=\"nav-links\">\n\t\t\t\t\t<div class=\"pull-left prev-post\">\n\t\t\t\t\t<?php previous_post_link( '%link', _x( '<span class=\"meta-nav\">&larr;</span> %title', 'Previous post link', 'medicplus' ) ); ?>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"pull-right next-post\">\n\t\t\t\t\t<?php next_post_link( '%link', _x( '%title <span class=\"meta-nav\">&rarr;</span>', 'Next post link', 'medicplus' ) ); ?>\n\t\t\t\t\t</div>\n\t\t\t\t</div><!-- .nav-links -->\n\t\t\t</div>\n\t\t</nav><!-- .navigation -->\n\t\t<?php\n\t}", "function bubulla_post_nav() {\n\t\t$previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '',\n\t\ttrue );\n\t\t$next = get_adjacent_post( false, '', false );\n\n\t\tif ( ! $next && ! $previous ) {\n\t\t\treturn;\n\t\t}\n\n\t\t?>\n\t\t<nav class=\"navigation post-navigation clearfix\" role=\"navigation\">\n\t\t\t<h3 class=\"screen-reader-text\"><?php echo esc_html__( 'Post navigation', 'bubulla' ); ?></h3>\n\n\t\t\t<div class=\"nav-links\">\n\t\t\t\t<?php\n\t\t\t\t\tif ( !empty($previous) ) {\n\n\t\t\t\t\t\tprevious_post_link( '%link', esc_html( '%title' ) );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( !empty($next) ) {\n\n\t\t\t\t\t\tnext_post_link( '%link', esc_html( '%title' ) );\n\t\t\t\t\t}\n\t\t\t\t?>\n\t\t\t</div>\n\t\t</nav>\n\t\t<?php\n\n\t}", "function bsg_genesis_prev_next_posts_nav() {\n\t$prev_link = get_previous_posts_link( apply_filters( 'genesis_prev_link_text', '<span aria-hidden=\"true\">&larr;</span> ' . __( 'Previous Page', 'genesis' ) ) );\n\t$next_link = get_next_posts_link( apply_filters( 'genesis_next_link_text', __( 'Next Page', 'genesis' ) . ' <span aria-hidden=\"true\">&rarr;</span>' ) );\n\n\t$prev = $prev_link ? '<li class=\"previous\">' . $prev_link . '</li>' : '';\n\t$next = $next_link ? '<li class=\"next\">' . $next_link . '</li>' : '';\n\n\t$nav .= genesis_markup( array(\n\t\t'html5' => '<div class=\"clearfix\"></div><nav %s><ul class=\"pager\">',\n\t\t'xhtml' => '<div class=\"navigation\">',\n\t\t'context' => 'archive-pagination',\n\t\t'echo' => false,\n\t) );\n\n\t$nav .= $prev;\n\t$nav .= $next;\n\t$nav .= '</ul></nav>';\n\n\tif ( $prev || $next )\n\t\techo $nav;\n\n}", "function future_loop_nav_next_prev() {\n?>\n<ul class=\"pager pagination-wrapper pagination-wrapper-np\">\n <li class=\"previous\">\n <?php echo get_previous_posts_link( __( '&larr; Newer', 'future' ) ); ?>\n </li>\n <li class=\"next\">\n <?php echo get_next_posts_link( __( 'Older &rarr;', 'future' ) ); ?>\n </li>\n</ul>\n<?php\n}", "function cms_post_nav() {\n global $post;\n\n // Don't print empty markup if there's nowhere to navigate.\n $previous = ( is_attachment() ) ? get_post( $post->post_parent ) : get_adjacent_post( false, '', true );\n $next = get_adjacent_post( false, '', false );\n\n if ( ! $next && ! $previous )\n return;\n ?>\n\t<nav class=\"navigation post-navigation\" role=\"navigation\">\n\t\t<h1 class=\"screen-reader-text\"><?php _e( 'Post navigation', THEMENAME ); ?></h1>\n\t\t<div class=\"nav-links\">\n\n\t\t\t<?php previous_post_link( '%link', _x( '<span class=\"meta-nav\">&larr;</span>', 'Previous post link', THEMENAME ) ); ?>\n\t\t\t<?php next_post_link( '%link', _x( '<span class=\"meta-nav\">&rarr;</span>', 'Next post link', THEMENAME ) ); ?>\n\n\t\t</div><!-- .nav-links -->\n\t</nav><!-- .navigation -->\n\t<?php\n}", "function mbdmaster_post_nav() {\n\t/* Within posts, navigation to previous/next post */\n\t\n\tglobal $post;\n\n\t$previous = ( is_attachment() ) ? get_post( $post->post_parent ) : get_adjacent_post( false, '', true );\n\t$next = get_adjacent_post( false, '', false );\n\n\tif ( ! $next && ! $previous )\n\t\treturn;\n\t?>\n\t<nav class=\"navigation\" role=\"navigation\">\n\t\t<h2 class=\"visuallyhidden\"><?php _e( 'Further Reading', 'mbdmaster' ); ?></h2>\n\t\t<div class=\"nav-links clearfix\">\n\n\t\t\t<div class=\"nav-previous\">\n\t\t\t\t<?php previous_post_link( '<header class=\"meta\"><i aria-hidden=\"true\" class=\"icon-arrow-left\"></i><label>Previous post</label></header>%link', _x( '%title', 'Previous post link', 'mbdmaster' ) ); ?>\n\t\t\t</div>\n\t\t\t\n\t\t\t<div class=\"nav-next\">\n\t\t\t\t<?php next_post_link( '<header class=\"meta\"><label>Next post</label><i aria-hidden=\"true\" class=\"icon-arrow-right\"></i></header>%link ', _x( '%title', 'Next post link', 'mbdmaster' ) ); ?>\n\t\t\t</div>\n\n\t\t</div><!-- .nav-links -->\n\t</nav><!-- .navigation -->\n\t<?php\n}", "function codeless_single_portfolio_navigation(){\n if( ! is_singular( 'portfolio' ) )\n return;\n\n if( codeless_get_mod('single_portfolio_navigation') == '1' && ( is_object( get_previous_post() ) || is_object( get_next_post() ) ) ): ?>\n <div class=\"portfolio_navigation\"> \n\n <?php if( is_object( get_previous_post() ) ): ?>\n\n <a class=\"cl-icon-arrow-left portfolio_single_left\" href=\"<?php echo get_permalink(get_previous_post()->ID); ?>\">\n \n <span><?php esc_attr_e('Prev', 'folie' ) ?></span>\n\n </a> \n \n\n <?php endif; ?> \n\n <?php if( is_object( get_next_post() ) ): ?>\n\n <a class=\"cl-icon-arrow-right portfolio_single_right\" href=\"<?php echo get_permalink(get_next_post()->ID); ?>\">\n \n <span><?php esc_attr_e('Next', 'folie' ) ?></span>\n\n </a> \n \n\n <?php endif; ?> \n\n </div><!-- .portfolio_navigation --> \n <?php endif;\n}", "function trt_the_posts_navigation() {\n\t\t$args = array(\n\t\t\t'prev_text' => esc_html__( '&larr; Older Posts', '10rt' ),\n\t\t\t'next_text' => esc_html__( 'Newer Posts &rarr;', '10rt' ),\n\t\t\t'screen_reader_text' => esc_html__( 'Posts Navigation', '10rt' ),\n\t\t);\n\t\tthe_posts_navigation( $args );\n\t}", "function ramza_print_post_nav() {\n // Don't print empty markup if there's nowhere to navigate.\n $prev = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true );\n $next = get_adjacent_post( false, '', false );\n\n if ( ! $next && ! $prev ) {\n return;\n }\n ?>\n <nav class=\"c-post-nav o-box o-box--content\" role=\"navigation\">\n <h2 class=\"u-screen-reader-text\"><?php esc_html_e( 'Post navigation', 'ramza' ); ?></h2>\n <div class=\"c-post-nav__links\">\n <?php if ( $prev ) : ?>\n <div class=\"c-post-nav__link c-post-nav__link--prev\">\n <span><?php esc_html_e( 'Previous Post', 'ramza' ); ?></span>\n <h5><?php previous_post_link( '%link', '%title' ); ?></h5>\n </div>\n <?php endif; ?>\n <?php if ( $next ) : ?>\n <div class=\"c-post-nav__link c-post-nav__link--next\">\n <span><?php esc_html_e( 'Next Post', 'ramza' ); ?></span>\n <h5><?php next_post_link( '%link', '%title' ); ?></h5>\n </div>\n <?php endif; ?>\n </div><!-- .c-nav-post__links -->\n </nav><!-- .c-nav-post -->\n <?php\n}", "public static function pager() {\n\n\t\t\tif ( get_theme_mod( 'post_pager', 1 ) == 1 ) { ?>\n\n\t\t\t\t<nav class=\"entry-pager\">\n\t\t\t\t\t<ul class=\"pager\">\n\t\t\t\t\t\t<?php previous_post_link( '<li class=\"previous\">%link</li>', '&larr; %title' ); ?>\n\t\t\t\t\t\t<?php next_post_link( '<li class=\"next\">%link</li>', '%title &rarr;' ); ?>\n\t\t\t\t\t</ul>\n\t\t\t\t</nav>\n\n\t\t\t<?php\n\t\t\t}\n\n\t\t}", "function ramza_print_post_navigation() {\n // Don't print empty markup if there's nowhere to navigate.\n $prev = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true );\n $next = get_adjacent_post( false, '', false );\n\n if ( ! $next && ! $prev ) {\n return;\n }\n ?>\n <nav class=\"c-nav-post o-box o-box--content\" role=\"navigation\">\n <h2 class=\"screen-reader-text\"><?php esc_html_e( 'Post navigation', 'ramza' ); ?></h2>\n <div class=\"c-nav-post__links\">\n <?php if ( $prev ) : ?>\n <div class=\"c-nav-post__prev\">\n <span><?php esc_html_e( 'Previous Post', 'ramza' ) ?></span>\n <h5 class=\"c-nav-post__prev-title\"><?php previous_post_link( '%link', '%title' ); ?></h5>\n </div>\n <?php endif; ?>\n <?php if ( $next ) : ?>\n <div class=\"c-nav-post__next\">\n <span><?php esc_html_e( 'Next Post', 'ramza' ) ?></span>\n <h5 class=\"c-nav-post__next-title\"><?php next_post_link( '%link', '%title' ); ?></h5>\n </div>\n <?php endif; ?>\n </div><!-- .c-nav-post__links -->\n </nav><!-- .c-nav-post -->\n <?php\n}", "function freshio_paging_nav()\n\t{\n\t\tglobal $wp_query;\n\n\t\t$args = array(\n\t\t\t'type' => 'list',\n\t\t\t'next_text' => _x('Next', 'Next post', 'freshio'),\n\t\t\t'prev_text' => _x('Previous', 'Previous post', 'freshio'),\n\t\t);\n\n\t\tthe_posts_pagination($args);\n\t}", "function next_prev() { ?>\n <div class=\"col-6\">\n <div class=\"clearfix\">\n <?php previous_post_link( ); ?>\n </div>\n <div class=\"\">\n <?php $prevPost = get_previous_post();\n $prevThumbnail = get_the_post_thumbnail( $prevPost->ID , array('thumbnail') , array('class'=>'img-thumbnail') );\n previous_post_link( '%link', $prevThumbnail ); ?>\n </div>\n </div>\n <div class=\"col-6 text-left\">\n <div class=\"\">\n <?php $prevPost = get_next_post(); ?>\n </div>\n <div class=\"\">\n <?php next_post_link( ); ?>\n </div>\n <?php $prevThumbnail = get_the_post_thumbnail( $prevPost->ID , array('thumbnail') , array('class'=>'img-thumbnail') );\n next_post_link( '%link', $prevThumbnail ); ?>\n </div>\n<?php }", "function bsg_genesis_posts_nav() {\n if ( 'numeric' === genesis_get_option( 'posts_nav' ) ) {\n\t\tbsg_genesis_numeric_posts_nav();\n } else {\n bsg_genesis_prev_next_posts_nav();\n }\n}", "function testwordpress_post_nav() {\r\n // Don't print empty markup if there's nowhere to navigate.\r\n $previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true );\r\n $next = get_adjacent_post( false, '', false );\r\n\r\n if ( ! $next && ! $previous ) {\r\n return;\r\n }\r\n ?>\r\n <nav class=\"navigation post-navigation\" role=\"navigation\">\r\n <h1 class=\"screen-reader-text\"><?php _e( 'Post navigation', 'testwordpress' ); ?></h1>\r\n <div class=\"nav-links\">\r\n <?php\r\n previous_post_link( '<div class=\"nav-previous\">%link</div>', _x( '<span class=\"meta-nav\">&larr;</span> %title', 'Previous post link', 'testwordpress' ) );\r\n next_post_link( '<div class=\"nav-next\">%link</div>', _x( '%title <span class=\"meta-nav\">&rarr;</span>', 'Next post link', 'testwordpress' ) );\r\n ?>\r\n </div><!-- .nav-links -->\r\n </nav><!-- .navigation -->\r\n <?php\r\n}", "function print_post_navigation() {\r\n $prev_link_template = '<span class=\"meta-nav\" aria-hidden=\"true\">' . \r\n i18l('back.title') . '</span> ' .\r\n\t\t'<span class=\"screen-reader-text\" title=\"%title\">' . \r\n i18l('back.post') . '</span> ' .\r\n\t\t'<span class=\"post-title\" title=\"' . i18l('back.post') . '\">%title</span>';\r\n $next_link_template = '<span class=\"meta-nav\" aria-hidden=\"true\">' . \r\n i18l('next.title') . '</span> ' .\r\n\t\t'<span class=\"screen-reader-text\" title=\"%title\">' . \r\n i18l('next.post') . '</span> ' .\r\n\t\t'<span class=\"post-title\" title=\"' . i18l('next.post') . '\">%title</span>';\r\n \r\n $nav = '<div class=\"row\"><div class=\"cell\"><h2>' . \r\n i18l('post.navigation.title') . '</h2></div></div>';\r\n \r\n $nav .= '<div class=\"row\">';\r\n $nav .= get_previous_post_link(\r\n\t\t'<div class=\"cell-50\"><div class=\"nav-previous\">%link</div></div>',\r\n\t\t$prev_link_template, false, '', 'category'\r\n\t);\r\n $nav .= get_next_post_link(\r\n\t\t'<div class=\"cell-50\"><div class=\"nav-next\">%link</div>',\r\n\t\t$next_link_template, false, '', 'category');\r\n $nav .= '</div>';\r\n echo '<div id=\"item-nav\" class=\"container\"><br><hr><br>' . $nav . '</div>';\r\n}", "function wpo_post_nav() {\n // Don't print empty markup if there's nowhere to navigate.\n $previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true );\n $next = get_adjacent_post( false, '', false );\n\n if ( ! $next && ! $previous ) {\n return;\n }\n\n ?>\n <nav class=\"navigation post-navigation\" role=\"navigation\">\n <h1 class=\"screen-reader-text\"><?php _e( 'Post navigation', 'basic' ); ?></h1>\n <div class=\"nav-links\">\n <?php\n if ( is_attachment() ) :\n previous_post_link( '%link', __( '<span class=\"meta-nav\">Published In</span>%title', 'basic' ) );\n else :\n previous_post_link( '%link', __( '<span class=\"meta-nav\">Previous Post</span>%title', 'basic' ) );\n next_post_link( '%link', __( '<span class=\"meta-nav\">Next Post</span>%title', 'basic' ) );\n endif;\n ?>\n </div><!-- .nav-links -->\n </nav><!-- .navigation -->\n <?php\n}", "function carr_post_nav() {\n\t// Don't print empty markup if there's nowhere to navigate.\n\t$previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true );\n\t$next = get_adjacent_post( false, '', false );\n\n\tif ( ! $next && ! $previous ) {\n\t\treturn;\n\t}\n\n\t$previous_date = '';\n\t$next_date = '';\n\n\tif ( $previous ) {\n\t\t$previous_date = get_the_date( 'M. j, Y', $previous->ID );\n\t}\n\n\tif ( $next ) {\n\t\t$next_date = get_the_date('M. j, Y', $next->ID);\n\t}\n\n\t?>\n\n\t<nav class=\"navigation post-navigation\" role=\"navigation\">\n\t\t<h1 class=\"screen-reader-text\"><?php _e( 'Post navigation', 'cmc' ); ?></h1>\n\t\t<div class=\"nav-links\">\n\t\t\t<?php if ($previous) : ?>\n\t\t\t<div class=\"nav-previous border-block top\">\n\t\t\t\t<p class=\"block-label\"><span class=\"icon-arrow-left small\"></span>&nbsp;&nbsp;Previous</p>\n\t\t\t\t<p class=\"date ot-caps\"><?php echo $previous_date; ?></p>\n\t\t\t\t<h3 class=\"last-item title font-text\"><?php previous_post_link( '%link', _x( '%title', 'Previous post link', 'cmc' ) ); ?></h3>\n\t\t\t</div>\n\t\t\t<?php endif; if ($next) : ?>\n\t\t\t<div class=\"nav-next border-block top\">\n\t\t\t\t<p class=\"block-label\">Next&nbsp;&nbsp;<span class=\"icon-arrow-right small\"></span></p>\n\t\t\t\t<p class=\"date ot-caps\"><?php echo $next_date; ?></p>\n\t\t\t\t<h3 class=\"last-item title font-text\"><?php next_post_link('%link', _x( '%title', 'Next post link', 'cmc' ) ); ?></h3>\n\t\t\t</div>\n\t\t\t<?php endif; ?>\n\t\t</div><!-- .nav-links -->\n\t</nav><!-- .navigation -->\n\t\n\t<?php\n}", "function malinky_post_pagination()\n\t{\n\t\t//Return if no navigation.\n\t\t$previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( true, '', true );\n\t\t$next = get_adjacent_post( true, '', false );\n\n\t\tif ( ! $next && ! $previous ) return;\n\n\t\tif ( $previous ) {\n\t\t\t$previous_title = get_field( 'title', $previous->ID ) != '' ? get_field( 'title', $previous->ID ) : '%title';\n\t\t} else {\n\t\t\t$previous_title = '%title';\n\t\t}\n\n\t\tif ( $next ) {\n\t\t\t$next_title = get_field( 'title', $next->ID ) != '' ? get_field( 'title', $next->ID ) : '%title';\n\t\t} else {\n\t\t\t$next_title = '%title';\n\t\t}\n\t\t\n\t\t?>\n\n\t\t<nav class=\"col col--gutterless post-pagination\" role=\"navigation\">\n\n\t\t\t<div class=\"col-item col-item-half post-pagination__link post-pagination__link--older\">\n\t\t\t\t<?php previous_post_link( '%link', 'Previous Post', true ); ?>\n\t\t\t</div><!--\n\n\t\t\t--><div class=\"col-item col-item-half col-item--align-right post-pagination__link post-pagination__link--newer\">\n\t\t\t\t<?php next_post_link( '%link', 'Next Post', true ); ?>\n\t\t\t</div>\n\n\t\t</nav><!-- .post-pagination -->\n\t\n\t<?php }", "function gvc_post_nav($post_id){\n $post_type = (get_post_type($post_id)) ? get_post_type($post_id) : 'post';\n $prev_title = (('portfolio' == $post_type) ? __('Previous project', TEMP_NAME) : (('faq' == $post_type) ? __('Next faq', TEMP_NAME) : __('Previous post', TEMP_NAME)));\n $next_title = (('portfolio' == $post_type) ? __('Next project', TEMP_NAME) : (('faq' == $post_type) ? __('Previous faq', TEMP_NAME) : __('Next post', TEMP_NAME)));\n\n ?>\n\n <?php if (is_single()): ?>\n <nav id=\"gvc-nav-single\" class=\"gvc-clearfix\"> \n <div class=\"nav-previous\" title=\"<?php echo $prev_title; ?>\"><?php previous_post_link( '%link', ''); ?></div> \n <div class=\"nav-next\" title=\"<?php echo $next_title; ?>\"><?php next_post_link( '%link', ''); ?></div> \n </nav>\n <?php endif ?>\n\n <?php }", "function custom_nav(){\n\t$navigation = '';\n\t$previous = get_previous_post_link( '<div class=\"nav-previous\">%link</div>', '<i class=\"fa fa-angle-left fa-lg\"></i> previous', true );\n\t$next = get_next_post_link( '<div class=\"nav-next\">%link</div>', 'next <i class=\"fa fa-angle-right fa-lg\"></i>', true );\n\n\t// Only add markup if there's somewhere to navigate to.\n\tif ( $previous || $next ) {\n\t\t$navigation = _navigation_markup( $previous . $next, 'custom-post-navigation' );\n\t}\n\n\techo $navigation;\n}", "function future_loop_nav_singular() {\n\tglobal $post;\n?>\n<div class=\"entry-post-parent-link-wrapper\">\n <a href=\"<?php echo get_permalink( $post->post_parent ); ?>\" class=\"btn btn-primary\"><?php _e( '&larr; Return to', 'future' ); ?> <?php echo get_the_title( $post->post_parent ); ?></a>\n</div>\n<?php\n}", "function muiteerdocs_doc_nav() {\n global $post, $wpdb;\n\n $next_query = \"SELECT ID FROM $wpdb->posts\n WHERE post_parent = $post->post_parent and post_type = 'docs' and post_status = 'publish' and menu_order > $post->menu_order\n ORDER BY menu_order ASC\n LIMIT 0, 1\";\n\n $prev_query = \"SELECT ID FROM $wpdb->posts\n WHERE post_parent = $post->post_parent and post_type = 'docs' and post_status = 'publish' and menu_order < $post->menu_order\n ORDER BY menu_order DESC\n LIMIT 0, 1\";\n\n $next_post_id = (int) $wpdb->get_var($next_query);\n $prev_post_id = (int) $wpdb->get_var($prev_query);\n\n if ($next_post_id || $prev_post_id) {\n\n echo '<nav class=\"muiteerdocs-doc-nav\">';\n echo '<h3 class=\"assistive-text screen-reader-text\">'. __('Documentation Navigation', 'muiteer') . '</h3>';\n\n if ($prev_post_id) {\n echo '<span class=\"nav-prev\"><a href=\"' . get_permalink($prev_post_id) . '\">' . apply_filters('muiteerdocs_translate_text', get_post($prev_post_id)->post_title) . '</a></span>';\n }\n\n if ($next_post_id) {\n echo '<span class=\"nav-next\"><a href=\"' . get_permalink($next_post_id) . '\">' . apply_filters('muiteerdocs_translate_text', get_post($next_post_id)->post_title) . '</a></span>';\n }\n\n echo '</nav>';\n }\n}", "public function slcr_blog_Pagination() { \n\t\t$prev_post = get_previous_post();\n\t\t$next_post = get_next_post(); \n\t\tif (!empty( $prev_post ) || !empty( $next_post )) { ?>\n\t\t\t<div class=\"blog-pagination\">\n\t\t\t\t<?php\n\t\t\t\tif (!empty( $prev_post )) { ?>\n\t\t\t\t\t<!-- Previous Post -->\n\t\t\t\t\t<a href=\"<?php echo get_permalink( $prev_post->ID ); ?>\" class=\"page-item prev\">\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" viewBox=\"0 0 31.49 31.49\" style=\"enable-background:new 0 0 31.49 31.49;\" xml:space=\"preserve\">\n\t\t\t\t\t\t\t\t<path d=\"M21.205,5.007c-0.429-0.444-1.143-0.444-1.587,0c-0.429,0.429-0.429,1.143,0,1.571l8.047,8.047H1.111 C0.492,14.626,0,15.118,0,15.737c0,0.619,0.492,1.127,1.111,1.127h26.554l-8.047,8.032c-0.429,0.444-0.429,1.159,0,1.587 c0.444,0.444,1.159,0.444,1.587,0l9.952-9.952c0.444-0.429,0.444-1.143,0-1.571L21.205,5.007z\"/>\n\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span><?php get_previous_posts_link( \"Prev\" ); ?><?php echo esc_html__('Prev','moppers')?></span>\n\t\t\t\t\t</a>\n\t\t\t\t\t<?php \n\t\t\t\t}\n\t\t\t\tif (!empty( $next_post )) { ?>\n\t\t\t\t\t<!-- Next Post -->\n\t\t\t\t\t<a href=\"<?php echo get_permalink( $next_post->ID ); ?>\" class=\"page-item next\">\n\t\t\t\t\t\t<span><?php get_previous_posts_link( \"Prev\" ); ?><?php echo esc_html__('Next','moppers')?></span>\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" viewBox=\"0 0 31.49 31.49\" style=\"enable-background:new 0 0 31.49 31.49;\" xml:space=\"preserve\">\n\t\t\t\t\t\t\t\t<path d=\"M21.205,5.007c-0.429-0.444-1.143-0.444-1.587,0c-0.429,0.429-0.429,1.143,0,1.571l8.047,8.047H1.111 C0.492,14.626,0,15.118,0,15.737c0,0.619,0.492,1.127,1.111,1.127h26.554l-8.047,8.032c-0.429,0.444-0.429,1.159,0,1.587 c0.444,0.444,1.159,0.444,1.587,0l9.952-9.952c0.444-0.429,0.444-1.143,0-1.571L21.205,5.007z\"/>\n\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</a>\n\t\t\t\t\t<?php \n\t\t\t\t} ?>\n\t\t\t</div>\n\t\t<?php } \n }", "function affinity_mikado_get_single_post_navigation_template() {\n\t\t$params = array();\n\n\t\t$in_same_term = affinity_mikado_options()->getOptionValue('blog_navigation_through_same_category') === 'yes';\n\n\t\t$prev_post = get_previous_post($in_same_term);\n\t\t$next_post = get_next_post($in_same_term);\n\t\t$params['has_prev_post'] = false;\n\t\t$params['has_next_post'] = false;\n\n\t\tif ($prev_post) {\n\t\t\t$params['prev_post_object'] = $prev_post;\n\t\t\t$params['has_prev_post'] = true;\n\t\t\t$params['prev_post'] = array(\n\t\t\t\t'title' => get_the_title($prev_post->ID),\n\t\t\t\t'link' => get_the_permalink($prev_post->ID),\n\t\t\t\t'image' => get_the_post_thumbnail($prev_post->ID, 'thumbnail'),\n\t\t\t\t'date' => get_the_date(get_option('date_format'))\n\t\t\t);\n\n\t\t\t$params['prev_post_has_image'] = !empty($params['prev_post']['image']);\n\t\t}\n\n\t\tif ($next_post) {\n\t\t\t$params['next_post_object'] = $next_post;\n\t\t\t$params['has_next_post'] = true;\n\t\t\t$params['next_post'] = array(\n\t\t\t\t'title' => get_the_title($next_post->ID),\n\t\t\t\t'link' => get_the_permalink($next_post->ID),\n\t\t\t\t'image' => get_the_post_thumbnail($next_post->ID, 'thumbnail'),\n\t\t\t\t'date' => get_the_date(get_option('date_format'))\n\t\t\t);\n\n\t\t\t$params['next_post_has_image'] = !empty($params['next_post']['image']);\n\t\t}\n\n\t\taffinity_mikado_get_module_template_part('templates/single/parts/single-navigation', 'blog', '', $params);\n\t}", "function themamastore_post_nav() {\n\t// Don't print empty markup if there's nowhere to navigate.\n\t$previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true );\n\t$next = get_adjacent_post( false, '', false );\n\n\tif ( ! $next && ! $previous ) {\n\t\treturn;\n\t}\n\n\t?>\n\t<nav class=\"navigation post-navigation\" role=\"navigation\">\n\t\t<h1 class=\"screen-reader-text\"><?php _e( 'Post navigation', 'themamastore' ); ?></h1>\n\t\t<div class=\"nav-links\">\n\t\t\t<?php\n\t\t\tif ( is_attachment() ) :\n\t\t\t\tprevious_post_link( '%link', __( '<span class=\"meta-nav \">Published In</span>%title', 'themamastore' ) );\n\t\t\telse :\n\t\t\t\tprevious_post_link( '%link', __( '<span class=\"meta-nav\">Previous Post</span>%title', 'themamastore' ) );\n\t\t\t\tnext_post_link( '%link', __( '<span class=\"meta-nav\">Next Post</span>%title', 'themamastore' ) );\n\t\t\tendif;\n\t\t\t?>\n\t\t</div><!-- .nav-links -->\n\t</nav><!-- .navigation -->\n\t<?php\n}", "function bus_leader_post_nav() {\n\t// Don't print empty markup if there's nowhere to navigate.\n\t$previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true );\n\t$next = get_adjacent_post( false, '', false );\n\n\tif ( ! $next && ! $previous ) {\n\t\treturn;\n\t}\n\t?>\n\t<nav class=\"navigation post-navigation\" role=\"navigation\">\n\t\t<div class=\"post-nav-box clear\">\n\t\t\t<h1 class=\"screen-reader-text\"><?php _e( 'Post navigation', 'bus_leader' ); ?></h1>\n\t\t\t<div class=\"nav-links\">\n\t\t\t\t<?php\n\t\t\t\t\tprevious_post_link( '<div class=\"nav-previous\"><div class=\"nav-indicator\">%link</div>', _x( 'Previous Post', 'Previous post', 'bus_leader' ) );\n\t\t\t\t\tprevious_post_link( '<h1>%link</h1></div>', '%title' );\n\t\t\t\t\tnext_post_link(\t\t'<div class=\"nav-next\"><div class=\"nav-indicator\">%link</div>', _x( 'Next Post', 'Next post', 'bus_leader' ) );\n\t\t\t\t\tnext_post_link(\t\t'<h1>%link</h1></div>', '%title' );\n\t\t\t\t?>\n\t\t\t</div><!-- .nav-links -->\n\t\t</div><!-- .post-nav-box -->\n\t</nav><!-- .navigation -->\n\t<?php\n}", "function folia_post_nav() {\n\t// Don't print empty markup if there's nowhere to navigate.\n\t$previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true );\n\t$next = get_adjacent_post( false, '', false );\n\n\tif ( ! $next && ! $previous ) {\n\t\treturn;\n\t}\n\t?>\n\t<nav class=\"navigation post-navigation\" role=\"navigation\">\n\t\t<h1 class=\"screen-reader-text\"><?php _e( 'Post navigation', 'folia' ); ?></h1>\n\t\t<div class=\"nav-links\">\n\t\t\t<?php\n\t\t\t\tprevious_post_link( '<div class=\"nav-previous\">%link</div>', _x( '<span class=\"meta-nav\">&larr;</span> %title', 'Previous post link', 'folia' ) );\n\t\t\t\tnext_post_link( '<div class=\"nav-next\">%link</div>', _x( '%title <span class=\"meta-nav\">&rarr;</span>', 'Next post link', 'folia' ) );\n\t\t\t?>\n\t\t</div><!-- .nav-links -->\n\t</nav><!-- .navigation -->\n\t<?php\n}", "function wpbeginner_numeric_posts_nav() {\n \n\tif( is_singular() )\n\t\treturn;\n\n\tglobal $wp_query;\n\n\t/** Stop execution if there's only 1 page */\n\tif( $wp_query->max_num_pages <= 1 )\n\t\treturn;\n\n\t$paged = get_query_var( 'paged' ) ? absint( get_query_var( 'paged' ) ) : 1;\n\t$max = intval( $wp_query->max_num_pages );\n\n\t/**\tAdd current page to the array */\n\tif ( $paged >= 1 )\n\t\t$links[] = $paged;\n\n\t/**\tAdd the pages around the current page to the array */\n\tif ( $paged >= 3 ) {\n\t\t$links[] = $paged - 1;\n\t\t$links[] = $paged - 2;\n\t}\n\n\tif ( ( $paged + 2 ) <= $max ) {\n\t\t$links[] = $paged + 2;\n\t\t$links[] = $paged + 1;\n\t}\n\n\techo '<div class=\"navigation-link\"><ul>' . \"\\n\";\n\n\t/**\tPrevious Post Link */\n\tif ( get_previous_posts_link() )\n\t\tprintf( '<li>%s</li>' . \"\\n\", get_previous_posts_link() );\n\n\t/**\tLink to first page, plus ellipses if necessary */\n\tif ( ! in_array( 1, $links ) ) {\n\t\t$class = 1 == $paged ? ' class=\"active\"' : '';\n\n\t\tprintf( '<li%s><a href=\"%s\">%s</a></li>' . \"\\n\", $class, esc_url( get_pagenum_link( 1 ) ), '1' );\n\n\t\tif ( ! in_array( 2, $links ) )\n\t\t\techo '<li>…</li>';\n\t}\n\n\t/**\tLink to current page, plus 2 pages in either direction if necessary */\n\tsort( $links );\n\tforeach ( (array) $links as $link ) {\n\t\t$class = $paged == $link ? ' class=\"active\"' : '';\n\t\tprintf( '<li%s><a href=\"%s\">%s</a></li>' . \"\\n\", $class, esc_url( get_pagenum_link( $link ) ), $link );\n\t}\n\n\t/**\tLink to last page, plus ellipses if necessary */\n\tif ( ! in_array( $max, $links ) ) {\n\t\tif ( ! in_array( $max - 1, $links ) )\n\t\t\techo '<li>…</li>' . \"\\n\";\n\n\t\t$class = $paged == $max ? ' class=\"active\"' : '';\n\t\tprintf( '<li%s><a href=\"%s\">%s</a></li>' . \"\\n\", $class, esc_url( get_pagenum_link( $max ) ), $max );\n\t}\n\n\t/**\tNext Post Link */\n\tif ( get_next_posts_link() )\n\t\tprintf( '<li>%s</li>' . \"\\n\", get_next_posts_link() );\n\n\techo '</ul></div>' . \"\\n\";\n\n}", "function themenamefunction_post_nav() {\n\t\t$previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true );\n\t\t$next = get_adjacent_post( false, '', false );\n\n\t\tif ( ! $next && ! $previous ) {\n\t\t\treturn;\n\t\t}\n\t\t?>\n\t\t<nav class=\"container navigation post-navigation\">\n\t\t\t<h2 class=\"sr-only\"><?php esc_html_e( 'Post navigation', 'themetextdomain' ); ?></h2>\n\t\t\t<div class=\"row nav-links justify-content-between\">\n\t\t\t\t<?php\n\t\t\t\tif ( get_previous_post_link() ) {\n\t\t\t\t\tprevious_post_link( '<span class=\"nav-previous\">%link</span>', _x( '<i class=\"fa fa-angle-left\"></i>&nbsp;%title', 'Previous post link', 'themetextdomain' ) );\n\t\t\t\t}\n\t\t\t\tif ( get_next_post_link() ) {\n\t\t\t\t\tnext_post_link( '<span class=\"nav-next\">%link</span>', _x( '%title&nbsp;<i class=\"fa fa-angle-right\"></i>', 'Next post link', 'themetextdomain' ) );\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t</div><!-- .nav-links -->\n\t\t</nav><!-- .navigation -->\n\t\t<?php\n\t}", "function _s_get_the_post_navigation( $args = array() ) {\n $args = wp_parse_args( $args, array(\n 'prev_text' => '%title',\n 'next_text' => '%title',\n 'in_same_term' => false,\n 'excluded_terms' => '',\n 'taxonomy' => 'category',\n 'screen_reader_text' => __( 'Post navigation', '_s' ),\n 'type' => 'html'\n ) );\n \n $navigation = '';\n \n $next = get_previous_post_link(\n '<div class=\"nav-next\">%link</div>',\n $args['next_text'],\n $args['in_same_term'],\n $args['excluded_terms'],\n $args['taxonomy']\n );\n \n $previous = get_next_post_link(\n '<div class=\"nav-previous\">%link</div>',\n $args['prev_text'],\n $args['in_same_term'],\n $args['excluded_terms'],\n $args['taxonomy']\n );\n \n // Only add markup if there's somewhere to navigate to.\n if ( $previous || $next ) {\n \n if( 'array' == $args['type'] ) {\n $navigation = [ 'previous' => $previous, 'next' => $next ];\n } else {\n $navigation = _navigation_markup( $previous . $next, 'post-navigation', $args['screen_reader_text'] ); \n } \n }\n \n return $navigation;\n}", "function wp_listings_post_nav() {\n\t// Don't print empty markup if there's nowhere to navigate.\n\t$previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true );\n\t$next = get_adjacent_post( false, '', false );\n\n\tif ( ! $next && ! $previous ) {\n\t\treturn;\n\t}\n\n\t?>\n\t<nav class=\"navigation listing-navigation\" role=\"navigation\">\n\t\t<h1 class=\"screen-reader-text\"><?php _e( 'Listing navigation', 'wp_listings' ); ?></h1>\n\t\t<div class=\"nav-links\">\n\t\t\t<?php\n\t\t\tif ( is_attachment() ) :\n\t\t\t\tprevious_post_link( '%link', __( '<span class=\"meta-nav\">Published In</span>%title', 'wp_listings' ) );\n\t\t\telse :\n\t\t\t\tprevious_post_link( '%link', __( '<span class=\"meta-nav\">Previous Listing</span>%title', 'wp_listings' ) );\n\t\t\t\tnext_post_link( '%link', __( '<span class=\"meta-nav\">Next Listing</span>%title', 'wp_listings' ) );\n\t\t\tendif;\n\t\t\t?>\n\t\t</div><!-- .nav-links -->\n\t</nav><!-- .navigation -->\n\t<?php\n}", "protected function displayNavigationLinks() {\n\t\techo $this->getCalenderLink();\n\t\techo $this->getPrevLink();\n\t\techo $this->getNextLink();\n\t}", "function get_previous_posts_page_link()\n{\n}", "function twentythirteen_post_nav() {\n\tglobal $post;\n\n\t// Don't print empty markup if there's nowhere to navigate.\n\t$previous = ( is_attachment() ) ? get_post( $post->post_parent ) : get_adjacent_post( false, '', true );\n\t$next = get_adjacent_post( false, '', false );\n\n\tif ( ! $next && ! $previous )\n\t\treturn;\n\t?>\n\t<nav class=\"navigation post-navigation\" role=\"navigation\">\n\t\t<h1 class=\"screen-reader-text\"><?php _e( 'Post navigation', 'twentythirteen' ); ?></h1>\n\t\t<div class=\"nav-links\">\n\n\t\t\t<?php previous_post_link( '%link', _x( '<span class=\"meta-nav\">&larr;</span> %title', 'Previous post link', 'twentythirteen' ) ); ?>\n\t\t\t<?php next_post_link( '%link', _x( '%title <span class=\"meta-nav\">&rarr;</span>', 'Next post link', 'twentythirteen' ) ); ?>\n\n\t\t</div><!-- .nav-links -->\n\t</nav><!-- .navigation -->\n\t<?php\n}", "function show_pagenav() {\n\t\tif (getTotalPages()!= 1) {?>\n\t\t\t<div id=\"pagenav\">\t\n\t\t\t\t<?php printPageListWithNav(\"« prev\", \"next »\"); ?>\n\t\t\t</div> <?php } else if (getTotalPages() == 1) {?>\n\t\t\t<div id=\"pagenav\"></div>\n\t\t\t<?php };\n\t\t}", "function ortext_post_nav() {\n\t// Don't print empty markup if there's nowhere to navigate.\n\t$previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true );\n\t$next = get_adjacent_post( false, '', false );\n\n\tif ( ! $next && ! $previous ) {\n\t\treturn;\n\t}\n\t?>\n\t<nav class=\"navigation post-navigation\" role=\"navigation\">\n\t\t<h1 class=\"screen-reader-text\"><?php _e( 'Post navigation', 'ortext' ); ?></h1>\n\t\t<?php\n\t\tif ( get_post_type() == 'post' ) : \n\t\t\techo '<div class=\"nav-links\">';\n\t\t\tprevious_post_link( '<div class=\"nav-previous\">%link</div>', _x( '<span class=\"meta-nav\">&larr;</span>&nbsp;%title', 'Previous post link', 'ortext' ) ); \n\t\t\tnext_post_link( '<div class=\"nav-next\">%link</div>', _x( '%title&nbsp;<span class=\"meta-nav\">&rarr;</span>', 'Next post link', 'ortext' ) );\n\t\telse:\n\t\t\t$pt = get_post_type_object( get_post_type() )->labels->name;\n\t\t\techo '<div class=\"nav-links-nd\"><div class=\"nav-nd-title\">' . __( 'In Series of ', 'ortext' ) . $pt . '</div>';\n\t\t\tprevious_post_link( '<div class=\"nav-previous\">%link</div>', _x( '%title', 'Previous post link', 'ortext' ) ); \n\t\t\tnext_post_link( '<div class=\"nav-next\">%link</div>', _x( '%title', 'Next post link', 'ortext' ) );\t\n\t\tendif; ?>\n\t\t</div><!-- .nav-links -->\n\t</nav><!-- .navigation -->\n\t<?php\n}", "function the_post_navigation() {\n\t// Don't print empty markup if there's nowhere to navigate.\n\t$previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true );\n\t$next = get_adjacent_post( false, '', false );\n\n\tif ( ! $next && ! $previous ) {\n\t\treturn;\n\t}\n\t?>\n\t<nav class=\"navigation post-navigation\" role=\"navigation\">\n\t\t<h2 class=\"screen-reader-text\"><?php esc_html_e( 'Post navigation', 'youplay' ); ?></h2>\n\t\t<div class=\"nav-links\">\n\t\t\t<?php\n\t\t\t\tprevious_post_link( '<div class=\"nav-previous\">%link</div>', '%title' );\n\t\t\t\tnext_post_link( '<div class=\"nav-next\">%link</div>', '%title' );\n\t\t\t?>\n\t\t</div><!-- .nav-links -->\n\t</nav><!-- .navigation -->\n\t<?php\n}", "private function renderNav()\n {\n $pagination = $this->tilesCollection->getPagination();\n $name = $pagination->getPaginationName();\n $value = $pagination->getPaginationQueryString(1);\n \n echo '<hr class=\"hidden\" />';\n \n echo '<div class=\"tiles navigation centered\"><div>';\n echo CHtml::link(\n Yii::t('phrases', 'older items'),\n array('', $name => $value),\n array('class'=>'button navigation next')\n );\n echo '</div></div>';\n\n }", "function themeblvd_pagination() {\n\n if (function_exists('wp_pagenavi') ) {\n\n wp_pagenavi();\n\n } else {\n\n if ( get_next_posts_link() || get_previous_posts_link() ) {\n ?>\n\n <div class=\"nav-entries\">\n <div class=\"nav-prev fl\"><?php previous_posts_link(__('&laquo; Newer Entries ', 'themeblvd')) ?></div>\n <div class=\"nav-next fr\"><?php next_posts_link(__(' Older Entries &raquo;', 'themeblvd')) ?></div>\n <div class=\"clear\"></div>\n </div>\n\n <?php\n }\n\n\t}\n##################################################################\n}", "function carr_paging_nav() {\n\t// Don't print empty markup if there's only one page.\n\tif ( $GLOBALS['wp_query']->max_num_pages < 2 ) {\n\t\treturn;\n\t}\n\t?>\n\t<nav class=\"navigation paging-navigation\" role=\"navigation\">\n\t\t<h1 class=\"screen-reader-text\"><?php _e( 'Posts navigation', 'cmc' ); ?></h1>\n\t\t<div class=\"nav-links\">\n\n\t\t\t<?php if ( get_next_posts_link() ) : ?>\n\t\t\t<div class=\"nav-previous border-block top\">\n\t\t\t\t<p class=\"block-label\"><?php next_posts_link( __( '<span class=\"icon-arrow-left small\"></span> Older posts', 'cmc' ) ); ?></p>\n\t\t\t</div>\n\t\t\t<?php endif; ?>\n\n\t\t\t<?php if ( get_previous_posts_link() ) : ?>\n\t\t\t<div class=\"nav-next border-block top\">\n\t\t\t\t<p class=\"block-label\"><?php previous_posts_link( __( 'Newer posts <span class=\"icon-arrow-right small\"></span>', 'cmc' ) ); ?></p>\n\t\t\t</div>\n\t\t\t<?php endif; ?>\n\n\t\t</div><!-- .nav-links -->\n\t</nav><!-- .navigation -->\n\t<?php\n}", "function gengo_previous_posts_link($label = 'Newer Entries &raquo;') {\r\n\tglobal $gengo, $paged;\r\n\r\n\tif (!is_single() && ($paged > 1)) \t{\r\n\t\t$nextpage = intval($paged) - 1;\r\n\t\tif ($nextpage < 1) $nextpage = 1;\r\n\t\t$link = get_pagenum_link($nextpage);\r\n\t\tif ($gengo->language_preference) $link = str_replace(\"/{$gengo->viewable_code_string}/page/$nextpage/\", \"/page/$nextpage/{$gengo->viewable_code_string}/\", $link);\r\n\t\techo '<a href=\"' . $link . '\">' . preg_replace('/&([^#])(?![a-z]{1,8};)/', '&#038;$1', $label) . '</a>';\r\n\t}\r\n}", "function speaking_topic_post_nav_links() {\n\treturn '<div class=\"topic-nav\"><span class=\"nav-next\">' .\n\t\tget_next_post_link('%link', 'Next Topic <span style=\"font-family: ETmodules;\">&#x3d;</span>', true, [], 'speaking_topic_category') .\n\t\t'</span><span class=\"nav-previous\">' .\n\t\tget_previous_post_link('%link', '<span style=\"font-family: ETmodules;\">&#x3c;</span> Previous Topic', true, [], 'speaking_topic_category') .\n\t\t'</span></div>';\n}", "function synth_content_nav( $html_id ) {\n\tglobal $wp_query;\n\n\t$html_id = esc_attr( $html_id );\n\n\tif ( $wp_query->max_num_pages > 1 ) { ?>\n\t\t<div class=\"row\">\n\t <div class=\"span12 center\">\n\t <div class=\"pagination\">\n\t <ul>\n\t \t<li><?php next_posts_link( __( '<span class=\"meta-nav\">&larr;</span> Older posts', 'synth' ) ); ?></li>\n\t \t<li><?php previous_posts_link( __( 'Newer posts <span class=\"meta-nav\">&rarr;</span>', 'synth' ) ); ?></li>\n\t </ul>\n\t </div>\n\t </div>\n\t </div>\n\t<?php } else { ?>\n\t\t<div class=\"row space50\"></div>\n\t<?php\n\t}\n}", "function malinky_posts_pagination()\n\t{\n\t\tglobal $wp_query;\n\n\t\t//Return if only 1 page\n\t\tif ( $wp_query->max_num_pages < 2 ) {\n\t\t\treturn;\n\t\t} ?>\n\n\t\t<nav class=\"col col--gutterless posts-pagination\" role=\"navigation\">\n\n\t\t\t<div class=\"col-item col-item-half posts-pagination__link posts-pagination__link--newer\">\n\t\t\t\t<?php if ( get_previous_posts_link() ) { ?>\n\t\t\t\t\t\t<?php previous_posts_link( 'Newer Posts' ); ?>\n\t\t\t\t<?php } ?>\t\t\t\n\t\t\t</div><!--\n\n\t\t\t--><div class=\"col-item col-item-half col-item--align-right posts-pagination__link posts-pagination__link--older\">\n\t\t\t\t<?php if ( get_next_posts_link() ) { ?>\n\t\t\t\t\t\t<?php next_posts_link( 'Older Posts' ); ?>\n\t\t\t\t<?php } ?>\n\t\t\t</div>\n\n\t\t</nav><!-- .posts-pagination -->\n\t<?php }", "function ShowNavLinks()\n {\n \t$this->paginatorObj->ShowBox($this);\n }", "function perrymnmlist_content_nav( $nav_id ) {\r\n\tglobal $wp_query;\r\n\r\n\tif ( $wp_query->max_num_pages > 1 ) : ?>\r\n\t\t<nav id=\"<?php echo $nav_id; ?>\">\r\n\t\t\t<h3 class=\"assistive-text\"><?php _e( 'Post navigation', 'perrymnmlist' ); ?></h3>\r\n\t\t\t<div class=\"nav-previous alignleft\"><?php next_posts_link( __( '<span class=\"meta-nav\">&larr;</span> Older posts', 'perrymnmlist' ) ); ?></div>\r\n\t\t\t<div class=\"nav-next alignright\"><?php previous_posts_link( __( 'Newer posts <span class=\"meta-nav\">&rarr;</span>', 'perrymnmlist' ) ); ?></div>\r\n\t\t</nav><!-- #nav-above -->\r\n\t<?php endif;\r\n}", "function tfuse_pagination() {\r\r\n global $wp_query;\r\r\n\r\r\n if ( $wp_query->max_num_pages > 1 ) : ?>\r\r\n <div class=\"other_posts\">\r\r\n <span class=\"nextp\"><?php next_posts_link(__('Next page', 'tfuse')); ?></span>\r\r\n <span class=\"prevp\"><?php previous_posts_link(__('Prev page', 'tfuse')); ?></span>\r\r\n </div>\r\r\n\t<?php endif;\r\r\n}", "function next_post($format = '%', $next = 'next post: ', $title = 'yes', $in_same_cat = 'no', $limitnext = 1, $excluded_categories = '')\n{\n}", "function jg_content_nav( $nav_id = 'nav-below' ) {\n\tglobal $wp_query;\n$prev = get_previous_post();\n$next = get_next_post();\n$paged = $wp_query->get( 'paged' );\n\n\tif ( $wp_query->max_num_pages > 1 ) { ?>\n\t\t<nav id=\"<?php echo $nav_id; ?>\" class=\"navigation\">\n\t\t\t<h3 class=\"screen-reader-text\">Post navigation</h3>\n\t\t\t<?php if($prev != '') { ?><span class=\"nav-previous\"><?php next_posts_link( 'Older posts'); ?></span><?php } ?>\n\t\t\t<?php if($paged != 0) { ?><span class=\"nav-next\"><?php previous_posts_link( 'Newer posts'); ?></span><?php } ?>\n\t\t</nav><!-- #<?php echo $nav_id; ?> -->\n\t<?php } else {\n\t\tif(is_single()){ ?>\n\t\t<nav id=\"nav-single\" class=\"navigation\">\n\t\t\t<h3 class=\"screen-reader-text\">Post navigation</h3>\n\t\t\t<?php if($prev != '') { ?><span class=\"nav-previous\"><?php previous_post_link( '%link', 'Older posts'); ?></span><?php } ?>\n\t\t\t<?php if($next != '') { ?><span class=\"nav-next\"><?php next_post_link( '%link', 'Newer posts'); ?></span><?php } ?>\n\t\t</nav><!-- #nav-single -->\n\t<?php }\n\t}\n}", "function wp_link_pages_args_prevnext_add($args)\r\n{\r\n global $page, $numpages, $more, $pagenow;\r\n\r\n if (!$args['next_or_number'] == 'next_and_number') \r\n return $args; # exit early\r\n\r\n $args['next_or_number'] = 'number'; # keep numbering for the main part\r\n if (!$more)\r\n return $args; # exit early\r\n\r\n if($page-1) # there is a previous page\r\n $args['before'] .= _wp_link_page($page-1)\r\n . $args['link_before']. $args['previouspagelink'] . $args['link_after'] . '</a>'\r\n ;\r\n\r\n if ($page<$numpages) # there is a next page\r\n $args['after'] = _wp_link_page($page+1)\r\n . $args['link_before'] . $args['nextpagelink'] . $args['link_after'] . '</a>'\r\n . $args['after']\r\n ;\r\n\r\n return $args;\r\n}", "function wpbeginner_numeric_posts_nav() {\n\n\tif( is_singular() )\n\t\treturn;\n\n\tglobal $wp_query;\n\n\t/** Stop execution if there's only 1 page */\n\tif( $wp_query->max_num_pages <= 1 )\n\t\treturn;\n\n\t$paged = get_query_var( 'paged' ) ? absint( get_query_var( 'paged' ) ) : 1;\n\t$max = intval( $wp_query->max_num_pages );\n\n\t/**\tAdd current page to the array */\n\tif ( $paged >= 1 )\n\t\t$links[] = $paged;\n\n\t/**\tAdd the pages around the current page to the array */\n\tif ( $paged >= 3 ) {\n\t\t$links[] = $paged - 1;\n\t\t$links[] = $paged - 2;\n\t}\n\n\tif ( ( $paged + 2 ) <= $max ) {\n\t\t$links[] = $paged + 2;\n\t\t$links[] = $paged + 1;\n\t}\n\n\techo '<div class=\"navigation\"><ul>' . \"\\n\";\n\n\t/**\tPrevious Post Link */\n\tif ( get_previous_posts_link() )\n\t\tprintf( '<li>%s</li>' . \"\\n\", get_previous_posts_link() );\n\n\t/**\tLink to first page, plus ellipses if necessary */\n\tif ( ! in_array( 1, $links ) ) {\n\t\t$class = 1 == $paged ? ' class=\"active\"' : '';\n\n\t\tprintf( '<li%s><a href=\"%s\">%s</a></li>' . \"\\n\", $class, esc_url( get_pagenum_link( 1 ) ), '1' );\n\n\t\tif ( ! in_array( 2, $links ) )\n\t\t\techo '<li>…</li>';\n\t}\n\n\t/**\tLink to current page, plus 2 pages in either direction if necessary */\n\tsort( $links );\n\tforeach ( (array) $links as $link ) {\n\t\t$class = $paged == $link ? ' class=\"active\"' : '';\n\t\tprintf( '<li%s><a href=\"%s\">%s</a></li>' . \"\\n\", $class, esc_url( get_pagenum_link( $link ) ), $link );\n\t}\n\n\t/**\tLink to last page, plus ellipses if necessary */\n\tif ( ! in_array( $max, $links ) ) {\n\t\tif ( ! in_array( $max - 1, $links ) )\n\t\t\techo '<li>…</li>' . \"\\n\";\n\n\t\t$class = $paged == $max ? ' class=\"active\"' : '';\n\t\tprintf( '<li%s><a href=\"%s\">%s</a></li>' . \"\\n\", $class, esc_url( get_pagenum_link( $max ) ), $max );\n\t}\n\n\t/**\tNext Post Link */\n\tif ( get_next_posts_link() )\n\t\tprintf( '<li>%s</li>' . \"\\n\", get_next_posts_link() );\n\n\techo '</ul></div>' . \"\\n\";\n\n}", "function hcode_single_post_navigation() {\n if( is_singular('post') ){\n $link = $cat_name = $next_image = $prev_image = $thumb_icon = $thumb_icon_next = '';\n // no image\n $hcode_options = get_option( 'hcode_theme_setting' );\n $hcode_no_image = (isset($hcode_options['hcode_no_image'])) ? $hcode_options['hcode_no_image'] : '';\n \n if( isset( $hcode_no_image['url'] ) ) {\n $image_thumb = $hcode_no_image['url'];\n } else {\n $image_thumb = array();\n }\n\n $cat = get_the_category(); \n $link = get_category_link($cat[0]->cat_ID);\n $current_cat_id = $cat[0]->cat_ID;\n\n $args = array( \n 'category' => $current_cat_id,\n 'posts_per_page' => -1,\n );\n $posts = get_posts( $args );\n\n // get IDs of posts retrieved from get_posts\n $ids = array();\n foreach ( $posts as $thepost ) {\n $ids[] = $thepost->ID;\n }\n \n $thisindex = array_search( get_the_ID(), $ids );\n\n if(($thisindex - 1) < 0)\n {\n $previd = '';\n }else{\n $previd = $ids[ $thisindex - 1 ];\n }\n if( ($thisindex + 1 ) > count($ids)-1)\n {\n $nextid = '';\n }else{\n $nextid = $ids[ $thisindex + 1 ];\n }\n\n if ( $previd && has_post_thumbnail( $previd ) ) {\n $prevthumb = wp_get_attachment_image_src( get_post_thumbnail_id( $previd ), 'full' );\n if($prevthumb[0]):\n $prev_image = $prevthumb[0];\n else:\n if( isset( $image_thumb ) && esc_url( $image_thumb ) ){\n $prev_image = $image_thumb;\n }else{\n $prev_image = HCODE_THEME_ASSETS_URI . '/images/no-image-133x83.jpg';\n }\n endif;\n }else{\n if( isset( $image_thumb ) && esc_url( $image_thumb ) ){\n $prev_image = $image_thumb;\n }else{\n $prev_image = HCODE_THEME_ASSETS_URI . '/images/no-image-133x83.jpg';\n }\n }\n\n if ( $nextid && has_post_thumbnail( $nextid ) ) {\n $nextthumb = wp_get_attachment_image_src( get_post_thumbnail_id( $nextid ), 'full' );\n if($nextthumb[0]):\n $next_image = $nextthumb[0];\n else:\n if( isset( $image_thumb ) && esc_url( $image_thumb ) ){\n $next_image = $image_thumb;\n }else{\n $next_image = HCODE_THEME_ASSETS_URI . '/images/no-image-133x83.jpg';\n }\n endif;\n }else{\n if( isset( $image_thumb ) && esc_url( $image_thumb ) ){\n $next_image = $image_thumb;\n }else{\n $next_image = HCODE_THEME_ASSETS_URI . '/images/no-image-133x83.jpg';\n }\n }\n\n $image_id = hcode_get_attachment_id_from_url( $prev_image );\n $navigation_image_srcset = !empty($hcode_options['navigation_image_srcset']) ? $hcode_options['navigation_image_srcset'] : 'full';\n if( $image_id ){\n $thumb_icon = wp_get_attachment_image_src($image_id, $navigation_image_srcset);\n\n $srcset_prev = $srcset_data_prev = $sizes_prev = $sizes_data_prev = '';\n $srcset_prev = wp_get_attachment_image_srcset( $image_id, $navigation_image_srcset );\n if( $srcset_prev ){\n $srcset_data_prev = ' srcset=\"'.esc_attr( $srcset_prev ).'\"';\n }\n\n $sizes_prev = wp_get_attachment_image_sizes( $image_id, $navigation_image_srcset );\n if( $sizes_prev ){\n $sizes_data_prev = ' sizes=\"'.esc_attr( $sizes_prev ).'\"';\n }\n\n $prev_thumb = $thumb_icon[0];\n }else{\n $prev_thumb = $prev_image;\n }\n\n $next_image_id = hcode_get_attachment_id_from_url( $next_image );\n $navigation_image_srcset = !empty($hcode_options['navigation_image_srcset']) ? $hcode_options['navigation_image_srcset'] : 'full';\n if( $next_image_id ){\n $thumb_icon_next = wp_get_attachment_image_src($next_image_id, $navigation_image_srcset);\n\n $srcset_next = $srcset_data_next = $sizes_next = $sizes_data_next = '';\n $srcset_next = wp_get_attachment_image_srcset( $next_image_id, $navigation_image_srcset );\n if( $srcset_next ){\n $srcset_data_next = ' srcset=\"'.esc_attr( $srcset_next ).'\"';\n }\n\n $sizes_next = wp_get_attachment_image_sizes( $next_image_id, $navigation_image_srcset );\n if( $sizes_next ){\n $sizes_data_next = ' sizes=\"'.esc_attr( $sizes_next ).'\"';\n }\n\n $next_thumb = $thumb_icon_next[0];\n }else{\n $next_thumb = $next_image;\n }\n ?>\n <?php\n $related_post_style = hcode_option( 'enable_navigation_style' ); \n \n if( $related_post_style == 'normal' ){ \n ?>\n <div class=\"next-previous-project-style2\" role=\"navigation\">\n <!-- next-previous post -->\n <div class=\"previous-link\">\n <?php if ( ! empty( $previd) ) {?>\n \n <?php echo '<a rel=\"prev\" href=\"'.get_permalink($previd).'\"><i class=\"fa fa-angle-left\"></i>&nbsp;<span>'.__(\"Previous Post\", \"H-Code\").'</span></a>'; ?>\n \n <?php } ?>\n </div>\n <div class=\"back-to-category\">\n <a href=\"<?php echo $link;?>\" class=\"border-right text-uppercase back-project\">\n <i class=\"fa fa-th-large\"></i>\n </a>\n </div>\n <div class=\"next-link\">\n <?php if ( ! empty( $nextid ) ) { ?>\n <?php\n echo '<a rel=\"next\" href=\"'.get_permalink($nextid).'\"><span>'.__(\"Next Post\", \"H-Code\").'</span>&nbsp;<i class=\"fa fa-angle-right\"></i></a>';\n ?>\n <?php } ?>\n </div>\n <!-- end next-previous post -->\n </div>\n <?php }\n elseif($related_post_style == 'modern'){ ?>\n <div class=\"next-previous-project xs-display-none\">\n <?php if ( ! empty( $nextid ) ) { ?>\n <div class=\"next-project\">\n <?php\n echo '<a rel=\"next\" href=\"'.get_permalink($nextid).'\"><img alt=\"'.__(\"Next Project\", \"H-Code\").'\" class=\"next-project-img\" src=\"'.HCODE_THEME_ASSETS_URI.'/images/next-project.png\" width=\"33\" height=\"83\"><span>'.esc_html__( 'Next Post','H-Code').'</span><!-- next project image --><img alt=\"'.__(\"Next Project\", \"H-Code\").'\" src=\"'.$next_thumb.'\"'.$srcset_data_next.$sizes_data_next.'></a>';\n ?>\n </div>\n <?php } if ( ! empty( $previd) ) {?>\n <div class=\"previous-project\">\n <?php echo '<a rel=\"prev\" href=\"'.get_permalink($previd).'\"><img alt=\"'.__(\"Previous Project\", \"H-Code\").'\" src=\"'.$prev_thumb.'\"'.$srcset_data_prev.$sizes_data_prev.'><img alt=\"'.__(\"Previous Project\", \"H-Code\").'\" class=\"previous-project-img\" src=\"'.HCODE_THEME_ASSETS_URI.'/images/previous-project.png\" width=\"33\" height=\"83\"><span>'.esc_html__( 'Previous Post','H-Code').'</span></a>'; ?>\n </div>\n <?php } ?>\n </div>\n <?php }\n }else{ return; }\n }", "function page_navi($before = '', $after = '') {\n global $wpdb, $wp_query;\n $request = $wp_query->request;\n $posts_per_page = intval(get_query_var('posts_per_page'));\n $paged = intval(get_query_var('paged'));\n $numposts = $wp_query->found_posts;\n $max_page = $wp_query->max_num_pages;\n if ( $numposts <= $posts_per_page ) { return; }\n if(empty($paged) || $paged == 0) {\n $paged = 1;\n }\n $pages_to_show = 7;\n $pages_to_show_minus_1 = $pages_to_show-1;\n $half_page_start = floor($pages_to_show_minus_1/2);\n $half_page_end = ceil($pages_to_show_minus_1/2);\n $start_page = $paged - $half_page_start;\n if($start_page <= 0) {\n $start_page = 1;\n }\n $end_page = $paged + $half_page_end;\n if(($end_page - $start_page) != $pages_to_show_minus_1) {\n $end_page = $start_page + $pages_to_show_minus_1;\n }\n if($end_page > $max_page) {\n $start_page = $max_page - $pages_to_show_minus_1;\n $end_page = $max_page;\n }\n if($start_page <= 0) {\n $start_page = 1;\n }\n\n echo $before.'<ul class=\"pagination\">'.\"\";\n if ($paged > 1) {\n $first_page_text = \"&laquo\";\n echo '<li class=\"prev\"><a href=\"'.get_pagenum_link().'\" title=\"First\">'.$first_page_text.'</a></li>';\n }\n\n $prevposts = get_previous_posts_link('Prev');\n if($prevposts) { echo '<li class=\"prevp\">' . $prevposts . '</li>'; }\n else { echo '<li class=\"disabled\"><a href=\"#\">Prev</a></li>'; }\n\n for($i = $start_page; $i <= $end_page; $i++) {\n if($i == $paged) {\n echo '<li class=\"active\"><a href=\"#\">'.$i.'</a></li>';\n } else {\n echo '<li><a href=\"'.get_pagenum_link($i).'\">'.$i.'</a></li>';\n }\n }\n echo '<li class=\"nextp\">';\n next_posts_link('Next');\n echo '</li>';\n if ($end_page < $max_page) {\n $last_page_text = \"&raquo;\";\n echo '<li class=\"next\"><a href=\"'.get_pagenum_link($max_page).'\" title=\"Last\">'.$last_page_text.'</a></li>';\n }\n echo '</ul>'.$after.\"\";\n}", "function codeinwpblog_paging_nav() {\n\techo '<div class=\"clear\"></div>';\n\t?>\n\t<nav class=\"navigation paging-navigation\" role=\"navigation\">\n\t\n\t\t<div class=\"nav-links\">\n\t\t\t<?php if ( get_next_posts_link() ) : ?>\n\t\t\t<div class=\"nav-previous\"><?php next_posts_link( __( '<span class=\"meta-nav\">&larr;</span> Older posts', 'ti' ) ); ?></div>\n\t\t\t<?php endif; ?>\n\t\t\t<?php if ( get_previous_posts_link() ) : ?>\n\t\t\t<div class=\"nav-next\"><?php previous_posts_link( __( 'Newer posts <span class=\"meta-nav\">&rarr;</span>', 'ti' ) ); ?></div>\n\t\t\t<?php endif; ?>\n\t\t</div><!-- .nav-links -->\n\t</nav><!-- .navigation -->\n\t<?php\n}", "public function paging_nav( $previous_text = '', $next_text = '' ) {\n\t\tglobal $wp_query;\n\n\t\t// Don't print empty markup if there's only one page.\n\t\tif ( $wp_query->max_num_pages < 2 )\n\t\t\treturn;\n\t\t?>\n\t\t<nav class=\"navigation paging-navigation\" role=\"navigation\">\n\t\t\t<h1 class=\"screen-reader-text\"><?php _e( 'Posts navigation', 'twentythirteen' ); ?></h1>\n\t\t\t<div class=\"nav-links\">\n\n\t\t\t\t<?php if ( get_next_posts_link() ) : ?>\n\t\t\t\t\t<div class=\"nav-previous\"><?php next_posts_link( '<span class=\"meta-nav\">&larr;</span> ' . $previous_text ); ?></div>\n\t\t\t\t<?php endif; ?>\n\n\t\t\t\t<?php if ( get_previous_posts_link() ) : ?>\n\t\t\t\t\t<div class=\"nav-next\"><?php previous_posts_link( '<span class=\"meta-nav\">&rarr;</span> ' . $next_text ); ?></div>\n\t\t\t\t<?php endif; ?>\n\n\t\t\t</div><!-- .nav-links -->\n\t\t</nav><!-- .navigation -->\n\t\t<?php\n\t}", "function ramza_print_posts_nav( $max_pages = '' ) {\n if ( class_exists( 'Jetpack' ) && Jetpack::is_module_active( 'infinite-scroll' ) ) {\n // Do not print this nav if Jetpack Infinite Scroll is active\n return;\n }\n\n // If no custom WP query is set, use global WP query\n if ( '' === $max_pages ) {\n $max_pages = $GLOBALS['wp_query']->max_num_pages;\n }\n\n // Do nothing if there's only one page.\n if ( $max_pages < 2 ) {\n return;\n }\n\n // Print HTML\n ?>\n <nav class=\"c-posts-nav\" role=\"navigation\">\n <h2 class=\"u-screen-reader-text\"><?php esc_html_e( 'Posts navigation', 'ramza' ); ?></h2>\n <div class=\"c-posts-nav__links\">\n <?php if ( get_next_posts_link( '', $max_pages ) ) : ?>\n <div class=\"c-posts-nav__link c-posts-nav__link--prev\"><?php next_posts_link( esc_html__( 'Older Posts', 'ramza' ), $max_pages ); ?></div>\n <?php endif; ?>\n <?php if ( get_previous_posts_link() ) : ?>\n <div class=\"c-posts-nav__link c-posts-nav__link--next\"><?php previous_posts_link( esc_html__( 'Newer Posts', 'ramza' ) ); ?></div>\n <?php endif; ?>\n </div>\n </nav><!-- .c-posts-nav -->\n <?php\n}", "public static function themeNavigation( $eventDate = null, $previousText = 'Previous', $nextText = 'Next' ) {\r\n\r\n /* Previous */\r\n $meta_query = array(\r\n array(\r\n 'key' => kBNMExtendsEventMetaDateAndTime,\r\n 'value' => $eventDate,\r\n 'type' => 'numeric',\r\n 'compare' => '<'\r\n )\r\n );\r\n\r\n $args = array(\r\n 'post_status' => 'publish',\r\n 'post_type' => kBNMExtendsEventPostTypeKey,\r\n 'numberposts' => 1,\r\n 'meta_key' => kBNMExtendsEventMetaDateAndTime,\r\n 'orderby' => 'meta_value',\r\n 'order' => 'DESC',\r\n 'meta_query' => $meta_query\r\n );\r\n\r\n $events = get_posts( $args );\r\n\r\n if ( count( $events ) > 0 ) {\r\n\r\n /* Qui è corretto che sia ICL_LANGUAGE_CODE, perché vado avanti e indietro nei \"post\" della mia lingua */\r\n $id_event = defined( 'ICL_LANGUAGE_CODE' ) ? icl_object_id( $events[0]->ID, kBNMExtendsEventPostTypeKey, true, ICL_LANGUAGE_CODE ) : $events[0]->ID;\r\n $id_event = absint( $id_event ); ?>\r\n <span class=\"left\">\r\n <a class=\"button blue\" href=\"<?php echo get_post_permalink( $id_event ) ?>\"><?php _e( $previousText ) ?></a>\r\n </span>\r\n <?php\r\n }\r\n\r\n /* Next */\r\n $meta_query = array(\r\n array(\r\n 'key' => kBNMExtendsEventMetaDateAndTime,\r\n 'value' => $eventDate,\r\n 'type' => 'numeric',\r\n 'compare' => '>'\r\n )\r\n );\r\n\r\n $args = array(\r\n 'post_status' => 'publish',\r\n 'post_type' => kBNMExtendsEventPostTypeKey,\r\n 'numberposts' => 1,\r\n 'meta_key' => kBNMExtendsEventMetaDateAndTime,\r\n 'orderby' => 'meta_value',\r\n 'order' => 'ASC',\r\n 'meta_query' => $meta_query\r\n );\r\n\r\n $events = get_posts( $args );\r\n\r\n if ( count( $events ) > 0 ) {\r\n /* Qui è corretto che sia ICL_LANGUAGE_CODE, perché vado avanti e indietro nei \"post\" della mia lingua */\r\n $id_event = defined( 'ICL_LANGUAGE_CODE' ) ? icl_object_id( $events[0]->ID, kBNMExtendsEventPostTypeKey, true, ICL_LANGUAGE_CODE ) : $events[0]->ID; ?>\r\n <span class=\"right\">\r\n <a class=\"button blue\" href=\"<?php echo get_post_permalink( $id_event ) ?>\"><?php _e( $nextText ) ?></a>\r\n </span>\r\n <?php\r\n\r\n }\r\n }", "function sprint_wp_link_pages_args_prevnext_add($args)\n{\n global $page, $numpages, $more, $pagenow;\n if (!$args['next_or_number'] == 'next_and_number')\n return $args; \n $args['next_or_number'] = 'number'; \n if (!$more)\n return $args; \n if($page-1) \n $args['before'] .= _wp_link_page($page-1)\n . $args['link_before']. $args['previouspagelink'] . $args['link_after'] . '</a>'\n ;\n if ($page<$numpages) \n \n $args['after'] = _wp_link_page($page+1)\n . $args['link_before'] . $args['nextpagelink'] . $args['link_after'] . '</a>'\n . $args['after']\n ;\n return $args;\n}", "function onesie_pro_paging_nav() {\n // Don't print empty markup if there's only one page.\n if ( $GLOBALS['wp_query']->max_num_pages < 2 ) {\n return;\n }\n ?>\n <nav class=\"navigation paging-navigation\" role=\"navigation\">\n <h1 class=\"screen-reader-text\"><?php _e( 'Posts navigation', 'onesie_pro' ); ?></h1>\n <div class=\"nav-links\">\n\n <?php if ( get_next_posts_link() ) : ?>\n <div class=\"nav-previous\"><?php next_posts_link( __( '<span class=\"meta-nav\">&larr;</span> Older posts', 'onesie_pro' ) ); ?></div>\n <?php endif; ?>\n\n <?php if ( get_previous_posts_link() ) : ?>\n <div class=\"nav-next\"><?php previous_posts_link( __( 'Newer posts <span class=\"meta-nav\">&rarr;</span>', 'onesie_pro' ) ); ?></div>\n <?php endif; ?>\n\n </div><!-- .nav-links -->\n </nav><!-- .navigation -->\n <?php\n}", "static function get_posts_navigation( $args = array(), $conditional_tags = array(), $current_page = array() ) {\n\t\tglobal $post;\n\n\t\t$defaults = array(\n\t\t\t'in_same_term' => 'off',\n\t\t\t'taxonomy_name' => 'category',\n\t\t\t'prev_text' => '%title',\n\t\t\t'next_text' => '%title',\n\t\t);\n\n\t\t$args = wp_parse_args( $args, $defaults );\n\n\t\t// taxonomy name overwrite if in_same_term option is set to off and no taxonomy name defined\n\t\tif ( '' === $args['taxonomy_name'] || 'on' !== $args['in_same_term'] ) {\n\t\t\t$is_singular_project = isset( $conditional_tags['is_singular_project'] ) ? $conditional_tags['is_singular_project'] === 'true' : is_singular( 'project' );\n\t\t\t$args['taxonomy_name'] = $is_singular_project ? 'project_category' : 'category';\n\t\t}\n\n\t\t$in_same_term = ! $args['in_same_term'] || 'off' === $args['in_same_term'] ? false : true;\n\n\t\t// Overwrite global $post value in this scope\n\t\t$post_id = isset( $current_page['id'] ) ? intval( $current_page['id'] ) : $post->ID;\n\n\t\t// Set current post as global $post\n\t\t$post = get_post( $post_id );\n\n\t\t// Get next post\n\t\t$next_post = get_next_post( $in_same_term, '', $args['taxonomy_name'] );\n\n\t\t$next = new stdClass();\n\n\t\tif ( null !== $next_post ) {\n\n\t\t\t$next_title = isset($next_post->post_title) ? esc_html( $next_post->post_title ) : esc_html__( 'Next Post' );\n\n\t\t\t$next_date = mysql2date( get_option( 'date_format' ), $next_post->post_date );\n\t\t\t$next_permalink = isset($next_post->ID) ? esc_url( get_the_permalink( $next_post->ID ) ) : '';\n\n\t\t\t$next_processed_title = '' === $args['next_text'] ? '%title' : $args['next_text'];\n\n\t\t\t// process Wordpress' wildcards\n\t\t\t$next_processed_title = str_replace( '%title', $next_title, $next_processed_title );\n\t\t\t$next_processed_title = str_replace( '%date', $next_date, $next_processed_title );\n\t\t\t$next_processed_title = str_replace( '%link', $next_permalink, $next_processed_title );\n\n\t\t\t$next = array(\n\t\t\t\t'title' => $next_processed_title,\n\t\t\t\t'id' => isset($next_post->ID) ? intval( $next_post->ID ) : '',\n\t\t\t\t'permalink' => $next_permalink,\n\t\t\t);\n\t\t}\n\n\t\t// Get prev post\n\t\t$prev_post = get_previous_post( $in_same_term, '', $args['taxonomy_name'] );\n\n\t\t$prev = new stdClass();\n\n\t\tif ( null !== $prev_post ) {\n\n\t\t\t$prev_title = isset($prev_post->post_title) ? esc_html( $prev_post->post_title ) : esc_html__( 'Previous Post' );\n\n\t\t\t$prev_date = mysql2date( get_option( 'date_format' ), $prev_post->post_date );\n\n\t\t\t$prev_permalink = isset($prev_post->ID) ? esc_url( get_the_permalink( $prev_post->ID ) ) : '';\n\n\t\t\t$prev_processed_title = '' === $args['prev_text'] ? '%title' : $args['prev_text'];\n\n\t\t\t// process Wordpress' wildcards\n\t\t\t$prev_processed_title = str_replace( '%title', $prev_title, $prev_processed_title );\n\t\t\t$prev_processed_title = str_replace( '%date', $prev_date, $prev_processed_title );\n\t\t\t$prev_processed_title = str_replace( '%link', $prev_permalink, $prev_processed_title );\n\n\t\t\t$prev = array(\n\t\t\t\t'title' => $prev_processed_title,\n\t\t\t\t'id' => isset($prev_post->ID) ? intval( $prev_post->ID ) : '',\n\t\t\t\t'permalink' => $prev_permalink,\n\t\t\t);\n\t\t}\n\n\t\t// Formatting returned value\n\t\t$posts_navigation = array(\n\t\t\t'next' => $next,\n\t\t\t'prev' => $prev,\n\t\t);\n\n\t\treturn $posts_navigation;\n\t}", "function folia_paging_nav() {\n\t// Don't print empty markup if there's only one page.\n\tif ( $GLOBALS['wp_query']->max_num_pages < 2 ) {\n\t\treturn;\n\t}\n\t?>\n\t<nav class=\"navigation paging-navigation clear\" role=\"navigation\">\n\t\t<h1 class=\"screen-reader-text\"><?php _e( 'Posts navigation', 'folia' ); ?></h1>\n\t\t<div class=\"nav-links\">\n\n\t\t\t<?php if ( get_next_posts_link() ) : ?>\n\t\t\t<div class=\"nav-previous\"><?php next_posts_link( __( '<span class=\"meta-nav\">&larr;</span> Older posts', 'folia' ) ); ?></div>\n\t\t\t<?php endif; ?>\n\n\t\t\t<?php if ( get_previous_posts_link() ) : ?>\n\t\t\t<div class=\"nav-next\"><?php previous_posts_link( __( 'Newer posts <span class=\"meta-nav\">&rarr;</span>', 'folia' ) ); ?></div>\n\t\t\t<?php endif; ?>\n\n\t\t</div><!-- .nav-links -->\n\t</nav><!-- .navigation -->\n\t<?php\n}", "function render_next($anchor=true)\n {\n global $PHP_SELF;\n\n if ($anchor) \n {\n ?>\n <a href=\"<?php echo $PHP_SELF,'?',$this->getString,$this->id,'_next_page=',$this->rs->AbsolutePage() + 1 ?>\"><?php echo $this->next;?></a> &nbsp; \n <?php\n } \n else \n {\n print \"$this->next &nbsp; \";\n }\n }", "function gengo_next_posts_link($label = '&laquo; Older Entries', $max_page = 0) {\r\n\tglobal $gengo, $paged, $max_num_pages, $result, $request, $posts_per_page, $wpdb, $wp_query;\r\n\tif ( !$max_page ) {\r\n\t\t$max_page = $wp_query->max_num_pages;\r\n\t}\r\n\tif (!$paged) $paged = 1;\r\n\t(int) $nextpage = intval($paged) + 1;\r\n#\techo $max_page;#.\"/\".$paged;\r\n\tif (!is_single() && ($nextpage <= $max_page)) {\r\n\t\t$link = get_pagenum_link($nextpage);\r\n\t\tforeach ($gengo->language_preference_id as $id) $string .= ($string) ? GENGO_LANGUAGE_DIVIDER . $gengo->languages[$id]->code : $gengo->languages[$id]->code;\r\n\t\tif ($gengo->language_preference) $link = str_replace(\"/$string/page/$nextpage/\", \"/page/$nextpage/$string/\", $link);\r\n\t\techo '<a href=\"' . $link . '\">' . preg_replace('/&([^#])(?![a-z]{1,8};)/', '&#038;$1', $label) . '</a>';\r\n\t}\r\n}", "function next_posts_link($label = \\null, $max_page = 0)\n{\n}", "function kt_paging_nav() {\r\n\tglobal $wp_query, $wp_rewrite;\r\n // Don't print empty markup if there's only one page.\r\n\tif ( $wp_query->max_num_pages < 2 ) {\r\n\t\treturn;\r\n\t}\r\n \r\n echo get_the_posts_pagination( array(\r\n 'prev_text' => sprintf( '<i class=\"fa fa-angle-double-left\"></i> %1$s', esc_attr__( 'Previous', 'kutetheme' ) ),\r\n 'next_text' => sprintf( '%1$s <i class=\"fa fa-angle-double-right\"></i>', esc_attr__( 'Next', 'kutetheme' ) ),\r\n 'screen_reader_text' => '&nbsp;',\r\n 'before_page_number' => '',\r\n ) );\r\n \r\n}", "function page_navi($before = '', $after = '') {\n global $wpdb, $wp_query;\n $request = $wp_query->request;\n $posts_per_page = intval(get_query_var('posts_per_page'));\n $paged = intval(get_query_var('paged'));\n $numposts = $wp_query->found_posts;\n $max_page = $wp_query->max_num_pages;\n if ( $numposts <= $posts_per_page ) { return; }\n if(empty($paged) || $paged == 0) {\n $paged = 1;\n }\n $pages_to_show = 7;\n $pages_to_show_minus_1 = $pages_to_show-1;\n $half_page_start = floor($pages_to_show_minus_1/2);\n $half_page_end = ceil($pages_to_show_minus_1/2);\n $start_page = $paged - $half_page_start;\n if($start_page <= 0) {\n $start_page = 1;\n }\n $end_page = $paged + $half_page_end;\n if(($end_page - $start_page) != $pages_to_show_minus_1) {\n $end_page = $start_page + $pages_to_show_minus_1;\n }\n if($end_page > $max_page) {\n $start_page = $max_page - $pages_to_show_minus_1;\n $end_page = $max_page;\n }\n if($start_page <= 0) {\n $start_page = 1;\n }\n\n echo $before.'<ul class=\"pagination\">'.\"\";\n if ($paged > 1) {\n $first_page_text = '<i class=\"fa fa-angle-double-left\"></i>';\n echo '<li class=\"prev\"><a href=\"'.get_pagenum_link().'\" title=\"First\">'.$first_page_text.'</a></li>';\n }\n\n $prevposts = get_previous_posts_link('<i class=\"fa fa-angle-left\"></i>');\n if($prevposts) { echo '<li>' . $prevposts . '</li>'; }\n else { echo '<li class=\"disabled\"><a href=\"#\"><i class=\"fa fa-angle-double-left\"></i></a></li>'; }\n\n for($i = $start_page; $i <= $end_page; $i++) {\n if($i == $paged) {\n echo '<li class=\"active\"><a href=\"#\">'.$i.'</a></li>';\n } else {\n echo '<li><a href=\"'.get_pagenum_link($i).'\">'.$i.'</a></li>';\n }\n }\n echo '<li class=\"\">';\n next_posts_link('<i class=\"fa fa-angle-right\"></i>');\n echo '</li>';\n if ($end_page < $max_page) {\n $last_page_text = '<i class=\"fa fa-angle-double-right\"></i>';\n echo '<li class=\"next\"><a href=\"'.get_pagenum_link($max_page).'\" title=\"Last\">'.$last_page_text.'</a></li>';\n }\n echo '</ul>'.$after.\"\";\n}", "function theme_numeric_posts_nav() {\n\n\tif( is_singular() )\n\t\treturn;\n\n\tglobal $wp_query;\n\n\t/** Stop execution if there's only 1 page */\n\tif( $wp_query->max_num_pages <= 1 )\n\t\treturn;\n\n\t$paged = get_query_var( 'paged' ) ? absint( get_query_var( 'paged' ) ) : 1;\n\t$max = intval( $wp_query->max_num_pages );\n\n\t/**\tAdd current page to the array */\n\tif ( $paged >= 1 )\n\t\t$links[] = $paged;\n\n\t/**\tAdd the pages around the current page to the array */\n\tif ( $paged >= 3 ) {\n\t\t$links[] = $paged - 1;\n\t\t$links[] = $paged - 2;\n\t}\n\n\tif ( ( $paged + 2 ) <= $max ) {\n\t\t$links[] = $paged + 2;\n\t\t$links[] = $paged + 1;\n\t}\n\n\techo '<div class=\"archive-navigation\"><ul>' . \"\\n\";\n\n\t/**\tPrevious Post Link */\n\tif ( get_previous_posts_link() )\n\t\tprintf( '<li>%s</li>' . \"\\n\", get_previous_posts_link() );\n\n\t/**\tLink to first page, plus ellipses if necessary */\n\tif ( ! in_array( 1, $links ) ) {\n\t\t$class = 1 == $paged ? ' class=\"active\"' : '';\n\n\t\tprintf( '<li%s><a href=\"%s\">%s</a></li>' . \"\\n\", $class, esc_url( get_pagenum_link( 1 ) ), '1' );\n\n\t\tif ( ! in_array( 2, $links ) )\n\t\t\techo '<li>…</li>';\n\t}\n\n\t/**\tLink to current page, plus 2 pages in either direction if necessary */\n\tsort( $links );\n\tforeach ( (array) $links as $link ) {\n\t\t$class = $paged == $link ? ' class=\"active\"' : '';\n\t\tprintf( '<li%s><a href=\"%s\">%s</a></li>' . \"\\n\", $class, esc_url( get_pagenum_link( $link ) ), $link );\n\t}\n\n\t/**\tLink to last page, plus ellipses if necessary */\n\tif ( ! in_array( $max, $links ) ) {\n\t\tif ( ! in_array( $max - 1, $links ) )\n\t\t\techo '<li>…</li>' . \"\\n\";\n\n\t\t$class = $paged == $max ? ' class=\"active\"' : '';\n\t\tprintf( '<li%s><a href=\"%s\">%s</a></li>' . \"\\n\", $class, esc_url( get_pagenum_link( $max ) ), $max );\n\t}\n\n\t/**\tNext Post Link */\n\tif ( get_next_posts_link() )\n\t\tprintf( '<li>%s</li>' . \"\\n\", get_next_posts_link() );\n\n\techo '</ul></div>' . \"\\n\";\n\n}", "public function next_post_link( $output ) {\n\n\t\tif ( ! $output ) {\n\t\t\t$output = '<div class=\"nav-next wpex-disabled\"><span><i class=\"fa fa-chevron-left\"></i>'. __( 'Previous Article', 'chic' ) .'</span></div>';\n\t\t}\n\n\t\treturn $output;\n\n\t}", "function mantra_content_nav( $nav_id ) {\n\tglobal $wp_query;\n\n\tif ( $wp_query->max_num_pages > 1 ) : ?>\n\t\t<nav id=\"<?php echo $nav_id; ?>\" class=\"navigation\">\n\t\t\t<div class=\"nav-previous\"><?php next_posts_link( __( '<span class=\"meta-nav\">&laquo;</span> Older posts', 'mantra' ) ); ?></div>\n\t\t\t<div class=\"nav-next\"><?php previous_posts_link( __( 'Newer posts <span class=\"meta-nav\">&raquo;</span>', 'mantra' ) ); ?></div>\n\t\t</nav><!-- #nav-above -->\n\t<?php endif;\n}", "function exhibit_builder_link_to_next_page_custom($text = null, $props = array(), $exhibitPage = null)\n{\n if (!$exhibitPage) {\n $exhibitPage = get_current_record('exhibit_page');\n }\n\n $exhibit = get_record_by_id('Exhibit', $exhibitPage->exhibit_id);\n\n $targetPage = null;\n\n // if page object exists, grab link to the first child page if exists. If it doesn't, grab\n // a link to the next page\n $targetPage = $exhibitPage->firstChildOrNext();\n if ($targetPage) {\n if (!isset($props['class'])) {\n $props['class'] = 'next-page';\n }\n if ($text === null) {\n $text = metadata($targetPage, 'title') . '<div id=\"next-item-icon\" class=\"material-icons\">keyboard_arrow_right</div>';\n }\n return exhibit_builder_link_to_exhibit($exhibit, $text, $props, $targetPage);\n }\n\n return null;\n}", "function dokanee_paging_nav() {\n\t\t_deprecated_function( __FUNCTION__, '1.3.45', \"the_posts_navigation()\" );\n\t\tif ( function_exists( 'the_posts_pagination' ) ) {\n\t\t\tthe_posts_pagination( array(\n\t\t\t\t'mid_size' => apply_filters( 'dokanee_pagination_mid_size', 1 ),\n\t\t\t\t'prev_text' => __( '&larr; Previous', 'dokanee' ),\n\t\t\t\t'next_text' => __( 'Next &rarr;', 'dokanee' )\n\t\t\t) );\n\t\t}\n\t}", "function get_next_posts_link($label = \\null, $max_page = 0)\n{\n}", "function sunset_post_navigation(){\r\n $nav='<div class=\"row\">';\r\n\r\n $prev= get_previous_post_link( '<div class=\"post-link-nav\"> <span class=\" dashicons dashicons-arrow-left-alt2\"></span>%link</div>', '%title');\r\n $next= get_next_post_link ('<div class=\"post-link-nav\">%link <span class=\" dashicons dashicons-arrow-right-alt2\"></span></div>', '%title');\r\n $nav.='<div class=\"col-xs-12 col-sm-6\">'.$prev.'</div>';\r\n $nav.='<div class=\"col-xs-12 col-sm-6 text-right\">'.$next.'</div>';\r\n $nav.='</div>';\r\n return $nav;\r\n\r\n}", "function themamastore_continue_reading_link() {\n\treturn ' <a href=\"'. get_permalink() . '\">' . __( 'Continue reading <span class=\"meta-nav\">&rarr;</span>', 'themamastore' ) . '</a>';\n}", "function next_posts_url() {\n // grab next posts object\n $next = \\WPS::next_posts_link('');\n if ( ! $next) return false;\n return $next->url;\n}", "function front_pager_next($variables) {\n $text = $variables['text'];\n $element = $variables['element'];\n $interval = $variables['interval'];\n $parameters = $variables['parameters'];\n global $pager_page_array, $pager_total;\n $pager_type = empty($variables['pager_type']) ? NULL : $variables['pager_type'];\n $output = '';\n\n // If we are anywhere but the last page\n if ($pager_page_array[$element] < ($pager_total[$element] - 1)) {\n $page_new = pager_load_array($pager_page_array[$element] + $interval, $element, $pager_page_array);\n // If the next page is the last page, mark the link as such.\n if (!empty($pager_type)) {\n $output = theme('pager_link', array('next_le_pager_links' => TRUE, 'text' => $text, 'page_new' => $page_new, 'element' => $element, 'parameters' => $parameters));\n }\n else {\n if ($page_new[$element] == ($pager_total[$element] - 1)) {\n $output = theme('pager_last', array('text' => $text, 'element' => $element, 'parameters' => $parameters));\n }\n // The next page is not the last page.\n else {\n $output = theme('pager_link', array('text' => $text, 'page_new' => $page_new, 'element' => $element, 'parameters' => $parameters));\n }\n }\n }\n\n return $output;\n}", "function pagi_nav() {\n\n\tif( is_singular() )\n\t\treturn;\n\n\tglobal $wp_query;\n\n\t/** Stop execution if there's only 1 page */\n\tif( $wp_query->max_num_pages <= 1 )\n\t\treturn;\n\n\t$paged = get_query_var( 'paged' ) ? absint( get_query_var( 'paged' ) ) : 1;\n\t$max = intval( $wp_query->max_num_pages );\n\n\t/**\tAdd current page to the array */\n\tif ( $paged >= 1 )\n\t\t$links[] = $paged;\n\n\t/**\tAdd the pages around the current page to the array */\n\tif ( $paged >= 3 ) {\n\t\t$links[] = $paged - 1;\n\t\t$links[] = $paged - 2;\n\t}\n\n\tif ( ( $paged + 2 ) <= $max ) {\n\t\t$links[] = $paged + 2;\n\t\t$links[] = $paged + 1;\n\t}\n\n\techo '<div class=\"pavigation\"><ul>' . \"\\n\";\n\n\t/**\tPrevious Post Link */\n\tif ( get_previous_posts_link() )\n\t\tprintf( '<li>%s</li>' . \"\\n\", get_previous_posts_link() );\n\n\t/**\tLink to first page, plus ellipses if necessary */\n\tif ( ! in_array( 1, $links ) ) {\n\t\t$class = 1 == $paged ? ' class=\"active\"' : '';\n\n\t\tprintf( '<li%s><a href=\"%s\">%s</a></li>' . \"\\n\", $class, esc_url( get_pagenum_link( 1 ) ), '1' );\n\n\t\tif ( ! in_array( 2, $links ) )\n\t\t\techo '<li>…</li>';\n\t}\n\n\t/**\tLink to current page, plus 2 pages in either direction if necessary */\n\tsort( $links );\n\tforeach ( (array) $links as $link ) {\n\t\t$class = $paged == $link ? ' class=\"active\"' : '';\n\t\tprintf( '<li%s><a href=\"%s\">%s</a></li>' . \"\\n\", $class, esc_url( get_pagenum_link( $link ) ), $link );\n\t}\n\n\t/**\tLink to last page, plus ellipses if necessary */\n\tif ( ! in_array( $max, $links ) ) {\n\t\tif ( ! in_array( $max - 1, $links ) )\n\t\t\techo '<li>…</li>' . \"\\n\";\n\n\t\t$class = $paged == $max ? ' class=\"active\"' : '';\n\t\tprintf( '<li%s><a href=\"%s\">%s</a></li>' . \"\\n\", $class, esc_url( get_pagenum_link( $max ) ), $max );\n\t}\n\n\t/**\tNext Post Link */\n\tif ( get_next_posts_link() )\n\t\tprintf( '<li>%s</li>' . \"\\n\", get_next_posts_link() );\n\n\techo '</ul></div>' . \"\\n\";\n\n}", "function ortext_paging_nav() {\n\tif ( $GLOBALS['wp_query']->max_num_pages < 2 ) {return;}\n\t?>\n\t<nav class=\"navigation paging-navigation\" role=\"navigation\">\n\t\t<h1 class=\"screen-reader-text\"><?php _e( 'Posts navigation', 'ortext' ); ?></h1>\n\t\t<div class=\"nav-links\">\n\t\t\t<?php if ( get_next_posts_link() ) : ?>\n\t\t\t\t<div class=\"nav-previous\"><?php next_posts_link( __( 'More<span class=\"meta-nav\">&rarr;</span>', 'ortext' ) ); ?></div>\t\n\t\t\t<?php endif; ?>\n\t\t\t\n\t\t\t<?php if ( get_previous_posts_link() ) : ?>\n\t\t\t\t<div class=\"nav-next\"><?php previous_posts_link( __( '<span class=\"meta-nav\">&larr;</span>Prior', 'ortext' ) ); ?></div>\n\t\t\t<?php endif; ?>\n\t\t</div><!-- .nav-links -->\n\t</nav><!-- .navigation -->\n\t<?php\n}", "function lt_adjacent_post_link($format, $link, $in_same_cat = false, $link_title = '', $excluded_categories = '', $previous = true) {\n if ( $previous && is_attachment() )\n $post = & get_post($GLOBALS['post']->post_parent);\n else\n $post = get_adjacent_post($in_same_cat, $excluded_categories, $previous);\n\n if ( !$post ){\n // return;\n $string = '';\n $link = '<span>'.__('None', 'ospring').'</span>';\n $format = str_replace('%link', $link, $format);\n $adjacent = $previous ? __('Prev', 'ospring') : __('Next', 'ospring');\n echo apply_filters( \"{$adjacent}_post_link\", $format, $link );\n return;\n }\n\n $title = $post->post_title;\n\n if ( empty($post->post_title) )\n $title = $previous ? __('Previous Post', 'ospring') : __('Next Post', 'ospring');\n\n $title = apply_filters('the_title', $title, $post->ID);\n $date = mysql2date(get_option('date_format'), $post->post_date);\n $rel = $previous ? __('Next', 'ospring') : __('Prev', 'ospring');\n $rel = $rel ? $rel : '<span>'.__('None', 'ospring').'</span>';\n\n //$string = '<a href=\"'.get_permalink($post).'\" title=\"'.$link.'\" rel=\"'.$rel.'\">';\n $link = str_replace('%title', $title, $link);\n $link = str_replace('%date', $date, $link);\n $string = '<a href=\"'.get_permalink($post).'\" title=\"'.$link.'\" rel=\"'.$rel.'\">';\n $link = $string . $rel. '</a>';\n $format = str_replace('%link', $link, $format);\n\n $adjacent = $previous ? __('Prev', 'ospring') : __('Next', 'ospring');\n echo apply_filters( \"{$adjacent}_post_link\", $format, $link );\n}", "function ollomedia_continue_reading_link() {\n\treturn ' <a href=\"'. get_permalink() . '\">' . __( 'Continue reading <span class=\"meta-nav\">&rarr;</span>', 'ollomedia' ) . '</a>';\n}", "public function next()\n\t{\n\t\t$attributes = array('class' => 'next');\n\n\t\tif($this->total < 2 OR $this->current < $this->total)\n\t\t{\n\t\t\t$attributes = array('class' => 'disabled next');\n\t\t}\n\n\t\treturn HTML::tag('li', HTML::link($this->url($this->current+1), _('Next &rarr;')), $attributes);\n\t}", "function _mbbasetheme_paging_nav() {\n\t// Don't print empty markup if there's only one page.\n\tif ( $GLOBALS['wp_query']->max_num_pages < 2 ) {\n\t\treturn;\n\t}\n\t?>\n\t<nav class=\"navigation paging-navigation\" role=\"navigation\">\n\t\t<h1 class=\"screen-reader-text\"><?php _e( 'Posts navigation', '_mbbasetheme' ); ?></h1>\n\t\t<div class=\"nav-links\">\n\n\t\t\t<?php if ( get_next_posts_link() ) : ?>\n\t\t\t<div class=\"nav-previous\"><?php next_posts_link( __( '<span class=\"meta-nav\">&larr;</span> Older posts', '_mbbasetheme' ) ); ?></div>\n\t\t\t<?php endif; ?>\n\n\t\t\t<?php if ( get_previous_posts_link() ) : ?>\n\t\t\t<div class=\"nav-next\"><?php previous_posts_link( __( 'Newer posts <span class=\"meta-nav\">&rarr;</span>', '_mbbasetheme' ) ); ?></div>\n\t\t\t<?php endif; ?>\n\n\t\t</div><!-- .nav-links -->\n\t</nav><!-- .navigation -->\n\t<?php\n}", "function get_next_posts_page_link($max_page = 0)\n{\n}", "function pineapple_pagination(){\n\t//if looking at a single page or post\n\tif( is_singular() ){\n\t\tprevious_post_link( '%link', '&larr; %title' );\n\t\tnext_post_link( '%link', '%title &rarr;' );\t\t\n\t}else{\n\t\t//archive pagination\n\t\tif( wp_is_mobile() ){\n\t\t\t//mobile (prev/next buttons)\n\t\t\tprevious_posts_link();\n\t\t\tnext_posts_link();\n\t\t}else{\n\t\t\t//desktop (numbered pagination)\n\t\t\tthe_posts_pagination(array(\n\t\t\t\t'prev_text' => '&larr; Previous',\n\t\t\t\t'next_text' => 'Next Page &rarr;',\n\t\t\t\t'mid_size'\t=> 10,\n\t\t\t));\n\t\t}\t\t\n\t}\n}", "function show_posts_nav() {\n \tglobal $wp_query;\n \treturn ($wp_query->max_num_pages > 1);\n }", "function zp_printNextPrevAlbumLinkFirstImage() {\n\tif (getPrevAlbum() || getNextAlbum()) {\n\t\techo '<div id=\"albumnav\">';\n\t\tif (getPrevAlbum()) {\n\t\t\t$prevalbum = getPrevAlbum();\n\t\t\tif($prevalbum->getNumImages() != 0) {\n\t\t\t\t$firstimg = $prevalbum->getImage(0);\n\t\t\t\t$firstimage = urlencode($firstimg->filename);\n\t\t\t} else {\n\t\t\t\t$firstimage = '';\n\t\t\t}\n\t\t\techo \"<a id='prevalbum' href='\".WEBPATH.\"/\".pathurlencode($prevalbum->name).\"/\".$firstimage.\".php' title='\".$prevalbum->getTitle().\"'>&laquo; <strong>\".$prevalbum->getTitle().\"</strong> (previous)</a> \";\n\t\t}\n\t\tif (getNextAlbum()) {\n\t\t\t$nextalbum = getNextAlbum();\n\t\t\tif($nextalbum->getNumImages() != 0) {\n\t\t\t\t$firstimg = $nextalbum->getImage(0);\n\t\t\t\t$firstimage = urlencode($firstimg->filename);\n\t\t\t} else {\n\t\t\t\t$firstimage = '';\n\t\t\t}\n\t\t\techo \" <a id='nextalbum' href='\".WEBPATH.\"/\".pathurlencode($nextalbum->name).\"/\".$firstimage.\".php' title='\".$nextalbum->getTitle().\"'><strong>\".$nextalbum->getTitle().\"</strong> (next) &raquo;</a>\";\n\t\t}\n\t\techo '</div>';\n\t}\n}", "function page_navi($before = '', $after = '') {\n\tglobal $wpdb, $wp_query;\n\t$request = $wp_query->request;\n\t$posts_per_page = intval(get_query_var('posts_per_page'));\n\t$paged = intval(get_query_var('paged'));\n\t$numposts = $wp_query->found_posts;\n\t$max_page = $wp_query->max_num_pages;\n\tif ( $numposts <= $posts_per_page ) { return; }\n\tif(empty($paged) || $paged == 0) {\n\t\t$paged = 1;\n\t}\n\t$pages_to_show = 7;\n\t$pages_to_show_minus_1 = $pages_to_show-1;\n\t$half_page_start = floor($pages_to_show_minus_1/2);\n\t$half_page_end = ceil($pages_to_show_minus_1/2);\n\t$start_page = $paged - $half_page_start;\n\tif($start_page <= 0) {\n\t\t$start_page = 1;\n\t}\n\t$end_page = $paged + $half_page_end;\n\tif(($end_page - $start_page) != $pages_to_show_minus_1) {\n\t\t$end_page = $start_page + $pages_to_show_minus_1;\n\t}\n\tif($end_page > $max_page) {\n\t\t$start_page = $max_page - $pages_to_show_minus_1;\n\t\t$end_page = $max_page;\n\t}\n\tif($start_page <= 0) {\n\t\t$start_page = 1;\n\t}\n\t\t\n\techo $before.'<div class=\"pagination\"><ul class=\"clearfix\">'.\"\";\n\tif ($paged > 1) {\n\t\t$first_page_text = \"«\";\n\t\techo '<li class=\"prev\"><a href=\"'.get_pagenum_link().'\" title=\"First\">'.$first_page_text.'</a></li>';\n\t}\n\t\t\n\t$prevposts = get_previous_posts_link('← Previous');\n\tif($prevposts) { echo '<li>' . $prevposts . '</li>'; }\n\telse { echo '<li class=\"disabled\"><a href=\"#\">← Previous</a></li>'; }\n\t\n\tfor($i = $start_page; $i <= $end_page; $i++) {\n\t\tif($i == $paged) {\n\t\t\techo '<li class=\"active\"><a href=\"#\">'.$i.'</a></li>';\n\t\t} else {\n\t\t\techo '<li><a href=\"'.get_pagenum_link($i).'\">'.$i.'</a></li>';\n\t\t}\n\t}\n\techo '<li class=\"\">';\n\tnext_posts_link('Next →');\n\techo '</li>';\n\tif ($end_page < $max_page) {\n\t\t$last_page_text = \"»\";\n\t\techo '<li class=\"next\"><a href=\"'.get_pagenum_link($max_page).'\" title=\"Last\">'.$last_page_text.'</a></li>';\n\t}\n\techo '</ul></div>'.$after.\"\";\n}", "function hcode_single_portfolio_navigation() {\n $hcode_options = get_option( 'hcode_theme_setting' );\n $hcode_no_image = (isset($hcode_options['hcode_no_image'])) ? $hcode_options['hcode_no_image'] : '';\n\n if( isset( $hcode_no_image['url'] ) ) {\n $image_thumb = $hcode_no_image['url'];\n } else {\n $image_thumb = array();\n }\n\n $link = $cat_name = $next_image = $prev_image = $thumb_icon = $thumb_icon_next = '';\n\n $terms = get_the_terms( get_the_ID() , 'portfolio-category' );\n \n if( empty($terms) ) {\n return;\n }\n\n $args = array( \n 'post_type' => 'portfolio',\n 'posts_per_page' => -1,\n 'tax_query' => array(\n array(\n 'taxonomy' => 'portfolio-category',\n 'terms' => array($terms[0]->term_id),\n 'field' => 'term_id',\n 'operator' => 'IN',\n ),\n ),\n 'meta_query' => array(\n array(\n 'key' => 'hcode_link_type_single',\n 'value' => 'ajax-popup',\n 'compare' => '!=',\n )\n )\n );\n $posts = get_posts( $args );\n \n $ids = array();\n foreach ( $posts as $thepost ) {\n $ids[] = $thepost->ID;\n }\n //print_r($ids);\n // get and echo previous and next post in the same category\n $thisindex = array_search( get_the_ID(), $ids );\n if(($thisindex - 1) < 0)\n {\n $previd = '';\n }else{\n $previd = $ids[ $thisindex - 1 ];\n }\n if( ($thisindex + 1 ) > count($ids)-1)\n {\n $nextid = '';\n }else{\n $nextid = $ids[ $thisindex + 1 ];\n }\n\n if( $terms ){\n $link = get_term_link($terms[0]->slug,'portfolio-category');\n $cat_name = get_term_link($terms[0]->name,'portfolio-category');\n }\n if ( $previd && has_post_thumbnail( $previd ) ) {\n $prevthumb = wp_get_attachment_image_src( get_post_thumbnail_id( $previd ), 'full' );\n if($prevthumb[0]):\n $prev_image = $prevthumb[0];\n else:\n if( isset( $image_thumb ) && esc_url( $image_thumb ) ){\n $prev_image = $image_thumb;\n }else{\n $prev_image = HCODE_THEME_ASSETS_URI . '/images/no-image-133x83.jpg';\n }\n endif;\n }else{\n if( isset( $image_thumb ) && esc_url( $image_thumb ) ){\n $prev_image = $image_thumb;\n }else{\n $prev_image = HCODE_THEME_ASSETS_URI . '/images/no-image-133x83.jpg';\n }\n }\n\n if ( $nextid && has_post_thumbnail( $nextid ) ) {\n $nextthumb = wp_get_attachment_image_src( get_post_thumbnail_id( $nextid ), 'full' );\n if($nextthumb[0]):\n $next_image = $nextthumb[0];\n else:\n if( isset( $image_thumb ) && esc_url( $image_thumb ) ){\n $next_image = $image_thumb;\n }else{\n $next_image = HCODE_THEME_ASSETS_URI . '/images/no-image-133x83.jpg';\n }\n endif;\n }else{\n if( isset( $image_thumb ) && esc_url( $image_thumb ) ){\n $next_image = $image_thumb;\n }else{\n $next_image = HCODE_THEME_ASSETS_URI . '/images/no-image-133x83.jpg';\n }\n }\n\n $image_id = hcode_get_attachment_id_from_url( $prev_image );\n $navigation_image_srcset = !empty($hcode_options['portfolio_navigation_image_srcset']) ? $hcode_options['portfolio_navigation_image_srcset'] : 'full';\n if( $image_id ){\n $thumb_icon = wp_get_attachment_image_src($image_id, $navigation_image_srcset);\n\n $srcset_prev = $srcset_data_prev = $sizes_prev = $sizes_data_prev = '';\n $srcset_prev = wp_get_attachment_image_srcset( $image_id, $navigation_image_srcset );\n if( $srcset_prev ){\n $srcset_data_prev = ' srcset=\"'.esc_attr( $srcset_prev ).'\"';\n }\n\n $sizes_prev = wp_get_attachment_image_sizes( $image_id, $navigation_image_srcset );\n if( $sizes_prev ){\n $sizes_data_prev = ' sizes=\"'.esc_attr( $sizes_prev ).'\"';\n }\n\n $prev_thumb = $thumb_icon[0];\n }else{\n $prev_thumb = $prev_image;\n }\n\n $next_image_id = hcode_get_attachment_id_from_url( $next_image );\n \n $navigation_image_srcset = !empty($hcode_options['portfolio_navigation_image_srcset']) ? $hcode_options['portfolio_navigation_image_srcset'] : 'full';\n if( $next_image_id ){\n $thumb_icon_next = wp_get_attachment_image_src($next_image_id, $navigation_image_srcset);\n\n $srcset_next = $srcset_data_next = $sizes_next = $sizes_data_next = '';\n $srcset_next = wp_get_attachment_image_srcset( $next_image_id, $navigation_image_srcset );\n if( $srcset_next ){\n $srcset_data_next = ' srcset=\"'.esc_attr( $srcset_next ).'\"';\n }\n\n $sizes_next = wp_get_attachment_image_sizes( $next_image_id, $navigation_image_srcset );\n if( $sizes_next ){\n $sizes_data_next = ' sizes=\"'.esc_attr( $sizes_next ).'\"';\n }\n\n $next_thumb = $thumb_icon_next[0];\n }else{\n $next_thumb = $next_image;\n }\n ?>\n <?php\n $related_portfolio_style = hcode_option( 'enable_navigation_portfolio_style' );\n if( $related_portfolio_style == 'normal' ){ ?>\n <div class=\"next-previous-project-style2\" role=\"navigation\">\n <!-- next-previous post -->\n <div class=\"previous-link\">\n <?php if ( ! empty( $previd) ) {?>\n \n <?php echo '<a rel=\"prev\" href=\"'.get_permalink($previd).'\"><i class=\"fa fa-angle-left\"></i>&nbsp;<span>'.__(\"Previous Project\", \"H-Code\").'</span></a>'; ?>\n \n <?php } ?>\n </div>\n <div class=\"back-to-category\">\n <a href=\"<?php echo $link;?>\" class=\"border-right text-uppercase back-project\">\n <i class=\"fa fa-th-large\"></i>\n </a>\n </div>\n <div class=\"next-link\">\n <?php if ( ! empty( $nextid ) ) { ?>\n <?php\n echo '<a rel=\"next\" href=\"'.get_permalink($nextid).'\"><span>'.__(\"Next Project\", \"H-Code\").'</span>&nbsp;<i class=\"fa fa-angle-right\"></i></a>';\n ?>\n <?php } ?>\n </div>\n <!-- end next-previous post -->\n </div>\n <?php }\n elseif($related_portfolio_style == 'modern'){ ?>\n <div class=\"next-previous-project xs-display-none\">\n <?php if ( ! empty( $nextid ) ) { ?>\n <div class=\"next-project\">\n <?php\n echo '<a rel=\"next\" href=\"'.get_permalink($nextid).'\"><img alt=\"'.__(\"Next Project\", \"H-Code\").'\" class=\"next-project-img\" src=\"'.HCODE_THEME_ASSETS_URI.'/images/next-project.png\" width=\"33\" height=\"83\"><span>'.esc_html__( 'Next Project','H-Code').'</span><!-- next project image --><img alt=\"Next Project\" src=\"'.$next_thumb.'\"'.$srcset_data_next.$sizes_data_next.'></a>';\n ?>\n </div>\n <?php } if ( ! empty( $previd) ) {?>\n <div class=\"previous-project\">\n <?php echo '<a rel=\"prev\" href=\"'.get_permalink($previd).'\"><img alt=\"'.__(\"Previous Project\", \"H-Code\").'\" src=\"'.$prev_thumb.'\"'.$srcset_data_prev.$sizes_data_prev.'><img alt=\"Previous Project\" class=\"previous-project-img\" src=\"'.HCODE_THEME_ASSETS_URI.'/images/previous-project.png\" width=\"33\" height=\"83\"><span>'.esc_html__( 'Previous Project','H-Code').'</span></a>'; ?>\n </div>\n <?php } ?>\n </div>\n <?php }?>\n <?php\n }", "public function ui_page_navigator()\n\t\t\t{\n\t\t\t\t/* add navigation if set */\n\t\t\t\tif( (isset( $this->pagenav ) || count( $this->pagenav )))\n\t\t\t\t{\n\t\t\t\t\t/**\n\t\t\t\t\t * [1] - Let convert an associative array into the ordinary array.\n\t\t\t\t\t * This is to make sure that we can index the array in numbers\n\t\t\t\t\t */\n\t\t\t\t\t$i = 0;\n\n\t\t\t\t\t// initiate numberedArray \n\t\t\t\t\t$numberedArray = array();\n\t\t\t\t\twhile( list($label, $url) = each($this->pagenav) ){\n\t\t\t\t\t\t// add page details to the array\n\t\t\t\t\t\t$numberedArray[$i] = array($url, $label);\n\n\t\t\t\t\t\t// increment 'i'\n\t\t\t\t\t\t$i++;\n\t\t\t\t\t}\n\n\t\t\t\t\t/**\n\t\t\t\t\t * [2] - Find 'next' page and the 'prev' page\n\t\t\t\t\t */\n\t\t\t\t\t$pagecount = count( $numberedArray );\n\n\t\t\t\t\t// find next and the prev url\n\t\t\t\t\t$prev = $next = false;\n\t\t\t\t\tfor($i = 0; $i < $pagecount; $i++)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Retrieve each detail of the page, url and label\n\t\t\t\t\t\t$c_url = $numberedArray[$i][0];\n\t\t\t\t\t\t$c_label = $numberedArray[$i][1];\n\n\t\t\t\t\t\t// If the current url matches the current \n\t\t\t\t\t\t// iterated url\n\t\t\t\t\t\tif($c_url == \"\") $c_url = \"index\";\n\n\t\t\t\t\t\t//if( $this->curl == $c_url.'.php' ){\n\t\t\t\t\t\t\t// find the 'next' and 'prev' index\n\t\t\t\t\t\t\t$nextIndex = $i + 1;\n\t\t\t\t\t\t\t$prevIndex = $i - 1;\n\n\t\t\t\t\t\t\t// correct the indexing\n\t\t\t\t\t\t\tif( $prevIndex == -1 ) $prevIndex = $pagecount - 1;\n\n\t\t\t\t\t\t\tif( $nextIndex > $pagecount - 1 ) $nextIndex = 0;\n\n\t\t\t\t\t\t\t// find 'next' item and the 'prev' item\n\t\t\t\t\t\t\t$next = $numberedArray[ $nextIndex ];\n\t\t\t\t\t\t\t$prev = $numberedArray[ $prevIndex ];\n\t\t\t\t\t\t//}\n\t\t\t\t\t}\n\n\t\t\t\t\t// next page\n\t\t\t\t\t$nexturl = $next[0];\n\t\t\t\t\t$nextlabel = ucwords( $next[1] );\n\n\t\t\t\t\t// previous page\n\t\t\t\t\t$prevurl = $prev[0];\n\t\t\t\t\t$prevlabel = ucwords( $prev[1] );\n\n\t\t\t\t\t/**\n\t\t\t\t\t * [3] - Return the 'html' will the 'next' button and 'prev'\n\t\t\t\t\t * button\n\t\t\t\t\t */\n\t\t\t\t\treturn '\n\t\t\t\t\t<div id=\"normal-ui-nav \" class=\"ui-page-navigator cf\">\n\t\t\t\t\t\t<a href=\"'.$prevurl.'\" title=\"'.$prevlabel.'\">\n\t\t\t\t\t\t\t<div class=\"left-button\">\n\t\t\t\t\t\t\t\t'.strtoupper($prevlabel).'\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t\t<a href=\"'.$nexturl.'\" title=\"'.$nextlabel.'\">\n\t\t\t\t\t\t\t<div class=\"right-button\">\n\t\t\t\t\t\t\t\t'.strtoupper($nextlabel).'\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</div>';\n\t\t\t\t}\n\t\t\t}" ]
[ "0.753764", "0.7503505", "0.72719234", "0.7257473", "0.7242458", "0.72187775", "0.71033424", "0.7056341", "0.7034301", "0.7023912", "0.7021799", "0.69786257", "0.6952084", "0.69372654", "0.68880755", "0.6872854", "0.68387836", "0.6809484", "0.67802584", "0.6751055", "0.67471665", "0.6743405", "0.6741972", "0.66864645", "0.6683456", "0.6661168", "0.66522115", "0.65994394", "0.65941465", "0.6581558", "0.6557227", "0.65397334", "0.65354043", "0.65312517", "0.65270853", "0.65270615", "0.645479", "0.6445382", "0.6418953", "0.6409491", "0.64092207", "0.6408791", "0.6375039", "0.6351426", "0.63487446", "0.6316331", "0.62953633", "0.6290222", "0.62887645", "0.62850904", "0.62845844", "0.62446874", "0.6235584", "0.62275594", "0.62170666", "0.62095284", "0.620297", "0.61808723", "0.6179973", "0.61793965", "0.61634666", "0.6155716", "0.6151747", "0.615036", "0.61473244", "0.6093747", "0.60863", "0.60700876", "0.60627735", "0.6047998", "0.60465586", "0.6038833", "0.60163975", "0.60064375", "0.6001319", "0.5994398", "0.59936106", "0.59929585", "0.59899706", "0.5987256", "0.59806883", "0.5974641", "0.59710735", "0.59682816", "0.59506285", "0.595061", "0.59433", "0.5930009", "0.5914585", "0.59070426", "0.59018433", "0.5898484", "0.5893057", "0.5892178", "0.5891203", "0.58869267", "0.58843905", "0.5869729", "0.58639276", "0.586327" ]
0.7853644
0
Display social icons If the subscribe and connect plugin is active, display the icons.
Показывать иконки социальных сетей Если активен плагин подписки и подключения, отображать иконки.
function freshio_social_icons() { if (class_exists('Subscribe_And_Connect')) { echo '<div class="subscribe-and-connect-connect">'; subscribe_and_connect_connect(); echo '</div>'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasSocialIcons() {\n return true;\n }", "function foundation_q_the_social_accounts( $show_icons = false ){\n\n // Variáveis\n $foundation_skype = foundation_q_get_option( 'social_skype_user' );\n $foundation_whatsapp = foundation_q_get_option( 'social_whatsapp_user' );\n $foundation_spotify = foundation_q_get_option( 'social_spotify_user' );\n $foundation_snapchat = foundation_q_get_option( 'social_snapchat_user' );\n\n if( $foundation_skype ) $social_data[0] = array( 'url' => $foundation_skype, 'title' => 'Skype', 'icon' => ('fa fa-skype') );\n if( $foundation_whatsapp ) $social_data[1] = array( 'url' => $foundation_whatsapp, 'title' => 'Whatsapp', 'icon' => ('fa fa-whatsapp') );\n if( $foundation_spotify ) $social_data[2] = array( 'url' => $foundation_spotify, 'title' => 'Spotify', 'icon' => ('fa fa-spotify') );\n if( $foundation_snapchat ) $social_data[3] = array( 'url' => $foundation_snapchat, 'title' => 'Snapchat', 'icon' => ('fa fa-snapchat-ghost') );\n\n $result = '<ul class=\"qwp-social-list qwp-social-list--accounts\">';\n if( isset( $social_data ) ) {\n foreach( $social_data as $social ) {\n if( $show_icons ) {\n $result .= '<li><i class=\"' .$social['icon']. '\" aria-hidden=\"true\"></i> <span>' .$social['url']. '</span></li>';\n } else {\n $result .= '<li><span>' .$social['url']. '</span></a></li>';\n }\n }\n $result .= '</ul>';\n echo $result;\n } else {\n return false;\n }\n}", "function sparkling_social() {\n\tif ( of_get_option( 'footer_social' ) ) {\n\t\tsparkling_social_icons();\n\t}\n}", "function activello_social_icons() {\n\t\tif ( has_nav_menu( 'social-menu' ) ) {\n\t\t\twp_nav_menu(\n\t\t\t\tarray(\n\t\t\t\t\t'theme_location' => 'social-menu',\n\t\t\t\t\t'container' => 'nav',\n\t\t\t\t\t'container_id' => 'social',\n\t\t\t\t\t'container_class' => 'social-icons',\n\t\t\t\t\t'menu_id' => 'menu-social-items',\n\t\t\t\t\t'menu_class' => 'social-menu',\n\t\t\t\t\t'depth' => 1,\n\t\t\t\t\t'fallback_cb' => '',\n\t\t\t\t\t'link_before' => '<i class=\"social_icon fa\"><span>',\n\t\t\t\t\t'link_after' => '</span></i>',\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}", "public function header_social_icons_logic() {\n\n\t\t global $woo_options;\n\n\t\t $html = '';\n\n\t\t $template_directory = get_stylesheet_directory_uri();\n\n\t\t $profiles = array(\n\t\t 'twitter' => __( 'Follow us on Twitter' , 'canvas-advanced-addons-extended' ),\n\t\t 'facebook' => __( 'Connect on Facebook' , 'canvas-advanced-addons-extended' ),\n\t\t 'youtube' => __( 'Watch on YouTube' , 'canvas-advanced-addons-extended' ),\n\t\t 'flickr' => __( 'See photos on Flickr' , 'canvas-advanced-addons-extended' ),\n\t\t 'linkedin' => __( 'Connect on LinkedIn' , 'canvas-advanced-addons-extended' ),\n\t\t 'delicious' => __( 'Discover on Delicious' , 'canvas-advanced-addons-extended' ),\n\t\t 'googleplus' => __( 'View Google+ profile' , 'canvas-advanced-addons-extended' )\n\t\t );\n\n if ( isset( $woo_options['woo_nav_social_icon_type'] ) && ( 'false' == $woo_options['woo_nav_social_icon_type'] ) ) {\n\n\t\t // Open DIV tag.\n\t\t $html .= '<div id=\"social-links\" class=\"social-links\">' . \"\\n\";\n\n\t\t foreach ( $profiles as $key => $text ) {\n\t\t \tif ( isset( $woo_options['woo_connect_' . $key] ) && $woo_options['woo_connect_' . $key] != '' ) {\n\t\t \t\t//$html .= '<a class=\"social-icon-' . $key . '\" target=\"_blank\" href=\"' . $woo_options['woo_connect_' . $key] . '\" title=\"' . esc_attr( $text ) . '\"></a>' . \"\\n\";\n\t\t \t\t$html .= '<a target=\"_blank\" href=\"' . $woo_options['woo_connect_' . $key] . '\" title=\"' . esc_attr( $text ) . '\"><img src=\"'. $this->assets_url . 'img/social/' . $key . '.png\"></a>' . \"\\n\";\n\t\t \t}\n\t\t }\n\n\t\t // Add a custom RSS icon, linking to Feedburner or default RSS feed.\n\t\t $rss_url = get_bloginfo_rss( 'rss2_url' );\n\t\t $rss_text = __( 'Subscribe to our RSS feed', 'canvas-advanced-addons-extended' );\n\t\t if ( isset( $woo_options['woo_feed_url'] ) && ( $woo_options['woo_feed_url'] != '' ) ) { $rss_url = $woo_options['woo_feed_url']; }\n\n\t\t $html .= '<a href=\"' . $rss_url . '\" title=\"' . esc_attr( $rss_text ) . '\"><img src=\"'. $this->assets_url . 'img/social/rss.png\"></a>' . \"\\n\";\n\n // Add a email icon, linking to your contacts page.\n\t\t $email_text = __( 'Contact us!', 'canvas-advanced-addons-extended' );\n if ( isset( $woo_options['woo_subscribe_email'] ) && ( $woo_options['woo_subscribe_email'] ) ) { $email_url = $woo_options['woo_subscribe_email']; } \n \n\t\t $html .= '<a href=\"' . $email_url . '\" title=\"' . esc_attr( $email_text ) . '\"><img src=\"'. $this->assets_url . 'img/social/email.png\"></a>' . \"\\n\";\n\n\t\t $html .= '</div><!--/#social-links .social-links -->' . \"\\n\";\n\n\t\t echo $html;\t\n\n }\n\n if ( isset( $woo_options['woo_nav_social_icon_type'] ) && ( 'true' == $woo_options['woo_nav_social_icon_type'] ) ) {\n\n\t $class = '';\n \n if ( isset( $woo_options['woo_header_cart_link'] ) && ( 'true' == $woo_options['woo_header_cart_link'] ) ) {\n $class = ' cart-enabled';\n }\n\n ?> <ul class=\"rss fr<?php echo $class; ?>\">\n\n <?php \n if ( ( isset( $woo_options['woo_subscribe_email'] ) ) && ( $woo_options['woo_subscribe_email'] ) ) { ?>\n \t\t <li class=\"sub-email\"><a href=\"<?php echo esc_url( $woo_options['woo_subscribe_email'] ); ?>\"></a></li>\n\t\t <?php } ?>\n\n \t\t <?php \n if ( isset( $woo_options['woo_nav_rss'] ) && ( $woo_options['woo_nav_rss'] == 'true' ) ) { ?>\n \t <li class=\"sub-rss\"><a href=\"<?php if ( $woo_options['woo_feed_url'] ) { echo esc_url( $woo_options['woo_feed_url'] ); } else { echo esc_url( get_bloginfo_rss( 'rss2_url' ) ); } ?>\"></a></li>\n\t\t <?php } ?>\n\n <?php \n if ( $woo_options['woo_connect_twitter' ] != \"\" ) { ?>\n <li class=\"twitter\"><a target=\"_blank\" href=\"<?php echo esc_url( $woo_options['woo_connect_twitter'] ); ?>\" title=\"Twitter\"></a></li>\n <?php } \n\n if ( $woo_options['woo_connect_facebook' ] != \"\" ) { ?>\n <li class=\"facebook\"><a target=\"_blank\" href=\"<?php echo esc_url( $woo_options['woo_connect_facebook'] ); ?>\" title=\"Facebook\"></a></li>\n <?php } \n\n if ( $woo_options['woo_connect_youtube' ] != \"\" ) { ?>\n \t\t <li class=\"youtube\"><a target=\"_blank\" href=\"<?php echo esc_url( $woo_options['woo_connect_youtube'] ); ?>\" title=\"YouTube\"></a></li>\n <?php } \n\n if ( $woo_options['woo_connect_flickr' ] != \"\" ) { ?>\n <li class=\"flickr\"><a target=\"_blank\" href=\"<?php echo esc_url( $woo_options['woo_connect_flickr'] ); ?>\" title=\"Flickr\"></a></li>\n <?php } \n\n if ( $woo_options['woo_connect_linkedin' ] != \"\" ) { ?>\n <li class=\"linkedin\"><a target=\"_blank\" href=\"<?php echo esc_url( $woo_options['woo_connect_linkedin'] ); ?>\" title=\"LinkedIn\"></a></li>\n <?php } \n\n if ( $woo_options['woo_connect_delicious' ] != \"\" ) { ?>\n <li class=\"delicious\"><a target=\"_blank\" href=\"<?php echo esc_url( $woo_options['woo_connect_delicious'] ); ?>\" title=\"Delicious\"></a></li>\n <?php } \n\n if ( $woo_options['woo_connect_googleplus' ] != \"\" ) { ?>\n <li class=\"googleplus\"><a target=\"_blank\" href=\"<?php echo esc_url( $woo_options['woo_connect_googleplus'] ); ?>\" title=\"Google+\"></a></li>\n <?php } \n\n if ( $woo_options['woo_connect_dribbble' ] != \"\" ) { ?>\n <li class=\"dribbble\"><a target=\"_blank\" href=\"<?php echo esc_url( $woo_options['woo_connect_dribbble'] ); ?>\" title=\"Dribbble\"></a></li>\n <?php } \n\n if ( $woo_options['woo_connect_instagram' ] != \"\" ) { ?>\n <li class=\"instagram\"><a target=\"_blank\" href=\"<?php echo esc_url( $woo_options['woo_connect_instagram'] ); ?>\" title=\"Instagram\"></a></li>\n <?php } \n\n if ( $woo_options['woo_connect_vimeo' ] != \"\" ) { ?>\n <li class=\"vimeo\"><a target=\"_blank\" href=\"<?php echo esc_url( $woo_options['woo_connect_vimeo'] ); ?>\" title=\"Vimeo\"></a></li>\n <?php } \n\n if ( $woo_options['woo_connect_pinterest' ] != \"\" ) { ?>\n <li class=\"pinterest\"><a target=\"_blank\" href=\"<?php echo esc_url( $woo_options['woo_connect_pinterest'] ); ?>\" title=\"Pinterest\"></a></li>\n \t <?php } ?>\n\t </ul>\n <?php\n \n\t} // Boostrap Options\n }", "static function add_social_buttons($social_icons) {\r\n td_util::update_option('td_social_networks', $social_icons);\r\n }", "function folia_social_networks() {\n\n // Social networks & RSS feed\n\t$social = get_option( 'campanha_social_networks' );\n\tif ( isset( $social ) && !empty( $social ) ) : ?>\n\t\t<div class=\"social\">\n\t\t\t<?php\n\t\t\tforeach ( $social as $key => $value ) :\n\t\t\t\tif ( ! empty( $value) ) : ?>\n\t\t\t\t\t<a class=\"social-link social-link-<?php echo $key; ?> icon-<?php echo $key; ?>\" href=\"<?php echo esc_url( $value ); ?>\"><span class=\"screen-reader-text\"><?php echo $value; ?></span></a>\n\t\t\t\t<?php\n\t\t\t\tendif;\n\t\t\tendforeach;\n\t\t\t?>\n\t\t\t<a class=\"social-link icon-rss social-link-rss\" href=\"<?php bloginfo( 'rss2_url' ); ?>\"><span class=\"screen-reader-text\"><?php _e('RSS Feed', 'folia' ); ?></span></a>\n\t\t</div><!-- .social -->\n\t<?php\n\tendif;\n}", "function sparkling_social_icons() {\n\t\tif ( has_nav_menu( 'social-menu' ) ) {\n\t\t\twp_nav_menu(\n\t\t\t\tarray(\n\t\t\t\t\t'theme_location' => 'social-menu',\n\t\t\t\t\t'container' => 'nav',\n\t\t\t\t\t'container_id' => 'menu-social',\n\t\t\t\t\t'container_class' => 'social-icons',\n\t\t\t\t\t'menu_id' => 'menu-social-items',\n\t\t\t\t\t'menu_class' => 'social-menu',\n\t\t\t\t\t'depth' => 1,\n\t\t\t\t\t'fallback_cb' => '',\n\t\t\t\t\t'link_before' => '<i class=\"social_icon\"><span>',\n\t\t\t\t\t'link_after' => '</span></i>',\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}", "function llorix_one_lite_social_icons( $social_icons, $is_footer ) {\n\tif ( ! llorix_one_lite_general_repeater_is_empty( $social_icons ) ) {\n\t\t$llorix_one_lite_social_icons_decoded = json_decode( $social_icons );\n\t\t?>\n\t\t<ul class=\"social-icons\">\n\t\t\t<?php\n\t\t\tforeach ( $llorix_one_lite_social_icons_decoded as $llorix_one_lite_social_icon ) {\n\t\t\t\t$language_context = $is_footer === true ? 'Social icons in footer' : 'Social icons in header';\n\t\t\t\t$icon = ! empty( $llorix_one_lite_social_icon->icon_value ) ? apply_filters( 'llorix_one_lite_translate_single_string', $llorix_one_lite_social_icon->icon_value, $language_context ) : '';\n\t\t\t\t$link = ! empty( $llorix_one_lite_social_icon->link ) ? apply_filters( 'llorix_one_lite_translate_single_string', $llorix_one_lite_social_icon->link, $language_context ) : '';\n\t\t\t\tif ( ! empty( $icon ) && $icon !== 'No Icon' && ! empty( $link ) ) {\n\t\t\t\t\t?>\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<a href=\"<?php echo esc_url( $link ); ?>\">\n\t\t\t\t\t\t\t<span class=\"screen-reader-text\"><?php echo wp_kses_post( $icon ); ?></span>\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\techo '<i class=\"fa ';\n\t\t\t\t\t\t\tif ( $is_footer === true ) {\n\t\t\t\t\t\t\t\techo ' llorix-one-lite-footer-icons ';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\techo esc_attr( $icon );\n\t\t\t\t\t\t\techo ' transparent-text-dark\" aria-hidden=\"true\"></i>';\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</li>\n\t\t\t\t\t<?php\n\t\t\t\t}\n\t\t\t}\n\t\t\t?>\n\t\t</ul>\n\t\t<?php\n\t}\n}", "function foundation_q_the_social_links( $show_icons = false ){\n\n /* Busca no banco o cadastro de cada rede social */\n $foundation_twitter = foundation_q_get_option( 'social_twitter_url' );\n $foundation_facebook = foundation_q_get_option( 'social_facebook_url' );\n $foundation_gplus = foundation_q_get_option( 'social_googleplus_url' );\n $foundation_youtube = foundation_q_get_option( 'social_youtube_url' );\n $foundation_instagram = foundation_q_get_option( 'social_instagram_url' );\n $foundation_flickr = foundation_q_get_option( 'social_flickr_url' );\n $foundation_linkedin = foundation_q_get_option( 'social_linkedin_url' );\n $foundation_pinterest = foundation_q_get_option( 'social_pinterest_url' );\n $foundation_vimeo = foundation_q_get_option( 'social_vimeo_url' );\n $foundation_tumblr = foundation_q_get_option( 'social_tumblr_url' );\n $foundation_rss = foundation_q_get_option( 'social_rss_url' );\n $foundation_itunes = foundation_q_get_option( 'social_itunes_url' );\n $foundation_wordpress = foundation_q_get_option( 'social_wordpress_url' );\n $foundation_sd = foundation_q_get_option( 'social_soundclound_url' );\n\n /* Atribui os valores aos arrays */\n if( $foundation_twitter ) $social_data[0] = array( 'url' => $foundation_twitter, 'title' => 'Twitter', 'icon' => ('fa fa-twitter') );\n if( $foundation_facebook ) $social_data[1] = array( 'url' => $foundation_facebook, 'title' => 'Facebook', 'icon' => ('fa fa-facebook') );\n if( $foundation_gplus ) $social_data[2] = array( 'url' => $foundation_gplus, 'title' => 'Google+', 'icon' => ('fa fa-google-plus') );\n if( $foundation_youtube ) $social_data[3] = array( 'url' => $foundation_youtube, 'title' => 'YouTube', 'icon' => ('fa fa-youtube') );\n if( $foundation_instagram ) $social_data[4] = array( 'url' => $foundation_instagram, 'title' => 'Instagram', 'icon' => ('fa fa-instagram') );\n if( $foundation_flickr ) $social_data[5] = array( 'url' => $foundation_flickr, 'title' => 'Flickr', 'icon' => ('fa fa-flickr') );\n if( $foundation_linkedin ) $social_data[6] = array( 'url' => $foundation_linkedin, 'title' => 'LinkedIn', 'icon' => ('fa fa-linkedin') );\n if( $foundation_pinterest ) $social_data[7] = array( 'url' => $foundation_pinterest, 'title' => 'Pinterest', 'icon' => ('fa fa-pinterest-p') );\n if( $foundation_vimeo ) $social_data[8] = array( 'url' => $foundation_vimeo, 'title' => 'Vimeo', 'icon' => ('fa fa-vimeo') );\n if( $foundation_tumblr ) $social_data[9] = array( 'url' => $foundation_tumblr, 'title' => 'Tumblr', 'icon' => ('fa fa-tumblr') );\n if( $foundation_rss ) $social_data[10] = array( 'url' => $foundation_rss, 'title' => 'RSS', 'icon' => ('fa fa-rss') );\n if( $foundation_itunes ) $social_data[11] = array( 'url' => $foundation_itunes, 'title' => 'iTunes', 'icon' => ('fa fa-apple') );\n if( $foundation_wordpress ) $social_data[12] = array( 'url' => $foundation_wordpress, 'title' => 'Wordpress', 'icon' => ('fa fa-wordpress') );\n if( $foundation_sd ) $social_data[13] = array( 'url' => $foundation_sd, 'title' => 'Soundclound', 'icon' => ('fa fa-soundcloud') );\n\n $result = '<ul class=\"qwp-social-list\">';\n\n if( isset( $social_data ) ) {\n foreach( $social_data as $social ) {\n if( $show_icons ) {\n $result .= '<li><a target=\"_blank\" href=\"' .foundation_q_addhttp( $social['url'] ). '\"><i class=\"' .$social['icon']. '\" aria-hidden=\"true\"></i></a></li>';\n } else {\n $result .= '<li><a target=\"_blank\" href=\"' .foundation_q_addhttp( $social['url'] ). '\"><span>' .$social['title']. '</span></a></li>';\n }\n }\n\n /* Finaliza a listagem */\n $result .= '</ul>';\n\n echo $result;\n\n } else {\n return false;\n }\n}", "function e_seinajoki_social_links_icons() {\n\t// Supported social links icons.\n\t$social_links_icons = array(\n\t\t'facebook.com' => 'facebook',\n\t\t'instagram.com' => 'instagram',\n\t\t'twitter.com' => 'twitter',\n\t\t'youtube.com' => 'youtube',\n\t);\n\n\treturn apply_filters( 'e_seinajoki_social_links_icons', $social_links_icons );\n}", "function widget_dev_register_social_icons_widget() {\r\n\tregister_widget( 'widget_dev_Social_Icons_Widget' );\r\n}", "function sukelius_social_networks() {\r\n \r\n $twitter = hybrid_get_setting( 'sukelius_input_twitter' );\r\n $facebook = hybrid_get_setting( 'sukelius_input_facebook' );\r\n $pinterest = hybrid_get_setting( 'sukelius_input_pinterest' );\r\n $rss = hybrid_get_setting( 'sukelius_input_rss' );\r\n \r\n if ( $twitter || $facebook || $pinterest || $rss ) {\r\n \r\n echo '<ul id=\"social\">';\r\n \r\n if ( $facebook )\r\n echo '<li><a id=\"facebook\" href=\"'. $facebook .'\" title=\"'. __( 'Facebook', 'sukelius-magazine') .'\">'. __( 'Facebook', 'sukelius-magazine') .'</a></li>'; \r\n\r\n if ( $twitter )\r\n echo '<li><a id=\"twitter\" href=\"'. $twitter .'\" title=\"'. __( 'Twitter', 'sukelius-magazine') .'\">'. __( 'Twitter', 'sukelius-magazine') .'</a></li>'; \r\n\r\n if ( $pinterest )\r\n echo '<li><a id=\"pinterest\" href=\"'. $pinterest .'\" title=\"'. __( 'Pinterest', 'sukelius-magazine') .'\">'. __( 'Pinterest', 'sukelius-magazine') .'</a></li>'; \r\n \r\n if ( $rss )\r\n echo '<li><a id=\"rss\" href=\"'. $rss .'\" title=\"'. __( 'RSS', 'sukelius-magazine') .'\">'. __( 'RSS', 'sukelius-magazine') .'</a></li>';\r\n \r\n echo '</ul>';\r\n\r\n } \r\n}", "function cyberchimps_header_social_icons() {\n\n\t// get the design of the icons to apply the right class\n\t$design = cyberchimps_get_option( 'theme_backgrounds', 'default' );\n\n\t// create array of social icons to loop through to check if they are set and add title key to\n\t// social networks with names different to key\n\t$social['twitterbird']['set'] = cyberchimps_get_option( 'social_twitter', 'checked' );\n\t$social['twitterbird']['title'] = 'twitter';\n\t$social['twitterbird']['url'] = cyberchimps_get_option( 'twitter_url' );\n\t$social['facebook']['set'] = cyberchimps_get_option( 'social_facebook', 'checked' );\n\t$social['facebook']['url'] = cyberchimps_get_option( 'facebook_url' );\n\t$social['googleplus']['set'] = cyberchimps_get_option( 'social_google', 'checked' );\n\t$social['googleplus']['url'] = cyberchimps_get_option( 'google_url' );\n\t$social['flickr']['set'] = cyberchimps_get_option( 'social_flickr' );\n\t$social['flickr']['url'] = cyberchimps_get_option( 'flickr_url' );\n\t$social['pinterest']['set'] = cyberchimps_get_option( 'social_pinterest' );\n\t$social['pinterest']['url'] = cyberchimps_get_option( 'pinterest_url' );\n\t$social['linkedin']['set'] = cyberchimps_get_option( 'social_linkedin' );\n\t$social['linkedin']['url'] = cyberchimps_get_option( 'linkedin_url' );\n\t$social['youtube']['set'] = cyberchimps_get_option( 'social_youtube' );\n\t$social['youtube']['url'] = cyberchimps_get_option( 'youtube_url' );\n\t$social['map']['set'] = cyberchimps_get_option( 'social_googlemaps' );\n\t$social['map']['title'] = 'google maps';\n\t$social['map']['url'] = cyberchimps_get_option( 'googlemaps_url' );\n\t$social['email']['set'] = cyberchimps_get_option( 'social_email' );\n\t$social['email']['url'] = 'mailto:' . cyberchimps_get_option( 'email_url' );\n\t$social['rss']['set'] = cyberchimps_get_option( 'social_rss' );\n\t$social['rss']['url'] = cyberchimps_get_option( 'rss_url' );\n\t$social['instagram']['set'] = cyberchimps_get_option( 'social_instagram' );\n\t$social['instagram']['url'] = cyberchimps_get_option( 'instagram_url' );\n\t$social['snapchat']['set'] = cyberchimps_get_option( 'social_snapchat' );\n\t$social['snapchat']['url'] = cyberchimps_get_option( 'snapchat_url' );\n\n\t$output = '';\n\n\t// get the blog title to add to link title\n\t$link_title = get_bloginfo( 'title' );\n\n\t// Loop through the $social variable\n\tforeach ( $social as $key => $value ) {\n\n\t\t// Check that the social icon has been set\n\t\tif ( ! empty( $value['set'] ) ) {\n\n\t\t\t// check if title is set and use it otherwise use key as title\n\t\t\t$title = ( isset( $social[ $key ]['title'] ) ) ? $social[ $key ]['title'] : $key;\n\n\t\t\t// Create the output\n\t\t\t$output .= '<a href=\"' . esc_url( $social[ $key ]['url'] ) . '\"' . ( 'email' != $key ? ' target=\"_blank\"' : '' )\n\t\t\t\t. ' title=\"' . esc_attr( $link_title . ' ' . ucwords( $title ) ) . '\" class=\"symbol ' . $key . '\"></a>';\n\t\t}\n\t}\n\n\t// Echo to the page\n\t?>\n\t<div id=\"social\">\n\t\t<div class=\"<?php echo $design; ?>-icons\">\n\t\t\t<?php echo $output; ?>\n\t\t</div>\n\t</div>\n\n\t<?php\n}", "public function social() {\n\n\t\t\tob_start();\n\n\t\t\t\tif( $this->settings->get_option( 'social', 'ae_tools_maintenance', 'on' ) == 'on' ) { ?>\n\n\t\t\t\t<ul>\n\n\t\t\t\t\t<?php foreach ( $this->customizer->social() as $network ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( $network['url'] = get_theme_mod( 'social_' . $network['id'] ) ) { ?>\n\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t<a href=\"<?php echo $network['url']; ?>\" target=\"_blank\">\n\t\t\t\t\t\t\t\t\t<i class=\"fab fa-<?php echo $network['id']; ?>\"></i>\n\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t</li>\n\n\t\t\t\t\t\t<?php }\n\n\t\t\t\t\t} ?>\n\n\t\t\t\t</ul>\n\n\t\t\t<?php }\n\n\t\t\t$markup = ob_get_contents(); ob_end_clean();\n\n\t\t\treturn $markup;\n\n\t\t}", "function tempera_header_socials() {\n\ttempera_set_social_icons('sheader');\n}", "function pmc_socialLink() {\n\t$social = '';\n\tglobal $pmc_data; \n\t$icons = $pmc_data['socialicons'];\n\tforeach ($icons as $icon){\n\t\t$social .= '<a target=\"_blank\" href=\"'.esc_url($icon['link']).'\" title=\"'.esc_attr($icon['title']).'\"><i class=\"fa '.esc_attr($icon['url']).'\"></i></a>';\t\n\t}\n\techo $social;\n}", "function widget_dev_output_social_icons_widget_content( $args, $instance ) {\r\n\r\n\t// get the array of social profiles.\r\n\t$social_profiles = widget_dev_social_profiles();\r\n\r\n\t// if we have any social profiles.\r\n\tif ( ! empty( $social_profiles ) ) {\r\n\r\n\t\t// start the output markup.\r\n\t\t?>\r\n\t\t<ul class=\"hd-espw-social-icons\">\r\n\t\t<?php\r\n\r\n\t\t// loop through each profile.\r\n\t\tforeach ( $social_profiles as $social_profile ) {\r\n\r\n\t\t\t// get the value for this social profile - the profile url.\r\n\t\t\t$profile_url = get_theme_mod( $social_profile['id'] );\r\n\r\n\t\t\t// if we have a no value - url.\r\n\t\t\tif ( empty( $profile_url ) ) {\r\n\t\t\t\tcontinue; // continue to the next social profile.\r\n\t\t\t}\r\n\r\n\t\t\t// if we don't have a specified class.\r\n\t\t\tif ( empty ( $social_profile['class'] ) ) {\r\n\r\n\t\t\t\t// use the label for form a class.\r\n\t\t\t\t$social_profile['class'] = strtolower( sanitize_title_with_dashes( $social_profile['label'] ) );\r\n\r\n\t\t\t}\r\n\r\n\t\t\t// build the markup for this social profile.\r\n\t\t\t?>\r\n\r\n\t\t\t<li class=\"hd-espw-social-icons__item hd-espw-social-icons__item--<?php echo esc_attr( $social_profile['class'] ); ?>\">\r\n\t\t\t\t<a target=\"_blank\" class=\"hd-espw-social-icons__item-link\" href=\"<?php echo esc_url( $profile_url ); ?>\">\r\n\t\t\t\t\t<i class=\"icon-<?php echo esc_attr( $social_profile['class'] ); ?>\"></i> <span><?php echo esc_html( $social_profile['label'] ); ?></span>\r\n\t\t\t\t</a>\r\n\t\t\t</li>\r\n\r\n\t\t\t<?php\r\n\r\n\t\t}\r\n\r\n\t\t// end the output markup.\r\n\t\t?>\r\n\t\t</ul>\r\n\t\t<?php\r\n\r\n\t}\r\n\r\n}", "function goya_social_profiles( $wrapper_class = 'social-icons-default' ) {\n\n\t$socials = goya_meta_config('','social_links', array());\n\n\t$output = '';\n\tforeach( $socials as $social ) {\n\t\tif (!empty ($social['name']) ) {\n\t\t\t$output .= '<li><a href=\"' . esc_url( $social['url'] ) . '\" target=\"_blank\" data-toggle=\"tooltip\" data-placement=\"left\" title=\"' . esc_attr( $social['name'] ) . '\"><i class=\"et-icon et-' . esc_attr( $social['name'] ) . '\"></i></a></li>';\n\t\t}\n\t}\n\t\n\treturn '<ul class=\"social-icons ' . $wrapper_class . '\">' . $output . '</ul>';\n\n}", "function add_social_share_icons($content)\n{\n\tif( is_single() || is_home() ) {\n $html = \"<div class='social-share-wrapper'><div class='share-on'>Share on: </div>\";\n\n global $post;\n\n $url = get_permalink($post->ID);\n $url = esc_url($url);\n\n if(get_option(\"social-share-facebook\") == 1)\n {\n $html = $html . \"<div class='facebook'><a style='text-decoration:none' target='_blank' href='http://www.facebook.com/sharer.php?u=\" . $url . \"'><i class='fa fa-facebook'></i> Facebook</a></div>\";\n }\n\n if(get_option(\"social-share-twitter\") == 1)\n {\n $html = $html . \"<div class='twitter'><a style='text-decoration:none' target='_blank' href='https://twitter.com/share?url=\" . $url . \"'><i class='fa fa-twitter'></i> Twitter</a></div>\";\n }\n\n if(get_option(\"social-share-linkedin\") == 1)\n {\n $html = $html . \"<div class='linkedin'><a style='text-decoration:none' target='_blank' href='http://www.linkedin.com/shareArticle?url=\" . $url . \"'><i class='fa fa-linkedin'></i> LinkedIn</a></div>\";\n }\n\n if(get_option(\"social-share-reddit\") == 1)\n {\n $html = $html . \"<div class='reddit'><a style='text-decoration:none' target='_blank' href='http://reddit.com/submit?url=\" . $url . \"'><i class='fa fa-reddit'></i> Reddit</a></div>\";\n }\n\n $html = $html . \"<div class='clear'></div></div>\";\n\n return $content = $content . $html;\n\t} else {\n\t\treturn $content;\n\t}\n}", "public function icon() {\n\t\treturn 'business-social-links';\n\t}", "function socialConnect_outputFunction() {\r\n\t$sc_twitter = get_option('sc_twitter');\r\n\t$sc_facebook = get_option('sc_facebook');\r\n\t$sc_googleplus = get_option('sc_googleplus');\r\n\t$sc_youtube = get_option('sc_youtube');\r\n\t$sc_tumblr = get_option('sc_tumblr');\r\n\t$sc_linkedin = get_option('sc_linkedin');\r\n\t$sc_rss = get_option('sc_rss');\r\n\t$sc_imgPath = plugins_url().'/social-connect-widget/img/elegant-themes/';\r\n\t$sc_imgSize = \"width=40px\";\r\n\r\n\tif ($sc_twitter) {\r\n\t\t$sc_twitter_output = '<a target=\"_blank\" href=\"http://twitter.com/'.$sc_twitter.'\" id=\"followTwitter\"><img src=\"'.$sc_imgPath.'twitter.png\" class=\"sc-icons\" alt=\"Twitter\" '.$sc_imgSize.'/></a>';\r\n\t}\r\n\tif ($sc_facebook) {\r\n\t\t$sc_facebook_output = '<a target=\"_blank\" href=\"http://www.facebook.com/'.$sc_facebook.'\" id=\"followFacebook\"><img src=\"'.$sc_imgPath.'facebook.png\" class=\"sc-icons\" alt=\"Facebook\" '.$sc_imgSize.'/></a>';\r\n\t}\r\n\tif ($sc_googleplus) {\r\n\t\t$sc_googleplus_output = '<a target=\"_blank\" href=\"http://'.$sc_googleplus.'\" id=\"followGooglePlus\"><img src=\"'.$sc_imgPath.'google.png\" class=\"sc-icons\" alt=\"Google+\" '.$sc_imgSize.'/></a>';\r\n\t}\r\n\tif ($sc_youtube) {\r\n\t\t$sc_youtube_output = '<a target=\"_blank\" href=\"http://www.youtube.com/'.$sc_youtube.'\" id=\"followYouTube\"><img src=\"'.$sc_imgPath.'youtube.png\" class=\"sc-icons\" alt=\"YouTube\" '.$sc_imgSize.'/></a>';\r\n\t}\r\n\tif ($sc_tumblr) {\r\n\t\t$sc_tumblr_output = '<a target=\"_blank\" href=\"http://'.$sc_tumblr.'.tumblr.com\" id=\"followTumblr\"><img src=\"'.$sc_imgPath.'tumblr.png\" class=\"sc-icons\" alt=\"Tumblr\" '.$sc_imgSize.'/></a>';\r\n\t}\r\n\r\n\tif ($sc_linkedin) {\r\n\t\t$sc_linkedin_output = '<a target=\"_blank\" href=\"http://'.$sc_linkedin.'\" id=\"followLinkedIn\"><img src=\"'.$sc_imgPath.'linkedin.png\" class=\"sc-icons\" alt=\"LinkedIn\" '.$sc_imgSize.'/></a>';\r\n\t}\r\n\r\n\tif ($sc_rss) {\r\n\t\t$sc_rss_output = '<a target=\"_blank\" href=\"http://'.$sc_rss.'\" id=\"subscribeRSS\"><img src=\"'.$sc_imgPath.'rss.png\" class=\"sc-icons\" alt=\"RSS\" '.$sc_imgSize.'/></a>';\r\n\t}\r\n\t$socialConnect_output = $sc_twitter_output . $sc_facebook_output . $sc_googleplus_output . $sc_youtube_output . $sc_tumblr_output . $sc_linkedin_output . $sc_rss_output;\r\n\treturn $socialConnect_output;\r\n}", "function display_user_icon() {\n $show_user_icon = trim(elgg_get_plugin_setting('show_user_icon', 'amapnews'));\n \n if ($show_user_icon === AMAPNEWS_GENERAL_YES) {\n return true;\n } \n \n return false;\n}", "function zaxu_share_toggle() {\n\t\t\tif (get_theme_mod('zaxu_site_share', 'enabled') === 'enabled') {\n\t\t\t\techo '\n\t\t\t\t\t<li class=\"content-item share-toggle\">\n\t\t\t\t\t\t<div class=\"share-icon\"></div>\n\t\t\t\t\t</li>\n\t\t\t\t';\n\t\t\t}\n\t\t}", "function slcr_social_media_url() {\n global $slcr_redux;\n $facebook_url = $slcr_redux['facebook-url'];\n if ($facebook_url == true) { ?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-facebook-url']); ?>\" target=\"_blank\"><i class=\"socicon-facebook\"></i></a>\n </li>\n <?php }\n $twitter_url = $slcr_redux['twitter-url'];\n if ($twitter_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-twitter-url']); ?>\" target=\"_blank\"><i class=\"socicon-twitter\"></i></a>\n </li>\n <?php }\n $google_plus_url = $slcr_redux['google-plus-url'];\n if ($google_plus_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-google-plus-url']); ?>\" target=\"_blank\"><i class=\"socicon-googleplus\"></i></a>\n </li>\n <?php }\n $vimeo_url = $slcr_redux['vimeo-url'];\n if ($vimeo_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-vimeo-url']); ?>\" target=\"_blank\"><i class=\"socicon-vimeo\"></i></a>\n </li>\n <?php }\n $dribbble_url = $slcr_redux['dribbble-url'];\n if ($dribbble_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-dribbble-url']); ?>\" target=\"_blank\"><i class=\"socicon-dribbble\"></i></a>\n </li>\n <?php }\n $pinterest_url = $slcr_redux['pinterest-url'];\n if ($pinterest_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-pinterest-url']); ?>\" target=\"_blank\"><i class=\"socicon-pinterest\"></i></a>\n </li>\n <?php }\n $youtube_url = $slcr_redux['youtube-url'];\n if ($youtube_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-youtube-url']); ?>\" target=\"_blank\"><i class=\"socicon-youtube\"></i></a>\n </li>\n <?php }\n $tumblr_url = $slcr_redux['tumblr-url'];\n if ($tumblr_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-tumblr-url']); ?>\" target=\"_blank\"><i class=\"socicon-tumblr\"></i></a>\n </li>\n <?php }\n $linkedin_url = $slcr_redux['linkedin-url'];\n if ($linkedin_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-linkedin-url']); ?>\" target=\"_blank\"><i class=\"socicon-linkedin\"></i></a>\n </li>\n <?php }\n $rss_url = $slcr_redux['rss-url'];\n if ($rss_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-rss-url']); ?>\" target=\"_blank\"><i class=\"socicon-rss\"></i></a>\n </li>\n <?php }\n $behance_url = $slcr_redux['behance-url'];\n if ($behance_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-behance-url']); ?>\" target=\"_blank\"><i class=\"socicon-behance\"></i></a>\n </li>\n <?php }\n $flickr_url = $slcr_redux['flickr-url'];\n if ($flickr_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-flickr-url']); ?>\" target=\"_blank\"><i class=\"socicon-flickr\"></i></a>\n </li>\n <?php }\n $spotify_url = $slcr_redux['spotify-url'];\n if ($spotify_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-spotify-url']); ?>\" target=\"_blank\"><i class=\"socicon-spotify\"></i></a>\n </li>\n <?php }\n $instagram_url = $slcr_redux['instagram-url'];\n if ($instagram_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-instagram-url']); ?>\" target=\"_blank\"><i class=\"socicon-instagram\"></i></a>\n </li>\n <?php }\n $github_url = $slcr_redux['github-url'];\n if ($github_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-github-url']); ?>\" target=\"_blank\"><i class=\"socicon-github\"></i></a>\n </li>\n <?php }\n $stackexchange_url = $slcr_redux['stackexchange-url'];\n if ($stackexchange_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-stackexchange-url']); ?>\" target=\"_blank\"><i class=\"socicon-stackexchange\"></i></a>\n </li>\n <?php }\n $soundcloud_url = $slcr_redux['soundcloud-url'];\n if ($soundcloud_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-soundcloud-url']); ?>\" target=\"_blank\"><i class=\"socicon-soundcloud\"></i></a>\n </li>\n <?php }\n $vk_url = $slcr_redux['vk-url'];\n if ($vk_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-vk-url']); ?>\" target=\"_blank\"><i class=\"socicon-vkontakte\"></i></a>\n </li>\n <?php }\n $vine_url = $slcr_redux['vine-url'];\n if ($vine_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-vine-url']); ?>\" target=\"_blank\"><i class=\"socicon-vine\"></i></a>\n </li>\n <?php }\n $houzz_url = $slcr_redux['houzz-url'];\n if ($houzz_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-houzz-url']); ?>\" target=\"_blank\"><i class=\"socicon-houzz\"></i></a>\n </li>\n <?php }\n $yelp_url = $slcr_redux['yelp-url'];\n if ($yelp_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-yelp-url']); ?>\" target=\"_blank\"><i class=\"socicon-yelp\"></i></a>\n </li>\n <?php }\n $email_url = $slcr_redux['email-url'];\n if ($email_url == true) {?>\n <li>\n <a href=\"mailto:<?php echo esc_url($slcr_redux['social-media-email-url']); ?>\"><i class=\"socicon-mail\"></i></a>\n </li>\n <?php }\n $phone_url = $slcr_redux['phone-url'];\n if ($phone_url == true) {?>\n <li>\n <a href=\"tel:<?php echo esc_url($slcr_redux['social-media-phone-url']); ?>\"><i class=\"icon_phone\"></i></a>\n </li>\n <?php } \n }", "public function wptsv2_social_front() {\n $wpts_social_fb = esc_url( genesis_get_option('wpts-fb', 'wpts-theme-settings') );\n $wpts_social_tw = esc_url( genesis_get_option('wpts-tw', 'wpts-theme-settings') );\n $wpts_social_li = esc_url( genesis_get_option('wpts-li', 'wpts-theme-settings') );\n $wpts_social_yt = esc_url( genesis_get_option('wpts-yt', 'wpts-theme-settings') );\n $wpts_social_gp = esc_url( genesis_get_option('wpts-gp', 'wpts-theme-settings') );\n\n if ( !empty($wpts_social_fb) || !empty($wpts_social_tw) || !empty($wpts_social_li) || !empty($wpts_social_yt) || !empty($wpts_social_gp) ) {\n echo '<div class=\"wpts-social-content\"><ul>';\n\n if ( !empty($wpts_social_fb) ) :\n echo '<li><a href=\"'.$wpts_social_fb.'\" title=\"Facebook\" target=\"_blank\"><span class=\"icon-facebook\"></span></a></li>';\n endif;\n\n if ( !empty($wpts_social_tw) ) :\n echo '<li><a href=\"'.$wpts_social_tw.'\" title=\"Twitter\" target=\"_blank\"><span class=\"icon-twitter\"></span></a></li>';\n endif;\n\n if ( !empty($wpts_social_li) ) :\n echo '<li><a href=\"'.$wpts_social_li.'\" title=\"Linkedin\" target=\"_blank\"><span class=\"icon-linkedin\"></span></a></li>';\n endif;\n\n if ( !empty($wpts_social_yt) ) :\n echo '<li><a href=\"'.$wpts_social_yt.'\" title=\"Youtube\" target=\"_blank\"><span class=\"icon-youtube\"></span></a></li>';\n endif;\n\n if ( !empty($wpts_social_gp) ) :\n echo '<li><a href=\"'.$wpts_social_gp.'\" title=\"Google+\" target=\"_blank\"><span class=\"icon-gplus\"></span></a></li>';\n endif;\n\n echo '</ul></div>';\n }\n else {\n printf('<div class=\"wpts-social-content\"><p><em>No data to display. Make sure you added your social media url on <a href=\"%s\">Genesis > WPTS Theme Setting</a> page.</em></p></div>', esc_url( home_url( '/wp-admin/admin.php?page=wpts_theme_settings' ) ) );\n }\n }", "function tech_about_icons($fb=0,$my=0,$twitter=0){\n\tglobal $tech;\n\t$fb_profile = $tech['facebook_profile'];\n\t$my_profile = $tech['myspace_profile'];\n\t$twitter_profile = $tech['twitter_profile'];\n\t$image = get_template_directory_uri() . \"/images/icons\";\n\tif ($fb !=0){\n\t\techo \"<li><a href=\\\"{$fb_profile}\\\" title=\\\"\".__('Follow me on Facebook','techozoic').\"\\\"><img src=\\\"{$image}/facebook_32.png\\\"></a></li>\";\n\t}\n\tif ($my !=0){\n\t\techo \"<li><a href=\\\"{$my_profile}\\\" title=\\\"\".__('Follow me on Myspace','techozoic').\"\\\"><img src=\\\"{$image}/myspace_32.png\\\"></a></li>\";\n\t}\t\n\tif ($twitter !=0){\n\t\techo \"<li><a href=\\\"{$twitter_profile}\\\" title=\\\"\".__('Follow me on Twitter','techozoic').\"\\\"><img src=\\\"{$image}/twitter_32.png\\\"></a></li>\";\n\t}\n}", "function theme_enlightlite_social_links() {\n global $CFG;\n $totalicons = 4;\n $htmlstr = '';\n for ($i = 1; $i <= 4; $i++) {\n $iconenable = theme_enlightlite_get_setting('siconenable'.$i);\n $icon = theme_enlightlite_get_setting('socialicon'.$i);\n $iconcolor = theme_enlightlite_get_setting('siconbgc'.$i);\n $iconurl = theme_enlightlite_get_setting('siconurl'.$i);\n $iconstr = '';\n $iconsty = (empty($iconcolor)) ? '' : ' style=\"background: '.$iconcolor.';\"';\n if ($iconenable == \"1\" && !empty($icon)) {\n $iconstr = '<li class=\"media0'.$i.'\"'.$iconsty.'><a href=\"'.$iconurl.'\"><i class=\"fa fa-'.$icon.'\"></i></a></li>'.\"\\n\";\n $htmlstr .= $iconstr;\n }\n }\n return $htmlstr;\n}", "function slcr_footer_social(){\n global $slcr_redux;\n ?>\n <ul class=\"footer__social\">\n <?php $facebook_url = $slcr_redux['footer-facebook-url'];\n if ($facebook_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-facebook-url']); ?>\" target=\"_blank\"><i class=\"socicon-facebook\"></i></a>\n </li>\n <?php \n }\n $twitter_url = $slcr_redux['footer-twitter-url'];\n if ($twitter_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-twitter-url']); ?>\" target=\"_blank\"><i class=\"socicon-twitter\"></i></a>\n </li>\n <?php \n }\n $google_plus_url = $slcr_redux['footer-google-plus-url'];\n if ($google_plus_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-google-plus-url']); ?>\" target=\"_blank\"><i class=\"socicon-googleplus\"></i></a>\n </li>\n <?php \n }\n $vimeo_url = $slcr_redux['footer-vimeo-url'];\n if ($vimeo_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-vimeo-url']); ?>\" target=\"_blank\"><i class=\"socicon-vimeo\"></i></a>\n </li>\n <?php \n }\n $dribbble_url = $slcr_redux['footer-dribbble-url'];\n if ($dribbble_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-dribbble-url']); ?>\" target=\"_blank\"><i class=\"socicon-dribbble\"></i></a>\n </li>\n <?php \n }\n $pinterest_url = $slcr_redux['footer-pinterest-url'];\n if ($pinterest_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-pinterest-url']); ?>\" target=\"_blank\"><i class=\"socicon-pinterest\"></i></a>\n </li>\n <?php \n }\n $youtube_url = $slcr_redux['footer-youtube-url'];\n if ($youtube_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-youtube-url']); ?>\" target=\"_blank\"><i class=\"socicon-youtube\"></i></a>\n </li>\n <?php \n }\n $tumblr_url = $slcr_redux['footer-tumblr-url'];\n if ($tumblr_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-tumblr-url']); ?>\" target=\"_blank\"><i class=\"socicon-tumblr\"></i></a>\n </li>\n <?php \n }\n $linkedin_url = $slcr_redux['footer-linkedin-url'];\n if ($linkedin_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-linkedin-url']); ?>\" target=\"_blank\"><i class=\"socicon-linkedin\"></i></a>\n </li>\n <?php \n }\n $rss_url = $slcr_redux['footer-rss-url'];\n if ($rss_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-rss-url']); ?>\" target=\"_blank\"><i class=\"socicon-rss\"></i></a>\n </li>\n <?php \n }\n $behance_url = $slcr_redux['footer-behance-url'];\n if ($behance_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-behance-url']); ?>\" target=\"_blank\"><i class=\"socicon-behance\"></i></a>\n </li>\n <?php\n }\n $flickr_url = $slcr_redux['footer-flickr-url'];\n if ($flickr_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-flickr-url']); ?>\" target=\"_blank\"><i class=\"socicon-flickr\"></i></a>\n </li>\n <?php \n }\n $spotify_url = $slcr_redux['footer-spotify-url'];\n if ($spotify_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-spotify-url']); ?>\" target=\"_blank\"><i class=\"socicon-spotify\"></i></a>\n </li>\n <?php \n }\n $instagram_url = $slcr_redux['footer-instagram-url'];\n if ($instagram_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-instagram-url']); ?>\" target=\"_blank\"><i class=\"socicon-instagram\"></i></a>\n </li>\n <?php \n }\n $github_url = $slcr_redux['footer-github-url'];\n if ($github_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-github-url']); ?>\" target=\"_blank\"><i class=\"socicon-github\"></i></a>\n </li>\n <?php \n }\n $stackexchange_url = $slcr_redux['footer-stackexchange-url'];\n if ($stackexchange_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-stackexchange-url']); ?>\" target=\"_blank\"><i class=\"socicon-stackexchange\"></i></a>\n </li>\n <?php \n }\n $soundcloud_url = $slcr_redux['footer-soundcloud-url'];\n if ($soundcloud_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-soundcloud-url']); ?>\" target=\"_blank\"><i class=\"socicon-soundcloud\"></i></a>\n </li>\n <?php \n }\n $vk_url = $slcr_redux['footer-vk-url'];\n if ($vk_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-vk-url']); ?>\" target=\"_blank\"><i class=\"socicon-vkontakte\"></i></a>\n </li>\n <?php \n }\n $vine_url = $slcr_redux['footer-vine-url'];\n if ($vine_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-vine-url']); ?>\" target=\"_blank\"><i class=\"socicon-vine\"></i></a>\n </li>\n <?php \n }\n $houzz_url = $slcr_redux['footer-houzz-url'];\n if ($houzz_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-houzz-url']); ?>\" target=\"_blank\"><i class=\"socicon-houzz\"></i></a>\n </li>\n <?php \n }\n $yelp_url = $slcr_redux['footer-yelp-url'];\n if ($yelp_url == true) {?>\n <li>\n <a href=\"<?php echo esc_url($slcr_redux['social-media-yelp-url']); ?>\" target=\"_blank\"><i class=\"socicon-yelp\"></i></a>\n </li>\n <?php \n }\n $email_url = $slcr_redux['footer-email-url'];\n if ($email_url == true) {?>\n <li>\n <a href=\"mailto:<?php echo esc_url($slcr_redux['social-media-email-url']); ?>\"><i class=\"socicon-mail\"></i></a>\n </li>\n <?php \n }\n $phone_url = $slcr_redux['footer-phone-url'];\n if ($phone_url == true) {?>\n <li>\n <a href=\"tel:<?php echo esc_url($slcr_redux['social-media-phone-url']); ?>\"><i class=\"icon_phone\"></i></a>\n </li>\n <?php \n }\n ?>\n </ul>\n\n <?php\n }", "public static function shareButton(){\n $social_providers = array_filter(explode(',', parent::$param->getValue('socialpub')));\n foreach ($social_providers as $val) { $rpx_social_icons .= '<div class=\"jn-icon jn-size16 jn-'.$val.'\"></div>'; }\n $buttons = '<div class=\"rpx_social_icons\">' . $rpx_social_icons . '</div>';\n $share = '<div id=\"janrainEngageShare\" class=\"rpxsocial rpx_tooltip\">';\n $share .= '<span class=\"rpxsharebutton\">share</span><div class=\"rpx_share_tip\">Share this on:<br>' . $buttons . '</div></div>';\n //TODO: make a class for this so it can be edited in the css file\n return '<div style=\"margin-top:35px;\" >'.$share.'</div>';\n }", "public function actionSocial()\n\t{\n\t\t$this->render('redsocial');\n\t}", "function showSubscribeButton()\n {\n // profile?\n\n $user = common_current_user();\n\n if (!empty($user) && $this->profile->id != $user->id) {\n $this->out->elementStart('li', 'entity_subscribe');\n if ($user->isSubscribed($this->profile)) {\n $usf = new UnsubscribeForm($this->out, $this->profile);\n $usf->show();\n } else {\n if (Event::handle('StartShowProfileListSubscribeButton', array($this))) {\n $sf = new SubscribeForm($this->out, $this->profile);\n $sf->show();\n Event::handle('EndShowProfileListSubscribeButton', array($this));\n }\n }\n $this->out->elementEnd('li');\n }\n }", "function klippe_mikado_register_social_icon_widget( $widgets ) {\n\t\t$widgets[] = 'KlippeMikadoSocialIconWidget';\n\t\t\n\t\treturn $widgets;\n\t}", "function get_podcast_social_icons($profiles){\n\n $profiles = get_field('social_profiles', get_the_ID());\n \n $output = '';\n\n if(!empty($profiles) && is_array($profiles)){\n\t $output .= '<div class=\"podcast_social_profiles_wrapper\"><ul class=\"site_social_profiles\">';\n\t \n\t if(!empty($profiles['instagram'])){\n\t $output .= '<li><a href=\"'. $profiles['instagram'] .'\" title=\"Instagram\" target=\"_blank\"><i class=\"fa fa-instagram\"></i></a></li>';\n\t }\n\t \n\t if(!empty($profiles['facebook'])){\n\t $output .= '<li><a href=\"'. $profiles['facebook'] .'\" title=\"Facebook\" target=\"_blank\"><i class=\"fa fa-facebook\"></i></a></li>';\n\t }\n\t \n\t if(!empty($profiles['twitter'])){\n\t $output .= '<li><a href=\"'. $profiles['twitter'] .'\" title=\"Twitter\" target=\"_blank\"><i class=\"fa fa-twitter\"></i></a></li>';\n\t }\n\t \n\t if(!empty($profiles['youtube'])){\n\t $output .= '<li><a href=\"'. $profiles['youtube'] .'\" title=\"Youtube\" target=\"_blank\"><i class=\"fa fa-youtube\"></i></a></li>';\n\t }\n\t \n\t if(!empty($profiles['pinterest'])){\n\t $output .= '<li><a href=\"'. $profiles['pinterest'] .'\" title=\"Pinterest\" target=\"_blank\"><i class=\"fa fa-instagram\"></i></a></li>';\n\t }\n\t \n\t if(!empty($profiles['tiktok'])){\n\t \n\t $tiktok_logo = get_template_directory_uri(). '/assets/images/tiktok.svg' ;\n\t \n\t $output .= '<li><a href=\"'. $profiles['tiktok'] .'\" title=\"Tiktok\" target=\"_blank\"><img src=\"' . $tiktok_logo . '\"></a></li>';\n\t }\n\t \n\t if(!empty($profiles['thumbr'])){\n\t $output .= '<li><a href=\"'. $profiles['thumbr'] .'\" title=\"Thumbr\" target=\"_blank\"><i class=\"fa fa-tumblr\"></i></a></li>';\n\t }\n\t \n\t $output .= '</div></ul>';\n\t}\n\t\n\t\n\treturn $output;\n\n}", "function client_portal_customize_social_icons( $wp_customize ) {\n\n\t// Create an array of our social links for ease of setup.\n\t$social_networks = array( 'facebook', 'instagram', 'linkedin', 'twitter' );\n\n\t// Loop through our networks to setup our fields.\n\tforeach ( $social_networks as $network ) {\n\n\t\t// Register a setting.\n\t\t$wp_customize->add_setting(\n\t\t\t'client_portal_' . $network . '_link',\n\t\t\tarray(\n\t\t\t\t'default' => '',\n\t\t\t\t'sanitize_callback' => 'esc_url',\n\t\t\t)\n\t\t);\n\n\t\t// Create the setting field.\n\t\t$wp_customize->add_control(\n\t\t\t'client_portal_' . $network . '_link',\n\t\t\tarray(\n\t\t\t\t'label' => /* translators: the social network name. */ sprintf( esc_html__( '%s URL', 'client-portal' ), ucwords( $network ) ),\n\t\t\t\t'section' => 'client_portal_social_links_section',\n\t\t\t\t'type' => 'text',\n\t\t\t)\n\t\t);\n\t}\n}", "function sabian_top_header_social($extra_class=\"\") {\n\t\n\t$social_links=SabianThemeSettings::getSocialMediaLinks();\n\n ?>\n\n <ul class=\"navbar-top-social-icons pull-right <?php echo $extra_class; ?>\">\n\n<?php foreach($social_links as $key=>$link) {\n\t\n\t$s_link=$link[\"link\"];\n\t\t\t\t\n\t\t\t\tif($s_link==\"\")\n\t\t\t\tcontinue;\n\t\t\t\t\n\t\t\t\t ?>\n <li><a href=\"<?php echo $s_link; ?>\" target=\"_blank\"><i class=\"fa fa-<?php echo $key; ?>\"></i></a></li>\n<?php } ?>\n \n\n\n\n </ul>\n\n <?php\n\n}", "function set_share_icon($image_url) {\r\n\t\t$this->share_icon = $image_url; return true;\r\n\t}", "function publisher_the_author_social_icons( $author = null, $args = array() ) {\n\n\t\tif ( is_null( $author ) ) {\n\n\t\t\t// Get current post author id\n\t\t\tif ( is_singular() ) {\n\t\t\t\t$author = get_the_author_meta( 'ID' );\n\t\t\t} // Get current archive user\n\t\t\telseif ( is_author() ) {\n\t\t\t\t$author = bf_get_author_archive_user();\n\t\t\t} // Return\n\t\t\telse {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif ( is_int( $author ) ) {\n\t\t\t$author = get_user_by( 'id', $author );\n\t\t}\n\n\t\tif ( ! $author ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$args = bf_merge_args( $args, array(\n\t\t\t'wrapper_class' => 'author-social-icons',\n\t\t\t'list_start' => '',\n\t\t\t'list_end' => '',\n\t\t\t'max-links' => - 1,\n\t\t) );\n\n\t\t// Contains links of author\n\t\t$social_links = array(\n\t\t\t// Github Link\n\t\t\t'github_url' => array(\n\t\t\t\t'title' => '<i class=\"fa fa-github\"></i>',\n\t\t\t\t'class' => 'github',\n\t\t\t),\n\t\t\t// Pinterest Link\n\t\t\t'pinterest_url' => array(\n\t\t\t\t'title' => '<i class=\"fa fa-pinterest\"></i>',\n\t\t\t\t'class' => 'pinterest',\n\t\t\t),\n\t\t\t// Youtube Link\n\t\t\t'youtube_url' => array(\n\t\t\t\t'title' => '<i class=\"fa fa-youtube\"></i>',\n\t\t\t\t'class' => 'youtube',\n\t\t\t),\n\t\t\t// Linkedin Link\n\t\t\t'linkedin_url' => array(\n\t\t\t\t'title' => '<i class=\"fa fa-linkedin\"></i>',\n\t\t\t\t'class' => 'linkedin',\n\t\t\t),\n\t\t\t// Dribbble Link\n\t\t\t'dribbble_url' => array(\n\t\t\t\t'title' => '<i class=\"fa fa-dribbble\"></i>',\n\t\t\t\t'class' => 'dribbble',\n\t\t\t),\n\t\t\t// Vimeo Link\n\t\t\t'vimeo_url' => array(\n\t\t\t\t'title' => '<i class=\"fa fa-vimeo-square\"></i>',\n\t\t\t\t'class' => 'vimeo',\n\t\t\t),\n\t\t\t// Delicious Link\n\t\t\t'delicious_url' => array(\n\t\t\t\t'title' => '<i class=\"fa fa-delicious\"></i>',\n\t\t\t\t'class' => 'delicious',\n\t\t\t),\n\t\t\t// SoundCloud Link\n\t\t\t'soundcloud_url' => array(\n\t\t\t\t'title' => '<i class=\"fa fa-soundcloud\"></i>',\n\t\t\t\t'class' => 'soundcloud',\n\t\t\t),\n\t\t\t// Behance Link\n\t\t\t'behance_url' => array(\n\t\t\t\t'title' => '<i class=\"fa fa-behance\"></i>',\n\t\t\t\t'class' => 'behance',\n\t\t\t),\n\t\t\t// Flickr Link\n\t\t\t'flickr_url' => array(\n\t\t\t\t'title' => '<i class=\"fa fa-flickr\"></i>',\n\t\t\t\t'class' => 'flickr',\n\t\t\t),\n\t\t\t// Instagram Link\n\t\t\t'instagram_url' => array(\n\t\t\t\t'title' => '<i class=\"fa fa-instagram\"></i>',\n\t\t\t\t'class' => 'instagram',\n\t\t\t),\n\t\t\t// Google+ Link\n\t\t\t'gplus_url' => array(\n\t\t\t\t'title' => '<i class=\"fa fa-google-plus\"></i>',\n\t\t\t\t'class' => 'google-plus',\n\t\t\t),\n\t\t\t// Twitter Link\n\t\t\t'twitter_url' => array(\n\t\t\t\t'title' => '<i class=\"fa fa-twitter\"></i>',\n\t\t\t\t'class' => 'twitter',\n\t\t\t),\n\t\t\t// Facebook Link\n\t\t\t'facebook_url' => array(\n\t\t\t\t'title' => '<i class=\"fa fa-facebook\"></i>',\n\t\t\t\t'class' => 'facebook',\n\t\t\t),\n\t\t\t// User Link\n\t\t\t'url' => array(\n\t\t\t\t'title' => '<i class=\"fa fa-globe\"></i>',\n\t\t\t\t'class' => 'site',\n\t\t\t\t'value' => get_the_author_meta( 'user_url', $author->ID )\n\t\t\t),\n\t\t\t// Telegram Link\n\t\t\t'telegram_url' => array(\n\t\t\t\t'title' => '<i class=\"fa fa-telegram\"></i>',\n\t\t\t\t'class' => 'telegram',\n\t\t\t),\n\t\t);\n\n\t\t$limit = intval( $args['max-links'] );\n\t\t$i = 0;\n\t\t$links = array();\n\n\t\tforeach ( $social_links as $meta_key => $link ) {\n\n\t\t\tif ( $i === $limit ) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif ( isset( $link['value'] ) ) {\n\n\t\t\t\tif ( ! empty( $link['value'] ) ) {\n\t\t\t\t\t$link['href'] = $link['value'];\n\t\t\t\t\t$links[] = $link;\n\n\t\t\t\t\t$i ++;\n\t\t\t\t}\n\n\t\t\t} elseif ( $href = bf_get_user_meta( $meta_key, $author->ID ) ) {\n\n\t\t\t\t$link['href'] = $href;\n\t\t\t\t$links[] = $link;\n\n\t\t\t\t$i ++;\n\t\t\t}\n\t\t}\n\n\t\t// Fix order issue in RTL languages\n\t\tif ( is_rtl() ) {\n\t\t\t$links = array_reverse( $links );\n\t\t}\n\n\t\t?>\n\t\t<ul class=\"<?php echo $args['wrapper_class'] ?>\">\n\t\t\t<?php\n\n\t\t\techo $args['list_start'];\n\n\t\t\tforeach ( $links as $link ) {\n\t\t\t\t?>\n\t\t\t\t<li class=\"social-item <?php echo esc_attr( $link['class'] ); ?>\">\n\t\t\t\t\t<a href=\"<?php echo esc_url( $link['href'] ); ?>\"\n\t\t\t\t\t target=\"_blank\"\n\t\t\t\t\t rel=\"nofollow noreferrer\"><?php echo $link['title']; // escaped before in top ?></a>\n\t\t\t\t</li>\n\t\t\t\t<?php\n\t\t\t}\n\n\t\t\techo $args['list_end'];\n\n\t\t\t?>\n\t\t</ul>\n\t\t<?php\n\n\t}", "function social_icons( array $settings = [], array $data = [], array $fm_fields = [] ) : Social_Icons {\n\treturn new Social_Icons( $settings, $data );\n}", "function e_seinajoki_nav_social_icons( $item_output, $item, $depth, $args ) {\n\t// Get supported social icons.\n\t$social_icons = e_seinajoki_social_links_icons();\n\n\t// Change SVG icon inside social links menu if there is supported URL.\n\tif ( 'social' === $args->theme_location ) {\n\t\tforeach ( $social_icons as $attr => $value ) {\n\t\t\tif ( false !== strpos( $item_output, $attr ) ) {\n\t\t\t\t$item_output = str_replace( $args->link_after, '</span>' . e_seinajoki_get_svg( array( 'icon' => esc_attr( $value ) ) ), $item_output );\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $item_output;\n}", "function vantage_premium_show_social_share(){\n\tif( siteorigin_setting('social_share_post') && is_single() ) {\n\t\tsiteorigin_share_render( array(\n\t\t\t'twitter' => siteorigin_setting('social_twitter'),\n\t\t) );\n\t}\n}", "function strl_socials_shortcode() {\n\tif ( have_rows( 'strl-socials', 'option' ) ) {\n\t\twhile ( have_rows( 'strl-socials', 'options' ) ) {\n\t\t\tthe_row();\n\t\t\t$facebook = get_sub_field( 'strl-socials-facebook', 'option' );\n\t\t\t$instagram = get_sub_field( 'strl-socials-instagram', 'option' );\n\n\t\t\tob_start();\n\t\t\t?>\n\t\t\t<div class=\"social-icons\">\n\t\t\t<?php\n\t\t\tif ( $facebook ) {\n\t\t\t\t?>\n\t\t\t\t<a href=\"https://www.facebook.com/<?php echo esc_textarea( $facebook ); ?>\" target=\"_blank\"><i class=\"fab fa-facebook-f\"></i><span class=\"screen-reader-text\"><?php esc_html_e( 'Go to Facebook', 'strl' ); ?></span></a>\n\t\t\t\t<?php\n\t\t\t}\n\t\t\tif ( $instagram ) {\n\t\t\t\t?>\n\t\t\t\t<a href=\"https://www.instagram.com/<?php echo esc_textarea( $instagram ); ?>\" target=\"_blank\"><i class=\"fab fa-instagram\"></i><span class=\"screen-reader-text\"><?php esc_html_e( 'Go to Instagram', 'strl' ); ?></span></a>\n\t\t\t\t<?php\n\t\t\t}\n\t\t\t?>\n\t\t\t</div>\n\t\t\t<?php\n\t\t\treturn ob_get_clean();\n\t\t}\n\t}\n}", "function pintsandcrafts_edge_register_social_icons_widget( $widgets ) {\n\t\t$widgets[] = 'PintsAndCraftsPhpClassClassIconsGroupWidget';\n\t\t\n\t\treturn $widgets;\n\t}", "public function print_section_social_links()\n {\n print 'Enter social links:';\n }", "function insert_ixd_socials($iconSize = null) {\n\n global $ixdContacts;\n\n $fontAwesomeStyle = 'fab';\n\n if (is_null($iconSize)) {\n $iconSize = 'lg';\n }\n\n echo '<div class=\"contacts-wrapper\">';\n echo '<ul>';\n\n foreach ($ixdContacts as $name => $link) {\n\n // if the link is not empty, then add it to list\n if ( !empty($link) ) {\n\n // if it's an email and it should be inclided, add 'mailto:' at the front\n if ( $name == 'envelope' ) {\n $link = 'mailto:' . $link;\n $fontAwesomeStyle = 'fas';\n };\n\n // echo each item as a link wrapped in <li> tag\n echo '<li>\n <a class=\"link contact-link\" href=\"' . $link . '\" target=\"_blank\">\n <i class=\"' . $fontAwesomeStyle .' fa-' . $name . ' fa-' . $iconSize . '\"></i>\n </a>\n </li>';\n };\n };\n\n echo '</ul>';\n echo '</div>';\n}", "public function isIconsEnabled();", "function add_this() { ?>\n<ul class=\"social-share-icons\">\n <li><a class=\"social-icons-item facebook\" target=\"_blank\" href=\"http://www.facebook.com/sharer.php?u=https://novinmarketing.com/article/add-link-in-bio-instagram/\"><i class=\"fa fa-facebook\"></i></a></li>\n <li><a class=\"social-icons-item twitter\" target=\"_blank\" href=\"https://twitter.com/share?url=https://novinmarketing.com/article/add-link-in-bio-instagram/&amp;text=راهنمای قرار دادن لینک در بیو اینستاگرام\"><i class=\"fa fa-twitter\"></i></a></li>\n <li><a class=\"social-icons-item linkedin\" target=\"_blank\" href=\"http://www.linkedin.com/shareArticle?mini=true&amp;url=https://novinmarketing.com/article/add-link-in-bio-instagram/\"><i class=\"fa fa-linkedin\"></i></a></li>\n <li><a class=\"social-icons-item telegram\" target=\"_blank\" href=\"https://telegram.me/share/url?url=https://novinmarketing.com/article/add-link-in-bio-instagram/&amp;text=راهنمای قرار دادن لینک در بیو اینستاگرام\"><i class=\"fa fa-paper-plane\"></i></a></li>\n <li><a class=\"social-icons-item whatsap\" target=\"_blank\" href=\"https://wa.me/whatsappphonenumber/?text=https://novinmarketing.com/article/add-link-in-bio-instagram/\"><i class=\"fa fa-whatsapp\"></i></a></li>\n <li><a class=\"social-icons-item email\" target=\"_blank\" href=\"mailto:?subject=میخواهم این سایت را مشاهده کنید&amp;body=Check out this site https://novinmarketing.com/article/add-link-in-bio-instagram/.\"><i class=\"fa fa-envelope\"></i></a></li>\n <li class=\"post-extra\"><div class=\"post-like\"><a href=\"#\" data-post_id=\"13676\"> <span title=\"I like this article\" class=\"qtip like\"></span> </a><span class=\"count\"><a class=\"like\" rel=\"<?php echo $post->ID; ?>\"><i class=\"fa fa-heart-o\"></i><?php echo likeCount($post->ID); ?> likes</a></span></div></li>\n <li><span class=\"post-comment\"><i class=\"fa fa-comments\"></i></span><span class=\"entry-comments\"><?= get_comments_number( $post->ID ); ?></span></li>\n <li><span class=\"post-comment\"><i class=\"fa fa-eye\"></i></span><span class=\"entry-view\"><?php if ( function_exists( 'get_post_view_count' ) ) {echo get_post_view_count( get_the_ID() );}?></span></li>\n</ul>\n<?php }", "function add_social_login() {\n if( !is_user_logged_in() ) {\n include( 'inc/frontend/login_integration.php' );\n }\n }", "function shopay_register_social_icons_fields ( $wp_customize ) {\n\n /**\n * Social Icons Section\n *\n * Theme Options > General > Social Icons\n * @since 1.0.0\n */\n $wp_customize->add_section( new Shopay_Customize_Section(\n $wp_customize, 'shopay_section_social_icons',\n array(\n 'priority' => 30,\n 'panel' => 'shopay_theme_options_panel',\n 'section' => 'shopay_general_group',\n 'capability' => 'edit_theme_options',\n 'theme_options' => '',\n 'title' => __( 'Social Icons', 'shopay' )\n )\n )\n );\n\n /**\n * Repeater field for Social Icons\n *\n * Theme Options > General > Social Icons\n */\n $wp_customize->add_setting( 'shopay_social_media',\n array(\n 'capability' => 'edit_theme_options',\n 'theme_options' => '',\n 'default' => json_encode(\n array(\n array(\n 'mt_item_icon' => 'fab fa-twitter',\n 'mt_item_link' => '',\n )\n )\n ),\n 'sanitize_callback' => 'shopay_sanitize_repeater'\n )\n );\n\n /**\n * Toggle option for social icons open on new tab.\n *\n * Theme Options > General > Social Icons\n * @since 1.0.0\n */\n $wp_customize->add_setting( 'shopay_social_link_target',\n array(\n 'capability' => 'edit_theme_options',\n 'theme_options' => '',\n 'default' => 'new',\n 'sanitize_callback' => 'shopay_sanitize_select'\n )\n );\n\n $wp_customize->add_control( new Shopay_Control_Toggle(\n $wp_customize, 'shopay_social_link_target',\n array(\n 'priority' => 10,\n 'section' => 'shopay_section_social_icons',\n 'settings' => 'shopay_social_link_target',\n 'label' => __( 'Social Link Target', 'shopay' ),\n 'type' => 'select',\n 'choices' => array(\n 'new' => __( 'New Window', 'shopay' ),\n 'same' => __( 'Same Window', 'shopay' )\n )\n )\n )\n );\n\n $wp_customize->add_control( new Shopay_Control_Repeater(\n $wp_customize, \n 'shopay_social_media',\n array(\n 'priority' => 20,\n 'section' => 'shopay_section_social_icons',\n 'settings' => 'shopay_social_media',\n 'label' => __( 'Social Icons', 'shopay' ),\n 'shopay_box_label_text' => __( 'Social Icon','shopay' ),\n 'shopay_box_add_control_text' => __( 'Add New Icon','shopay' )\n ),\n array(\n 'mt_item_icon' => array(\n 'type' => 'social_icon',\n 'label' => __( 'Icon', 'shopay' ),\n 'description' => __( 'Choose required icon from available list.', 'shopay' )\n ),\n 'mt_item_link' => array(\n 'type' => 'url',\n 'label' => __( 'Icon Link', 'shopay' ),\n 'description' => __( 'Add social icon link.', 'shopay' )\n )\n )\n )\n );\n\n }", "function oenology_enqueue_social_icon_style() {\n\t\n\t// Get Theme options\n\t$oenology_options = oenology_get_options();\n\n\t// If we're not displaying social icons,\n\t// no need to proceed\n\tif( false == $oenology_options['display_social_icons'] ) {\n return;\n\t}\n\t\n\t$socialiconbgposition = apply_filters( 'oenology_social_icon_bg_position', array(\n\t\t'aim' => array(\n\t\t\t'name' => 'aim',\n\t\t\t'black' => array(\n\t\t\t\t'x' => '0',\n\t\t\t\t'y' => '0'\n\t\t\t),\n\t\t\t'gray' => array(\n\t\t\t\t'x' => '0',\n\t\t\t\t'y' => '-90'\n\t\t\t),\n\t\t\t'silver' => array(\n\t\t\t\t'x' => '0',\n\t\t\t\t'y' => '-180'\n\t\t\t)\n\t\t),\n\t\t'facebook' => array(\n\t\t\t'name' => 'facebook',\n\t\t\t'black' => array(\n\t\t\t\t'x' => '0',\n\t\t\t\t'y' => '-270'\n\t\t\t),\n\t\t\t'gray' => array(\n\t\t\t\t'x' => '0',\n\t\t\t\t'y' => '-360'\n\t\t\t),\n\t\t\t'silver' => array(\n\t\t\t\t'x' => '0',\n\t\t\t\t'y' => '-450'\n\t\t\t)\n\t\t),\n\t\t'flickr' => array(\n\t\t\t'name' => 'flickr',\n\t\t\t'black' => array(\n\t\t\t\t'x' => '0',\n\t\t\t\t'y' => '-540'\n\t\t\t),\n\t\t\t'gray' => array(\n\t\t\t\t'x' => '0',\n\t\t\t\t'y' => '-630'\n\t\t\t),\n\t\t\t'silver' => array(\n\t\t\t\t'x' => '0',\n\t\t\t\t'y' => '-720'\n\t\t\t)\n\t\t),\n\t\t'linkedin' => array(\n\t\t\t'name' => 'linkedin',\n\t\t\t'black' => array(\n\t\t\t\t'x' => '0',\n\t\t\t\t'y' => '-810'\n\t\t\t),\n\t\t\t'gray' => array(\n\t\t\t\t'x' => '0',\n\t\t\t\t'y' => '-900'\n\t\t\t),\n\t\t\t'silver' => array(\n\t\t\t\t'x' => '0',\n\t\t\t\t'y' => '-990'\n\t\t\t)\n\t\t),\n\t\t'myspace' => array(\n\t\t\t'name' => 'myspace',\n\t\t\t'black' => array(\n\t\t\t\t'x' => '0',\n\t\t\t\t'y' => '-1080'\n\t\t\t),\n\t\t\t'gray' => array(\n\t\t\t\t'x' => '0',\n\t\t\t\t'y' => '-1170'\n\t\t\t),\n\t\t\t'silver' => array(\n\t\t\t\t'x' => '0',\n\t\t\t\t'y' => '-1260'\n\t\t\t)\n\t\t),\n\t\t'rss' => array(\n\t\t\t'name' => 'rss',\n\t\t\t'black' => array(\n\t\t\t\t'x' => '0',\n\t\t\t\t'y' => '-1350'\n\t\t\t),\n\t\t\t'gray' => array(\n\t\t\t\t'x' => '0',\n\t\t\t\t'y' => '-1440'\n\t\t\t),\n\t\t\t'silver' => array(\n\t\t\t\t'x' => '0',\n\t\t\t\t'y' => '-1530'\n\t\t\t)\n\t\t),\n\t\t'skype' => array(\n\t\t\t'name' => 'skype',\n\t\t\t'black' => array(\n\t\t\t\t'x' => '0',\n\t\t\t\t'y' => '-1620'\n\t\t\t),\n\t\t\t'gray' => array(\n\t\t\t\t'x' => '0',\n\t\t\t\t'y' => '-1710'\n\t\t\t),\n\t\t\t'silver' => array(\n\t\t\t\t'x' => '0',\n\t\t\t\t'y' => '-1800'\n\t\t\t)\n\t\t),\n\t\t'twitter' => array(\n\t\t\t'name' => 'twitter',\n\t\t\t'black' => array(\n\t\t\t\t'x' => '0',\n\t\t\t\t'y' => '-1890'\n\t\t\t),\n\t\t\t'gray' => array(\n\t\t\t\t'x' => '-90',\n\t\t\t\t'y' => '0'\n\t\t\t),\n\t\t\t'silver' => array(\n\t\t\t\t'x' => '-90',\n\t\t\t\t'y' => '-90'\n\t\t\t)\n\t\t),\n\t\t'yahoo' => array(\n\t\t\t'name' => 'yahoo',\n\t\t\t'black' => array(\n\t\t\t\t'x' => '-90',\n\t\t\t\t'y' => '-180'\n\t\t\t),\n\t\t\t'gray' => array(\n\t\t\t\t'x' => '-90',\n\t\t\t\t'y' => '-270'\n\t\t\t),\n\t\t\t'silver' => array(\n\t\t\t\t'x' => '-90',\n\t\t\t\t'y' => '-360'\n\t\t\t)\n\t\t),\n\t\t'youtube' => array(\n\t\t\t'name' => 'youtube',\n\t\t\t'black' => array(\n\t\t\t\t'x' => '-90',\n\t\t\t\t'y' => '-450'\n\t\t\t),\n\t\t\t'gray' => array(\n\t\t\t\t'x' => '-90',\n\t\t\t\t'y' => '-540'\n\t\t\t),\n\t\t\t'silver' => array(\n\t\t\t\t'x' => '-90',\n\t\t\t\t'y' => '-630'\n\t\t\t)\n\t\t)\n\t) );\n\n\t$socialnetworks = oenology_get_social_networks();\n\t$linkcolor = apply_filters( 'oenology_light_color_scheme_linkcolor', 'silver' );\n\t$linkhovercolor = apply_filters( 'oenology_light_color_scheme_linkhovercolor', 'black' );\n\t$colorscheme = oenology_get_color_scheme();\n\tif ( 'dark' == $colorscheme ) {\n\t\t$linkcolor = apply_filters( 'oenology_dark_color_scheme_linkcolor', 'gray' );\n\t\t$linkhovercolor = apply_filters( 'oenology_dark_color_scheme_linknovercolor', 'silver' );\n\t}\n\t\n?>\n\n<style type=\"text/css\">\n<?php \n\tif ( 'none' != $oenology_options['rss_feed'] ) { \n\t\t?>\na[class=\"sidebar-social-icon\"][title ^=\"RSS\"] {\n background: url('<?php echo get_template_directory_uri(); ?>/images/socialiconsprite.png');\n background-position: <?php echo $socialiconbgposition['rss'][$linkcolor]['x'] . 'px ' . $socialiconbgposition['rss'][$linkcolor]['y'] . 'px'; ?>;\n}\na[class=\"sidebar-social-icon\"][title ^=\"RSS\"]:hover {\n background: url('<?php echo get_template_directory_uri(); ?>/images/socialiconsprite.png');\n background-position: <?php echo $socialiconbgposition['rss'][$linkhovercolor]['x'] . 'px ' . $socialiconbgposition['rss'][$linkhovercolor]['y'] . 'px'; ?>;\n}\n\t\t<?php \n\t}\n\tforeach ( $socialnetworks as $network ) {\n\n\t\t$profile = $network['name'] . '_profile';\n\n\t\tif ( isset( $oenology_options[$profile] ) && '' != $oenology_options[$profile] ) {\n\t\t\t// Get background link and hover positions\n\t\t\t$linkposx = $socialiconbgposition[$network['name']][$linkcolor]['x'];\n\t\t\t$linkposy = $socialiconbgposition[$network['name']][$linkcolor]['y'];\n\t\t\t$hoverposx = $socialiconbgposition[$network['name']][$linkhovercolor]['x'];\n\t\t\t$hoverposy = $socialiconbgposition[$network['name']][$linkhovercolor]['y'];\n\t\t\t\n\t\t?>\na[class=\"sidebar-social-icon\"][title ^=\"<?php echo $network['title']; ?>\"] {\n\tbackground: url('<?php echo get_template_directory_uri(); ?>/images/socialiconsprite.png');\n\tbackground-position: <?php echo $linkposx . 'px ' . $linkposy . 'px'; ?>;\n}\na[class=\"sidebar-social-icon\"][title ^=\"<?php echo $network['title']; ?>\"]:hover {\n\tbackground: url('<?php echo get_template_directory_uri(); ?>/images/socialiconsprite.png');\n\tbackground-position: <?php echo $hoverposx . 'px ' . $hoverposy . 'px'; ?>;\n}\n\t\t<?php \n\t\t} \n\t}\n\t?>\n</style>\n\t\n<?php \n}", "public static function social_icons( $icons, $css_class ){\n\n ?>\n <div class=\"<?php echo esc_attr($css_class); ?>\">\n <?php foreach( $icons as $icon ): ?>\n <a href=\"<?php echo esc_url($icon['url']); ?>\"><i class=\"fab fa-<?php echo esc_attr($icon['name']); ?>\"></i></a>\n <?php endforeach; ?>\n </div>\n <?php\n\n }", "function toolbelt_social_menu_icons() {\n\n\t$social_links_icons = array(\n\t\t'behance.net' => 'behance',\n\t\t// 'codepen.io' => 'codepen',\n\t\t'deviantart.com' => 'deviantart',\n\t\t'dribbble.com' => 'dribbble',\n\t\t'facebook.com' => 'facebook',\n\t\t'flickr.com' => 'flickr',\n\t\t// 'foursquare.com' => 'foursquare',\n\t\t'github.com' => 'github',\n\t\t'instagram.com' => 'instagram',\n\t\t'linkedin.com' => 'linkedin',\n\t\t'mailto:' => 'email',\n\t\t'medium.com' => 'medium',\n\t\t'pinterest.com' => 'pinterest',\n\t\t// 'getpocket.com' => 'get-pocket',\n\t\t'reddit.com' => 'reddit',\n\t\t'skype.com' => 'skype',\n\t\t'skype:' => 'skype',\n\t\t// 'slideshare.net' => 'slideshare',\n\t\t'snapchat.com' => 'snapchat',\n\t\t'soundcloud.com' => 'soundcloud',\n\t\t'tumblr.com' => 'tumblr',\n\t\t'twitch.tv' => 'twitch',\n\t\t'twitter.com' => 'twitter',\n\t\t'vimeo.com' => 'vimeo',\n\t\t'vk.com' => 'vk',\n\t\t// 'weibo.com' => 'weibo',\n\t\t'wordpress.org' => 'wordpress',\n\t\t'wordpress.com' => 'wordpress',\n\t\t// 'yelp.com' => 'yelp',\n\t\t'youtube.com' => 'youtube',\n\t);\n\n\treturn apply_filters( 'toolbelt_social_menu_icons', $social_links_icons );\n\n}", "function my_epl_custom_social_icons_filter( $html ) {\n\n\t// Add the new icon\n\t$html .= my_epl_get_custom_author_html();\n\n\treturn $html;\n}", "function toptal_add_social_share_icons($content) {\n \tglobal $post;\n // echo '</pre>'; print_r(get_post_types()); exit;\n $html = '';\n\n if($this->pre_validate($content, $post->ID) !== TRUE) return $content;\n\n if(get_option('toptal_ss_after_post_content') == 1) {\n $html = $this->toptal_social_html($post->ID);\n }\n \treturn $content .= $html;\n\t}", "function overlap_get_social_icons(){\r\n \r\n $icons = array(\r\n 'ol-behance'\t\t\t=> 'Behance',\r\n 'ol-deviantart'\t\t\t=> 'DeviantArt',\r\n 'ol-digg'\t\t\t\t=> 'Digg',\r\n 'ol-dribbble'\t\t\t=> 'Dribbble',\r\n 'ol-dropbox'\t\t\t=> 'Dropbox',\r\n 'ol-facebook'\t\t\t=> 'Facebook',\r\n 'ol-flickr'\t\t\t\t=> 'Flickr',\r\n 'ol-github' => 'Github',\r\n 'ol-google-plus' => 'Google+',\r\n 'ol-instagram'\t\t\t=> 'Instagram',\r\n 'ol-linkedin'\t\t\t=> 'LinkedIn',\r\n 'ol-pinterest' => 'Pinterest',\r\n 'ol-reddit'\t\t\t\t=> 'Reddit',\r\n 'ol-rss'\t\t\t\t=> 'RSS',\r\n 'ol-skype'\t\t\t\t=> 'Skype',\r\n 'ol-soundcloud'\t\t\t=> 'Soundcloud',\r\n 'ol-tumbler'\t\t\t=> 'Tumblr',\r\n 'ol-twitter'\t\t\t=> 'Twitter',\r\n 'ol-vimeo'\t\t\t\t=> 'Vimeo',\r\n 'ol-vkontakte' => 'VK',\r\n 'ol-yahoo'\t\t\t\t=> 'Yahoo',\r\n 'ol-youtube'\t\t\t=> 'Youtube',\r\n );\r\n\r\n return apply_filters('overlap_social_media_icons', $icons);\r\n}", "function social_icons_init() {\n\n register_sidebar( array(\n 'name' => 'Social Icons sidebar',\n 'id' => 'social-icons',\n 'before_widget' => '',\n 'after_widget' => '',\n 'before_title' => '',\n 'after_title' => '',\n ) );\n}", "function fusion_builder_get_custom_social_networks() {\n\n\t$fusion_settings = fusion_get_fusion_settings();\n\t$social_links_array = [];\n\t$social_media_icons = $fusion_settings->get( 'social_media_icons' );\n\tif ( is_array( $social_media_icons ) && isset( $social_media_icons['icon'] ) && is_array( $social_media_icons['icon'] ) ) {\n\t\tforeach ( $social_media_icons['icon'] as $key => $icon ) {\n\t\t\tif ( 'custom' === $icon && isset( $social_media_icons['url'][ $key ] ) && ! empty( $social_media_icons['url'][ $key ] ) ) {\n\t\t\t\t$social_links_array[ $key ] = [\n\t\t\t\t\t'url' => $social_media_icons['url'][ $key ],\n\t\t\t\t\t'title' => $social_media_icons['custom_title'][ $key ],\n\t\t\t\t];\n\t\t\t}\n\t\t}\n\t}\n\treturn $social_links_array;\n}", "public function getSocialLinks()\n {\n $socialite_enable = [];\n $socialite_links = '';\n\n if (strlen(getenv('BITBUCKET_CLIENT_ID'))) {\n $socialite_enable[] = link_to_route('frontend.auth.social.login', trans('labels.frontend.auth.login_with', ['social_media' => 'Bit Bucket']), 'bitbucket');\n }\n\n if (strlen(getenv('FACEBOOK_CLIENT_ID'))) {\n $socialite_enable[] = link_to_route('frontend.auth.social.login', trans('labels.frontend.auth.login_with', ['social_media' => 'Facebook']), 'facebook');\n }\n\n if (strlen(getenv('GOOGLE_CLIENT_ID'))) {\n $socialite_enable[] = link_to_route('frontend.auth.social.login', trans('labels.frontend.auth.login_with', ['social_media' => 'Google']), 'google');\n }\n\n if (strlen(getenv('GITHUB_CLIENT_ID'))) {\n $socialite_enable[] = link_to_route('frontend.auth.social.login', trans('labels.frontend.auth.login_with', ['social_media' => 'Github']), 'github');\n }\n\n if (strlen(getenv('LINKEDIN_CLIENT_ID'))) {\n $socialite_enable[] = link_to_route('frontend.auth.social.login', trans('labels.frontend.auth.login_with', ['social_media' => 'Linked In']), 'linkedin');\n }\n\n if (strlen(getenv('TWITTER_CLIENT_ID'))) {\n $socialite_enable[] = link_to_route('frontend.auth.social.login', trans('labels.frontend.auth.login_with', ['social_media' => 'Twitter']), 'twitter');\n }\n\n for ($i = 0; $i < count($socialite_enable); $i++) {\n $socialite_links .= ($socialite_links != '' ? '&nbsp;|&nbsp;' : '').$socialite_enable[$i];\n }\n\n return $socialite_links;\n }", "protected function getSocialLinks()\n {\n $socialite_enable = [];\n $socialite_links = '';\n\n if (getenv('BITBUCKET_CLIENT_ID') != '') {\n $socialite_enable[] = link_to_route('auth.provider', trans('labels.login_with', ['social_media' => 'Bit Bucket']), 'bitbucket');\n }\n\n if (getenv('FACEBOOK_CLIENT_ID') != '') {\n $socialite_enable[] = link_to_route('auth.provider', trans('labels.login_with', ['social_media' => 'Facebook']), 'facebook');\n }\n\n if (getenv('GOOGLE_CLIENT_ID') != '') {\n $socialite_enable[] = link_to_route('auth.provider', trans('labels.login_with', ['social_media' => 'Google']), 'google');\n }\n\n if (getenv('GITHUB_CLIENT_ID') != '') {\n $socialite_enable[] = link_to_route('auth.provider', trans('labels.login_with', ['social_media' => 'Github']), 'github');\n }\n\n if (getenv('LINKEDIN_CLIENT_ID') != '') {\n $socialite_enable[] = link_to_route('auth.provider', trans('labels.login_with', ['social_media' => 'Linked In']), 'linkedin');\n }\n\n if (getenv('TWITTER_CLIENT_ID') != '') {\n $socialite_enable[] = link_to_route('auth.provider', trans('labels.login_with', ['social_media' => 'Twitter']), 'twitter');\n }\n\n for ($i = 0; $i < count($socialite_enable); $i++) {\n $socialite_links .= ($socialite_links != '' ? '&nbsp;|&nbsp;' : '').$socialite_enable[$i];\n }\n\n return $socialite_links;\n }", "function sensive_social_load_widget()\n{\n register_widget('sensive_social');\n}", "public function sc_atc_icons() {\n\n\t\t$options \t= get_option( $this->group . '-options' );\n\t\t$option \t= isset( $options['sc-atc-icons']) ? $options['sc-atc-icons'] : 1;\n\t\t$id \t\t= $this->group.'-options[sc-atc-icons]';\n\t\t?>\n\t\t<input type=\"hidden\" name=\"<?php echo $id; ?>\" value=\"false\">\n\t\t<input type=\"checkbox\" id=\"<?php echo $id; ?>\" name=\"<?php echo $id; ?>\" value=\"1\" <?php checked($option, 1); ?> />\n\t\t<label for=\"<?php echo $id; ?>\">Show preloader/check icon while adding to cart.</label> <?php\n\t}", "function codeless_get_entry_tool_share(){\n \n $output = '<a href=\"#\" class=\"show-share-buttons\"><i class=\"' . apply_filters( 'codeless_entry_tool_share_icon', 'cl-icon-share2' ) . '\"></i></a>';\n $output .= '<div class=\"share-buttons hidden\">';\n \n $shares = codeless_share_buttons();\n \n if( !empty( $shares ) ){\n foreach( $shares as $social_id => $data ){\n $output .= '<a href=\"' . $data['link'] . '\" title=\"Social Share ' . $social_id . '\" target=\"_blank\"><i class=\"' . $data['icon'] .'\"></i></a>';\n }\n }\n $output .= '</div>';\n \n return $output;\n}", "function tech_social_icons($home=true){\n\tglobal $tech, $post;\n\t$short_link = home_url().\"/?p=\".$post->ID;\n\t$home_icons = explode(',' , $tech['home_social_icons']);\n\t$single_icons = explode(',' , $tech['single_social_icons']);\n\t$image = get_template_directory_uri() . \"/images/icons\";\n\t$link = get_permalink();\n\t$title = $post->post_title;\n\t$email_title = preg_replace('/&/i', 'and',$title);\n\t$url_title = urlencode($post->post_title);\n\t$excerpt = urlencode(wp_trim_excerpt($post->post_excerpt));\n\t$excerpt_mail = wp_trim_excerpt($post->post_excerpt);\n\t$excerpt_mail = preg_replace(\"/&#?[a-z0-9]{2,8};/i\",\"\",$excerpt_mail);\n\t$home_title = urlencode(get_bloginfo( 'name' ));\n\t$social_links = array(\n\t\t\"Delicious\" => \"<a href=\\\"http://delicious.com/post?url={$link}&amp;title={$url_title}\\\" title=\\\"\" . __('del.icio.us this!','techozoic') . \"\\\" target=\\\"_blank\\\"><img src=\\\"{$image}/delicious_16.png\\\" alt=\\\"\" . __('del.icio.us this!','techozoic') . \"\\\" /></a>\",\n\t\t\"Digg\" => \"<a href=\\\"http://digg.com/submit?phase=2&amp;url={$link}&amp;title={$url_title} \\\" title=\\\"\" . __('Digg this!','techozoic') . \"\\\" target=\\\"_blank\\\"><img src=\\\"{$image}/digg_16.png\\\" alt=\\\"\" . __('Digg this!','techozoic') . \"\\\"/></a>\",\n\t\t\"Email\" => \"<a href=\\\"mailto:?subject={$email_title}&amp;body={$excerpt_mail} {$link}\\\" title=\\\"\" . __('Share this by email.','techozoic') . \"\\\"><img src=\\\"{$image}/email_16.png\\\" alt=\\\"\" . __('Share this by email.','techozoic') . \"\\\"/></a>\",\n\t\t\"Facebook\" => \"<a href=\\\"http://www.facebook.com/share.php?u={$link}&amp;t={$url_title}\\\" title=\\\"\" . __('Share on Facebook!','techozoic') . \"\\\" target=\\\"_blank\\\"><img src=\\\"{$image}/facebook_16.png\\\" alt=\\\"\" . __('Share on Facebook!','techozoic') . \"\\\"/></a>\",\n\t\t\"LinkedIn\" => \"<a href =\\\"http://www.linkedin.com/shareArticle?mini=true&amp;url={$link}&amp;title={$url_title}&amp;summary={$excerpt}&amp;source={$home_title}\\\" title=\\\"\" . __('Share on LinkedIn!','techozoic') . \"\\\" target=\\\"_blank\\\"><img src=\\\"{$image}/linkedin_16.png\\\" alt=\\\"\" . __('Share on LinkedIn!','techozoic') . \"\\\" /></a>\",\n\t\t\"MySpace\" => \"<a href=\\\"http://www.myspace.com/Modules/PostTo/Pages/?u={$link}&amp;t={$url_title}\\\" title=\\\"\" . __('Share on Myspace!','techozoic') . \"\\\" target=\\\"_blank\\\"><img src=\\\"{$image}/myspace_16.png\\\" alt=\\\"\" . __('Share on Myspace!','techozoic') . \"\\\"/></a>\",\n\t\t\"NewsVine\" => \"<a href=\\\"http://www.newsvine.com/_tools/seed&amp;save?u={$link}\\\" title=\\\"\" . __('Share on NewsVine!','techozoic') . \"\\\" target=\\\"_blank\\\"><img src=\\\"{$image}/newsvine_16.png\\\" alt=\\\"\" . __('Share on NewsVine!','techozoic') . \"\\\"/></a>\",\n\t\t\"StumbleUpon\" => \"<a href=\\\"http://www.stumbleupon.com/submit?url={$link}&amp;title={$url_title}\\\" title=\\\"\" . __('Stumble Upon this!','techozoic') . \"\\\" target=\\\"_blank\\\"><img src=\\\"{$image}/stumbleupon_16.png\\\" alt=\\\"\" . __('Stumble Upon this!','techozoic') . \"\\\"/></a>\",\n\t\t\"Twitter\" => \"<a href=\\\"http://twitter.com/home?status=Reading%20{$url_title}%20on%20{$short_link}\\\" title=\\\"\" . __('Tweet this!','techozoic') . \"\\\" target=\\\"_blank\\\"><img src=\\\"{$image}/twitter_16.png\\\" alt=\\\"\" . __('Tweet this!','techozoic') . \"\\\"/></a>\",\n\t\t\"Reddit\" => \"<a href=\\\"http://reddit.com/submit?url={$link}&amp;title={$url_title}\\\" title=\\\"\" . __('Share on Reddit!','techozoic') . \"\\\" target=\\\"_blank\\\"><img src=\\\"{$image}/reddit_16.png\\\" alt=\\\"\" . __('Share on Reddit!','techozoic') . \"\\\" /></a>\",\n\t\t\"RSS Icon\" => \"<a href=\\\"\".get_post_comments_feed_link().\"\\\" title=\\\"\".__('Subscribe to Feed','techozoic').\"\\\"><img src=\\\"{$image}/rss_16.png\\\" alt=\\\"\" . __('RSS 2.0','techozoic') . \"\\\"/></a>\");\n\tif ($home == true){\n\t\tforeach ($home_icons as $soc){\n\t\t\techo $social_links[$soc] .\"&nbsp;\";\n\t\t}\n\t} else {\n\t\tforeach ($single_icons as $soc){\n\t\t\techo $social_links[$soc] .\"&nbsp;\";\n\t\t}\n\t}\n}", "public function display_header() {\n\t\tif( ! $this->smart ) {\n?>\n<style type=\"text/css\">\n\t.sd-social-icon-text li.share-scoopit a.sd-button > span {\n\t\tbackground: url('<?php echo plugins_url( 'scoopit.png', __FILE__ ); ?>') no-repeat;\n\t\tpadding-left: 20px;\n\t}\n\n\t.sd-social-icon .sd-content ul li[class*='share-'].share-scoopit a.sd-button {\n\t\tbackground: #6cab36 url('<?php echo plugins_url( 'scoopit-white.png', __FILE__ ); ?>') no-repeat;\n\t\tcolor: #fff !important;\n\t\twidth: 16px;\n\t\theight: 16px;\n\t\ttop: 16px;\n\t}\n</style>\n<?php\n\t\t}\n\t}", "function codeless_get_team_social_list(){\n $list = array(\n array( 'id' => 'twitter', 'icon' => 'cl-icon-twitter' ),\n array( 'id' => 'facebook', 'icon' => 'cl-icon-facebook-f' ),\n array( 'id' => 'linkedin', 'icon' => 'cl-icon-linkedin' ),\n array( 'id' => 'whatsapp', 'icon' => 'cl-icon-whatsapp' ),\n array( 'id' => 'pinterest', 'icon' => 'cl-icon-pinterest' ),\n array( 'id' => 'google', 'icon' => 'cl-icon-google' ),\n );\n\n return apply_filters( 'codeless_team_social_list', $list );\n}", "public function getVisibilityIcon()\n {\n\n if ($this['visible'] == 1) {\n echo '<i class=\"far fa-eye text-white\" data-toggle=\"tooltip\" data-placement=\"right\" title=\"Visible\"></i>';\n } else {\n echo '<i class=\"fas fa-eye-slash text-white\" data-toggle=\"tooltip\" data-placement=\"right\" title=\"Not visible\"></i>';\n }\n\n }", "public function getIconSelector($socialNetwork);", "public function jetpack_sharing_display() {\n\t\tif ( function_exists( 'sharing_display' ) ) {\n\t\t\tsharing_display( '', true );\n\t\t}\n\t}", "public function show(Social $social)\n {\n //\n }", "public function show(Social $social)\n {\n //\n }", "function zp_printExtensionStatusIcon() {\n\tglobal $_zp_current_zenpage_news, $_zp_themeroot;\n\tif($_zp_current_zenpage_news->inNewsCategory(\"officially-supported\")) { ?>\n\t\t <a href=\"#officially-supported\"><img class=\"pluginstatusicon\" src=\"<?php echo $_zp_themeroot; ?>/images/accept_green.png\" title=\"Officially supported\" /></a>\n\t\t<?php \n\t} else if ($_zp_current_zenpage_news->inNewsCategory('unsupported-plugin-github') || $_zp_current_zenpage_news->inNewsCategory('unsupported-misc-github')) { ?>\n\t\t<a href=\"#third-party-hosted-unsupported\"><img class=\"pluginstatusicon\" src=\"<?php echo $_zp_themeroot; ?>/images/question_blue.png\" title=\"Third party hosted on GitHub- not officially supported\" /></a>\n\t\t<?php \n\t} else if ($_zp_current_zenpage_news->inNewsCategory('unsupported-plugin-selfhosted')) { ?>\n\t\t<a href=\"#third-party-unsupported\"><img class=\"pluginstatusicon\" src=\"<?php echo $_zp_themeroot; ?>/images/question_orange.png\" title=\"Third party - not officially supported\" /></a>\n\t\t<?php \n\t}\n}", "protected function _initSocialSetup()\n {\n $config = Zend_Registry::get('config');\n $view = $this->getPluginResource('view')->getView();\n $view->twitterButtons()->setTwitterAccount(\n $config->twitter->account\n );\n $view->facebookButtons()\n ->setAppId($config->facebook->appId)\n ->setHref($config->facebook->href)\n ->setSend($config->facebook->send)\n ->setLayout($config->facebook->layout)\n ->setWidth($config->facebook->width)\n ->setShowFaces($config->facebook->faces)\n ->setFont($config->facebook->font);\n \n $view->googlePlusButtons()\n ->setSize(My_View_Helper_GooglePlusButtons::GOOGLE_PLUS_SIZE_MEDIUM);\n }", "protected function setVisibleSocialNetwork()\n {\n $allowedSocialNetwork = [];\n $canShare = $this->canShare();\n $socialNetworks = $this->configurator->getSocialNetworks();\n $isMobile = $this->isMobile();\n\n foreach ($socialNetworks as $socialName => $social) {\n $okModule = true;\n //check if the platform has che required plugin\n if (!empty($social['required_module'])) {\n $module = \\Yii::$app->getModule($social['required_module']);\n if (empty($module)) {\n $okModule = false;\n }\n }\n\n $showSocial = true;\n if (!empty($social['visibility']) && $social['visibility'] == ConfiguratorSocialShare::VISIBILITY_ONLY_LOGGED) {\n if (\\Yii::$app->user->isGuest) {\n $showSocial = false;\n }\n }\n\n if ($showSocial) {\n if (!empty($social['visibility']) && $social['visibility'] == ConfiguratorSocialShare::VISIBILITY_ALWAYS && $okModule) {\n $allowedSocialNetwork[$socialName] = $social;\n } else if ($canShare && $okModule) {\n if (!empty($social['visibility']) && $social['visibility'] == ConfiguratorSocialShare::VISIBILITY_ONLY_MOBILE) {\n if ($isMobile) {\n $allowedSocialNetwork[$socialName] = $social;\n }\n } else {\n $allowedSocialNetwork[$socialName] = $social;\n }\n }\n }\n }\n if ($this->isProtected == false || $this->isComment == true) {\n if (isset($allowedSocialNetwork['email'])) {\n unset($allowedSocialNetwork['email']);\n }\n if (isset($allowedSocialNetwork['ownNetwork'])) {\n unset($allowedSocialNetwork['ownNetwork']);\n }\n }\n $this->configurator->socialNetworks = $allowedSocialNetwork;\n }", "function wbi_register_social_widget() {\n register_widget( 'Waianubl_Social_Widget' );\n}", "function wsl_component_networks_setup()\n{\n\t// HOOKABLE:\n\tdo_action( \"wsl_component_networks_setup_start\" );\n\n\tGLOBAL $WORDPRESS_SOCIAL_LOGIN_PROVIDERS_CONFIG;\n\n\t$assets_base_url = WORDPRESS_SOCIAL_LOGIN_PLUGIN_URL . 'assets/img/16x16/';\n\t$assets_setup_base_url = WORDPRESS_SOCIAL_LOGIN_PLUGIN_URL . 'assets/img/setup/';\n\n\t// save settings?\n\tif( isset( $_REQUEST[\"enable\"] ) && $_REQUEST[\"enable\"] )\n\t{\n\t\t$provider_id = $_REQUEST[\"enable\"];\n\n\t\tupdate_option( 'wsl_settings_' . $provider_id . '_enabled', 1 );\n\t}\n?>\n<script>\n\tfunction toggleproviderkeys(idp)\n\t{\n\t\tif(typeof jQuery==\"undefined\")\n\t\t{\n\t\t\talert( \"Error: WordPress Social Login require jQuery to be installed on your wordpress in order to work!\" );\n\n\t\t\treturn;\n\t\t}\n\n\t\tif(jQuery('#wsl_settings_' + idp + '_enabled').val()==1)\n\t\t{\n\t\t\tjQuery('.wsl_tr_settings_' + idp).show();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tjQuery('.wsl_tr_settings_' + idp).hide();\n\t\t\tjQuery('.wsl_div_settings_help_' + idp).hide();\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tfunction toggleproviderhelp(idp)\n\t{\n\t\tif(typeof jQuery==\"undefined\")\n\t\t{\n\t\t\talert( \"Error: WordPress Social Login require jQuery to be installed on your wordpress in order to work!\" );\n\n\t\t\treturn false;\n\t\t}\n\n\t\tjQuery('.wsl_div_settings_help_' + idp).toggle();\n\n\t\treturn false;\n\t}\n</script>\n<?php\n\tforeach( $WORDPRESS_SOCIAL_LOGIN_PROVIDERS_CONFIG AS $item ):\n\t\t$provider_id = isset( $item[\"provider_id\"] ) ? $item[\"provider_id\"] : '';\n\t\t$provider_name = isset( $item[\"provider_name\"] ) ? $item[\"provider_name\"] : '';\n\n\t\t$require_client_id = isset( $item[\"require_client_id\"] ) ? $item[\"require_client_id\"] : '';\n\t\t$require_api_key = isset( $item[\"require_api_key\"] ) ? $item[\"require_api_key\"] : '';\n\t\t$provide_email = isset( $item[\"provide_email\"] ) ? $item[\"provide_email\"] : '';\n\n\t\t$provider_new_app_link = isset( $item[\"new_app_link\"] ) ? $item[\"new_app_link\"] : '';\n\t\t$provider_userguide_section = isset( $item[\"userguide_section\"] ) ? $item[\"userguide_section\"] : '';\n\n\t\t$provider_callback_url = \"\" ;\n\n\t\tif( ! ( ( isset( $item[\"default_network\"] ) && $item[\"default_network\"] ) || get_option( 'wsl_settings_' . $provider_id . '_enabled' ) ) )\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\n\t\t// default endpoint_url\n\t\t$endpoint_url = WORDPRESS_SOCIAL_LOGIN_HYBRIDAUTH_ENDPOINT_URL;\n\n\t\tif( isset( $item[\"callback\"] ) && $item[\"callback\"] )\n\t\t{\n\t\t\t// $provider_callback_url = '<span style=\"color:green\">' . $endpoint_url . 'hauth.done=' . $provider_id . '</span>';\n\t\t\t$provider_callback_url = '<span style=\"color:green\">' . $endpoint_url . 'callbacks/' . strtolower($provider_id) . '.php</span>';\n\t\t\t$provider_callback_querystring_url = '<span style=\"color:green\">' . $endpoint_url . '?hauth.done=' . $provider_id . '</span>';\n\t\t}\n\n\t\tif( isset( $item[\"custom_callback\"] ) && $item[\"custom_callback\"] )\n\t\t{\n\t\t\t$provider_callback_url = '<span style=\"color:green\">' . $endpoint_url . 'endpoints/' . strtolower( $provider_id ) . '.php</span>';\n\t\t}\n\n\t\t$setupsteps = 0;\n?>\n\t\t<a name=\"setup<?php echo strtolower( $provider_id ) ?>\"></a>\n\t\t<div class=\"stuffbox\" id=\"namediv\">\n\t\t\t<h3>\n\t\t\t\t<label class=\"wp-neworks-label\">\n\t\t\t\t\t<img alt=\"<?php echo $provider_name ?>\" title=\"<?php echo $provider_name ?>\" src=\"<?php echo $assets_base_url . strtolower( $provider_id ) . '.png' ?>\" style=\"vertical-align: top;width:16px;height:16px;\" /> <?php _wsl_e( $provider_name, 'wordpress-social-login' ); ?>\n\t\t\t\t</label>\n\t\t\t</h3>\n\t\t\t<div class=\"inside\">\n\t\t\t\t<table class=\"form-table editcomment\">\n\t\t\t\t\t<tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td style=\"width:125px\"><?php _wsl_e(\"Enabled\", 'wordpress-social-login') ?>:</td>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<select\n\t\t\t\t\t\t\t\t\tname=\"<?php echo 'wsl_settings_' . $provider_id . '_enabled' ?>\"\n\t\t\t\t\t\t\t\t\tid=\"<?php echo 'wsl_settings_' . $provider_id . '_enabled' ?>\"\n\t\t\t\t\t\t\t\t\tonChange=\"toggleproviderkeys('<?php echo $provider_id; ?>')\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<option value=\"1\" <?php if( get_option( 'wsl_settings_' . $provider_id . '_enabled' ) ) echo \"selected\"; ?> ><?php _wsl_e(\"Yes\", 'wordpress-social-login') ?></option>\n\t\t\t\t\t\t\t\t\t<option value=\"0\" <?php if( ! get_option( 'wsl_settings_' . $provider_id . '_enabled' ) ) echo \"selected\"; ?> ><?php _wsl_e(\"No\", 'wordpress-social-login') ?></option>\n\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t<td style=\"width:160px\">&nbsp;</td>\n\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t<?php if ( $provider_new_app_link ){ ?>\n\t\t\t\t\t\t\t<?php if ( $require_client_id ){ // key or id ? ?>\n\t\t\t\t\t\t\t\t<tr valign=\"top\" <?php if( ! get_option( 'wsl_settings_' . $provider_id . '_enabled' ) ) echo 'style=\"display:none\"'; ?> class=\"wsl_tr_settings_<?php echo $provider_id; ?>\" >\n\t\t\t\t\t\t\t\t\t<td><?php _wsl_e(\"Application ID\", 'wordpress-social-login') ?>:</td>\n\t\t\t\t\t\t\t\t\t<td><input dir=\"ltr\" type=\"text\" name=\"<?php echo 'wsl_settings_' . $provider_id . '_app_id' ?>\" value=\"<?php echo get_option( 'wsl_settings_' . $provider_id . '_app_id' ); ?>\" ></td>\n\t\t\t\t\t\t\t\t\t<td><a href=\"javascript:void(0)\" onClick=\"toggleproviderhelp('<?php echo $provider_id; ?>')\"><?php _wsl_e(\"Where do I get this info?\", 'wordpress-social-login') ?></a></td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<?php } else { ?>\n\t\t\t\t\t\t\t\t<tr valign=\"top\" <?php if( ! get_option( 'wsl_settings_' . $provider_id . '_enabled' ) ) echo 'style=\"display:none\"'; ?> class=\"wsl_tr_settings_<?php echo $provider_id; ?>\" >\n\t\t\t\t\t\t\t\t\t<td><?php _wsl_e(\"Application Key\", 'wordpress-social-login') ?>:</td>\n\t\t\t\t\t\t\t\t\t<td><input dir=\"ltr\" type=\"text\" name=\"<?php echo 'wsl_settings_' . $provider_id . '_app_key' ?>\" value=\"<?php echo get_option( 'wsl_settings_' . $provider_id . '_app_key' ); ?>\" ></td>\n\t\t\t\t\t\t\t\t\t<td><a href=\"javascript:void(0)\" onClick=\"toggleproviderhelp('<?php echo $provider_id; ?>')\"><?php _wsl_e(\"Where do I get this info?\", 'wordpress-social-login') ?></a></td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<?php }; ?>\n\n\t\t\t\t\t\t\t<?php if( ! $require_api_key ) { ?>\n\t\t\t\t\t\t\t\t<tr valign=\"top\" <?php if( ! get_option( 'wsl_settings_' . $provider_id . '_enabled' ) ) echo 'style=\"display:none\"'; ?> class=\"wsl_tr_settings_<?php echo $provider_id; ?>\" >\n\t\t\t\t\t\t\t\t\t<td><?php _wsl_e(\"Application Secret\", 'wordpress-social-login') ?>:</td>\n\t\t\t\t\t\t\t\t\t<td><input dir=\"ltr\" type=\"text\" name=\"<?php echo 'wsl_settings_' . $provider_id . '_app_secret' ?>\" value=\"<?php echo get_option( 'wsl_settings_' . $provider_id . '_app_secret' ); ?>\" ></td>\n\t\t\t\t\t\t\t\t\t<td><a href=\"javascript:void(0)\" onClick=\"toggleproviderhelp('<?php echo $provider_id; ?>')\"><?php _wsl_e(\"Where do I get this info?\", 'wordpress-social-login') ?></a></td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<?php } ?>\n\t\t\t\t\t\t<?php } // if require registration ?>\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\n\t\t\t\t<?php if ( get_option( 'wsl_settings_' . $provider_id . '_enabled' ) ) : ?>\n\t\t\t\t\t<?php if ( $provider_id == \"Steam\" ) : ?>\n\t\t\t\t\t\t<div class=\"fade updated\">\n\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t<b><?php _wsl_e(\"Notes\", 'wordpress-social-login') ?>:</b>\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t 1. <?php echo sprintf( _wsl__(\"<b>%s</b> do not require an external application, however if the Web API Key is provided, then WSL will be able to get more information about the connected %s users\", 'wordpress-social-login'), $provider_name , $provider_name ) ?>.\n\t\t\t\t\t\t\t\t<br />2. <?php echo sprintf( _wsl__(\"<b>%s</b> do not provide their user's email address and by default a random email will then be generated for them instead\", 'wordpress-social-login'), $provider_name ) ?>.\n\n\t\t\t\t\t\t\t\t<?php _wsl_e('To change this behaviour and to force new registered users to provide their emails before they get in, goto <b><a href=\"options-general.php?page=wordpress-social-login&wslp=bouncer\">Bouncer</a></b> and enable <b>Profile Completion</b>', 'wordpress-social-login') ?>.\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t<?php elseif ( $provider_new_app_link && strlen( trim( get_option( 'wsl_settings_' . $provider_id . '_app_secret' ) ) ) == 0 ) : ?>\n\t\t\t\t\t\t<div class=\"fade error\">\n\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t<?php echo sprintf( _wsl__('<b>%s</b> requires that you create an external application linking your website to their API. To know how to create this application, click on &ldquo;Where do I get this info?&rdquo; and follow the steps', 'wordpress-social-login'), $provider_name, $provider_name ) ?>.\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t<?php elseif ( in_array( $provider_id, array( \"Twitter\", \"Identica\", \"Tumblr\", \"Goodreads\", \"500px\", \"Vkontakte\", \"Gowalla\", \"Steam\" ) ) ) : ?>\n\t\t\t\t\t\t<div class=\"fade updated\">\n\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t<b><?php _wsl_e(\"Note\", 'wordpress-social-login') ?>:</b>\n\n\t\t\t\t\t\t\t\t<?php echo sprintf( _wsl__(\"<b>%s</b> do not provide their user's email address and by default a random email will then be generated for them instead\", 'wordpress-social-login'), $provider_name ) ?>.\n\n\t\t\t\t\t\t\t\t<?php _wsl_e('To change this behaviour and to force new registered users to provide their emails before they get in, goto <b><a href=\"options-general.php?page=wordpress-social-login&wslp=bouncer\">Bouncer</a></b> and enable <b>Profile Completion</b>', 'wordpress-social-login') ?>.\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t<?php endif; ?>\n\t\t\t\t<?php endif; ?>\n\n\t\t\t\t<br />\n\t\t\t\t<div\n\t\t\t\t\tclass=\"wsl_div_settings_help_<?php echo $provider_id; ?>\"\n\t\t\t\t\tstyle=\"margin: 0 20px; <?php if( isset( $_REQUEST[\"enable\"] ) && ! isset( $_REQUEST[\"settings-updated\"] ) && $_REQUEST[\"enable\"] == $provider_id ) echo \"-\"; // <= lolz ?>display:none;\"\n\t\t\t\t>\n\t\t\t\t\t<hr class=\"wsl\" />\n\t\t\t\t\t<?php if ( $provider_id == \"Steam\" ) : ?>\n\t\t\t\t\t<?php elseif ( $provider_new_app_link ) : ?>\n\t\t\t\t\t\t<?php _wsl_e('<span style=\"color:#CB4B16;\">Application <strong>ID</strong> and <strong>Secret</strong></span> (also sometimes referred as <span style=\"color:#CB4B16;\">API</span> key and secret or <span style=\"color:#CB4B16;\">Consumer</span> key and secret or <span style=\"color:#CB4B16;\">Client</span> ID and secret) are what we call an application credentials', 'wordpress-social-login') ?>.\n\n\t\t\t\t\t\t<?php echo sprintf( _wsl__( 'The application will link your website to <b>%s\\'s API</b> and it\\'s needed in order for <b>%s\\'s Users</b> to access your website', 'wordpress-social-login'), $provider_name, $provider_name ) ?>.\n\t\t\t\t\t\t<br />\n\t\t\t\t\t\t<br />\n\n\t\t\t\t\t\t<?php echo sprintf( _wsl__('To enable authentication with this provider and to register a new <b>%s API Application</b>, follow the steps', 'wordpress-social-login'), $provider_name ) ?>\n\t\t\t\t\t\t:<br />\n\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t\t<p><?php echo sprintf( _wsl__('<b>Done.</b> Nothing more required for <b>%s</b>', 'wordpress-social-login'), $provider_name) ?>.</p>\n\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t<div style=\"margin-left:20px;\">\n\t\t\t\t\t\t<?php if ( $provider_new_app_link ) : ?>\n\t\t\t\t\t\t\t<p><?php echo \"<b>\" . ++$setupsteps . \"</b>.\" ?> <?php echo sprintf( _wsl__( 'First go to: <a href=\"%s\" target =\"_blank\">%s</a>', 'wordpress-social-login'), $provider_new_app_link, $provider_new_app_link ) ?></p>\n\n\t\t\t\t\t\t\t<?php if ( $provider_id == \"Google\" ) : ?>\n\t\t\t\t\t\t\t\t<p><?php echo \"<b>\" . ++$setupsteps . \"</b>.\" ?> <?php _wsl_e('On the <b>Dashboard sidebar</b> click on <b>Project</b> then click <em style=\"color:#0147bb;\">&ldquo;Create Project&rdquo;</em>', 'wordpress-social-login') ?>.</p>\n\t\t\t\t\t\t\t\t<p><?php echo \"<b>\" . ++$setupsteps . \"</b>.\" ?> <?php _wsl_e(\"Once the project is created. Select that project, then <b>APIs & auth</b> &gt; <b>Consent screen</b> and fill the required information\", 'wordpress-social-login') ?>.</p>\n\t\t\t\t\t\t\t\t<p><?php echo \"<b>\" . ++$setupsteps . \"</b>.\" ?> <?php _wsl_e('Then <b>APIs & auth</b> &gt; <b>APIs</b> and enable <em style=\"color:#0147bb;\">&ldquo;Google+ API&rdquo;</em>. If you want to import the user contatcs enable <em style=\"color:#0147bb;\">&ldquo;Contacts API&rdquo;</em> as well', 'wordpress-social-login') ?>.</p>\n\t\t\t\t\t\t\t\t<p><?php echo \"<b>\" . ++$setupsteps . \"</b>.\" ?> <?php _wsl_e(\"After that you will need to create an new application: <b>APIs & auth</b> &gt; <b>Credentials</b> and then click <em style=\\\"color:#0147bb;\\\">&ldquo;Create new Client ID&rdquo;</em>\", 'wordpress-social-login') ?>.</p>\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t<p><?php echo \"<b>\" . ++$setupsteps . \"</b>.\" ?> <?php _wsl_e(\"On the <b>&ldquo;Create Client ID&rdquo;</b> popup\", 'wordpress-social-login') ?> :</p>\n\t\t\t\t\t\t\t\t<ul style=\"margin-left:35px\">\n\t\t\t\t\t\t\t\t\t<li><?php _wsl_e('Select <em style=\"color:#0147bb;\">&ldquo;Web application&rdquo;</em> as your application type', 'wordpress-social-login') ?>.</li>\n\t\t\t\t\t\t\t\t\t<li><?php _wsl_e(\"Put your website domain in the <b>Authorized JavaScript origins</b> field. This should match with the current hostname\", 'wordpress-social-login') ?> <em style=\"color:#CB4B16;\"><?php echo $_SERVER[\"SERVER_NAME\"]; ?></em>.</li>\n\t\t\t\t\t\t\t\t\t<li><?php _wsl_e(\"Provide this URL as the <b>Authorized redirect URI</b> for your application\", 'wordpress-social-login') ?>: <br /><?php echo $provider_callback_url ?></li>\n\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t<?php elseif ( $provider_id == \"Facebook\" ) : ?>\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<p><?php echo \"<b>\" . ++$setupsteps . \"</b>.\" ?> <?php _wsl_e(\"Select <b>Add a New App</b> from the <b>Apps</b> menu at the top\", 'wordpress-social-login') ?>.</p>\n\t\t\t\t\t\t\t\t<p><?php echo \"<b>\" . ++$setupsteps . \"</b>.\" ?> <?php _wsl_e(\"Fill out Display Name and Contact Email. Then click <b>Create App ID</b>\", 'wordpress-social-login') ?>.</p>\n\t\t\t\t\t\t\t\t<p><?php echo \"<b>\" . ++$setupsteps . \"</b>.\" ?> <?php _wsl_e(\"On the next screen for \\\"Select a Scenerio\\\", select the option for <b>Integrate Facebook Login</b>. Then click <b>Confirm</b>\", 'wordpress-social-login') ?>.</p>\n\t\t\t\t\t\t\t\t<p><?php echo \"<b>\" . ++$setupsteps . \"</b>.\" ?> <?php _wsl_e(\"On the left menu, under <b>Facebook Login</b>, click on <b>Settings</b>\", 'wordpress-social-login') ?>.</p>\n\t\t\t\t\t\t\t\t<p><?php echo \"<b>\" . ++$setupsteps . \"</b>.\" ?> <?php _wsl_e(\"On the \\\"Client OAuth Settings\\\" page, make sure that <b>Client OAuth Login</b> and <b>Web OAuth Login</b> are switched to \\\"Yes\\\"\", 'wordpress-social-login') ?>.</p>\n\t\t\t\t\t\t\t\t<p><?php echo \"<b>\" . ++$setupsteps . \"</b>.\" ?> <?php _wsl_e(\"Then, enter the <b>Valid OAuth Redirect URIs</b>. It should look like this: \", 'wordpress-social-login') ?><?php echo \"<b>\" . site_url() . \"/wp-content/plugins/wordpress-social-login/hybridauth/?hauth.done=Facebook</b>\"; ?>.\n\t\t\t\t\t\t\t\t<p><?php echo \"<b>\" . ++$setupsteps . \"</b>.\" ?> <?php _wsl_e(\"On the left menu, under <b>Settings</b>, and click on <b>Basic</b>. Then enter <b>App Domains</b> and <b>Privacy Policy URL</b>\", 'wordpress-social-login') ?>.</p>\n\t\t\t\t\t\t\t\t<p><?php echo \"<b>\" . ++$setupsteps . \"</b>.\" ?> <?php _wsl_e(\"Then, click on <b>Add Platform</b>. Click on <b>Website</b>. On the <b>Settings > Basic</b> page, under \\\"Website\\\" enter <b>Site URL</b>\", 'wordpress-social-login') ?>.\n\t\t\t\t\t\t\t\t<?php _wsl_e(\"It should match with the current hostname\", 'wordpress-social-login') ?> <em style=\"color:#CB4B16;\"><?php echo $_SERVER[\"SERVER_NAME\"]; ?></em>.</p>\n\n\t\t\t\t\t\t\t\t<p><?php echo \"<b>\" . ++$setupsteps . \"</b>.\" ?> <?php _wsl_e(\"Click on <b>Save Settings</b>\", 'wordpress-social-login') ?>.</p>\n\t\t\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t\t\t<p><?php echo \"<b>\" . ++$setupsteps . \"</b>.\" ?> <?php _wsl_e(\"Create a new application\", 'wordpress-social-login') ?>.</p>\n\t\t\t\t\t\t\t\t<p><?php echo \"<b>\" . ++$setupsteps . \"</b>.\" ?> <?php _wsl_e(\"Fill out any required fields such as the application name and description\", 'wordpress-social-login') ?>.</p>\n\t\t\t\t\t\t\t<?php endif; ?>\n\n\t\t\t\t\t\t\t<?php if ( $provider_callback_url && $provider_id != \"Google\" && $provider_id != \"Facebook\" ) : ?>\n\t\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t\t<?php echo \"<b>\" . ++$setupsteps . \"</b>.\" ?> <?php _wsl_e(\"Provide this URL as the <b>Callback URL</b> for your application\", 'wordpress-social-login') ?>:\n\t\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t\t<?php echo $provider_callback_url ?>\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t<?php endif; ?>\n\n\t\t\t\t\t\t\t<?php if ( $provider_id == \"Live\" ) : ?>\n\t\t\t\t\t\t\t\t<p><?php echo \"<b>\" . ++$setupsteps . \"</b>.\" ?> <?php _wsl_e(\"Put your website domain in the <b>Redirect Domain</b> field. This should match with the current hostname\", 'wordpress-social-login') ?> <em style=\"color:#CB4B16;\"><?php echo $_SERVER[\"SERVER_NAME\"]; ?></em>.</p>\n\t\t\t\t\t\t\t<?php endif; ?>\n\n\t\t\t\t\t\t\t<?php if ( $provider_id == \"LinkedIn\" ) : ?>\n\t\t\t\t\t\t\t\t<p><?php echo \"<b>\" . ++$setupsteps . \"</b>.\" ?> <?php _wsl_e('Choose <b>Live</b> on <b>Live Status</b>.', 'wordpress-social-login') ?></p>\n\t\t\t\t\t\t\t<?php endif; ?>\n\n\t\t\t\t\t\t\t<?php if ( $provider_id == \"Google\" ) : ?>\n\t\t\t\t\t\t\t\t<p><?php echo \"<b>\" . ++$setupsteps . \"</b>.\" ?> <?php _wsl_e(\"Once you have registered past the created application credentials (Client ID and Secret) into the boxes above\", 'wordpress-social-login') ?>.</p>\n\t\t\t\t\t\t\t<?php elseif ( $provider_id == \"Twitter\" ) : ?>\n\t\t\t\t\t\t\t\t<p><?php echo \"<b>\" . ++$setupsteps . \"</b>.\" ?> <?php _wsl_e(\"Once you have registered, past the created application credentials (Consumer Key and Secret) into the boxes above\", 'wordpress-social-login') ?>.</p>\n\t\t\t\t\t\t\t<?php elseif ( $provider_id == \"Facebook\" ) : ?>\n\t\t\t\t\t\t\t\t<p><?php echo \"<b>\" . ++$setupsteps . \"</b>.\" ?> <?php _wsl_e(\"On the <b>Settings > Basic</b> page and past the created application credentials (App ID and App Secret) into the boxes above\", 'wordpress-social-login') ?>.</p>\n\t\t\t\t\t\t\t<?php else: ?>\n\t\t\t\t\t\t\t\t<p><?php echo \"<b>\" . ++$setupsteps . \"</b>.\" ?> <?php _wsl_e(\"Once you have registered, past the created application credentials into the boxes above\", 'wordpress-social-login') ?>.</p>\n\t\t\t\t\t\t\t<?php endif; ?>\n\n\t\t\t\t\t\t<?php endif; ?>\n\n\t\t\t\t\t\t<?php if ( $provider_id == \"Facebook\" ) : ?>\n\t\t\t\t\t\t\t<table style=\"text-align: center;margin-bottom:12px;\">\n\t\t\t\t\t\t\t\t<td><a class=\"span4 thumbnail\" href=\"<?php echo $assets_setup_base_url . 'facebook/1.png' ?>\" target=\"_blank\"><img src=\"<?php echo $assets_setup_base_url . 'facebook/1.png' ?>\"></a></td>\n\t\t\t\t\t\t\t\t<td><a class=\"span4 thumbnail\" href=\"<?php echo $assets_setup_base_url . 'facebook/2.png' ?>\" target=\"_blank\"><img src=\"<?php echo $assets_setup_base_url . 'facebook/2.png' ?>\"></a></td>\n\t\t\t\t\t\t\t\t<td><a class=\"span4 thumbnail\" href=\"<?php echo $assets_setup_base_url . 'facebook/3.png' ?>\" target=\"_blank\"><img src=\"<?php echo $assets_setup_base_url . 'facebook/3.png' ?>\"></a></td>\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t<?php endif; ?>\n\n\t\t\t\t\t\t<?php if ( $provider_id == \"Google\" ) : ?>\n\t\t\t\t\t\t\t<table style=\"text-align: center;margin-bottom:12px;\">\n\t\t\t\t\t\t\t\t<td><a class=\"span4 thumbnail\" href=\"<?php echo $assets_setup_base_url . 'google/1.png' ?>\" target=\"_blank\"><img src=\"<?php echo $assets_setup_base_url . 'google/1.png' ?>\"></a></td>\n\t\t\t\t\t\t\t\t<td><a class=\"span4 thumbnail\" href=\"<?php echo $assets_setup_base_url . 'google/2.png' ?>\" target=\"_blank\"><img src=\"<?php echo $assets_setup_base_url . 'google/2.png' ?>\"></a></td>\n\t\t\t\t\t\t\t\t<td><a class=\"span4 thumbnail\" href=\"<?php echo $assets_setup_base_url . 'google/3.png' ?>\" target=\"_blank\"><img src=\"<?php echo $assets_setup_base_url . 'google/3.png' ?>\"></a></td>\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t<?php endif; ?>\n\n\t\t\t\t\t\t<?php if ( $provider_id == \"Twitter\" ) : ?>\n\t\t\t\t\t\t\t<table style=\"text-align: center;margin-bottom:12px;\">\n\t\t\t\t\t\t\t\t<td><a class=\"span4 thumbnail\" href=\"<?php echo $assets_setup_base_url . 'twitter/1.png' ?>\" target=\"_blank\"><img src=\"<?php echo $assets_setup_base_url . 'twitter/1.png' ?>\"></a></td>\n\t\t\t\t\t\t\t\t<td><a class=\"span4 thumbnail\" href=\"<?php echo $assets_setup_base_url . 'twitter/2.png' ?>\" target=\"_blank\"><img src=\"<?php echo $assets_setup_base_url . 'twitter/2.png' ?>\"></a></td>\n\t\t\t\t\t\t\t\t<td><a class=\"span4 thumbnail\" href=\"<?php echo $assets_setup_base_url . 'twitter/3.png' ?>\" target=\"_blank\"><img src=\"<?php echo $assets_setup_base_url . 'twitter/3.png' ?>\"></a></td>\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t<p><?php echo \"<b>\" . ++$setupsteps . \"</b>.\" ?> <?php _wsl_e(\"Please update <b>Callback URL</b> for your application\", 'wordpress-social-login') ?>.\n\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t<?php echo sprintf( _wsl__( '- Go to: <a href=\"%s\" target =\"_blank\">%s</a>', 'wordpress-social-login'), $provider_new_app_link, $provider_new_app_link ) ?>\n\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t<?php echo _wsl_e(\"- Click on App Name\", 'wordpress-social-login') ?>\n\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t<?php echo _wsl_e(\"- Click on Settings Tab \", 'wordpress-social-login') ?>\n\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t<?php echo _wsl_e(\"- Replace existing Callback url with below one \", 'wordpress-social-login') ?>\n\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t<?php echo $provider_callback_querystring_url ?>\n\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t<?php echo _wsl_e(\"- Click on update settings button.\", 'wordpress-social-login') ?>\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<?php endif; ?>\n\n\t\t\t\t\t\t<?php if ( $provider_id == \"WordPress\" ) : ?>\n\t\t\t\t\t\t\t<table style=\"text-align: center;margin-bottom:12px;\">\n\t\t\t\t\t\t\t\t<td><a class=\"span4 thumbnail\" href=\"<?php echo $assets_setup_base_url . 'wordpress/1.png' ?>\" target=\"_blank\"><img src=\"<?php echo $assets_setup_base_url . 'wordpress/1.png' ?>\"></a></td>\n\t\t\t\t\t\t\t\t<td><a class=\"span4 thumbnail\" href=\"<?php echo $assets_setup_base_url . 'wordpress/2.png' ?>\" target=\"_blank\"><img src=\"<?php echo $assets_setup_base_url . 'wordpress/2.png' ?>\"></a></td>\n\t\t\t\t\t\t\t\t<td><a class=\"span4 thumbnail\" href=\"<?php echo $assets_setup_base_url . 'wordpress/3.png' ?>\" target=\"_blank\"><img src=\"<?php echo $assets_setup_base_url . 'wordpress/3.png' ?>\"></a></td>\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<?php if ( $provider_new_app_link ) : ?>\n\t\t\t\t\t\t<hr />\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t<b><?php _wsl_e(\"And that's it!\", 'wordpress-social-login') ?></b>\n\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t<?php echo sprintf( _wsl__( 'If for some reason you still can\\'t manage to create an application for %s, first try to <a href=\"https://www.google.com/search?q=%s API create application\" target=\"_blank\">Google it</a>, then check it on <a href=\"http://www.youtube.com/results?search_query=%s API create application \" target=\"_blank\">Youtube</a>, and if nothing works <a href=\"options-general.php?page=wordpress-social-login&wslp=help\">ask for support</a>', 'wordpress-social-login'), $provider_name, $provider_name, $provider_name ) ?>.\n\t\t\t\t\t\t</p>\n\t\t\t\t\t<?php endif; ?>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n<?php\n\tendforeach;\n?>\n\t<input type=\"submit\" class=\"button-primary\" value=\"<?php _wsl_e(\"Save Settings\", 'wordpress-social-login') ?>\" />\n<?php\n\t// HOOKABLE:\n\tdo_action( \"wsl_component_networks_setup_end\" );\n}", "function edd_social_discounts_display_share_buttons() {\n\t$display = edd_get_option( 'edd_sd_display_services', 'after' );\n\n\t// don't automatically output the sharing services\n\tif ( 'none' != $display ) {\n\t\t// load sharing box by default after download content \n\t\tif ( 'after' == $display ) {\n\t\t\tadd_action( 'edd_after_download_content', 'edd_social_discounts_load_share_box' );\n\t\t}\n\t\t// load before content\n\t\telseif ( 'before' == $display ) {\n\t\t\tadd_action( 'edd_before_download_content', 'edd_social_discounts_load_share_box' );\n\t\t}\n\t}\n}", "function joints_social_links() {\n\t// display the wp3 menu if available\n wp_nav_menu(array(\n \t'container' => '', // remove nav container\n \t'container_class' => 'social-links clearfix', // class of container (should you choose to use it)\n \t'menu' => __( 'Social Links', 'jointstheme' ), // nav name\n \t'menu_class' => 'sub-nav', // adding custom nav class\n \t'theme_location' => 'social-links', // where it's located in the theme\n \t'before' => '', // before the menu\n 'after' => '', // after the menu\n 'link_before' => '', // before each link\n 'link_after' => '', // after each link\n 'depth' => 0, // limit the depth of the nav\n \t'fallback_cb' => 'joints_footer_links_fallback' // fallback function\n\t));\n}", "function wsl_component_networks_setup()\r\n{\r\n\t// HOOKABLE:\r\n\tdo_action( \"wsl_component_networks_setup_start\" );\r\n\r\n\tGLOBAL $WORDPRESS_SOCIAL_LOGIN_PROVIDERS_CONFIG;\r\n\r\n\t$assets_base_url = WORDPRESS_SOCIAL_LOGIN_PLUGIN_URL . 'assets/img/';\r\n\t$assets_setup_base_url = WORDPRESS_SOCIAL_LOGIN_PLUGIN_URL . 'assets/img/setup/';\r\n\r\n\t// save settings?\r\n\tif( isset( $_REQUEST[\"enable\"] ) && $_REQUEST[\"enable\"] && ! isset( $_REQUEST[\"settings-updated\"] ))\r\n\t{\r\n\t\t$provider_id = $_REQUEST[\"enable\"];\r\n\r\n update_option( 'wsl_settings_' . $provider_id . '_enabled', 1 );\r\n\t}\r\n\r\n// XTEC ************ ESBORRAT - Hide box to add providers to end users\r\n// 2021.04.22 @aginard\r\n/*\r\n\r\n?>\r\n<div class=\"postbox\">\r\n\t<div class=\"inside\">\r\n\t\t<h3><?php _wsl_e(\"Add more providers\", 'wordpress-social-login') ?></h3>\r\n\r\n\t\t<div style=\"padding:0 20px;\">\r\n\t\t\t<p style=\"padding:0;margin:0 0 12px;\">\r\n\t\t\t\t<?php _wsl_e('We have enabled <b>Facebook</b>, <b>Google</b> and <b>Twitter</b> by default, however you may add even more. <b>Just Click</b> on the icons and we will guide you through', 'wordpress-social-login') ?>.\r\n\t\t\t</p>\r\n\r\n\t\t\t<div style=\"padding: 10px; border: 1px solid #ddd; background-color: #fff; text-align: center;\">\r\n\t\t\t\t<?php\r\n\t\t\t\t\t$nb_used = count( $WORDPRESS_SOCIAL_LOGIN_PROVIDERS_CONFIG );\r\n\r\n\t\t\t\t\tforeach( $WORDPRESS_SOCIAL_LOGIN_PROVIDERS_CONFIG AS $item )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$provider_id = isset( $item[\"provider_id\"] ) ? $item[\"provider_id\"] : '';\r\n\t\t\t\t\t\t$provider_name = isset( $item[\"provider_name\"] ) ? $item[\"provider_name\"] : '';\r\n\r\n\t\t\t\t\t\tif( isset( $item[\"default_network\"] ) && $item[\"default_network\"] )\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif( ! get_option( 'wsl_settings_' . $provider_id . '_enabled' ) )\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t?>\r\n\t\t\t\t\t\t\t\t<a href=\"options-general.php?page=wordpress-social-login&wslp=networks&enable=<?php echo $provider_id ?>&_=<?php echo time(); ?>#setup<?php echo strtolower( $provider_id ) ?>\"><img src=\"<?php echo $assets_base_url . '32x32/icondock/' . strtolower( $provider_id ) . '.png' ?>\" alt=\"<?php echo $provider_name ?>\" title=\"<?php echo $provider_name ?>\" /></a>\r\n\t\t\t\t\t\t\t<?php\r\n\r\n\t\t\t\t\t\t\t$nb_used--;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif( $nb_used == count( $WORDPRESS_SOCIAL_LOGIN_PROVIDERS_CONFIG ) )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t_wsl_e(\"Well! none left.\", 'wordpress-social-login');\r\n\t\t\t\t\t}\r\n\t\t\t\t?>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n</div>\r\n\r\n*/\r\n//************ FI\r\n?>\r\n\r\n<!-- -->\r\n\r\n<script>\r\n\tfunction toggleproviderkeys(idp)\r\n\t{\r\n\t\tif(typeof jQuery==\"undefined\")\r\n\t\t{\r\n\t\t\talert( \"Error: WordPress Social Login require jQuery to be installed on your wordpress in order to work!\" );\r\n\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif(jQuery('#wsl_settings_' + idp + '_enabled').val()==1)\r\n\t\t{\r\n\t\t\tjQuery('.wsl_tr_settings_' + idp).show();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tjQuery('.wsl_tr_settings_' + idp).hide();\r\n\t\t\tjQuery('.wsl_div_settings_help_' + idp).hide();\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tfunction toggleproviderhelp(idp)\r\n\t{\r\n\t\tif(typeof jQuery==\"undefined\")\r\n\t\t{\r\n\t\t\talert( \"Error: WordPress Social Login require jQuery to be installed on your wordpress in order to work!\" );\r\n\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tjQuery('.wsl_div_settings_help_' + idp).toggle();\r\n\r\n\t\treturn false;\r\n\t}\r\n</script>\r\n<?php\r\n\tforeach( $WORDPRESS_SOCIAL_LOGIN_PROVIDERS_CONFIG AS $item ):\r\n\t\t$provider_id = isset( $item[\"provider_id\"] ) ? $item[\"provider_id\"] : '';\r\n\t\t$provider_name = isset( $item[\"provider_name\"] ) ? $item[\"provider_name\"] : '';\r\n\r\n\t\t$require_client_id = isset( $item[\"require_client_id\"] ) ? $item[\"require_client_id\"] : '';\r\n\t\t$require_api_key = isset( $item[\"require_api_key\"] ) ? $item[\"require_api_key\"] : '';\r\n\t\t$provide_email = isset( $item[\"provide_email\"] ) ? $item[\"provide_email\"] : '';\r\n\r\n\t\t$provider_new_app_link = isset( $item[\"new_app_link\"] ) ? $item[\"new_app_link\"] : '';\r\n\t\t$provider_userguide_section = isset( $item[\"userguide_section\"] ) ? $item[\"userguide_section\"] : '';\r\n\r\n\t\t$provider_callback_url = \"\" ;\r\n\r\n\t\tif( ! ( ( isset( $item[\"default_network\"] ) && $item[\"default_network\"] ) || get_option( 'wsl_settings_' . $provider_id . '_enabled' ) ) )\r\n\t\t{\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\t// default endpoint_url\r\n\t\t$endpoint_url = WORDPRESS_SOCIAL_LOGIN_HYBRIDAUTH_ENDPOINT_URL;\r\n\r\n\t\tif( isset( $item[\"callback\"] ) && $item[\"callback\"] )\r\n\t\t{\r\n\t\t\t$provider_callback_url = '<span style=\"color:green\">' . $endpoint_url . 'callbacks/' . strtolower($provider_id) . '.php</span>';\r\n\t\t}\r\n\r\n\t\t$setupsteps = 0;\r\n?>\r\n\t\t<a name=\"setup<?php echo strtolower( $provider_id ) ?>\"></a>\r\n\t\t<div class=\"stuffbox\" id=\"namediv\">\r\n\t\t\t<h3>\r\n\t\t\t\t<label class=\"wp-neworks-label\">\r\n\t\t\t\t\t<img alt=\"<?php echo $provider_name ?>\" title=\"<?php echo $provider_name ?>\" src=\"<?php echo $assets_base_url . '16x16/' . strtolower( $provider_id ) . '.png' ?>\" style=\"vertical-align: top;width:16px;height:16px;\" /> <?php _wsl_e( $provider_name, 'wordpress-social-login' ) ?>\r\n\t\t\t\t</label>\r\n\t\t\t</h3>\r\n\t\t\t<div class=\"inside\">\r\n\t\t\t\t<table class=\"form-table editcomment\">\r\n\t\t\t\t\t<tbody>\r\n\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t<td style=\"width:125px\"><?php _wsl_e(\"Enabled\", 'wordpress-social-login') ?>:</td>\r\n\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t<select\r\n\t\t\t\t\t\t\t\t\tname=\"<?php echo 'wsl_settings_' . $provider_id . '_enabled' ?>\"\r\n\t\t\t\t\t\t\t\t\tid=\"<?php echo 'wsl_settings_' . $provider_id . '_enabled' ?>\"\r\n\t\t\t\t\t\t\t\t\tonChange=\"toggleproviderkeys('<?php echo $provider_id; ?>')\"\r\n\t\t\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t\t\t<option value=\"1\" <?php if( get_option( 'wsl_settings_' . $provider_id . '_enabled' ) ) echo \"selected\"; ?> ><?php _wsl_e(\"Yes\", 'wordpress-social-login') ?></option>\r\n\t\t\t\t\t\t\t\t\t<option value=\"0\" <?php if( ! get_option( 'wsl_settings_' . $provider_id . '_enabled' ) ) echo \"selected\"; ?> ><?php _wsl_e(\"No\", 'wordpress-social-login') ?></option>\r\n\t\t\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t<td style=\"width:160px\">&nbsp;</td>\r\n\t\t\t\t\t\t</tr>\r\n\r\n\t\t\t\t\t\t<?php if ( $provider_new_app_link ){ ?>\r\n\t\t\t\t\t\t\t<?php if ( $require_client_id ){ // key or id ? ?>\r\n\t\t\t\t\t\t\t\t<tr valign=\"top\" <?php if( ! get_option( 'wsl_settings_' . $provider_id . '_enabled' ) ) echo 'style=\"display:none\"'; ?> class=\"wsl_tr_settings_<?php echo $provider_id; ?>\" >\r\n\t\t\t\t\t\t\t\t\t<td><?php _wsl_e(\"Application ID\", 'wordpress-social-login') ?>:</td>\r\n\t\t\t\t\t\t\t\t\t<td><input dir=\"ltr\" type=\"text\" name=\"<?php echo 'wsl_settings_' . $provider_id . '_app_id' ?>\" value=\"<?php echo get_option( 'wsl_settings_' . $provider_id . '_app_id' ); ?>\" ></td>\r\n\t\t\t\t\t\t\t\t\t<td><a href=\"javascript:void(0)\" onClick=\"toggleproviderhelp('<?php echo $provider_id; ?>')\"><?php _wsl_e(\"Where do I get this info?\", 'wordpress-social-login') ?></a></td>\r\n\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t<?php } ?>\r\n\r\n\t\t\t\t\t\t\t<?php if( !$require_client_id || $require_client_id === 'both' ) { ?>\r\n\t\t\t\t\t\t\t\t<tr valign=\"top\" <?php if( ! get_option( 'wsl_settings_' . $provider_id . '_enabled' ) ) echo 'style=\"display:none\"'; ?> class=\"wsl_tr_settings_<?php echo $provider_id; ?>\" >\r\n\t\t\t\t\t\t\t\t\t<td><?php _wsl_e(\"Application Key\", 'wordpress-social-login') ?>:</td>\r\n\t\t\t\t\t\t\t\t\t<td><input dir=\"ltr\" type=\"text\" name=\"<?php echo 'wsl_settings_' . $provider_id . '_app_key' ?>\" value=\"<?php echo get_option( 'wsl_settings_' . $provider_id . '_app_key' ); ?>\" ></td>\r\n\t\t\t\t\t\t\t\t\t<td><a href=\"javascript:void(0)\" onClick=\"toggleproviderhelp('<?php echo $provider_id; ?>')\"><?php _wsl_e(\"Where do I get this info?\", 'wordpress-social-login') ?></a></td>\r\n\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t<?php }; ?>\r\n\r\n\t\t\t\t\t\t\t<?php if( ! $require_api_key ) { ?>\r\n\t\t\t\t\t\t\t\t<tr valign=\"top\" <?php if( ! get_option( 'wsl_settings_' . $provider_id . '_enabled' ) ) echo 'style=\"display:none\"'; ?> class=\"wsl_tr_settings_<?php echo $provider_id; ?>\" >\r\n\t\t\t\t\t\t\t\t\t<td><?php _wsl_e(\"Application Secret\", 'wordpress-social-login') ?>:</td>\r\n\t\t\t\t\t\t\t\t\t<td><input dir=\"ltr\" type=\"text\" name=\"<?php echo 'wsl_settings_' . $provider_id . '_app_secret' ?>\" value=\"<?php echo get_option( 'wsl_settings_' . $provider_id . '_app_secret' ); ?>\" ></td>\r\n\t\t\t\t\t\t\t\t\t<td><a href=\"javascript:void(0)\" onClick=\"toggleproviderhelp('<?php echo $provider_id; ?>')\"><?php _wsl_e(\"Where do I get this info?\", 'wordpress-social-login') ?></a></td>\r\n\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t<?php } ?>\r\n\r\n <?php\r\n // XTEC ************ AFEGIT - Added Moodle Login provider\r\n // 2014.08.29 @pferre22\r\n if ( $provider_id == 'Moodle' ){ // key or id ? ?>\r\n <tr valign=\"top\" <?php if( ! get_option( 'wsl_settings_' . $provider_id . '_enabled' ) ) echo 'style=\"display:none\"'; ?> class=\"wsl_tr_settings_<?php echo $provider_id; ?>\" >\r\n <td><?php _wsl_e(\"URL de l'aplicació\", 'wordpress-social-login') ?>:</td>\r\n <td><input type=\"text\" name=\"<?php echo 'wsl_settings_' . $provider_id . '_url' ?>\" value=\"<?php echo get_option( 'wsl_settings_' . $provider_id . '_url' ); ?>\" ></td>\r\n <td></td>\r\n </tr>\r\n <?php }\r\n //************ FI\r\n ?>\r\n\r\n\t\t\t\t\t\t<?php } // if require registration ?>\r\n\t\t\t\t\t</tbody>\r\n\t\t\t\t</table>\r\n\r\n\t\t\t\t<?php if ( get_option( 'wsl_settings_' . $provider_id . '_enabled' ) ) : ?>\r\n\t\t\t\t\t<?php if ( $provider_id == \"Steam\" ) : ?>\r\n\t\t\t\t\t\t<div class=\"fade updated\">\r\n\t\t\t\t\t\t\t<p>\r\n\t\t\t\t\t\t\t\t<b><?php _wsl_e(\"Notes\", 'wordpress-social-login') ?>:</b>\r\n\t\t\t\t\t\t\t</p>\r\n\t\t\t\t\t\t\t<p>\r\n\t\t\t\t\t\t\t\t 1. <?php echo sprintf( _wsl__(\"<b>%s</b> do not require an external application, however if the Web API Key is provided, then WSL will be able to get more information about the connected %s users\", 'wordpress-social-login'), $provider_name , $provider_name ) ?>.\r\n\t\t\t\t\t\t\t\t<br />2. <?php echo sprintf( _wsl__(\"<b>%s</b> do not provide their user's email address and by default a random email will then be generated for them instead\", 'wordpress-social-login'), $provider_name ) ?>.\r\n\r\n\t\t\t\t\t\t\t\t<?php _wsl_e('To change this behaviour and to force new registered users to provide their emails before they get in, goto <b><a href=\"options-general.php?page=wordpress-social-login&wslp=bouncer\">Bouncer</a></b> and enable <b>Profile Completion</b>', 'wordpress-social-login') ?>.\r\n\t\t\t\t\t\t\t</p>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t<?php elseif ( $provider_new_app_link && strlen( trim( get_option( 'wsl_settings_' . $provider_id . '_app_secret' ) ) ) == 0 ) : ?>\r\n\t\t\t\t\t\t<div class=\"fade error\">\r\n\t\t\t\t\t\t\t<p>\r\n\t\t\t\t\t\t\t\t<?php echo sprintf( _wsl__('<b>%s</b> requires that you create an external application linking your website to their API. To know how to create this application, click on &ldquo;Where do I get this info?&rdquo; and follow the steps', 'wordpress-social-login'), $provider_name, $provider_name ) ?>.\r\n\t\t\t\t\t\t\t</p>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t<?php elseif ( in_array( $provider_id, array( \"Twitter\", \"Identica\", \"Tumblr\", \"Goodreads\", \"500px\", \"Vkontakte\", \"Gowalla\", \"Steam\" ) ) ) : ?>\r\n\t\t\t\t\t\t<div class=\"fade updated\">\r\n\t\t\t\t\t\t\t<p>\r\n\t\t\t\t\t\t\t\t<b><?php _wsl_e(\"Note\", 'wordpress-social-login') ?>:</b>\r\n\r\n\t\t\t\t\t\t\t\t<?php echo sprintf( _wsl__(\"<b>%s</b> do not provide their user's email address and by default a random email will then be generated for them instead\", 'wordpress-social-login'), $provider_name ) ?>.\r\n\r\n\t\t\t\t\t\t\t\t<?php _wsl_e('To change this behaviour and to force new registered users to provide their emails before they get in, goto <b><a href=\"options-general.php?page=wordpress-social-login&wslp=bouncer\">Bouncer</a></b> and enable <b>Profile Completion</b>', 'wordpress-social-login') ?>.\r\n\t\t\t\t\t\t\t</p>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t<?php endif; ?>\r\n\t\t\t\t<?php endif; ?>\r\n\r\n\t\t\t\t<br />\r\n\r\n <!--// XTEC ************ AFEGIT - Customize help info for Moodle and Google providers. -->\r\n <!--// 2014.11.19 @aginard -->\r\n <?php if (($provider_id != 'Moodle') && ($provider_id != 'Google')) : ?>\r\n <!--//************ FI -->\r\n\r\n\t\t\t\t<div\r\n\t\t\t\t\tclass=\"wsl_div_settings_help_<?php echo $provider_id; ?>\"\r\n\t\t\t\t\tstyle=\"<?php if( isset( $_REQUEST[\"enable\"] ) && ! isset( $_REQUEST[\"settings-updated\"] ) && $_REQUEST[\"enable\"] == $provider_id ) echo \"-\"; // <= lolz ?>display:none;padding-left: 12px;padding-right: 12px;\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<hr class=\"wsl\" />\r\n\t\t\t\t\t<?php if ( $provider_id == \"Steam\" ) : ?>\r\n\t\t\t\t\t<?php elseif ( $provider_new_app_link ) : ?>\r\n\t\t\t\t\t\t<?php _wsl_e('<span style=\"color:#CB4B16;\">Application <strong>ID</strong> and <strong>Secret</strong></span> (also sometimes referred as <span style=\"color:#CB4B16;\">API</span> key and secret or <span style=\"color:#CB4B16;\">Consumer</span> key and secret or <span style=\"color:#CB4B16;\">Client</span> ID and secret) are what we call an application credentials', 'wordpress-social-login') ?>.\r\n\r\n\t\t\t\t\t\t<?php echo sprintf( _wsl__( 'The application will link your website to <b>%s\\'s API</b> and it\\'s needed in order for <b>%s\\'s Users</b> to access your website', 'wordpress-social-login'), $provider_name, $provider_name ) ?>.\r\n\t\t\t\t\t\t<br />\r\n\t\t\t\t\t\t<br />\r\n\r\n\t\t\t\t\t\t<?php echo sprintf( _wsl__('To enable authentication with this provider and to register a new <b>%s API Application</b>, follow the steps', 'wordpress-social-login'), $provider_name ) ?>\r\n\t\t\t\t\t\t:<br />\r\n\t\t\t\t\t<?php else: ?>\r\n\t\t\t\t\t\t\t<p><?php echo sprintf( _wsl__('<b>Done.</b> Nothing more required for <b>%s</b>', 'wordpress-social-login'), $provider_name) ?>.</p>\r\n\t\t\t\t\t<?php endif; ?>\r\n\t\t\t\t\t<div style=\"margin-left:40px;\">\r\n\t\t\t\t\t\t<?php if ( $provider_new_app_link ) : ?>\r\n\t\t\t\t\t\t\t<p><?php echo \"<b>\" . ++$setupsteps . \"</b>.\" ?> <?php echo sprintf( _wsl__( 'First go to: <a href=\"%s\" target =\"_blank\">%s</a>', 'wordpress-social-login'), $provider_new_app_link, $provider_new_app_link ) ?></p>\r\n\r\n <p><?php echo \"<b>\" . ++$setupsteps . \"</b>.\" ?> <?php _wsl_e(\"Create a new application and fill out any required fields such as the application name, description, your domanin name, etc\", 'wordpress-social-login') ?>.</p>\r\n\r\n <p>\r\n <?php echo \"<b>\" . ++$setupsteps . \"</b>.\" ?> <?php _wsl_e(\"If asked about an authorized <b>Callback URL</b> for your application, you may provide this link\", 'wordpress-social-login') ?>:\r\n <br />\r\n <?php echo $provider_callback_url ?>\r\n </p>\r\n\r\n <p><?php echo \"<b>\" . ++$setupsteps . \"</b>.\" ?> <?php _wsl_e(\"Once you have registered, past the created application credentials into the boxes above\", 'wordpress-social-login') ?>.</p>\r\n\t\t\t\t\t\t<?php endif; ?>\r\n\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t<?php if ( $provider_new_app_link ) : ?>\r\n\t\t\t\t\t\t<hr />\r\n\t\t\t\t\t\t<p>\r\n\t\t\t\t\t\t\t<?php _wsl_e(\"And that's pretty much all.\", 'wordpress-social-login') ?>\r\n\t\t\t\t\t\t\t<?php echo sprintf( _wsl__( 'If for whatever reason you can\\'t manage to create an application for %s, first try to <a href=\"https://www.google.com/search?q=%s API create application\" target=\"_blank\">Google it</a>, then check it on <a href=\"http://www.youtube.com/results?search_query=%s API create application \" target=\"_blank\">Youtube</a>, and if nothing works you may ask the WordPress community for <a href=\"http://miled.github.io/wordpress-social-login/support.html\" target=\"_blank\">Help & Support</a>', 'wordpress-social-login'), $provider_name, $provider_name, $provider_name ) ?>.\r\n\t\t\t\t\t\t</p>\r\n\t\t\t\t\t<?php endif; ?>\r\n\t\t\t\t</div>\r\n\r\n <!--// XTEC ************ AFEGIT - Customize help info for Moodle and Google providers. Not using gettext, sorry! :( -->\r\n <!--// 2014.11.19 @aginard -->\r\n <!--// 2020.10.15 @nacho: modified URLS -->\r\n <?php else : global $isAgora; if ($provider_id == 'Moodle') : ?>\r\n <?php $help_moodle= ($isAgora) ? 'https://educaciodigital.cat/moodle/moodle/mod/glossary/view.php?id=1741&mode=entry&hook=2228':'https://sites.google.com/a/xtec.cat/ajudaxtecblocs/usuaris/configuracio-d-acces-a-xtecblocs-amb-els-usuaris-del-moodle'; ?>\r\n <div\r\n class=\"wsl_div_settings_help_<?php echo $provider_id; ?>\"\r\n style=\"<?php if( isset( $_REQUEST[\"enable\"] ) && ! isset( $_REQUEST[\"settings-updated\"] ) && $_REQUEST[\"enable\"] == $provider_id ) echo \"-\"; // <= lolz ?>display:none;\">\r\n <hr class=\"wsl\" />\r\n <p>Per fer que els usuaris del Moodle puguin entrar a aquest espai automàticament, visiteu <a href=\"<?php echo $help_moodle?>\" target=\"_blank\">aquesta pàgina</a> i seguiu les instruccions.</p><p>La primera vegada que un usuari/ària del Moodle entri, se li crearà automàticament un compte a aquest espai en cas que no en tingui.</p>\r\n </div>\r\n <?php endif; if ($provider_id == 'Google') : ?>\r\n <?php $help_google= ($isAgora) ? 'https://ateneu.xtec.cat/wikiform/wikiexport/cmd/tac/agora-nodes/usuaris/validacio/google':'https://sites.google.com/a/xtec.cat/ajudaxtecblocs/usuaris/configuracio-d-acces-a-xtecblocs-amb-usuaris-de-google'; ?>\r\n <div\r\n class=\"wsl_div_settings_help_<?php echo $provider_id; ?>\"\r\n style=\"<?php if( isset( $_REQUEST[\"enable\"] ) && ! isset( $_REQUEST[\"settings-updated\"] ) && $_REQUEST[\"enable\"] == $provider_id ) echo \"-\"; // <= lolz ?>display:none;\">\r\n <hr class=\"wsl\" />\r\n <p>Per fer que els usuaris del Google puguin entrar a aquest espai automàticament, visiteu <a href=\"<?php echo $help_google?>\" target=\"_blank\">aquesta pàgina</a> i seguiu les instruccions.</p><p>La primera vegada que un usuari/ària del Google entri, se li crearà automàticament un compte a aquest espai en cas que no en tingui.</p>\r\n </div>\r\n <?php endif; endif; ?>\r\n <!--//************ FI -->\r\n\r\n\t\t\t</div>\r\n\t\t</div>\r\n<?php\r\n\tendforeach;\r\n?>\r\n\t<input type=\"submit\" class=\"button-primary\" value=\"<?php _wsl_e(\"Save Settings\", 'wordpress-social-login') ?>\" />\r\n\r\n &nbsp; <a href=\"javascript:window.scrollTo(0, 0);\"><?php _wsl_e(\"↑ Scroll back to top\", 'wordpress-social-login') ?></a>\r\n<?php\r\n\t// HOOKABLE:\r\n\tdo_action( \"wsl_component_networks_setup_end\" );\r\n}", "private function getSocialMedia( $senator ) {\n\t\t// Update links here. Currently pointing to example.com\n\t\t$shareOptions = array(\n\t\t\tarray(\n\t\t\t\t\"url\" => \"https://www.facebook.com/sharer.php?u=http://tinyurl.com/7vq4o8g&t=$1\",\n\t\t\t\t\"img\" => \"//upload.wikimedia.org/wikipedia/commons/2/2a/WP_SOPA_sm_icon_facebook_dedede.png\",\n\t\t\t\t\"name\" => \"Facebook\"\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t\"url\" => \"https://m.google.com/app/plus/x/?v=compose&content=$1\",\n\t\t\t\t\"img\" => \"//upload.wikimedia.org/wikipedia/commons/0/08/WP_SOPA_sm_icon_gplus_dedede.png\",\n\t\t\t\t\"name\" => \"Google+\"\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t\"url\" => \"https://twitter.com/intent/tweet?text=$1\",\n\t\t\t\t\"img\" => \"//upload.wikimedia.org/wikipedia/commons/4/45/WP_SOPA_sm_icon_twitter_dedede.png\",\n\t\t\t\t\"name\" => \"Twitter\"\n\t\t\t)\n\t\t);\t\n\n\t\t$htmlShare = '';\n\t\tforeach( $shareOptions as $option ) {\n\t\t\t$htmlShare .= Html::rawElement( 'div',\n\t\t\t\tarray(\n\t\t\t\t\t'class' => 'sopaSocial'\n\t\t\t\t),\n\t\t\t\tHtml::rawElement( 'a',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'href' => str_replace( '$1', $this->formatDoneText( $senator ), $option['url'] ),\n\t\t\t\t\t\t'style' => 'text-decoration: none'\n\t\t\t\t\t),\n\t\t\t\t\tHtml::rawElement( 'img',\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'src' => $option['img'],\n\t\t\t\t\t\t\t'height' => '33',\n\t\t\t\t\t\t\t'width' => '33'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t''\n\t\t\t\t\t) \n\t\t\t\t) .\n\t\t\t\tHtml::rawElement( 'br' ) .\n\t\t\t\tHtml::rawElement( 'a',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'href' => $option['url'],\n\t\t\t\t\t\t'style' => 'text-decoration: none'\n\t\t\t\t\t),\n\t\t\t\t\t$option['name']\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\t$htmlOut = Html::rawElement( 'div',\n\t\t\tarray( \n\t\t\t\t'id' => 'sopaShareOptions',\n\t\t\t\t'class' => 'sopaActionDiv'\n\t\t\t),\n\t\t\t\tHtml::rawElement( 'p',\n\t\t\t\t\tarray(), 'Done? Tell the world!'\n\t\t\t\t) . \n\t\t\t\tHtml::rawElement( 'div', \n\t\t\t\t\tarray(),\n\t\t\t\t\t$htmlShare) .\n\t\t\t\tHtml::rawElement( 'div',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'style' => 'clear: both;'\n\t\t\t\t\t), ''\n\t\t\t\t) . \n\t\t\t\tHtml::rawElement( 'hr' )\n\t\t\t);\n\n\t\treturn $htmlOut;\n\t}", "function plugin_geticon_links ()\n{\n global $_CONF;\n\n return $_CONF['site_url'] . '/links/images/links.png';\n}", "function rss2_site_icon()\n{\n}", "function tx_register_social_widget()\n{\n register_widget('TX_Social_Widget');\n}", "private function can_display_connect_button() {\r\n\t\treturn ( $this->is_detail_page() || $this->is_stripe_connect_enabled() );\r\n\t}", "function overlap_blog_meta_share_icons(){\r\n get_template_part('templates/blog/meta', 'shareicons');\r\n}", "function social_network() {\n\t\t$temp = $this->custom_db->single_table_records ( 'social_links' );\n\t\t$data ['social_links'] = $temp ['data'];\n\t\t$this->template->view ( 'utilities/social_network', $data );\n\t}", "public function displayIcon()\n {\n if ( get_the_title() == 'Property Law' ) {\n echo $this->home;\n } elseif ( get_the_title() == 'Divorce And Family Law' ) {\n echo $this->family;\n } elseif ( get_the_title() == 'Criminal Law' ) {\n echo $this->criminal;\n } elseif ( get_the_title() == 'Frequently Asked Questions' ) {\n echo $this->comments;\n } elseif ( get_the_title() == 'Civil Law' || get_the_title() == 'Practice Areas' ) {\n echo $this->justice;\n } elseif ( get_the_title() == 'Business Law' || get_the_title() == 'About Mdanjelwa Attorneys' ) {\n echo $this->business;\n } else {\n echo $this->correspondent;\n }\n }", "function shortcode_lab_social_networks( $atts = array(), $content = '' ) {\n\t$custom_icon \t\t= get_data( 'social_network_custom_link_icon' );\n\t\n\t$social_order\t\t= get_data( 'social_order' );\n\t$social_order_list\t= apply_filters( 'kalium_social_networks_array', array(\n\t\t'fb' => array( \n\t\t\t'title' => 'Facebook',\n\t\t\t'icon' => 'fa fa-facebook'\n\t\t),\n\t\t'tw' => array(\n\t\t\t'title' => 'Twitter',\n\t\t\t'icon' => 'fa fa-twitter'\n\t\t),\n\t\t'lin' => array(\n\t\t\t'title' => 'LinkedIn',\n\t\t\t'icon' => 'fa fa-linkedin'\n\t\t),\n\t\t'yt' => array(\n\t\t\t'title' => 'YouTube',\n\t\t\t'icon' => 'fa fa-youtube-play'\n\t\t),\n\t\t'vm' => array(\n\t\t\t'title' => 'Vimeo',\n\t\t\t'icon' => 'fa fa-vimeo'\n\t\t),\n\t\t'drb' => array(\n\t\t\t'title' => 'Dribbble',\n\t\t\t'icon' => 'fa fa-dribbble'\n\t\t),\n\t\t'ig' => array(\n\t\t\t'title' => 'Instagram',\n\t\t\t'icon' => 'fa fa-instagram' \n\t\t),\n\t\t'pi' => array(\n\t\t\t'title' => 'Pinterest',\n\t\t\t'icon' => 'fa fa-pinterest' \n\t\t),\n\t\t'gp' => array(\n\t\t\t'title' => 'Google+',\n\t\t\t'icon' => 'fa fa-google-plus' \n\t\t),\n\t\t'vk' => array(\n\t\t\t'title' => 'VKontakte',\n\t\t\t'icon' => 'fa fa-vk' \n\t\t),\n\t\t'fl' => array(\n\t\t\t'title' => 'Flickr',\n\t\t\t'icon' => 'fa fa-flickr'\n\t\t),\n\t\t'be' => array(\n\t\t\t'title' => 'Behance',\n\t\t\t'icon' => 'fa fa-behance' \n\t\t),\n\t\t'fs' => array(\n\t\t\t'title' => 'Foursquare',\n\t\t\t'icon' => 'fa fa-foursquare'\n\t\t),\n\t\t'sk' => array(\n\t\t\t'title' => 'Skype',\n\t\t\t'icon' => 'fa fa-skype'\n\t\t),\n\t\t'tu' => array(\n\t\t\t'title' => 'Tumblr',\n\t\t\t'icon' => 'fa fa-tumblr'\n\t\t),\n\t\t'da' => array(\n\t\t\t'title' => 'DeviantArt',\n\t\t\t'icon' => 'fa fa-deviantart'\n\t\t),\n\t\t'gh' => array(\n\t\t\t'title' => 'GitHub',\n\t\t\t'icon' => 'fa fa-github'\n\t\t),\n\t\t'sc' => array(\n\t\t\t'title' => 'SoundCloud',\n\t\t\t'icon' => 'fa fa-soundcloud'\n\t\t),\n\t\t'hz' => array(\n\t\t\t'title' => 'Houzz',\n\t\t\t'icon' => 'fa fa-houzz'\n\t\t),\n\t\t'px' => array(\n\t\t\t'title' => '500px',\n\t\t\t'icon' => 'fa fa-500px',\n\t\t\t'prefix' => 'social',\n\t\t),\n\t\t'xi' => array(\n\t\t\t'title' => 'Xing',\n\t\t\t'icon' => 'fa fa-xing'\n\t\t),\n\t\t'sp' => array(\n\t\t\t'title' => 'Spotify',\n\t\t\t'icon' => 'fa fa-spotify'\n\t\t),\n\t\t'sn' => array(\n\t\t\t'title' => 'Snapchat',\n\t\t\t'icon' => 'fa fa-snapchat-ghost',\n\t\t\t'dark'\t => true\n\t\t),\n\t\t'em' => array(\n\t\t\t'title' => __( 'Email', 'kalium' ),\n\t\t\t'icon' => 'fa fa-envelope-o'\n\t\t),\n\t\t'yp' => array(\n\t\t\t'title' => 'Yelp',\n\t\t\t'icon' => 'fa fa-yelp'\n\t\t),\n\t\t'ta' => array(\n\t\t\t'title' => 'TripAdvisor',\n\t\t\t'icon' => 'fa fa-tripadvisor'\n\t\t),\n\t\t\n\t\t'custom' => array(\n\t\t\t'title' => get_data( 'social_network_custom_link_title' ), \t\t\t\n\t\t\t'href' => get_data( 'social_network_custom_link_link' ),\n\t\t\t'icon' => 'fa ' . ( $custom_icon ? \"fa-{$custom_icon}\" : 'fa-plus' ),\n\t\t),\n\t) );\n\n\t// Social Networks Class\n\t$class = 'social-networks';\n\t\n\tif ( isset( $atts['class'] ) ) {\n\t\t$class .= ' ' . $atts['class'];\n\t}\n\t\n\t// Rounded Social Networks\n\tif ( is_array( $atts ) && in_array( 'rounded', $atts ) ) {\n\t\t$class .= ' rounded';\n\t} else {\n\t\t$class .= ' textual';\n\t}\n\t\n\t// Colored Text\n\tif ( is_array( $atts ) && ( in_array( 'colored', $atts ) || 'hover' == get_array_key( $atts, 'colored' ) ) ) {\n\t\t\n\t\tif ( is_array( $atts ) && 'hover' == get_array_key( $atts, 'colored' ) ) {\n\t\t\t$class .= ' colored-hover';\n\t\t} else {\n\t\t\t$class .= ' colored';\t\n\t\t}\n\t}\t\n\t// Colored Background\n\telse if ( is_array( $atts ) && ( in_array( 'colored-bg', $atts ) || 'hover' == get_array_key( $atts, 'colored-bg' ) ) ) {\n\t\t\n\t\tif ( is_array( $atts ) && 'hover' == get_array_key( $atts, 'colored-bg' ) ) {\n\t\t\t$class .= ' colored-bg-hover';\n\t\t} else {\n\t\t\t$class .= ' colored-bg';\n\t\t}\n\t}\n\t\n\t$html = '<ul class=\"' . esc_attr( $class ) . '\">';\n\n\tforeach ( $social_order['visible'] as $key => $title ) {\n\t\t\n\t\tif ( $key == 'placebo' ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t$sn = $social_order_list[ $key ];\n\t\t\n\t\t$href = get_data( \"social_network_link_{$key}\" );\n\t\t$class = sanitize_title( $title );\n\t\t\n\t\t// Prefixed\n\t\tif ( isset( $sn['prefix'] ) ) {\n\t\t\t$class = \"{$sn['prefix']}-\" . $class;\n\t\t}\n\t\t\n\t\tif ( $key == 'custom' ) {\n\t\t\t$title = $sn['title'];\n\t\t\t$href = $sn['href'];\n\t\t\t$class \t = 'custom';\n\t\t}\n\t\t\n\t\t$title_span = $title;\n\t\t\n\t\tif ( isset( $atts['class'] ) && strpos( $atts['class'], 'rounded' ) >= 0 ) {\n\t\t\t$title_span = $title;\n\t\t}\n\t\t\n\t\t$link_target = get_data( 'social_networks_target_attr', '_blank' );\n\t\t\n\t\tif ( is_email( $href ) ) {\n\t\t\t$link_target = '_self';\n\t\t\t$subject = get_data( 'social_network_link_em_subject' );\n\t\t\n\t\t\t$href = \"mailto:{$href}\";\n\t\t\t\n\t\t\tif ( $subject ) {\n\t\t\t\t$href .= '?subject=' . esc_attr( $subject );\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Dark Class\n\t\tif ( ! empty( $sn['dark'] ) ) {\n\t\t\t$class .= ' dark';\n\t\t}\n\t\t\t\n\t\t$html .= '<li>';\n\t\t\t$html .= '<a href=\"' . $href . '\" target=\"' . $link_target . '\" class=\"' . $class . '\" title=\"' . $title . '\">';\n\t\t\t\t$html .= '<i class=\"' . $sn['icon'] . '\"></i>';\n\t\t\t\t$html .= '<span class=\"name\">' . apply_filters( 'kalium_social_networks_name' , $title_span, $title ) . '</span>';\n\t\t\t$html .= '</a>';\n\t\t$html .= '</li>';\n\t}\n\n\t$html .= '</ul>';\n\n\n\treturn apply_filters( 'shortcode_social_networks_shortcode', $html );\n\n}", "public function hookDisplaySocialSharing()\n {\n if (!isset($this->context->controller) || !method_exists($this->context->controller, 'getProduct')) {\n return '';\n }\n\n $product = $this->context->controller->getProduct();\n\n if (isset($product) && Validate::isLoadedObject($product)) {\n $imageCoverId = $product->getCover($product->id);\n if (is_array($imageCoverId) && isset($imageCoverId['id_image'])) {\n $imageCoverId = (int)$imageCoverId['id_image'];\n } else {\n $imageCoverId = 0;\n }\n\n Media::addJsDef(\n [\n 'sharing_name' => addcslashes($product->name, \"'\"),\n 'sharing_url' => addcslashes($this->context->link->getProductLink($product), \"'\"),\n 'sharing_img' => addcslashes($this->context->link->getImageLink($product->link_rewrite, $imageCoverId, $this->getSelectedProductImageType()), \"'\"),\n ]\n );\n }\n\n if (!$this->isCached('socialsharing.tpl', $this->getCacheId('socialsharing|' . (isset($product->id) && $product->id ? (int)$product->id : '')))) {\n $this->context->smarty->assign(\n [\n 'product' => isset($product) ? $product : '',\n 'PS_SC_TWITTER' => Configuration::get('PS_SC_TWITTER'),\n 'PS_SC_FACEBOOK' => Configuration::get('PS_SC_FACEBOOK'),\n 'PS_SC_PINTEREST' => Configuration::get('PS_SC_PINTEREST'),\n ]\n );\n }\n\n return $this->display(__FILE__, 'socialsharing.tpl', $this->getCacheId('socialsharing|' . (isset($product->id) && $product->id ? (int)$product->id : '')));\n }", "public function icons() {\n /*\n * TEMPLATE QUE SERÁ USADO PELO MÓDULO DO SISTEMA\n */\n $this->dados['_conteudo_masterPageIframe'] = $this->router->fetch_class() . '/vIcons';\n $this->load->view('vMasterPageIframe', $this->dados);\n }", "function bjorn_footer_instagram_show() {\n\n $bjorn_theme_options = bjorn_get_theme_options();\n \n // Instagram feed\n if(isset($bjorn_theme_options['footer_instagram_display']) && ($bjorn_theme_options['footer_instagram_display'])) {\n\n echo '<div class=\"footer-instagram-wrapper\">';\n \n if(isset($bjorn_theme_options['footer_instagram_title']) && $bjorn_theme_options['footer_instagram_title'] <> '') {\n echo '<div class=\"container\"><div class=\"row\"><div class=\"col-md-12 bjorn-theme-block\">';\n echo '<h4>'.esc_html($bjorn_theme_options['footer_instagram_title']).'</h4>';\n echo '<h2 class=\"lined\">'.esc_html($bjorn_theme_options['footer_instagram_subtitle']).'</h2>';\n echo '</div></div></div>';\n }\n\n echo do_shortcode('[instagram-feed]');\n echo '</div>';\n \n }\n\n}", "public function hasIcon()\n {\n return (bool) $this->getPublicIconURL();\n }", "public function listing_social_buttons($params, Smarty_Internal_Template $smarty)\n {\n $view = geoView::getInstance();\n if ($view->preview_listing) {\n //do not show on preview listing page, it can mess things up\n return '';\n }\n $util = geoAddon::getUtil($this->name);\n\n $listing_id = (int)$params['listing_id'];\n\n $tpl_vars = array ();\n\n $tpl_vars['activeMethods'] = $util->getActiveMethods(false, true);\n\n //specify which image should be used for methods that pick thumbnails (like Facebook and Digg)\n $imgUrl = DataAccess::getInstance()->GetOne(\"SELECT `image_url` FROM `geodesic_classifieds_images_urls` WHERE `classified_id` = ? ORDER BY `display_order`\", array($listing_id));\n if ($imgUrl) {\n $img = (stripos($imgUrl, '://') === false) ? geoFilter::getBaseHref() : '';\n $img .= $imgUrl;\n $tpl_vars['lead_image'] = $img;\n }\n\n $tpl_vars['text'] = geoAddon::getText('geo_addons', 'sharing');\n $tpl_vars['shortLinks'] = $util->getShortLinks($listing_id);\n\n $tpl_vars['showMoreLink'] = false; //set this later when number of total methods exceeds what we want to show in the popup\n //$tpl_vars['numMethods'] = count($util->_methods);\n\n $listing = geoListing::getListing($listing_id);\n\n $tpl_vars['shareButtonImage'] = geoTemplate::getUrl('images', 'addon/sharing/icon_share.png');\n $tpl_vars['forListing'] = $listing_id;\n $tpl_vars['file_name'] = $fileName = DataAccess::getInstance()->get_site_setting('classifieds_file_name');\n $tpl_vars['listing_url_unencoded'] = $listing->getFullUrl();\n $tpl_vars['listing_url'] = urlencode($tpl_vars['listing_url_unencoded']);\n\n\n $tpl_vars['listing_data'] = $listing->toArray();\n $tpl_vars['listing_data']['description'] = geoString::specialChars(geoFilter::listingDescription($listing->description, true));\n\n $tpl_vars['social_buttons'] = array (\n 'twitter.tpl',\n 'google_plus.tpl',\n 'pinterest.tpl',\n 'linkedin.tpl',\n 'facebook.tpl',\n );\n\n //set up formatted price as a separate var\n if ($listing->item_type == 1) {\n $tpl_vars['price'] = geoString::displayPrice($listing->price, $listing->precurrency, $listing->postcurrency);\n } elseif ($listing->item_type == 2) {\n if ($listing->buy_now_only == 1) {\n $auction_price = $listing->buy_now;\n } elseif ($listing->current_bid < $listing->starting_bid) {\n $auction_price = $listing->starting_bid;\n } else {\n $auction_price = $listing->current_bid;\n }\n $tpl_vars['price'] = geoString::displayPrice($auction_price, $listing->precurrency, $listing->postcurrency);\n }\n\n return geoTemplate::loadInternalTemplate(\n $params,\n $smarty,\n 'button_listing_display.tpl',\n geoTemplate::ADDON,\n $this->name,\n $tpl_vars\n );\n }", "function codeless_team_socials( ){\n $list = codeless_get_team_social_list();\n $output = '';\n if( empty($list) )\n return;\n \n foreach($list as $social){\n $link = codeless_get_meta( $social['id'] . '_link', '', get_the_ID());\n\n if( $link != '' ){\n $output .= '<a href=\"'.esc_url( $link ).'\"><i class=\"'.esc_attr( $social['icon'] ).'\"></i></a>';\n }\n }\n\n \n return $output;\n}", "function wp_idea_stream_sharing_services(){\n\t$ideastream_sharing_options = get_option('_ideastream_sharing_options');\n\tif($ideastream_sharing_options==\"0\") return false;\n\t$ideastream_twitter_account = get_option('_ideastream_twitter_account');\n\t?>\n\t<ul class=\"ideastream_share\">\n\t\t<li class=\"ideastream_share_text\"><?php _e('Share this idea!', 'wp-idea-stream');?></li>\n\t\t<li class=\"ideastream_share_email\">\n\t\t\t<a href=\"mailto:?&subject=<?php echo rawurlencode(get_the_title());?>&body=<?php echo get_permalink();?>\" title=\"<?php _e('Share by email','wp-idea-stream');?>\"><img src=\"<?php echo WP_IDEA_STREAM_PLUGIN_URL;?>/images/share_mail.png\" border=\"0\" alt=\"<?php _e('Share by email','wp-idea-stream');?>\"></a>\n\t\t</li>\n\t\t<?php if($ideastream_twitter_account && $ideastream_twitter_account!=\"\"):?>\n\t\t<li class=\"ideastream_share_twitter\">\n\t\t\t<a href=\"http://twitter.com/share\" class=\"twitter-share-button\" data-count=\"horizontal\" data-via=\"<?php echo $ideastream_twitter_account;?>\" data-url=\"<?php the_permalink();?>\" data-text=\"<?php the_title();?>\" data-lang=\"en\">Tweet</a>\n\t\t\t<script type=\"text/javascript\" src=\"http://platform.twitter.com/widgets.js\"></script>\n\t\t</li>\n\t\t<?php endif;?>\n\t\t<?php do_action('wp_idea_stream_add_sharing_services');?>\n\t</ul>\n\t<?php\n}", "public function social_profile_callback() {\n\t\tif ( ! empty( $this->options['w4p_social_profiles'] ) ) {\n\t\t\tforeach ( (array) $this->options['w4p_social_profiles'] as $name => $element ) {\n\t\t\t\tforeach ( $element as $index => $value ) { ?>\n\t\t\t\t\t<div class=\"w4p-social-profile\">\n\t\t\t\t\t\t<label for=\"w4p_social_profiles_<?php echo esc_attr( $name ); ?>_<?php echo esc_attr( $index + 1 ); ?>\" class=\"w4p-option-label\">\n\t\t\t\t\t\t\t<?php echo esc_html( $this->social[ $name ] ); ?>:\n\t\t\t\t\t\t</label>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\tid=\"w4p_social_profiles_<?php echo esc_attr( $name ); ?>_<?php echo esc_attr( $index + 1 ); ?>\"\n\t\t\t\t\t\t\tname=\"w4p_social_profiles[<?php echo esc_attr( $name ); ?>][]\"\n\t\t\t\t\t\t\tclass=\"<?php echo esc_attr( $name ); ?>\"\n\t\t\t\t\t\t\tvalue=\"<?php echo esc_attr( $value ); ?>\"\n\t\t\t\t\t\t\tplaceholder=\"<?php esc_attr_e( 'http://', 'w4ptheme' ); ?>\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<button class=\"button w4p-social-remove\"><b>&#8211;</b></button>\n\t\t\t\t\t</div>\n\t\t\t\t\t<?php\n\t\t\t\t}\n\t\t\t}\n\t\t} else { ?>\n\t\t\t<div class=\"w4p-social-profile\">\n\t\t\t\t<label for=\"w4p_social_profiles_facebook_1\" class=\"w4p-option-label\"><?php echo esc_html( $this->social['facebook'] ); ?>:</label>\n\t\t\t\t<input\n\t\t\t\t\ttype=\"text\"\n\t\t\t\t\tid=\"w4p_social_profiles_facebook_1\"\n\t\t\t\t\tname=\"w4p_social_profiles[facebook][]\"\n\t\t\t\t\tclass=\"facebook\"\n\t\t\t\t\tvalue=\"\"\n\t\t\t\t\tplaceholder=\"<?php esc_attr_e( 'http://', 'w4ptheme' ); ?>\"\n\t\t\t\t/>\n\t\t\t\t<button class=\"button w4p-social-remove\">-</button>\n\t\t\t</div>\n\t\t\t<?php\t} ?>\n\n\t\t<hr>\n\t\t<div class=\"w4p-social-profile-selector-wrapper\">\n\t\t\t<label for=\"social_profile_selector\" class=\"w4p-option-label\"><?php esc_attr_e( 'Select profile: ', 'w4ptheme' ); ?></label>\n\t\t\t<select id=\"social_profile_selector\">\n\t\t\t\t<?php\n\t\t\t\tforeach ( $this->social as $name => $option ) { ?>\n\t\t\t\t\t<option <?php selected( $name, 'facebook' ); ?> value=\"<?php echo esc_attr( $name ); ?>\"><?php echo esc_html( $option ); ?></option>\n\t\t\t\t<?php } ?>\n\t\t\t</select>\n\t\t\t<button id=\"social_profile_add\" class=\"button\">Add new...</button>\n\t\t</div>\n\t\t<?php\n\t}", "function add_optimized_social_share_buttons($content) {\n\t\t$strikableURL = get_permalink();\n \n\t\t// Get current page title\n\t\t$strikableTitle = str_replace( ' ', '%20', get_the_title());\n\t\t\n\t\t// Get Post Thumbnail for pinterest\n\t\t$strikableThumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' );\n \n\t\t// Construct sharing URL without using any script\n $twitterUserName = get_option(\"optimized-social-share-twitter-name\");\n\t\t$twitterURL = 'https://twitter.com/intent/tweet?text='.$strikableTitle.'&amp;url='.$strikableURL.'&amp;via='.$twitterUserName;\n\n\t\t$facebookURL = 'https://www.facebook.com/sharer/sharer.php?u='.$strikableURL;\n\t\t$googleURL = 'https://plus.google.com/share?url='.$strikableURL;\n\t\t$bufferURL = 'https://bufferapp.com/add?url='.$strikableURL.'&amp;text='.$strikableTitle;\n\t\t\n\t\t// Based on popular demand added Pinterest too\n\t\t$pinterestURL = 'https://pinterest.com/pin/create/button/?url='.$strikableURL.'&amp;media='.$strikableThumbnail[0].'&amp;description='.$strikableTitle;\n \t\t$emailURL = 'mailto:?subject=' . $strikableTitle . '&amp;body=Check out this site: '. $strikableURL .'\" title=\"Share by Email';\n \n \t\tif(get_option(\"optimized-social-share-strikable-rel-nofollow\") == 1){\n \t\t\t$rel_nofollow = 'rel=\"nofollow\"';\n \t\t}else{\n \t\t\t$rel_nofollow = '';\n \t\t}\n \n\t\t// Add sharing button at the end of page/page content\n\t\t$content .= '<div class=\"strikable-social\">';\n\t\t$content .= '<!-- Social Sharing Buttons (Optimized) Plugin without any Java Script Loading by Strikable.com - START-->';\n\t\t$content .= '<h5>'.get_option(\"optimized-social-share-strikable-custom-label\").'</h5>';\n\t\t\n if(get_option(\"optimized-social-share-facebook\") == 1){\n\t\t\t$content .= '<a class=\"strikable-link strikable-facebook\" href=\"'.$facebookURL.'\" target=\"_blank\" '. $rel_nofollow .'>Facebook</a>';\n }\n if(get_option(\"optimized-social-share-twitter\") == 1){\n\t\t\t$content .= '<a class=\"strikable-link strikable-twitter\" href=\"'. $twitterURL .'\" target=\"_blank\" '. $rel_nofollow .'>Twitter</a>';\n }\n if(get_option(\"optimized-social-share-googleplus\") == 1){\n\t\t\t$content .= '<a class=\"strikable-link strikable-googleplus\" href=\"'.$googleURL.'\" target=\"_blank\" '. $rel_nofollow .'>Google+</a>';\n }\n if(get_option(\"optimized-social-share-buffer\") == 1){\n\t\t\t$content .= '<a class=\"strikable-link strikable-buffer\" href=\"'.$bufferURL.'\" target=\"_blank\" '. $rel_nofollow .'>Buffer</a>';\n }\n if(get_option(\"optimized-social-share-pinterest\") == 1){\n\t\t\t$content .= '<a class=\"strikable-link strikable-pinterest\" href=\"'.$pinterestURL.'\" target=\"_blank\" '. $rel_nofollow .'>Pin It</a>';\n }\n if(get_option(\"optimized-social-share-email\") == 1){\n\t\t\t$content .= '<a class=\"strikable-link strikable-email\" href=\"'.$emailURL.'\" target=\"_blank\" '. $rel_nofollow .'>Email</a>'; \n }\n $content .= '<!-- Social Sharing Buttons (Optimized) - END-->';\n\n\t\t$content .= '</div>';\n\t\treturn $content;\n}", "function gazebo_ubc_social_media_links($items = NULL, $style = 'plain') {\n // social media buttons\n $variables['tweet'] = '<span class=\"social-link social-link-twitter\"><a href=\"http://twitter.com/share\" class=\"twitter-share-button\" data-url=\"';\n $variables['tweet'] .= $_SERVER['HTTP_HOST'] . base_path() . drupal_get_path_alias($_GET['q']) . '\" data-count=\"horizontal\">Tweet</a>';\n $variables['tweet'] .= '<script type=\"text/javascript\" src=\"http://platform.twitter.com/widgets.js\"></script></span>';\n $variables['facebook_like'] = '\n <script>\n (function(d, s, id) {\n var js, fjs = d.getElementsByTagName(s)[0];\n if (d.getElementById(id)) {return;}\n js = d.createElement(s); js.id = id;\n js.src = \"//connect.facebook.net/en_US/all.js#xfbml=1\";\n fjs.parentNode.insertBefore(js, fjs);\n }(document, \"script\", \"facebook-jssdk\"));\n </script>';\n\n $variables['facebook_like'] .= '<span class=\"social-link social-link-fb\"><fb:like href=http://' . $_SERVER['HTTP_HOST'] . base_path() . drupal_get_path_alias($_GET['q']);\n $variables['facebook_like'] .= ' layout=\"button_count\" show-faces=\"true\" width=\"80\" action=\"like\" colorscheme=\"light\" /></span>';\n \n $variables['social_media_buttons'] = '<div class=\"media-links-' . $style . '\">';\n if (isset($items)) {\n if (in_array('twitter', $items)) {\n $variables['social_media_buttons'] .= $variables['tweet'];\n }\n if (in_array('facebook', $items)) {\n $variables['social_media_buttons'] .= $variables['facebook_like'];\n }\n }\n else $variables['social_media_buttons'] .= $variables['facebook_like'] . $variables['tweet'];\n \n return $variables['social_media_buttons'] . '</div>';\n\n}", "function wsocial_getecho($url_social, $icon_social) {\n\t$output = \"\";\n\tif ($url_social!=\"\") {\n\t\t$output.=\"\t\t<a href='\".$url_social.\"' target='_blank'>\\n\";\n\t\t$output.=\"\t<span class='symbol'>\".$icon_social.\"</span>\\n\";\n\t\t$output.=\"\t\t</a>\\n\";\n\t}\n\treturn $output;\n}", "function atom_site_icon()\n{\n}", "public function isSocialAccount()\n {\n return !empty($this->social_provider);\n }" ]
[ "0.7469688", "0.71680784", "0.7121175", "0.6879064", "0.68295634", "0.67699784", "0.6757376", "0.6701878", "0.66816705", "0.6627469", "0.6599008", "0.65676546", "0.65470606", "0.65350354", "0.65322626", "0.63987076", "0.6397136", "0.6350571", "0.6259229", "0.6250878", "0.6156215", "0.6146761", "0.61033106", "0.6101615", "0.6090066", "0.606619", "0.60651916", "0.6060508", "0.6046918", "0.59692717", "0.5962328", "0.59603804", "0.59407747", "0.5932605", "0.5909174", "0.5902707", "0.5877634", "0.585574", "0.5846167", "0.5842621", "0.58083445", "0.57948387", "0.5789718", "0.57784545", "0.5775496", "0.57539326", "0.5741324", "0.5728976", "0.5728041", "0.57165486", "0.5715345", "0.5714524", "0.57086223", "0.5692541", "0.5685013", "0.5651493", "0.5644652", "0.5642835", "0.56261957", "0.56126374", "0.56126076", "0.5603858", "0.5597566", "0.55732465", "0.5569307", "0.5568307", "0.5564674", "0.55439085", "0.5530661", "0.5530661", "0.55209345", "0.5520763", "0.55198526", "0.54965776", "0.5491652", "0.54858565", "0.54715174", "0.54666966", "0.5466494", "0.5463333", "0.54618967", "0.544696", "0.544351", "0.5440125", "0.54152346", "0.5409909", "0.54090184", "0.5401744", "0.5398729", "0.5392434", "0.5384233", "0.5383482", "0.5362042", "0.5359755", "0.5351657", "0.53442997", "0.5343197", "0.5338369", "0.5335937", "0.53324604" ]
0.8226564
0
The primary navigation wrapper
Основной элемент обертки навигации
function freshio_primary_navigation_wrapper() { echo '<div class="freshio-primary-navigation"><div class="col-full">'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function showPrimaryNav()\n {\n }", "public function OpenMainNav(){\n\t\techo '<ul class=\"mainnav\">';\n\t}", "private function app_nav() {\n\n $aidlink = parent::get_aidlink();\n\n $locale = parent::get_locale();\n\n $sections = Admins::getInstance()->getAdminSections();\n\n $pages = Admins::getInstance()->getAdminPages();\n\n $is_current_page = parent::_currentPage();\n\n echo \"<ul id=\\\"app_search_result\\\" style=\\\"display:none;\\\"></ul>\\n\";\n\n foreach ($sections as $i => $section_name) :\n\n if (!empty($pages[$i]) && is_array($pages[$i])) :\n\n echo \"<ul id=\\\"ap-$i\\\" class=\\\"app_page_list\\\" style=\\\"display:none;\\\">\\n\";\n\n foreach ($pages[$i] as $key => $data) :\n\n $secondary_active = $data['admin_link'] == $is_current_page ? \"class='active'\" : '';\n\n $title = $data['admin_title'];\n\n $link = ADMIN.$data['admin_link'].$aidlink;\n\n if ($data['admin_page'] !== 5) {\n $title = isset($locale[$data['admin_rights']]) ? $locale[$data['admin_rights']] : $title;\n }\n\n if (checkrights($data['admin_rights'])) :\n ?>\n <li <?php echo $secondary_active ?>>\n <a href=\"<?php echo $link ?>\">\n <div class=\"app_icon\">\n <img class=\"img-responsive\" alt=\"<?php echo $title ?>\"\n src=\"<?php echo get_image(\"ac_\".$data['admin_rights']); ?>\"/>\n </div>\n <div class=\"apps\">\n <h4><?php echo $title ?></h4>\n </div>\n </a>\n </li>\n <?php\n endif;\n\n endforeach;\n\n echo \"</ul>\\n\";\n\n endif;\n\n endforeach;\n }", "function sp_main_navigation() {\n\t\tif ( function_exists ( 'wp_nav_menu' ) )\n\t\t\twp_nav_menu( array(\n\t\t\t\t'container' => false,\n\t\t\t\t'menu_class'\t => 'main-menu',\n\t\t\t\t'theme_location' => 'primary_nav',\n\t\t\t\t'fallback_cb' => 'sp_main_nav_fallback'\n\t\t\t\t) );\n\t\telse\n\t\t\tsp_main_nav_fallback();\t\n\t}", "function side_navigation() {\n\n\t\t//side navigation\n\t\t$nav['dashboard'] = array('name' => trans('admin_messages.dashboard'), 'icon' => 'assessment', 'route' => route('admin.dashboard'), 'active' => navigation_active('admin.dashboard'));\n\t\t$nav['user_management'] = array('name' => trans('admin_messages.user_management'), 'icon' => 'account_circle', 'route' => route('admin.view_user'), 'active' => navigation_active('admin.view_user'));\n\t\t$nav['driver_management'] = array('name' => trans('admin_messages.driver_management'), 'icon' => 'drive_eta', 'route' => route('admin.view_driver'), 'active' => navigation_active('admin.view_driver'));\n\t\t$nav['store_management'] = array('name' => trans('admin_messages.store_management'), 'icon' => 'store', 'route' => route('admin.view_store'), 'active' => navigation_active('admin.view_store'));\n\t\t$nav['order_management'] = array('name' => trans('admin_messages.order_managemnt'), 'icon' => 'add_shopping_cart', 'route' => route('admin.order'), 'active' => navigation_active('admin.order'));\n\t\t$nav['store_payout_management'] = array('name' => trans('admin_messages.store_payout_management'), 'icon' => 'euro_symbol', 'route' => route('admin.payout', 1), 'active' => navigation_active('admin.payout', 1));\n\t\t$nav['driver_payout_management'] = array('name' => trans('admin_messages.driver_payout_management'), 'icon' => 'motorcycle', 'route' => route('admin.payout', 2), 'active' => navigation_active('admin.payout', 2));\n\t\t$nav['driver_owe_amount'] = array('name' => trans('admin_messages.owe_amount'), 'icon' => 'attach_money', 'route' => route('admin.owe_amount'), 'active' => navigation_active('admin.owe_amount'));\n\t\t$nav['penality'] = array('name' => trans('admin_messages.penalty'), 'icon' => 'thumb_down', 'route' => route('admin.penality'), 'active' => navigation_active('admin.penality'));\n\t\t$nav['category_management'] = array('name' => trans('admin_messages.category_management'), 'icon' => 'fastfood', 'route' => route('admin.category'), 'active' => navigation_active('admin.category'));\n\t\t$nav['promo_management'] = array('name' => trans('admin_messages.promo_management'), 'icon' => 'card_giftcard', 'route' => route('admin.promo'), 'active' => navigation_active('admin.promo'));\n\t\t$nav['static_page_management'] = array('name' => trans('admin_messages.static_page_management'), 'icon' => 'description', 'route' => route('admin.static_page'), 'active' => navigation_active('admin.static_page'));\n\t\t$nav['home_slider'] = array('name' => trans('admin_messages.home_slider'), 'icon' => 'description', 'route' => route('admin.view_home_slider'), 'active' => navigation_active('admin.view_home_slider'));\n\t\t// $nav['country_management'] = array('name' => trans('admin_messages.country_management'), 'icon' => 'language', 'route' => route('admin.country'), 'active' => navigation_active('admin.country'));\n\t\t// $nav['currency_management'] = array('name' => trans('admin_messages.currency_management'), 'icon' => 'euro_symbol', 'route' => route('admin.currency'), 'active' => navigation_active('admin.currency'));\n\t\t$nav['cancel_reason'] = array('name' => trans('admin_messages.cancel_reason'), 'icon' => 'cancel', 'route' => route('admin.order_cancel_reason'), 'active' => navigation_active('admin.order_cancel_reason'));\n\t\t$nav['review_issue_type'] = array('name' => trans('admin_messages.review_issue_type'), 'icon' => 'report_problem', 'route' => route('admin.issue_type'), 'active' => navigation_active('admin.issue_type'));\n\t\t$nav['review_vehicle_type'] = array('name' => trans('admin_messages.manage_vehicle_type'), 'icon' => 'drive_eta', 'route' => route('admin.vehicle_type'), 'active' => navigation_active('admin.vehicle_type'));\n\t\t$nav['food_receiver'] = array('name' => trans('admin_messages.item_receiver'), 'icon' => 'receipt', 'route' => route('admin.food_receiver'), 'active' => navigation_active('admin.food_receiver'));\n\t\t$nav['help_category'] = array('name' => trans('admin_messages.help_category'), 'icon' => 'help', 'route' => route('admin.help_category'), 'active' => navigation_active('admin.help_category'));\n\t\t$nav['help_subcategory'] = array('name' => trans('admin_messages.help_subcategory'), 'icon' => 'help', 'route' => route('admin.help_subcategory'), 'active' => navigation_active('admin.help_subcategory'));\n\t\t$nav['help'] = array('name' => trans('admin_messages.help'), 'icon' => 'help', 'route' => route('admin.help'), 'active' => navigation_active('admin.help'));\n\t\t$nav['site_setting'] = array('name' => trans('admin_messages.site_setting'), 'icon' => 'settings', 'route' => route('admin.site_setting'), 'active' => navigation_active('admin.site_setting'));\n\t\treturn $nav;\n\t}", "function glocal_navigation() {\n\n\t//store the current blog_id being viewed\n\tglobal $blog_id;\n\t$current_blog_id = $blog_id;\n\n\t//switch to the main blog which will have an id of 1\n\tswitch_to_blog(1);\n\n\t//output the WordPress navigation menu\n\t$glocal_nav = bones_main_nav();\n\n\t//switch back to the current blog being viewed\n\tswitch_to_blog($current_blog_id);\n\n\treturn $glocal_nav;\n}", "function zaxu_navigation() {\n\t\t\tfunction no_primary_menu() {\n\t\t\t\tif ( is_user_logged_in() ) {\n\t\t\t\t\t$menu_item = '\n\t\t\t\t\t\t<li class=\"menu-item\">\n\t\t\t\t\t\t\t<a href=\"' . esc_url( admin_url('nav-menus.php') ) . '\">' . __('Edit Menu', 'zaxu') . '</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t';\n\t\t\t\t} else {\n\t\t\t\t\t$menu_item = null;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\techo '\n\t\t\t\t\t<nav class=\"menu-navigation-container\" role=\"navigation\">\n\t\t\t\t\t\t<ul class=\"main-menu\">\n\t\t\t\t\t\t\t<li class=\"menu-item\">\n\t\t\t\t\t\t\t\t<a href=\"' . esc_url( home_url('/') ) . '\" class=\"ajax-link\">' . __('Home', 'zaxu') . '</a>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t' . $menu_item . '\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</nav>\n\t\t\t\t';\n\t\t\t}\n\t\t// No primary menu end\n\n\t\t// Get WP navigation start\n\t\t\tfunction zaxu_get_wp_navigation() {\n\t\t\t\tif ( has_nav_menu('primary') ) {\n\t\t\t\t\t$primary_menu = wp_nav_menu(\n\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t'menu' => '',\n\t\t\t\t\t\t\t'container' => 'nav',\n\t\t\t\t\t\t\t'container_class' => '',\n\t\t\t\t\t\t\t'container_id' => '',\n\t\t\t\t\t\t\t'menu_class' => 'main-menu',\n\t\t\t\t\t\t\t'menu_id' => '',\n\t\t\t\t\t\t\t'echo' => false,\n\t\t\t\t\t\t\t'fallback_cb' => '__return_false',\n\t\t\t\t\t\t\t'before' => '',\n\t\t\t\t\t\t\t'after' => '',\n\t\t\t\t\t\t\t'link_before' => '',\n\t\t\t\t\t\t\t'link_after' => '',\n\t\t\t\t\t\t\t'items_wrap' => '<ul id=\"%1$s\" class=\"%2$s\">%3$s</ul>',\n\t\t\t\t\t\t\t'item_spacing' => 'preserve',\n\t\t\t\t\t\t\t'depth' => 0,\n\t\t\t\t\t\t\t'walker' => '',\n\t\t\t\t\t\t\t'theme_location' => 'primary',\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\n\t\t\t\t\tif ( empty($primary_menu) ) {\n\t\t\t\t\t\tno_primary_menu();\n\t\t\t\t\t} else {\n\t\t\t\t\t\techo $primary_menu;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tno_primary_menu();\n\t\t\t\t}\n\t\t\t}\n\t\t// Get WP navigation end\n\n\t\t// Add sub menu toggle start\n\t\t\tfunction zaxu_add_sub_menu_toggle($item_output, $item, $depth, $args) {\n\t\t\t\tif ($args->theme_location == 'primary') {\n\t\t\t\t\tif ( in_array('menu-item-has-children', $item->classes) ) {\n\t\t\t\t\t\t$item_output = str_replace(\n\t\t\t\t\t\t\t$args->link_after . '</a>',\n\t\t\t\t\t\t\t$args->link_after . '</a><div class=\"sub-menu-toggle\"></div>',\n\t\t\t\t\t\t\t$item_output\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn $item_output;\n\t\t\t}\n\t\t\tadd_filter('walker_nav_menu_start_el', 'zaxu_add_sub_menu_toggle', 10, 4);\n\t\t// Add sub menu toggle end\n\n\t\t// Get navigation logo\n\t\tfunction zaxu_navigation_logo() {\n\t\t\t$logo = get_theme_mod('zaxu_logo');\n\t\t\t$is_logo = is_file( $_SERVER['DOCUMENT_ROOT'] . '/' . parse_url($logo, PHP_URL_PATH) );\n\t\t\t$logo_height = esc_attr( get_theme_mod('zaxu_logo_height', 30) );\n\t\t\t$placeholder_img = \"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1 1'%3E%3C/svg%3E\";\n\t\t\tif ($logo && $is_logo) {\n\t\t\t\t$filetype = wp_check_filetype($logo)['ext'];\n\t\t\t\tif ($filetype == \"svg\") {\n\t\t\t\t\t$svg_inline_content = file_get_contents( $_SERVER['DOCUMENT_ROOT'] . '/' . parse_url($logo, PHP_URL_PATH) );\n\t\t\t\t\t$svg_inline_content_new = str_replace(\"<svg\", \"<svg preserveAspectRatio='xMinYMid'\", $svg_inline_content);\n\t\t\t\t\techo '\n\t\t\t\t\t\t<span class=\"link-title\">' . esc_attr( get_bloginfo('name') ) . '</span>\n\t\t\t\t\t';\n\t\t\t\t\techo $svg_inline_content_new;\n\t\t\t\t} else {\n\t\t\t\t\tif (get_theme_mod('zaxu_lazyload', 'enabled') == \"enabled\") {\n\t\t\t\t\t\techo '\n\t\t\t\t\t\t\t<img src=\"' . $placeholder_img . '\" data-src=\"' . $logo . '\" alt=\"' . esc_attr( get_bloginfo('name') ) . '\" itemprop=\"logo\" style=\"height: ' . $logo_height . 'px\" class=\"zaxu-lazy\" />\n\t\t\t\t\t\t';\n\t\t\t\t\t} else {\n\t\t\t\t\t\techo '\n\t\t\t\t\t\t\t<img src=\"' . $logo . '\" alt=\"' . esc_attr( get_bloginfo('name') ) . '\" itemprop=\"logo\" style=\"height: ' . $logo_height . 'px\" />\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\techo '\n\t\t\t\t\t<h2>\n\t\t\t\t\t\t<span itemprop=\"name\">' . esc_attr( get_bloginfo('name') ) . '</span>\n\t\t\t\t\t</h2>\n\t\t\t\t';\n\t\t\t}\n\t\t};\n\n\t\t// Get navigation status\n\t\tif (get_theme_mod('zaxu_navigation_status', 'sticky') === 'sticky') {\n\t\t\t$navigation_status = \"sticky\";\n\t\t} else if (get_theme_mod('zaxu_navigation_status', 'sticky') === 'auto') {\n\t\t\t$navigation_status = \"auto\";\n\t\t} else if (get_theme_mod('zaxu_navigation_status', 'sticky') === 'normal') {\n\t\t\t$navigation_status = \"normal\";\n\t\t};\n\n\t\t// Get navigation logo status\n\t\tif ( get_theme_mod('zaxu_logo') ) {\n\t\t\t$image_logo_status = 'image-logo-enabled';\n\t\t} else {\n\t\t\t$image_logo_status = 'image-logo-disabled';\n\t\t}\n\n\t\t// Get hamburger menu status\n\t\tif (get_theme_mod('zaxu_hamburger_menu', 'response') === 'always') {\n\t\t\t$hamburger_menu_status = \"hamburger-menu-always-display\";\n\t\t} else if (get_theme_mod('zaxu_hamburger_menu', 'response') === 'response') {\n\t\t\t$hamburger_menu_status = \"hamburger-menu-response-display\";\n\t\t}\n\n\t\t// Get shopping bag toggle status\n\t\tfunction zaxu_shopping_bag_toggle() {\n\t\t\tif ( class_exists('WooCommerce') ) {\n\t\t\t\tif (get_theme_mod('zaxu_shopping_bag', 'enabled') === 'enabled') {\n\t\t\t\t\t$woocommerce_cart_count = WC()->cart->get_cart_contents_count();\n\t\t\t\t\tif ($woocommerce_cart_count != 0) {\n\t\t\t\t\t\t$badge = '<span class=\"badge\">' . $woocommerce_cart_count . '</span>';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$badge = null;\n\t\t\t\t\t}\n\t\t\t\t\techo '\n\t\t\t\t\t\t<li class=\"content-item shopping-bag-toggle\">\n\t\t\t\t\t\t\t' . $badge . '\n\t\t\t\t\t\t\t<div class=\"shopping-bag-content\">\n\t\t\t\t\t\t\t\t<div class=\"shopping-bag-list\">\n\t\t\t\t\t\t\t\t\t<h3 class=\"shopping-bag-title\">' . __('My Cart', 'zaxu') . '</h3>\n\t\t\t\t\t';\n\t\t\t\t\twoocommerce_mini_cart();\n\t\t\t\t\techo '\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</li>\n\t\t\t\t\t';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Get search status\n\t\tif (get_theme_mod('zaxu_site_search', 'enabled') == 'enabled') {\n\t\t\t$search_status = 'search-enabled';\n\t\t} else {\n\t\t\t$search_status = 'search-disabled';\n\t\t}\n\n\t\t// Get search toggle status\n\t\tfunction zaxu_search_toggle() {\n\t\t\tif (get_theme_mod('zaxu_site_search', 'enabled') == 'enabled') {\n\t\t\t\techo '<li class=\"content-item search-toggle\"></li>';\n\t\t\t}\n\t\t}\n\n\t\t// Get search bar status\n\t\tfunction zaxu_search($device) {\n\t\t\tif (get_theme_mod('zaxu_site_search', 'enabled') == 'enabled') {\n\t\t\t\tif ($device == \"desktop\") {\n\t\t\t\t\techo '<section class=\"site-search-container site-overlay-element desktop\">';\n\t\t\t\t\t\techo '<div class=\"search-bar-box section-inner\">';\n\t\t\t\t\t\t\tget_search_form();\n\t\t\t\t\t\techo '</div>';\n\t\t\t\t\techo '</section>';\n\t\t\t\t} else {\n\t\t\t\t\techo '<div class=\"site-search-container section-inner\">';\n\t\t\t\t\t\tget_search_form();\n\t\t\t\t\techo '</div>';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Get background music toggle status\n\t\tfunction zaxu_background_music_toggle() {\n\t\t\tif ( get_theme_mod('zaxu_background_music') ) {\n\t\t\t\techo '\n\t\t\t\t\t<li class=\"content-item background-music-toggle\">\n\t\t\t\t\t\t<div class=\"buffering-icon\"></div>\n\t\t\t\t\t\t<div class=\"equalizer-icon\">\n\t\t\t\t\t\t\t<span class=\"line\"></span>\n\t\t\t\t\t\t\t<span class=\"line\"></span>\n\t\t\t\t\t\t\t<span class=\"line\"></span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</li>\n\t\t\t\t';\n\t\t\t}\n\t\t}\n\n\t\t// Get share toggle status\n\t\tfunction zaxu_share_toggle() {\n\t\t\tif (get_theme_mod('zaxu_site_share', 'enabled') === 'enabled') {\n\t\t\t\techo '\n\t\t\t\t\t<li class=\"content-item share-toggle\">\n\t\t\t\t\t\t<div class=\"share-icon\"></div>\n\t\t\t\t\t</li>\n\t\t\t\t';\n\t\t\t}\n\t\t}\n\n\t\techo '<header class=\"site-navigation-container ' . $navigation_status . ' ' . $hamburger_menu_status . ' ' . $image_logo_status . ' ' . $search_status . '\" role=\"banner\">';\n\t\t\techo '<div class=\"navigation-holder section-inner\">';\n\t\t\t\t\n\t\t\t\techo '<a href=\"' . esc_url( home_url('/') ) . '\" class=\"navigation-logo ajax-link\">';\n\t\t\t\t\tzaxu_navigation_logo();\n\t\t\t\techo '</a>';\n\t\t\t\t\n\t\t\t\techo '<ul class=\"content-list\">';\n\t\t\t\t\techo '<li class=\"content-item normal-menu-container\">';\n\t\t\t\t\t\tzaxu_get_wp_navigation();\n\t\t\t\t\techo '</li>';\n\t\t\t\t\tzaxu_background_music_toggle();\n\t\t\t\t\tzaxu_share_toggle();\n\t\t\t\t\tzaxu_search_toggle();\n\t\t\t\t\tzaxu_shopping_bag_toggle();\n\t\t\t\t\techo '<li class=\"content-item hamburger-menu-toggle\"></li>';\n\t\t\t\techo '</ul>';\n\n\t\t\techo '</div>';\n\t\techo '</header>';\n\t\t\n\t\techo '<section class=\"site-hamburger-menu-container\">';\n\t\t\tzaxu_search(\"mobile\");\n\t\t\techo '<div class=\"hamburger-menu-content section-inner\">';\n\t\t\t\tzaxu_get_wp_navigation();\n\t\t\techo '</div>';\n\t\techo '</section>';\n\t}", "private function _generate_main_nav()\n\t {\n\t \tif(isset($_SESSION['username']))\n\t\t{\n\t\t\t$this->load->view('navigation/main_user');\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$this->load->view('navigation/main_visitor');\n\t\t}\n\t }", "protected function createNavigation()\n {\n $this->pimple['view.rootPath'] = 'admin/_navigation';\n $navigationView = $this->pimple['view'];\n $navigationView->set('rootUrl', $this->getRootUrl());\n $this->template->set('navigation', $navigationView->render());\n }", "public function renderNavigation()\n {\n //return view('xheetah-nova::navigation');\n }", "function strl_main_navigation() {\n\t\twp_nav_menu(\n\t\t\tarray(\n\t\t\t\t'container' => false,\n\t\t\t\t'menu_id' => 'primary-menu',\n\t\t\t\t'menu_class' => 'vertical medium-horizontal dropdown menu',\n\t\t\t\t'items_wrap' => '<ul id=\"%1$s\" class=\"%2$s\" data-responsive-menu=\"accordion medium-dropdown\">%3$s</ul>',\n\t\t\t\t'theme_location' => 'primary',\n\t\t\t\t'fallback_cb' => false,\n\t\t\t\t'walker' => new STRL_Primary_Menu_Walker(),\n\t\t\t)\n\t\t);\n\t}", "function wizzie_navigation(){\n\n $args = array(\n 'container' => '',\n 'menu' => 'primary',\n 'items_wrap' => '%3$s',\n 'walker' => new MV_Cleaner_Walker_Nav_Menu()\n );\n\n wp_nav_menu( $args );\n\n echo \"\\n\";\n}", "function themify_default_main_nav() {\n\t\techo '<ul id=\"main-nav\" class=\"main-nav clearfix\">';\n\t\t\twp_list_pages('title_li=');\n\t\techo '</ul>';\n\t}", "function navigation() {\n include_once('includes/navigation.inc.php');\n\t}", "function wrlc_primary_links__system_main_menu($variables) {\n $html = \"<div>\\n\";\n $html .= \" <ul class='links inline clearfix'>\\n\";\n\n $current = drupal_get_path_alias();\n $parsed_url = explode('/', $current);\n foreach ($variables['links'] as $link) {\n // Handle the 'about' and 'Home' menu links.\n if (strtolower($link['title']) == 'about' && $current == \"content/about\") {\n $link['attributes']['class'][] = 'active';\n }\n if (strtolower($link['title']) == 'home' && $current == \"frontpage\") {\n $link['attributes']['class'][] = 'active';\n }\n // Set the 'Browse' and 'Search/Search Results' page active menu item.\n if (count($parsed_url) >= 2) {\n if (($parsed_url[0] == \"content\" || $parsed_url[0] == \"islandora\") && $parsed_url[1] == \"search\") {\n if (strtolower($link['title']) == 'search') {\n $link['attributes']['class'][] = 'active';\n }\n }\n if ($parsed_url[0] == \"islandora\" && $parsed_url[1] == \"object\") {\n if (strtolower($link['title']) == 'browse') {\n $link['attributes']['class'][] = 'active';\n }\n }\n }\n $menu_link = l($link['title'], $link['href'], $link);\n $html .= \"<li>\" . $menu_link . \"</li>\";\n }\n\n $html .= \" </ul>\\n\";\n $html .= \"</div>\\n\";\n\n return $html;\n}", "function zaxu_get_wp_navigation() {\n\t\t\t\tif ( has_nav_menu('primary') ) {\n\t\t\t\t\t$primary_menu = wp_nav_menu(\n\t\t\t\t\t\tarray (\n\t\t\t\t\t\t\t'menu' => '',\n\t\t\t\t\t\t\t'container' => 'nav',\n\t\t\t\t\t\t\t'container_class' => '',\n\t\t\t\t\t\t\t'container_id' => '',\n\t\t\t\t\t\t\t'menu_class' => 'main-menu',\n\t\t\t\t\t\t\t'menu_id' => '',\n\t\t\t\t\t\t\t'echo' => false,\n\t\t\t\t\t\t\t'fallback_cb' => '__return_false',\n\t\t\t\t\t\t\t'before' => '',\n\t\t\t\t\t\t\t'after' => '',\n\t\t\t\t\t\t\t'link_before' => '',\n\t\t\t\t\t\t\t'link_after' => '',\n\t\t\t\t\t\t\t'items_wrap' => '<ul id=\"%1$s\" class=\"%2$s\">%3$s</ul>',\n\t\t\t\t\t\t\t'item_spacing' => 'preserve',\n\t\t\t\t\t\t\t'depth' => 0,\n\t\t\t\t\t\t\t'walker' => '',\n\t\t\t\t\t\t\t'theme_location' => 'primary',\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\n\t\t\t\t\tif ( empty($primary_menu) ) {\n\t\t\t\t\t\tno_primary_menu();\n\t\t\t\t\t} else {\n\t\t\t\t\t\techo $primary_menu;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tno_primary_menu();\n\t\t\t\t}\n\t\t\t}", "public function sideAction()\n {\n $module = $this->params('name', 'system');\n $controller = $this->params('controller');\n $navigation = Menu::mainComponent($module, $controller);\n\n return $navigation;\n }", "function mainMenu() \r\n\t\t{\r\n\t\t\t$this->set('title_for_layout', 'Fondos por rendir :: Menu Principal');\r\n\t\t}", "public function webcomic_navigation(){\n\t\t\n\t\t//Capture current URL\n\t\t$this->session->set_userdata('last_admin_url',current_url());\n\t\t\n\t\t//Fetch nav settings - note model is loaded in constructor\n\t\t$this->data['nav_settings'] = $this->Settings->fetch_site_nav();\n\t\t\n\t\t//If buttons file exists, set flag\n\t\t$this->data['nav_buttons'] = FALSE;\n\t\tif(file_exists('./assets/custom/navigation_buttons.png')){\n\t\t\t$this->data['nav_buttons'] = TRUE;\n\t\t}\n\t\t\n\t\t//Set page title\n\t\t$this->data['title'] = \"Webcomic Navigation\";\n\t\t\n\t\t//Load settings panel\n\t\t$this->load->admin_view('panels/admin_webcomic_navigation',$this->data);\n\t\t\n\t}", "function refined_magazine_construct_main_navigation()\r\n {\r\n\r\n global $refined_magazine_theme_options;\r\n\r\n $sticky_header_option = $refined_magazine_theme_options['refined-magazine-enable-sticky-primary-menu'];\r\n if ($sticky_header_option == 1) {\r\n $sticky_header_class = 'sticky-header';\r\n\r\n } else {\r\n $sticky_header_class = '';\r\n }\r\n ?>\r\n <div class=\"refined-magazine-menu-container <?php echo $sticky_header_class; ?>\">\r\n <div class=\"container-inner clearfix\">\r\n <nav id=\"site-navigation\"\r\n class=\"main-navigation\" <?php refined_magazine_do_microdata('navigation'); ?>>\r\n <div class=\"navbar-header clearfix\">\r\n <button class=\"menu-toggle\" aria-controls=\"primary-menu\"\r\n aria-expanded=\"false\">\r\n <span> </span>\r\n </button>\r\n </div>\r\n <ul id=\"primary-menu\" class=\"nav navbar-nav nav-menu\">\r\n <?php\r\n if ($refined_magazine_theme_options['refined-magazine-enable-menu-home-icon'] == 1):\r\n if (is_front_page()) {\r\n $home_class = 'current-menu-item';\r\n } else {\r\n $home_class = '';\r\n }\r\n\r\n ?>\r\n <li class=\"<?php echo $home_class; ?>\"><a href=\"<?php echo esc_url(home_url('/')); ?>\">\r\n <i class=\"fa fa-home\"></i> </a></li>\r\n <?php\r\n endif;\r\n ?>\r\n <?php\r\n if (has_nav_menu('menu-1')) :\r\n wp_nav_menu(array(\r\n 'theme_location' => 'menu-1',\r\n 'items_wrap' => '%3$s',\r\n 'container' => false\r\n ));\r\n else:\r\n wp_list_pages(array('depth' => 0, 'title_li' => ''));\r\n endif; // has_nav_menu\r\n ?>\r\n </ul>\r\n </nav><!-- #site-navigation -->\r\n\r\n <?php\r\n if ($refined_magazine_theme_options['refined-magazine-enable-menu-section-search'] == 1):\r\n ?>\r\n <div class=\"ct-menu-search\"><a class=\"search-icon-box\" href=\"#\"> <i class=\"fa fa-search\"></i>\r\n </a></div>\r\n <div class=\"top-bar-search\">\r\n <?php get_search_form(); ?>\r\n <button type=\"button\" class=\"close\"></button>\r\n </div>\r\n <?php\r\n endif;\r\n ?>\r\n </div> <!-- .container-inner -->\r\n </div> <!-- refined-magazine-menu-container -->\r\n <?php\r\n }", "function _getNav()\n {\n }", "function primary_nav( $section = 'sc-settings' ) {\n\n\t// Get sections\n\t$tabs = get_sections();\n\n\t// Start a buffer\n\tob_start() ?>\n\n\t<div class=\"clear\"></div>\n\t<h2 class=\"nav-tab-wrapper sc-nav-tab-wrapper sc-tab-clear\"><?php\n\n\t\t// Loop through tabs, and output links\n\t\tforeach ( $tabs as $tab_id => $tab ) :\n\n\t\t\t// Setup the class to denote a tab is active\n\t\t\t$active_class = ( $section === $tab_id )\n\t\t\t\t? 'nav-tab-active'\n\t\t\t\t: '';\n\n\t\t\t?><a href=\"<?php echo esc_url( $tab['url'] ); ?>\" class=\"nav-tab <?php echo esc_attr( $active_class ); ?>\"><?php\n\t\t\t\techo $tab['name']; // May contain HTML\n\t\t\t?></a><?php\n\n\t\tendforeach;\n\n\t?></h2>\n\n\t<?php\n\n\t// Output the current buffer\n\techo ob_get_clean();\n}", "public function sidemenu();", "public function navSite()\n\t{\n\t\tglobal $post;\n\t\t\n\t\tif (!is_a($post, 'WP_Post')) {\n\t\t\treturn;\n\t\t}\n\n\t\t$frontpage = (int)get_option('page_on_front');\n \t$pages = get_pages();\n\n \t$navigationTree = new NavigationTree;\n\n\t \treturn $navigationTree->getNavigationTree($pages);\n\t}", "function content_nav( $html_id ) {\r\n global $wp_query;\r\n\r\n $html_id = esc_attr( $html_id );\r\n\r\n if ( $wp_query->max_num_pages > 1 ) : ?>\r\n <nav id=\"<?php echo $html_id; ?>\" class=\"navigation\" role=\"navigation\">\r\n <div class=\"nav-previous alignleft\"><?php next_posts_link( __( '<span class=\"meta-nav\">&larr;</span> Older posts', 'twentytwelve' ) ); ?></div>\r\n <div class=\"nav-next alignright\"><?php previous_posts_link( __( 'Newer posts <span class=\"meta-nav\">&rarr;</span>', 'twentytwelve' ) ); ?></div>\r\n </nav><!-- #<?php echo $html_id; ?> .navigation -->\r\n <?php endif;\r\n }", "function navigation($passData = array())\r\n\t{\r\n\t\textract($passData , EXTR_OVERWRITE);\r\n\t\t$data = $this->_get_list_entry('pages',NULL,NULL,NULL,NULL,$language);\r\n\t\tif(empty($raw))\r\n\t\t{\r\n\t\t\t$result = array();\r\n\t\t\tforeach ($data['myList'] as $key => $value)\r\n\t\t\t{\r\n\t\t\t\t$result[] = $this->Html->link($value['Entry']['title'],\r\n\t\t\t\tarray(\r\n\t\t\t\t'controller'=>$value['Entry']['slug']\r\n\t\t\t\t));\r\n\t\t\t}\r\n\t\t\t$this->_echo_list($result , $open_tag , $close_tag);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$result = $data;\r\n\t\t}\r\n\t\treturn $result;\r\n\t}", "function navigate($nav = array()){\n\tglobal $page;\n\n\t// find active parent\n\tforeach( $nav as $key => $navi ){\n\t\tif( isNavItemActive( basename($navi['link']) ) )\n\t\t\t$activeParentName = basename($navi['link']);\n\t\t\n\t\tif( $navi['subnav'] )\n\t\t\tforeach( $navi['subnav'] as $subnavi ){\n\t\t\t\tif( isNavItemActive(basename($subnavi['link'])) ){\n\t\t\t\t\t$openParentName = basename($navi['link']);\n\t\t\t\t}\n\t\t\t}\n\t}\n\t\t\n?>\n<ul class=\"navigation navigation-main\" id=\"main-menu-navigation\" data-menu=\"menu-navigation\">\n<?php\n\tforeach( $nav as $item ){\n?>\n\t<li class=\"nav-item<?php if( basename($item['link']) == $activeParentName ) echo ' active';if( basename($item['link']) == $openParentName ) echo ' open'; ?>\">\n\t\t<a href=\"<?php echo ( $item['subnav'] ? '#' : $item['link'].'.html' ); ?>\"><i class=\"<?php echo $item['icon']; ?>\"></i><span class=\"menu-title\"><?php echo $item['title']; ?></span></a>\n<?php\n\t\tif( $item['subnav'] ){\n?>\n\t\t<ul class=\"menu-content\">\n<?php\n\t\t\tforeach( $item['subnav'] as $subitem ){\n?>\n\t\t\t<li class=\"<?php if( basename($subitem['link'] ) == $page['baseName'] ) echo 'active'; ?>\"><a class=\"menu-item\" href=\"<?php echo $subitem['link']; ?>.html\"><?php echo $subitem['title']; ?></a></li>\n<?php\n\t\t\t}\n?>\n\t\t</ul>\n<?php\n\t\t}\n?>\n\t</li>\n<?php\n\t}\n}", "protected function nav(){\n\t\t\t\n\t\t\t$logoFile = \"nbmaa-white-logo.png\";\n\t\t\t$logoBGColor = \"rgba(71, 61, 55, .7)\";\n\t\t\t$exhibitionsResult = queryCalendarPageExhibitions();\n\t\t\t$exhibitionImage;\n\t\t\t$exhibitonGallery;\n\t\t\t$randomInt;\n\t\t\t$keywords;\n\t\t\t$todaysDate = date(\"Y-m-d\");\n\n\t\t\t// get the links in the main Nav\n\t\t\tif($mainNav = queryNav()) {\n\t\t\t\t// retrieve the nav categories from the db\n\t\t\t\tforeach($mainNav as $title){\n\t\t\t\t\tif($temp = queryReference(\"NAV_CATEGORY\", \"NavTitle\", $title['Title'])){\n\t\t\t\t\t\tarray_push($this->navCategories, $temp);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// get all the categories for each of the links in the main Nav\n\t\t\tif($this->navCategories!=NULL){\n\t\t\t\t// retrieve the links in the categories\n\t\t\t\tforeach ($this->navCategories as $category) {\n\t\t\t\t\tforeach($category as $categoryLink) {\n\t\t\t\t\t\tif($temp = queryReference(\"NAV_CATEGORY_LINK\", \"NavCategoryID\", $categoryLink['NavCategoryID'])){\n\t\t\t\t\t\t\tusort($temp, \"nav_id_sort\");\n\t\t\t\t\t\t\tarray_push($this->navCategoryLinks, $temp);\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// get the image and gallery reference of the main exibition\n\t\t\tif($exhibitionsResult != NULL){\n\t\t\t\t// get random exhibition\n\t\t\t\t$size = sizeof($exhibitionsResult);\n\t\t\t\t$randomInt = rand(0, $size-1);\n\t\t\t\t$exhibitionImage \t= \tqueryReference('ARTWORK', 'ArtworkID', $exhibitionsResult[$randomInt]['ArtworkReferenceNo']); \n\t\t\t\t$exhibitonGallery \t=\tqueryReference('GALLERY', 'GalleryID', $exhibitionsResult[$randomInt]['GalleryReferenceNo']);\n\t\t\t}\n\n\t\t\t// keywords in the calendar query\n\t\t\t$keywords = $this->buildNavKeywords(queryKeywords());\n\n\t\t\t?>\n\t\t\t<header>\n\t\t\t\t<div id=\"header-content\">\t\t\t\t\t\n\t\t\t\t\t<div class=\"logo\" style=\"background-color:<?php echo $logoBGColor ?>;\">\n\t\t\t\t\t<a itemprop=\"url\" href=\"<? echo $GLOBALS['rootDirectory'] ?>\">\n\t\t\t\t\t\t\t<? echo $this->toImg(\"logos\", $logoFile, \"new britain museum of american art logo\", \"logo\"); ?>\n\t\t\t\t\t</a>\n\t\t\t\t\t</div>\n\t\t\t\t<nav id=\"mainNav\">\n\t\t\t\t\t<div class=\"menuItem visitLink\">\n\t\t\t\t\t\t<a>VISIT</a>\n\n\t\t\t\t\t\t<div class=\"dropDown\" aria-haspopup=\"true\">\n\t\t\t\t\t\t\t<div class=\"logoSpace\"><!-- place holder for under the logo --></div>\n\t\t\t\t\t\t\t<div class=\"left\">\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t// write the nav category header\n\t\t\t\t\t\t\t\tif(sizeof($this->navCategories[0])!=0){\t\t\n\t\t\t\t\t\t\t\t\techo \"<div class=\\\"navCategory\\\">\" . $this->navCategories[0][0][\"IconHTML\"] .\"\".$this->navCategories[0][0][\"Title\"] .\"</div>\\r\\n\" ; \n\t\t\t\t\t\t\t\t//write each link\n\t\t\t\t\t\t\t\t\t$this->writeNavLinks($this->navCategories[0][0][\"NavCategoryID\"]);\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</div>\n\t\t\t\t\t\t\t<div class=\"middle\">\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t// write the nav category header\n\t\t\t\t\t\t\t\tif(sizeof($this->navCategories[0])!=0){\t\t\n\t\t\t\t\t\t\t\t\techo \"<div class=\\\"navCategory\\\">\" .$this->navCategories[0][1][\"IconHTML\"].\"\".$this->navCategories[0][1][\"Title\"]. \"</div>\\r\\n\" ; \n\t\t\t\t\t\t\t\t//write each link\n\t\t\t\t\t\t\t\t\t$this->writeNavLinks($this->navCategories[0][1][\"NavCategoryID\"]);\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</div>\n\t\t\t\t\t\t\t<div class=\"right\">\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\t\t// write the nav category header\n\t\t\t\t\t\t\t\tif(sizeof($this->navCategories[0])!=0){\t\t\n\t\t\t\t\t\t\t\t\techo \"<div class=\\\"navCategory\\\">\" .$this->navCategories[0][2][\"IconHTML\"].\"\".$this->navCategories[0][2][\"Title\"] .\"</div>\\r\\n\" ; \n\t\t\t\t\t\t\t\t//write each link\n\t\t\t\t\t\t\t\t\t$this->writeNavLinks($this->navCategories[0][2][\"NavCategoryID\"]);\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</div>\n\t\t\t\t\t\t\t<div class=\"clear\"></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"menuItem exhibitionLink\">\n\t\t\t\t\t\t<a>EXHIBITION</a>\n\n\t\t\t\t\t\t<div class=\"dropDown\" aria-haspopup=\"true\">\n\t\t\t\t\t\t\t<div class=\"logoSpace\"><!-- place holder for under the logo --></div>\n\t\t\t\t\t\t\t<div class=\"left\">\n\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t// write the nav category header\n\t\t\t\t\t\t\t\tif(sizeof($this->navCategories[1])!=0){\t\n\n\t\t\t\t\t\t\t\t\techo \"<div class=\\\"navCategory\\\">\" .$this->navCategories[1][0][\"IconHTML\"].\"\".$this->navCategories[1][0][\"Title\"]. \"</div>\\r\\n\" ; \n\n\t\t\t\t\t\t\t\t\t//get the image and data for the main exhibition, write the html\n\t\t\t\t\t\t\t\t\tif($exhibitionImage != NULL) { \n\n\t\t\t\t\t\t\t\t\t\techo \t\"<div class=\\\"image\\\" style=\\\"background-image:url('\" .$GLOBALS['rootDirectory']. \"/images/exhibition-page-images/\" .$exhibitionImage[0]['ImgFilePath']. \"');\\\">\n\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\";\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t//write each link\n\t\t\t\t\t\t\t\t\t$this->writeNavLinks($this->navCategories[1][0][\"NavCategoryID\"]);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// write the caption for the exhibition in a floating div\n\t\t\t\t\t\t\t\t\tif($exhibitionsResult[0] != NULL && $exhibitionImage != NULL) {\n\n\t\t\t\t\t\t\t\t\t\techo \t\"<a class=\\\"exhibitionCaption\\\" href=\\\"\" .$GLOBALS['rootDirectory']. \"/exhibition/\" .$exhibitionsResult[$randomInt]['Link']. \"\\\">\\r\\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\\\"inner\\\">\\r\\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<h6>\" .$exhibitionsResult[$randomInt]['Title']. \"</h6>\\r\\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p class=\\\"title\\\">\" .$exhibitonGallery[0]['NickName']. \"</p>\\r\\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\\r\\n\n\t\t\t\t\t\t\t\t\t\t\t\t</a>\\r\\n\";\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\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\t\t<div class=\"clear\"></div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"right\">\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\t\t// write the nav category header\n\t\t\t\t\t\t\t\tif(sizeof($this->navCategories[1])!=0){\t\t\n\t\t\t\t\t\t\t\t\techo \"<div class=\\\"navCategory\\\">\" .$this->navCategories[1][1][\"IconHTML\"].\"\".$this->navCategories[1][1][\"Title\"]. \"</div>\\r\\n\" ; \n\t\t\t\t\t\t\t\t//write each link\n\t\t\t\t\t\t\t\t\t$this->writeNavLinks($this->navCategories[1][1][\"NavCategoryID\"]);\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</div>\n\t\t\t\t\t\t\t<div class=\"clear\"></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t\t<!-- calendar link -->\n\t\t\t\t\t\t<a href=\"<?php echo $GLOBALS['rootDirectory'];?>/calendar/today\">CALENDAR</a>\n\t\t\t\t\t\n\t\t\t\t\t<div class=\"menuItem educationLink\">\n\t\t\t\t\t\t<a>EDUCATION</a>\n\n\t\t\t\t\t\t<div class=\"dropDown\" aria-haspopup=\"true\">\n\t\t\t\t\t\t\t<div class=\"logoSpace\"><!-- place holder for under the logo --></div>\n\t\t\t\t\t\t\t<div class=\"left\">\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t// write the nav category header\n\t\t\t\t\t\t\t\tif(sizeof($this->navCategories[2])!=0){\t\t\n\t\t\t\t\t\t\t\t\techo \"<div class=\\\"navCategory\\\">\" .$this->navCategories[2][0][\"IconHTML\"].\"\".$this->navCategories[2][0][\"Title\"]. \"</div>\\r\\n\" ; \n\t\t\t\t\t\t\t\t//write each link\n\t\t\t\t\t\t\t\t\t$this->writeNavLinks($this->navCategories[2][0][\"NavCategoryID\"]);\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</div>\n\t\t\t\t\t\t\t<div class=\"middle\">\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t// write the nav category header\n\t\t\t\t\t\t\t\tif(sizeof($this->navCategories[2])!=0){\t\t\n\t\t\t\t\t\t\t\t\techo \"<div class=\\\"navCategory\\\">\" .$this->navCategories[2][1][\"IconHTML\"].\"\".$this->navCategories[2][1][\"Title\"]. \"</div>\\r\\n\" ; \n\t\t\t\t\t\t\t\t//write each link\n\t\t\t\t\t\t\t\t\t$this->writeNavLinks($this->navCategories[2][1][\"NavCategoryID\"]);\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</div>\n\t\t\t\t\t\t\t<div class=\"right\">\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\t\t// write the nav category header\n\t\t\t\t\t\t\t\tif(sizeof($this->navCategories[2])!=0){\t\t\n\t\t\t\t\t\t\t\t\techo \"<div class=\\\"navCategory\\\">\" .$this->navCategories[2][2][\"IconHTML\"].\"\".$this->navCategories[2][2][\"Title\"]. \"</div>\\r\\n\" ; \n\t\t\t\t\t\t\t\t//write each link\n\t\t\t\t\t\t\t\t\t$this->writeNavLinks($this->navCategories[2][2][\"NavCategoryID\"]);\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</div>\n\t\t\t\t\t\t\t<div class=\"clear\"></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"menuItem supportLink\">\n\t\t\t\t\t\t<a>SUPPORT US</a>\n\n\t\t\t\t\t\t<div class=\"dropDown\" aria-haspopup=\"true\">\n\t\t\t\t\t\t\t<div class=\"logoSpace\"><!-- place holder for under the logo --></div>\n\t\t\t\t\t\t\t<div class=\"left\">\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t// write the nav category header\n\t\t\t\t\t\t\t\tif(sizeof($this->navCategories[3])!=0){\t\t\n\t\t\t\t\t\t\t\t\techo \"<div class=\\\"navCategory\\\">\" .$this->navCategories[3][0][\"IconHTML\"].\"\".$this->navCategories[3][0][\"Title\"]. \"</div>\\r\\n\" ; \n\t\t\t\t\t\t\t\t//write each link\n\t\t\t\t\t\t\t\t\t$this->writeNavLinks($this->navCategories[3][0][\"NavCategoryID\"]);\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</div>\n\t\t\t\t\t\t\t<div class=\"middle\">\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t// write the nav category header\n\t\t\t\t\t\t\t\tif(sizeof($this->navCategories[3])!=0){\t\t\n\t\t\t\t\t\t\t\t\techo \"<div class=\\\"navCategory\\\">\" .$this->navCategories[3][1][\"IconHTML\"].\"\".$this->navCategories[3][1][\"Title\"]. \"</div>\\r\\n\" ; \n\t\t\t\t\t\t\t\t//write each link\n\t\t\t\t\t\t\t\t\t$this->writeNavLinks($this->navCategories[3][1][\"NavCategoryID\"]);\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</div>\n\t\t\t\t\t\t\t<div class=\"right\">\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\t\t// write the nav category header\n\t\t\t\t\t\t\t\tif(sizeof($this->navCategories[3])!=0){\t\t\n\t\t\t\t\t\t\t\t\techo \"<div class=\\\"navCategory\\\">\" .$this->navCategories[3][2][\"IconHTML\"].\"\".$this->navCategories[3][2][\"Title\"]. \"</div>\\r\\n\" ; \n\t\t\t\t\t\t\t\t//write each link\n\t\t\t\t\t\t\t\t\t$this->writeNavLinks($this->navCategories[3][2][\"NavCategoryID\"]);\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</div>\n\t\t\t\t\t\t\t<div class=\"clear\"></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<a href=\"http://nbmaashop.com/\">SHOP</a>\n\t\t\t\t</nav>\n\t\t\t\t<div id=\"menuButton\">MENU <i class=\"fa fa-bars\"></i></div>\n\t\t\t</div>\n\t\t\t</header>\n\t\t\t<!-- uncomment to add special nav announce across top\n\t\t\t<div id=\"navAnnouncement\">\n\t\t\t\t<div class=\"wrapper\">\n\t\t\t\t\t<div id=\"navAnnouncementWrapper\">\n\t\t\t\t\t\t<p>The Museum will be closed Wednesday, October 12 at 3 p.m., and will be closed all day Thursday, October 13 in preparation for our Fall fundraiser <a href=\"http://artofwineandfood.org/\">The Art of Wine &amp; Food</a>.\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<!-- end -->\n\t\t\t<h1 id=\"museumName\" itemprop=\"name\">NEW BRITAIN MUSEUM OF AMERICAN ART</h1>\n\t\t<?\n\t\t}", "public function theNavMenu()\n {\n echo $this->getNavMenu();\n }", "public function indexAction() {\n\n //GET NAVIGATION\n $this->view->navigation = $navigation = Engine_Api::_()->getApi('menus', 'core')\n ->getNavigation('sitepagedocument_admin_main', array(), 'sitepagedocument_admin_main_fields');\n\n parent::indexAction();\n }", "function wcus_amp_render_primary_nav() {\n\t// @todo check if nav actually exists && is assigned.\n\tif ( ! has_nav_menu( 'site_menu_amp' ) ) {\n\t\treturn false;\n\t}\n\t?>\n\t<amp-sidebar id=\"site-menu\" layout=\"nodisplay\">\n\t\t<h2><?php esc_html_e( 'Menu', 'wcus-amp' ); ?>\n\t\t\t<img class=\"menu-button\" src=\"<?php echo esc_url( plugin_dir_url( __FILE__ ) . 'templates/img/close.svg' ); ?>\" alt=\"<?php esc_html_e( 'Toggle Navigation', 'wcus-amp' ); ?>\" on='tap:site-menu.close' aria-label=\"<?php esc_html_e( 'Toggle Navigation', 'wcus-amp' ); ?>\" /></h2>\n\t\t<ul>\n\t\t\t<?php echo wp_kses_post( wcus_amp_clean_nav_menu_items( 'site_menu_amp' ) ); ?>\n\t\t</ul>\n\n\t</amp-sidebar>\n\t<?php\n}", "function wosci_content_nav( $html_id ) {\n\tglobal $wp_query;\n\n\t$html_id = esc_attr( $html_id );\n\n\tif ( $wp_query->max_num_pages > 1 ) : ?>\n\t\t<nav id=\"<?php echo $html_id; ?>\" class=\"navigation\" role=\"navigation\">\n\t\t\t<h3 class=\"assistive-text\"><?php _e( 'Post navigation', 'wosci-language' ); ?></h3>\n\t\t\t<div class=\"nav-previous\"><?php next_posts_link( __( '<span class=\"meta-nav\">&larr;</span> Older products', 'wosci-language' ) ); ?></div>\n\t\t\t<div class=\"nav-next\"><?php previous_posts_link( __( 'Newer products <span class=\"meta-nav\">&rarr;</span>', 'wosci-language' ) ); ?></div>\n\t\t</nav><!-- #<?php echo $html_id; ?> .navigation -->\n\t<?php endif;\n}", "function navigation() {\n\t\t\treturn array(\n\t\t\t\t'wpuap_manage_settings' => __( 'Settings', WPUAP_TEXT_DOMAIN ),\n\t\t\t);\n\t\t}", "function twentyeleven_content_nav( $html_id ) {\n\tglobal $wp_query;\n\n\t$html_id = esc_attr( $html_id );\n\n\tif ( $wp_query->max_num_pages > 1 ) : ?>\n\t\t<nav id=\"<?php echo $html_id; ?>\" class=\"navigation\" role=\"navigation\">\n\t\t\t<h3 class=\"assistive-text\"><?php _e( 'Post navigation', 'twentyeleven' ); ?></h3>\n\t\t\t<div class=\"nav-previous\"><?php next_posts_link( __( '<span class=\"meta-nav\">&larr;</span> Older posts', 'twentyeleven' ) ); ?></div>\n\t\t\t<div class=\"nav-next\"><?php previous_posts_link( __( 'Newer posts <span class=\"meta-nav\">&rarr;</span>', 'twentyeleven' ) ); ?></div>\n\t\t</nav><!-- #<?php echo $html_id; ?> .navigation -->\n\t<?php endif;\n}", "function wpgrade_first_page_main_nav() {\n\t// test if there are menu locations to prevent errors\n\t$theme_locations = get_nav_menu_locations();\n\n\t$args = array(\n\t\t'theme_location' => 'first_page_main_menu',\n\t\t'menu' => '',\n\t\t'container' => '',\n\t\t'container_id' => '',\n\t\t'menu_class' => 'nav nav--main nav--items-menu',\n\t\t'menu_id' => '',\n\t\t'fallback_cb' => 'wpgrade_please_select_a_menu',\n\t\t'items_wrap' => '<ul id=\"%1$s\" class=\"%2$s\">%3$s</ul>',\n\t);\n\n\twp_nav_menu( $args );\n\t// }\n}", "function mainnav()\n\t{\n\t\techo '<jdoc:include type=\"modules\" name=\"mainnav\" style=\"raw\" />';\n\t}", "private function renderNav()\n {\n $pagination = $this->tilesCollection->getPagination();\n $name = $pagination->getPaginationName();\n $value = $pagination->getPaginationQueryString(1);\n \n echo '<hr class=\"hidden\" />';\n \n echo '<div class=\"tiles navigation centered\"><div>';\n echo CHtml::link(\n Yii::t('phrases', 'older items'),\n array('', $name => $value),\n array('class'=>'button navigation next')\n );\n echo '</div></div>';\n\n }", "public function settings_nav()\n\t{\n\t\t$active = Swiftriver_Event::$data;\n\t\t\n\t\techo '<li '.(($active == 'rsswelcome') ? 'class=\"active\"' : '').'>'.\n\t\t\tHTML::anchor(URL::site('settings/rsswelcome'), __('RSS Starter URLs')).\n\t\t\t'</li>';\n\t}", "function agriflex_main_nav_nomenu() {\n\tget_template_part( 'nav', 'primary' );\n}", "function future_loop_nav_singular() {\n\tglobal $post;\n?>\n<div class=\"entry-post-parent-link-wrapper\">\n <a href=\"<?php echo get_permalink( $post->post_parent ); ?>\" class=\"btn btn-primary\"><?php _e( '&larr; Return to', 'future' ); ?> <?php echo get_the_title( $post->post_parent ); ?></a>\n</div>\n<?php\n}", "function header_navigation()\n{\n\t$CI =& get_instance();\n\n\t$uri = $CI->uri->segment(1);\n\t\n\t$nav = array(\n\t\t\t\t\t''\t\t \t\t\t\t\t\t=> 'Home', \n\t\t\t\t\t'dispatches/find-newest.html'\t=> 'Dispatches', \n\t\t\t\t\t'daily-photo/find-newest.html' \t=> 'Daily Photo', \n\t\t\t\t\t'about/intro.html' \t\t\t\t=> 'About Me'\n\t\t\t\t);\n\t\n\t$out = '';\n\tforeach ($nav as $key => $val)\n\t{\n\t\t$highlight = (FALSE === strpos($key, $uri)) ? FALSE : TRUE;\n\t\n\t\t$out .= \"\\n\\t\\t\\t\\t\";\n\t\t$out .= '<li>';\n\t\t$out .= ($highlight) ? '<span id=\"header_nav_on\">' : '';\n\t\t$out .= '<a href=\"'.site_url().$key.'\">';\n\t\t$out .= $val;\n\t\t$out .= '</a>';\n\t\t$out .= ($highlight) ? '</span>' : '';\n\t\t$out .= '</li>';\n\t}\n\t$out .= \"\\n\";\n\t\n\treturn $out;\t\n}", "function ssn_content_nav( $html_id ) {\n\tglobal $wp_query;\n\n\t$html_id = esc_attr( $html_id );\n\t\n\tif ( $wp_query->max_num_pages > 1 ) : ?>\n\t\t<nav id=\"<?php echo $html_id; ?>\" class=\"navigation\" role=\"navigation\">\n\t\t\t<h3 class=\"assistive-text\"><?php _e( 'Post navigation', 'ssn' ); ?></h3>\n\t\t\t<div class=\"nav-previous alignleft\"><?php previous_posts_link( __( '<span class=\"meta-nav\">&larr;</span> Page précédente', 'ssn' ) ); ?></div>\n\t\t\t<div class=\"nav-next alignright\"><?php next_posts_link( __( 'Page suivante <span class=\"meta-nav\">&rarr;</span>', 'ssn' ) ); ?></div>\n\t\t</nav><!-- #<?php echo $html_id; ?> .navigation -->\n\t<?php endif;\n}", "private function build_navigation(){\n return '';\n }", "function insertPageNav()\r\n\t{\r\n\t\treturn '<div id=\"joscPageNav\">'.$this->getPageNav().\"</div>\";\r\n\t}", "function nav_box() {\n\n\t\tif ( genesis_nav_menu_supported( 'primary' ) ) : ?>\n\n\t\t<h4><?php _e( 'Primary Navigation Extras', 'genesis' ); ?></h4>\n\n\t\t<?php if ( ! has_nav_menu( 'primary' ) ) : ?>\n\n\t\t<p><span class=\"description\"><?php printf( __( 'In order to view the %1$s navigation menu settings, you must build a <a href=\"%2$s\">custom menu</a>, then assign it to the %1$s Menu Location.', 'genesis' ), 'Primary', admin_url( 'nav-menus.php' ) ); ?></span></p>\n\n\t\t<?php else : ?>\n\n\t\t<div id=\"genesis_nav_extras_settings\">\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id( 'nav_extras' ); ?>\"><?php _e( 'Display the following:', 'genesis' ); ?></label>\n\t\t\t\t<select name=\"<?php echo $this->get_field_name( 'nav_extras' ); ?>\" id=\"<?php echo $this->get_field_id( 'nav_extras' ); ?>\">\n\t\t\t\t\t<option value=\"\"><?php _e( 'None', 'genesis' ) ?></option>\n\t\t\t\t\t<option value=\"date\"<?php selected( $this->get_field_value( 'nav_extras' ), 'date' ); ?>><?php _e( 'Today\\'s date', 'genesis' ); ?></option>\n\t\t\t\t\t<option value=\"rss\"<?php selected( $this->get_field_value( 'nav_extras' ), 'rss' ); ?>><?php _e( 'RSS feed links', 'genesis' ); ?></option>\n\t\t\t\t\t<option value=\"search\"<?php selected( $this->get_field_value( 'nav_extras' ), 'search' ); ?>><?php _e( 'Search form', 'genesis' ); ?></option>\n\t\t\t\t\t<option value=\"twitter\"<?php selected( $this->get_field_value( 'nav_extras' ), 'twitter' ); ?>><?php _e( 'Twitter link', 'genesis' ); ?></option>\n\t\t\t\t</select>\n\t\t\t</p>\n\t\t\t<div id=\"genesis_nav_extras_twitter\">\n\t\t\t\t<p>\n\t\t\t\t\t<label for=\"<?php echo $this->get_field_id( 'nav_extras_twitter_id' ); ?>\"><?php _e( 'Enter Twitter ID:', 'genesis' ); ?></label>\n\t\t\t\t\t<input type=\"text\" name=\"<?php echo $this->get_field_name( 'nav_extras_twitter_id' ); ?>\" id=\"<?php echo $this->get_field_id( 'nav_extras_twitter_id' ); ?>\" value=\"<?php echo esc_attr( $this->get_field_value( 'nav_extras_twitter_id' ) ); ?>\" size=\"27\" />\n\t\t\t\t</p>\n\t\t\t\t<p>\n\t\t\t\t\t<label for=\"<?php echo $this->get_field_id( 'nav_extras_twitter_text' ); ?>\"><?php _e( 'Twitter Link Text:', 'genesis' ); ?></label>\n\t\t\t\t\t<input type=\"text\" name=\"<?php echo $this->get_field_name( 'nav_extras_twitter_text' ); ?>\" id=\"<?php echo $this->get_field_id( 'nav_extras_twitter_text' ); ?>\" value=\"<?php echo esc_attr( $this->get_field_value( 'nav_extras_twitter_text' ) ); ?>\" size=\"27\" />\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t\tendif;\n\t\tendif;\n\t}", "function wrapMainMenu($section){\n $rec1=array();\n $rec=$this->getAllPagesForMenu();\n if($rec!==false && sizeof($rec)>0){\n foreach($rec as $val){\n $rec1[$val->pid][$val->id]=$val;\n }\n }\n $content='';\n $content .=''\n . '<nav id=\"menu\" class=\"menu\">';\n $content .=$this->wrapMainRealMenu($rec1, 0, $section);\n $content .='</nav>';\n return $content;\n }", "function codeless_single_portfolio_navigation(){\n if( ! is_singular( 'portfolio' ) )\n return;\n\n if( codeless_get_mod('single_portfolio_navigation') == '1' && ( is_object( get_previous_post() ) || is_object( get_next_post() ) ) ): ?>\n <div class=\"portfolio_navigation\"> \n\n <?php if( is_object( get_previous_post() ) ): ?>\n\n <a class=\"cl-icon-arrow-left portfolio_single_left\" href=\"<?php echo get_permalink(get_previous_post()->ID); ?>\">\n \n <span><?php esc_attr_e('Prev', 'folie' ) ?></span>\n\n </a> \n \n\n <?php endif; ?> \n\n <?php if( is_object( get_next_post() ) ): ?>\n\n <a class=\"cl-icon-arrow-right portfolio_single_right\" href=\"<?php echo get_permalink(get_next_post()->ID); ?>\">\n \n <span><?php esc_attr_e('Next', 'folie' ) ?></span>\n\n </a> \n \n\n <?php endif; ?> \n\n </div><!-- .portfolio_navigation --> \n <?php endif;\n}", "protected function get_nav(){\n\t\treturn '<p style=\"float:right;\"><a href=\"'.$this->get_base_url().'\">back to log home</a></p>';\n\t}", "function boomvisibility_content_nav( $html_id ) {\n\tglobal $wp_query;\n\n\t$html_id = esc_attr( $html_id );\n\n\tif ( $wp_query->max_num_pages > 1 ) : ?>\n\t\t<nav id=\"<?php echo $html_id; ?>\" class=\"navigation\" role=\"navigation\">\n\t\t\t<h3 class=\"assistive-text\"><?php _e( 'Post navigation', 'boomvisibility' ); ?></h3>\n\t\t\t<div class=\"nav-previous alignleft\"><?php next_posts_link( __( '<span class=\"meta-nav\">&larr;</span> Older posts', 'boomvisibility' ) ); ?></div>\n\t\t\t<div class=\"nav-next alignright\"><?php previous_posts_link( __( 'Newer posts <span class=\"meta-nav\">&rarr;</span>', 'boomvisibility' ) ); ?></div>\n\t\t</nav><!-- #<?php echo $html_id; ?> .navigation -->\n\t<?php endif;\n}", "function ilajnas_expose_navigation($data) {\r\n\t$id = 2;\r\n\treturn wp_get_nav_menu_items($id);\r\n}", "function cwp_content_nav( $html_id ) {\n\tglobal $wp_query;\n\n\t$html_id = esc_attr( $html_id );\n\n\tif ( $wp_query->max_num_pages > 1 ) : ?>\n\t\t<nav id=\"<?php echo $html_id; ?>\" class=\"navigation\" role=\"navigation\">\n\t\t\t<h3 class=\"assistive-text\"><?php _e( '', 'cwp' ); ?></h3>\n\t\t\t<div class=\"nav-previous\"><?php next_posts_link( __( '<span class=\"meta-nav\">&larr;</span> Older posts', 'cwp' ) ); ?></div>\n\t\t\t<div class=\"nav-next\"><?php previous_posts_link( __( 'Newer posts <span class=\"meta-nav\">&rarr;</span>', 'cwp' ) ); ?></div>\n\t\t</nav><!-- #<?php echo $html_id; ?> .navigation -->\n\t<?php endif;\n}", "function init(){\n # HEADER NAV\n $menuOne = array\n (\n 1 => \tarray(\n 'text'\t\t=> \t'Home',\n 'link'\t\t=> \tbase_url(),\n 'show_condition'=>\t1,\n 'parent'\t=>\t0\n ),\n 2 => \tarray(\n 'text'\t\t=> \t'Gigs',\n 'link'\t\t=> \tbase_url() . 'gig',\n 'show_condition'=> 1,\n 'parent'\t=>\t0\n ),\n 3 => \tarray(\n 'text'\t\t=> \t'Find a Gig',\n 'link'\t\t=> \tbase_url() . 'gig',\n 'show_condition'=> 1,\n 'parent'\t=>\t2\n ),\n 4 =>\tarray(\n 'text'\t\t=> \t'Post a Gig',\n 'link'\t\t=> \tbase_url() . 'gig/add',\n 'show_condition'=>\t1,\n 'parent'\t=>\t2\n ),\n 5 =>\tarray(\n 'text'\t\t=> \t'Venues',\n 'link'\t\t=> \tbase_url() . 'venues',\n 'show_condition'=>\t1,\n 'parent'\t=>\t0\n ),\n 6 =>\tarray(\n 'text'\t\t=> \t'Find a Venue',\n 'link'\t\t=> \tbase_url() . 'venues',\n 'show_condition'=>\t1,\n 'parent'\t=>\t5\n ),\n 7 =>\tarray(\n 'text'\t\t=> \t'Post a Venue',\n 'link'\t\t=> \tbase_url() . 'venues/add',\n 'show_condition'=>\t1,\n 'parent'\t=>\t5\n ),\n 8 =>\tarray(\n 'text'\t\t=> \t'Profiles',\n 'link'\t\t=> \tbase_url() . 'profiles',\n 'show_condition'=>\t1,\n 'parent'\t=>\t0\n ),\n\t\t9 =>\tarray(\n\t\t\t'text'\t\t=> \t'View Profiles',\n\t\t\t'link'\t\t=> \tbase_url() . 'profiles',\n\t\t\t'show_condition'=>\t1,\n\t\t\t'parent'\t=>\t8\n\t\t),\n 10 =>\tarray(\n 'text'\t\t=> \t'Add a Profile',\n 'link'\t\t=> \tbase_url() . 'profiles/add',\n 'show_condition'=>\t1,\n 'parent'\t=>\t8\n ),\n 11 =>\tarray(\n 'text'\t\t=> \t'Contact Us',\n 'link'\t\t=> \tbase_url() . 'contact',\n 'show_condition'=>\t1,\n 'parent'\t=>\t0\n ),\n\t\t\n );//end $menuOne\n #Admin menu\n $CI =& get_instance();\n $CI->load->library(\"session\");\n if ($CI->session->logged_in == TRUE){\n $adProfile = array(\n 'text'\t\t=> \t'Edit Profile',\n 'link'\t\t=> \tbase_url() . 'profiles/edit',\n 'show_condition'=>\t1,\n 'parent'\t=>\t8\n );\n $adVenues = array(\n 'text'\t\t=> \t'Edit Venues',\n 'link'\t\t=> \tbase_url() . 'venues/edit',\n 'show_condition'=>\t1,\n 'parent'\t=>\t5\n );\n $adGig = array(\n 'text'\t\t=> \t'Edit Gig',\n 'link'\t\t=> \tbase_url() . 'gig/edit',\n 'show_condition'=>\t1,\n 'parent'\t=>\t2\n );\n array_push($menuOne,$adProfile,$adVenues,$adGig);\n $login = array(\n 'text'\t\t=> \t'Logout',\n 'link'\t\t=> \tbase_url() . 'admin/logout',\n 'show_condition'=>\t1,\n 'parent'\t=>\t0\n );\n }else{\n $login = array(\n 'text'\t\t=> \t'Login',\n 'link'\t\t=> \tbase_url() . 'admin/login',\n 'show_condition'=>\t1,\n 'parent'\t=>\t0\n );\n }\n \n \n # FOOTER NAV\n $menuTwo = array\n (\n 1 => \tarray(\n 'text'\t\t=> \t'About',\n 'link'\t\t=> \tbase_url() . 'pages/about',\n 'show_condition'=>\t1,\n 'parent'\t=>\t0\n ),\n 2 => \tarray(\n 'text'\t\t=> \t'FAQ',\n 'link'\t\t=> \tbase_url() . 'pages/faq',\n 'show_condition'=>\t1,\n 'parent'\t=>\t0\n ),\n 3 =>\tarray(\n 'text'\t\t=> \t'Disclaimer',\n 'link'\t\t=> \tbase_url() . 'pages/disclaimer',\n 'show_condition'=>\t1,\n 'parent'\t=>\t0\n ),\n 4 =>\tarray(\n 'text'\t\t=> \t'Contact Us',\n 'link'\t\t=> \tbase_url() . 'contact',\n 'show_condition'=>\t1,\n 'parent'\t=>\t0\n ),\n \n );//end $menuTwo\n array_push($menuTwo,$login);\n \n $this->setHeaderMenu($menuOne);\n $this->setFooterMenu($menuTwo);\n\n}", "function wc_content_nav( $html_id ) {\n\tglobal $wp_query;\n\n\t$html_id = esc_attr( $html_id );\n\n\tif ( $wp_query->max_num_pages > 1 ) : ?>\n\t\t<nav id=\"<?php echo $html_id; ?>\" class=\"navigation\" role=\"navigation\">\n\t\t\t<h3 class=\"assistive-text\"><?php _e( 'Post navigation', 'wc' ); ?></h3>\n\t\t\t<div class=\"nav-previous\"><?php next_posts_link( __( '<span class=\"meta-nav\">&larr;</span> Older posts', 'wc' ) ); ?></div>\n\t\t\t<div class=\"nav-next\"><?php previous_posts_link( __( 'Newer posts <span class=\"meta-nav\">&rarr;</span>', 'wc' ) ); ?></div>\n\t\t</nav><!-- #<?php echo $html_id; ?> .navigation -->\n\t<?php endif;\n}", "function o3_main_nav() {\r\n\twp_nav_menu(\r\n\tarray(\r\n\t\t'theme_location' => 'header-menu',\r\n\t\t'menu' => '', \r\n\t\t'container' => 'div', \r\n\t\t'container_class' => 'menu-{menu slug}-container', \r\n\t\t'container_id' => '',\r\n\t\t'menu_class' => 'menu', \r\n\t\t'menu_id' => '',\r\n\t\t'echo' => true,\r\n\t\t'fallback_cb' => 'wp_page_menu',\r\n\t\t'before' => '',\r\n\t\t'after' => '',\r\n\t\t'link_before' => '',\r\n\t\t'link_after' => '',\r\n\t\t'items_wrap' => '<ul>%3$s</ul>',\r\n\t\t'depth' => 0,\r\n\t\t'walker' => ''\r\n\t\t)\r\n\t);\r\n}", "function gogreen_nav(){\n get_template_part( 'templates/navigation/side-nav' );\n get_template_part( 'templates/navigation/header-nav' ); \n get_template_part( 'templates/navigation/slidingbar' ); \n echo '<div id=\"page-overlay\"></div>';\n get_template_part( 'templates/navigation/live-search' );\n}", "protected function menuHighlight()\n\t{\n\t\tglobal $current_screen;\n\n\t\t$parentPage = null\n\n\t\t$currentTaxonomy = $current_screen->taxonomy;\n\n\t\tcollect($taxonomies)->each(function ($taxonomy, $currentTaxonomy) {\n\t\t\t$parentPage = plugin_name().'-index';\n\t\t});\n\n\t\treturn $parentPage;\n\t}", "static function defaultNavigation() {\n\t\tglobal $db;\n\n\t\t$result = $db->queryFill(\"SELECT navigation_id FROM navigation WHERE default_page = 1\");\n\n\t\tif ($result != false) {\n\t\t\tforeach ($result as $row) {\n\t\t\t\t$navigation = new Navigation($row['navigation_id']);\n\t\t\t\treturn $navigation->content_id;\n\t\t\t}\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function strl_navigation() {\n\tregister_nav_menus(\n\t\tarray(\n\t\t\t'primary' => esc_html__( 'Primary Menu', 'strl' ),\n\t\t\t'secondary' => esc_html__( 'Secondary Menu', 'strl' ),\n\t\t)\n\t);\n\n\t/**\n\t * Prints the main navigation made compatible with Foundation 6.\n\t *\n\t * @package strl\n\t * @since 1.0.0\n\t */\n\tfunction strl_main_navigation() {\n\t\twp_nav_menu(\n\t\t\tarray(\n\t\t\t\t'container' => false,\n\t\t\t\t'menu_id' => 'primary-menu',\n\t\t\t\t'menu_class' => 'vertical medium-horizontal dropdown menu',\n\t\t\t\t'items_wrap' => '<ul id=\"%1$s\" class=\"%2$s\" data-responsive-menu=\"accordion medium-dropdown\">%3$s</ul>',\n\t\t\t\t'theme_location' => 'primary',\n\t\t\t\t'fallback_cb' => false,\n\t\t\t\t'walker' => new STRL_Primary_Menu_Walker(),\n\t\t\t)\n\t\t);\n\t}\n}", "public function renderNavigation()\n {\n return view('nova-documentation::navigation');\n }", "function Link() {\n\t\t$childActive = null;\n\t\t$children = $this->Children();\n\t\tforeach ($children as $child) {\n\t\t\tif ($child->isSection()) {\n\t\t\t\t$childActive = $child;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\tif ($childActive)\n\t\t\treturn $childActive->Link();\n\t\t\t\t\n\t\treturn parent::Link();\n\t}", "public function setup_admin_navigation() {\n parent::setup_admin_navigation();\n }", "function GetPrimaryNavigationArtwork() {\r\n return array(\r\n 'home' => 'Home',\r\n 'gallery' => 'Art Gallery',\r\n 'about' => 'About',\r\n 'contact' => 'Contact'\r\n \r\n );\r\n}", "function roundation_nav()\n{\n\twp_nav_menu(\n\tarray(\n\t\t'theme_location' => 'header-menu',\n\t\t'menu' => '',\n\t\t'container' => 'div',\n\t\t'container_class' => 'menu-{menu slug}-container',\n\t\t'container_id' => '',\n\t\t'menu_class' => 'menu',\n\t\t'menu_id' => '',\n\t\t'echo' => true,\n\t\t'fallback_cb' => 'wp_page_menu',\n\t\t'before' => '',\n\t\t'after' => '',\n\t\t'link_before' => '',\n\t\t'link_after' => '',\n\t\t'items_wrap' => '<ul>%3$s</ul>',\n\t\t'depth' => 0,\n\t\t'walker' => ''\n\t\t)\n\t);\n}", "public function nav()\n {\n return $this->getNav();\n }", "public function grading_default_nav() {\n\n\t\tglobal $wp_version;\n\n\t\t$title = $this->name;\n\t\tif ( isset( $_GET['course_id'] ) ) { \n\t\t\t$course_id = intval( $_GET['course_id'] );\n\t\t\tif ( version_compare($wp_version, '4.1', '>=') ) {\n\t\t\t\t$title .= '<span class=\"course-title\">&gt;&nbsp;&nbsp;'.get_the_title( $course_id ).'</span>';\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$title .= sprintf( '&nbsp;&nbsp;<span class=\"course-title\">&gt;&nbsp;&nbsp;%s</span>', get_the_title( $course_id ) ); \n\t\t\t}\n\t\t}\n\t\tif ( isset( $_GET['lesson_id'] ) ) { \n\t\t\t$lesson_id = intval( $_GET['lesson_id'] );\n\t\t\t$title .= '&nbsp;&nbsp;<span class=\"lesson-title\">&gt;&nbsp;&nbsp;' . get_the_title( intval( $lesson_id ) ) . '</span>'; \n\t\t}\n\t\tif ( isset( $_GET['user_id'] ) && 0 < intval( $_GET['user_id'] ) ) {\n\n $user_name = Sensei_Learner::get_full_name( $_GET['user_id'] );\n\t\t\t$title .= '&nbsp;&nbsp;<span class=\"user-title\">&gt;&nbsp;&nbsp;' . $user_name . '</span>';\n\n\t\t} // End If Statement\n\t\t?>\n\t\t\t<h1><?php echo apply_filters( 'sensei_grading_nav_title', $title ); ?></h1>\n\t\t<?php\n\t}", "public function get_active_menu() {\n\t\t// Text - Dekstop/Tablet/Mobile.\n\t\t$container_id = '';\n\t\t$container_class = 'hb-navigation hb-js-nav';\n\t\t$menu_class = 'hb-navigation-ul';\n\t\t$fallback_cb = 'mk_link_to_menu_editor';\n\t\t$sub_level_arrrow = '';\n\t\t$walker = new hb_main_menu();\n\n\t\t// Burger - Mobile/Tablet.\n\t\tif ( 'desktop' !== $this->device && 'burger' === $this->nav_style ) {\n\t\t\t$container_class = 'menu-main-navigation-container';\n\t\t\t$menu_class = 'hb-navigation-resp__ul';\n\t\t\t$walker = new HB_Walker_Nav_Responsive();\n\n\t\t\t// For demo or Preview menu only.\n\t\t\t$sub_level_arrrow = '<span class=\"hb-navigation-resp__arrow hb-navigation-resp__sub-closed\"><svg style=\"height:16px;width: 16px\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><path d=\"M512 192l-96-96-160 160-160-160-96 96 256 255.999z\"></path></svg></span>';\n\t\t}\n\n\t\t// Burger - Desktop.\n\t\tif ( 'desktop' === $this->device && 'burger' === $this->nav_style ) {\n\t\t\t$container_id = 'fullscreen-navigation';\n\t\t\t$container_class = 'fullscreen-menu';\n\t\t\t$menu_class = 'fullscreen-navigation-ul';\n\t\t\t$fallback_cb = '';\n\t\t\t$walker = new HB_Walker_Nav_Burger();\n\n\t\t\t// For demo ora Preview menu only.\n\t\t\t$sub_level_arrrow = '<span class=\"menu-sub-level-arrow\"><svg class=\"mk-svg-icon\" style=\"height:16px;width: 16px\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><path d=\"M512 192l-96-96-160 160-160-160-96 96 256 255.999z\"></path></svg></span>';\n\t\t}\n\n\t\t// Get menu and the items list.\n\t\tif ( 'navigation-preview' === $this->menu ) {\n\t\t\t$menu = sprintf(\n\t\t\t\t'\n\t\t\t\t<nav id=\"%s\" class=\"%s\">\n\t\t\t\t\t<ul class=\"%s dropdownJavascript\">\n\t\t\t\t\t\t<li class=\"menu-item current-menu-item current_page_item hb-no-mega-menu\">\n\t\t\t\t\t\t\t<a href=\"#\" class=\"menu-item-link hb-js-smooth-scroll\">Current Menu</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li class=\"menu-item hb-has-mega-menu\">\n\t\t\t\t\t\t\t<a href=\"#\" class=\"menu-item-link hb-js-smooth-scroll\">Menu</a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t\t<li class=\"menu-item menu-item-has-children hb-no-mega-menu\">\n\t\t\t\t\t\t\t<a href=\"#\" class=\"menu-item-link hb-js-smooth-scroll\">Menu</a>\n\t\t\t\t\t\t\t%s\n\t\t\t\t\t\t\t<ul class=\"sub-menu\">\n\t\t\t\t\t\t\t\t<li class=\"menu-item\"><a href=\"#\" class=\"menu-item-link hb-js-smooth-scroll\">Menu</a></li>\n\t\t\t\t\t\t\t\t<li class=\"menu-item\"><a href=\"#\" class=\"menu-item-link hb-js-smooth-scroll\">Menu</a></li>\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</nav>',\n\t\t\t\t( ! empty( $container_id ) ) ? esc_attr( $container_id ) : 'hb-nav-preview',\n\t\t\t\tesc_attr( $container_class ),\n\t\t\t\tesc_attr( $menu_class ),\n\t\t\t\t$sub_level_arrrow\n\t\t\t);\n\t\t} else {\n\t\t\tif ( isset( $_GET['header-builder'] ) && 'preview' === $_GET['header-builder'] ) { // WPCS: XSS ok, CSRF ok.\n\t\t\t\tadd_filter( 'wp_nav_menu', 'mkhb_active_current_menu_item' );\n\t\t\t}\n\t\t\t$menu = wp_nav_menu(\n\t\t\t\tarray(\n\t\t\t\t\t'menu' => $this->menu,\n\t\t\t\t\t'container' => 'nav',\n\t\t\t\t\t'container_id' => $container_id,\n\t\t\t\t\t'container_class' => $container_class,\n\t\t\t\t\t'menu_class' => $menu_class,\n\t\t\t\t\t'echo' => false,\n\t\t\t\t\t'fallback_cb' => $fallback_cb,\n\t\t\t\t\t'walker' => $walker,\n\t\t\t\t)\n\t\t\t);\n\t\t\tremove_filter( 'wp_nav_menu', 'mkhb_active_current_menu_item' );\n\t\t} // End if().\n\n\t\treturn $menu;\n\t}", "function template_generic_menu_sidebar_above() {\n}", "private function masterNavigate(){\n\t\t\t\n\t\t\ttry{\n\t\t\t\tif($this->classLoginController->checkLogin()){\n\t\t\t\t\tif($this->classNavigaterController->userWantToLogout()){\n\t\t\t\t\t\t$this->classLoginController->logout();\n\t\t\t\t\t\t$this->classLoginController->showLoginPage();\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t$this->classNavigaterController->checkNavButtons($this->classLoginController->getUser());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if($this->classLoginController->userWantToReg()){\n\t\t\t\t\t$this->classRegController->register();\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$this->classLoginController->showLoginPage();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(\\Exception $e){\n\t\t\t\tnew \\errorView\\ErrorView();\n\t\t\t}\n\t\t}", "function freshio_primary_navigation_wrapper_close()\n\t{\n\t\techo '</div></div>';\n\t}", "public function renderNavigation()\n {\n return view('nova-page-manager::navigation');\n }", "public function navigation($portal_id = '') {\n // set page rules\n $this->_set_page_rule(\"R\");\n // set template content\n $this->smarty->assign(\"template_content\", \"settings/menu/navigation.html\");\n // get data portal\n $portal = $this->m_settings->get_portal_by_id($portal_id);\n if (empty($portal)) {\n redirect('settings/menu');\n }\n $this->smarty->assign(\"portal\", $portal);\n // get data menu\n $html = $this->_get_menu_by_portal($portal_id, 0, \"\");\n $this->smarty->assign(\"html\", $html);\n // notification\n $this->tnotification->display_notification();\n $this->tnotification->display_last_field();\n\n // output\n parent::display();\n }", "function mt_toplevel_page() {\n\t echo \"<h1>\" . __( 'Teatro Bresci - come aggiornare il sito:', 'menu-test' ) . \"</h1>\";\n\t get_template_part( 'how', 'to' );\n\t}", "public function navigationAction() {\n $navigation = $this->get('snowcap_admin')->getNavigation();\n return array('navigation' => $navigation);\n }", "function navigation()\n\t{\n\t\t$data='';\n\t\tglobal $tabelPrefix,$currentCat,$secureKey,$lang,$langPrefix;\n if(!isset($_GET['catId']))\n $_GET['catId']=0;\n\t\t$innerPageCat=(int)$_GET['catId'];\n\t\t$q=$this->selectQuery($tabelPrefix.'taxonmy_category','id,root,title,table_for_sub_cat,table_for_sub_cat_box_2,no_keyword_search','',' where root=0 and showing=1 ','','',' order by order_list ASC ');\n\t\t$data=' <ul class=\"Navigation\">';\n\t\t$lableFour=$lableFourSelected=$lang->lable_lable_4;\n\t\t$lableFive=$lableFiveSelected=$lang->lable_lable_5;\n\t\t$lableSix=$lableSixSelected=$lang->lable_lable_6;\n\t\t\t$data.='<li> <a href=\"index.php\" >Home</a></li>';\n\t\t\tif($langPrefix=='en')\n\t\t\t$data.='<li> <a href=\"index.php?lang=ar\" >ar</a></li>';\n\t\t\telse\n\t\t\t$data.='<li> <a href=\"index.php?lang=en\" >en</a></li>';\n // print_r($q);\n if($q>0)\n {\n for($i=0;$i<sizeof($this->title);$i++)\n {\n $class='';\n\n $labelOne=$lang->{$this->title[$i].'_lable_1'};\n $lableTwo=$lableTwoSelected=$lang->{$this->title[$i].'_lable_2'};\n $lableThree=$lableThreeSelected=$lang->{$this->title[$i].'_lable_3'};\n if($currentCat==$this->id[$i])\n {\n $class='class=current';\n if($_GET['keywordValue']!='')\n $labelOne=$_GET['keywordValue'];\n if($_GET['tags']!='')\n $lableTwoSelected=$_GET['tags'];\n if($_GET['tags2']!='')\n $lableThreeSelected=$_GET['tags2'];\n if($_GET['dateFilter']!='')\n $lableFourSelected=$_GET['dateFilter'];\n if($_GET['fromTime']!='')\n $lableFiveSelected=$_GET['fromTime'];\n if($_GET['toTime']!='')\n $lableSixSelected=$_GET['toTime'];\n }\n // href=\"?CategoryType='.$this->title[$i].'&catId='.$this->id[$i].'\"\n //index.php?CategoryType='+title+'&catId='+nextCat+'&secureCat='+secureCat+'\n $data.='<li id=\"'.md5($secureKey.$this->id[$i]).'\" onclick=\"showsearchBox(\\''.$this->id[$i].'\\',\\''.md5($secureKey.$this->id[$i]).'\\',\\''.$this->title[$i].'\\',\\''.$this->table_for_sub_cat[$i].'\\',\\''.md5($this->table_for_sub_cat[$i]).'\\',\\''.$this->table_for_sub_cat_box_2[$i].'\\',\\''.md5($this->table_for_sub_cat_box_2[$i]).'\\',\\''.$this->no_keyword_search[$i].'\\',\\''.$labelOne.'\\',\\''.$lableTwo.'\\',\\''.$lableThree.'\\',\\''.$lableFour.'\\',\\''.$lableFive.'\\',\\''.$lableSix.'\\',\\''.$innerPageCat.'\\',\\''.$lableTwoSelected.'\\',\\''.$lableThreeSelected.'\\',\\''.$lableFourSelected.'\\',\\''.$lableFiveSelected.'\\',\\''.$lableSixSelected.'\\',\\'1\\')\" style=\"display:none\"></li>';\n $data.='<li '.$class.' > <a href=\"index.php?CategoryType='.$this->title[$i].'&catId='.$this->id[$i].'&secureCat='.md5($secureKey.$this->id[$i]).'\" >'.$this->title[$i].'</a></li>';\n }\n }\n\n\t\t$data.='</ul>';\n\t\treturn $data;\n\t}", "function public_nav_main_bootstrap() {\n $partial = array('common/menu-partial.phtml', 'default');\n $nav = public_nav_main(); // this looks like $this->navigation()->menu() from Zend\n $nav->setPartial($partial);\n return $nav->render();\n}", "private function getSiteNavigation() {\n\t\t$html = '';\n\n\t\t$sidebar = $this->getSidebar();\n\n\t\t$sidebar['SEARCH'] = false;\n\t\t$sidebar['TOOLBOX'] = true;\n\t\t$sidebar['LANGUAGES'] = true;\n\n\t\tforeach ( $sidebar as $boxName => $box ) {\n\t\t\tif ( $boxName === false ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$html .= $this->getPortlet( $box, true );\n\t\t}\n\n\t\treturn $html;\n\t}", "function navBar($page=0) {\n\t\tglobal $dbh;\n\n\t\techo '<header><div class=\"wrapper\">';\n\n\t\t// logo home link\n\t\techo '<a href=\"/\" id=\"logo\"><img src=\"/img/site/logo.png\" alt=\"Student Council Logo\"></a>';\n\n\t\ttry {\n\t\t\t$sql = 'SELECT parents.*, pages.alias \n\t\t\t\t\tFROM parents, pages \n\t\t\t\t\tWHERE parents.idpages = pages.idpages\n\t\t\t\t\tORDER BY parents.position';\n\t\t\t\n\t\t\t$count = $dbh->query($sql)->rowCount();\n\n\t\t\tif($count) {\n\t\t\t\techo '<nav>\n\t\t\t\t<h2>Menu</h2>\n\t\t\t\t<ul id=\"nav\" class=\"sf-menu\">';\n\n\t\t\t\tforeach($dbh->query($sql) as $parent) {\n\t\t\t\t\t$id = $parent['idparents'];\n\n\t\t\t\t\t// look up to see if this parent has children\n\t\t\t\t\t$childsql = \"SELECT nav.*, links.*, pages.alias, pages.title\n\t\t\t\t\t\t\t\tFROM nav\n\t\t\t\t\t\t\t\tLEFT JOIN links\n\t\t\t\t\t\t\t\tON nav.idlinks = links.idlinks\n\t\t\t\t\t\t\t\tLEFT JOIN pages\n\t\t\t\t\t\t\t\tON nav.idpages = pages.idpages\n\t\t\t\t\t\t\t\tWHERE nav.idparents = $id\n\t\t\t\t\t\t\t\tORDER BY position\";\n\n\t\t\t\t\t$children = $dbh->query($childsql)->rowCount();\n\n\t\t\t\t\t$alias = $parent['alias'];\n\t\t\t\t\tif($alias=='index') $alias = ''; // links to home page '/' not '/index'\n\n\t\t\t\t\techo '<li class=\"';\n\t\t\t\t\tif(!$children) echo 'nochildren ';\n\t\t\t\t\tif($page == $parent['idpages']) echo 'current ';\n\t\t\t\t\tif($parent['special']) echo 'special-menu-item';\n\t\t\t\t\techo '\">\n\t\t\t\t\t<a href=\"/'.$alias.'\">'.$parent['name'].'\n\t\t\t\t\t<span class=\"subheader\">'.$parent['subheader'].'</span>\n\t\t\t\t\t</a>';\n\n\t\t\t\t\tif($children) { // has dropdown\n\t\t\t\t\t\techo '<ul>';\n\t\t\t\t\t\tforeach($dbh->query($childsql) as $child) { // each dropdown element\n\t\t\t\t\t\t\techo '<li class=\"';\n\t\t\t\t\t\t\tif(!empty($child['idpages'])) { // internal page link\n\t\t\t\t\t\t\t\tif($page == $child['idpages']) echo 'current';\n\n\t\t\t\t\t\t\t\t$childalias = $child['alias'];\n\t\t\t\t\t\t\t\tif($childalias=='index') $childalias = ''; // links to home page '/' not '/index'\n\n\t\t\t\t\t\t\t\techo '\"><a href=\"/'.$childalias.'\">'.$child['title'].'</a>';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse { // URL link\n\t\t\t\t\t\t\t\tif($child['email']) echo 'con'; // adds email symbol\n\t\t\t\t\t\t\t\telseif(!empty($child['idcolours'])) {\n\t\t\t\t\t\t\t\t\t$col = $dbh->query('SELECT class \n\t\t\t\t\t\t\t\t\t\tFROM colours \n\t\t\t\t\t\t\t\t\t\tWHERE idcolours = '.$child['idcolours']);\n\t\t\t\t\t\t\t\t\t$colcount = $col->rowCount();\n\n\t\t\t\t\t\t\t\t\tif($colcount) { // found colour with that id\n\t\t\t\t\t\t\t\t\t\t$colour = $col->fetch(PDO::FETCH_OBJ);\n\t\t\t\t\t\t\t\t\t\techo $colour->class;\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\techo '\"><a href=\"';\n\t\t\t\t\t\t\t\techo $child['email'] ? 'mailto:' : '';\n\t\t\t\t\t\t\t\techo $child['URL'].'\" target=\"_blank\">'.$child['name'].'</a>';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\techo '</li>'; // close drop down item\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo '</ul>'; // close drop down menu\n\t\t\t\t\t}\n\n\t\t\t\t\techo '</li>'; // close parent\n\t\t\t\t}\n\n\t\t\t\techo '</ul></nav>'; // close nav bar\n\t\t\t}\n\t\t}\n\t\tcatch (PDOException $e) {\n\t\t\techo $e->getMessage();\n\t\t}\n\n\t\techo '</div></header>';\n\t}", "function showLocalNav()\n {\n $menu = new SettingsNav($this);\n $menu->show();\n }", "function synth_content_nav( $html_id ) {\n\tglobal $wp_query;\n\n\t$html_id = esc_attr( $html_id );\n\n\tif ( $wp_query->max_num_pages > 1 ) { ?>\n\t\t<div class=\"row\">\n\t <div class=\"span12 center\">\n\t <div class=\"pagination\">\n\t <ul>\n\t \t<li><?php next_posts_link( __( '<span class=\"meta-nav\">&larr;</span> Older posts', 'synth' ) ); ?></li>\n\t \t<li><?php previous_posts_link( __( 'Newer posts <span class=\"meta-nav\">&rarr;</span>', 'synth' ) ); ?></li>\n\t </ul>\n\t </div>\n\t </div>\n\t </div>\n\t<?php } else { ?>\n\t\t<div class=\"row space50\"></div>\n\t<?php\n\t}\n}", "function affinity_mikado_get_main_menu($additional_class = 'mkd-default-nav') {\n\t\taffinity_mikado_get_module_template_part('templates/parts/navigation', 'header', '', array('additional_class' => $additional_class));\n\t}", "function optimize_mikado_get_main_menu($additional_class = 'mkdf-default-nav') {\n\t\toptimize_mikado_get_module_template_part('templates/parts/navigation', 'header', '', array('additional_class' => $additional_class));\n\t}", "function rackspace_preprocess_page(&$variables) {\n // Add a fully expanded navigation tree as $primary_navigation\n $menu_tree = menu_tree_all_data('main-menu');\n $tree_output_prepare = menu_tree_output($menu_tree);\n _rackspace_add_depth_to_menu_tree($tree_output_prepare);\n $variables['primary_navigation'] = drupal_render($tree_output_prepare);\n}", "protected function renderNavigation() {\n $arrPages = array(\"home\", \"about\", \"contact\", \"webshop\");\n // Show login/register for user without a session\n if (!isset($_SESSION[\"user\"])) {\n array_push($arrPages, \"login\", \"register\");\n }\n\n echo \"<div class=\\\"menu\\\"><ul>\";\n\n foreach ($arrPages as $sPage) {\n echo \"<li><a href=\\\"../project/index.php?page=\" . $sPage . \"\\\">\" . $sPage . \"</a></li>\";\n }\n\n // Show a log out button if the user is logged in\n if (isset($_SESSION[\"user\"])) {\n echo \"<li><a href=\\\"../project/index.php?page=logout\\\"> Logout \" . $_SESSION[\"user\"]->getName() . \"</a></li>\";\n echo \"<li><a href=\\\"../project/index.php?page=cart\\\"> Shopping Cart</a></li>\";\n }\n echo \"</ul></div>\";\n }", "public function globalNavigation($currentAction = \"\")\r\n\t \t{\r\n\t \t\tglobal $irrigationScheduler;\r\n\t \t\t$globalNavigation = \"\";\r\n\t \t\t\r\n\t \t\t//If the user is on a mobile device or in mobile format\r\n\t \t\tif($irrigationScheduler->session->isMobileDevice > 0)\r\n\t \t\t{\r\n\t \t\t\t//Apply globalNavigation formatting to the globalNavigation div\r\n\t\t \t\t$globalNavigation .= \"<div class='globalNavigation'>\";\r\n\t\t \t\t//The links are in a list <UL> <LI>....</UL>\r\n\t\t \t\t$globalNavigation .= \"<ul>\";\r\n\t\t\t\t//If there is currently a field selected\r\n\t\t \t\tif($this->FieldID > 0)\r\n\t\t \t\t{\r\n\t\t\t\t\t//Allow the user to go to dashboard\t\t\t\t\t\r\n\t\t\t \t\t$globalNavigation .= \"<li class='mainNavigation'>\";\r\n\t\t\t \t\t$globalNavigation .= \"<a href='\".$irrigationScheduler->session->basepath.\"&amp;action=dashboard'>\";\r\n\t\t\t \t\t$globalNavigation .= \"<div onmouseover='this.style.cursor=\\\"pointer\\\";' onmouseout='this.style.cursor=\\\"default\\\";' style='width:100%'><img height='18px' style='vertical-align:middle' src='ic_launcher-web.png'>\";\r\n\t\t\t \t\t$globalNavigation .= \"&nbsp;Dashboard\";\r\n\t\t\t \t\t$globalNavigation .= \"</div></a></li>\";\r\n\t\t\t\t\t//Allow the user to go to daily budget table\r\n\t\t\t \t\t$globalNavigation .= \"<li class=\\\"mainNavigation\\\">\";\r\n\t\t\t \t\t$globalNavigation .= \"<a href='\".$irrigationScheduler->session->basepath.\"&amp;action=daily-budget-existing-fields'><div onmouseover='this.style.cursor=\\\"pointer\\\";' onmouseout='this.style.cursor=\\\"default\\\";' style='width:100%'><img height='18px' style='vertical-align:middle' src='/images/Correcttable.png'>&nbsp;Daily Budget Table</div></a></li>\";\r\n\t\t\t \t\t//Allow the user to go to soil water chart\r\n\t\t\t \t\t$globalNavigation .= \"<li class=\\\"chartNavigation\\\">\";\r\n\t\t\t \t\t$globalNavigation .= \"<a href='\".$irrigationScheduler->session->basepath.\"&amp;action=soil-water-chart'><div onmouseover='this.style.cursor=\\\"pointer\\\";' onmouseout='this.style.cursor=\\\"default\\\";' style='width:100%'><img height='18px' style='vertical-align:middle' src='/images/stats1.gif'>&nbsp;Soil Water Chart</div></a></li>\";\r\n\t\r\n\t\t\t\t\t//If they have not clicked on \"more charts\" then don't display all the charts\r\n\t\t\t\t\t$thisStyle = 'display:none;';\r\n\t\t\t\t\t$thisLabel = 'More Charts';\r\n\t\t\t\t\t//Use the chart+ image\r\n\t\t\t\t\t$thisIcon = \"images/chart--plus.png\";\r\n\r\n\t\t\t\t\t//If they have clicked on \"more charts\" then we need to change the label and display the links\r\n\t\t\t\t\tif(in_array($currentAction,array('ET-chart','cumulative-water-chart','crop-coefficient-chart','deep-percolation-chart','water-stress-coefficient-chart')))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$thisStyle = 'display:block;';\r\n\t\t\t\t\t\t$thisLabel = 'Less Charts';\r\n\t\t\t\t\t\t//Use the chart- image\r\n\t\t\t\t\t\t$thisIcon = \"images/chart--minus.png\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t//Show the link for \"more charts\" or \"less charts\" depending on user action\r\n\t\t\t \t\t$globalNavigation .= \"<li class=\\\"globalNavigation\\\">\";\r\n\t\t\t \t\t$globalNavigation .= \"<a id='chartLink' href='javascript:void(0);' onclick='toggleCharts(this);'><div onmouseover='this.style.cursor=\\\"pointer\\\";' onmouseout='this.style.cursor=\\\"default\\\";' style='width:100%;'><img id='mcimg' height='18px' style=\\\"vertical-align:middle\\\" src='$thisIcon'>&nbsp;\".$thisLabel.\"</div></a></li>\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t//set up the toggleCharts javascript to toggle between \"more chart\" and \"less charts\"\r\n\t\t\t\t\t$globalNavigation .= \"<script type='text/javascript'>\".PHP_EOL;\r\n\t\t\t\t\t$globalNavigation .= \"function toggleCharts(aLink){ \";\r\n\t\t\t\t\t//if the currently shown value is \"more charts\" (the charts are not displayed)\r\n\t\t\t\t\t$globalNavigation .= \"if (document.getElementById('moreCharts').style.display == 'none'){ \";\r\n\t\t\t\t\t//then switch it and show all the chart links\r\n\t\t\t\t\t$globalNavigation .= \"document.getElementById('moreCharts').style.display='block'; \";\r\n\t\t\t\t\t//and change the chartLink innerhtml to show \"less charts\"\r\n\t\t\t\t\t$globalNavigation .= \"document.getElementById('chartLink').innerHTML='<div onmouseover=\\\"this.style.cursor=\\'pointer\\';\\\" onmouseout=\\\"this.style.cursor=\\'default\\';\\\" style=\\\"width:100%\\\"><img id=\\\"mcimg\\\" height=\\\"18px\\\" style=\\\"vertical-align:middle\\\" src=\\\"images/chart--minus.png\\\"> Less Charts</div>'; \";\r\n\t\t\t\t\t$globalNavigation .= \"} else { \";\r\n\t\t\t\t\t//otherwise it currently shows \"less charts\"\r\n\t\t\t\t\t//so hide the charts\r\n\t\t\t\t\t$globalNavigation .= \"document.getElementById('moreCharts').style.display='none'; \";\r\n\t\t\t\t\t//and change the label to \"more charts\"\r\n\t\t\t\t\t$globalNavigation .= \"document.getElementById('chartLink').innerHTML='<div onmouseover=\\\"this.style.cursor=\\'pointer\\';\\\" onmouseout=\\\"this.style.cursor=\\'default\\';\\\" style=\\\"width:100%\\\"><img id=\\\"mcimg\\\" height=\\\"18px\\\" style=\\\"vertical-align:middle\\\" src=\\\"images/chart--plus.png\\\"> More Charts</div>'; \";\r\n\t\t\t\t\t$globalNavigation .= \"} \";\r\n\t\t\t\t\t$globalNavigation .= \"}\t\t \";\r\n\t\t\t\t\t$globalNavigation .= \"</script> \".PHP_EOL;\r\n\t\t\t\t\t//End of toggleCharts javascript\r\n\t\r\n\t\t\t\t\t//create the section where the rest of the chart links go, and apply the current style\r\n\t\t\t \t\t$globalNavigation .= \"<div id='moreCharts' style='\".$thisStyle.\"'>\";\r\n\t\t\t \t\t//Daily water use chart\r\n\t\t\t \t\t$globalNavigation .= \"<li class=\\\"globalNavigation\\\">\";\r\n\t\t\t \t\t$globalNavigation .= \"<a href='\".$irrigationScheduler->session->basepath.\"&amp;action=ET-chart'><div onmouseover='this.style.cursor=\\\"pointer\\\";' onmouseout='this.style.cursor=\\\"default\\\";' style='width:100%'><img height='18px' style=\\\"vertical-align:middle\\\" src='/images/irrigation/chart.png'>&nbsp;Daily Water Use Chart</div></a></li>\";\r\n\t\t\t\t\t//Cumulative water use chart\r\n\t\t\t \t\t$globalNavigation .= \"<li class=\\\"globalNavigation\\\">\";\r\n\t\t\t \t\t$globalNavigation .= \"<a href='\".$irrigationScheduler->session->basepath.\"&amp;action=cumulative-water-chart'><div onmouseover='this.style.cursor=\\\"pointer\\\";' onmouseout='this.style.cursor=\\\"default\\\";' style='width:100%'><img height='18px' style=\\\"vertical-align:middle\\\" src='/images/irrigation/chart.png'>&nbsp;Cumulative Water Chart</div></a></li>\";\r\n\t\t\t \t\t//Crop Coefficient chart \r\n\t\t\t \t\t$globalNavigation .= \"<li class=\\\"globalNavigation\\\">\";\r\n\t\t\t \t\t$globalNavigation .= \"<a href='\".$irrigationScheduler->session->basepath.\"&amp;action=crop-coefficient-chart'><div onmouseover='this.style.cursor=\\\"pointer\\\";' onmouseout='this.style.cursor=\\\"default\\\";' style='width:100%'><img height='18px' style=\\\"vertical-align:middle\\\" src='/images/irrigation/chart.png'>&nbsp;Crop Coefficient Chart</div></a></li>\";\r\n\t\t\t \t\t//Deep water loss chart\r\n\t\t\t \t\t$globalNavigation .= \"<li class=\\\"globalNavigation\\\">\";\r\n\t\t\t \t\t$globalNavigation .= \"<a href='\".$irrigationScheduler->session->basepath.\"&amp;action=deep-percolation-chart'><div onmouseover='this.style.cursor=\\\"pointer\\\";' onmouseout='this.style.cursor=\\\"default\\\";' style='width:100%'><img height='18px' style=\\\"vertical-align:middle\\\" src='/images/irrigation/chart.png'>&nbsp;Deep Water Loss Chart</div></a></li>\";\r\n\t\t\t \t\t//Water Stress Chart\r\n\t\t\t \t\t$globalNavigation .= \"<li class=\\\"globalNavigation\\\">\";\r\n\t\t\t \t\t$globalNavigation .= \"<a href='\".$irrigationScheduler->session->basepath.\"&amp;action=water-stress-coefficient-chart'><div onmouseover='this.style.cursor=\\\"pointer\\\";' onmouseout='this.style.cursor=\\\"default\\\";' style='width:100%'><img height='18px' style=\\\"vertical-align:middle\\\" src='/images/irrigation/chart.png'>&nbsp;Water Stress Chart</div></a></li>\";\r\n\t\t\t \t\t$globalNavigation .= \"</div>\";\r\n\t\t\t \t\t//End of expandable \"more charts\" section\r\n\r\n\t\t \t\t\t//Apply inputNavigation style to the field settings link\r\n\t\t \t\t\t$globalNavigation .= \"<li class=\\\"inputNavigation\\\" >\";\r\n\t\t\t \t\t$globalNavigation .= \"<a href='\".$irrigationScheduler->session->basepath.\"&amp;action=advanced-update-field'><div onmouseover='this.style.cursor=\\\"pointer\\\";' onmouseout='this.style.cursor=\\\"default\\\";' style='width:100%;'><img height='18px' style='vertical-align:middle;' src='/images/irrigation/gear.png'>&nbsp;Field Settings</div></a></li>\";\r\n\t\t\t \t}\r\n\t\t\t\t//Apply inputNavigation style to the \"Add/Delete Fields\" link\r\n\t \t\t\t$globalNavigation .= \"<li class=\\\"inputNavigation\\\" >\";\r\n\t\t\t \t$globalNavigation .= \"<a href='\".$irrigationScheduler->session->basepath.\"&amp;action=my-fields'><div onmouseover='this.style.cursor=\\\"pointer\\\";' onmouseout='this.style.cursor=\\\"default\\\";' style='width:100%;'><img height='16px' style='vertical-align:middle;' src='/images/irrigation/plus.png'><img height='16px' style='vertical-align:middle;' src='/images/irrigation/minus.png'>&nbsp;Add/Delete Fields</div></a></li>\";\r\n\t\t\t \t$globalNavigation .= \"</ul> \"; \r\n\t\t\t \t//End of list of links\r\n\t\t\t \t$globalNavigation .= \"</div>\";\r\n\t\t\t \t//End of globalNavigation div\r\n\t\t\t} \t\t\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t//if it is not mobile version, then do this\r\n\t\t\t\tif(isset($_SESSION['fbversion']) && $_SESSION['fbversion'])\r\n\t\t\t\t{\r\n\t\t\t\t\t$stationTabs = \"<div style=\\\"width:100%;clear:both\\\"><form action=\\\"\\\" method=\\\"post\\\" name=\\\"StationTabsForm\\\">\";\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$stationTabs = \"<div style=\\\"width:100%;clear:both\\\"><form action=\\\"\".$irrigationScheduler->session->basepath.\"\\\" method=\\\"post\\\" name=\\\"StationTabsForm\\\">\";\r\n\t\t\t\t}\r\n\t\t \t\t$stationTabs .= $this->selectField(true,\"StationTabsForm\");\r\n\t\t \t\t$stationTabs .= \"</form></div>\";\r\n\t\t \t\t \t\r\n\t\t \t\t$stationTabs .= \"<div id='example' class='ui-tabs' style='clear:both'>\";\r\n\t\t \t\t$stationTabs .= \"<ul>\";\r\n\t\t \t\tif($irrigationScheduler->FieldID > 0)\r\n\t\t \t\t{\r\n\t\t\t \t\t$stationTabs .= \"<li><a style='background-color:#3cb6cd' href=\\\"/is/ajaxPage.php?action=daily-budget-existing-fields\\\"><span><b><img height='18px' style='vertical-align:middle' src='/images/Correcttable.png'>&nbsp;Daily Budget Table</b></span></a></li>\";\r\n\t\t\t \t\t$stationTabs .= \"<li><a style='background-color:#33BB44' href=\\\"/is/ajaxPage.php?action=soil-water-chart\\\"><span><b><img height='18px' style='vertical-align:middle' src='/images/stats1.gif'>&nbsp;Soil Water Chart</b></span></a></li>\";\r\n\t\t\t \t\t$stationTabs .= \"<li><a style='background-color:#acd373' href=\\\"/is/ajaxPage.php?action=ET-chart\\\"><span><b><img height='18px' style=\\\"vertical-align:middle\\\" src='/images/irrigation/chart.png'>&nbsp;Daily Water Use Chart</b></span></a></li>\";\r\n\t\t\t \t\t$stationTabs .= \"<li><a style='background-color:#acd373' href=\\\"/is/ajaxPage.php?action=cumulative-water-chart\\\"><span><b><img height='18px' style=\\\"vertical-align:middle\\\" src='/images/irrigation/chart.png'>&nbsp;Cumulative Water Chart</b></span></a></li>\";\r\n\t\t\t \t\t$stationTabs .= \"<li><a style='background-color:#acd373' href=\\\"/is/ajaxPage.php?action=crop-coefficient-chart\\\"><span><b><img height='18px' style=\\\"vertical-align:middle\\\" src='/images/irrigation/chart.png'>&nbsp;Crop Coefficient Chart</b></span></a></li>\";\r\n\t\t\t \t\t$stationTabs .= \"<li><a style='background-color:#acd373' href=\\\"/is/ajaxPage.php?action=deep-percolation-chart\\\"><span><b><img height='18px' style=\\\"vertical-align:middle\\\" src='/images/irrigation/chart.png'>&nbsp;Deep Water Loss Chart</b></span></a></li>\";\r\n\t\t \t\t\t$stationTabs .= \"<li><a style='background-color:#acd373' href=\\\"/is/ajaxPage.php?action=water-stress-coefficient-chart\\\"><span><b><img height='18px' style=\\\"vertical-align:middle\\\" src='/images/irrigation/chart.png'>&nbsp;Water Stress Chart</b></span></a></li>\";\r\n\t\t\t\t\t$stationTabs .= \"<li><a style='background-color:#3cb6cd' href=\\\"/is/ajaxPage.php?action=advanced-update-field\\\"><span><b><img height='18px' style='vertical-align:middle;' src='/images/irrigation/gear.png'>&nbsp;Field Settings</b></span></a></li>\";\r\n\t\t\t\t}\r\n\t\t \t\t$stationTabs .= \"<li><a style='background-color:#3cb6cd' href=\\\"/is/ajaxPage.php?action=add-a-field\\\"><span><b><img height='16px' style='vertical-align:middle;' src='/images/irrigation/plus.png'><img height='16px' style='vertical-align:middle;' src='/images/irrigation/minus.png'>&nbsp;Add/Delete Fields</b></span></a></li>\";\r\n\t\t \t\tif($irrigationScheduler->FieldID > 0)\r\n\t\t \t\t{\r\n\t \t\t\t\t$stationTabs .= \"<li><a style='background-color:#3cb6cd' href=\\\"/is/ajaxPage.php?action=activity\\\"><span><b>Field Activity</b></span></a></li>\";\r\n\t \t\t\t}\r\n\t\t \t\tif(in_array($irrigationScheduler->session->username, array('sehill','tpeters') ))\r\n\t\t \t\t{\r\n\t\t \t\t\t$stationTabs .= \"<li><a href=\\\"/is/ajaxPage.php?action=statistics\\\"><span>IS Statistics</span></a></li>\";\r\n\t\t \t\t}\r\n\t\t \t\t$stationTabs .= \"</ul>\";\r\n\t\t \t\t$stationTabs .= \"</div>\";\r\n\t\t\t\t$stationTabs .= \"<script type='text/javascript'>\".PHP_EOL;\r\n\t\t\t\t$stationTabs .= \"$(document).ready(function(){ \".PHP_EOL;\r\n\t\t\t\t$stationTabs .= \"$(function() {\".PHP_EOL;\r\n\t\t\t\t$stationTabs .= \"$(this).ajaxStart(function() {\".PHP_EOL;\r\n\t\t\t\t$stationTabs .= \"$.fancybox.showActivity(); });\".PHP_EOL;\r\n\t\t\t\t$stationTabs .= \"$(this).ajaxStop(function() {\".PHP_EOL;\r\n\t\t\t\t$stationTabs .= \"$.fancybox.hideActivity(); });\".PHP_EOL;\r\n\t\t\t\t$stationTabs .= \"}); \".PHP_EOL;\r\n\t\t\t\t$stationTabs .= \"$(function() {\".PHP_EOL;\r\n\t\t\t\t$stationTabs .= \"$( \\\"#example\\\" ).tabs({ });\".PHP_EOL;\r\n\t\t\t\t$stationTabs .= \"});\".PHP_EOL;\r\n\t\t\t\t$stationTabs .= \"$.fancybox.hideActivity();\".PHP_EOL;\r\n\t\t\t\t$stationTabs .= \"});\".PHP_EOL;\r\n\t\t\t\t$stationTabs .= \"</script> \".PHP_EOL;\r\n\t\r\n\t\t\t\t$globalNavigation .= $stationTabs;\r\n\t\t\t}\r\n\t \t\treturn $globalNavigation;\r\n\t \t}", "public function renderNavigation()\n {\n return view('nova-menu::navigation');\n }", "public function indexAction()\n {\n $module = $this->params('module');\n $navigation = Menu::mainOperation($module);\n\n return $navigation;\n }", "function main_navigation($nav_ID=\"main_nav\", $classes=\"fixed-top\", $location=\"header-menu\") {\n ?>\n <nav class=\"navbar navbar-expand-md <?php echo $classes ?>\">\n <a class=\"navbar-brand\" href=\"#\"><?php echo the_brand(); ?></a>\n <button class=\"navbar-toggler\" type=\"button\" data-toggle=\"collapse\" data-target=\"#main_navigation\" aria-controls=\"bs4navbar\" aria-expanded=\"false\" aria-label=\"Toggle navigation\">\n <span class=\"navbar-toggler-icon\"><i class=\"fa fa-bars\"></i></span>\n\t\t</button>\n\t\t<div id=\"main_navigation\" class=\"collapse navbar-collapse\" role=\"navigation\">\n\t\t<?php\n\t\t\twp_nav_menu([\n\t\t\t\t'menu' => $location,\n\t\t\t\t'theme_location' => $location,\n\t\t\t\t'container' => 'div',\n\t\t\t\t'container_id' => $nav_ID,\n\t\t\t\t'container_class' => '',\n\t\t\t\t'menu_id' => false,\n\t\t\t\t'menu_class' => 'navbar-nav',\n\t\t\t\t'depth' => 2,\n\t\t\t\t'fallback_cb' => 'bs4navwalker::fallback',\n\t\t\t\t'walker' => new bs4navwalker()\n\t\t\t]);\n\t\t\tthe_socials();\n\t\t?>\n\t\t</div>\n </nav>\n <?php\n}", "function getNavigation() {\n\t\t\t\t\n\t\t\t\t$pagination = '';\n\t\t\t\tif ( $this->pages ) {\n\t\t\t\t\tforeach ($this->pages as $pageId => $pageTitle) {\n\t\t\t\t\t\t$pagination .= '<li><a href=\"#page'.$pageId.'\">'.$pageTitle.'</a></li>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn $pagination;\n\t\t\t}", "function mantra_content_nav( $nav_id ) {\n\tglobal $wp_query;\n\n\tif ( $wp_query->max_num_pages > 1 ) : ?>\n\t\t<nav id=\"<?php echo $nav_id; ?>\" class=\"navigation\">\n\t\t\t<div class=\"nav-previous\"><?php next_posts_link( __( '<span class=\"meta-nav\">&laquo;</span> Older posts', 'mantra' ) ); ?></div>\n\t\t\t<div class=\"nav-next\"><?php previous_posts_link( __( 'Newer posts <span class=\"meta-nav\">&raquo;</span>', 'mantra' ) ); ?></div>\n\t\t</nav><!-- #nav-above -->\n\t<?php endif;\n}", "function frame_content_nav( $nav_id ) {\n global $wp_query, $post;\n\n // Don't print empty markup on single pages if there's nowhere to navigate.\n if ( is_single() ) {\n $previous = ( is_attachment() ) ? get_post( $post->post_parent ) : get_adjacent_post( false, '', true );\n $next = get_adjacent_post( false, '', false );\n\n if ( ! $next && ! $previous )\n return;\n }\n\n // Don't print empty markup in archives if there's only one page.\n if ( $wp_query->max_num_pages < 2 && ( is_home() || is_archive() || is_search() ) )\n return;\n\n ?>\n <?php if ( $wp_query->max_num_pages > 1 && ( is_home() || is_archive() || is_search() ) ) : // navigation links for home, archive, and search pages ?>\n <nav role=\"navigation\" class=\"navigation\">\n\n <?php if ( get_next_posts_link() ) : ?>\n <div class=\"nav-previous\"><?php next_posts_link( __( 'Older posts', 'frame' ) ); ?></div>\n <?php endif; ?>\n\n <?php if ( get_previous_posts_link() && get_next_posts_link() ) : ?>\n <div class=\"divider\"> / </div>\n <?php endif; ?>\n\n <?php if ( get_previous_posts_link() ) : ?>\n <div class=\"nav-next\"><?php previous_posts_link( __( 'Newer posts', 'frame' ) ); ?></div>\n <?php endif; ?>\n\n </nav><!-- #<?php echo esc_html( $nav_id ); ?> -->\n <?php endif; ?>\n\n <?php\n}", "function _gui_section0 () {\n return '\n <ul class=\"menu\">\n <li><a '.$this->is_this().' href=\"'.$this->glob->dir->home.'/tags\">Index</a></li>\n <li><a '.$this->is_this('_open').' href=\"'.$this->glob->dir->home.'/tags/_open\">Open tags</a></li>\n <li><a '.$this->is_this('_controlled').' href=\"'.$this->glob->dir->home.'/tags/_controlled\">Controlled tags</a></li>\n </ul> ' ;\n }", "public function generate_nav()\n {\n $nav = '';\n if ($this->bw_config->bip32_mpk == '')\n $nav .= '<div class=\"alert alert-danger\">You have not configured an electrum master public key. Please do so now ' . anchor('admin/edit/bitcoin', 'here') . '.</div>';\n\n $links = '';\n foreach ($this->nav as $entry) {\n $links .= '<li';\n if (uri_string() == 'admin' . $entry['panel'] || uri_string() == 'admin/edit' . $entry['panel']) {\n $links .= ' class=\"active nav-item\" ';\n $self = $entry;\n $heading = $entry['heading'];\n $panel_url = $self['panel'];\n }\n\t $links .= '>' . anchor('admin' . $entry['panel'], $entry['title'], array('class' => 'nav-link')) . '</li>';\n }\n\n $nav .= '\n <div class=\"row\">\n <ul class=\"nav nav-tabs\">\n <li class=\"col-xs-3\"><h4>' . $self['heading'] . '</h4></li>\n <li class=\"col-xs-1\">';\n\n\t\tif ($panel_url !== '/logs' AND $panel_url !== '/autorun' ) $nav .= \" \" . anchor('admin/edit' . $panel_url, '<span class=\"fas fa-wrench\"></span>', 'class=\"nav-link\"');\n $nav .= '\n </li>\n <li class=\"col-xs-8\">' . $links . '\n </ul>\n </div>\n <div class=\"row\">&nbsp;</div>';\n\n return $nav;\n }", "function perrymnmlist_content_nav( $nav_id ) {\r\n\tglobal $wp_query;\r\n\r\n\tif ( $wp_query->max_num_pages > 1 ) : ?>\r\n\t\t<nav id=\"<?php echo $nav_id; ?>\">\r\n\t\t\t<h3 class=\"assistive-text\"><?php _e( 'Post navigation', 'perrymnmlist' ); ?></h3>\r\n\t\t\t<div class=\"nav-previous alignleft\"><?php next_posts_link( __( '<span class=\"meta-nav\">&larr;</span> Older posts', 'perrymnmlist' ) ); ?></div>\r\n\t\t\t<div class=\"nav-next alignright\"><?php previous_posts_link( __( 'Newer posts <span class=\"meta-nav\">&rarr;</span>', 'perrymnmlist' ) ); ?></div>\r\n\t\t</nav><!-- #nav-above -->\r\n\t<?php endif;\r\n}", "function shangyingorg_content_nav( $nav_id ) {\n\tglobal $wp_query;\n\n\tif ( $wp_query->max_num_pages > 1 ) : ?>\n\t\t<nav id=\"<?php echo $nav_id; ?>\">\n\t\t\t<h3 class=\"assistive-text\"><?php _e( 'Post navigation', 'shangyingorg' ); ?></h3>\n\t\t\t<div class=\"nav-previous\"><?php next_posts_link( __( '<span class=\"meta-nav\">&larr;</span> Older posts', 'shangyingorg' ) ); ?></div>\n\t\t\t<div class=\"nav-next\"><?php previous_posts_link( __( 'Newer posts <span class=\"meta-nav\">&rarr;</span>', 'shangyingorg' ) ); ?></div>\n\t\t</nav><!-- #nav-above -->\n\t<?php endif;\n}", "function storechild_primary_navigation_wrapper_close() {\n\techo '</section>';\n}", "function ShowMain()\n\t{\n\t\t$url = $this->GetUrl();\n\t\t$curl = rtrim(dirname($url), '/');\n\t\t$hash = md5($url);\n\t\t$m = '';\n\t\t$h = '';\n\t\tforeach ($this->MainLinks as $k => $v) {\n\t\t\tif($v['main_url'] == $curl)\n\t\t\t{\n\t\t\t\t$m .= '<a href=\"'.$v['url'].'\" class=\"menu-link menu-link-active\">'.$v['name'].'</a>';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$h .= '<a href=\"'.$v['url'].'\" class=\"menu-link\">'.$v['name'].'</a>';\n\t\t\t}\n\t\t}\n\t\treturn $m . $h;\n\t}", "function civixero_civicrm_navigationMenu(&$menu) {\n $maxID = CRM_Core_DAO::singleValueQuery(\"SELECT max(id) FROM civicrm_navigation\");\n $navId = $maxID + 287;\n\n // Get the id of System Settings Menu\n $administerMenuId = CRM_Core_DAO::getFieldValue('CRM_Core_BAO_Navigation', 'Administer', 'id', 'name');\n $parentID = !empty($administerMenuId) ? $administerMenuId : NULL;\n\n $navigationMenu = array(\n 'attributes' => array(\n 'label' => 'Xero',\n 'name' => 'Xero',\n 'url' => NULL,\n 'permission' => 'administer CiviCRM',\n 'operator' => NULL,\n 'separator' => NULL,\n 'parentID' => $parentID,\n 'active' => 1,\n 'navID' => $navId,\n ),\n 'child' => array(\n $navId + 1 => array(\n 'attributes' => array(\n 'label' => 'Xero Settings',\n 'name' => 'Xero Settings',\n 'url' => 'civicrm/xero/settings',\n 'permission' => 'administer CiviCRM',\n 'operator' => NULL,\n 'separator' => 1,\n 'active' => 1,\n 'parentID' => $navId,\n 'navID' => $navId + 1,\n ),\n ),\n\n $navId+2 => array (\n 'attributes' => array(\n 'label' => 'Synchronize contacts',\n 'name' => 'Contact Sync',\n 'url' => 'civicrm/a/#/accounts/contact/sync',\n 'permission' => 'administer CiviCRM',\n 'operator' => null,\n 'separator' => 1,\n 'active' => 1,\n 'parentID' => $navId,\n ))\n\n ),\n );\n if ($parentID) {\n $menu[$parentID]['child'][$navId] = $navigationMenu;\n }\n else {\n $menu[$navId] = $navigationMenu;\n }\n}", "public function RenderNavigation()\n {\n $sNavi = '';\n $this->oModuleLoader->CallPublicModuleFunction($this->sSpotName, 'GenerateModuleNavigation');\n $oModule = $this->oModuleLoader->GetPointerToModule($this->sSpotName);\n if (array_key_exists('sModuleNavigation', $oModule->data)) {\n $sNavi = $oModule->data['sModuleNavigation'];\n }\n\n return $sNavi;\n }", "function qa_admin_sub_navigation()\n{\n\tif (qa_to_override(__FUNCTION__)) { $args=func_get_args(); return qa_call_override(__FUNCTION__, $args); }\n\n\t$navigation = array();\n\t$level = qa_get_logged_in_level();\n\n\tif ($level >= QA_USER_LEVEL_ADMIN) {\n\t\t$navigation['admin/general'] = array(\n\t\t\t'label' => qa_lang_html('admin/general_title'),\n\t\t\t'url' => qa_path_html('admin/general'),\n\t\t);\n\n\t\t$navigation['admin/emails'] = array(\n\t\t\t'label' => qa_lang_html('admin/emails_title'),\n\t\t\t'url' => qa_path_html('admin/emails'),\n\t\t);\n\n\t\t$navigation['admin/users'] = array(\n\t\t\t'label' => qa_lang_html('admin/users_title'),\n\t\t\t'url' => qa_path_html('admin/users'),\n\t\t\t'selected_on' => array('admin/users$', 'admin/userfields$', 'admin/usertitles$'),\n\t\t);\n\n\t\t$navigation['admin/layout'] = array(\n\t\t\t'label' => qa_lang_html('admin/layout_title'),\n\t\t\t'url' => qa_path_html('admin/layout'),\n\t\t);\n\n\t\t$navigation['admin/posting'] = array(\n\t\t\t'label' => qa_lang_html('admin/posting_title'),\n\t\t\t'url' => qa_path_html('admin/posting'),\n\t\t);\n\n\t\t$navigation['admin/viewing'] = array(\n\t\t\t'label' => qa_lang_html('admin/viewing_title'),\n\t\t\t'url' => qa_path_html('admin/viewing'),\n\t\t);\n\n\t\t$navigation['admin/lists'] = array(\n\t\t\t'label' => qa_lang_html('admin/lists_title'),\n\t\t\t'url' => qa_path_html('admin/lists'),\n\t\t);\n\n\t\tif (qa_using_categories())\n\t\t\t$navigation['admin/categories'] = array(\n\t\t\t\t'label' => qa_lang_html('admin/categories_title'),\n\t\t\t\t'url' => qa_path_html('admin/categories'),\n\t\t\t);\n\n\t\t$navigation['admin/permissions'] = array(\n\t\t\t'label' => qa_lang_html('admin/permissions_title'),\n\t\t\t'url' => qa_path_html('admin/permissions'),\n\t\t);\n\n\t\t$navigation['admin/pages'] = array(\n\t\t\t'label' => qa_lang_html('admin/pages_title'),\n\t\t\t'url' => qa_path_html('admin/pages'),\n\t\t);\n\n\t\t$navigation['admin/feeds'] = array(\n\t\t\t'label' => qa_lang_html('admin/feeds_title'),\n\t\t\t'url' => qa_path_html('admin/feeds'),\n\t\t);\n\n\t\t$navigation['admin/points'] = array(\n\t\t\t'label' => qa_lang_html('admin/points_title'),\n\t\t\t'url' => qa_path_html('admin/points'),\n\t\t);\n\n\t\t$navigation['admin/spam'] = array(\n\t\t\t'label' => qa_lang_html('admin/spam_title'),\n\t\t\t'url' => qa_path_html('admin/spam'),\n\t\t);\n\n\t\t$navigation['admin/caching'] = array(\n\t\t\t'label' => qa_lang_html('admin/caching_title'),\n\t\t\t'url' => qa_path_html('admin/caching'),\n\t\t);\n\n\t\t$navigation['admin/stats'] = array(\n\t\t\t'label' => qa_lang_html('admin/stats_title'),\n\t\t\t'url' => qa_path_html('admin/stats'),\n\t\t);\n\n\t\tif (!QA_FINAL_EXTERNAL_USERS)\n\t\t\t$navigation['admin/mailing'] = array(\n\t\t\t\t'label' => qa_lang_html('admin/mailing_title'),\n\t\t\t\t'url' => qa_path_html('admin/mailing'),\n\t\t\t);\n\n\t\t$navigation['admin/plugins'] = array(\n\t\t\t'label' => qa_lang_html('admin/plugins_title'),\n\t\t\t'url' => qa_path_html('admin/plugins'),\n\t\t);\n\t}\n\n\tif (!qa_user_maximum_permit_error('permit_moderate')) {\n\t\t$count = qa_user_permit_error('permit_moderate') ? null : qa_opt('cache_queuedcount'); // if only in some categories don't show cached count\n\n\t\t$navigation['admin/moderate'] = array(\n\t\t\t'label' => qa_lang_html('admin/moderate_title') . ($count ? (' (' . $count . ')') : ''),\n\t\t\t'url' => qa_path_html('admin/moderate'),\n\t\t);\n\t}\n\n\tif (qa_opt('flagging_of_posts') && !qa_user_maximum_permit_error('permit_hide_show')) {\n\t\t$count = qa_user_permit_error('permit_hide_show') ? null : qa_opt('cache_flaggedcount'); // if only in some categories don't show cached count\n\n\t\t$navigation['admin/flagged'] = array(\n\t\t\t'label' => qa_lang_html('admin/flagged_title') . ($count ? (' (' . $count . ')') : ''),\n\t\t\t'url' => qa_path_html('admin/flagged'),\n\t\t);\n\t}\n\n\tif (!qa_user_maximum_permit_error('permit_hide_show') || !qa_user_maximum_permit_error('permit_delete_hidden')) {\n\t\t$navigation['admin/hidden'] = array(\n\t\t\t'label' => qa_lang_html('admin/hidden_title'),\n\t\t\t'url' => qa_path_html('admin/hidden'),\n\t\t);\n\t}\n\n\tif (!QA_FINAL_EXTERNAL_USERS && qa_opt('moderate_users') && $level >= QA_USER_LEVEL_MODERATOR) {\n\t\t$count = qa_opt('cache_uapprovecount');\n\n\t\t$navigation['admin/approve'] = array(\n\t\t\t'label' => qa_lang_html('admin/approve_users_title') . ($count ? (' (' . $count . ')') : ''),\n\t\t\t'url' => qa_path_html('admin/approve'),\n\t\t);\n\t}\n\n\treturn $navigation;\n}", "protected function get_navigation() {\n return calendar_top_controls('day', [\n 'id' => $this->calendar->courseid,\n 'time' => $this->calendar->time,\n ]);\n }" ]
[ "0.6910449", "0.6609733", "0.65216416", "0.64571", "0.6446471", "0.6440984", "0.63949364", "0.6388638", "0.63688993", "0.6328863", "0.6293733", "0.6292099", "0.62698185", "0.626845", "0.6226422", "0.62208945", "0.6218065", "0.62081325", "0.61972994", "0.6176302", "0.6167484", "0.6161908", "0.6155963", "0.6136361", "0.6129379", "0.61234325", "0.61168265", "0.6112465", "0.6109324", "0.61089814", "0.6097724", "0.6094527", "0.60938203", "0.60936576", "0.6079263", "0.6075171", "0.60652107", "0.60615975", "0.6051738", "0.60480946", "0.60349554", "0.60333407", "0.6028582", "0.6028114", "0.60249937", "0.60241574", "0.6007826", "0.60075456", "0.60008717", "0.59856844", "0.59839934", "0.5983275", "0.59825397", "0.59810644", "0.59800273", "0.59794706", "0.59641695", "0.5960808", "0.595361", "0.59533125", "0.59524333", "0.5929734", "0.59256905", "0.5908232", "0.5895938", "0.5890746", "0.5877139", "0.58750737", "0.5874397", "0.5867834", "0.5863308", "0.58544904", "0.58496875", "0.5843497", "0.58395064", "0.5837207", "0.5834215", "0.58334774", "0.5832238", "0.58314997", "0.58302844", "0.5818655", "0.5817981", "0.58146787", "0.5798369", "0.5798156", "0.578125", "0.5778945", "0.5777094", "0.5768833", "0.57649076", "0.5761726", "0.5751674", "0.573748", "0.5736638", "0.57358533", "0.57351166", "0.5727686", "0.5726975", "0.5719016" ]
0.7526593
0
The primary navigation wrapper close
Основной навигационный обертка закрыть
function freshio_primary_navigation_wrapper_close() { echo '</div></div>'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function storechild_primary_navigation_wrapper_close() {\n\techo '</section>';\n}", "function llorix_one_lite_home_ribbon_section_close_trigger() {\n\tdo_action( 'llorix_one_lite_home_ribbon_section_close' );\n}", "function llorix_one_lite_home_logos_section_close_trigger() {\n\tdo_action( 'llorix_one_lite_home_logos_section_close' );\n}", "function listitem_close() {\n }", "function section_close() {\n }", "public static function close_required_links_container() {\n\n\t\techo wp_kses_post( '</div>' );\n\n\t}", "public function renderMainClose(array $options);", "function athen_footer_reveal_close() {\n\t$obj = athen_global_obj();\n\tif ( $obj->has_footer_reveal ) {\n\t\tget_template_part( 'partials/footer-reveal-close' );\n\t}\n}", "function llorix_one_lite_header_top_right_close_trigger() {\n\tdo_action( 'llorix_one_lite_header_top_right_close' );\n}", "function listcontent_close() {\n }", "function wpex_footer_reveal_close() {\n get_template_part( 'partials/footer-reveal-close' );\n}", "function close() {\r\n\t\t\techo $this->__getRow('close');\r\n\t\t}", "public static function settings_close() { ?>\n\n\t\t\t\t\t\t<br class=\"clear\" />\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</div>\n\t\t</div>\n\n\t<?php }", "function close() { }", "function close(){\n\t\t\t}", "public function opencloseAction() {\n \t\n $page_id = $this->_getParam('id');\n if (!empty($page_id)) {\n $sitepage = Engine_Api::_()->getItem('sitepage_page', $page_id);\n $sitepage->closed = !$sitepage->closed;\n $sitepage->save();\n }\n $this->_redirect('admin/sitepage/viewsitepage');\n }", "function CloseMenuSection($level){\t\t\n\t\tif ($level==0){\n\t\t\techo (\"\\n\\t\\t\\t</div>\");\t\n\t\t\techo (\"\\n\\t\\t</div>\");\t\t\t\n\t\t\techo (\"\\n\\t</div>\");\t\t\t\t\n\t\t\techo (\"\\n</div>\");\n\t\t}\n\t}", "function freshio_header_container_close()\n\t{\n\t\techo '</div>';\n\t}", "function close()\n\t{\n\t\t$output = array();\n\t\t$output[] = $this->Html->tag('/div'); //div.span-X\n\t\t$output[] = $this->Html->tag('/div'); //div.container\n\t\treturn $this->output($output);\n\t}", "public function close()\n\t{\n\t\t$data['data_close'] \t= $this->PerformAss->get_all_data_close();\n\t\t$this->load->view('header');\n\t\t$this->load->view('data_close', $data);\n\t\t//$this->load->view('tables');\n\t\t$this->load->view('footer');\n\t}", "function sprout_sidebar_text_widget_close() {\n?>\n\t\t</div>\n\t</div>\n</article>\n<div class=\"divider sidebar-divider\"></div>\n<div class=\"clear\"></div>\n<?php\n}", "function close() {}", "function listo_close() {\n }", "public function close()\n {\n $this->open = false;\n }", "public function OpenMainNav(){\n\t\techo '<ul class=\"mainnav\">';\n\t}", "public function closeAction() {\r\n\r\n //LOGGED IN USER CAN CLOSE LISTING\r\n if (!$this->_helper->requireUser()->isValid())\r\n return;\r\n\r\n //GET LISTING\r\n $sitereview = Engine_Api::_()->getItem('sitereview_listing', $this->_getParam('listing_id'));\r\n\r\n //GET LISTING TYPE ID\r\n $listingtype_id = $sitereview->listingtype_id;\r\n\r\n //GET VIEWER\r\n $viewer = Engine_Api::_()->user()->getViewer();\r\n\r\n //AUTHORIZATION CHECK\r\n if (!$this->_helper->requireAuth()->setAuthParams($sitereview, $viewer, \"edit_listtype_$listingtype_id\")->isValid()) {\r\n return;\r\n }\r\n\r\n //BEGIN TRANSCATION\r\n $db = Engine_Api::_()->getDbTable('listings', 'sitereview')->getAdapter();\r\n $db->beginTransaction();\r\n\r\n try {\r\n $sitereview->closed = empty($sitereview->closed) ? 1 : 0;\r\n $sitereview->save();\r\n $db->commit();\r\n } catch (Exception $e) {\r\n $db->rollBack();\r\n throw $e;\r\n }\r\n\r\n //RETURN TO MANAGE PAGE\r\n return $this->_helper->redirector->gotoRoute(array('action' => 'manage'), \"sitereview_general_listtype_$listingtype_id\", true);\r\n }", "public function force_close_field_wrapper() {\n\t\tif ( false !== $this->parent_li ) {\n\t\t\t$this->close_field_wrapper();\n\t\t}\n\t}", "public function detailCloseModal()\n {\n $this->detailOpen = false;\n }", "function floater_footer() {\n\n\t\tif (! is_active_sidebar( 'floater' ) )\n\t\t\treturn false;\n\n\t\t?>\n\t\t<aside id=\"floater-sidebar\">\n\t\t\t<a href=\"#\" class=\"floater-close\"><span class=\"icon-close\">x</span></a>\n\t\t\t<?php dynamic_sidebar( 'floater' ); ?>\n\t\t</aside>\n\t\t<?php\n\t}", "public function close() {\n\n echo \"</html>\";\n\n }", "function Close() {\n\t\t}", "public function getCloseTagWrapper()\r\n {\r\n }", "public function close() {\n\t\t$this->state->close($this);\n\t}", "public function close() {\n\t\t$this->link = null;\n\t}", "public function close()\n {\n // unset($this);\n }", "private function close(){\n }", "function woocommerce_template_loop_category_link_close()\n {\n }", "function freshio_primary_navigation_wrapper()\n\t{\n\t\techo '<div class=\"freshio-primary-navigation\"><div class=\"col-full\">';\n\t}", "public function close()\n {\n $this->context->setLiftState(new ClosingState());\n $this->context->getLiftState()->close();\n }", "public function close()\n {\n $this->context->setLiftState(new ClosingState());\n $this->context->getLiftState()->close();\n }", "function strong_close() {\n }", "function close() {\n\t\t$this->currentIndex->commit();\n\t\t$this->addCount = 0;\n\t\tCgn_Search_Index::$indexList[$this->currentIndexName] = NULL;\n\t\tunset(Cgn_Search_Index::$indexList[$this->currentIndexName]);\n\t\tunset($this->currentIndex);\n\t\t$this->currentIndex = NULL;\n\t}", "public function close()\n {\n // nothing to do here\n }", "function shop_isle_footer_wrap_close() {\n\t\techo '</div><!-- .bottom-page-wrap -->';\n\t}", "function athen_footer_reveal_open() {\n\t$obj = athen_global_obj();\n\tif ( $obj->has_footer_reveal ) {\n\t\tget_template_part( 'partials/footer-reveal-open' );\n\t} \n}", "function listu_close() {\n }", "function close()\n {\n }", "public function close () { }", "function shop_isle_footer_wrap_open() {\n\t\techo '</div><div class=\"bottom-page-wrap\">';\n\t}", "public function closeForm()\n {\n $this->isOpen = false;\n }", "public function hidden() {\n $this->location = \"undisclosed\";\n $this->active = false;\n }", "public function close()\n {\n Openbizx::$app->getClientProxy()->closePopup();\n }", "function starter_wrap_close() {\n\techo '</div>';\n}", "function close_divs () {\n if (is_page()) {\n ?>\n </div>\n </div>\n <?php\n }\n}", "function closeContent(){\n echo '</div>';\n }", "function woocommerce_template_loop_product_link_close()\n {\n }", "public function closeTemplate();", "public function closeContext()\n {\n $out = \"</div>\"; // end inner\n // hook to add custom stuff after areas\n do_action(\"context_box_{$this->id}\", $this->id, $this->environment, $out);\n $out .= \"</div>\";\n return $out;\n }", "public function close() {\n\n\t}", "function header_action_close()\n {\n return app('reactor.builders.contents')->headerActionClose();\n }", "public function close()\n {\n if ($this->getState() != self::CLOSED) {\n $this->driver->close();\n $this->setState(self::CLOSED);\n\n // Let stateless scripts know when it was moved.\n touch(self::RUN_MOVED);\n // Tell everyone.\n $this->eventDispatcher->dispatch('blindfold.close');\n }\n }", "public function close () {}", "public function closeWindow();", "function close_layout( $folder = 'parts' ) {\n\t$engine = Theme_Template_Engine::create( $folder );\n\t$engine->close_layout();\n}", "public function close()\n {\n $this->_link = null;\n }", "public function exitAutolink() {\r\n $this->in_autolink = false;\r\n }", "protected function actClose() {\n $lJid = $this -> getReq('jid');\n $lSrc = $this -> getReq('src');\n $lReturnTo = $this -> getReq('returnto');\n\n if ($lReturnTo == 'files') {\n $lUrl = 'index.php?act=job-'.$lSrc.'-fil&jobid='.$lJid;\n } elseif ($lReturnTo == 'apl') {\n $lUrl = 'index.php?act=job-apl&src='.$lSrc.'&jobid='.$lJid;\n } else {\n $lUrl = 'index.php?act=job-'.$lSrc.'.edt&jobid='.$lJid;\n }\n $this -> trackClick($lUrl, $lJid);\n $this -> redirect($lUrl);\n }", "public function closed();", "protected function close()\n {\n //\n }", "function wpex_footer_reveal_open() {\n get_template_part( 'partials/footer-reveal-open' );\n}", "public function close(){\n return '</form>';\n }", "public function close($extra = ''){\n\n return form_close($extra);\n }", "public function close($extra = ''){\n\n return form_close($extra);\n }", "public function close(){ }", "private function close()\n {\n $application = JFactory::getApplication();\n $application->close();\n }", "public function close()\n {\n ncurses_end();\n }", "function BlockClose() {\n echo '</div>';\n }", "public function close()\n {\n // Noop\n }", "function close();", "function close();", "private function closeBody($currentAction = \"\")\r\n\t\t{\r\n\t\t\tif(isset($_REQUEST['action']))\r\n\t\t\t{\r\n\t\t\t\t$currentAction = $_REQUEST['action'];\r\n\t\t\t}\r\n\t\t\tglobal $irrigationScheduler;\r\n\r\n\t\t\t$closeBody = \"\";\r\n\t\t\t//Include global navigation if they are logged in\r\n\t\t\tif($irrigationScheduler->session->logged_in)\r\n\t\t\t{\r\n\t\t\t\t$closeBody .= \"<div style='position:relative;'><span style='padding:0px;margin:0px;font-size:1%'></span>\";\r\n\t\t\t\t$closeBody .= $this->globalNavigation($currentAction);\r\n\t\t\t\t$closeBody .= \"</div>\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Include the footer no matter if they are logged in\r\n\t\t\t$closeBody .= \"<div style='position:relative;clear:both;'>\";\r\n\t\t\t$closeBody .= \"<div class=\\\"footer\\\">\";\r\n\t\t\t$closeBody .= $this->footer();\r\n\t\t\t$closeBody .= \"</div>\";\r\n\t\t\t$closeBody .= \"</div>\";\r\n\r\n\t\t\t//Close .container div \r\n\t\t\t$closeBody .= \"</div>\";\r\n\r\n\t\t\t$closeBody .= \"<script type='text/javascript'>\".PHP_EOL;\r\n\r\n\t\t\t$closeBody .= \"$(document).ready(function(){ \".PHP_EOL;\r\n\t\t\t$closeBody .= \" $(window).on('click','a',function() { \";\r\n\t\t\t$closeBody .= \" if(typeof($(this).attr('target')) == 'undefined') { \";\r\n\t\t\t$closeBody .= \" if($(this).attr('href').indexOf('java') < 0) { \";\r\n\t\t\t$closeBody .= \" document.location.href = $(this).attr('href'); \";\r\n\t\t\t$closeBody .= \" return false; \";\r\n\t\t\t$closeBody .= \" } \";\r\n\t\t\t$closeBody .= \" } \";\r\n\t\t\t$closeBody .= \"}); \";\r\n\t\t\t$closeBody .= \"}); \";\r\n\t\t\t$closeBody .= \"</script>\";\r\n\r\n\t\t\t//Close HTML Body\r\n\t\t\t$closeBody .= \"</body>\";\r\n\t\t\t//Close HTML\r\n\t\t\t$closeBody .= \"</html>\".PHP_EOL;\r\n\r\n\t\t\treturn $closeBody;\r\n\t\t}", "public function close() {\n\t\t\t$this->isClosed = true;\n\t\t}", "public function close()\n {\n return $this->parent;\n }", "public function close() {\n }", "public function close() {}", "public function close() {}", "public function close() {}", "public function close() {}", "public function closePart()\n {\n if (!$this->isOpenPart) return;\n $this->isOpenPart = false;\n $this->elements[] = array('type' => LFB_CLOSE_PART, 'key' => end($this->parts));\n }", "public function close()\n {\n unset($this);\n }", "public function getCloseContainerTag()\n {\n return '</ul>';\n }", "public function Close ();", "public function af4_nav_primary_title_bar_close( $output = '' ) {\n\n\t\t$output .= '</div>';\n\t\treturn $output;\n\n\t}", "public function Close();", "public function dismiss();", "public function close()\n {\n }", "public function close()\n {\n }", "public function close()\n {\n }", "public function close()\n {\n }", "public function close()\n {\n }" ]
[ "0.7247751", "0.67506754", "0.6717133", "0.63560355", "0.63437974", "0.6329656", "0.6319514", "0.62992", "0.62931263", "0.62866724", "0.6219299", "0.6174017", "0.61336154", "0.6127411", "0.61024505", "0.605779", "0.6031821", "0.60269934", "0.6016231", "0.59765595", "0.5888332", "0.58817965", "0.58720255", "0.58652663", "0.58591276", "0.585713", "0.5820347", "0.58167034", "0.5803363", "0.5802306", "0.57983506", "0.57813823", "0.5778326", "0.5770365", "0.5769121", "0.5765664", "0.57649815", "0.5758307", "0.5757893", "0.5757893", "0.5731262", "0.5730202", "0.57291913", "0.57232606", "0.57143635", "0.57018125", "0.5701653", "0.56920314", "0.56785953", "0.56559104", "0.5649384", "0.56486964", "0.564578", "0.5637816", "0.5635577", "0.5633296", "0.56322837", "0.56316346", "0.5627576", "0.5621374", "0.5614577", "0.560644", "0.5600812", "0.55930394", "0.5583178", "0.5572399", "0.5564914", "0.5563232", "0.55545396", "0.55511475", "0.5543823", "0.55371135", "0.55371135", "0.55312335", "0.5526017", "0.5504493", "0.5500883", "0.55006355", "0.54994017", "0.54994017", "0.54843795", "0.54808116", "0.54799473", "0.5477179", "0.54524493", "0.54524493", "0.54524493", "0.54515904", "0.5436597", "0.5430679", "0.5425901", "0.5425213", "0.5410555", "0.5409231", "0.54081583", "0.5404193", "0.5403461", "0.5403461", "0.5403461", "0.5403461" ]
0.8112264
0
The header container close
Закрытие контейнера заголовка
function freshio_header_container_close() { echo '</div>'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tableheader_close() {\n }", "function header_action_close()\n {\n return app('reactor.builders.contents')->headerActionClose();\n }", "function alienship_entry_header_markup_close() {\n\techo '</header>';\n}", "function section_close() {\n }", "function llorix_one_lite_header_top_right_close_trigger() {\n\tdo_action( 'llorix_one_lite_header_top_right_close' );\n}", "function close()\n\t{\n\t\t$output = array();\n\t\t$output[] = $this->Html->tag('/div'); //div.span-X\n\t\t$output[] = $this->Html->tag('/div'); //div.container\n\t\treturn $this->output($output);\n\t}", "function tablethead_close() {\n }", "public function close()\n\t{\n\t\t$data['data_close'] \t= $this->PerformAss->get_all_data_close();\n\t\t$this->load->view('header');\n\t\t$this->load->view('data_close', $data);\n\t\t//$this->load->view('tables');\n\t\t$this->load->view('footer');\n\t}", "function close(){\n\t\t\t}", "function freshio_primary_navigation_wrapper_close()\n\t{\n\t\techo '</div></div>';\n\t}", "function close() {\r\n\t\t\techo $this->__getRow('close');\r\n\t\t}", "function close() { }", "public function closed();", "function refined_magazine_header_end_container()\r\n {\r\n ?>\r\n </header><!-- #masthead -->\r\n <?php\r\n\r\n }", "public function close() {\n\t\t\t$this->isClosed = true;\n\t\t}", "private function close(){\n }", "function llorix_one_lite_home_logos_section_close_trigger() {\n\tdo_action( 'llorix_one_lite_home_logos_section_close' );\n}", "protected function afterOpen()\n {\n $this->write($this->header);\n\n if (!empty($this->rootTag)) {\n $tagOptions = $this->rootTag;\n $tagName = ArrayHelper::remove($tagOptions, 'tag');\n $this->write(Html::beginTag($tagName, $tagOptions));\n }\n }", "function close() {}", "public function close () { }", "public function onClose() {\n\n \t//destroi cabeçalho do form\n \tif($this->header[TConstantes::HEAD_NIVEL] == 1){\n \t\t$this->obHeader->clearHeader();\n \t}else{\n \t$this->obHeader->clearHeader($this->header[TConstantes::FORM]);\n \t}\n \t\n \t//recarrega a lista\n \t$this->getList();\n }", "public function close()\n {\n // nothing to do here\n }", "public function close()\n {\n $this->clear();\n $this->closed = true;\n }", "function Close() {\n\t\t}", "public function close () {}", "public function close() {\n\n\t}", "function listcontent_close() {\n }", "function close()\n {\n }", "public function close()\n {\n // unset($this);\n }", "public function close()\n {\n }", "public function close()\n {\n }", "public function close()\n {\n }", "public function close()\n {\n }", "public function close()\n {\n }", "public function close()\n {\n }", "public function close()\n {\n }", "public function close()\n {\n }", "public function close()\n {\n }", "public function close()\n {\n }", "public function close()\n {\n }", "public function close()\n {\n }", "public function close() {\n }", "public function close(){ }", "public function close() {}", "public function close() {}", "public function close() {}", "public function close() {}", "function Header() {\n }", "function Header() {\n }", "function Header() {\n }", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "public function close();", "protected function close()\n {\n //\n }", "function llorix_one_lite_home_ribbon_section_close_trigger() {\n\tdo_action( 'llorix_one_lite_home_ribbon_section_close' );\n}", "public function Header() {\n\t\t\n\t\tglobal $control, $hhID, $hh_fullname;\n\n\t\t$style4 = array('L' => array('width' => 0.10, 'cap' => 'round', 'join' => 'miter', 'dash' => 0),\n\t\t\t\t\t\t'T' => array('width' => 0.10, 'cap' => 'round', 'join' => 'miter', 'dash' => 0, 'color' => array(50, 50, 127)),\n\t\t\t\t\t\t'R' => array('width' => 0.10, 'cap' => 'round', 'join' => 'miter', 'dash' => 0, 'color' => array(50, 50, 127)),\n\t\t\t\t\t\t'B' => array('width' => 0.10, 'cap' => 'round', 'join' => 'miter', 'dash' => 0, 'color' => array(50, 50, 127)));\n\n// 9-5-2019: v 3.9.3 update - draw a series of boxes within boxes for Header.\t\t-mlr\t\t\t\t\t\t\n\t\t$this->Rect(9, 4, 192, 19, 'null', $style4, array(255, 255, 255));\t\n\t\t$this->Rect(56, 4, 100, 19, 'null', $style4, array(255, 255, 255));\t\t\n\t\t$this->Rect(56, 4, 100, 9.5, 'null', $style4, array(255, 255, 255));\t\t\n\t\t\n\t\t// logo\n\t\t$image_file = \"images/pep_logo.jpg\";\n\t\t$this->Image($image_file, 10, 5, 45, '', 'JPG', '', 'T', false, 300, '', false, false, 0, false, false, false);\n\n// 9-5-2019: v 3.9.3 update - move date and pantry name to footer, reposition household name and id, \n//\t\tincrease window size of staff initials.\t\t-mlr\t\t\n\t\t\n\t\t// column 1\n\t\t$pName=$this->doPantryName( $control );\n\t\t$this->SetFont('helvetica', '', 8);\t\t\t\n\t\t$this->writeHTMLCell(95, 10, 57, 4.5, \"primary shopper\", 0,0,0,true,\"L\",true);\t\t\t\n\t\t$this->SetFont('courier', 'b', 16);\t\t\t\n\t\t$this->writeHTMLCell(95, 10, 57, 7, $hh_fullname, 0,0,0,true,\"L\",true);\n\t\t$this->SetFont('helvetica', '', 8);\t\t\t\n\t\t$this->writeHTMLCell(95, 10, 57, 14, \"household id\", 0,0,0,true,\"L\",true);\t\t\n\t\t$this->SetFont('courier', 'B', 14);\t\t\t\n\t\t$this->writeHTMLCell(95, 10, 57, 17, $hhID, 0,0,0,true,\"L\",true);\t\t\n\t\t\n\t\t// column 2\n\t\t$this->SetFont('helvetica', '', 11);\n\t\t$this->writeHTMLCell(95, 10, 157, 5, \"Essentials Shopping List\", 0,0,0,true,\"L\",true);\t\n\t\t$this->setColor(\"draw\", 175,175,175);\t// border color\n\t\t$this->SetFillColor(238, 238, 238);\t\t\t\n\t\t$this->writeHTMLCell(43, 11, 157, 11, \" \", \"\",0,1,true,\"R\",true);\n\t\t$this->setColor(\"text\", 130,130,130);\n\t\t$this->SetFont('helvetica', 'IB', 12);\t\t\n\t\t$this->setColor(\"text\", 200,200,200);\n\t\t$this->writeHTMLCell(50, 7, 153, 14, \"STAFF INITIALS\", 0,0,0,true,\"C\",true);\t\n\t\t$this->setColor(\"draw\");\n\t\t\n\t\t// Underline Heading\t\t\n//\t\t$this->writeHTMLCell(190, 2, 10, 18.5, \" \", \"B\",0,0,true,\"R\",true);\t\t\n\t}", "function Header() {\n\t}", "protected function _setHeader()\n {\n if(!$this->header) return null;\n\n $closable = '';\n if($this->_options['closable'] == true) {\n $closable = $this->_template['closable'];\n }\n\n $this->_contents[] = $this->_stringTemplate->format('header', [\n 'header' => $this->header, \n 'closable' => $closable\n ]);\n }", "public static function close_required_links_container() {\n\n\t\techo wp_kses_post( '</div>' );\n\n\t}", "public function close()\n {\n\n }", "public function header()\n {\n }", "public function close()\n {\n return;\n }", "public function close()\n {\n return;\n }", "protected function close()\n {\n }", "protected function close()\n {\n }", "public function Close();", "public function header(){\r\n\t\t\t$this->display();\r\n\t\t}", "public function close() : void\n {\n }", "function Header()\n\t{\n\n\t}", "public function close()\n {\n // Noop\n }", "function close();", "function close();", "function listu_close() {\n }" ]
[ "0.7578536", "0.7335911", "0.6935076", "0.66410744", "0.66257685", "0.65525097", "0.65447557", "0.6502827", "0.6493602", "0.64462125", "0.6415899", "0.63178396", "0.6308604", "0.6269554", "0.62401015", "0.6236148", "0.619857", "0.61937916", "0.61860675", "0.6181587", "0.6165026", "0.61600804", "0.61373043", "0.6126577", "0.61233723", "0.6113785", "0.607643", "0.6074087", "0.6052061", "0.6041127", "0.6040571", "0.6040571", "0.6040571", "0.6040571", "0.6040571", "0.6040571", "0.6040571", "0.6040571", "0.6040571", "0.6040571", "0.6040571", "0.6029554", "0.60172665", "0.6009025", "0.6009025", "0.6009025", "0.6006452", "0.59984535", "0.59984535", "0.59984535", "0.5991015", "0.5991015", "0.5991015", "0.5991015", "0.5991015", "0.5991015", "0.5991015", "0.5991015", "0.5991015", "0.5991015", "0.5991015", "0.5991015", "0.5991015", "0.5991015", "0.5991015", "0.5991015", "0.5991015", "0.5991015", "0.5991015", "0.5991015", "0.5991015", "0.5991015", "0.5991015", "0.5991015", "0.5991015", "0.5991015", "0.5991015", "0.5991015", "0.5991015", "0.5991015", "0.59888047", "0.597637", "0.5974084", "0.5966412", "0.5954916", "0.59457046", "0.5936494", "0.5929669", "0.58847934", "0.58847934", "0.58815265", "0.58815265", "0.5861718", "0.585561", "0.5851066", "0.58426297", "0.58307433", "0.5828418", "0.5828418", "0.58258855" ]
0.8369299
0
/ Gets all the cars used for a particular class param int $class_id the class id to search for returns associative array containing all the cars
Получает все автомобили, используемые для определенного класса параметр int $class_id идентификатор класса для поиска возвращает ассоциативный массив, содержащий все автомобили
public static function getCarsInClass($class_id) { if (empty($class_id) OR !is_numeric($class_id)) { trigger_error('Error - $class_id cannot be empty and must be numeric', E_USER_ERROR); } // array to hold our final list of cars $class_car_ids = array(); // get class cars from DB $select_sql = " SELECT s.class_id, sc.student_id, sc.car_id FROM students_cars sc LEFT JOIN students s ON (sc.student_id = s.student_id) WHERE s.class_id='$class_id' ORDER BY sc.car_id ASC"; $cars = db::getRows($select_sql); // loop through results and ensure no duplicates foreach ($cars as $car) { $car_id = $car['car_id']; // add to our final array, if not already in it if (!in_array($car_id,$class_car_ids)) { $class_car_ids[] = $car_id; } } // our final data containing info about each car, no duplicates $cars_data = array(); foreach ($class_car_ids as $car_id) { $car = self::getCar($car_id); $cars_data[] = $car; } return $cars_data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function get_vehicles_by_class($class_id, $sort) {\n $db = Database::getDB();\n if ($sort == 'year') {\n $order_by = 'V.year';\n } else {\n $order_by = 'V.price';\n }\n $query = 'SELECT V.vehicle_id, V.year, V.price, V.model, M.Make, T.Type, C.Class\n FROM vehicles V\n LEFT JOIN makes M ON V.make_id = M.ID\n LEFT JOIN types T ON V.type_id = T.ID\n LEFT JOIN classes C ON V.class_id = C.ID\n WHERE V.class_id = :class_id\n ORDER BY ' . $order_by . ' DESC';\n $statement = $db->prepare($query);\n $statement->bindValue(':class_id', $class_id);\n $statement->execute();\n $vehicles = $statement->fetchAll();\n $statement->closeCursor();\n return $vehicles;\n }", "public function get_car($id) {\n\n return $this->FindBySql($this, \"select * from car_model where id=$id\");\n }", "public function getClasses() {\n $sql = \"SELECT class_id id, name FROM class\";\n $query = $this->db->query($sql);\n echo json_encode($query->result_array());\n }", "public function getCars($id)\n {\n\n $cars = DB::table('cars')->select('cars.brand', 'cars.model', 'locations.latitude', 'locations.longitude', 'cars.id as car_id')\n ->leftJoin('drivers as drivers', 'cars.driver_id', '=', 'drivers.id')\n ->leftJoin('locations as locations', 'cars.location_id', '=', 'locations.id')\n ->where('cars.driver_id','=',$id)\n ->get();\n return response()->json($cars, 200);\n }", "public function get_class($id)\n\t{\n\t\t$query = $this->db->get_where('classes', array('id' => $id));\n\t\treturn $query->row_array();\t\t\n\t}", "public function getStudentCars($student_id) {\r\n\t\r\n\t\tif (!is_numeric($student_id)) {\r\n\t\t\ttrigger_error('Error - $student_id must be numeric', E_USER_ERROR);\r\n\t\t}\r\n\t\t\r\n\t\t// get cars linked to this student\r\n\t\t$cars_sql = \"\r\n\t\tSELECT\r\n\t\t\tsc.car_id,\r\n\t\t\tc.mac_address AS car_mac_address,\r\n\t\t\tc.type AS car_type\r\n\t\tFROM students_cars sc\r\n\t\tLEFT JOIN cars c ON (c.car_id = sc.car_id)\r\n\t\tWHERE sc.student_id = '$student_id'\r\n\t\t\";\r\n\r\n\t\t//dbug($cars_sql,'cars_sql');\r\n\r\n\t\t$cars = db::getRows($cars_sql);\r\n\t\t//dbug($cars,'$cars');\r\n\t\t\r\n\t\treturn $cars;\r\n\t}", "public function getSubjectsInClass($class_id){\n //SELECT query\n $query = \"SELECT id, name FROM \" . $this->table_name .\"\n WHERE \n class_id = :class_id\";\n\n //prepare the query\n $stmt = $this->conn->prepare($query);\n\n //sanitize\n $class_id = htmlspecialchars(strip_tags($class_id));\n\n //bind Params\n $stmt->bindParam(':class_id', $class_id);\n\n //execute the stmt\n $stmt->execute();\n\n //return the result\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }", "function getClass($classid){\n $quoted_id = $this->database->quote($classid);\n $query = \"SELECT class.id, class.name AS name, class.year AS year, class.level_id AS levelid, level.name AS level\nFROM level, class\nWHERE class.level_id = level.id\nAND class.id = $quoted_id\nORDER BY year, name, level ASC\";\n return $this->database->query($query)->fetch(PDO::FETCH_ASSOC);\n }", "protected function getCars()\n {\n $sql = 'SELECT id, mark, model, year, engine, color, speed, price FROM rest_cars';\n $result = $this->db->execute($sql,[]);\n\n if (!$result)\n $this->response( '', 404, '002', true );\n\n $this->response($result);\n }", "public function getStudentsInClass($class_id) {\r\n\t\t\r\n\t\t$class_id = db::makeDBSafe($class_id);\r\n\t\t\r\n\t\tif (empty($class_id) OR !is_numeric($class_id)) {\r\n\t\t\ttrigger_error('Error - $class_id must not be empty and must be numeric', E_USER_ERROR);\r\n\t\t}\r\n\t\r\n\t\t// select students from students table for the specified class\r\n\t\t$student_sql = \"\r\n\t\tSELECT\r\n\t\t\ts.*,\r\n\t\t\tc.name as class_name\r\n\t\tFROM students s\r\n\t\tLEFT JOIN classes c ON (c.class_id = s.class_id)\r\n\t\tWHERE s.class_id='$class_id'\r\n\t\tORDER BY s.student_id ASC\";\r\n\t\t\r\n\t\t$students = db::getRows($student_sql);\r\n\t\t\r\n\t\t//dbug($students,'$students','green');\r\n\t\t\r\n\t\treturn $students;\r\n\t}", "public function get_class($id){\n $this->db->where('user_id', $id);\n $query = $this->db->get('class');\n $record=[];\n foreach($query->result() as $r ){\n // print_r($r); exit;\n $record[]=array(\n 'id'=>$r->id,\n 'school_name'=>$this->get_school_name($r->school_id),\n 'class_name'=>$r->class_name,\n 'subject'=>$this->get_subject_name($r->subject_id),\n 'teacher_name'=>$this->get_teacher_name($r->teacher_id)\n );\n }\n return $record;\n }", "public function getAllClassesWithStudents()\r\n\t{\r\n\t\t$classes = $this->getAllClasses();\r\n\t\t\r\n\t\t// loop through our classes and append students\r\n\t\tforeach ($classes as $key => $class) {\r\n\t\t\t\r\n\t\t\t//dbug($class,'class');\r\n\t\t\t$class_id = $class['class_id'];\r\n\t\t\t\r\n\t\t\t// get all cars used in this class\r\n\t\t\t$class_cars = car::getCarsInClass($class_id);\r\n\t\t\t$classes[$key]['cars'] = $class_cars;\r\n\t\t\t\r\n\t\t\t//dbug($class_cars,'$class_cars','blue');\r\n\t\t\t\r\n\t\t\t$students = $this->getStudentsInClass($class_id);\r\n\t\t\t//dbug($students,'$students','brown');\r\n\t\t\t\r\n\t\t\t// add students into our classes array\r\n\t\t\t$classes[$key]['students'] = $students;\r\n\t\t}\r\n\t\t\r\n\t\t//debug($classes,'classes','black');\r\n\t\t\r\n\t\treturn $classes;\r\n\t\t\r\n\t}", "function getClasses($schoolid){\n $quoted_id = $this->database->quote($schoolid);\n $query = \"SELECT class.id, class.name AS name, class.year AS year, level.name AS level\nFROM level, class\nWHERE class.level_id = level.id\nAND class.school_id = $quoted_id\nORDER BY year, name, level ASC\";\n return $this->database->query($query)->fetchAll();\n\n }", "function all_classes($user_id){\r\n $q = $this->db->where('user_id', $user_id)\r\n ->get('class_instructors')\r\n ->result();\r\n \r\n foreach ($q as $c){\r\n $cls = $this->db->where('id', $c->class_id)->get('classes')->row();\r\n $data[] = $cls;\r\n }\r\n \r\n if ( isset($data) && !empty($data) ){ return $data; }\r\n }", "function get_theclass($classID)\n {\n return $this->db->get_where('classes',array('classID'=>$classID))->row_array();\n }", "public function getTeachersForClass($class_id) {\n return $this->get('get_teachers_for_class', ['class_id' => $class_id]);\n }", "public static function getCar($car_id) {\r\n\t\t\r\n\t\tif (empty($car_id) OR !is_numeric($car_id)) {\r\n\t\t\ttrigger_error('Error - $car_id cannot be empty and must be numeric', E_USER_ERROR);\r\n\t\t}\r\n\t\t\r\n\t\t// get car data\r\n\t\t$select_sql = \"SELECT * FROM cars WHERE car_id='$car_id'\";\r\n\t\t$car_data = db::getRow($select_sql);\r\n\t\t\r\n\t\treturn $car_data;\r\n\t\t\r\n\t}", "function get_car_list()\n\t{\n\t\t$this->db->select('*');\n\t\t$query=$this->db->get('cabdetails')->result_array();\n\t\treturn $query;\n\t}", "function getClassList($schoolid){\n return $this->database->select(\n \"class\",\n [\"id\", \"name\"],\n [\n \"school_id\" => $schoolid,\n \"ORDER\" => \"year\"\n ]\n );\n }", "function getCarByMakeSearch($make_id, $keyword){\r\n\t//$unix_product = array();\r\n $q_searchid = getValue(\"SELECT car_id FROM tbl_car WHERE car_code='$keyword'\");\r\n\tif($q_searchid){\r\n\t\theader('Location:'.HTTP_DOMAIN.'?page=cardetail&car='.$q_searchid);\r\n\t\texit();\r\n\t}\r\n\t\r\n\t$keyword=strtolower($keyword);\r\n\t\tif($make_id!=0){\r\n\t\t\t$q_car_id=getResultSet(\"SELECT DISTINCT(car_id) FROM tbl_car WHERE manufacturer_id=\".$make_id.\" AND lower(model) LIKE '%$keyword%' OR lower(car_code) LIKE '%$keyword%' OR lower(description) LIKE '%$keyword%'\");\t\t\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$q_car_id=getResultSet(\"SELECT DISTINCT(car_id) FROM tbl_car WHERE lower(model) LIKE '%$keyword%' OR lower(car_code) LIKE '%$keyword%' OR lower(description) LIKE '%$keyword%'\");\t\r\n\t\t}\r\n\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\twhile($rp=mysql_fetch_array($q_car_id)){\r\n\t\t\t$car_id = $rp['car_id'];\r\n\t\t\t$car = new car($car_id);\r\n\t\t\tif($car->getCarActive()!=0){\r\n\t\t\t\tif($car->getCarStatusSoldExpire()!=true){\t\t\t\r\n\t\t\t\techo '<div class=\"item\">';\r\n\t\t\t\t\techo '<div class=\"desc\">';\r\n\t\t\t\t\t\techo '<div class=\"item_name\" >'.$car->getCarModel().'</div>';\r\n\t\t\t\t\t\techo '<div class=\"shop_name\"><span style=\"padding: 5px 20px 5px 20px; background-image: url('.HTTP_DOMAIN.'store/image/icon/store.png);background-repeat: no-repeat;background-position: 0px center;\">'.$car->getStoreName().'</span></div>';\r\n\t\t\t\t\t\techo '<div class=\"price\" >'.$car->getCarPrice().'</div>';\r\n\t\t\t\t\techo '</div>';\r\n\t\t\t\t\techo '<a href=\"?page=cardetail&car='.$car_id.'\">';\r\n\t\t\t\t\t\t//echo '<img src=\"'.$car->getCarPictureThumb().'\">';\r\n\t\t\t\t\t\techo '<div class=\"frame\">';\r\n\t\t\t\t\t\t\techo '<img src=\"'.$car->getCarPictureThumb().'\" style=\"width: 200px;\" class=\"car_picture\">';\r\n\t\t\t\t\t\t\techo $car->getCarStatus();\r\n\t\t\t\t\t\techo '</div>';\r\n\t\r\n\t\t\t\t\techo '</a>';\r\n\t\t\t\techo '</div>';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n}", "protected function getCarsByParams()\n {\n list($arrParams['id'],\n $arrParams['mark'],\n $arrParams['model'],\n $arrParams['year'],\n $arrParams['engine'],\n $arrParams['color'],\n $arrParams['speed'],\n $arrParams['price']\n ) = explode('/', $this->params['params'], 9);\n\n $sql = 'SELECT id, mark, model, year, engine, color, speed, price\n FROM rest_cars WHERE ';\n\n $cnt = 0;\n foreach ($arrParams as $key => $value)\n {\n if ($value == 'null' or $value == null or $value == 'false')\n {\n unset($arrParams[$key]);\n continue;\n }\n\n if ($cnt > 0)\n $sql .= ' AND ' .$key. ' = :' .$key;\n else\n $sql .= $key. ' = :' .$key;\n\n $cnt++;\n }\n\n if (count($arrParams) == 0)\n $this->response( '', 406, '017', true );\n \n $result = $this->db->execute($sql, $arrParams);\n\n if (!$result)\n $this->response( '', 404, '002', true );\n\n $this->response($result);\n }", "protected function _getClasses()\n {\n// if (file_exists($filePath)) {\n// $allClasses = unserialize(@file_get_contents($filePath));\n// return $allClasses;\n// }\n $skip = 0;\n $limit = 5;\n $allClasses = [];\n do {\n $response = $this->curl($this->url . ':80/api/adminclass/?limit=' . $limit . '&skip=' . ($skip * $limit), 'GET');\n $classes = json_decode($response, true);\n $classesList = [];\n foreach ($classes as $class) {\n $classesList[$class['id']] = $this->_getClassNameTree($class['class']);\n// $classesList[$class['id']] = $class['class'][0]['title'];\n }\n $allClasses = array_merge($allClasses, $classesList);\n $skip++;\n } while (($skip * $limit) < 30);\n return $allClasses;\n }", "function loadObjectList($key = '', $class = 'stdClass') {\n\t\tif (!($cur = $this -> query()))\n\t\t\treturn array();\n\t\t$array = array();\n\t\t$obj = mysqli_fetch_object($cur, $class);\n\t\twhile ($obj) {\n\t\t\tif ($key) {\n\t\t\t\t$array[$obj -> $key] = $obj;\n\t\t\t} else {\n\t\t\t\t$array[] = $obj;\n\t\t\t}\n\t\t\t$obj = mysqli_fetch_object($cur, $class);\n\t\t}\n\t\tmysqli_free_result($cur);\n\t\treturn $array;\n\t}", "public function getOptionsFromClass($class_id , $select_options){\n $ops = \\DB::table('car_option as co')\n ->join('car_option_class as coc','coc.option_id','=', 'co.id')\n ->where('coc.class_id',$class_id)\n ->orderby('co.order')\n ->select(['co.*'])->get();\n $add_opions = array();\n if(!empty($select_options)) {\n if (!empty($ops)) {\n foreach ($ops as $op) {\n if (in_array($op->id, $select_options)) {\n array_push($add_opions, $op);\n }\n }\n } else {\n// $add_opions = $ops;\n }\n }else {\n// $add_opions = $ops;\n }\n return $add_opions;\n }", "function get_class_ids($school_id)\n {\n \t\t\n\t $sql = \"select ClassId from class where SchoolId='$school_id'\";\n\t $res = mysql_query($sql) or die(\"Error in fetching ClassId from Class Table\".mysql_error());\n\t $class_ids = array();\n\n\t while($row = mysql_fetch_array($res)){\n\t $class = $row[\"ClassId\"];\n\t array_push($class_ids,$class);\n\t }\n\t return $class_ids;\n }", "function getClasses (){\n\t\t\n\t\t$query = \n\t\t\t\"SELECT classroom_id, class_color\n\t\t\t FROM classroom\";\n\t\t\n\t\t\n\t\t$result = $this->connection->query($query) or die (\"An error occurred.\");\n\t\t\n\t\twhile ($row = $result->fetch_assoc()){\n\t\t\techo $row['classroom_id'] . \" \" . $row['class_color'] . \",\"; // The commas and spaces are added to make parsing simpler on the caller end\n\t\t};\n\t\t\n\t}", "public function getClassListByTeacherID($id) {\n\t $sql=\"select * from class where id in (select classID from person where teachers like '%\".$id.\"%')\";\n $this->dataBase->query($sql);\n return $this->dataBase->getRowList();\n }", "public function findAllCars()\n {\n $dql = Doctrine_Query::create()\n ->from(\"Car c\")\n ->leftJoin(\"c.Users\");\n return $dql->execute();\n }", "private function findClassSubjects ($class_id)\r\n {\r\n //Zend_Registry::get('logger')->debug($class_id);\r\n $httpClient = new Zend_Http_Client(\r\n 'http://' . ACADEMIC_SERVER . '/class/getclasssubjects');\r\n $httpClient->setCookie('PHPSESSID', $_COOKIE['PHPSESSID']);\r\n $httpClient->setMethod('POST');\r\n $httpClient->setParameterPost(\r\n array('class_id' => $class_id, 'format' => 'json'));\r\n $response = $httpClient->request();\r\n if ($response->isError()) {\r\n return false;\r\n } else {\r\n $json_response = $response->getBody($response);\r\n $class_subjects = Zend_Json::decode($json_response);\r\n $subject_ids = array_keys($class_subjects);\r\n return $subject_ids;\r\n }\r\n }", "public function get_names($class_id)\n {\n // SQL Query to get the names\n $query = \"SELECT * FROM students INNER JOIN classJoining ON classJoining.stud_id=students.stud_id WHERE classJoining.class_id=?\";\n return $this->db->query($query,array($class_id));\n }", "function get_all_theclasses()\n {\n $this->db->from('classes c');\n $this->db->join('subjects s', 's.subjectID = c.subjectID', 'left');\n $this->db->join('users u', 'u.userIDNo = c.facultyID', 'left');\n $this->db->join('venues v', 'v.venueID = c.venueID', 'left');\n $this->db->join('timeslots t', 't.timeSlotID = c.timeSlotID', 'left');\n $this->db->where('c.status =', 'Active');\n return $this->db->get()->result_array();\n\n // $this->db->join('course', 'courseID');\n // $this->db->order_by('apid', 'asc');\n // $this->db->where('studentstat !=', 'Approved');\n // return $this->db->get('applicant')->result_array();\n }", "public function getAllClasses() {\r\n\t\t\r\n\t\t$classes_sql = \"\r\n\t\tSELECT\r\n\t\t\tclass_id,\r\n\t\t\tname,\r\n\t\t\tdescription,\r\n\t\t\tactive,\r\n\t\t\tDATE_FORMAT(created, '\".READABLE_DATE_FORMAT.\"') as created,\r\n\t\t\tDATE_FORMAT(modified, '\".READABLE_DATE_FORMAT.\"') as modified\r\n\t\tFROM classes ORDER BY class_id ASC\";\r\n\t\t\r\n\t\t//dbug($classes_sql,'classes_sql','green');\r\n\t\t\r\n\t\t$classes = db::getRows($classes_sql);\r\n\t\t\r\n\t\treturn $classes;\r\n\t}", "public function getAllCars()\n {\n $model = Car::model()->findAll(array('order'=>'Make'));\n $list = CHtml::listdata($model,'ID','Make');\n return $list;\n }", "public function query2()\n {\n $this->connect();\n $array = array();\n $result = $this->connection->query(\"SELECT car.Car, car.Year_of_manufacture, rents_by_car.rent_num\n FROM(SELECT Car_Id,COUNT(*) AS rent_num\n FROM `travel`\n WHERE YEAR(travel.Travel_Date) = '2018'\n GROUP BY Car_Id\n ORDER BY rent_num DESC\n LIMIT 3\n )rents_by_car\n LEFT JOIN car ON car.Car_Id = rents_by_car.Car_Id \");\n\n \n echo \"<table border='3' bgcolor='white'>\";\n echo \"<tr bgcolor='white'>\";\n echo \n \"<th>\".'Car Name'.\"</th>\n <th>\".'Year of manufacture' .\"</th>\n <th>\" .'Rent Number'.\"</th>\";\n echo\"</tr>\";\n \n while($row=$result->fetchObject('carClass')){\n $array[] = $row;\n \n echo \"<tr bgcolor='white' align='center'>\";\n echo \n \n \"<td>\".$row->getCar_Name().\"</td>\n <td>\".$row->getYear_Of_Manufacture().\"</td>\n <td>\".$row->getRent_num().\"</td>\";\n echo \"</tr>\"; \n }\n echo \"</table>\".\"<br>\";\n $this->disconnect();\n return $array;\n }", "function getCarByMake($make){\r\n\t$q_car_id = getResultSet(\"SELECT car_id FROM tbl_car WHERE manufacturer_id=\".$make);\r\n\twhile($rp=mysql_fetch_array($q_car_id)){\r\n\t\t$car_id=$rp['car_id'];\r\n\t\t$car = new car($car_id);\r\n\t\tif($car->getCarActive()!=0){\r\n\t\t\tif($car->getCarStatusSoldExpire()!=true){\t\t\t\r\n\t\t\techo '<div class=\"item\">';\t\r\n\t\t\t\techo '<div class=\"desc\">';\r\n\t\t\t\t\techo '<div class=\"item_name\">'.$car->getCarModel().'</div>';\r\n\t\t\t\t\techo '<div class=\"shop_name\"><span style=\"padding: 5px 20px 5px 20px; background-image: url('.HTTP_DOMAIN.'images/layout/store.png);background-repeat: no-repeat;background-position: 0px center;\">'.$car->getStoreName().'</span></div>';\r\n\t\t\t\t\techo '<div class=\"price\">'.$car->getCarPrice().'</div>';\r\n\t\t\t\techo '</div>';\r\n\t\t\t\techo '<a href=\"?page=cardetail&car='.$car_id.'\">';\r\n\t\t\t\t\t//echo '<img src=\"'.$car->getCarPictureThumb().'\">';\r\n\t\t\t\t\techo '<div class=\"frame\">';\r\n\t\t\t\t\t\techo '<img src=\"'.$car->getCarPictureThumb().'\" style=\"width: 200px;\" class=\"car_picture\">';\r\n\t\t\t\t\t\techo $car->getCarStatus();\r\n\t\t\t\t\techo '</div>';\r\n\t\r\n\t\t\t\techo '</a>';\r\n\t\t\techo '</div>';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}", "public function read_all_info_id (int $id_classe)\n {\n $this->free_db()\n ->select('Centres.id_centre, Centres.nom_centre, Filieres.id_filiere, Filieres.nom_filiere,\n Niveaux.id_niveau, Niveaux.nom_niveau, Classes.nom_classe, Classes.code_classe,\n Classes.id_classe, Classes.statut_existant')\n ->from(['Classes', 'Centres', 'Niveaux', 'Filieres'])\n ->where('Classes.id_niveau = Niveaux.id_niveau')\n ->where('Classes.id_centre = Centres.id_centre')\n ->where('Classes.id_filiere = Filieres.id_filiere')\n ->where('id_classe = ?')->params([$id_classe])\n ->where('Classes.statut_existant != 0')\n ->order('Classes.nom_classe', 'ASC');\n return $this->first();\n }", "public function retrieve_class_list(){\n\t\n\t\t$this->db->select('*');\n\t\t$this->db->from('class_add');\n\t\t$this->db->where('status !=',2); \n\t\t$this->db->order_by('class_id','desc'); \n\t\t$query = $this->db->get();\n\t\tif ($query->num_rows() > 0) {\n\t\t\treturn $query->result_array();\t\n\t\t}\n\t\treturn false;\n\t}", "public function show($class, $id){\n\n try {\n\n $ids = [];\n\n if (!is_array($id)) {\n array_push($ids, $id);\n } else {\n $ids = $id;\n }\n\n $results =\n $this\n ->where($this->joining()->getMorphType(), '=', $class)\n ->whereIn($this->joining()->getForeignKey(), $ids)\n ->show([], [], [$this->getCreatedAtColumn() => 'DESC']);\n\n\n }catch(InvalidArgumentException $e){\n\n throw $e;\n\n }catch(Exception $e){\n\n throw $e;\n\n }\n\n return $results;\n \n }", "public function fetchAllClass($class)\n {\n return $this->stmt->fetchAll(\\PDO::FETCH_CLASS, $class);\n }", "public function getAllSavedCars() {\r\n\t\r\n\t\t// make a custom field (type_readable) which replaces underscores with spaces\r\n\t\t$select_sql = \"\r\n\t\tSELECT\r\n\t\t\tcar_id,\r\n\t\t\tmac_address,\r\n\t\t\ttype,\r\n\t\t\tREPLACE(type, '_',' ') as type_readable,\r\n\t\t\tdescription,\r\n\t\t\tcreated,\r\n\t\t\tmodified\r\n\t\tFROM cars ORDER BY car_id ASC\";\r\n\r\n\t\t$saved_cars = db::getRows($select_sql);\r\n\t\t\r\n\t\t// make more user-friendly, readable car types by Title casing names\r\n\t\tforeach ($saved_cars as $key => $saved_car) {\r\n\t\t\t\r\n\t\t\t$type_readable = $saved_car['type_readable'];\r\n\t\t\t$type_readable = ucwords($type_readable);\r\n\t\t\t\r\n\t\t\t// save new variable into our results array\r\n\t\t\t$saved_cars[$key]['type_readable'] = $type_readable;\r\n\t\t}\r\n\t\t\t\t\r\n\t\treturn $saved_cars;\r\n\t}", "function getByClass($class)\n\t{\n\t\treturn $this->_get(array(array('args' => $class,\n\t\t\t\t\t 'fn' => function($db, $class) {\n\t\t\t\t\t\t $db->select(\"registry_object_id\")\n\t\t\t\t\t\t\t ->from(\"registry_objects\")\n\t\t\t\t\t\t\t ->where(\"class\", $class);\n\t\t\t\t\t\t return $db;\n\t\t\t\t\t })));\n\t}", "function Units_GetByClass($vClass, $vAllInfo = false)\n{\n\tif ($vAllInfo)\n\t{\n\t\t$vSQL = 'select * from units where name in (select name from units where field=\"className\" and content=\"' . $vClass . '\")';\n\t}\n\telse\n\t{\n\t\t$vSQL = \"select * from units where field in ('name','type','code','buyable','class','iconurl','market','cash','cost','subtype','growTime','coinYield','action','limitedEnd','requiredLevel','crop','sizeX','sizeY','plantXp','masterymax','license','realname','desc') and name in (select name from units where field='className' and content='\" . $vClass . \"')\";\n\t}\n\t$vResult = @$_SESSION['vDataDB']->query($vSQL);\n\twhile ($vRow = @$vResult->fetchArray(SQLITE3_ASSOC))\n\t{\n\t\t$vReturn[$vRow['name']][$vRow['field']] = $vRow['content'];\n\t}\n\treturn($vReturn);\n}", "public static function getdata()\n {\n return Car::all();\n\n }", "public function getCar($id)\n {\n $car = Car::find($id)->with('location')->get();\n return response()->json($car, 200);\n }", "public function searchClassOnly($id = null, $idfrom = null){\n\t\tif($id){\n\t\t\t$field = (is_numeric($id)) ? $idfrom : null;\n\t\t\t$data = $this->_db->getGroupS('rewardskpi', array($field, '=', $id), \"class\");\n\t\t\tif($data->count()){\n\t\t\t\t$this->_data = $data->results();\n\t\t\t\treturn $this->_data;\n\t\t\t}\n\t\t}\n }", "public function retrieve_class_list(){\n\t\n\t\t$this->db->select('*');\n\t\t$this->db->from('class_add');\n\t\t$this->db->where('status',1); \n\t\t$query = $this->db->get();\n\t\tif ($query->num_rows() > 0) {\n\t\t\treturn $query->result_array();\t\n\t\t}\n\t\treturn false;\n\t}", "public function forClass(string $class): array;", "public function get_schedules($class_id)\n {\n $this->load->model('address_model');\n $this->address_model->db->select('schedules.*, schedules.id as schedule_id, addresses.*')\n ->join('schedules', 'addresses.id = schedules.address_id', 'left')\n ->order_by('schedules.date', 'ASC')\n ->where('class_id', $class_id);\n $query = $this->db->get('addresses');\n return $query->result();\n }", "public function getAllStudents() {\r\n\t\r\n\t\t// select all students from students table\r\n\t\t$student_sql = \"\r\n\t\tSELECT\r\n\t\t\ts.*,\r\n\t\t\tc.name as class_name,\r\n\t\t\tc.active as class_active\r\n\t\tFROM students s\r\n\t\tLEFT JOIN classes c ON (c.class_id = s.class_id)\r\n\t\tORDER BY s.student_id ASC\";\r\n\t\t\r\n //dbug($student_sql,'student_sql');\r\n \r\n\t\t$students = db::getRows($student_sql);\r\n\t\t\r\n //dbug($students,'students','black');\r\n \r\n\t\t// get cars assigned to each student\r\n\t\tforeach ($students as $key => $student) {\r\n\t\t\t$students[$key]['cars'] = $this->getStudentCars($student['student_id']);\r\n\t\t}\r\n\t\t\r\n\t\t//dbug($students,'$students','green');\r\n\t\t\r\n\t\treturn $students;\r\n\t}", "public function get_class($class_id)\n {\n $query = \"SELECT classes.class_id, classes.className, majors.majorName, majors.maj_id FROM classes INNER JOIN majors ON classes.maj_id=majors.maj_id WHERE classes.class_id=?\";\n return $this->db->query($query, array($class_id));\n }", "private function getCarCards($data) {\n\n // Получаем sql - данные\n $sqlData = $this->getSqlDataCar($data);\n\n // Создаем sql запрос таблицы машин\n $sqlQueryTableCars = $this->getSqlQueryTableCars($sqlData['select_cars'], $sqlData['type_car']);\n\n // Инициализация sql запроса\n $sqlQuery = \"select * from (${sqlQueryTableCars}) as cars\";\n\n debug($sqlData);\n\n // sql дополнения и sql параметры\n $sqlQueryAdditions = [];\n $sqlQueryParams = [];\n\n // Пробег\n $sqlQueryAdditions[] = \"mileage >= :milfrom and mileage <= :milto\";\n $sqlQueryParams[':milfrom'] = $sqlData['mileage_from'];\n $sqlQueryParams[':milto'] = $sqlData['mileage_to'];\n\n $sqlQueryAdditions[] = 'and create_year >= :cryaerfrom and create_year <= :cryaerto';\n $sqlQueryParams[':cryaerfrom'] = $sqlData['create_year_from'];\n $sqlQueryParams[':cryaerto'] = $sqlData['create_year_to'];\n\n // Цвет\n if($sqlData['color'] !== 'no') {\n $sqlQueryAdditions[] = 'and color = :color';\n $sqlQueryParams[':color'] = $sqlData['color'];\n }\n\n // Дополнение sql запроса\n $sqlQuery .= ' where';\n for($i = 0; $i < count($sqlQueryAdditions); $i++) {\n $add = $sqlQueryAdditions[$i];\n $sqlQuery .= \" ${add}\";\n }\n\n //debug($sqlQuery);\n\n\n $cars = R::getAll($sqlQuery, $sqlQueryParams);\n\n\n debugDBTable($cars);\n return $cars;\n }", "public function getRandomCars() : array\n {\n $this->shuffle();\n return $this->arrayOfCars;\n }", "public static function getMaterialList($classid = '')\n {\n $objClassMaterials = new ClassMaterials();\n if (!empty($classid)) {\n return $objClassMaterials->getMaterialsByClassId($classid);\n } else {\n $classes = Auth::user()->classes()->first();\n if (!empty($classes->class_id)) {\n return $objClassMaterials->getMaterialsByClassId($classes->class_id);\n } else {\n return array();\n }\n }\n }", "public function getMajorClassData($major_class_id) {\r\n\t\t$this->db->from('major_class');\r\n\t\t$this->db->where('mjr_class_id', $major_class_id);\r\n\t\t$query = $this->db->get();\r\n\t\t$data = array();\r\n\t\tif($query->num_rows() > 0) {\r\n\t\t\tforeach($query->result_array() as $row) {\r\n\t\t\t\t$row['major_class_id'] = $row['mjr_class_id']; //add alias 'major_class_id'\r\n\t\t\t\t$row['major_class_name'] = $row['mjr_class_name']; //add alias 'major_class_name'\r\n\t\t\t\t\r\n\t\t\t\t$row['item_count'] = $this->getMajorClassCountItems($row['major_class_id']); //add count of items\r\n\t\t\t\t$data = $row;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $data; //array\r\n\t}", "function findAllOf($class)\n{\n require_once('Base/' . $class . '.php');\n require_once('Base/' . $class . 'Query.php');\n require_once($class . 'Query.php');\n require_once($class . '.php');\n require_once('Map/' . $class . 'TableMap.php');\n\n $queryClass = ($class . 'Query');\n $q = new $queryClass;\n $elements = $q->find()->getData();\n return $elements;\n}", "public function loadUsersByClass($classId) {\n\n $sql = \"SELECT * FROM students WHERE class_id = {$classId}\";\n $stmt = $this->conn->query($sql);\n\n $users = array();\n\n while($dados = $stmt->fetch_array()){\n $user_id = $dados[\"user_id\"];\n $dao = new UserDAO();\n $user = $dao->loadId($user_id);\n\n array_push($users , $user);\n \t}\n return $users;\n }", "function getClassifications(){\n\n $db = phpmotorsConnect();\n\n $sql = 'SELECT classificationName, classificationId FROM carclassification \n ORDER BY classificationName ASC';\n\n $stmt = $db->prepare($sql);\n\n $stmt->execute();\n\n $classifications = $stmt->fetchAll();\n\n $stmt->closeCursor();\n\n return $classifications;\n}", "function fetchUserClasses($user_id)\n\t{\n\t\t$course_list_arr=$this->fecthEnrolledCourseList($user_id);\n\t\t$return_arr=array();\n\t\t$count=0;\n\t\tforeach($course_list_arr as $course_list)\n\t\t{\n\t\t\t$return_arr[$count]['course_name']=$course_list->course_name;\n\t\t\t$return_arr[$count]['course_class_data']=$this->fetchCourseWiseLiveClass($user_id,$course_list->course_id);\n\t\t\t$count++;\n\t\t}\n\t\treturn $return_arr;\n\t}", "function get_virtual_class($id)\n {\n return $this->db->get_where('virtual_classes',array('id'=>$id))->row_array();\n }", "public function cars_list_all()\n {\n // Eloquent reletionship\n return $this->cars\n ->flatten();\n\n }", "public function getByClassName($classe) {\n $qb = $this->createQueryBuilder('prop')\n ->innerJoin(\"CacicCommonBundle:Classe\", \"cl\", \"WITH\", \"prop.idClass = cl.idClass\")\n ->andWhere('cl.nmClassName = :classe')\n ->setParameter('classe', $classe);\n\n return $qb->getQuery()->getResult();\n }", "private function fetchClassObjs(array $classIDs): array\n {\n /** @var DataObject $class */\n $classObjs = [];\n foreach ($classIDs as $class => $ids) {\n $classObjs[$class] = [];\n foreach ($class::get()->filter('ID', $ids) as $obj) {\n $classObjs[$class][$obj->ID] = $obj;\n }\n }\n return $classObjs;\n }", "public function getCarreras($idDivision) {\n $idDivision = intval($idDivision);\n $this->_sql = sprintf(\"select id,nombre_carrera from carreras where active=b'1' and id_division=%s order by nombre_carrera asc;\", $idDivision);\n return $this->sentenciaSQL($this->_sql, 2);\n }", "function get_vehicles($id_vehicle = 0) {\n $this->db->select('id, make, model, year, color, name');\n $this->db->from('gas_vehicles');\n if($id_vehicle > 0) {\n $this->db->where('id', $id_vehicle);\n }\n $this->db->order_by('id', 'desc');\n\n $query = $this->db->get();\n return $query->result_array();\n }", "public static function findAllActiveSkillsByClassId($classId) {\n $sql = 'SELECT * FROM raw_data_skills_a WHERE class_id = :id;';\n $stmt = self::getPDO()->prepare($sql);\n $stmt->execute([':id' => $classId]);\n return $stmt->fetchAll(\\PDO::FETCH_CLASS, '\\Entities\\Skill');\n }", "public static function fetchRow( $id, $class ) {\n\t\t$sql = sprintf(\"\n\t\t\tSELECT *\n\t\t\tFROM %s\n\t\t\tWHERE id = %d\n\t\t\t\", self::dbstr($class, 'table'), $id);\n\t\n\t\t$rset = PSU::db('portal')->GetRow($sql);\n\t\t\n\t\treturn $rset;\n\t}", "public function &fetchObjects($class_name = false, $params = false) {\n $objects = array();\n if (!$class_name) {\n while ($object = @mysqli_fetch_object($this->_rs)) {\n $objects[] = $object;\n }\n } else {\n if (!$params) {\n while ($object = @mysqli_fetch_object($this->_rs,\n $class_name)) {\n $objects[] = $object;\n }\n } else {\n while ($object = @mysqli_fetch_object($this->_rs,\n $class_name, $params)) {\n $objects[] = $object;\n }\n }\n }\n return $objects;\n }", "public static function retrieveAll()\n {\n $url = static::classUrl();\n return static::_request('GET', $url, []);\n }", "function getClassStudents($id){\n $quoted_id = $this->database->quote($id);\n $query = \"SELECT CONCAT_WS(' ', firstname, prefix, lastname) AS name, id\n FROM students\n WHERE class_id = $quoted_id\";\n\n return $this->database->query($query)->fetchAll(PDO::FETCH_ASSOC);\n }", "public function fetchAllObject($class = '', $params = null)\n {\n // init\n $data = array();\n\n if (!$this->is_empty()) {\n $this->reset();\n\n if ($class && $params) {\n /** @noinspection PhpAssignmentInConditionInspection */\n while ($row = \\mysqli_fetch_object($this->_result, $class, $params)) {\n $data[] = $row;\n }\n } elseif ($class) {\n /** @noinspection PhpAssignmentInConditionInspection */\n while ($row = \\mysqli_fetch_object($this->_result, $class)) {\n $data[] = $row;\n }\n } else {\n /** @noinspection PhpAssignmentInConditionInspection */\n while ($row = \\mysqli_fetch_object($this->_result)) {\n $data[] = $this->cast($row);\n }\n }\n }\n\n return $data;\n }", "public function get_classes_dropdown($regatta_id){\n\t\t$query = $this->db->select('id, name')->from('sc_classes')->where('regatta_id', $regatta_id)->get();\n\t\t$classes_list[] = array('value' => 0, 'display' => 'Choose One');\n\t\tif($query->num_rows() > 0){\n\t\t\tforeach($query->result() as $r){\n\t\t\t\t$classes_list[] = array('value' => $r->id, 'display' => $r->name);\n\t\t\t}\n\t\t}\n\t\treturn $classes_list;\n\t}", "public static function getAllCartTaxClasses() {\n\t\t$sql = 'select `tax_class_id` from cart_tax_class';\n\t\t$results = Database::singleton()->query_fetch_all($sql);\n\t\t\n\t\tforeach ($results as &$result) {\n\t\t\t$result = new CartTaxClass($result['tax_class_id']);\n\t\t}\n\t\t\n\t\treturn $results;\n\t}", "public function get_class_list()\n\t{\n\t\t$schl_id = $this->input->post('schl_id');\n\t\t//print_r($schl_id);\n\t\t$result['cls_info'] = $this->sylls->get_class_by_school_id($schl_id);\n\t\techo json_encode($result); \n\t}", "function getCarInfo() {\n $db = getDB();\n $sql = 'SELECT cars_make, cars_miles, cars_id FROM cars ORDER BY cars_miles ASC';\n $stmt = $db->prepare($sql);\n $stmt->execute();\n $cars = $stmt->fetchAll(PDO::FETCH_ASSOC);\n // $stmt->closeCursor();\n\n return $cars;\n}", "public static function getCarmodelsByBrandId($brand_id)\n {\n $models_obj = Carmodel::all();\n $model_array = self::ObjToArray($models_obj);\n\n $ids = [];\n $all = [];\n foreach ($model_array as $item) {\n $id = 'brands-' . $item['id'];\n $item['id'] = $id;\n $all[] = $item;\n\n if ($item['brand_id'] == $brand_id) {\n $ids[] = $id;\n }\n }\n return [\n 'all' => $all,\n 'unchecked_ids' => $ids\n ];\n }", "public function get_classes($event=FALSE,$relational=FALSE)\n\t{\n\t\t// Get the activities\n\t\tif ($event) {\n\t\t\t$this->db->where('event', $event);\n\t\t}\n\t\t$this->db->order_by('Title','ASC');\n\t\t$query = $this->db->get('classes');\n\t\t\n\t\t// Return normal or relational array\n\t\tif ($relational === false) {\n\t\t\treturn (empty($query)) ? array(): $query->result_array();\n\t\t} else {\n\t\t\t$temp = $query->result_array();\n\t\t\t$result = array();\n\t\t\tforeach ($temp as $a) { $result[$a['id']] = $a;}\n\t\t\treturn $result;\n\t\t}\n\t}", "public function getHistory(string $class, int $id): array;", "public function classUsers($class_id)\n\t{\n\t\treturn $this->db\n\t\t\t->select('id')\n\t\t\t->where('class_id', $class_id)\n\t\t\t->get('users')\n\t\t\t->result();\n\t}", "function get_classes_details() {\r\n $link = connect_to_db();\r\n $query = mysqli_query($link, \"SELECT * FROM classes_tbl WHERE form_number != 0 ORDER BY form_number, stream_name\");\r\n $classes_arr = array();\r\n\r\n while($row = mysqli_fetch_array($query)) {\r\n $classes_arr[] = $row;\r\n }\r\n\r\n return $classes_arr;\r\n}", "public function get_member_classes($rosterid)\n\t{\n\t\t// Get our class regs\n\t\t$this->db->where('roster',$rosterid);\n\t\t$query = $this->db->get('classregs');\n\t\t$classregs = $query->result_array();\n\n\t\t// Setup\n\t\t$query = $this->db->get('activities');\n\t\t$activities = array();\n\t\tforeach ($query->result_array() as $i) {\n\t\t\t$activities[$i['id']] = $i;\n\t\t}\n\t\t$query = $this->db->get('classes');\n\t\t$classes = array();\n\t\tforeach($query->result_array() as $i) {\n\t\t\t$i['activity'] = $activities[$i['activity']];\n\t\t\t$i['blocks'] = unserialize($i['blocks']);\n\t\t\t$classes[$i['id']] = $i;\n\t\t}\n\t\t\n\t\t// Get their unit as well\n\t\t$result = array();\n\t\tforeach ($classregs as $reg) {\n\t\t\t$reg['class'] = $classes[$reg['class']];\n\t\t\t$result[$reg['id']] = $reg;\n\t\t}\n\t\t//print_r($result);die;\n\t\treturn $result;\n\t}", "function get_section_ids($class_id)\n {\n \t\t\n \t $sql = \"select SectionId from section where ClassId='$class_id'\";\n\t $res = mysql_query($sql) or die(\"Error in fetching SectionId from section Table\".mysql_error());\n\t $section_ids = array();\n\n\t while($row = mysql_fetch_array($res)){\n\t $section_id = $row[\"SectionId\"];\n\t array_push($section_ids,$section_id);\n\t }\n\t return $section_ids; \t\n }", "public function getCompras($id) {\r\n\t\tinclude \"../conexion.php\";\r\n\t\tinclude_once \"../lib/Libro.php\";\r\n\t\t$compras = array();\t\t\r\n\t\t$sql = \"SELECT * FROM libroVendido Natural join Libreria WHERE idUsuario = \".$id.\";\";\r\n\t\t$query = mysqli_query($con, $sql);\r\n\t\twhile ($row = mysqli_fetch_array($query)){\r\n\t\t\t$book = new LibroVendido();\r\n\t\t\t$book->fill($row);\r\n\t\t\tarray_push($compras,$book);\r\n\t\t}\r\n\t\treturn $compras;\r\n\t\t//Falta\r\n\t}", "public function carHotSelectByCategory($category) {\n header('content-type:text/html;charset=utf-8');\n $Car = D('Car');\n $CarBrand = D('Car_brand');\n $CarStyle = D('Car_style');\n $CarHot = D('Car_hot');\n $newArr = array();\n\n $result = $CarHot -> where(array('category' => $category)) -> select();\n $car_id_arr = explode(' | ', $result[0]['car_id_arr']);\n\n foreach($car_id_arr as $key => $val) {\n $brand_name = $CarBrand -> where(array('id' => $val['brand_id'])) -> select();\n if ($brand_name) {\n $brand_name = $brand_name[0]['name'];\n $newArr[$key]['brand_name'] = $brand_name;\n }\n\n $style_name = $CarStyle -> where(array('id' => $val['style_id'])) -> select();\n if ($style_name) {\n $style_name = $style_name[0]['name'];\n $newArr[$key]['style_name'] = $style_name; \n }\n }\n\n \n // $this -> ajaxReturn($param);\n return $newArr;\n }", "public function get_classes($event=FALSE,$relational=FALSE)\n\t{\n\t\t// Get the activities\n\t\tif ($event) {\n\t\t\t$this->db->where('event', $event);\n\t\t\t$this->db->order_by('title asc');\n\t\t}\n\t\t$query = $this->db->get('classes');\n\t\t\n\t\t// Return normal or relational array\n\t\tif ($relational === false) {\n\t\t\treturn (empty($query)) ? array(): $query->result_array();\n\t\t} else {\n\t\t\t$temp = $query->result_array();\n\t\t\t$result = array();\n\t\t\tforeach ($temp as $a) { $result[$a['id']] = $a;}\n\t\t\treturn $result;\n\t\t}\n\t}", "public function getClassList($quiz_id)\n\t{\n\t\treturn $this->db\n\t\t\t->select('class_id')\n\t\t\t->from('user_quiz')\n\t\t\t->where('quiz_id', $quiz_id)\n\t\t\t->join('users', 'users.id = user_quiz.user_id')\n\t\t\t->group_by('class_id')\n\t\t\t->get()\n\t\t\t->result();\n\t}", "public function query4()\n {\n $this->connect();\n $array = array();\n $result = $this->connection->query(\"SELECT Car, Car_Color, tot_distance\n FROM (\n SELECT\n Car_Id,\n SUM(Travel_Total) AS tot_distance\n FROM\n travel\n GROUP BY Car_Id\n )car_dist LEFT JOIN car ON car.Car_Id = car_dist.Car_Id\");\n\n \n echo \"<table border='2'>\";\n echo \"<tr bgcolor='white'>\";\n echo \n \"<th>\".'Car'.\"</th>\n <th>\".'Car Color' .\"</th>\n <th>\" .'Total Distance '.\"</th>\";\n \n echo\"</tr>\";\n \n while($row=$result->fetchObject('carClass'))\n {\n $array[] = $row;\n \n echo \"<tr bgcolor='white' align='center'>\";\n echo \n \"<td>\".$row->getCar_Name().\"</td>\n <td>\".$row->getCar_Color().\"</td>\n <td>\".$row->getTot_distance().\"</td>\";\n echo \"</tr>\"; \n }\n echo \"</table>\";\n $this->disconnect();\n return $array;\n }", "public function getAllClassPairs() {\n\t\t$classPairs\t\t = [];\n\t\t$data\t\t\t = $this->dao->select('id, classname')->from(TABLE_KEVIN_USER_CLASS)->orderBy('id asc')->fetchAll();\n\t\t$classPairs['']\t = '';\n\t\tforeach ($data as $item) {\n\t\t\t$classPairs[$item->id] = $item->classname . \"(\" . $item->id . \")\";\n\t\t}\n\t\treturn $classPairs;\n\t}", "public static function search_sector_with_coupons() {\n $dbh = Conectar::con();\n $cs = \"SELECT s.id_sector as sector_id, s.nombre as name from sector s inner join empresa e on s.id_sector = e.id_sector inner join\n revision_objeto r on e.id_empresa = r.id_empresa inner join cupon c on r.id_revision_objeto = c.id_revision_objeto inner join sitio t on\n e.id_empresa = t.id_empresa inner join revision_informacion i on t.id_sitio = i.id_sitio where i.status = 'A'\ngroup by s.id_sector;\";\n $result = mysqli_query($dbh, $cs) or die(mysqli_error());\n $sectores = array();\n foreach ($result as $res) {\n $sectores[] = $res;\n }\n return $sectores;\n }", "public function getList($targetClass = '\\stdClass');", "function get_vehicle($id) {\n return $this->db->get_where('vehicle', array('id' => $id))->row_array();\n }", "function listaClasseClassificacao($id_classificacao,$id_classe=\"\"){\n if(!empty($id_classificacao)){\n $sql = \"SELECT * from \".$this->esquemaadmin.\"i3geoestat_classes WHERE id_classificacao = $id_classificacao\";\n }\n if(!empty($id_classe)){\n $sql = \"SELECT * from \".$this->esquemaadmin.\"i3geoestat_classes WHERE id_classe = $id_classe\";\n }\n return $this->execSQL($sql,$id_classe);\n }", "public function getStudentCarsFlat($student_id) {\r\n\t\t\r\n\t\t$cars = $this->getStudentCars($student_id);\r\n\t\t\r\n\t\tdbug($cars,'cars');\r\n\t\texit;\r\n\t}", "public function getCars($value)\n {\n $result = array();\n foreach ($this->model->getCars()['brands'] as $brand => $data) {\n $result = array_merge(\n $result,\n $this->filterModels($brand, $data['models'], $value)\n );\n }\n\n return $result;\n }", "function getCarByBody($body){\r\n\t$q_car_id = getResultSet(\"SELECT car_id FROM tbl_car WHERE body_id=\".$body);\r\n\twhile($rp=mysql_fetch_array($q_car_id)){\r\n\t\t$car_id=$rp['car_id'];\r\n\t\t$car = new car($car_id);\r\n\t\tif($car->getCarActive()!=0){\r\n\t\t\tif($car->getCarStatusSoldExpire()!=true){\t\t\r\n\t\t\techo '<div class=\"item\">';\t\r\n\t\t\t\techo '<div class=\"desc\">';\r\n\t\t\t\t\techo '<div class=\"item_name\">'.$car->getCarModel().'</div>';\r\n\t\t\t\t\techo '<div class=\"shop_name\"><span style=\"padding: 5px 20px 5px 20px; background-image: url('.HTTP_DOMAIN.'images/layout/store.png);background-repeat: no-repeat;background-position: 0px center;\">'.$car->getStoreName().'</span></div>';\r\n\t\t\t\t\techo '<div class=\"price\">'.$car->getCarPrice().'</div>';\r\n\t\t\t\techo '</div>';\r\n\t\t\t\techo '<a href=\"?page=cardetail&car='.$car_id.'\">';\r\n\t\t\t\t\t//echo '<img src=\"'.$car->getCarPictureThumb().'\">';\r\n\t\t\t\t\techo '<div class=\"frame\">';\r\n\t\t\t\t\t\techo '<img src=\"'.$car->getCarPictureThumb().'\" style=\"width: 200px;\" class=\"car_picture\">';\r\n\t\t\t\t\t\techo $car->getCarStatus();\r\n\t\t\t\t\techo '</div>';\r\n\t\t\t\techo '</a>';\r\n\t\t\techo '</div>';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}", "public function getClasses();", "public function getMajorClasses() {\r\n\t\t$this->db->from('major_class');\r\n\t\t$query = $this->db->get();\r\n\t\t$data = array();\r\n\t\tif($query->num_rows() > 0) {\r\n\t\t\tforeach($query->result_array() as $row) {\r\n\t\t\t\t$row['major_class_id'] = $row['mjr_class_id']; //add alias 'major_class_id'\r\n\t\t\t\t$row['major_class_name'] = $row['mjr_class_name']; //add alias 'major_class_name'\r\n\t\t\t\t \r\n\t\t\t\t$row['count'] = $this->getMajorClassCountItems($row['major_class_id']); //add count of items\r\n\t\t\t\t$data[$row['major_class_id']] = $row;\t\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $data; //array\r\n\t}", "public function getUsersForClass($a_class_id) {\r\n\t\treturn $this->ilRoomSharingDatabasePrivileges->getUsersForClass($a_class_id);\r\n\t}", "public function fetchAllObj(string $class = null): array\n {\n if (!$this->wasExecuted()) {\n $this->exec();\n }\n\n if ($class === null) {\n return $this->getAdapter()->getStatement()->fetchAll(PDO::FETCH_OBJ);\n } else {\n $objects = [];\n foreach ($this->fetchAll() as $record) {\n $objects[] = new $class($record);\n }\n\n return $objects;\n }\n }", "public function getSchoolClasses($schoolid)\n {\n $classes = Classes::where('schoolid', '=', $schoolid)->get();\n return $classes;\n }", "function getCarByMakeOther($ids){\r\n\t//$q_make = getResultSet(\"SELECT manufacturer_id FROM tbl_manufacturer WHERE manufacturer_id NOT IN($ids)\");\r\n\t$q_make = getResultSet(\"SELECT manufacturer_id FROM tbl_manufacturer WHERE manufacturer_id NOT IN($ids)\");\r\n\twhile($rm = mysql_fetch_array($q_make)){\r\n\t\t$manufacturer_id = $rm['manufacturer_id'];\r\n\t\t\r\n\t\t$q_car_id = getResultSet(\"SELECT car_id FROM tbl_car WHERE manufacturer_id=\".$manufacturer_id);\r\n\t\twhile($rp=mysql_fetch_array($q_car_id)){\r\n\t\t\t$car_id=$rp['car_id'];\r\n\t\t\t$car = new car($car_id);\r\n\t\t\tif($car->getCarActive()!=0){\r\n\t\t\t\tif($car->getCarStatusSoldExpire()!=true){\t\t\t\r\n\t\t\t\techo '<div class=\"item\">';\t\r\n\t\t\t\t\techo '<div class=\"desc\">';\r\n\t\t\t\t\t\techo '<div class=\"item_name\">'.$car->getCarModel().'</div>';\r\n\t\t\t\t\t\techo '<div class=\"shop_name\"><span style=\"padding: 5px 20px 5px 20px; background-image: url('.HTTP_DOMAIN.'images/layout/store.png);background-repeat: no-repeat;background-position: 0px center;\">'.$car->getStoreName().'</span></div>';\r\n\t\t\t\t\t\techo '<div class=\"price\">'.$car->getCarPrice().'</div>';\r\n\t\t\t\t\techo '</div>';\r\n\t\t\t\t\techo '<a href=\"?page=cardetail&car='.$car_id.'\">';\r\n\t\t\t\t\t\t//echo '<img src=\"'.$car->getCarPictureThumb().'\">';\r\n\t\t\t\t\t\techo '<div class=\"frame\">';\r\n\t\t\t\t\t\t\techo '<img src=\"'.$car->getCarPictureThumb().'\" style=\"width: 200px;\" class=\"car_picture\">';\r\n\t\t\t\t\t\t\techo $car->getCarStatus();\r\n\t\t\t\t\t\techo '</div>';\r\n\t\t\t\t\techo '</a>';\r\n\t\t\t\techo '</div>';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t}\r\n}" ]
[ "0.68008494", "0.6419409", "0.63301414", "0.621449", "0.6184807", "0.61826247", "0.60795414", "0.60663974", "0.60484695", "0.6044739", "0.6024068", "0.6004847", "0.59339374", "0.5913733", "0.5905721", "0.59016114", "0.58903074", "0.587727", "0.58735573", "0.5857351", "0.584532", "0.58309615", "0.5825567", "0.57780147", "0.57762027", "0.57557213", "0.5733738", "0.5730211", "0.5717244", "0.5714851", "0.571138", "0.56945753", "0.5684142", "0.56679267", "0.5667215", "0.56581974", "0.5656582", "0.5650995", "0.56482804", "0.5646519", "0.5635098", "0.56344545", "0.5632917", "0.5609604", "0.55982894", "0.5593453", "0.55928713", "0.5590685", "0.55647033", "0.55543697", "0.55366564", "0.5535231", "0.55340004", "0.5530497", "0.5525484", "0.5516331", "0.55160457", "0.55086315", "0.54911083", "0.5489884", "0.54891694", "0.54805803", "0.54740554", "0.5458469", "0.54513466", "0.54350257", "0.5429804", "0.5421386", "0.5409103", "0.5406753", "0.54037744", "0.5402683", "0.53999376", "0.5399182", "0.5389395", "0.5384372", "0.5383813", "0.5372658", "0.5360191", "0.53523344", "0.53503686", "0.53483516", "0.5337015", "0.5336659", "0.5330758", "0.53275573", "0.5326384", "0.53258485", "0.53036743", "0.52969545", "0.52964646", "0.52899134", "0.5286988", "0.5286808", "0.5282766", "0.52808726", "0.5277767", "0.5273212", "0.52714837", "0.52689654" ]
0.8648281
0
Show the form for creating a new ServiceOption.
Показать форму для создания нового ServiceOption.
public function create() { return view('service_options.create'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create() {\n //\n return view('admin.option.create');\n }", "public function create()\n\t{\n\t\t\n\t\treturn view('option/create');\n\t}", "public function create()\n {\n return view('admin.serviceAdd');\n }", "public function create()\n {\n return view('cpanel.service.create',['title'=>'Add New Service']);\n }", "public function create(): View\n {\n return view('options.create');\n }", "public function create()\n {\n return view('admin::services.create');\n }", "public function create()\n {\n if (!userHasPermission('add-service')) return permissionsException();\n\n $pageConfigs = ['pageHeader' => true];\n $breadcrumbs = [\n ['link' => \"/admin\", 'name' => \"Home\"],\n ['link' => \"/admin/service\", 'name' => \"Services\"],\n ['name' => \"Add New\"],\n ];\n\n return view('admin.service.create', [\n 'pageConfigs' => $pageConfigs,\n 'breadcrumbs' => $breadcrumbs,\n ]);\n }", "public function create()\n {\n\t\treturn view('adoptions.create');\n }", "public function create()\n {\n return view('admin.services.create');\n }", "public function create()\n {\n return view('admin.services.create');\n }", "public function create()\n {\n return view('admin.services.create');\n }", "public function create()\n {\n return view('admin.services.create');\n }", "public function create()\n {\n return view('admin.services.create');\n }", "public function create()\n {\n return view('admin.services.create');\n }", "public function create()\n {\n $filters = OptionFilter::get()->pluck('name','id');\n $types = OptionType::get()->pluck('name','id');;\n $brands = Brand::get()->pluck('name','id');\n return view('admin.option.add',compact('filters','types','brands'));\n }", "public function create()\n {\n return view('admin.services.create');\n\n }", "public function create()\n {\n return view('agenda::agenda.admin.services.create');\n }", "public function create()\n {\n return view('admin.addon_services.create');\n }", "public function create()\n\t{\n\t $service = Service::lists(\"Name\", \"id\")->prepend('Please select', '');\n$field = Field::lists(\"Name\", \"id\")->prepend('Please select', '');\n\n\t \n\t return view('admin.fieldvalue.create', compact(\"service\", \"field\"));\n\t}", "public function create()\n {\n $title = 'Create New Service';\n\n return view('admin.services.create', compact('title'));\n }", "public function store(CreateServiceOptionRequest $request)\n {\n $this->validate($request,[\n 'name'=>'required|unique:service_options,name'\n ]);\n $input = $request->all();\n $input['created_by'] = Auth::user()->mf_id;\n $input['client_id']= Auth::user()->client_id;\n\n $serviceOption = $this->serviceOptionRepository->create($input);\n\n Flash::success('Service Option saved successfully.');\n\n return redirect(route('serviceOptions.index'));\n }", "public function create()\n {\n return view('hospital.operations.services.create');\n }", "public function create()\n {\n //\n $data['method'] = \"post\";\n $data['url'] = url('admin/options');\n return view('admin.options.create', $data);\n }", "public function create()\n {\n $options = SearchOption::all()->toArray();\n return view('search.manage_options.create', compact ('options'));\n }", "public function create(Option $option)\n {\n $parent = $option ?? null;\n\n\n return view('admin.options.create',compact('parent'));\n }", "public function create() \n\t{\n\t\t// Get the validation rules\n\t\t$this->_validation_rules = $this->options_m->get_validation_rules();\n\n\t\t// Check for post data\n\t\t$this->form_validation->set_rules( $this->_validation_rules );\n\t\t\n\t\tif( $this->input->post() )\n\t\t{\n\t\t\t// Get the input data\n\t\t\t$input = $this->input->post();\n\t\t\t\t\t\n\t\t\t// if postback-validate\n\t\t\tif ($this->form_validation->run()) \n\t\t\t{\t\n\t\t\t\t// Create the option record\n\t\t\t\t$this->options_m->create($input);\n\t\t\t\n\t\t\t\t// fire an event to clear options cache \n\t\t\t\tEvents::trigger('evt_options_changed', array() );\n\t\t\t\n\t\t\t\t// Return status message\n\t\t\t\t$this->session->set_flashdata('success', lang('success'));\n\t\t\t\n\t\t\t\t//redirect to main list\n\t\t\t\tredirect($this->uri_options_list);\t\n\t\t\t} \n\t\t\telse \n\t\t\t{\n\t\t\t\t// Return status message\n\t\t\t\t$this->session->set_flashdata('error', lang('error'));\t\n\t\t\t}\n\t\t}\n\n\t\t// init all values or return enetered values\n\t\tforeach ($this->_validation_rules as $key => $value) \n\t\t{\n\t\t\t$this->data->{$value['field']} = '';\n\t\t}\n\t\t\n\t\t// Get the drop down array\n\t\t$this->data->option_types = $this->options_m->build_option_types_dropdown();\n\t\n\t\t// Build page\n\t\t$this->template\n\t\t\t->title($this->module_details['name'])\n\t\t\t->enable_parser(TRUE)\n\t\t\t->enable_minify(TRUE)\n\t\t\t->set_layout(FALSE)\t\t\t\t\t\n\t\t\t->build('admin/options/create', $this->data);\t\t\t\t\n\t}", "public function actionCreate()\n {\n $model = new Service();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->service_id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function create()\n {\n return view('admin.specificservice.create');\n }", "public function create()\n {\n $data['languages'] = Languages::all();\n $data['service_types'] = ServiceType::with('languages')->get();\n return view('admin.service.create', compact('data'));\n }", "public function create()\n {\n return view('purpose_services.new');\n }", "public function actionCreate()\n\t{\n\t\t$model=new ServiceCenter;\n self::getDropDownListDopTitle($model);\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['ServiceCenter']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ServiceCenter'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('index'));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function create()\n\t{\n\t\treturn View::make('service.create');\n\t}", "public function options_form() {}", "public function create()\n {\n return view('admin.component.services.create');\n }", "public function create()\n {\n return view('service.create');\n }", "public function create()\n {\n return view('backend.services.sections.add_service_section');\n }", "public function create()\n {\n return view('backend.services.create');\n }", "public function create()\n {\n return view('service_providers.create');\n }", "public function create()\n {\n $service_types = $this->serviceType->pluck('name','id')->toArray();\n $regions = $this->region->pluck('name','id')->toArray();\n return view('admin.services.add-edit',compact('service_types','regions'));\n }", "public function create()\n {\n return view('services::create');\n }", "public function create(Service $service)\n {\n return view('admin.service_price.create', compact('service'));\n }", "public function create()\n {\n return view('admin.service.create');\n }", "public function create()\n {\n return view('services.create');\n }", "public function create()\n {\n return view('services.create');\n }", "public function create()\n {\n return view('services.create');\n }", "public function create()\n {\n return view('services.create');\n }", "public function create()\n {\n return view('services.create');\n }", "public function create()\n {\n return view('services.create');\n }", "public function create()\n {\n return view('services.create');\n }", "public function create()\n {\n return view('services.create');\n }", "public function create()\n {\n return view('services.create');\n\n }", "public function create()\n {\n return view('dashboard.services.create');\n }", "public function create()\n {\n return view('backend/pages/service/create');\n }", "public function create()\n {\n return view ('admin.serviciosVistas.create');\n }", "public function create()\n\t{\n\t return view('admin.servicios.create');\n\t}", "public function create()\n {\n //\n return view('services.create');\n }", "public function create()\n {\n return view('chairman.createservice');\n }", "public function create()\n {\n return view('admin.banners.services.create');\n }", "public function create()\n {\n return view('services.create_edit');\n }", "public function actionCreate() {\n $model = new MasterOptions;\n\n// Uncomment the following line if AJAX validation is needed\n// $this->performAjaxValidation($model);\n\n if(isset($_POST['MasterOptions'])) {\n $model->attributes = $_POST['MasterOptions'];\n $productOptions = MasterOptions::model()->findByAttributes(array('product_id' => $_POST['MasterOptions']['product_id']));\n if(!empty($productOptions)) {\n $this->redirect(array('OptionDetails', 'id' => $productOptions->id));\n } else {\n\n if($_POST['MasterOptions']['option_type_id'] == \"\") {\n $model->addError('option_type_id', 'Type cannot be blank');\n } else {\n if($model->save()) {\n $this->redirect(array('OptionDetails', 'id' => $model->id));\n }\n }\n }\n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n }", "public function create()\n\t{\n\t\t$servicerequestcomplexities = $this->ServiceRequestComplexity->all();\n\t\t$servicerequesttypes = $this->ServiceRequestType->all();\n\t\treturn View::make('catalogues.create', compact('servicerequestcomplexities','servicerequesttypes'));\n\t}", "public function create()\n {\n $config = $this->getFormData();\n\n $config['serviceTitle'] = trans('app.orders_list');\n $config['route'] = route('app.orders.create');\n\n return view('admin.form', $config);\n }", "public function create()\n {\n return view('services1.create');\n }", "public function create()\n {\n return view('admin.hotel_service.create');\n }", "public function create()\n {\n $products = Product::translatedIn(app()->getLocale())->get();\n $attrubutes = Attribute::translatedIn(app()->getLocale())->get();\n return view('Admin.Options.create', compact('attrubutes', 'products'));\n }", "public function create()\n {\n $subcat = ServiceType::all();\n return view('ServiceItem.create',compact('subcat'));\n }", "function create(){\n return view('admin.service.create');\n }", "public function create()\n {\n $this->authorize('create serviceTypes', ServiceType::class);\n $serviceTypes = ServiceType::all();\n return view('admin.serviceType.create', compact('serviceTypes'));\n }", "public function create()\n {\n return view('admin.servicepage.create');\n }", "public function create()\n {\n \n return view('services.create');\n }", "public function create()\n {\n //\n return view('admin.service.create');\n \n }", "public function create( Service $service )\n {\n $title = \"Contacts Form\";\n return view('services.contacts.create', compact('title', 'service') );\n }", "public function create()\n {\n return View::make('vendors.form')\n ->with('editMode', false);\n }", "public function create()\n {\n //\n return View::make('services.create');\n }", "public function create()\n {\n //\n $data['options'] = PackageOption::all();\n return view('admin.packages.create', $data);\n }", "public function index() {\n $content = $this->lservice->service_add_form();\n $this->template->full_admin_html_view($content);\n }", "public function create(): View\n {\n $options = $this->optionService->pluck();\n\n return view('options_values.create', [\n 'options' => $options\n ]);\n }", "public function create()\n {\n\t\t$params = [\n\t\t\t'optionsmaterial' => (new MaterialRepository())->options(),\n\t\t\t'optionscategory' => (new CategoryRepository())->options(),\n\t\t\t'optionstheme' => (new ThemeRepository())->options(),\n\t\t\t'optionsproduct' => (new ProductRepository())->options(),\n\t\t];\n\n\t\treturn view('admin.pages.offer-promotion-form-create', ['page' => 'promotion'])->with($params);\n\t}", "public function create()\n {\n //\n return \"Provide a form to add a car\";\n }", "public function create()\n {\n $statuses = $this->status->lists();\n $services = $this->service->paginate(20);\n return view('iperformers::admin.services.create',compact('services','statuses'));\n }", "public function newAction()\n {\n $entity = new TipoServicio();\n $form = $this->createCreateForm($entity);\n\n return $this->render(\n 'sisconeeAdministracionBundle:TipoServicio:new.html.twig',\n array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n )\n );\n }", "public function create()\n {\n $data['typeForm'] = \"create\";\n $data['title'] = \"Property Marketplace\";\n return view(\"admin/marketplace/form\",compact('data'));\n }", "public function create()\n {\n /*show create form maybe not nessesary*/\n }", "public function create()\n\t{\n\n\t\treturn Response::view('offer.connection.items_form', array(\n\n\t\t\t\"route\" => \"select.store\",\n\t\t\t\"method\" => \"POST\",\n\t\t\t\"edit\" =>0\n\t\t));\n\t}", "public function create()\n {\n $data['title']= 'Service Type Create';\n $data['create'] = 1;\n $data['serviceType'] = ServiceType::where('org_id',Auth::user()->org_id)->pluck('name','id');\n return view('service.form',$data);\n }", "public function create()\n {\n //abort_if(Gate::denies('blog_access'), Response::HTTP_FORBIDDEN, '403 Forbidden');\n\n return view('services.create');\n }", "public function create()\n {\n return view('admin.tabelas-de-apoio.servicos.edit');\n\n }", "public function create()\n {\n $breadcrumb='webservices.create';\n return view('admin.partials.webservices.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view('pages.admin.service.create');\n }", "public function create()\n {\n return view('backend.service.create');\n }", "public function create() //ok\n {\n $categories = Category::all();\n $groups = Group::all();\n \t$variables = [\n \t\t\"categories\" => $categories,\n \"groups\" => $groups,\n \t];\n\t return view('admin.services.create', $variables);\n\n // $categories = Category::all();\n // $variables = [\n // \"categories\" => $categories,\n // ];\n // return view(\"layouts.formPresentService\");\n }", "public function create()\n {\n return view('admin.catalog.form');\n }", "public function create()\n {\n $categories = Category::printCategory(null, 3);\n return view('service::services.create', compact('categories'));\n }", "public function create()\n {\n return view('services.create', ['categories' => Category::all(), 'servicetypes' => ServiceType::all()]);\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n return view('servicios.create');\n }", "public function create()\n {\n return view('servicios.create');\n }", "public function create()\n {\n return view ('backend.home_service.create');\n }", "protected function form()\n {\n return Admin::form(Service::class, function (Form $form) {\n $form->tab(\"Общие\", function (Form $form) {\n $form->switch(\"visible\")->states([\n 'on' => ['value' => 1],\n 'off' => ['value' => 0],\n ]);\n\n $form->text(\"title\", \"Название\");\n $form->text(\"alias\", \"URL\");\n $form->image(\"image\", \"Изображение\")->move(\"images/services\")->uniqueName();\n $form->ckeditor('description', \"Описание\");\n $form->textarea('small_description', \"краткое описание\");\n $form->text(\"discount\", \"скидка\");\n\n })->tab(\"Услуги\", function (Form $form) {\n $form->hasMany(\"subservices\", \"\", function (Form\\NestedForm $form) {\n $form->text(\"title\", \"название\");\n $form->text(\"price\", \"цена\");\n $form->text(\"documents\", \"документы\");\n });\n })->tab(\"SEO\", function (Form $form) {\n $form->textarea(\"meta_description\", \"Описание для SEO\");\n $form->text(\"meta_keywords\", \"Ключевые слова\");\n $form->text(\"meta_title\", \"Заголовок страницы\");\n });\n });\n }", "public function create()\n {\n return view('supplier.form', [\n 'edit' => false\n ]);\n }" ]
[ "0.71844256", "0.7107957", "0.69858086", "0.68742144", "0.67319375", "0.6641363", "0.6628694", "0.66138184", "0.6581318", "0.6581318", "0.6581318", "0.6581318", "0.6581318", "0.6581318", "0.6569416", "0.65684724", "0.65681034", "0.6564358", "0.65544224", "0.6550652", "0.6549805", "0.6545819", "0.65343684", "0.6524448", "0.6522521", "0.6502489", "0.64905924", "0.6430601", "0.64213896", "0.64147645", "0.6408447", "0.64002174", "0.63866705", "0.63866675", "0.6350331", "0.6345777", "0.6334867", "0.63323736", "0.6332", "0.6329189", "0.6315035", "0.6314018", "0.6309636", "0.6309636", "0.6309636", "0.6309636", "0.6309636", "0.6309636", "0.6309636", "0.6309636", "0.62920487", "0.62825143", "0.62787604", "0.627394", "0.6272443", "0.62481904", "0.6246247", "0.62333333", "0.62298083", "0.6225154", "0.61993545", "0.6197083", "0.6191057", "0.61827505", "0.61621064", "0.61543304", "0.6151004", "0.6143895", "0.6128025", "0.6125556", "0.61245626", "0.6117524", "0.610272", "0.6101096", "0.6073849", "0.60603213", "0.6053989", "0.60397536", "0.6037421", "0.603077", "0.60276943", "0.60206157", "0.60188633", "0.5991448", "0.5983496", "0.5975145", "0.5970509", "0.5969218", "0.5968521", "0.59667444", "0.59615177", "0.59609216", "0.5953864", "0.5950418", "0.5942724", "0.59318846", "0.59318846", "0.5928747", "0.5915945", "0.5907185" ]
0.8008199
0
Store a newly created ServiceOption in storage.
Храните только что созданный ServiceOption в хранилище.
public function store(CreateServiceOptionRequest $request) { $this->validate($request,[ 'name'=>'required|unique:service_options,name' ]); $input = $request->all(); $input['created_by'] = Auth::user()->mf_id; $input['client_id']= Auth::user()->client_id; $serviceOption = $this->serviceOptionRepository->create($input); Flash::success('Service Option saved successfully.'); return redirect(route('serviceOptions.index')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store(VotingOptionDTO $votingOptionDTO): void;", "public function store() {\n\t\tupdate_option( $this->option_name, $this, 'no' );\n\n\t\tdelete_transient($this->option_name);\n\t\tset_transient($this->option_name, $this);\n\t}", "public function store()\n\t{\n\t\t$rules = array(\n\t\t\t'option_key' \t=> \t'required',\n\t\t\t'option_title'\t=>\t'required',\n\t\t\t'option_data'\t=>\t'required',\n\t\t\t);\n\t\t$validator = Validator::make(Input::all(), $rules);\n\n\t\tif ($validator -> fails()) {\n\t\t\treturn Redirect::to('option')\n\t\t\t\t->withErrors($validator)\n\t\t\t\t->withInput(Input::all());\n\t\t}\n\t\telse{\n\t\t\t$option = new Option;\n\t\t\t$option->option_key\t\t= \tInput::get('option_key');\n\t\t\t$option->option_title\t= \tInput::get('option_title');\n\t\t\t$option->option_data \t= \tInput::get('option_data');\n\t\t\t$option->save();\n\n\t\t\tSession::flash('message', _('Successfully added'));\n\t\t\treturn Redirect::to('option');\n\t\t}\n\t}", "public function store(CreateOptionRequest $request)\n {\n\n $input = $request->all();\n\n /** @var Option $option */\n $option = Option::create($input);\n\n Flash::success('Option saved successfully.');\n\n return redirect(route('options.index'));\n }", "public function store(Request $request)\n {\n $input = $request->all();\n\n $option = Option::create($input);\n\n $optionDescription = $option->description()->create($input);\n\n if ($input['optionval']) {\n $option->valueDescriptionDelete($input['optionval']);\n $optionValue = $option->addOptionValueDescription($option->option_id, $input['optionval'] );\n }\n\n $option['value_description'] = $optionValue;\n $option['description'] = $optionDescription;\n\n return $this->sendResponse($option->toArray(), 'Option created successfully.');\n }", "public function store(OptionRequest $request) {\n //\n $this->repository->create($request->all());\n flash()->success('配置创建成功');\n return redirect(route('admin.option.index'));\n }", "public function saveOption()\n\t{\n\n\t $opt = null;\n\t $opt[\"name\"] = $this->apidata[\"name\"];\n\t $opt[\"sort_order\"] = $this->apidata[\"sort_order\"];\n\n\t if ($this->apidata[\"option_id\"]) \n\t {\n\t \t$opt[\"where\"] = \"id='\".$this->apidata[\"option_id\"].\"'\";\n\t \t$this->DB->update(\"docmgr.keyword_option\",$opt);\n\t \t$optionId = $this->apidata[\"option_id\"];\n\t\t}\n\t\telse\n\t\t{\n\t\t if (!$opt[\"sort_order\"])\n\t\t {\n\t\t $sql = \"SELECT max(sort_order) AS max FROM docmgr.keyword_option WHERE keyword_id='\".$this->apidata[\"keyword_id\"].\"'\";\n\t\t $info = $this->DB->single($sql);\n\n\t\t $opt[\"sort_order\"] = $info[\"max\"] + 1;\n }\n \n\t\t $opt[\"keyword_id\"] = $this->apidata[\"keyword_id\"];\n\t\t $optionId = $this->DB->insert(\"docmgr.keyword_option\",$opt,\"id\");\n\t\t}\n\n\t\t$this->PROTO->add(\"option_id\",$optionId);\n\t\n\t}", "public function store(StoreQuestionsOptionsRequest $request)\n {\n // QuestionsOption::create($request->all());\n\n // return redirect()->route('questions_options.index');\n }", "public function save() {\n\t\tupdate_option( self::SAVE_KEY, $this->toArray(), false );\n\t}", "public function store(OptionsRequest $request): RedirectResponse\n {\n $this->optionService->createNewOption($request->getName());\n\n return redirect()->route('admin.options.index');\n }", "public function store(Request $request) {\n\n\t\t // FIXME - add val & auth\n\n\t\t// dd($request);\n\n\t\t $product_option = new ProductOption();\n\n\t\t $product_option->product_id = $request->get('product');\n\t\t $product_option->slug = $request->get('slug');\n\t\t $product_option->name = $request->get('name');\n\t\t $product_option->description = $request->get('description');\n\t\t $product_option->display_order = $request->get('display_order') || 1;\n\t\t $product_option->active = $request->get('active') || 0;\n\n\t\t $product_option->save();\n\n\t\t return redirect()->route('product_options.index', $request->get('product'))->with('success', 'Product Option Saved');\n\n }", "public function store()\n\t{\n\t\ttry {\n\t\t\t$input = Request::all();\n \t\t\t$validator = Validator::make($input, AppointmentResultOption::getRules());\n \t\tif( $validator->fails() ) {\n \t\t\treturn ApiResponse::validation($validator);\n \t\t}\n \t\t\t$resOption = $this->service->saveOrUpdate($input['name'], $input['fields']);\n\t\t} catch (\\Exception $e) {\n \t\t\treturn ApiResponse::errorInternal(trans('response.error.internal'),$e);\n\t\t}\n \t\treturn ApiResponse::success([\n\t\t\t'message' => trans('response.success.saved',['attribute' => 'Result option']),\n\t\t\t'data' => $this->response->item($resOption, new AppointmentResultOptionsTransformer),\n\t\t]);\n\t}", "public function store(OptionsRequest $request)\n {\n try{\n // validation\n DB::beginTransaction();\n // check product id and attribute id \n $product = Product::findOrFail($request->product_id);\n $attribute = Attribute::findOrFail($request->attribute_id);\n // start create option\n $option = Option::create($request->only(['product_id', 'attribute_id']));\n // save translation \n $option->name = $request->name;\n $option->save();\n DB::commit();\n flash()->success(\"Successed\");\n return back();\n }catch(\\Exception $ex){\n DB::rollback();\n // flash()->error(\"There Is Somrthing Wrong , Please Contact Technical Support\");\n return $ex;\n }\n }", "public function store(OptionCreateRequest $request)\n {\n $option = Option::create([\n 'name' => $request->get('name'),\n 'type_id' => $request->get('type_id'),\n 'filter_id' => $request->get('filter_id')\n ]);\n foreach($request->get('brand_ids') as $itemId)\n OptionBrand::create([\n 'option_id' => $option->id,\n 'brand_id' => $itemId\n ]);\n return redirect()->route('options.edit',$option)->appends([])->with('status','Новое оборудование записано');\n }", "public function store(OptionRequest $request)\n {\n try {\n\n DB::beginTransaction();\n\n\n // return $request->except('_token');\n $Option = Option::create($request->except('_token'));\n\n //save translations\n // $Option->name = $request->name;\n // $Option->save();\n\n // return $Option;\n DB::commit();\n return redirect()->route('Options.index')->with(['success' => 'تم ألاضافة بنجاح']);\n } catch (\\Exception $ex) {\n DB::rollback();\n return redirect()->route('Options.index')->with(['error' => 'حدث خطا ما برجاء المحاوله لاحقا']);\n }\n }", "public function save() {\n\t\t$this->get_options();\n\t\t$this->update_all();\n\t}", "public function option_store(Request $request)\n {\n //\n $data = $request->except('_token', '_method');\n \n $product = new Product;\n $thisproduct = $product->where('id', $data['product_id'])->first();\n $optionValues = $data['selected_option_values'];\n foreach($optionValues as $value){\n \n $thisproduct->option()->attach($value);\n \n }\n $productoption = Product::orderBy('created_at', 'desc')->get();\n\n return response()->json($productoption);\n }", "public function save(){\n $db = Db::instance();\n\n $db_properties = array(\n 'pollOptionId' => $this->pollOptionId,\n 'userId' => $this->userId\n );\n\n $db->store($this, __CLASS__, self::DB_TABLE, $db_properties);\n }", "public static function save() {\n\t\tThemexCore::updateOption(self::$id,self::$data);\n\t}", "public function store(Items $item,Request $request)\n {\n\n $option = Options::create([\n 'name'=>$request->name,\n 'options'=>$request->options,\n 'item_id'=>$item->id\n ]);\n $option->save();\n return redirect()->route('items.options.index',['item'=>$item->id])->withStatus(__('Option has been added'));\n\n }", "public function store(Request $request)\n {\n //\n $option = Option::create([\n 'question_id' => $request->question_id,\n 'name' => $request->name,\n 'sequence' => $request->sequence,\n 'isCorrect' => $request->isCorrect,\n 'explaination' => $request->explaination,\n 'image'=>$request->image,\n ]);\n\n return response()->json([\n 'status' => (bool) $option,\n 'data' => $option,\n 'message' => $option ? 'Option Created!' : 'Error Creating Option'\n ]);\n }", "public function save(Option $option)\n {\n if (isset($option->id)) {\n return $this->update($option);\n }\n\n $stmt = $this->db->prepare('\n INSERT INTO options \n (question_id, uuid, label, is_correct_answer, deleted_at, sequence) \n VALUES \n (:question_id, :uuid, :label, :is_correct_answer, :deleted_at, :sequence)\n ');\n $stmt->bindParam(':question_id', $option->question_id);\n $stmt->bindParam(':uuid', $option->uuid);\n $stmt->bindParam(':label', $option->label);\n $stmt->bindParam(':is_correct_answer', $option->is_correct_answer);\n $stmt->bindParam(':deleted_at', $option->deleted_at);\n $stmt->bindParam(':sequence', $option->sequence);\n $stmt->execute();\n $id = $this->db->lastInsertId();\n return $this->find($id);\n }", "public function save(Service $service);", "public function store(OptionValuesRequest $request): RedirectResponse\n {\n $this->optionValueService->createNewOption($request->getValue(), $request->getSelectedOption());\n\n return redirect()->route('admin.options_values.index');\n }", "public function save($options = null);", "public function persistAttributeOption(array $attributeOption, $name = null);", "public function store(Request $request,HmsOperationService $service)\n {\n $request->validate([\n 'name' => 'required|unique:hms_operation_services|max:200',\n 'price' => 'required|numeric|min:1',\n ]);\n\n $type = Pharma::getUniqueSlug( $service,$request->name);\n $data = [\n 'name' => $request->name,\n 'price' => $request->price,\n 'slug' => $type,\n 'operation_type_id' => $request->operation_type_id ,\n 'user_id' => Sentinel::getUser()->id,\n 'created_at' => now(),\n ];\n\n HmsOperationService::create($data);\n\n Session::flash('success', 'Operation Type Added Succeed!');\n Pharma::activities(\"Added\", \"Operation\", \"Added a New Type\");\n return redirect('hospital/operation/service');\n }", "public function ajouterOption($uneOption){\n $this->options[] = $uneOption;\n }", "protected function _store_to_options ($options)\n {\n $options->assignee_group_type = $this->value_for ('assignee_group_type');\n $options->assignee_group_id = $this->value_for ('assignee_group_id');\n $options->reporter_group_type = $this->value_for ('reporter_group_type');\n $options->reporter_group_id = $this->value_for ('reporter_group_id');\n $options->seconds_until_deadline = $this->value_for ('seconds_until_deadline');\n }", "public function save() {\n foreach ( $this->changed as $key ) {\n update_option( $this->prefix . $key, $this->data[ $key ], false );\n }\n }", "public function addOption($option);", "public function store($path = '', $options = [])\n {\n return $this->storeAs($path, $this->hashName(), $this->parseOptions($options));\n }", "public function save(array $options = [])\n {\n }", "public function save(array $options = array());", "public function save()\n {\n $data = serialize($this->toArray());\n\n $this->store->put($this->id, $data);\n }", "public function save(Service $service): void;", "public function store()\n {\n $this->validate($this->rules());\n\n $attribute = Attribute::query()->create([\n 'name' => $this->name,\n 'slug' => str_slug($this->slug, '-'),\n 'type' => $this->type,\n 'description' => $this->description,\n 'is_enabled' => $this->isEnabled,\n 'is_searchable' => $this->isSearchable,\n 'is_filterable' => $this->isFilterable,\n ]);\n\n session()->flash('success', __('Attribute successfully added'));\n $this->redirectRoute('shopper.settings.attributes.edit', $attribute);\n }", "public function setOptions($options = '')\n\t{\n\t\t$data = $options;\n\t\tif (gettype($options) === 'string') {\n\t\t\ttry {\n\t\t\t\t$data = json_decode($options, true);\n\t\t\t}\n\t\t\tcatch (\\Exception $e) {\n\t\t\t\tlogger($e->getMessage());\n\t\t\t\tthrow new Exception($e->getMessage(), 1);\n\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t/** Remove all options before insert\n\t\t */\n\t\ttry {\n\t\t\t$collection = ProductOption::where('product_id', $this->id)->get();\n\t\t\tforeach ($collection as $item) {\n\t\t\t\t$item->delete();\n\t\t\t}\n\t\t}\n\t\tcatch (\\Exception $e) {\n\t\t\tlogger($e->getMessage());\n\t\t\tthrow new Exception($e->getMessage(), 1);\n\t\t\t\t\n\t\t\treturn false;\n\t\t}\n\n\t\tforeach ($data as $field) {\n\t\t\t$model = new ProductOption;\n\n\t\t\t$model->product_id = $this->id;\n\t\t\t$model->type_id = $field['type_id'];\n\t\t\t$model->name = $field['name'];\n\t\t\t$model->value = trim($field['value']);\n\n\t\t\ttry {\n\t\t\t\t$model->save();\n\t\t\t}\n\t\t\tcatch (\\Exception $e) {\n\t\t\t\tlogger($e->getMessage());\n\t\t\t\tthrow new \\Exception($e->getMessage(), 1);\n\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public function store(StoreServiceTypeRequest $request)\n {\n $credentials = $request->validated();\n\n if ($request->hasFile('image')) {\n $credentials['image'] = $request->file('image')->store('public/service/image');\n }\n\n if ($request->hasFile('marker')) {\n $credentials['marker'] = $request->file('marker')->store('public/service/marker');\n }\n\n ServiceType::create($credentials);\n\n return redirect()\n ->route('admin.serviceType.index')\n ->withSuccess(__('crud.general.created'));\n }", "public function store(Request $request)\n {\n $option = $this->validate(request(), [\n 'name' => 'required',\n 'root_path' => 'required'\n ]);\n\n SearchOption::create($option);\n\n return back()->with('success', 'Option \"'.$option['name'].'\" has been added');\n }", "public function store(Request $request)\n\t{\n\t\ttry\n\t\t{\n\t\t\t$this->validate($request, [\n\t\t\t \t'option_description' => 'required',\n\t\t\t \t'name' => 'required'\n\t\t ]);\n\t\t\t$option=new ParseObject(\"Option\");\n\t\t\t$option->set(\"option_description\",$request->get('option_description'));\n\t\t\t$option->set(\"name\",$request->get('name'));\n\t\t\t$option->save();\n\t\t}\n\t\tcatch(ParseException $ex)\n\t\t{\n\n\t \t}\n\t \treturn back();\n\t}", "public function storeAList(array $votingOptions): void;", "public function store()\n\t{\n\t\t$this->smv->create(Input::all());\n\t}", "public function createOptionSet() {\n\t\t$wombat_obj = (object) $this->data['wombat'];\n\t\t$client = $this->client;\n\t\t$request_data = $this->request_data;\n\n\t\t$options = $wombat_obj->options;\n\t\t$variants = $wombat_obj->variants;\n\t\t$bigcommerce_options = $this->getOptions();\n\n\t\t//we need a name for the option set: set it to the combined names of the options\n\t\t$option_set_name = implode('_', $options);\n\n\t\t//create the option set & get its ID so we can add options to it\n\t\t\n\t\t$new_option_set = (object) array(\n\t\t\t'name' => $option_set_name,\n\t\t\t);\n\t\t$client_options = array(\n\t\t\t'body'=> json_encode($new_option_set),\n\t\t\t);\n\t\t\n\t\ttry {\n\t\t\t$response = $client->post('option_sets',$client_options);\n\t\t} catch (\\Exception $e) {\n\t\t\t$this->doException($e,'creating option set');\n\t\t}\n\t\t$option_set = $response->json(array('object'=>TRUE));\n\n\t\t// add this set to our cached option sets\n\t\tif(!empty($this->option_sets)) {\n\t\t\t$this->option_sets[] = $option_set;\n\t\t}\n\n\t\t\n\t\tforeach ($options as $option) {\n\t\t\t\n\t\t\t$option_name = strtoupper($option);\n\t\t\t$bc_option_id = false; //if we don't find a match in the existing options, we'll create one\n\t\t\t\n\t\t\tforeach($bigcommerce_options as $bc_option) {\n\t\t\t\t\n\t\t\t\t$bc_name = strtoupper($bc_option->name);\n\t\t\t\tif($option_name == $bc_name) {\n\t\t\t\t\t$bc_option_id = $bc_option->id;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(!$bc_option_id) {\n\t\t\t\t$bc_option_id = $this->createOption($option)->id;\n\t\t\t}\n\n\t\t\t$new_option_set_option = (object) array(\n\t\t\t\t'option_id' => $bc_option_id,\n\t\t\t\t);\n\t\t\t$client_options = array(\n\t\t\t\t'body'=> json_encode($new_option_set_option),\n\t\t\t);\n\t\t\ttry {\n\t\t\t\t$response = $client->post('option_sets/'.$option_set->id.'/options',$client_options);\n\t\t\t} catch (\\Exception $e) {\n\t\t\t\t$this->doException($e,\"assigning option $option\");\n\t\t\t}\n\t\t}\n\n\t\treturn $option_set->id;\n\t}", "public function store() {\n /* default to store data for 5 minutes */\n $storeTime = $this->modx->getOption('storeTime',$this->config,300);\n /* create the hash to store */\n $cacheKey = $this->formit->getStoreKey();\n $data = $this->toArray();\n $this->modx->cacheManager->set($cacheKey,$data,$storeTime);\n unset($data);\n }", "public function setOption(Option $option);", "public function saveConfigOptions() {}", "public function create()\n {\n return view('service_options.create');\n }", "public function store(StoreService $request)\n {\n abort_if(!$this->user->roles()->withoutGlobalScopes()->first()->hasPermission('create_business_service'), 403);\n\n $service = new BusinessService();\n $service->name = $request->name;\n $service->description = $request->description;\n $service->price = $request->price;\n $service->time = $request->time;\n $service->time_type = $request->time_type;\n $service->discount = $request->discount;\n $service->discount_type = $request->discount_type;\n $service->location_id = $request->location_id;\n $service->category_id = $request->category_id;\n $service->slug = $request->slug;\n if ($request->hasFile('image')) {\n $service->image = Files::upload($request->image,'service');\n }\n $service->save();\n\n return Reply::redirect(route('admin.business-services.index'), __('messages.createdSuccessfully'));\n\n }", "public function store()\r\n\t\t{\r\n\t\t\t//\r\n\t\t}", "public function store()\n {\n /**\n * @method String store() Description\n * \n * O metodo store(), chamaremos o objeto service,\n * pois quando criamos um cliente, atribuimos regras\n * de negocio a ele, e essas regras são definidas nos \n * services. E como foi criado no nosso ClientService\n * o metodo de create, atribuiremos aqui.\n * \n */\n return $this->service->create($this->request->all());\n }", "public function store( $options=array() )\r\n {\r\n if (empty($this->site_id))\r\n {\r\n $this->site_id = \\Base::instance()->get('APP_NAME');\r\n }\r\n \r\n $this->session_id = session_id();\r\n $this->timestamp = time();\r\n \r\n if (empty($this->_id)) \r\n {\r\n $sessionData = static::collection()->findOne(array(\r\n 'session_id' => $this->session_id,\r\n 'site_id' => $this->site_id\r\n ));\r\n \r\n if (isset($sessionData['_id']))\r\n {\r\n $this->_id = $sessionData['_id'];\r\n }\r\n else \r\n {\r\n $this->_id = new \\MongoId;\r\n }\r\n }\r\n \r\n $identity = \\Dsc\\System::instance()->auth->getIdentity();\r\n if (!empty($identity->id)) \r\n {\r\n $this->user_id = $identity->id;\r\n $this->identity = $identity->email(true); \r\n }\r\n \r\n $fw = \\Base::instance();\r\n $headers = $fw->get('HEADERS');\r\n \r\n $this->path = $fw->hive()['PATH'];\r\n \r\n $this->ip = $fw->get('IP');\r\n $this->agent = isset($headers['User-Agent']) ? $headers['User-Agent'] : null;\r\n \r\n $this->__options = $options + array(\r\n 'upsert'=>true,\r\n 'multiple'=>false,\r\n 'w'=>0\r\n );\r\n \r\n $this->__last_operation = $this->collection()->update(\r\n array(\r\n 'session_id' => $this->session_id,\r\n 'site_id' => $this->site_id\r\n ),\r\n $this->cast(),\r\n $this->__options\r\n );\r\n \r\n return $this;\r\n }", "public function store(string $type, string $id, array $data) : StorageInterface;", "protected function saveOptions( array $options )\n {\n\n if ( !empty( $options ) ) {\n foreach ( $options as $key => $option ) {\n switch ( $key ) {\n case 'refreshRate':\n if ( is_numeric( $option ) ) {\n $this->options[$key] = (int)$option;\n }\n break;\n\n default:\n $this->options[$key] = $option;\n break;\n }\n }\n }\n\n // save options\n update_option( $this->adminOptionsName, $this->options );\n }", "public function store(StoreRequest $request)\n {\n $service = new Service();\n $service->fill($request->input('service'));\n $service_type = ServiceType::query()\n ->find($request->input('service.service_type_id'));\n $service->price = $service_type->price;\n $service->save();\n\n return redirect()\n ->route(\"back_panel.services.index\", $service)\n ->with(\"success\", \"Payment service for \".$service->customer->user->name.\" created successfully\");\n }", "public function store(Request $request,feature_attr_option $attr_option)\n {\n $request->validate([\n 'name'=>[\n 'required',\n ]\n ]);\n $save =new $attr_option;\n $save->name =$request->name;\n $save->parent =$request->parent;\n $save->save();\n return $save;\n }", "protected function _saveOption(Mage_Core_Model_Abstract $object)\n {\n $option = $object->getOption();\n if (is_array($option)) {\n $adapter = $this->_getWriteAdapter();\n $optionTable = $this->getTable('eav/attribute_option');\n $optionValueTable = $this->getTable('eav/attribute_option_value');\n\n $stores = Mage::app()->getStores(true);\n if (isset($option['value'])) {\n $attributeDefaultValue = array();\n if (!is_array($object->getDefault())) {\n $object->setDefault(array());\n }\n\n foreach ($option['value'] as $optionId => $values) {\n $intOptionId = (int) $optionId;\n if (!empty($option['delete'][$optionId])) {\n if ($intOptionId) {\n $adapter->delete($optionTable, array('option_id = ?' => $intOptionId));\n }\n continue;\n }\n\n $sortOrder = !empty($option['order'][$optionId]) ? $option['order'][$optionId] : 0;\n $image = !empty($option['image'][$optionId]) ? $option['image'][$optionId] : null;\n $thumb = !empty($option['thumb'][$optionId]) ? $option['thumb'][$optionId] : null;\n if (!$intOptionId) {\n $data = array(\n 'attribute_id' => $object->getId(),\n 'sort_order' => $sortOrder,\n 'image' => $image,\n 'thumb' => $thumb\n );\n $adapter->insert($optionTable, $data);\n $intOptionId = $adapter->lastInsertId($optionTable);\n } else {\n $data = array(\n 'sort_order' => $sortOrder,\n 'image' => $image,\n 'thumb' => $thumb\n );\n $where = array('option_id =?' => $intOptionId);\n $adapter->update($optionTable, $data, $where);\n }\n\n if (in_array($optionId, $object->getDefault())) {\n if ($object->getFrontendInput() == 'multiselect') {\n $attributeDefaultValue[] = $intOptionId;\n } elseif ($object->getFrontendInput() == 'select') {\n $attributeDefaultValue = array($intOptionId);\n }\n }\n\n // Default value\n if (!isset($values[0])) {\n Mage::throwException(Mage::helper('eav')->__('Default option value is not defined'));\n }\n\n $adapter->delete($optionValueTable, array('option_id =?' => $intOptionId));\n foreach ($stores as $store) {\n if (isset($values[$store->getId()])\n && (!empty($values[$store->getId()])\n || $values[$store->getId()] == \"0\")\n ) {\n $data = array(\n 'option_id' => $intOptionId,\n 'store_id' => $store->getId(),\n 'value' => $values[$store->getId()],\n );\n $adapter->insert($optionValueTable, $data);\n }\n }\n }\n $bind = array('default_value' => implode(',', $attributeDefaultValue));\n $where = array('attribute_id =?' => $object->getId());\n $adapter->update($this->getMainTable(), $bind, $where);\n }\n }\n\n return $this;\n }", "function addOption($inputedOption){\n array_push($this->optionsArray,$inputedOption);\n }", "public function store(StoreServicesRequest $request)\n {\n\n $service = Service::create($request->all());\n\n session()->flash('success', 'Nuevo servicio creado');\n return redirect()->route('agenda.services.index');\n }", "public function storeAs($path, $name, $options = [])\n {\n if ($this->isModified()) {\n $this->save();\n }\n\n return parent::storeAs($path, $name, $options);\n }", "public function save()\n {\n if ($this->id !== null) {\n $this->storage->set($this->id, $this->data, $this->ttl);\n $this->sendCookie();\n }\n }", "public function store(AddOptionCategoryRequest $request)\n {\n try\n {\n DB::transaction(function() use($request) {\n $params = $request->all();\n $lastOptionCat = OptionCategory::orderBy('sort_id', 'desc')->first();\n $params['sort_id'] = $lastOptionCat ? $lastOptionCat->sort_id + 1 : 1;\n\n $item = OptionCategory::create($params);\n if ($item->id) {\n /*\n if (!isset($params['allowable_models_id']))\n $params['allowable_models_id'] = [];\n $item->allowable_models()->sync($params['allowable_models_id']);*/\n }\n });\n return response()->json(['Option category successfully created.']);\n } catch (Exception $e)\n {\n Log::error($e);\n return response()->json(['Something went wrong.'], 422);\n }\n }", "public function store(Request $request)\n {\n //\n $package = new option();\n $package->o_name = $request['o_name'];\n $package->o_product = $request['o_product'];\n $package->save();\n\n return redirect(url('admin/options/'))->with('add_success','คุณทำการเพิ่มอสังหา สำเร็จ');\n }", "public function set(SectionStorageInterface $section_storage);", "public function store(ServiceRequest $request,Service $service)\n {\n $service->create($request->all());\n Cache::flush();\n flash()->success(trans('admin.service_item_added'));\n return redirect(action('Admin\\ServicesController@index'));\n }", "function addOption($option){\r\n\t\tarray_push($this->arrayOption, $option);\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()\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()\r\n\t{\r\n\t\t//\r\n\t}", "public function createObjectStorage($options)\n {\n $ba['cluster_id'] = $this->d_cluster_id;\n $ba['label'] = $this->d_label;\n\n if (isset($options['cluster_id'])) {\n if (in_array($options['cluster_id'], $this->ids)) {\n $ba['cluster_id'] = $options['cluster_id'];\n } else {\n throw new InvalidParameterException(\"Bad Cluster ID\");\n }\n } elseif (isset($options['region'])) {\n if (in_array($options['region'], $this->regions)) {\n $ba['cluster_id'] = $this->region_map[$options['region']];\n } else {\n throw new InvalidParameterException(\"Bad Region\");\n }\n }\n\n (isset($options['label'])) ? $ba['label'] = $options['label'] : null;\n $body = json_encode($ba);\n return $this->api->makeAPICall('POST', $this->api::OBJECT_STORAGE_URL, $body);\n }", "public function store(ServiceStoreRequest $request)\n {\n $this->service->make($request->validated());\n \n return redirect()->route('services.index')\n ->withMessage('New service successfully inserted');\n }", "public function store(ServiceRequest $request)\n {\n Service::create([\n 'title' => $request->title,\n 'description' => $request->description,\n 'category_id' => $request->category_id,\n 'servicetype_id' => $request->servicetype_id,\n 'image' => $request->image->store('servicesimages', 'public'),\n 'content' => $request->content,\n 'price' => $request->price,\n 'real_price' => $request->real_price\n ]);\n return redirect()->route('services.index');\n }", "public function store()\n {\n return $this->okResponse(\n new $this->resource(\n $this->service->store()\n )\n );\n }", "protected function persistProductBundleOption($productBundleOption)\n {\n return $this->getProductBundleProcessor()->persistProductBundleOption($productBundleOption);\n }", "public function save() {\r\n\t\t// TODO Change this to json_encode()\r\n\t\tfile_put_contents(self::PERSISTENCE_FILE_NAME, serialize(array(\r\n\t\t\t$this->m_aConfiguration,\r\n\t\t\t$this->m_aDirectiveFilter\r\n\t\t)));\r\n\t}", "public function store(Request $request, $id, Service $service)\n {\n $request->validate([\n 'server_id' => 'required',\n 'service_type' => 'required',\n 'service_name' => 'required'\n ]);\n\n $service = Service::firstOrNew($request->all());\n $service->save();\n return response()->json(['success' => 'Request Port and and command successfully Added']);\n\n }", "public function save_settings() {\n\t\twoocommerce_update_options( $this->get_settings() );\n\t}", "public function save()\n {\n if($this->saved()) $this->client->put($this->router->path($this->_id), $this->attributes);\n else {\n // create the resource\n $response = $this->client->post($this->router->path(), $this->attributes);\n $this->_id = $response['id'];\n $this->exists = true;\n }\n }", "public function store() {\n\t\t//\n\t}", "public function store() {\n\t\t//\n\t}", "public function store() {\n\t\t//\n\t}", "public function store(ServicePriceRequest $request)\n {\n $price = ServicePrice::create($request->all());\n\n return redirect()->route('admin.services.service_prices.show',\n ['service' => $request->get('service_id'), 'service_price' => $price]);\n }", "public function save(array $options = []) {\n // FIX: updated at does not works with timestampz\n if ($this->exists) {\n $this->updated_at = Date::W3c(Carbon::now());\n }\n return parent::save($options);\n }", "public function store() {\n \n }", "public function saveToOptions()\n\t{\n\t\t$this->_getInformation();\n\t\t$arFiles = array();\n\t\tforeach($this->files as $arFile)\n\t\t{\n\t\t\t$arFiles[$arFile[\"FILE_NAME\"]] = $arFile[\"FILE_SIZE\"];\n\t\t}\n\t\tksort($arFiles);\n\t\tCBitrixCloudOption::getOption(\"backup_files\")->setArrayValue($arFiles);\n\t\tCBitrixCloudOption::getOption(\"backup_quota\")->setStringValue((string)$this->quota);\n\t\tCBitrixCloudOption::getOption(\"backup_total_size\")->setStringValue((string)$this->total_size);\n\t\tCBitrixCloudOption::getOption(\"backup_last_backup_time\")->setStringValue((string)$this->last_backup_time);\n\t\treturn $this;\n\t}", "public function store(Request $request)\n {\n $option = new AdditionalOption();\n\n $option->name = request('name');\n $option->price = request('price');\n $option->parent_id = request('parent_id');\n $option->save();\n return back();\n }", "function SaveOptions() {\n\t\treturn update_option(\"sm_options\",$this->_options);\n\t}", "public function testOptionCreateException($optionId, $option)\n {\n $client = static::getInsalesApiClient();\n $client->optionCreate($option);\n }", "public function store(StoreShopSectionRequest $request)\n {\n ShopSection::create($request->all());\n\n return redirect()->route('shop_sections.index')->with('success', 'Раздел добавлен');\n }", "public function add_working_storage($opt = null)\n\t{\n\t\tif (!$opt) $opt = array();\n\t\t\n\t\t// List (non-map)\n\t\tif (isset($opt['DiskIds']))\n\t\t{\n\t\t\t$opt['DiskIds'] = (is_array($opt['DiskIds']) ? $opt['DiskIds'] : array($opt['DiskIds']));\n\t\t}\n\n\t\treturn $this->authenticate('AddWorkingStorage', $opt);\n\t}", "public function store(StoreRequest $request)\n {\n $this->pricingService->createOrUpdate(\n [\n 'price' => $request->get('price'),\n 'status' => $request->get('status')\n ],\n [\n 'country' => $request->get('country'),\n 'priceable_type' => $this->resolveModel($request->get('type')),\n 'priceable_id' => $request->get('id')\n ]\n );\n return response()->json(['message' => 'Pricing has been saved']);\n }", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.65640587", "0.6527178", "0.65137637", "0.618648", "0.60476243", "0.60407233", "0.5989788", "0.59241325", "0.5872527", "0.5856663", "0.58308136", "0.58208853", "0.57881284", "0.5774969", "0.57273364", "0.5671761", "0.5608587", "0.5543012", "0.5533302", "0.55260384", "0.5520954", "0.5513546", "0.55085653", "0.5500404", "0.5489659", "0.5482044", "0.5421593", "0.542127", "0.5414636", "0.5363434", "0.5352135", "0.53382486", "0.5334315", "0.53306603", "0.5325997", "0.5319605", "0.53096867", "0.5305248", "0.5288067", "0.52808887", "0.52631867", "0.5255051", "0.52448845", "0.5239949", "0.523134", "0.52293545", "0.52282465", "0.52270186", "0.52193594", "0.52037585", "0.5200578", "0.51987714", "0.5198099", "0.51843375", "0.5183806", "0.5183657", "0.51826954", "0.5177022", "0.5166606", "0.5163366", "0.5149951", "0.5146032", "0.5136527", "0.5134702", "0.51137835", "0.51119804", "0.5110882", "0.5110882", "0.5110882", "0.5110882", "0.5110882", "0.5110882", "0.51105124", "0.51094127", "0.5108399", "0.5103842", "0.51036334", "0.5100303", "0.50890446", "0.50781167", "0.50770533", "0.5067077", "0.5067077", "0.5067077", "0.50621915", "0.5059075", "0.50551325", "0.50498474", "0.50407845", "0.5033585", "0.5032455", "0.50317043", "0.5029618", "0.50292754", "0.50265956", "0.50265956", "0.50265956", "0.50265956", "0.50265956", "0.50265956" ]
0.7114615
0
Test custom status with unknown reason
Тестирование пользовательского статуса с неизвестной причиной
public function testCustomStatusWithUnknownReason() { $status = new Status(599); $this->assertSame(599, $status->code()); $this->assertSame('Unknown', $status->reason()); $this->assertSame('599 Unknown', (string) $status); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testInvalidStatus()\n {\n $response = $this->get(\"paymentendpoint/ce3a0b03349078d8e85d1de8ded3f0/complete\");\n $this->assertEquals($response->getStatusCode(), 403);\n }", "abstract public function getStatusMessage();", "public function testAssertResponseStatusErrorPass()\n {\n $url = '/unit_test/test_action/123';\n $this->get($url);\n $this->response->setStatus('502 Bad Gateway');\n \n $this->assertResponse('error');\n }", "public function testWithStatus(): void\n {\n $response = $this->response->withStatus(444, 'test');\n\n $this->assertEquals(444, $response->getStatusCode());\n $this->assertEquals('test', $response->getReasonPhrase());\n }", "public function testStatus()\n {\n $response = new BadRequestResponse();\n\n self::assertSame(400, $response->getStatus());\n }", "public function testStatus()\n {\n $this->assertEquals(self::$directionsResponse->getStatus(), DirectionsStatus::OK);\n\n self::$directionsResponse->setStatus(DirectionsStatus::INVALID_REQUEST);\n $this->assertEquals(self::$directionsResponse->getStatus(), DirectionsStatus::INVALID_REQUEST);\n\n $this->setExpectedException('InvalidArgumentException');\n self::$directionsResponse->setStatus('foo');\n }", "public function testStatusAccessDenied() {\n\t\t$this->client->mc_enum_status( 'administrator', '' );\n\t}", "public function testReasonPhrase(): void\n {\n $this->assertEquals('OK', $this->response->getReasonPhrase());\n }", "public function testStatusGet()\n {\n }", "public function testStatusGet()\n {\n }", "private function checkStatus() {\n if ( $this->status === 'error' ) {\n throw new Exception(\"Something went wrong!\");\n }\n }", "public function testStatus() {\n\t\t$t = new Headers();\n\t\t$t->status('200');\n\t\t$this->assertEquals('200', $t->get('Status'));\n\t}", "abstract public function getStatus();", "abstract public function isStatusMessage();", "public function testResponseForTheTestThatFails()\n {\n $codeception = $this->codeception;\n $response = $codeception->getRunResponse('acceptance', md5(\"acceptanceTheTestThatFails\"));\n\n $this->assertTrue($response['run']);\n $this->assertFalse($response['passed']);\n $this->assertNull($response['message']);\n $this->assertNotNull($response['log']);\n $this->assertEquals($response['state'], 'failed');\n }", "public function getStatusMessage();", "public function getStatusReason()\n\t{\n\t\t//Route::enableFilters();\n\t\t\n\t $method = \"POST\";\n\t\t$uri = \"/v2/delivery/statusreason/get\";\n\t\t$parameters = array();\n\n\t\t$response = $this->call($method, $uri, $parameters);\n\t var_dump($response->getContent()->toJson());\n\t \n\t}", "function free_training_campaign_interest($status) {\n switch ($status) {\n case '1': $message = \"Not Yet\"; break;\n case '2': $message = \"Yes\"; break;\n default: $message = \"Status Unknown\"; break;\n }\n return $message;\n}", "public function showFail()\n {\n $response = $this->json('GET', 'api/job/12314123');\n $response->assertStatus(500);\n }", "public function testGetInvalidNotificationByEmailStatus() {\n\t\t// grab the data from mySQL and enforce the fields match our expectations\n\t\t$response = $this->guzzle->get('http://bootcamp-coders.cnm.edu/~invtext/backend/php/api/notification/?emailStatus=' . $this->INVALID_emailStatus);\n\t\t$this->assertSame($response->getStatusCode(), 200);\n\t\t$body = $response->getBody();\n\t\t$notification = json_decode($body);\n\t\t$this->assertSame(405, $notification->status);\n\t}", "public function isStatusFailed(){\n return $this->status == 'failed';\n }", "private function checkStatus($status){\n $status = strtolower($status);\n if ($status != 'failed' && $status != 'passed'){\n echo \"Failed. Status must be 'failed' or 'passed'\";\n exit;\n }\n return $status; \n }", "public function testGettingStatusCode()\n {\n $this->assertSame(2, $this->groschen->getStatusCode());\n\n // Product with a different status code\n $groschen = new Groschen('9789510426159');\n $this->assertSame(6, $groschen->getStatusCode());\n }", "function issuerStatus($endpoint,$tag,$status,$reason=NULL){\n\t\n\t// The payload is:\n\t$payload='{\"tag\":\"'.$tag.'\",\"status\":\"'.$status.'\"';\n\t\n\tif($reason!=null){\n\t\t$payload.=',\"reason\":{\"en\":\"'.escape($reason).'\"}';\n\t}\n\t\n\t$payload.='}';\n\t\n\t$error;\n\t$response=sendTo($endpoint,'commodity/status',$payload,$error);\n\t\n\tif($error){\n\t\t\n\t\t// Client error header:\n\t\theader('HTTP/1.0 400 Bad Request');\n\t\techo $error;\n\t\texit();\n\t\t\n\t}\n\t\n\treturn ($response=='{\"result\":\"OK\"}');\n\t\n}", "public function testCanNotTakeOrderWithEmptyStatus()\n {\n\n $response = $this->put(\"/api/v1/order/1?status=\" );\n\n $response\n ->receiveJson()\n ->seeStatusCode(Response::HTTP_UNPROCESSABLE_ENTITY)\n ->seeJsonStructure([\n 'errors' =>\n [\n 'status'\n ]\n\n ]);\n }", "public function testStatus() {\n $response = $this->runApp('GET', '/status');\n\n $this->assertEquals(200, $response->getStatusCode());\n $this->assertStringContainsString('responseStatus', (string) $response->getBody());\n $this->assertStringContainsString('success', (string) $response->getBody());\n $this->assertStringContainsString('version', (string) $response->getBody());\n $this->assertStringContainsString('time', (string) $response->getBody());\n $this->assertStringContainsString('db', (string) $response->getBody());\n $this->assertStringNotContainsString('ERROR', (string) $response->getBody());\n $this->assertStringNotContainsString('Failed', (string) $response->getBody());\n }", "public function testConstructWithInvalidValue()\n {\n $statusCode = new StatusCode('invalid value');\n }", "public function testChangeStatusTemplateFailFeature()\n {\n $template = factory(Template::class)->create();\n $this->actingAs($template->user);\n\n $response = $this->put('templates/-1/change_status', ['status' => TemplateStatus::STATUS_PUBLIC]);\n\n $response->assertStatus(404);\n }", "public function testSetWithInvalidValue()\n {\n $this->statusCode->set('invalid value');\n }", "public function withStatus(int $code, string $reasonPhrase = '');", "function status_user_verification($status) {\n switch ($status) {\n case '1': $message = \"New\"; break;\n case '2': $message = \"Verified\"; break;\n default: $message = \"Status Unknown\"; break;\n }\n return $message;\n}", "public function testStatusCode() {\n\t\t$response = new CakeResponse();\n\t\t$this->assertEquals($response->statusCode(), 200);\n\t\t$response->statusCode(404);\n\t\t$this->assertEquals($response->statusCode(), 404);\n\t\t$this->assertEquals($response->statusCode(500), 500);\n\n\t\t//Throws exception\n\t\t$response->statusCode(1001);\n\t}", "public function testMessagesForOtherStatuses()\n {\n $response = $this->get('/api/messages');\n\n $response->assertStatus(200);\n }", "public function testStatusCode() {\n\t\t$response = new CakeResponse();\n\t\t$this->assertEquals(200, $response->statusCode());\n\t\t$response->statusCode(404);\n\t\t$this->assertEquals(404, $response->statusCode());\n\t\t$this->assertEquals(500, $response->statusCode(500));\n\n\t\t//Throws exception\n\t\t$response->statusCode(1001);\n\t}", "public function testConfirmStatusesDiffer()\n {\n // in their user-friendly versions).\n $this->confirmConstantsDiffer(\n '\\Sil\\DevPortal\\models\\User',\n 'STATUS_',\n User::getStatuses()\n );\n }", "public function test_http_code($config)\n\t{\n\t\t$dispatch = Dispatch::factory('test', Dispatch_Connection::factory($config));\n\n\t\t$this->assertTrue($dispatch->find()->loaded(), 'Expecting resource to have loaded.');\n\t\t\n\t\t$dispatch->where('code', 500);\n\t\t\n\t\t$this->assertFalse($dispatch->find()->loaded(), 'Invalid HTTP status code should not validate as a loaded resource.');\n\t}", "public function getStatusReason()\n {\n return $this->reason;\n }", "private function getStatusMessage()\r\n\t\t{\r\n\t\t\t$iStatus = array(\r\n\t\t\t\t\t\t100 => 'Continue', \r\n\t\t\t\t\t\t101 => 'Switching Protocols', \r\n\t\t\t\t\t\t200 => 'OK',\r\n\t\t\t\t\t\t201 => 'Created', \r\n\t\t\t\t\t\t202 => 'Accepted', \r\n\t\t\t\t\t\t203 => 'Non-Authoritative Information', \r\n\t\t\t\t\t\t204 => 'No Content', \r\n\t\t\t\t\t\t205 => 'Reset Content', \r\n\t\t\t\t\t\t206 => 'Partial Content', \r\n\t\t\t\t\t\t300 => 'Multiple Choices', \r\n\t\t\t\t\t\t301 => 'Moved Permanently', \r\n\t\t\t\t\t\t302 => 'Found', \r\n\t\t\t\t\t\t303 => 'See Other', \r\n\t\t\t\t\t\t304 => 'Not Modified', \r\n\t\t\t\t\t\t305 => 'Use Proxy', \r\n\t\t\t\t\t\t306 => '(Unused)', \r\n\t\t\t\t\t\t307 => 'Temporary Redirect', \r\n\t\t\t\t\t\t400 => 'Bad Request', \r\n\t\t\t\t\t\t401 => 'Unauthorized', \r\n\t\t\t\t\t\t402 => 'Payment Required', \r\n\t\t\t\t\t\t403 => 'Forbidden', \r\n\t\t\t\t\t\t404 => 'Not Found', \r\n\t\t\t\t\t\t405 => 'Method Not Allowed', \r\n\t\t\t\t\t\t406 => 'Not Acceptable', \r\n\t\t\t\t\t\t407 => 'Proxy Authentication Required', \r\n\t\t\t\t\t\t408 => 'Request Timeout', \r\n\t\t\t\t\t\t409 => 'Conflict', \r\n\t\t\t\t\t\t410 => 'Gone', \r\n\t\t\t\t\t\t411 => 'Length Required', \r\n\t\t\t\t\t\t412 => 'Precondition Failed', \r\n\t\t\t\t\t\t413 => 'Request Entity Too Large', \r\n\t\t\t\t\t\t414 => 'Request-URI Too Long', \r\n\t\t\t\t\t\t415 => 'Unsupported Media Type', \r\n\t\t\t\t\t\t416 => 'Requested Range Not Satisfiable', \r\n\t\t\t\t\t\t417 => 'Expectation Failed', \r\n\t\t\t\t\t\t500 => 'Internal Server Error', \r\n\t\t\t\t\t\t501 => 'Not Implemented', \r\n\t\t\t\t\t\t502 => 'Bad Gateway', \r\n\t\t\t\t\t\t503 => 'Service Unavailable', \r\n\t\t\t\t\t\t504 => 'Gateway Timeout', \r\n\t\t\t\t\t\t505 => 'HTTP Version Not Supported');\r\n\t\t\treturn ($iStatus[$this->_iCode])?$iStatus[$this->_iCode]:$iStatus[500];\r\n\t\t}", "function status_snappy_help($status) {\n switch ($status) {\n case '1': $message = \"Active\"; break;\n case '2': $message = \"Inactive\"; break;\n case '3': $message = \"Draft\"; break;\n default: $message = \"Status Unknown\"; break;\n }\n return $message;\n}", "public function testCrceOverdraftGetOverdraftStatus()\n {\n\n }", "public function testNotManaged()\n {\n $response = $this->createResponse('not_managed');\n\n $this->assertTrue($response->isSuccessful());\n $this->assertFalse($response->isApproved());\n $this->assertFalse($response->isApproving());\n $this->assertFalse($response->isDeposited());\n $this->assertFalse($response->isDepositing());\n }", "function cd_sopablackout_status( $status_header, $header, $text, $protocol )\n{\n $text = get_status_header_desc( 503 );\n return \"$protocol 503 $text\";\n}", "public function reason();", "public function get_reason($status)\n {\n $reason = array(\n 100 => 'Continue', 'Switching Protocols',\n 200 => 'OK', 'Created', 'Accepted', 'Non-Authoritative Information',\n 'No Content', 'Reset Content', 'Partial Content',\n 300 => 'Multiple Choices', 'Moved Permanently', 'Found', 'See Other',\n 'Not Modified', 'Use Proxy', '(Unused)', 'Temporary Redirect',\n 400 => 'Bad Request', 'Unauthorized', 'Payment Required','Forbidden',\n 'Not Found', 'Method Not Allowed', 'Not Acceptable',\n 'Proxy Authentication Required', 'Request Timeout', 'Conflict',\n 'Gone', 'Length Required', 'Precondition Failed',\n 'Request Entity Too Large', 'Request-URI Too Long',\n 'Unsupported Media Type', 'Requested Range Not Satisfiable',\n 'Expectation Failed',\n 500 => 'Internal Server Error', 'Not Implemented', 'Bad Gateway',\n 'Service Unavailable', 'Gateway Timeout',\n 'HTTP Version Not Supported', );\n\n return isset($reason[$status]) ? $reason[$status] : '';\n }", "public function testSaveStatusMessage()\n {\n $this->json('POST', '/api/v1/status', ['status' => 'Mensaje de prueba']);\n }", "public function testAssertResponseStatusMissingPass()\n {\n $url = '/asdf/qwer';\n $this->get($url);\n\n $this->assertFalse($this->_recognized);\n $this->response->pageNotFound();\n\n $this->assertResponse('missing');\n }", "public function testResponseForNotFoundTest()\n {\n $codeception = $this->codeception;\n $response = $codeception->getRunResponse('lol', md5(\"notgoingtofindthis\"));\n\n $this->assertFalse($response['run']);\n $this->assertFalse($response['passed']);\n $this->assertEquals($response['message'], 'The test could not be found.');\n $this->assertNull($response['log']);\n $this->assertEquals($response['state'], 'error');\n }", "public function getStatusMessage(){\n\t\tswitch ($this->testStatus) {\n\t\t\tcase self::STATUS_SUCCESS:\n\t\t\t\treturn 'Sucessfull';\n\n\t\t\tcase self::STATUS_IN_PROGRESS:\n\t\t\t\treturn 'in Progress';\n\n\t\t\tcase self::STATUS_FAIL:\n\t\t\t\treturn 'Failed!';\n\n\t\t\tdefault:\n\t\t\t\treturn 'Unknown Status';\n\t\t}\n\t}", "public function isFailure();", "public function isFailure();", "public function getReason();", "public function getReason();", "public function getReason();", "public function testMessageForCode()\n {\n $this->assertEquals('200 OK', \\Slim\\Http\\Response::getMessageForCode(200));\n }", "public function status($code = null);", "public function testErrorsIssueCorrectStatusHeader()\n {\n $this->markTestSkipped(\n \"At the moment it's not possible to test HTTP status codes. Xdebug offers xdebug_get_headers, but it doesn't check status codes. See: http://bugs.xdebug.org/view.php?id=601\"\n );\n }", "public function getStatusReason()\n {\n return $this->statusReason;\n }", "function errorReportStatus($status) {\n\t\t\t\tif($status == 0)\n\t\t\t\t{\n\t\t\t\t\t$finalStatus = '<td align=\"center\" style=\"color:#009933;\">Pending</td>';\n\t\t\t\t}\n\t\t\t\telse if($status == 1)\n\t\t\t\t{\n\t\t\t\t\t$finalStatus = '<td align=\"center\" style=\"color:#CC0033;\">Closed</td>';\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$finalStatus = '<td align=\"center\" style=\"color:#FFFF00;\">Working On</td>';\n\t\t\t\t}\n\t\t\treturn $finalStatus;\n\t\t\t}", "public function testGuzzleClientResponseBadStatusCode()\n {\n $response = $this->getMock('GuzzleHttp\\Psr7\\Response');\n $response->method('getStatusCode')->willReturn(rand(0, 199));\n $response->method('getBody')->willReturn('Status Code Not 200');\n\n $this->guzzleClient->method('send')->willReturn($response);\n\n $stream = $this->getMock('Psr\\Http\\Message\\StreamInterface');\n $tweet = $this->getMock('JimLind\\Pie7o\\Tweet');\n $tweet->method('getMessage')->willReturn($stream);\n\n $this->fixture->update($tweet);\n }", "function assertStatus($result,$expect){\n\n if($result == $expect){\n echo '成功';\n }else{\n $this->getTrace();\n echo '错误';\n }\n }", "public function testAssertResponseStatusMissingFail()\n {\n $url = '/unit_test/test_action/123';\n $this->get($url);\n if (!$this->_recognized) {\n $this->response->pageNotFound();\n }\n \n $e = null;\n try {\n $this->assertResponse('missing');\n } catch (Exception $e) {}\n $this->assertTrue($e instanceof PHPUnit_Framework_AssertionFailedError);\n }", "public function isStatus();", "public function isStatus();", "abstract public static function getStatus(): string;", "public function testUserChangeStatusTemplateFailed()\n {\n $user = factory(User::class)->create();\n $template = factory(Template::class)->create(['user_id' => $user->id, 'status' => TemplateStatus::STATUS_UNPUBLIC]);\n\n $this->actingAs($user);\n $mock = Mockery::mock(TemplateRepository::class);\n $mock->shouldReceive('find')->andReturn($template);\n $mock->shouldReceive('update')->andReturn(false);\n $this->app->instance(TemplateRepository::class, $mock);\n\n $response = $this->put(\"templates/$template->id/change_status\", ['status' => TemplateStatus::STATUS_REVIEWING]);\n $response->assertStatus(400);\n $response->assertSee('Updated failed. Something went wrong');\n }", "function tw_err_notif($status = 404, $msg = \"Unknown Request\") {\r\n tw_err($status, $msg, true);\r\n}", "private function get_status_message() {\n $status = array(\n 100 => 'Continue',\n 101 => 'Switching Protocols',\n 200 => 'OK',\n 201 => 'Created',\n 202 => 'Accepted',\n 203 => 'Non-Authoritative Information',\n 204 => 'Missing param(s)', //No Content \n 205 => 'Reset Content',\n 206 => 'Partial Content',\n 302 => 'Found',\n 304 => 'Not Modified',\n 307 => 'Temporary Redirect',\n 400 => 'Bad Request',\n 401 => 'Unauthorized',\n 403 => 'Forbidden',\n 404 => 'Function Not Found',\n 406 => 'Not Acceptable',\n 409 => 'Conflict',\n 417 => 'Failed ', //Expectation Failed\n 500 => 'Internal Server Error',\n 501 => 'Not Implemented',\n 502 => 'Bad Gateway',\n 505 => 'HTTP Version Not Supported');\n return ($status[$this->_code]) ? $status[$this->_code] : $status[500];\n }", "abstract function output_status( $status );", "public function setStatus($status)\n {\n if (!in_array($status, self::getAllStatusConstants())) {\n throw new Streamwide_PHPUnit_Runner_Exception('Unrecognized test result.');\n }\n \n $this->_status = $status;\n }", "function testUpdateStatus() {\n\t\tif($_SERVER['HTTP_HOST'] == 'localhost') {\n\t\t\t$this->fail('This test cannot be run on localhost. The facebook API requires the website be accessable from the internet');\n\t\t}\n\t\tFacebookModule::enable();\n\t\t$updated = FacebookModule::updateStatus(array('message' => 'test'.rand(0,999)));\n\t\t$this->assertTrue($updated);\n\n\t}", "public function getResponseStatus();", "function get_test_status($test_status)\n {\n\t \n\t if($test_status == 0)\n\t\t return '<b>Status:</b> Test Saved, but not Published. Publish to make viewable to students.';\n\t else if($test_status == 2)\n return '<b>Status:</b> Test Published. Students can view, but can\\'t take until the specified time';\n\t else if($test_status == 3)\n\t\t return '<b>Status:</b> Test Published. Students can currently take this test.';\n\t else if($test_status == 4)\n\t return '<b>Status:</b> Test Completed. Ready to review and grade.';\n\t else if($test_status == 5)\n\t return '<b>Class Average:</b> ';\n\t else if($test_status == 6)\n\t return '<b>Status:</b> Test Published, but there are no students enrolled in this class.';\n }", "public function testNoParams()\n {\n $status = new SpanStatus();\n self::assertEquals(SpanStatus::UNSET, $status->getCanonicalStatusCode());\n self::assertEquals(SpanStatus::DESCRIPTION[SpanStatus::UNSET], $status->getStatusDescription());\n }", "private function getStatusMessage() {\n $status = array(\n 200 => 'OK',\n 201 => 'Created', \n 204 => 'No Content', \n 400 => 'Bad Request',\n 404 => 'Not Found', \n 406 => 'Not Acceptable');\n return ($status[$this->_code]) ? $status[$this->_code] : $status[500];\n }", "public function test_status_code(): void\n {\n $this->response->assertStatus(200);\n }", "function tw_err($status = 404, $msg = \"Unknown Request\", $notif = false) {\r\n http_response_code($status);\r\n $output = array(\r\n 'error' => true,\r\n 'error_message' => $msg,\r\n 'error_code' => $status\r\n );\r\n if ($notif) {\r\n return $output;\r\n }\r\n die(json_encode($output));\r\n}", "public function check_status () { return true; }", "protected function reason()\n {\n }", "public function testStatusCode(): void\n {\n $this->assertEquals(200, $this->response->getStatusCode());\n }", "public function testStatus200()\n {\n $this->assertEquals(200, $this->controller->get(1)->getStatusCode());\n }", "function statussw($status)\n{\n\tswitch ($status)\n\t{\n\t\tcase '0':\n\t\t\t$q = 'error';\n\t\tbreak;\n\t\tcase '1':\n\t\t\t$q = 'up';\n\t\tbreak;\n\t\tcase '2':\n\t\t\t$q = 'down';\n\t\tbreak;\n\t\tcase 'false':\n\t\t\t$q = 'error';\n\t\tbreak;\n\t\tdefault:\n\t\tbreak;\n\t}\n\t\t\n\treturn $q;\n}", "function status_admin($status) {\n switch ($status) {\n case '1': $message = \"Active\"; break;\n case '2': $message = \"Inactive\"; break;\n case '3': $message = \"Suspended\"; break;\n default: $message = \"Status Unknown\"; break;\n }\n return $message;\n}", "public function hasStatusMessage();", "public function testUpdateStatus()\n {\n $this->markTestIncomplete(\n 'Test of \"updateStatus\" method has not been implemented yet.'\n );\n }", "public function testExceptionThrownWhenStatusIsNotString():\tvoid\n {\n $paymentStatusValidator = new PaymentStatusValidator();\n $this->expectException(InvalidArgumentException::class);\n $this->expectExceptionMessage('Error - invalid data type supplied for status, string expected.');\n $paymentStatusValidator->validate(['status' => 2]);\n }", "function status_account_flag($status) {\n switch ($status) {\n case '1': $message = \"Active\"; break;\n case '2': $message = \"Inactive\"; break;\n default: $message = \"Status Unknown\"; break;\n }\n return $message;\n}", "function getStatusCodeMessage($status)\n{\n // these could be stored in a .ini file and loaded\n // via parse_ini_file()... however, this will suffice\n // for an example\n $codes = Array(\n 100 => 'Continue',\n 101 => 'Switching Protocols',\n 200 => 'OK',\n 201 => 'Created',\n 202 => 'Accepted',\n 203 => 'Non-Authoritative Information',\n 204 => 'No Content',\n 205 => 'Reset Content',\n 206 => 'Partial Content',\n 300 => 'Multiple Choices',\n 301 => 'Moved Permanently',\n 302 => 'Found',\n 303 => 'See Other',\n 304 => 'Not Modified',\n 305 => 'Use Proxy',\n 306 => '(Unused)',\n 307 => 'Temporary Redirect',\n 400 => 'Bad Request',\n 401 => 'Unauthorized',\n 402 => 'Payment Required',\n 403 => 'Forbidden',\n 404 => 'Not Found',\n 405 => 'Method Not Allowed',\n 406 => 'Not Acceptable',\n 407 => 'Proxy Authentication Required',\n 408 => 'Request Timeout',\n 409 => 'Conflict',\n 410 => 'Gone',\n 411 => 'Length Required',\n 412 => 'Precondition Failed',\n 413 => 'Request Entity Too Large',\n 414 => 'Request-URI Too Long',\n 415 => 'Unsupported Media Type',\n 416 => 'Requested Range Not Satisfiable',\n 417 => 'Expectation Failed',\n 500 => 'Internal Server Error',\n 501 => 'Not Implemented',\n 502 => 'Bad Gateway',\n 503 => 'Service Unavailable',\n 504 => 'Gateway Timeout',\n 505 => 'HTTP Version Not Supported'\n );\n \n return (isset($codes[$status])) ? $codes[$status] : '';\n}", "public function testCheckRefreshFailed1() {\n $controller = new SubmissionController($this->core);\n $return = $controller->checkRefresh('test', 1);\n\n $this->assertFalse($return['refresh']);\n $this->assertEquals(\"NO_REFRESH\", $return['string']);\n }", "public function shouldGetResponseStatusHeader(UnitTester $I)\n {\n $examples = [\n 'Unprocessable Entity' => 422,\n 'Moved Permanently' => 301,\n 'OK' => 200,\n 'Service Unavailable' => 503,\n 'Not Found' => 404,\n 'Created' => 201,\n 'Continue' => 100,\n ];\n\n foreach ($examples as $message => $code) {\n $headers = new Headers();\n $I->setProtectedProperty($headers, '_headers', ['Status' => $code]);\n\n $expected = $code;\n $actual = $headers->get('Status');\n $I->assertEquals($expected, $actual);\n }\n }", "public function getStatus($status)\n {\n }", "public function testUserStatus()\n {\n }", "public function testAreAnyGamesInProgressSuccessfulResponse()\n {\n $this->assertEquals('200', static::$sResponse->getStatusCode());\n }", "abstract public function isFailed();", "function getStatusCodeMessage($status)\n{\n // these could be stored in a .ini file and loaded\n // via parse_ini_file()... however, this will suffice\n // for an example\n $codes = Array(\n 100 => 'Continue',\n 101 => 'Switching Protocols',\n 200 => 'OK',\n 201 => 'Created',\n 202 => 'Accepted',\n 203 => 'Non-Authoritative Information',\n 204 => 'No Content',\n 205 => 'Reset Content',\n 206 => 'Partial Content',\n 300 => 'Multiple Choices',\n 301 => 'Moved Permanently',\n 302 => 'Found',\n 303 => 'See Other',\n 304 => 'Not Modified',\n 305 => 'Use Proxy',\n 306 => '(Unused)',\n 307 => 'Temporary Redirect',\n 400 => 'Bad Request',\n 401 => 'Unauthorized',\n 402 => 'Payment Required',\n 403 => 'Forbidden',\n 404 => 'Not Found',\n 405 => 'Method Not Allowed',\n 406 => 'Not Acceptable',\n 407 => 'Proxy Authentication Required',\n 408 => 'Request Timeout',\n 409 => 'Conflict',\n 410 => 'Gone',\n 411 => 'Length Required',\n 412 => 'Precondition Failed',\n 413 => 'Request Entity Too Large',\n 414 => 'Request-URI Too Long',\n 415 => 'Unsupported Media Type',\n 416 => 'Requested Range Not Satisfiable',\n 417 => 'Expectation Failed',\n 500 => 'Internal Server Error',\n 501 => 'Not Implemented',\n 502 => 'Bad Gateway',\n 503 => 'Service Unavailable',\n 504 => 'Gateway Timeout',\n 505 => 'HTTP Version Not Supported'\n );\n\n return (isset($codes[$status])) ? $codes[$status] : '';\n}", "public function testExceptionThrownWhenStatusIsNotValid():\tvoid\n {\n $paymentStatusValidator = new PaymentStatusValidator();\n $this->expectException(InvalidArgumentException::class);\n $this->expectExceptionMessage('Error - Payment status \"invalidStatus\" is invalid.');\n $paymentStatusValidator->validate(['status' => 'invalidStatus']);\n }", "public function testMessageForCodeWithInvalidCode()\n {\n $this->assertNull(\\Slim\\Http\\Response::getMessageForCode(600));\n }", "function check_rc( $rc, $expected )\n{\n return ( $rc === $expected ? \"ok\" : \"failed\" ) . \"\\n\";\n}", "function status($status) {\n switch($status){\n case SERVICE_CONTINUE_PENDING:\n return \"The service continue is pending.\";\n case SERVICE_PAUSE_PENDING:\n return \"The service pause is pending.\";\n case SERVICE_PAUSED:\n return \"The service is paused.\";\n case SERVICE_RUNNING:\n return \"The service is running.\";\n case SERVICE_START_PENDING:\n return \"The service is starting.\";\n case SERVICE_STOP_PENDING:\n return \"The service is stopping.\";\n case SERVICE_STOPPED:\n return \"The service is not running.\";\n default:\n return \"Unknow Status\";\n }\n}", "public function testgetStatusNames()\n {\n $this->assertEquals(Status::getStatusNames()[1], 'Draft');\n $this->assertEquals(Status::getStatusNames()[2], 'Submitted');\n $this->assertEquals(Status::getStatusNames()[3], 'Authorised');\n $this->assertEquals(Status::getStatusNames()[4], 'Paid');\n $this->assertEquals(Status::getStatusNames()[5], 'Void');\n $this->assertEquals(Status::getStatusNames()[6], 'Deleted');\n }", "function status($code) {\n\t\t$reason=@constant('self::HTTP_'.$code);\n\t\tif (!$this->hive['CLI'] && !headers_sent())\n\t\t\theader($_SERVER['SERVER_PROTOCOL'].' '.$code.' '.$reason);\n\t\treturn $reason;\n\t}" ]
[ "0.6868431", "0.67062426", "0.66548747", "0.6576808", "0.6567753", "0.6563442", "0.6536232", "0.6468409", "0.63938636", "0.63938636", "0.634872", "0.63459575", "0.6331879", "0.6301629", "0.6274934", "0.6247968", "0.62284625", "0.622686", "0.6224713", "0.62219095", "0.6199404", "0.6192249", "0.61806387", "0.6167059", "0.6155088", "0.61285096", "0.61047226", "0.6083942", "0.60753024", "0.60739523", "0.6071371", "0.6064965", "0.6060849", "0.60404956", "0.6019535", "0.6010916", "0.6005408", "0.60019076", "0.5983234", "0.5974159", "0.5966308", "0.5957956", "0.5942927", "0.59377784", "0.5935439", "0.5924426", "0.59142846", "0.5906609", "0.5889615", "0.5889615", "0.58861005", "0.58861005", "0.58861005", "0.5866586", "0.585686", "0.5852722", "0.58512557", "0.58494586", "0.5837953", "0.5836448", "0.5835922", "0.5833775", "0.5833775", "0.5819271", "0.58179396", "0.58120024", "0.5804831", "0.5804051", "0.5798953", "0.57981306", "0.5797283", "0.5793606", "0.57793397", "0.5762469", "0.5748879", "0.5737427", "0.57363683", "0.57363456", "0.5734685", "0.57315964", "0.5724424", "0.5724027", "0.57220393", "0.5711835", "0.5711725", "0.5710931", "0.5709329", "0.5702366", "0.57010794", "0.5697064", "0.56860256", "0.5684799", "0.5680051", "0.5679745", "0.5679661", "0.56792223", "0.5679161", "0.56716555", "0.5656243", "0.56562275" ]
0.76748717
0
Return minor version of svn client
Верните минорную версию клиента svn
public static function getSvnMinorVersion() { $version = USVN_SVNUtils::getSvnVersion(); return $version[1]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLongVersion()\n\t{\n\t\t$version = parent::getLongVersion();\n\n\t\t/** @var Connector $repository_connector */\n\t\t$repository_connector = $this->dic['repository_connector'];\n\t\t$client_version = $repository_connector->getCommand('', '--version --quiet')->run();\n\n\t\treturn $version . ' (SVN <comment>v' . trim($client_version) . '</comment>)';\n\t}", "public function getMinorVersion() {\n return $this->_minorVersion;\n }", "public static function getSvnVersion()\n\t{\n\t\treturn USVN_SVNUtils::parseSvnVersion(USVN_ConsoleUtils::runCmdCaptureMessage(USVN_SVNUtils::svnCommand(\"--version --quiet\"), $return));\n\t}", "public function getMajorMinorVersion($version)\n {\n return substr($version, 0, strrpos($version, '.'));\n }", "public function minor()\n {\n return $this->isBranch() ? null : sprintf('%d.%d', $this->major, $this->minor);\n }", "public function getLastVersionNumber();", "public static function getVersion()\n {\n $i = self::getVersionInfo();\n return trim(\"{$i['major']}.{$i['minor']}.{$i['revision']}\" . ($i['patch'] != '' ? \".{$i['patch']}\" : \"\")\n . \"-{$i['stability']}{$i['number']}\", '.-');\n }", "public static function getMaxVersion(){\n\t\treturn self::$version;\n\t}", "public function binaryVersion(): ?string\n {\n if (!self::$version) {\n if (0 === $this->process->execute('svn --version', $output)) {\n if (Preg::isMatch('{(\\d+(?:\\.\\d+)+)}', $output, $match)) {\n self::$version = $match[1];\n }\n }\n }\n\n return self::$version;\n }", "public function getVersion()\n {\n return \\Includes\\Utils\\Converter::composeVersion($this->getMajorVersion(), $this->getMinorVersion());\n }", "#[PublicAPI]\n #[Description(\"Get the library version.\")]\n #[FunctionReturn(\"Condorcet PHP version.\")]\n #[Related(\"Election::getObjectVersion\")]\n public static function getVersion (bool $major = false) : string\n {\n if ($major === true) :\n $version = \\explode('.', self::VERSION);\n return $version[0].'.'.$version[1];\n else :\n return self::VERSION;\n endif;\n }", "public function get_version()\n {\n return cms_version_number();\n }", "public function get_version()\n {\n return cms_version_number();\n }", "public function get_version()\n {\n return cms_version_number();\n }", "public function get_version()\n {\n return cms_version_number();\n }", "public function get_version()\n {\n return cms_version_number();\n }", "function get_version();", "function version_svn_courante($dir) {\n\tif (!$dir) $dir = '.';\n\n\t// version installee par SVN\n\tif (lire_fichier($dir . '/.svn/entries', $c)\n\tAND preg_match_all(\n\t',committed-rev=\"([0-9]+)\",', $c, $r1, PREG_PATTERN_ORDER))\n\t\treturn -max($r1[1]);\n\n\t// version installee par paquet ZIP de SPIP-Zone\n\tif (lire_fichier($dir.'/svn.revision', $c)\n\tAND preg_match(',Revision: (\\d+),', $c, $d))\n\t\treturn intval($d[1]);\n\n\t// Bug ou paquet fait main\n\treturn 0;\n}", "public function getClientUserAgentMinorVersion() {\n\t\treturn $this->_clientUserAgentMinorVersion;\n\t}", "function mysqlMajorRelease()\r\n{\r\n $version = explode(\".\",mysql_get_client_info());\r\n return $version[0];\r\n}", "function getVersion()\r\n\t{\r\n\t\treturn '1.02';\r\n\t}", "public function getMinorProtocolVersion()\n {\n return $this->_minorProtocolVersion;\n }", "public function server_version() {\n $row=$this->row('SELECT version()');\n return $row['version()'];\n }", "function get_server_version_int(){\n return $this->dbcon->server_version;\n }", "function getVersion()\r\n\t{\r\n\t\treturn '1.1.2';\r\n\t}", "function as_version() {\n\treturn(\"1.00.00\");\n}", "public function getRev()\r\n {\r\n return $this[\"client_type\"] ? null : $this[\"client_version\"]->section(\"[\", 1)->filterDigits();\r\n }", "public function getDBVersion() {\n\t\tglobal $connect;\n\t\t$q = \"SELECT versionMaj, versionMin, versionRev, versionBuild \";\n\t\t$q .= \"FROM CORE_extension WHERE extensionId = '\".$this->Name.\"'\";\n\t\t$res = $connect->execute($q,$this->throwExcept);\n\t\tif(( trim($connect->errorMsg) == \"\") && (1 == $connect->getNumRows($res)))\n\t\t return implode('.',$connect->getRow($res));\n\t\telse\n\t\t return \"0.0.0.0\";\n\t}", "public function getSvnRevision()\n {\n return $this->_svnRevision;\n }", "function numeroVersion() {\r\n\r\n\treturn \"5.3.6\";\r\n}", "public function getKernelMinorVersion();", "public function get_latest_version_number ()\n\t{\n\t\t$latest = null;\n\n\t\tgit_tree_walk($this->tree, GIT_TREEWALK_PRE, function ($_1, $entry, &$latest)\n\t\t{\n\t\t\t$name = git_tree_entry_name($entry);\n\n\t\t\tif (!preg_match('/^release-(.+)\\.json$/', $name, $match))\n\t\t\t{\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\tif (!$latest || strcmp($latest, $match[1]) < 0)\n\t\t\t{\n\t\t\t\t$latest = $match[1];\n\t\t\t}\n\t\t}, $latest);\n\n\t\treturn $latest;\n\t}", "public function get_version(){\n\t\treturn $this->version;\n\t}", "function get_version()\n{\n\treturn preg_replace('/(.*)\\.\\d+$/', '$1', $GLOBALS['version']);\n}", "public function getVersion()\n {\n $row = $this\n ->executeSql(\"show server_version\")\n ->current()\n ;\n\n return $row['server_version'];\n }", "public function get_version()\n {\n $l_data = $this->get_info();\n\n return $l_data[\"version\"];\n }", "public static function getVersion();", "public static function getVersion();", "public function getLatestVersion()\n {\n $value = $this->get(self::latest_version);\n return $value === null ? (integer)$value : $value;\n }", "function getVersion() ;", "function getVersion() ;", "public function getMinor()\n\t{\n\t\treturn $this->minor;\n\t}", "public function version() { \r\n\r\n\t\t$args = array(); \r\n\t\t$results = $this->sendCommand('getversion',$args); \r\n\t\t\r\n\t\t// a return of 0 is a bad value\r\n\t\tif ($results == '0') { $results = null; } \r\n\r\n\r\n\t\treturn $results; \r\n\r\n\t}", "function GetMinor()\n {\n return $this->minor_step;\n }", "public function getMinor() \n {\n return $this->minor;\n }", "final public static function version(/* ... */)\n {\n return XPSPL_VERSION;\n }", "public function getNewestVersionNumber()\n {\n static $newestVersionNumber;\n\n if ($newestVersionNumber !== null) {\n return $newestVersionNumber;\n }\n\n if (!defined('PS_ADMIN_DIR') && !defined('_PSHOW_MODULE_EMERGENCY_UPDATE_')) {\n return 'notInAdmin';\n }\n\n $controller = Tools::getValue('controller');\n if (!defined('_PSHOW_MODULE_EMERGENCY_UPDATE_') && (!$controller || stripos($controller, 'Update') === false)) {\n return 'notInUpdatePage';\n }\n\n $url = 'https://modules.prestashow.pl';\n $url .= '/' . $this->getPrestashopVersion();\n $url .= '/' . $this->getModuleName();\n $url .= '/' . $this->getModuleVersionNumber();\n $url .= '/' . $this->getCustomerCode();\n $url .= '/' . gethostbyname(gethostname());\n $url .= '/' . $_SERVER[\"HTTP_HOST\"];\n\n // try to get version by curl\n if (function_exists('curl_init')) {\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_VERBOSE, true);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n $newestVersionNumber = curl_exec($ch);\n $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n curl_close($ch);\n\n if ($httpCode == 200) {\n return $newestVersionNumber;\n }\n }\n\n $headers = get_headers($url);\n if (!strpos($headers[0], '200')) {\n return 'Unable to check. Try again later...';\n }\n\n $context = stream_context_create(array(\n 'http' => array(\n 'method' => 'GET',\n 'timeout' => 3\n )\n ));\n $newestVersionNumber = @file_get_contents($url, false, $context);\n if (!$newestVersionNumber || $newestVersionNumber == '0.0.0') {\n return 'Unable to check. Try again later...';\n }\n\n return $newestVersionNumber;\n }", "public function get_version() { \n\n\t\treturn $this->version; \n\n\t}", "function GetVersion()\n\t{\n\t\treturn '0.0.0.1';\n\t}", "public function get_version()\n {\n return $version;\n }", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public static function get_version() {\n\t\treturn self::$version;\n\t}", "function GetVersion()\n {\n return '0.1';\n }", "public function getServerVersion()\n {\n return $this->__call(__FUNCTION__, array());\n }", "public static function GET_VERSION(): string\n\t{\n\t\treturn self::$version;\n\t}", "function getLatestCoreVer(){\n\t\tglobal $application;\n\n\t\t$_state = modApiFunc(\"License\", \"checkLicense\");\n\t\t$licenseInfo = modApiFunc(\"License\",\"getLicenseInfo\", $_state);\n\t\tif($licenseInfo[\"license_key\"]==LICENSE_KEY_UNDEFINED){\n\t\t\t$result['body']= PRODUCT_VERSION_NUMBER;\n\t\t}\n\t\tif($this->isMarketplaceUpdateRequired()){\n\t\t\t$this->marketplace_server = $application->getAppIni('MARKETPLACE_SERVER');\n\n\t\t\t$data = array(\n\t\t\t\t\t'license' => $licenseInfo[\"license_key\"],\n\t\t\t\t\t'store_url' => urlencode(modApiFunc('Request', 'selfURL')),\n\t\t\t\t\t'store_version' => PRODUCT_VERSION_NUMBER,\n\t\t\t\t );\n\t\t\tloadCoreFile('bouncer.php');\n\t\t\t$bnc = new Bouncer();\n\t\t\t$bnc->setMethod('POST');\n\t\t\t$bnc->setPOSTstring($bnc->prepareDATAstring($data));\n\t\t\t$bnc->setURL($this->marketplace_server.\"/download_extension.php?asc_action=GetLatestCoreVersion\");\n\t\t\t$bnc->setProto('HTTPS');\n\t\t\t$result = $bnc->RunRequest();\n\t\t\tif ($result!=false && $bnc->responseCode < 400){\n\t\t\t\t$latest_core_version = $result['body'];\n\t\t\t\t/* Update Latest core version */\n\t\t\t\t$params = array('group_name' => 'AVACTIS_LATEST_VERSION',\n\t\t\t\t\t\t'param_name' => 'AVACTIS_LATEST_VERSION',\n\t\t\t\t\t\t'value' => \t$latest_core_version);\n\t\t\t\texecQuery('UPDATE_SETTINGS_PARAM_VALUE', $params);\n\t\t\t\treturn $latest_core_version;\n\t\t\t}\n\t\t}\n\t\t//Error while calling marketplace or TTL not expired then return from database\n\t\t$result= execQuery('SELECT_SETTINGS_PARAM_BASE_INFO',array('group_name' => 'AVACTIS_LATEST_VERSION', 'param_name' => 'AVACTIS_LATEST_VERSION'));\n\t\t$latest_core_version = $result[0]['param_current_value'];\n\t\treturn $latest_core_version;\n\t}", "public function getServerVersion() : string {}", "public static function getLongVersion ()\n\t{\n\t\treturn self::$RELEASE . '.' . self::$DEV_LEVEL . ' ' . (self::$DEV_STATUS ? ' ' . self::$DEV_STATUS : '') . ' build ' . self::$BUILD . ' [ ' .\n\t\t\t\t self::$CODENAME . ' ] ';\n\t}", "public function get_version()\n\t{\n\t\treturn $this->version;\n\t}", "public function get_version()\n\t{\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\t$version = $this->get_option_value('version');\n\n\t\tif (!empty($version)) {\n\t\t\tif (preg_match('/^(\\d+)(\\.\\d+)+/', $version, $match)) {\n\t\t\t\treturn $match[0];\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public static function getVersion()\n {\n // TODO: Implement getVersion() method.\n return '2.1.3';\n }", "protected function getLatestVersion()\n {\n $response = $this->apiClient->getLatestVersion($this->beta);\n\n if ($response->isError()) {\n return $this->error('Error updating '.$this->plugin->name().' - '.$latestVersion->message.' '.$latestVersion->body);\n }\n\n return $response->version;\n }", "public function get_version() {\n\t\treturn 1;\n\t}", "public function getServerVersion()\n {\n return $this->server_version;\n }", "public function getVersion() {\r\n\t\t$responseArray = $this->getInfo();\r\n\t\treturn $responseArray['version'];\r\n\t}", "public function getServerLibraryVersion(){\n return new Version();\n }", "public function getServerLibraryVersion(){\n return new Version();\n }", "function get_version(){\n\t\treturn \"1.4\";\n\t}", "public function getVersion()\n {\n return $this->__get(\"version\");\n }", "public function GetMinor()\n\t{\n\t\treturn $this->minor_step;\n\t}", "public function getVersion()\n\t{\n\t\treturn @$this->data['version']['release'];\n\t}", "public function getSvn()\n {\n return $this->svn;\n }", "public static function getBuildVersion()\n {\n return '1';\n }", "public function get_version() {\n\t\t\treturn $this->version;\n\t\t}", "public function get_version() {\n\t\t\treturn $this->version;\n\t\t}", "public function get_version() {\n\t\t\treturn $this->version;\n\t\t}", "public static function get_version()\n {\n }", "public static function get_version()\n {\n }", "public static function get_version()\n {\n }", "public function getServerVersion(): string;", "public function getVersion()\n {\n $output = $this->querySabnzbd('mode=version&output=json');\n $response = json_decode($output, true);\n\n return $response['version'];\n }", "protected function getVersion() {\n\n\t \t\t \treturn $this->version;\n\t }", "public function getVersion() {\n\t\tif (isset($this -> version)) {\n\t\t\treturn $this -> version;\n\t\t} else {\n\t\t\t// By default return 0\n\t\t\treturn 0;\n\t\t}\n\t}", "public function getVersion() {\r\n\r\n\t\tif(!$this->version) {\r\n\r\n\t\t\t$this->__vboxwebsrvConnect();\r\n\r\n\t\t\t$this->version = explode('.',$this->vbox->version);\r\n\t\t\t$this->version = array(\r\n\t\t\t\t'ose'=>(stripos($this->version[2],'ose') > 0),\r\n\t\t\t\t'string'=>join('.',$this->version),\r\n\t\t\t\t'major'=>intval(array_shift($this->version)),\r\n\t\t\t\t'minor'=>intval(array_shift($this->version)),\r\n\t\t\t\t'sub'=>intval(array_shift($this->version))\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\treturn $this->version;\r\n\r\n\t}", "public function get_major_update($site_env)\n {\n\n $mwu_cli = new \\MWU_WPCommand($this->get_site_environment($site_env));\n\n return $mwu_cli->get_major_update();\n }", "public function getProgVersion();", "protected function _getVersion() {\n // http://www.magentron.com/blog/2011/07/20/how-to-display-your-extension-version-in-magento-admin\n return Mage::getConfig()->getNode()->modules->Olark_Chatbox->version;\n }", "public function getVersion() {\n\t\treturn \"0\";\n\t}", "public function get_max_version()\n {\n // We only want one row but we cannot assume that we are using MySQL and use a LIMIT statement\n // as it is not part of the SQL standard. Thus we have to select all rows and use PHP to return\n // the record we need\n $versions_nested = $this->_adapter->select_all(sprintf(\"SELECT version FROM %s\", $this->_adapter->get_schema_version_table_name()));\n $versions = array();\n foreach ($versions_nested as $v) {\n $versions[] = $v['version'];\n }\n $num_versions = count($versions);\n if ($num_versions) {\n sort($versions); //sorts lowest-to-highest (ascending)\n\n return (string) $versions[$num_versions-1];\n } else {\n return null;\n }\n }", "function vuetiful_get_version() {\n\treturn '1.0.0';\n}", "public function getVersion() {\n\t\treturn $this->parseString($this->generalConfig[\"version\"]);\n\t}", "function ver(){\n\treturn \"2.1.367\";\n}", "function jbxl_get_moodle_version()\n{\n global $CFG;\n\n if ($CFG->version>=2019052000) return 3.7;\n else if ($CFG->version>=2018123000) return 3.6;\n else if ($CFG->version>=2018051700) return 3.5;\n else if ($CFG->version>=2017111300) return 3.4;\n else if ($CFG->version>=2017051500) return 3.3;\n else if ($CFG->version>=2016120500) return 3.2;\n else if ($CFG->version>=2016052300) return 3.1;\n else if ($CFG->version>=2015111600) return 3.0;\n else if ($CFG->version>=2015051100) return 2.9;\n else if ($CFG->version>=2014111000) return 2.8;\n else if ($CFG->version>=2014051200) return 2.7;\n else if ($CFG->version>=2013111800) return 2.6;\n else if ($CFG->version>=2013051400) return 2.5;\n else if ($CFG->version>=2012120300) return 2.4;\n else if ($CFG->version>=2012062500) return 2.3;\n else if ($CFG->version>=2011120500) return 2.2;\n else if ($CFG->version>=2011070100) return 2.1;\n else if ($CFG->version>=2010112400) return 2.0;\n else if ($CFG->version>=2007101509) return 1.9;\n\n return 1.8;\n}", "function svnGetRev( $dir, &$url = null ) {\n\t\n\t$cmd = \"svn info --non-interactive --xml \" . escapeshellarg( $dir );\n\t$retval = - 1;\n\t$result = svnShellExec( $cmd, $retval );\n\tif ( $retval ) {\n\t\tsvnError( 'extdist-svn-error', $result );\n\t\treturn false;\n\t}\n\n\ttry {\n\t\t$sx = new SimpleXMLElement( $result );\n\t\t$rev = strval( $sx->entry->commit['revision'] );\n\t\t$url = $sx->entry->url;\n\t} catch ( Exception $e ) {\n\t\t$rev = false;\n\t}\n\tif ( !$rev || strpos( $rev, '/' ) !== false || strpos( $rev, \"\\000\" ) !== false ) {\n\t\tsvnError( 'extdist-svn-parse-error', $result );\n\t\treturn false;\n\t}\n\t\n\treturn $rev;\n}" ]
[ "0.7343148", "0.70370877", "0.70209354", "0.69291013", "0.67650735", "0.67288584", "0.66962034", "0.66851693", "0.6644318", "0.65268373", "0.6465419", "0.64490837", "0.64490837", "0.64490837", "0.64490837", "0.64490837", "0.6438288", "0.6419702", "0.6418006", "0.63816094", "0.63565195", "0.6342471", "0.6309858", "0.63040763", "0.63031334", "0.62966776", "0.6288448", "0.62847483", "0.6271323", "0.6245925", "0.6239708", "0.6235155", "0.62344617", "0.6215113", "0.6212604", "0.6212515", "0.6202059", "0.6202059", "0.6190712", "0.61844796", "0.61844796", "0.61836004", "0.6181313", "0.617583", "0.6170787", "0.6165391", "0.616152", "0.6161257", "0.6154457", "0.61544144", "0.6149197", "0.6149197", "0.6149197", "0.6149197", "0.6149197", "0.6149197", "0.6144857", "0.6135374", "0.61343026", "0.613231", "0.6128403", "0.612624", "0.6120385", "0.611536", "0.611536", "0.6114523", "0.61103094", "0.609824", "0.60979295", "0.6087368", "0.6083669", "0.60763884", "0.60763884", "0.60728693", "0.6067506", "0.60506165", "0.6046211", "0.6045979", "0.6038954", "0.60374355", "0.60374355", "0.60374355", "0.6035581", "0.6033699", "0.6033314", "0.6032526", "0.6030433", "0.60279787", "0.60276496", "0.6024555", "0.6016345", "0.6012035", "0.6005329", "0.60050535", "0.59997123", "0.59991485", "0.5996693", "0.5987634", "0.5987296", "0.5986806" ]
0.8318592
0
Return version of svn client
Версия клиента svn
public static function getSvnVersion() { return USVN_SVNUtils::parseSvnVersion(USVN_ConsoleUtils::runCmdCaptureMessage(USVN_SVNUtils::svnCommand("--version --quiet"), $return)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLongVersion()\n\t{\n\t\t$version = parent::getLongVersion();\n\n\t\t/** @var Connector $repository_connector */\n\t\t$repository_connector = $this->dic['repository_connector'];\n\t\t$client_version = $repository_connector->getCommand('', '--version --quiet')->run();\n\n\t\treturn $version . ' (SVN <comment>v' . trim($client_version) . '</comment>)';\n\t}", "public function getSvn()\n {\n return $this->svn;\n }", "public static function getVersion()\n {\n $i = self::getVersionInfo();\n return trim(\"{$i['major']}.{$i['minor']}.{$i['revision']}\" . ($i['patch'] != '' ? \".{$i['patch']}\" : \"\")\n . \"-{$i['stability']}{$i['number']}\", '.-');\n }", "public function getSvnRevision()\n {\n return $this->_svnRevision;\n }", "function get_version();", "public static function getVersion();", "public static function getVersion();", "function version_svn_courante($dir) {\n\tif (!$dir) $dir = '.';\n\n\t// version installee par SVN\n\tif (lire_fichier($dir . '/.svn/entries', $c)\n\tAND preg_match_all(\n\t',committed-rev=\"([0-9]+)\",', $c, $r1, PREG_PATTERN_ORDER))\n\t\treturn -max($r1[1]);\n\n\t// version installee par paquet ZIP de SPIP-Zone\n\tif (lire_fichier($dir.'/svn.revision', $c)\n\tAND preg_match(',Revision: (\\d+),', $c, $d))\n\t\treturn intval($d[1]);\n\n\t// Bug ou paquet fait main\n\treturn 0;\n}", "public function getRev()\r\n {\r\n return $this[\"client_type\"] ? null : $this[\"client_version\"]->section(\"[\", 1)->filterDigits();\r\n }", "function svnGetRev( $dir, &$url = null ) {\n\t\n\t$cmd = \"svn info --non-interactive --xml \" . escapeshellarg( $dir );\n\t$retval = - 1;\n\t$result = svnShellExec( $cmd, $retval );\n\tif ( $retval ) {\n\t\tsvnError( 'extdist-svn-error', $result );\n\t\treturn false;\n\t}\n\n\ttry {\n\t\t$sx = new SimpleXMLElement( $result );\n\t\t$rev = strval( $sx->entry->commit['revision'] );\n\t\t$url = $sx->entry->url;\n\t} catch ( Exception $e ) {\n\t\t$rev = false;\n\t}\n\tif ( !$rev || strpos( $rev, '/' ) !== false || strpos( $rev, \"\\000\" ) !== false ) {\n\t\tsvnError( 'extdist-svn-parse-error', $result );\n\t\treturn false;\n\t}\n\t\n\treturn $rev;\n}", "public function getVersion()\n {\n return $this->_clientRequest('version');\n }", "function getVersion() ;", "function getVersion() ;", "public function version() { \r\n\r\n\t\t$args = array(); \r\n\t\t$results = $this->sendCommand('getversion',$args); \r\n\t\t\r\n\t\t// a return of 0 is a bad value\r\n\t\tif ($results == '0') { $results = null; } \r\n\r\n\r\n\t\treturn $results; \r\n\r\n\t}", "public function getVersion(): string;", "public function getVersion(): string;", "public function binaryVersion(): ?string\n {\n if (!self::$version) {\n if (0 === $this->process->execute('svn --version', $output)) {\n if (Preg::isMatch('{(\\d+(?:\\.\\d+)+)}', $output, $match)) {\n self::$version = $match[1];\n }\n }\n }\n\n return self::$version;\n }", "public function get_version(){\n\t\treturn $this->version;\n\t}", "public function get_version()\n {\n return $version;\n }", "public static function get_version()\n {\n }", "public static function get_version()\n {\n }", "public static function get_version()\n {\n }", "public static function GET_VERSION(): string\n\t{\n\t\treturn self::$version;\n\t}", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "public function getVersion();", "protected function getVersion() {\n\n\t \t\t \treturn $this->version;\n\t }", "public function getSvnUrl()\n {\n return $this->svnUrl;\n }", "public function getVersion()\n {\n return $this->__get(\"version\");\n }", "function getCliVersion();", "function as_version() {\n\treturn(\"1.00.00\");\n}", "public static function version() {\n $matches = array();\n preg_match( '/\\x24Revision:\\s([\\d\\.]+)\\s\\$/', '$Revision: 1.22 $', $matches );\n return $matches[0];\n }", "public function get_version() { \n\n\t\treturn $this->version; \n\n\t}", "public function _getVersion() {\n require_once( DIR_SYSTEM . 'osworx/libraries/tools/support.php' );\n $ret = OXSupport::getVersion(\n $this->_obj->_name,\n $this->_obj->_version,\n $this->_obj->config->get( $this->_obj->_name . '_supportKey'),\n $this->getLang()\n );\n\n return $ret;\n }", "public function getVersion()\n {\n return $this->soapClient(self::VERSION_SERVICE)->getVersion()->out;\n }", "protected function _getVersion()\r\n {\r\n return $this->version;\r\n }", "public static function getVersion () {}", "public function getVersion() {\r\n\t\t$responseArray = $this->getInfo();\r\n\t\treturn $responseArray['version'];\r\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "public function get_version() {\n\t\treturn $this->version;\n\t}", "function getVersion()\r\n\t{\r\n\t\treturn '1.1.2';\r\n\t}", "public function get_version()\n {\n return cms_version_number();\n }", "public function get_version()\n {\n return cms_version_number();\n }", "public function get_version()\n {\n return cms_version_number();\n }", "public function get_version()\n {\n return cms_version_number();\n }", "public function get_version()\n {\n return cms_version_number();\n }", "public function getVersion(): string\n {\n return $this->version;\n }", "public function getVersion(): string\n {\n return $this->version;\n }", "public function getVersion(): string\n {\n return $this->version;\n }", "public function getVersion(): string\n {\n return $this->version;\n }", "public function getVersion(): string\n {\n return $this->version;\n }", "public static function get_version() {\n\t\treturn self::$version;\n\t}", "public function ts_get_version() {\n $plugin_version = '';\n \n\t\t$plugin_data = get_file_data( self::$plugin_file_path, array( 'Version' => 'Version' ) );\n if ( ! empty( $plugin_data['Version'] ) ) {\n $plugin_version = $plugin_data[ 'Version' ];\n }\n return $plugin_version;;\n }", "function GetVersion()\n\t{\n\t\treturn '0.0.0.1';\n\t}", "public function get_version()\n {\n $l_data = $this->get_info();\n\n return $l_data[\"version\"];\n }", "public function get_version()\n\t{\n\t\treturn $this->version;\n\t}", "public function get_version()\n\t{\n\t\treturn $this->version;\n\t}", "public function getVersion() {\n return $this->getServiceResponse(\"version\");\n }", "private function getClientVersion()\n\t{\n\t\treturn (string) $this->clientVersion;\n\t}", "public function getVersion(): string {\n return $this->_version;\n }", "public function getVersion() {\n\t\treturn $this->parseString($this->generalConfig[\"version\"]);\n\t}", "function osc_get_version() {\n static $v;\n\n if (!isset($v)) {\n $v = trim(implode('', file(DIR_FS_CATALOG . 'includes/version.php')));\n }\n\n return $v;\n }", "function getVersion($client){\n global $server;\n \n if($this->checkClient($client) == null) {\n $this->log->logAlert('client not found', 'function: getVersion');\n $server->fault('Server', 'client not found', 'getVersion', 'details: '.$this->today); \n }\n \n return $this->version; \n }", "public function getVersion() {\n return (string)$this->getInfoValue('version', '');\n }", "function version() {\n\tchdir(SCALAR);\n\treturn exec('git log --source -1 --pretty=oneline');\n}", "public function getVersion() {\n\t\treturn $this->version;\n\t}", "public function getVersion() {\n\t\treturn $this->version;\n\t}", "public function getVersion() {\n\t\treturn $this->version;\n\t}", "function vuetiful_get_version() {\n\treturn '1.0.0';\n}", "function GetVersion()\n {\n return '0.1';\n }", "public function get_version() {\n\t\t\treturn $this->version;\n\t\t}", "public function get_version() {\n\t\t\treturn $this->version;\n\t\t}", "public function get_version() {\n\t\t\treturn $this->version;\n\t\t}", "public function getVersion()\n {\n $output = $this->querySabnzbd('mode=version&output=json');\n $response = json_decode($output, true);\n\n return $response['version'];\n }", "public function getVersion() {\n return trim($this->getResource('VERSION'));\n }", "public function getVersion() {\r\n\t\treturn $this->version;\r\n\t}", "public function getVersion ()\n {\n return $this->version;\n }", "function getVersion()\n {\n return $this->_ver;\n }", "public function getVersion() {\r\r\n\t\treturn self::$version;\r\r\n\t}", "public function getVersion()\n\t{\n\t\treturn $this->_version;\n\t}", "public function GetClientVersion() {\n\t\treturn $this->clientversion;\n\t}", "public function getVersion()\n {\n return \\Includes\\Utils\\Converter::composeVersion($this->getMajorVersion(), $this->getMinorVersion());\n }", "public function getVersion () {\n\treturn ($version = file_get_contents('VERSION'))\n\t ? $version : \"JSunic 0.0 Invalid\";\n }" ]
[ "0.73978204", "0.70427597", "0.70182896", "0.69187987", "0.6874328", "0.6832942", "0.6832942", "0.6757236", "0.6749678", "0.6733095", "0.6695932", "0.66900086", "0.66900086", "0.6656842", "0.66498613", "0.66498613", "0.66298705", "0.66057956", "0.65932435", "0.65915704", "0.6589899", "0.65895605", "0.6570794", "0.657018", "0.657018", "0.657018", "0.657018", "0.657018", "0.657018", "0.657018", "0.657018", "0.657018", "0.657018", "0.657018", "0.657018", "0.657018", "0.657018", "0.657018", "0.657018", "0.6557482", "0.6556973", "0.6548324", "0.65464646", "0.6545943", "0.65421385", "0.65304863", "0.6528617", "0.65054065", "0.65006626", "0.64877164", "0.64861673", "0.6483908", "0.6483908", "0.6483908", "0.6483908", "0.6483908", "0.6483908", "0.6472211", "0.6468673", "0.6468673", "0.6468673", "0.6468673", "0.6468673", "0.6462848", "0.6462848", "0.6462848", "0.6462848", "0.6462848", "0.6457144", "0.6447156", "0.64469343", "0.6434113", "0.6429206", "0.6429206", "0.64027816", "0.6397184", "0.63886625", "0.6385321", "0.63772285", "0.63747585", "0.63717604", "0.6368736", "0.6367933", "0.6367933", "0.6367933", "0.6365376", "0.6364998", "0.63639003", "0.63639003", "0.63639003", "0.6361984", "0.6356521", "0.63540244", "0.635397", "0.6353618", "0.63481265", "0.6348094", "0.6347578", "0.6338531", "0.6332922" ]
0.7992857
0
Get the command svnadmin
Получить команду svnadmin
public static function svnadminCommand($cmd) { return "svnadmin --config-dir /USVN/fake $cmd"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCommandString()\n {\n return $this->command_string;\n }", "public function getCommand(): string;", "function getCommand() {\n\t\treturn 'list';\n\t}", "public function get_command()\n\t{\n\t\t$params = '';\n\n\t\tif ($this->params)\n\t\t\t$params = ' ' . implode(' ', $this->params);\n\n\t\treturn $this->command . $params;\n\t}", "public function getCommand(): string\n {\n return $this->command;\n }", "public function command(): string;", "public function getCmd()\n {\n return $this->call('cmd');\n }", "public function getCommand();", "public function getCommand();", "public function getCommand()\n {\n return $this->cmd;\n }", "public function getCommand() {}", "public function get_command_name()\n\t{\n\t\treturn $this->command;\n\t}", "public function getFullCommand()\n {\n return $this->_cmd . ' ' . implode(' ', $this->_args);\n }", "public function std_command();", "public function getCmd()\n {\n return $this->cmd;\n }", "public function getCmd()\n {\n return $this->cmd;\n }", "public function getCommand()\n {\n return $this->trans->command;\n }", "public function getCommand()\n {\n return $this->trans->command;\n }", "public function getCmd(){\n\t\t\t$command = $this->config['cmd'];\n\t\t\t$setting = $this->setting;\n\t\t\tif(!empty($setting['number']['value'])){\n\t\t\t\t$command .= ' -n '.$setting['number']['value'];\n\t\t\t}\n\t\t\tif(!empty($setting['since']['value'])){\n\t\t\t\t$command .= ' --since=\"'.$setting['since']['value'].'\"';\n\t\t\t}\n\t\t\tif(!empty($setting['skip']['value'])){\n\t\t\t\t$command .= ' --skip='.$setting['skip']['value'];\n\t\t\t}\n\t\t\t$this->setting['command'] = $command;\n\t\t\treturn $command;\n\t\t}", "function e107cli_get_command() {\n return e107cli_get_context('command');\n}", "public function getAdminCommands()\n {\n return self::$commandsList;\n }", "public function getCommand()\n {\n return $this->command;\n }", "protected function executeAdminCommand() {}", "protected function executeAdminCommand() {}", "function getCommand()\n\t{\n\t\treturn $this->command;\n\t}", "public function getCommand()\n {\n return sprintf('stats-tube %s', $this->_tube);\n }", "public function getCommand()\n {\n return sprintf('stats-tube %s', $this->_tube);\n }", "public function getWpCommand()\n {\n $wpcmd = 'wp --path='.$this->remoteSettings->localpath.' --allow-root ';\n\n return $wpcmd;\n }", "public static function svnCommand($cmd)\n\t{\n\t\treturn \"svn --config-dir /USVN/fake $cmd\";\n\t}", "abstract public function getCommandName();", "public function getCommand()\n\t{\n\t\treturn $this->_command;\n\t}", "public function adminGetAllCommands()\n {\n return $this->_clientRequest('serverInfo');\n }", "public static function getCommandName(): string\n {\n return \"Update Database\";\n }", "public function getCommand()\n\t\t{\n\t\t\treturn $this->command;\n\t\t}", "public function getCommand()\n\t\t{\n\t\t\treturn $this->command;\n\t\t}", "public function getCommand()\n {\n return $this->command;\n }", "public function getCommand()\n {\n return $this->command;\n }", "public function getCommand()\n {\n return $this->command;\n }", "public function getCommand()\n {\n return $this->command;\n }", "public function getCommand()\n {\n return $this->command;\n }", "public function getCommand()\n {\n return $this->command;\n }", "public function getCommand()\n {\n return $this->command;\n }", "public function getCommand()\n {\n return $this->command;\n }", "public function getCommand()\n {\n return $this->command;\n }", "public function command()\n {\n $this->assertParsed();\n\n return $this->storage['command'];\n }", "protected function getCommandName()\n {\n return self::COMMAND;\n }", "abstract protected function getCommand();", "public function get_command()\n\t{\n\t\t$this->result = array();\n\t\t$commandstring = $this->type;\n\n\t\tforeach ($this->commands as $commandobj)\n\t\t{\n\t\t\t$commandstring .= \"\\n\" . $commandobj->get_command();\n\t\t}\n\n\t\t$commandstring .= \"\\ncommand_list_end\";\n\n\t\treturn $commandstring;\n\t}", "public function getCronCmd() {}", "public function getCommandName(): string;", "public function getCommandName(): string;", "public function getCommand() {\n\t\treturn $this->command;\n\t}", "abstract public function getCommand(): string;", "public function getCommandName();", "public function getCommandName();", "public function getCommand()\n {\n return $this->oCommand;\n }", "abstract public function getConsoleCommands() ;", "protected function getCommandLine()\n {\n return implode(' ', array_map([$this, 'escapeArgument'], $this->command));\n }", "public static function getCommandName(): string\n {\n return 'make:domain:command';\n }", "function ju_cli_cmd():string {return ju_cc_s(ju_cli_argv());}", "protected function getCommand()\n {\n return sprintf('/usr/bin/env php %s/../server.php %d', __DIR__, $this->port);\n }", "protected function getUsage()\n {\n \t$cmd = basename($this->argv[0]);\n \treturn \"Usage : $cmd -all / $cmd dirName\";\n }", "public function getAdminName(): string\n {\n return $this->adminName;\n }", "public function getCommand(): ServerCommand;", "public function getOperationAdminString($string_key) {\n $info = $this->operationInfo();\n return $info[$string_key];\n }", "public function getCommandList()\n {\n $this->addCommandLine('useradd '.$this->user);\n $this->addCommandLine('yes '.$this->password.' | sudo passwd '.$this->user);\n\n /*$this->addCommandLine('echo \"PASSWORD CHANGE: '.$this->user.'\"');\n $this->addCommandLine('passwd '.$this->user);*/\n\n //sudo yes aaa | sudo passwd my1_nemundo_ch\n\n\n return parent::getCommandList();\n\n }", "public function getUmountCmdLine()\n {\n return ' '.$this->group.'/'.$this->name;\n }", "public static function getSvnVersion()\n\t{\n\t\treturn USVN_SVNUtils::parseSvnVersion(USVN_ConsoleUtils::runCmdCaptureMessage(USVN_SVNUtils::svnCommand(\"--version --quiet\"), $return));\n\t}", "public function getCommandName()\n {\n return self::NAME;\n }", "static function script_admin()\n {\n }", "public static function getAdmin(){\n\t\tself::parseUrl();\n\t\tif(isset(self::$urlSegments[0]) && self::$urlSegments[0] == 'admin'){\n\t\t\treturn 'admin';\n\t\t}\n\t\treturn null;\n\t}", "public function getCommandName(): string\n\t{\n\t\treturn 'config-project';\n\t}", "function getCommandLink($a_cmd)\n\t{\n\t\t// separate method for this line\n\t\t$cmd_link = \"ilias.php?baseClass=ilObjSurveyQuestionPoolGUI&amp;ref_id=\" . $this->ref_id . \"&amp;cmd=$a_cmd\";\n\n\t\treturn $cmd_link;\n\t}", "public function commandName(): string\n {\n }", "public function ExecutedCommand() {\n return $this->executedCommandText;\n }", "protected function getAdminUrl()\n {\n $currentUrl = Tools::getHttpHost(true) . (isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '');\n $parsedUrl = NostoSDKHttpRequest::parseUrl($currentUrl);\n $parsedQueryString = NostoSDKHttpRequest::parseQueryString($parsedUrl['query']);\n $validParams = array(\n 'controller',\n 'token',\n 'configure',\n 'tab_module',\n 'module_name',\n 'tab',\n );\n $queryParams = array();\n foreach ($validParams as $validParam) {\n if (isset($parsedQueryString[$validParam])) {\n $queryParams[$validParam] = $parsedQueryString[$validParam];\n }\n }\n $parsedUrl['query'] = http_build_query($queryParams);\n\n return NostoSDKHttpRequest::buildUrl($parsedUrl);\n }", "protected function getCommand()\n {\n return sprintf('zip --password %s %s %s',\n escapeshellarg($this->password),\n escapeshellarg($this->getOutputFilename()),\n escapeshellarg($this->filename)\n );\n }", "public function getAdminInfo()\n {\n return \"\";\n }", "public function getAdminName()\n {\n return $this->adminName;\n }", "private function _getLogCommandArguments()\n\t{\n\t\t$query_flags = $this->_getRevisionQueryFlags();\n\n\t\t$ret = '-r %d:%d --xml';\n\n\t\tif ( in_array(self::FLAG_VERBOSE, $query_flags) ) {\n\t\t\t$ret .= ' --verbose';\n\t\t}\n\n\t\tif ( in_array(self::FLAG_MERGE_HISTORY, $query_flags) ) {\n\t\t\t$ret .= ' --use-merge-history';\n\t\t}\n\n\t\t$ret .= ' {%s}';\n\n\t\treturn $ret;\n\t}", "protected function getCommand()\n {\n return $this->getSshCommand(\n parent::getCommand(),\n $this->get('node'), $this->expand($this->cwd)\n );\n }", "public function getCommand()\n {\n return 'init';\n }", "public function get_synopsis() {\n\t\treturn '<command>';\n\t}", "function getCliVersion();", "function ju_cli_script():string {return ju_cli_argv(0);}", "protected function _getCommandsDelete()\n {\n $commands[] = \"vhost -N {$this->_getEscapedLabel()} delete\";\n return $commands;\n }", "public function __tostring() {\n return $this->command;\n }", "protected function _buildCommand(): string\n {\n // @TODO: Implement _buildCommand() method.\n }", "public function getCommand()\n {\n $this->_checkAllPartsAreSet();\n \n $parts = array();\n\n $parts[] = $this->_commandPath . '/' . $this->_commandName;\n $parts[] = $this->_joinParameter;\n \n // add input files\n foreach ($this->_inputFiles as $inputFile) {\n $parts[] = $inputFile;\n }\n $parts[] = $outputFile;\n \n $command = join(' ', $parts);\n \n return $command;\n }", "public static function get_order_admin_screen() : string\n {\n }", "public function proc_see_admin_status(){\n\t\treturn $this->db->get('admin');\n\t}", "private function _get_generated_command() {\n return preg_replace_callback(self::PLACEHOLDER, array($this, '_replace_parameters_values'), $this->get_sql());\n }", "protected function getCommand($bound)\n {\n return sprintf('%s %u', $this::COMMAND, $bound);\n }", "public function getAfterCreationCmd(): string\n {\n return \"editProperties\";\n }", "function pestle_cli($argv)\n{\n return \\Pulsestorm\\Magento2\\Cli\\Generate\\Acl\\exported_pestle_cli($argv);\n}", "public function getAdminInfo()\n {\n return '';\n }", "public function getLongVersion()\n\t{\n\t\t$version = parent::getLongVersion();\n\n\t\t/** @var Connector $repository_connector */\n\t\t$repository_connector = $this->dic['repository_connector'];\n\t\t$client_version = $repository_connector->getCommand('', '--version --quiet')->run();\n\n\t\treturn $version . ' (SVN <comment>v' . trim($client_version) . '</comment>)';\n\t}", "protected function getCommand() {\n $this->application->add(new UpdateValueCommand());\n $command = $this->application->find('update:value');\n\n return $command;\n }", "public function adminOut()\n\t{\n\t\treturn $this->res_admin;\n\t}", "public function getUsrcadmin()\n {\n return $this->usrcadmin;\n }" ]
[ "0.65339535", "0.6271937", "0.62269443", "0.6217353", "0.61532426", "0.60984904", "0.6096136", "0.60774755", "0.60774755", "0.6049134", "0.60457367", "0.60316586", "0.6030139", "0.6020228", "0.6010968", "0.6010968", "0.60051155", "0.60051155", "0.5955805", "0.5926579", "0.58892363", "0.5887831", "0.58852977", "0.58846164", "0.5856338", "0.58553267", "0.58553267", "0.58325154", "0.5824269", "0.5823318", "0.5810447", "0.58099145", "0.5804591", "0.57966506", "0.57966506", "0.5789914", "0.5789914", "0.5789914", "0.5789914", "0.5789914", "0.5789914", "0.5789914", "0.5789914", "0.5789914", "0.5771433", "0.57701916", "0.5764952", "0.57552505", "0.5746018", "0.57328796", "0.57328796", "0.57049024", "0.56913465", "0.5680331", "0.5680331", "0.5677267", "0.55967844", "0.5591852", "0.55902845", "0.55877835", "0.5563148", "0.5556161", "0.5553868", "0.5548347", "0.5543786", "0.5515401", "0.55087125", "0.5497607", "0.5489815", "0.54813045", "0.547191", "0.54701304", "0.54689205", "0.54657066", "0.5460171", "0.5459238", "0.5447332", "0.54401785", "0.5428426", "0.54222685", "0.5381241", "0.53682095", "0.53606147", "0.535725", "0.5344608", "0.5343756", "0.5342596", "0.53400415", "0.5316521", "0.5315951", "0.5309182", "0.5305268", "0.53036135", "0.5300666", "0.5299585", "0.5293035", "0.5292833", "0.5289813", "0.5277771", "0.52673686" ]
0.71213514
0
Get the path to the templates repository in URL form (file://...).
Получите путь к репозиторию шаблонов в виде URL (file://...).
private static function getTemplatesRepoFileUrl( $config ) { $path = self::getTemplatesRepoFilesystemPath( $config ); if( empty( $path ) ) { return NULL; } return self::getRepositoryFileUrl( $path ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_path() {\n\t\tif ( ! empty( $this->branch ) ) {\n\t\t\treturn TEMPLATE_REPO_PATH . $this->username . '/' . $this->repository . '/' . $this->branch . '/';\n\t\t}\n\t\treturn TEMPLATE_REPO_PATH . $this->username . '/' . $this->repository . '/';\n\t}", "function getTemplatePath();", "public static function getTemplatePath();", "public function getTemplatePath();", "public function getTemplatePath(): string;", "function getTemplatePath()\r\n {\r\n \r\n if($this->status) return false;\r\n \r\n $file = explode(\".\", $this->row['file']);\r\n array_pop($file); \r\n //return preg_replace(\"@([^:])//+@\", \"$1/\", $_BASE.\"/cms/templates/\".implode(\".\", $file).\"/\");\r\n return make_base( \"/cms/templates/\".implode(\".\", $file) );\r\n }", "function getTemplatePath() {\n\t\t$plugin =& $this->getThesisFeedPlugin();\n\t\treturn $plugin->getTemplatePath() . 'templates/';\n\t}", "abstract public function getTemplatePath();", "public final function getTemplateUrl()\n\t{\n return $this->_getUrl('template');\n\t}", "public function getRelativePath()\n {\n $templates = $this->config['directories']['templates'];\n\n $extension = $this->config['templates']['extension'];\n\n return $templates . '/' . $this->getFilename($extension);\n }", "public function getUrl()\n {\n return str_replace($_SERVER['DOCUMENT_ROOT'], '', $this->getPath());\n }", "public function getLocalPath() {\n $path = $this\n ->papaya()\n ->options\n ->getOption('PAPAYA_PATH_TEMPLATES');\n return PapayaUtilFilePath::cleanup($path.'/'.$this->getTemplate());\n }", "public function getTemplatePathAndFilename() {}", "public function getTemplatePathAndFilename() {}", "protected function getTemplatePath() {\r\n\t\ttry {\r\n\t\t\treturn LBoxUtil::fixPathSlashes($this->templatePath .\"/\". $this->getTemplateFileName());\r\n\t\t}\r\n\t\tcatch (Exception $e) {\r\n\t\t\tthrow $e;\r\n\t\t}\r\n\t}", "public function template_path()\n {\n }", "protected function get_uri() {\n\t\t\treturn get_template_directory_uri() . DIRECTORY_SEPARATOR;\n\t\t}", "private static function getTemplatesRepoFilesystemPath( $config )\n\t{\n\t\tif( empty( $config->projectTemplates ) ||\n\t\t empty( $config->projectTemplates->repoName ) )\n\t\t{\n\t\t\treturn NULL;\n\t\t}\n\t\t\n\t\treturn self::getRepositoryFilesystemPath( $config, $config->projectTemplates->repoName );\n\t}", "public function getRepositoryPath();", "public function ts_get_template_path() {\n\t\t\n \treturn untrailingslashit( plugin_dir_path( __FILE__ ) ) . '/templates/';\n }", "function getTemplateURL() {\n\t\treturn $this->_templateURL;\n\t}", "function getTemplateLocation() ;", "public function getTemplatePath(): string\n {\n return (string)$this->templatePath;\n }", "public static function getURLTemplate() {\n\t\tif (self::$_urlTemplate === null)\n\t\t\tself::loadFromFile();\n\t\treturn self::$_urlTemplate;\n\t}", "public function getTemplateUrl()\n {\n\n return $this->template_url;\n }", "public function getTemplatePath()\n {\n\n if ($this->tplInCode)\n return PATH_GW.'/';\n else\n return PATH_GW.'templates/';\n \n }", "public static function get_template_path() {\n return DIR.'app/templates/'.Session::get('template').'/';\n }", "public final function getTemplatePath()\n\t{\n\t\treturn $this->getTemplateDir(0) . $this->getTemplatesDir() . DIRECTORY_SEPARATOR;\n\t}", "public function getTemplatesPath()\n {\n return realpath( join($this->directory_separator, [ __DIR__ , '..', 'templates'] ));\n }", "protected function getBaseTemplatePath(): string {\n $ds = FileSystem::getDS();\n $baseTemplatePath = FileSystem::getRoot() . $ds . 'template' . $ds . 'Standart';\n return $baseTemplatePath;\n }", "protected function getTemplatePath()\n {\n\treturn $this->getPathByOptionOrConfig('templatePath', 'view_template_path');\n }", "public function getTemplatePath(): string\n {\n return $this->templatePath;\n }", "public function template_path() {\n return apply_filters( 'store_api_template_path', 'store-api/' );\n }", "protected function getTemplatePathAndFilename() {}", "public function getTemplateSpecUrl()\n {\n $value = $this->get(self::TEMPLATE_SPEC_URL);\n return $value === null ? (string)$value : $value;\n }", "function template_path($file)\n{\n $template = new Template(config());\n\n return $template\n ->setFile($file)\n ->getRelativePath();\n}", "function get_template_path() {\n $uri = parse_url( get_template_directory_uri() );\n return $uri[\"path\"];\n}", "public function template_path(){\n\t\treturn apply_filters( 'wcic_template_path', '/' );\n\t}", "public function get_template_directory_uri()\n {\n }", "public static function getTemplatePath()\n\t{\n\t\treturn (static::$templatePath);\n\t}", "public function getUrl()\n {\n $App = Factory::getApplication();\n $basePath = $App->getPathBase();\n return str_replace($basePath . '/', '', $this->filename);\n }", "public function getTemplatePath()\n {\n return $this->pathResolver->getTemplatePath();\n }", "function getTemplatePath()\n\t{\n\t\treturn $this->template_path;\n\t}", "public function getPath() {\n\t\treturn $this->templatePath;\n\t}", "public function template_path()\n {\n return TDLW_TEMPLATES_DIR;\n }", "protected function getTemplatePath()\n {\n return base_path('vendor/pradility/seedera/src/Templates/seeder.txt');\n }", "public function getTemplatesDir(): string;", "private function getPathTemplate() {\n\n return sprintf('%s/%s.html.twig', $this->pathTemplate, $this->motivo);\n }", "protected function getTemplatePath()\n {\n return $this->config->get('laroute.template');\n }", "public final function getModuleTemplateUrl()\n\t{\n return $this->_getUrl('module_template');\n\t}", "public function getTemplatePath()\n {\n // get template filename\n $useRepositoryLayer = config('generator.use_repository_layer', false);\n $useServiceLayer = config('generator.use_service_layer', false);\n\n if ($useServiceLayer && $useRepositoryLayer) {\n $templateFilename = 'Controller_Service';\n } elseif ($useRepositoryLayer) {\n $templateFilename = 'Controller_Repository';\n } else {\n $templateFilename = 'Controller_Request';\n }\n return 'scaffold/' . $templateFilename;\n }", "function get_repo_url()\n {\n return $this->config->item('repo_url');\n }", "public static function getEmailTemplatePath();", "public function getUrl() {\n $config = $this->getConfig();\n $baseUrl = $this->isReadOnly()\n ? $config->getReadBaseUrl()\n : $config->getWriteBaseUrl()\n ;\n $index = $config->getIndex();\n $path = $this->getPath();\n\n $url = $baseUrl . '/' . $index . $path;\n\n return $url;\n }", "public function getTemplateRootPath() {\n \treturn $this->getDirectoryName($this->templateRootPath);\n }", "public function getUrl(): string\n {\n $filePath = $this->owner->{$this->filePathAttribute};\n\n if ($filePath) {\n return rtrim(Yii::$app->params['baseStorageUrl'], '/') . '/' . ltrim($filePath, '/');\n }\n\n return '';\n }", "public function getRessourcePath();", "public function getTemplatePath()\n {\n\n return $this->template_path;\n }", "public function getUrl()\n {\n return $this->rootUrl.$this->path;\n }", "public function getTemplatePath()\n {\n return 'tpl/pages/';\n }", "public function getUrl(): string\n {\n $path = $this->getPath();\n\n return $this->disk()->url($path);\n }", "function getTemplatesPath() {\n return __DIR__ . \"/templates/routing\";\n }", "public function getTemplatePath(): string\n\t{\n\t\treturn \"Widget/{$this->type}.tpl\";\n\t}", "function fa_template_path( $template ){\t\n\t$file = 'template-' . $template . '.php'; \n\treturn fa_view_path($file);\t\n}", "public function getWebversionUrl() {\n if ($webMailUrl = $this->module->genWebMailUrl()) {\n if (Url::isRelative($webMailUrl))\n return Url::home(true) . $webMailUrl;\n else\n return $webMailUrl;\n } else {\n return null;\n }\n }", "function path()\n {\n // Load the string helper\n $this->EE->load->helper('string');\n $src = $this->EE->TMPL->fetch_param('src');\n $src = str_replace(array(\"'\", '\"'), '', $src);\n $src = preg_replace(\"/(.+?(\\/))index(\\/)(.*?)/\", \"\\\\1\\\\2\", $src);\n $src = preg_replace(\"/(.+?(\\/))index$/\", \"\\\\1\", $src);\n $current = $this->EE->TMPL->fetch_param('use_current');\n\n // Use current protocol on includes like javascript / css\n if(strtolower($current) == 'true'){\n if(isset($_SERVER[\"HTTPS\"])){\n $base = $this->_secure_url(trim_slashes($src));\n $out = reduce_double_slashes($base);\n return $out;\n }else{\n return $this->EE->functions->create_url($src);\n }\n }\n\n // Else use http or https based on the target\n if( strpos($src,$this->_config[\"store\"][$this->site_id][\"checkout_url\"]) !== false ||\n strpos($src,$this->_config[\"store\"][$this->site_id][\"customer_url\"]) !== false){\n $base = $this->_secure_url(trim_slashes($src));\n $out = reduce_double_slashes($base);\n return $out;\n }elseif (strtolower($src) == 'logout'){\n $qs = ($this->EE->config->item('force_query_string') == 'y') ? '' : '?';\n $XID = $this->EE->security->generate_xid();\n return $this->_secure_url($qs.'ACT='.$this->EE->functions->fetch_action_id('Member', 'member_logout').'&XID='.$XID);\n }else{\n return $this->EE->functions->create_url($src);\n }\n }", "public function templateDirectory(): String\n {\n return $this->templateDirectory;\n }", "public function getRepositoryPath(): string\n {\n return $this->repositoryPath;\n }", "private function getModuleTemplatePath(): string\n {\n return sprintf('@Modules/%s/views/templates/admin/', $this->name);\n }", "public function getBaseUrl()\n {\n if ( !empty($this->base_url) ) return $this->base_url;\n\n return $this->base_url = get_template_directory_uri();\n }", "public function getTemplateFilepath($_template)\n {\n $_files = explode('|', $_template->resource_name);\n $_filepath = $_template->buildTemplateFilepath ($_files[0]);\n if ($_template->security) {\n $_template->smarty->security_handler->isTrustedResourceDir($_filepath);\n } \n\n return $_filepath;\n }", "public function getTemplatePath() {\n\t\treturn $this->_options['templatePath'];\n\t}", "public function getURL()\n {\n return $this->_get_template($this->type_link, $this->CI->config->item('link'));\n }", "public function getRelativePath(): string;", "public function getRelativePath(): string;", "public function getUrl()\n {\n return Yii::getAlias('@storageUrl/source/'.$this->path);\n }", "function getURL() {\n\t\treturn Director::baseURL() . $this->getFilename();\n\t}", "public function getUrl() : string {\n return $this->manager->getContext()->getUrl('/' . $this->manager->getTargetWebPath() . '/' . $this->getTargetRelativePath());\n }", "function tmsc_get_baseurl() {\n\treturn plugin_dir_url( __FILE__ );\n}", "public function getBackendTemplatePath()\n {\n return $this->getPath() . 'templates/';\n }", "public function ___url() {\n\t\tif(!is_null($this->url)) return $this->url;\n\t\tif(strpos($this->path(), $this->config->paths->files . self::extendedDirName) !== false) {\n\t\t\t$this->url = $this->config->urls->files . self::_dirExtended($this->page->id); \n\t\t} else {\n\t\t\t$this->url = $this->config->urls->files . $this->page->id . '/';\n\t\t}\n\t\treturn $this->url;\n\t}", "public function getPath($cPanel_extension=false) {\n if ($cPanel_extension) {\n return (defined('CDN_ENABLED') && CDN_ENABLED) ? sprintf('//%s/%s', CDN_VENDOR, $this->ext_template) : sprintf('//%s/%s', $_SERVER['HTTP_HOST'], $this->ext_template);\n } else {\n return (defined('CDN_ENABLED') && CDN_ENABLED) ? sprintf('//%s/%s', CDN_VENDOR, $this->template) : sprintf('//%s/%s', $_SERVER['HTTP_HOST'], $this->template);\n }\n }", "public function getURL()\n\t{\n\t\tif ($this->element->config->find('files._s3', 0)) // Amazon S3\n\t\t{\n\t\t\t$bucket = $this->element->config->find('files._s3bucket');\n\t\t\treturn $this->element->_S3()->getAuthenticatedURL($bucket, $this->getPathname(), 3600);\n\t\t} else if ($rel_url = $this->app->path->url(\"root:{$this->getPathname()}\")) {\n\t\t\treturn $rel_url;\n\t\t} else {\n\t\t\treturn $this->getPathname();\n\t\t}\n\t}", "public function getTemplatePath()\n {\n return $this->templatePath;\n }", "public function getTemplatePath()\n {\n return $this->templatePath;\n }", "public function getTemplatePath()\n {\n return $this->templatePath;\n }", "public function getTemplatePath(): string\n {\n return '@Core/components/carousel.html';\n }", "protected function getPath()\n {\n $optionPath = $this->option('path');\n $path = (! empty($optionPath)) ? $this->option('path') : $this->laravel['config']->get('rest-generators::paths.repository');\n\n return $path . '/' . ucwords($this->argument('name')) . 'Repository.php';\n }", "public static function get_template_directory_uri () {\r\n\t\t\tstatic $uri;\r\n\r\n\t\t\tif ( ! $uri ) {\r\n\t\t\t\t$uri = \\get_template_directory_uri();\r\n\t\t\t}\r\n\r\n\t\t\treturn $uri;\r\n\t\t}", "public function getDbTemplatePath();", "public function getThemeTemplatePath();", "public function getFrontendTemplatePath()\n {\n return $this->getPath() . 'templates/';\n }", "public function getTemplatesPath()\n {\n return $this->templatesPath;\n }", "public function getTemplatePath() {\n\t\treturn $this->templatePath;\n\t}", "protected function getUrlTemplate()\n {\n if (!isset($this->urlTemplate)) {\n $parameters = array();\n\n /**\n * Size\n */\n if ($this->size) {\n $parameters[] = sprintf('s=%s', (int)$this->size);\n }\n\n /**\n * Maximum Rating\n */\n if ($this->maximumRating) {\n $parameters[] = sprintf('r=%s', urlencode($this->maximumRating));\n }\n\n /**\n * Default Image\n */\n if ($this->defaultImage) {\n $parameters[] = sprintf('d=%s', urlencode($this->defaultImage));\n }\n\n /**\n * Default Image\n */\n if ($this->forceDefaultImage) {\n $parameters[] = 'f=y';\n }\n\n /**\n * Build Template\n */\n if (count($parameters) > 0) {\n $this->urlTemplate = sprintf('%s/%%s.jpg?%s', $this->baseUrl, implode('&', $parameters));\n } else {\n $this->urlTemplate = sprintf('%s/%%s.jpg', $this->baseUrl);\n }\n }\n\n return $this->urlTemplate;\n }", "public function getTemplatePath() {\n return $this->getPath() . '/template/' . APPLICATION_TEMPLATE;\n }", "private function getTemplatePath($template) {\n if ($this->theme_overloading) {\n if ($file = locate_template([$template])) {\n return $file;\n }\n }\n\n return $this->template_directory . $template;\n }", "private function get_source_path(){\r\n\t\tif( strpos($this->source['url'], get_bloginfo('url')) === 0 ) {\r\n\t\t\treturn ABSPATH . str_replace(get_bloginfo('url'), '', $this->source['url']);\r\n\t\t}else{\r\n\t\t\treturn $this->source['url'];\r\n\t\t}\r\n\t}", "protected function get_path() {\n\t\t\treturn get_template_directory() . DIRECTORY_SEPARATOR;\n\t\t}", "private function resolveTemplate()\n\t{\t\t\t\n\t\t$templatePath = Helpers::JoinPaths([Config::$templatesFolder, $this->name . '.php']);\n\t\t\n\t\tif(!file_exists($templatePath))\n\t\t{\n\t\t\t# default template to config value\t\t\t\n\t\t\t$templatePath = Helpers::JoinPaths([Config::$templatesFolder, Config::$defaultTemplate]);\n\t\t}\n\n\t\treturn $templatePath;\t\t\n\t}" ]
[ "0.7579477", "0.74242693", "0.7397564", "0.730694", "0.7272787", "0.71909463", "0.7102072", "0.6992247", "0.6966271", "0.69631416", "0.68608123", "0.6833985", "0.68304896", "0.68286663", "0.6819686", "0.6812738", "0.6810264", "0.6798686", "0.67966235", "0.6794607", "0.67894995", "0.67636734", "0.67334986", "0.6731848", "0.67218274", "0.67160815", "0.67157936", "0.6697806", "0.66975486", "0.66968405", "0.66913587", "0.6686968", "0.6672304", "0.66696364", "0.66605806", "0.66192025", "0.66145575", "0.66138417", "0.6611998", "0.66021717", "0.65873253", "0.65846944", "0.65694594", "0.6558576", "0.6550662", "0.6546052", "0.6539031", "0.6527749", "0.6515511", "0.65071046", "0.6495996", "0.64935464", "0.6460698", "0.6446456", "0.64458483", "0.6427638", "0.64207506", "0.6418763", "0.6411658", "0.6405536", "0.63972497", "0.6392714", "0.6389406", "0.63844186", "0.63808113", "0.6379002", "0.6377208", "0.63747966", "0.6372171", "0.6372021", "0.637129", "0.63649094", "0.6363838", "0.6362457", "0.6362457", "0.6360008", "0.6335705", "0.63297683", "0.6326367", "0.6322597", "0.63182676", "0.63159794", "0.6303526", "0.6297387", "0.6297387", "0.6297387", "0.6290634", "0.6288519", "0.62828547", "0.62801576", "0.627274", "0.62704414", "0.6261786", "0.62590307", "0.6257557", "0.625209", "0.6248699", "0.6241008", "0.62349194", "0.62340343" ]
0.7522769
1
Get the list of repository templates.
Получить список шаблонов репозиториев.
public static function getRepositoryTemplates() { $config = Zend_Registry::get('config'); $path = self::getTemplatesRepoFileUrl( $config ); if( empty( $path ) ) { return NULL; } $cmd_output = USVN_ConsoleUtils::runCmdCaptureMessageUnsafe( USVN_SVNUtils::svnCommand("ls $path"), $return_code ); if ($return_code) { throw new USVN_Exception(T_("Can't list subversion templates repository: %s"), $cmd_output); } $template_list = explode("\n", $cmd_output); $template_hash = array(); foreach( $template_list as $value ) { if( empty($value) ) continue; $trimmed_value = substr( $value, 0, -1 ); $template_hash[$trimmed_value] = $trimmed_value; } return $template_hash; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTemplates();", "public function getTemplates();", "public function getTemplates()\n {\n $response = $this->prepareHttpClient('/templates')\n ->send();\n\n return $this->parseResponse($response);\n }", "function getTemplatesListing()\r\n\t{\r\n\t\t$templatesPath\t= COMMUNITY_BASE_PATH . DS . 'templates';\r\n\t\t$templates\t\t= array();\r\n\r\n\t\tif( $handle = @opendir($templatesPath) )\r\n\t\t{\r\n\t\t\twhile( false !== ( $file = readdir( $handle ) ) )\r\n\t\t\t{\r\n\t\t\t\t// Do not get '.' or '..' or '.svn' since we only want folders.\r\n\t\t\t\tif( $file != '.' && $file != '..' && $file != '.svn' )\r\n\t\t\t\t\t$templates[]\t= $file;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t$html\t= '<select name=\"template\" style=\"width: 200px;\" onchange=\"azcommunity.changeTemplate(this.value);\">';\r\n\t\t\r\n\t\t$html\t.= '<option value=\"none\" selected=\"true\">' . JText::_('CC SELECT A TEMPLATE') . '</option>';\r\n\t\tfor( $i = 0; $i < count( $templates ); $i++ )\r\n\t\t{\r\n\t\t\t$html\t.= '<option value=\"' . $templates[$i] . '\">' . $templates[$i] . '</option>';\r\n\t\t}\r\n\t\t$html\t.= '</select>';\r\n\t\t\r\n\t\treturn $html;\r\n\t}", "public function get_template_list() {\n\t\t\t$result_list = array(\n\t\t\t\t'' => esc_html__( '-- Select template --', 'Croco-school' ),\n\t\t\t);\n\n\t\t\t$templates = Elementor\\Plugin::$instance->templates_manager->get_source( 'local' )->get_items();\n\n\t\t\tif ( $templates ) {\n\t\t\t\tforeach ( $templates as $template ) {\n\t\t\t\t\t$result_list[ $template['template_id'] ] = sprintf( '%1$s (%2$s)', $template['title'], $template['type'] );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $result_list;\n\t\t}", "public function getAllTemplates(){\n return Template::all();\n }", "public static function getTemplates()\n {\n $templates = Template::all();\n return $templates;\n }", "public function getTemplates()\n {\n return $this->templates;\n }", "public function getTemplates()\n {\n return $this->templates;\n }", "public function getTemplates()\n {\n return $this->templates;\n }", "public function getTemplates()\n {\n return $this->templates;\n }", "public function getTemplates()\n {\n return $this->templates;\n }", "function getTemplates();", "public function findTemplates() {\n $select = $this->getDatabase()\n ->select()\n ->from($this->getTableName());\n\n $data = $select->fetchAll();\n\n $result = array();\n foreach ($data as $item) {\n $item['id'] = (int)$item['id'];\n $item['sourceTemplateId'] = (int)$item['sourceTemplateId'];\n\n $result[] = new Entity\\Template($item);\n }\n\n return $result;\n }", "protected function fetchTemplates()\n {\n return $this\n ->fetchOption('itemTemplate')\n ->fetchOption('submenuTemplate')\n ;\n }", "public static function getTemplates()\n\t{\n\t\t// We want to avoid having to rediscover the wheel every time we access this method\n\t\tif (self::$templates === null)\n\t\t{\n\t\t\t$templateList = [];\n\t\t\t$templatePaths = [];\n\n\t\t\t// Get all the templates that exists in the templatefolder\n\t\t\t$templateFiles = glob(self::$templateFolderPath . '*.html');\n\n\t\t\t// Go through each template file and add them to our list\n\t\t\tforeach ($templateFiles AS $templatePath)\n\t\t\t{\n\t\t\t\t// We want to get the template name based on file name\n\t\t\t\t$templateName = pathinfo($templatePath)['filename'];\n\n\t\t\t\t// Populate arrays that we'll later assign to properties\n\t\t\t\t$templateList[] = $templateName;\n\t\t\t\t$templatePaths[$templateName] = $templatePath;\n\t\t\t}\n\n\t\t\tself::$templates = $templateList;\n\t\t\tself::$templatePaths = $templatePaths;\n\n\t\t\treturn self::$templates;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// We have the list of templates\n\t\t\treturn self::$templates;\n\t\t}\n\t}", "private function getPageTemplates() {\n // this refers to the templates you see when you click \"CHOOSE A TEMPLATE\" on an empty Glazed Builder container\n $result = $this->database->select('glazed_page_templates', 't')\n ->fields('t', array('uuid', 'title', 'module', 'category', 'image'))\n ->orderBy('weight', 'ASC')\n ->execute();\n\n $templates = array();\n while ($template = $result->fetchAssoc()) {\n $templates[] = array(\n 'title' => $template['title'],\n 'uuid' => $template['uuid'],\n 'module' => $template['module'],\n 'category' => $template['category'],\n 'image' => !(empty($template['image'])) ? $this->getBase() . '/' . drupal_get_path('module', $template['module']) . '/' . $template['image'] : $this->getBase() . '/' . drupal_get_path('module', 'glazed_builder') . '/' . 'images/glazed_templates/not-found.png',\n );\n }\n\n return new JsonResponse($templates);\n }", "public function getTemplates()\n {\n return isset($this->data['templates']) ? $this->data['templates'] : array();\n }", "function get_proposal_templates()\n{\n $proposal_templates = [];\n if (is_dir(VIEWPATH . 'admin/proposals/templates')) {\n foreach (list_files(VIEWPATH . 'admin/proposals/templates') as $template) {\n $proposal_templates[] = $template;\n }\n }\n\n return $proposal_templates;\n}", "public function getTemplates() : array {}", "public function getAllTemplates(): array\n {\n return app(Template::class)->select('id','name')->get()->toArray();\n }", "public function getTemplates()\n {\n return $this->template;\n }", "public function getTemplates(){\n\n\t\t$result = array();\n\n\t\t$templates = $this->project->getTemplates();\n $defaultTemplates = array();\n if ($this->defaultProject && ($this->defaultProject !== $this->project)){\n $defaultTemplates = $this->defaultProject->getTemplates();\n }\n\n foreach ($defaultTemplates as $template){\n if ($template->__get(\"filename\")){\n $result[$template->__get(\"filename\")] = $template;\n }\n }\n\n foreach ($templates as $template){\n if ($template->__get(\"filename\")){\n $result[$template->__get(\"filename\")] = $template;\n }\n }\n\n return $result;\n\t}", "public function getTemplateOptions()\n {\n $this->app->loadClass('Spyc', true);\n $folders = glob($this->app->getTplRoot() . '*');\n foreach($folders as $folder)\n {\n $templateName = str_replace($this->app->getTplRoot(), '', $folder);\n $config = Spyc::YAMLLoadString(file_get_contents($folder . DS . '_doc' . DS . $this->app->getClientLang() . '.yaml'));\n $templates[$templateName] = $config['name'];\n }\n\n return $templates;\n }", "protected function getTemplates()\n {\n $templatesFiles = array();\n $templates = $this->getServiceManager()->get('playgroundcms_template_service')->getTemplateMapper()->findBy(array('isSystem' => 0));\n foreach ($templates as $template) {\n $templatesFiles[$template->getFile()] = $template->getFile();\n }\n\n return $templatesFiles;\n }", "public function getTemplates()\n {\n //database\n $query = $this->_buildQuery();\n\n /** ------------------------------------------\n * Set query limits/ordering and load results\n */\n $limit = $this->getState($this->_view . '_limit');\n $limitStart = $this->getState($this->_view . '_limitstart');\n\n if ($limit != 0)\n {\n if ($limitStart >= $this->getTotal())\n {\n $limitStart = 0;\n $limit = 10;\n $limitStart = ($limit != 0) ? (floor($limitStart / $limit) * $limit) : 0;\n $this->state->set($this->_view . '_limit', $limit);\n $this->state->set($this->_view . '_limitstart', $limitStart);\n }\n }\n\n //sort\n $query->order($this->getState('Templates.filter_order') . ' ' . $this->getState('Templates.filter_order_Dir'));\n\n //return results\n $this->db->setQuery($query, $limitStart, $limit);\n $results = $this->db->loadAssocList();\n\n //return data\n return $results;\n\n }", "public function getPageTemplates()\n {\n return response()->json(MyHelpers::getPageTemplates(), 200);\n }", "public function getTemplates()\n {\n return array(\n 'method' => 'GetTemplates',\n 'params' => array('getTemplatesParameter' => array())\n );\n }", "public static function templates() {\n\t\t\t//TODO: can we remove this ?\n\t\t\t$templates = array();\n\t\t\t$config = include self::path( 'templates/_config.php' );\n\t\t\tforeach ( $config as $code => $template ) {\n\t\t\t\t$templates[ $code ] = array(\n\t\t\t\t\t'name' => $template['name'],\n\t\t\t\t\t'set' => $template['set'],\n\t\t\t\t\t'tags' => isset( $template['tags'] ) ? $template['tags'] : array(),\n\t\t\t\t\t'downloaded' => isset( $template['downloaded'] ) ? $template['downloaded'] : false,\n\t\t\t\t);\n\t\t\t}\n\t\t\tif ( ! empty( $templates['blank'] ) ) {\n\t\t\t\t$blank = array( 'blank' => $templates['blank'] );\n\t\t\t\tunset( $templates['blank'] );\n\t\t\t\t$templates = $blank + $templates;\n\t\t\t}\n\n\t\t\treturn $templates;\n\t\t}", "public function getAllTemplatesList()\n {\n $select = $this ->_db->select()\n ->from('mail__templates', 'id')\n ->order('filename');\n\n $templates = $this->_db->fetchCol($select);\n\n foreach ($templates as &$template) {\n $template = new Socnet_Mail_Template($template);\n }\n return $templates;\n }", "public static function getTemplates(): array\n {\n return self::getViewsList('template');\n }", "public function getAllTemplates()\n {\n $forms = craft()->db->createCommand()\n ->select('*')\n ->from('emailnotifications_templates')\n ->order('sortOrder asc')\n ->queryAll();\n\n return FormBuilderEmailNotifications_TemplateModel::populateModels($forms);\n }", "public static function lists()\r\n {\r\n $defaultTemplates = Directory::listAssocContents(app_path('Modules/Templates/Views/templates/invests'));\r\n\r\n $customTemplates = Directory::listAssocContents(base_path('custom/templates/invest_templates'));\r\n\r\n return $defaultTemplates + $customTemplates;\r\n }", "public static function lists()\r\n {\r\n $defaultTemplates = Directory::listAssocContents(app_path('Modules/Templates/Views/templates/loans'));\r\n\r\n $customTemplates = Directory::listAssocContents(base_path('custom/templates/loan_templates'));\r\n\r\n return $defaultTemplates + $customTemplates;\r\n }", "public function getTemplates(): array\n {\n }", "public function getTemplates()\n {\n return [\n 'paths' => [\n 'page-template' => [__DIR__ . '/../templates/page-template'],\n ],\n ];\n }", "public function getTemplates()\n {\n return json_encode(VmTemplate::with('operatingSystem')->get());\n }", "function templates()\n\t{\n\t\t$url = '/transfers/v1/templates';\n\t\t$url = $this->_client->_make_url($url);\n\t\t$req = $this->_client->_curl_init($url);\n\t\t$res = $this->_client->_curl_exec($req);\n\t\treturn $res;\n\t}", "public function getTemplates()\n {\n return [\n 'paths' => [\n 'album' => [__DIR__ . '/../templates/album'],\n ],\n ];\n }", "public function all() : array\n {\n return $this->templates;\n }", "public function index()\n {\n $templates = DescriptionTemplate::all();\n\n return $templates;\n }", "protected function getTemplates() {\n\t\tif (DEBUG_ENABLED && (($fargs=func_get_args())||$fargs='NOARGS'))\n\t\t\tdebug_log('Entered (%%)',129,0,__FILE__,__LINE__,__METHOD__,$fargs);\n\n\t\treturn new Templates($this->server_id);\n\t}", "public function findAllTemplates()\n {\n $result = array();\n foreach ($this->finders as $finder) {\n $result = array_merge($finder->findAllTemplates(), $result);\n }\n\n return $result;\n }", "private function getUserTemplates() {\n // this refers to the templates in the \"Saved Templates\" tab in the Glazed Builder elements modal\n $query = $this->database->select('glazed_user_templates', 't')\n ->fields('t', array('uid', 'name', 'global'));\n // Collect current user and global templates.\n $group = $query->orConditionGroup()\n ->condition('t.uid', $this->currentUser->id())\n ->condition('t.global', 1);\n $query->condition($group);\n\n $result = $query->execute();\n\n $templates = array();\n $i = 0;\n while ($template = $result->fetchAssoc()) {\n $templates[$i]['name'] = htmlspecialchars($template['name']);\n $templates[$i]['global'] = (bool) $template['global'];\n // Check if the current user is the author of template\n $current_user_is_author = FALSE;\n if ($this->currentUser->id() == $template['uid']) {\n $current_user_is_author = TRUE;\n }\n $templates[$i]['current_user_is_author'] = $current_user_is_author;\n $i ++;\n }\n\n return new JsonResponse($templates);\n }", "public function getTemplates()\n {\n return [\n 'paths' => [\n 'admin' => [__DIR__ . '/../templates/admin'],\n ],\n ];\n }", "public function GetTemplates()\n {\n $templates = array();\n\n if ($this->IsValidAuthToken())\n {\n $request = new ZabbixWrapper();\n $request->Create(\"template.get\", $this->GetAuthToken(), $this->nonce++);\n $request->params = new ZabbixTemplateGetRequest();\n $request->params->output = array(\"name\", \"templateid\");\n\n $response = $this->Send($request);\n\n if ($this->IsValidResponse($response))\n {\n foreach ($response[\"result\"] as $key => $value)\n {\n if (!in_array($value[\"name\"], $templates))\n {\n $templates[] = Template::WithNameAndID($value[\"name\"], $value[\"templateid\"]);\n }\n }\n }\n }\n\n return $templates;\n }", "public function index()\n {\n $templates = PageTemplates::all();\n\n return PageTemplateResource::collection($templates);\n }", "public function getTemplates() : array\n {\n return [\n 'paths' => [\n 'oauth2' => [__DIR__ . '/templates/oauth2']\n ],\n ];\n }", "function getTemplates() {\n\t return $this->wpdb->get_results('SELECT * FROM '.$this->templates_table.' ORDER BY date DESC');\n\t}", "protected function getTemplates() {\n\t\tif(count($this->_templates)) return $this->_templates; \n\t\tforeach($this->templates as $template) {\n\t\t\tif($template->useRoles) {\n\t\t\t\t$this->_accessTemplates[$template->id] = $template;\n\t\t\t} else {\n\t\t\t\t$this->_templates[$template->id] = $template; \n\t\t\t}\n\t\t}\n\t\treturn $this->_templates; \n\t}", "public function get_templates($slugsonly = false) {\n\t\t\n\t\t$templates = array();\n\t\t$files = list_files($this->path);\n\t\tsort($files);\n\t\tforeach($files as $file){\n\t\t\tif(basename($file) == 'index.html'){\n\t\t\t\t\n\t\t\t\t$filename = str_replace($this->path .'/', '', $file);\n\t\t\t\t$slug = dirname($filename);\n\t\t\t\tif(!$slugsonly){\n\t\t\t\t\t$templates[$slug] = $this->get_template_data($file);\n\t\t\t\t}else{\n\t\t\t\t\t$templates[] = $slug;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $templates;\n\t\t\n\t}", "public function templatesAction()\n {\n return array();\n }", "public function index()\n {\n $templates = Template::latest()->paginate(5);\n return $templates;\n }", "public function getTemplates()\n {\n\n $list = new ArrayList($this->templates->toArray());\n\n return $list;\n\n }", "public function getTemplates() : array\n {\n return [\n 'paths' => [\n 'petition' => [__DIR__ . '/../templates/petition'],\n 'petition-view' => [__DIR__ . '/../templates/petition-view'],\n 'petition-admin' => [__DIR__ . '/../templates/petition-admin'],\n ],\n ];\n }", "public function getAvailableTemplates();", "public function getTemplates(Request $request)\n {\n\n $templates = Template::approved()->get();\n\n return view('template.browse', compact('templates'));\n }", "public function getCompatibleTemplates() {\n\t\treturn json_decode(self::getClient()->getCompatibleTemplates($this->getDomain()));\n\t}", "public static function getTemplates() {\n\t\t$tplList = array();\n\n\t\t$dir = DIMS_APP_PATH.'templates/objects/slideshows';\n\n\t\t$handler_dir = opendir($dir);\n\n\t\twhile (false !== ($file = readdir($handler_dir))) {\n\t\t\tif(is_file($dir.'/'.$file)) {\n\t\t\t\t$tplName = $file;\n\n\t\t\t\tif ( false !== ($extPos = strrpos($file, '.')) && substr($file, -4) == '.tpl' ) {\n\t\t\t\t\t$tplName = substr($file,0,$extPos);\n\t\t\t\t\t$tplList[$tplName] = $tplName;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tsort($tplList);\n\n\t\treturn $tplList;\n\t}", "function get_page_templates() {\n\t\t\t$templates = get_page_templates();\n\t\t\tksort( $templates );\n\t\t\t$page_templates = array ();\n\t\t\tif ( is_array( $templates ) ) {\n\t\t\t\tforeach ( $templates as $template ) {\n\t\t\t\t\t$template_data = implode( '', file( TEMPLATEPATH.\"/\".$template ));\n\t\t\t\t\tpreg_match( '|emplate Name:(.*)$|mi', $template_data, $name ); // Using emplate instead of Template intentionally\n\t\t\t\t\tpreg_match( '|Description:(.*)$|mi', $template_data, $description );\n\t\t\t\t\tpreg_match( '|Exclude:(.*)$|mi', $template_data, $exclude );\n\t\t\t\t\n\t\t\t\t\t$name = $name[1];\n\t\t\t\t\t$description = $description[1];\n\t\t\t\t\t$exclude = trim($exclude[1]);\n\t\t\t\t\n\t\t\t\t\tif ( !empty( $name ) ) {\n\t\t\t\t\t\tif (!empty($exclude)) { continue; }\n\t\t\t\t\t\t$page_templates[trim( $name )] = basename( $template );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $page_templates;\n\t\t}", "static public function get_templates() {\n\n $files = array();\n $templates = array();\n\n //** Available template dirs */\n $files[ STYLESHEETPATH ] = scandir( STYLESHEETPATH );\n $files[ TEMPLATEPATH ] = scandir( TEMPLATEPATH );\n $files[ ud_get_wpp_fbtabs()->path( 'static/views', 'dir' ) ] = scandir( ud_get_wpp_fbtabs()->path( 'static/views', 'dir' ) );\n\n //** Find template files */\n foreach ( $files as $key => $file_list ) {\n\n //** Loop each file in dirs */\n foreach ( $file_list as $dirfile ) {\n $ext = pathinfo( $dirfile, PATHINFO_EXTENSION );\n //** If file is FT template */\n if ( strstr( $dirfile, 'fb-tab-' ) && $ext === 'php' ) {\n if( !isset( $templates[ $dirfile ] ) ) {\n $file_data = get_file_data( $key .'/'. $dirfile, array( 'name' => 'Template Name', 'type' => 'Type' ) );\n $file_data[ 'type' ] = !empty( $file_data[ 'type' ] ) ? $file_data[ 'type' ] : 'page';\n $templates[ str_replace( '.php', '', $dirfile ) ] = $file_data;\n }\n }\n }\n }\n\n return $templates;\n }", "public function getAllCatalogItemTemplates() {\n $catalogItemTemplates = CatalogItemTemplates::catalogItemTemplates()->get();\n\n return response()->json($catalogItemTemplates);\n }", "public function getTemplatesAttribute()\n {\n $templates = [];\n\n $section = $this->fresh();\n\n $form = $section\n ->formSection\n ->form\n ->resource_folder;\n\n $dir = $section\n ->formSection\n ->form\n ->directory\n ->resource_folder;\n\n $path = resource_path(\"views/wp/{$dir}/search-sections/$form/\");\n $bladePath = \"wp/{$dir}/search-sections/$form/\";\n\n $files = array_diff(scandir($path), ['.', '..']);\n \n foreach($files as $file) {\n $key = str_replace('.blade.php', '', $file);\n $templates[$key] = View::make($bladePath . $key)->render();\n }\n\n return $templates;\n }", "public function getTemplatesFromDB()\n {\n return $this->template_db->all();\n }", "function templates()\n\t{\n\t return view('admin.templates');\n\t}", "public function getTemplates()\n {\n return [\n 'paths' => [\n 'app' => [__DIR__ . '/../templates/app'],\n 'error' => [__DIR__ . '/../templates/error'],\n 'layout' => [__DIR__ . '/../templates/layout'],\n ],\n ];\n }", "public function getTemplates()\n {\n return [\n 'paths' => [\n 'app' => [__DIR__ . '/../templates/app'],\n 'error' => [__DIR__ . '/../templates/error'],\n 'layout' => [__DIR__ . '/../templates/layout'],\n ],\n ];\n }", "public function getTaskTemplateList();", "public function getCatalogItemTemplates() {\n $catalogItemTemplates = CatalogItemTemplates::catalogItemTemplates()->paginate(\n CatalogItemTemplates::getPageSize()\n );\n\n return response()->json($catalogItemTemplates);\n }", "public function templates() {\n $result= [];\n foreach ($this->entries->__invoke($this->name) as $entry) {\n if ('/' !== $entry[strlen($entry) - 1]) $result[]= $entry;\n }\n return $result;\n }", "public function getAllTypes()\n\t{\n\t\treturn Template::orderBy('title')->paginate($this->limit);\n\t}", "public function getTemplates() : array\n {\n return [\n 'paths' => [\n 'app' => [__DIR__ . '/../../resources/templates/app'],\n 'user' => [__DIR__ . '/../../resources/templates/app/user'],\n 'components' => [__DIR__ . '/../../resources/templates/app/components'],\n 'error' => [__DIR__ . '/../../resources/templates/error'],\n 'layout' => [__DIR__ . '/../../resources/templates/layout'],\n ],\n ];\n }", "public function loadAvailableTemplates()\n {\n // From the package\n $files = scandir(__DIR__.'/../../resources/views/invoice');\n // find the template name\n $templates = [];\n foreach ($files as $fileName) {\n if (str_contains($fileName, '.blade.php')) {\n $templates[] = 'invoice-node::invoice.'.str_replace('.blade.php', '', $fileName);\n }\n }\n\n // Include custom templates.\n if (file_exists(resource_path('views/innov/invoice-templates'))) {\n $customFiles = scandir(resource_path('views/innov/invoice-templates'));\n foreach ($customFiles as $fileName) {\n if (str_contains($fileName, '.blade.php')) {\n $templates[] = 'innov.invoice-templates.'.str_replace('.blade.php', '', $fileName);\n }\n }\n }\n\n return $templates;\n }", "public function listAction()\n {\n $this->layout()->setVariable('nav', \"cms\");\n $this->layout()->setVariable('subNav', \"template\");\n $p = $this->getRequest()->getQuery('page', 1);\n\n\n $templates = $this->getTemplateService()->getTemplateMapper()->findAll();\n \n $nbTemplates = count($templates);\n\n $templatesPaginator = new \\Zend\\Paginator\\Paginator(new \\Zend\\Paginator\\Adapter\\ArrayAdapter($templates));\n $templatesPaginator->setItemCountPerPage(self::MAX_PER_PAGE);\n $templatesPaginator->setCurrentPageNumber($p);\n\n $blockTypes = $this->getBlockService()->getBlocksType();\n\n $files = $this->getTemplateService()->getTemplates();\n\n return new ViewModel(array('templates' => $templates,\n 'blockTypes' => $blockTypes,\n 'files' => $files,\n 'templatesPaginator' => $templatesPaginator,\n 'nbTemplates' => $nbTemplates));\n }", "public function getTemplatesForSelect()\n\t{\n\t\t$aTemplatesList = array();\n\t\tforeach ($this->aTemplatesInfos as $aTemplateInfos) {\n\t\t\t$aTemplatesList[$aTemplateInfos['name']] = $aTemplateInfos['id'];\n\t\t}\n\n\t\treturn $aTemplatesList;\n\t}", "public function templates($template = null){\n\t\tif($template !== null) {\n\t\t\tif(gettype($template) == 'string') $this->_templates[] = $template;\n\t\t\tif(gettype($template) == 'integer') return $this->_templates[$template];\n\t\t}\n\t\treturn $this->_templates;\n\t}", "public function getConfigTemplates(){\n\n $dir = DIR_CONFIG.'d_visual_designer_template/';\n if(is_dir($dir)){\n $files = scandir($dir);\n }\n else{\n $files = array();\n }\n\n $template_data = array();\n\n foreach($files as $file){\n if(strlen($file) > 1 && strpos( $file, '.php')){\n $_ = array();\n\n $results = array();\n\n require($dir.$file);\n\n $results = array_merge($results, $_);\n\n $templates = $results['d_visual_designer_templates'];\n foreach ($templates as $template) {\n $template_data[] = array(\n 'template_id' => $template['template_id'],\n 'content' => $template['content'],\n 'config' => substr($file, 0, -4),\n 'image' => $template['image'],\n 'category' => $template['category'],\n 'sort_order' => $template['sort_order'],\n 'name' => $template['name']\n );\n }\n }\n }\n return $template_data;\n }", "function getTemplatesList($params) {\r\n\t\t$db =& $this->state->getByRef('db');\r\n\t\t$response =& $this->getByRef('response');\r\n\r\n\t\t$columns = \"*\";\r\n\t\t$from = \"mail_templates\";\r\n\t\t$where = \"1\";\r\n\t\t\r\n\t\t\r\n\t\tif($id = $params->get('queue_id')) {\r\n\t\t\t$where .= \" AND queue_id = '\".$db->escapeString($id).\"'\";\r\n\t\t} else {\r\n\t\t\t$where .= \" AND queue_id = 'all'\";\r\n\t\t}\r\n\r\n\t\tif($id = $params->get('template_id')) {\r\n\t\t\t$where .= \" AND template_id = '\".$db->escapeString($id).\"'\";\r\n\t\t}\r\n\t\t\r\n\t\t$params->set('columns', $columns);\r\n\t\t$params->set('from', $from);\r\n\t\t$params->set('where', $where);\r\n\t\t$params->set('table', 'mail_templates');\r\n\t\treturn $this->callService('SqlTable', 'select', $params);\r\n\t}", "public function index()\n {\n return view('templates.index', [\n 'templates' => Template::withTrashed()->orderBy('name', 'asc')->get(),\n ]);\n }", "public function index()\n {\n $templates = Template::paginate(self::PAGINATION_PER_PAGE);\n\n return view('admin.templates.index', compact('templates'));\n }", "public function getJobTemplateList();", "public function listtemplates(){\n $data = Template::all();\n return view('listtemplates')->with('data',$data);\n }", "protected function getProjectTemplates()\n {\n $templates = array();\n foreach (array('BlankSingleProject', 'BlankSeparateProject', 'TYPO3DocProject') as $key) {\n $templates[$key] = $this->translate('dashboard.projectTemplates.' . $key);\n }\n return $templates;\n }", "abstract public function getListTemplateName();", "public function getTemplateSlides()\n {\n $psdb = Rbthemeslider::$psdb;\n $table_name = RbSliderGlobals::$table_slides;\n $templates = $psdb->getResults(\"SELECT * FROM $table_name WHERE slider_id = -1\", ARRAY_A);\n\n //add default Template Slides here!\n $default = $this->getDefaultTemplateSlides();\n $templates = array_merge($templates, $default);\n\n if (!empty($templates)) {\n foreach ($templates as $key => $template) {\n $templates[$key]['params'] = Tools::jsonDecode($template['params'], true);\n $templates[$key]['layers'] = Tools::jsonDecode($template['layers'], true);\n $templates[$key]['settings'] = Tools::jsonDecode($template['settings'], true);\n }\n }\n\n return $templates;\n }", "private static function get_templates(){\r\n\t\t//load WP option\r\n\t\t$custom = get_option('revslider_addon_liquideffect_templates',false);\r\n\r\n\t\t//check for templates saved before 6.0\r\n\t\tif(!isset($custom[1][\"title\"])){\r\n\r\n\t\t\t//save new array into WP option\r\n\t\t\tupdate_option('revslider_addon_liquideffect_templates',$custom);\r\n\t\t}\r\n\r\n\t\treturn $custom;\r\n\t}", "public function getSingleTemplate()\n\t{\n\t\t$data = array();\n\t\t\n\t\treturn $this->client->request(\"/gitignore/templates/C\", 'GET', $data, 200, 'GitHubTemplate', true);\n\t}", "protected function templates(): array\n {\n return [\n 'links' => [\n 'home' => route('templates.show', 'homepage'),\n ],\n ];\n }", "public function templatesShow()\n {\n\n $templates = DB::table('templates')\n ->select('templates.*')\n ->get();\n\n return response()->json(['templates' => $templates]);\n\n }", "public function index()\n {\n if (auth()->user()->hasRole('admin')) {\n $templates = Template::with('user')->latest()->get();\n } else {\n $templates = auth()->user()->templates()->with('user')->latest()->get();\n }\n\n return view('backend.templates.index', compact('templates'));\n }", "public function getAllTemplates() {\n\t\t\n\t\t$templates = array();\n\t\t$q = $this->db->from('pages')->where(\"pages_template\",'1')->get();\n\t\t\n\t\tif( $q->num_rows() > 0 ) {\n\t\t\n\t\t\t$pages = $q->result();\n \t\t//now we need all frames for each page\n \n \t\tforeach( $pages as $page ) {\n \n \t\t\t$pageFrames = array();\n \t\n \t\t\t$q = $this->db->from('frames')->where('pages_id', $page->pages_id)->where('revision', 0)->get();\n \t\n \t\t\tforeach( $q->result() as $f ) {\n\t \t\n\t \t\t\t$frame = array();\n\t \t\t\n\t\t\t\t\t$frame['pageName'] = $page->pages_name;\n\t\t\t\t\t$frame['pageID'] = $page->pages_id;\n\t \t\t\t$frame['id'] = $f->frames_id;\n\t \t\t\t$frame['height'] = $f->frames_height;\n\t \t\t\t$frame['original_url'] = $f->frames_original_url;\n\t \t\n\t \t\t\t$pageFrames[] = $frame;\n\t \t\n\t \t\t}\n \t\n\t \t\t$templates[ $page->pages_id ] = $pageFrames;\n \n\t\t\t}\n\t\t\n\t\t\treturn $templates;\n\t\t\n\t\t} else {\n\t\t\t\n\t\t\treturn false;\n\t\t\t\n\t\t}\n\t\t\n\t}", "function get_templates()\n\t{\n\t\t$this->load->model('list_positions_model');\t\n\n\t\t$file = $this->config->item('template_file');\n\n\t\t$string = file_get_contents($file);\n\t\t$json = json_decode($string);\n\n\t\t$positions = $this->list_positions_model->get_list_positions()->result();\n\n\t\tforeach ($json as &$template) {\n\t\t\tforeach ($template->positions as &$list) {\n\t\t\t\t$pos = $this->_find_list_id($positions, $list->name);\n\t\t\t\tif ($pos !== false) {\n\t\t\t\t\t$list->id = $pos;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\treturn $json;\n\t}", "public function getAllTemplate(){\n \t$template \t= new Template();\n \t$data \t\t= $template->getAllTemplate();\n\n \t// return response\n \treturn response()->json($data);\n }", "public function getTemplates()\n {\n $template = '';\n\n if (isset($this->options['language'])) {\n $language = $this->options['language'];\n } else {\n $language = 'en-GB';\n }\n\n $template_folder = __DIR__ . '/' . $language . '/';\n\n if ((is_dir($template_folder))) {\n } else {\n if ($language === 'en-GB') {\n } else {\n $template_folder = __DIR__ . '/' . 'en-GB' . '/';\n }\n if ((is_dir($template_folder))) {\n } else {\n\n throw new RuntimeException\n (\n 'IoC Factory Method Adapter Instance Failed for Molajo\\User\\TextTemplate '\n . 'Template folder does not exist ' . $template_folder\n );\n }\n }\n\n $template_files = array();\n\n if (isset($this->options['template_name'])) {\n $template_files[] = $this->options['template_name'];\n } else {\n\n $temp = scandir($template_folder);\n\n foreach ($temp as $file) {\n if ($file === '.' || $file === '..') {\n } else {\n $template_files[] = $file;\n }\n }\n }\n\n if (count($template_files) > 0) {\n } else {\n throw new RuntimeException\n (\n 'IoC Factory Method Adapter Instance Failed for Molajo\\User\\TextTemplate '\n . 'Template folder does not contain templates: ' . $template_folder\n );\n }\n\n $templates = array();\n\n foreach ($template_files as $template_name) {\n\n if (file_exists($template_folder . $template_name)) {\n\n require $template_folder . $template_name;\n $templates[substr(\n $template_name,\n 0,\n strlen($template_name) - 4\n )]\n = $template; // $template is defined in the included file\n\n } else {\n throw new RuntimeException\n (\n 'IoC Factory Method Adapter Instance Failed for Molajo\\User\\TextTemplate '\n . ' Template File does not exist. (This should never happen.'\n );\n }\n }\n\n return $templates;\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $emailTemplates = $em->getRepository('AppBundle:EmailTemplate')->findAll();\n\n return [\n 'emailTemplates' => $emailTemplates,\n ];\n }", "protected function getTemplateFiles()\n {\n $paths = $this->getTemplatePaths();\n $files = array();\n foreach ($paths as $path) {\n $files = array_merge(GeneralUtility::getAllFilesAndFoldersInPath(array(), $path . ((substr($path, -1) != '/') ? '/' : ''), 'html,htm,tmpl', 0), $files);\n }\n\n return $files;\n }", "public function getTemplates()\n {\n return array(\n array('DummyBundle:Controller:view.html.twig'),\n array(new TemplateReference('DummyBundle', 'Controller', 'view', 'html', 'twig')),\n );\n }", "private function getAllTemplates() {\n $all_templates = [];\n $module_handler = \\Drupal::moduleHandler();\n\n // Trigger hook_mail_edit_templates().\n // Get a list of the email templates as defined by other modules.\n foreach ($module_handler->invokeAll('mail_edit_templates') as $config_name => $templates) {\n $config_data = $this->config($config_name)->getRawData();\n // Make sure data was actually found.\n if (empty($config_data)) {\n $config_data = [];\n }\n\n // Process each of the defined templates.\n foreach ($templates as $key => $label) {\n // Keys will not be numeric if they are in $key => $label format, so if\n // the key is numeric then it was provided as just a list of keys.\n if (is_numeric($key)) {\n $key = $label;\n }\n\n // Make sure the config structure exists.\n if (!isset($config_data[$key])) {\n $config_data[$key] = [\n 'subject' => '',\n 'body' => '',\n ];\n }\n\n $data = $config_data[$key];\n\n // If an email's description is provided then use it, otherwise just\n // use the email's subject line.\n if ($key != $label) {\n $data['description'] = $label;\n }\n else {\n $data['description'] = $data['subject'];\n }\n\n $all_templates[$config_name][$key] = $data;\n }\n }\n\n // Trigger hook_mail_edit_templates_list_alter().\n // Allow modules to adjust the list of available templates, e.g. to remove\n // items from the list for security purposes.\n $module_handler->alter('mail_edit_templates_list', $all_templates);\n\n return $all_templates;\n }", "function getEmailTemplates()\r\n {\r\n $query = $this->_db->getQuery(true);\r\n $query->select( 'id' );\r\n $query->select( 'title' );\r\n $query->from( '#__seminarman_emailtemplate' );\r\n $query->where( 'templatefor=0' );\r\n \r\n $this->_db->setQuery($query);\r\n return $this->_db->loadObjectList();\r\n }", "public function getMappingTemplates() {\n try {\n $path = CRAFT_BASE_PATH . '/templates/onesolr';\n $files = scandir($path);\n foreach ($files as $key=>$file)\n {\n $fileParts = pathinfo($file);\n if($fileParts['extension'] !== 'json')\n {\n unset($files[$key]);\n }\n }\n } catch (ErrorException $e) {\n $files = [];\n }\n\n return $files;\n }" ]
[ "0.721894", "0.721894", "0.7153169", "0.69664747", "0.68475837", "0.6814356", "0.6792673", "0.67913973", "0.67780936", "0.67780936", "0.67780936", "0.67780936", "0.67731637", "0.677222", "0.67623526", "0.6737131", "0.66991365", "0.669782", "0.66945034", "0.6658538", "0.6626698", "0.6624093", "0.6622777", "0.6620408", "0.6597621", "0.65884763", "0.6587653", "0.6580631", "0.6567077", "0.65636486", "0.65469867", "0.6542551", "0.6532224", "0.65242225", "0.64995766", "0.6470326", "0.64372855", "0.6420598", "0.64197683", "0.6381651", "0.63806987", "0.6372317", "0.6333495", "0.6316669", "0.63146156", "0.6306459", "0.6298082", "0.62957335", "0.62866265", "0.62772834", "0.6267966", "0.6249118", "0.6247991", "0.62451917", "0.6239414", "0.6221632", "0.62172985", "0.61844224", "0.6175048", "0.6170428", "0.6165472", "0.6149916", "0.6147859", "0.6142612", "0.6113777", "0.6112795", "0.6112795", "0.6102305", "0.608998", "0.60749596", "0.6056301", "0.60549396", "0.60530704", "0.6052376", "0.60427725", "0.6028313", "0.6027612", "0.6026017", "0.6017594", "0.60083115", "0.5993048", "0.5968921", "0.5966218", "0.5953088", "0.5943939", "0.5939627", "0.59246427", "0.59206945", "0.59185904", "0.5912364", "0.5907466", "0.58934325", "0.5889327", "0.5863657", "0.58505523", "0.584692", "0.5843337", "0.584121", "0.58323056", "0.5817101" ]
0.8161444
0
Get a descriptive message for the last JSON decoding error.
Получить описательное сообщение об последней ошибке декодирования JSON.
private static function getJsonErrorMsg() { if( function_exists('json_last_error_msg') ) { return json_last_error_msg(); } else { switch( json_last_error() ) { case JSON_ERROR_NONE: return 'No error'; case JSON_ERROR_DEPTH: return 'Maximum stack depth exceeded'; case JSON_ERROR_STATE_MISMATCH: return 'Underflow or the modes mismatch'; case JSON_ERROR_CTRL_CHAR: return 'Unexpected control character found'; case JSON_ERROR_SYNTAX: return 'Syntax error, malformed JSON'; case JSON_ERROR_UTF8: return 'Malformed UTF-8 characters, possibly incorrectly encoded'; default: return 'Unknown error'; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function get_json_last_error()\n {\n }", "function json_last_error () {}", "protected function getJsonError() {\n\t\t$error = '';\n\t\tswitch (json_last_error()) {\n\t\t\tcase JSON_ERROR_NONE:\n\t\t\t\t$error = 'No errors';\n\t\t\t\tbreak;\n\t\t\tcase JSON_ERROR_DEPTH:\n\t\t\t\t$error = 'Maximum stack depth exceeded';\n\t\t\t\tbreak;\n\t\t\tcase JSON_ERROR_STATE_MISMATCH:\n\t\t\t\t$error = 'Underflow or the modes mismatch';\n\t\t\t\tbreak;\n\t\t\tcase JSON_ERROR_CTRL_CHAR:\n\t\t\t\t$error = 'Unexpected control character found';\n\t\t\t\tbreak;\n\t\t\tcase JSON_ERROR_SYNTAX:\n\t\t\t\t$error = 'Syntax error, malformed JSON';\n\t\t\t\tbreak;\n\t\t\tcase JSON_ERROR_UTF8:\n\t\t\t\t$error = 'Malformed UTF-8 characters, possibly incorrectly encoded';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$error = 'Unknown error';\n\t\t\t\tbreak;\n\t\t}\n\t\treturn $error;\n\t}", "private function getJsonError(){\n $error = null;\n switch (json_last_error()) {\n case JSON_ERROR_DEPTH:\n $error = 'The maximum stack depth has been exceeded.';\n break;\n case JSON_ERROR_STATE_MISMATCH:\n $error = 'Invalid or malformed JSON.';\n break;\n case JSON_ERROR_CTRL_CHAR:\n $error = 'Control character error, possibly incorrectly encoded.';\n break;\n case JSON_ERROR_SYNTAX:\n $error = 'Syntax error, malformed JSON.';\n break;\n case JSON_ERROR_UTF8:\n $error = 'Malformed UTF-8 characters, possibly incorrectly encoded.';\n break;\n case JSON_ERROR_RECURSION:\n $error = 'One or more recursive references in the value to be encoded.';\n break;\n case JSON_ERROR_INF_OR_NAN:\n $error = 'One or more NAN or INF values in the value to be encoded.';\n break;\n case JSON_ERROR_UNSUPPORTED_TYPE:\n $error = 'A value of a type that cannot be encoded was given.';\n break;\n default:\n $error = 'Unknown JSON error occured.';\n break;\n }\n return $error;\n }", "public static function jsonLastErrorMsg()\n\t{\n\t\tif (!function_exists('json_last_error_msg'))\n\t\t{\n\t\t\t$errors = self::$jsonErrors;\n\t\t\t$error = json_last_error();\n\t\t\treturn isset($errors[$error]) ? $errors[$error] : false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn json_last_error_msg();\n\t\t}\n\t}", "public static function lastError()\n {\n return json_last_error();\n }", "public function getErrorMessage(){\n if(array_key_exists(\"result\", $this->response)\n && array_key_exists(\"code\", $this->response)\n && $this->response[\"result\"][\"code\"] !== 0){\n return $this->response[\"result\"][\"description\"];\n }\n\n if(array_key_exists(\"code\", $this->response)\n && $this->response[\"code\"] !== 0){\n return $this->response[\"description\"];\n }\n\n return null;\n }", "public static function lastError(): int\n {\n return json_last_error();\n }", "public static function getJsonError(?int $error): string\n {\n switch ($error) {\n case JSON_ERROR_NONE:\n self::$errorMessage = \"No error has occurred\";\n break;\n\n case JSON_ERROR_DEPTH:\n self::$errorMessage = \"The maximum stack depth has been exceeded\";\n break;\n case JSON_ERROR_STATE_MISMATCH:\n self::$errorMessage = \"Invalid or malformed JSON\";\n break;\n case JSON_ERROR_CTRL_CHAR:\n self::$errorMessage = \"Control character error, possibly incorrectly encoded\";\n\n break;\n case JSON_ERROR_SYNTAX:\n self::$errorMessage = \"Syntax error\";\n\n break;\n case JSON_ERROR_UTF8:\n self::$errorMessage = \"Malformed UTF-8 characters, possibly incorrectly encoded\";\n\n break;\n case JSON_ERROR_RECURSION:\n self::$errorMessage = \"One or more recursive references in the value to be encoded\";\n\n break;\n case JSON_ERROR_INF_OR_NAN:\n self::$errorMessage = \"One or more NAN or INF values in the value to be encoded\";\n\n break;\n case JSON_ERROR_UNSUPPORTED_TYPE:\n self::$errorMessage = \"A value of a type that cannot be encoded was given\";\n\n break;\n case JSON_ERROR_INVALID_PROPERTY_NAME:\n self::$errorMessage = \"A property name that cannot be encoded was given\";\n\n break;\n case JSON_ERROR_UTF16:\n self::$errorMessage = \"Malformed UTF-16 characters, possibly incorrectly encoded\";\n break;\n default:\n self::$errorMessage = \"Unknown error\";\n break;\n }\n return self::$errorMessage;\n }", "public function getLastError()\n {\n \treturn json_last_error();\n }", "public function api_error_message() {\r\n return $this->api_error;\r\n }", "public function getErrorDescription()\r\n {\r\n return $this->json->{TokenResponseConstants::ERROR_DESCRIPTION} ?? null;\r\n }", "public function getSchemaErrorMessage()\n {\n return $this->jsonCoder->getSchemaErrorMessage();\n }", "protected function _readErrorMessage()\n {\n $sErrorResponse = $this->io->read(self::ERROR_RESPONSE_SIZE, true);\n\n if ($sErrorResponse === false || strlen($sErrorResponse) != self::ERROR_RESPONSE_SIZE) {\n return;\n }\n $aErrorResponse = $this->_parseErrorMessage($sErrorResponse);\n if (!is_array($aErrorResponse) || empty($aErrorResponse)) {\n return;\n }\n if (!isset($aErrorResponse['command'], $aErrorResponse['statusCode'], $aErrorResponse['identifier'])) {\n return;\n }\n if ($aErrorResponse['command'] != self::ERROR_RESPONSE_COMMAND) {\n return;\n }\n $aErrorResponse['time'] = time();\n $aErrorResponse['statusMessage'] = 'None (unknown)';\n if (isset($this->_aErrorResponseMessages[$aErrorResponse['statusCode']])) {\n $aErrorResponse['statusMessage'] = $this->_aErrorResponseMessages[$aErrorResponse['statusCode']];\n }\n return $aErrorResponse;\n }", "private function getError()\n {\n return json_encode(Array('error' => 1, 'info' => $this->errMessage));\n }", "public function get_last_error(): string {\r\n\t\treturn $this->error;\r\n\t}", "public function getError()\n {\n return is_array($this->response) && array_key_exists('message', $this->response)\n ? $this->response['message'] : null;\n }", "public function jsonErrors($string)\n {\n $result = json_decode($string);\n\n // switch and check possible JSON errors\n switch (json_last_error()) {\n case JSON_ERROR_NONE:\n $error = ''; // JSON is valid // No error has occurred\n break;\n case JSON_ERROR_DEPTH:\n $error = 'The maximum stack depth has been exceeded.';\n break;\n case JSON_ERROR_STATE_MISMATCH:\n $error = 'Invalid or malformed JSON.';\n break;\n case JSON_ERROR_CTRL_CHAR:\n $error = 'Control character error, possibly incorrectly encoded.';\n break;\n case JSON_ERROR_SYNTAX:\n $error = 'Syntax error, malformed JSON.';\n break;\n // PHP >= 5.3.3\n case JSON_ERROR_UTF8:\n $error = 'Malformed UTF-8 characters, possibly incorrectly encoded.';\n break;\n // PHP >= 5.5.0\n case JSON_ERROR_RECURSION:\n $error = 'One or more recursive references in the value to be encoded.';\n break;\n // PHP >= 5.5.0\n case JSON_ERROR_INF_OR_NAN:\n $error = 'One or more NAN or INF values in the value to be encoded.';\n break;\n case JSON_ERROR_UNSUPPORTED_TYPE:\n $error = 'A value of a type that cannot be encoded was given.';\n break;\n default:\n $error = 'Unknown JSON error occured.';\n break;\n }\n\n if ($error !== '') {\n // throw the Exception or exit // or whatever :)\n return $error;\n }\n\n // everything is OK\n return null;\n }", "public function getErrorMessage(): string\n {\n\n if (isset($this->responses[$this->current_handle]['error_message'])) {\n return $this->responses[$this->current_handle]['error_message'];\n }\n\n return '';\n\n }", "public function lastErrorMessage()\n\t{\n\t\tif (!empty($this->message)) {\n\t\t\treturn $this->message;\n\t\t}\n\n\t\treturn 'OZ_FILE_UPLOAD_UNKNOWN_ERROR';\n\t}", "protected function fetchJsonError($json)\n {\n if (isset($json->error)) {\n return array(\n 'code' => $json->error_code,\n 'message' => $json->error_description,\n );\n } else {\n return NULL;\n }\n }", "private static function errorMessage($errno)\n {\n static $lookup = null;\n if ($lookup === null) {\n $lookup = [];\n $constants = get_defined_constants();\n foreach ($constants as $constant => $constant_value) {\n if (substr($constant, 0, 11) === 'JSON_ERROR_') {\n $lookup[$constant_value] = $constant;\n }\n }\n }\n if (array_key_exists($errno, $lookup)) {\n $message = '['.$lookup[$errno].'] ';\n } else {\n $message = '['.$errno.'] ';\n }\n switch ($errno) {\n case JSON_ERROR_NONE:\n $message .= 'No errors';\n break;\n case JSON_ERROR_DEPTH:\n $message .= 'The maximum stack depth has been exceeded';\n break;\n case JSON_ERROR_STATE_MISMATCH:\n $message .= 'Invalid or malformed JSON';\n break;\n case JSON_ERROR_CTRL_CHAR:\n $message .= 'Control character error, possibly incorrectly encoded';\n break;\n case JSON_ERROR_SYNTAX:\n $message .= 'Syntax error';\n break;\n case JSON_ERROR_UTF8:\n $message .= 'Malformed UTF-8 characters, possibly incorrectly encoded';\n break;\n default:\n $message = 'Unknown error';\n }\n\n return $message;\n }", "protected function fetchJsonError($json)\n {\n if (isset($json->error)) {\n return array(\n 'code' => $json->error->code,\n 'message' => $json->error->message,\n );\n } else {\n return NULL;\n }\n }", "public static function jsonError()\n {\n $msg = array('status' => \"Fail\", \"msg\" => \"Invalid Json format\");\n $msg = array(\"error\"=>$msg);\n REST::response($msg,400);\n }", "public function getMessage()\n {\n return $this->_error;\n }", "public function getErrorMsg() {\n\t\treturn $this->status_code . ': ' . $this->status_txt;\n\t}", "public function getMessage()\n {\n return $this->data['error_message'];\n }", "public static function get_last_msg()\n\t\t{\n\t\t\treturn isset(self::$error_idx) ?\n\t\t\t\tself::$error_ring[self::$error_idx]['message'] :\n\t\t\t\tnull;\n\t\t}", "public abstract function last_error_as_plain_text ();", "public function getErrorMessage() {\n return $this->_error->message;\n }", "public function getLastErrorMessage()\n\t{\n\t\tif ($this->getTransactionObject() !== null && $this->getTransactionObject() instanceof \\Customweb_Payment_Authorization_ITransaction) {\n\t\t\t$errorMessages = $this->getTransactionObject()->getErrorMessages();\n\t\t\t$errorMessage = nl2br((string) end($errorMessages));\n\t\t\treset($errorMessages);\n\t\t\treturn $errorMessage;\n\t\t}\n\t}", "public function getLastErrorMsg()\n {\n return $this->lastErrorMsg;\n }", "private function getMessageFromErrorCode($error)\n {\n if (function_exists('json_last_error_msg')) {\n return json_last_error_msg();\n }\n $errors = array(\n JSON_ERROR_NONE => null,\n JSON_ERROR_DEPTH => 'Maximum stack depth exceeded',\n JSON_ERROR_STATE_MISMATCH => 'Underflow or the modes mismatch',\n JSON_ERROR_CTRL_CHAR => 'Unexpected control character found',\n JSON_ERROR_SYNTAX => 'Syntax error, malformed JSON',\n JSON_ERROR_UTF8 => 'Malformed UTF-8 characters, possibly incorrectly encoded'\n );\n return array_key_exists($error, $errors) ? $errors[$error] : \"Unknown error ({$error})\";\n }", "public function validateJsonDecode($data){\n $data = (string)$data;\n \n $encoding = mb_detect_encoding($data);\n /* some json data may have BOM due to php not handling types correctly */\n if($encoding == 'UTF-8') {\n $data = preg_replace('/[^(\\x20-\\x7F)]*/','', $data); \n $data = preg_replace('#\\\\\\\\x[0-9a-fA-F]{2,2}#', '', $data); \n }\n \n $data = json_decode($data);\n\n if (function_exists( 'json_last_error' )){\n switch (json_last_error()) {\n case JSON_ERROR_NONE:\n $this->log('validateJsonDecode() - No json decode errors');\n break;\n case JSON_ERROR_DEPTH:\n $this->log('validateJsonDecode() - Maximum stack depth exceeded');\n break;\n case JSON_ERROR_STATE_MISMATCH:\n $this->log('validateJsonDecode() - Underflow or the modes mismatch');\n break;\n case JSON_ERROR_CTRL_CHAR:\n $this->log('validateJsonDecode() - Unexpected control character found');\n break;\n case JSON_ERROR_SYNTAX:\n $this->log('validateJsonDecode() - Syntax error, malformed JSON');\n break;\n case JSON_ERROR_UTF8:\n $this->log('validateJsonDecode() - Malformed UTF-8 characters, possibly incorrectly encoded');\n break;\n default:\n $this->log('validateJsonDecode() - Unknown error');\n break;\n }\n }else{\n $this->log('validateJsonDecode() - json_last_error PHP function does not exist');\n }\n \n return $data;\n }", "public function getErrorMessage()\n {\n return $this->lastErrorMsg;\n }", "public function getErrorMsg()\r\n {\r\n return $this->lastErrorMsg;\r\n }", "public static function lastError() {\n\t\t$error = self::$_link->errorInfo();\n\t\t\t\t\n\t\tif($error && isset($error[2])) {\n\t\t\treturn $error[2];\n\t\t}\n\t\t\n\t\treturn '';\n\t}", "private function getErrorMessage(ResponseInterface $response): string\n {\n $httpCode = $response->getStatusCode();\n $statusCodeMessage = \"Server responded with {$httpCode}\";\n\n if (\n $response->hasHeader('Content-Type') &&\n $response->getHeader('Content-Type')[0] !== 'application/json'\n ) {\n return $statusCodeMessage;\n }\n\n $jsonData = Json::decode((string)$response->getBody());\n\n $errorCode = $jsonData['code'] ?? 'Error';\n\n // Throw the error message that's included in the response.\n if (isset($jsonData['errors'][0]['property']) && isset($jsonData['errors'][0]['message'])) {\n $errorMessage = $jsonData['errors'][0]['property'] . ': ' . $jsonData['errors'][0]['message'];\n return \"{$errorCode} - {$errorMessage}\";\n }\n\n // Throw a general error message.\n return \"{$errorCode} - {$statusCodeMessage}\";\n }", "public function message()\n {\n return $this->errorMessage;\n }", "public function message()\n {\n return $this->errorMessage;\n }", "public function message()\n {\n return $this->errorMessage;\n }", "public function message()\n {\n return $this->errorMessage;\n }", "private static function transformJsonError($error)\n {\n switch ($error) {\n case JSON_ERROR_DEPTH:\n return 'Maximum stack depth exceeded.';\n case JSON_ERROR_STATE_MISMATCH:\n return 'Underflow or the modes mismatch.';\n case JSON_ERROR_CTRL_CHAR:\n return 'Unexpected control character found.';\n case JSON_ERROR_SYNTAX:\n return 'Syntax error, malformed JSON.';\n case JSON_ERROR_UTF8:\n return 'Malformed UTF-8 characters, possibly incorrectly encoded.';\n default:\n return 'Unknown error.';\n }\n }", "public function getMessageError()\n {\n return $this->client->getMessageError();\n }", "public function getLastError()\n {\n if (0 < $this->errorCode) {\n return $this->errorMessage.' ('.$this->errorCode.')';\n } else {\n return '';\n }\n }", "function decodeJson($object) {\n $result = json_decode($object);\n switch (json_last_error()) {\n case JSON_ERROR_NONE:\n break;\n case JSON_ERROR_DEPTH:\n echo ' - Maximum stack depth exceeded';\n break;\n case JSON_ERROR_STATE_MISMATCH:\n echo ' - Underflow or the modes mismatch';\n break;\n case JSON_ERROR_CTRL_CHAR:\n echo ' - Unexpected control character found';\n break;\n case JSON_ERROR_SYNTAX:\n echo ' - Syntax error, malformed JSON';\n break;\n case JSON_ERROR_UTF8:\n echo ' - Malformed UTF-8 characters, possibly incorrectly encoded';\n break;\n default:\n echo ' - Unknown error';\n break;\n }\n\n return $result;\n}", "public static function lasterror()\n {\n $error = error_get_last();\n\n return sprintf(\n '%s: %s, %s: %s, %s: %s, %s: %s',\n _('Type'),\n $error['type'],\n _('File'),\n $error['file'],\n _('Line'),\n $error['line'],\n _('Message'),\n $error['message']\n );\n }", "public function getDetail()\n\t{\n\t\tif (!empty($this->reasons)) {\n\t\t\t$reasons = array_map(function(BaseException $reason) {\n\t\t\t\tif ($reason instanceof ParseException) {\n\t\t\t\t\treturn $reason->getDetail();\n\t\t\t\t} else {\n\t\t\t\t\treturn $reason->getMessage();\n\t\t\t\t}\n\t\t\t}, $this->reasons);\n\n\t\t\treturn \"There were following reasons for this exception:\\n\" . implode(\"\\n\", $reasons);\n\t\t}\n\n\t\treturn '';\n\t}", "public function __toString()\n {\n if (!is_null($this->jsonBody) && isset($this->jsonBody['error'])) {\n return $this->jsonBody['error'];\n }\n\n if (!is_null($this->httpStatus)) {\n return 'HTTP status: ' . $this->httpStatus;\n }\n\n return $this->message;\n }", "public function getErrorMessage()\n {\n return $this->message;\n }", "public function errorMessage() {\n\t\treturn $this->error->getMessage();\n\t}", "protected static function error() {\n $response = ['success' => false, 'message' => 'Something went wrong'];\n return json_encode($response);\n }", "public function getMessage() {\n return $this->err_message;\n }", "public function lastError(){\n if($this->errorMsg){\n return $this->errorMsg;\n }else{\n return 'no Errors';\n }\n }", "public function get_last_error()\n\t{\n\t\t$error = end( $this->errors );\n\t\treturn ( array( 'query'=>$error['query'], 'message'=>$error['error'][2] ) );\n\t}", "public function getErrorMessage()\n {\n return $this->curlErrorMessage;\n }", "public function getErrorMessage() {\n return $this->message;\n }", "public function getClientErrorDescription();", "function jsonw_last_error()\n{\n if ( isset($GLOBALS[\"JSONW_ERROR\"]) ) {\n return $GLOBALS[\"JSONW_ERROR\"];\n }\n return json_last_error();\n}", "public function getErrorDetails(): string\n {\n return $this->getMessage();\n }", "public function getMessage()\n {\n if ($this->isOk()) {\n return '';\n }\n\n return $this->getError()->getMessage();\n }", "function ShowJSONFail($message, $extras = null) {\r\n\r\n\t\tif ($extras == null)\r\n\t\t\t$extras = array();\r\n\r\n\t\t$extras['status'] = 'Fail';\r\n\t\t$extras['notes'] = $message;\r\n\r\n\t\t$this->ShowJSON($extras);\r\n\t\texit();\r\n\t}", "function oneError($e) {\n printf(\"\\t%s\\n\", json_encode($e, JSON_PRETTY_PRINT));\n }", "public function getErrorMessage(): string {\n return $this->errorMessage;\n }", "public function get_error(){\n\t\t$message = $this->error;\n\t\t$this->error = null;\n\t\treturn $message;\n\t}", "function getLastErrror() {\n\t\treturn($this->errorMsg);\n\t}", "public function getLastError(): string\n {\n return $this->lastError;\n }", "public function getLastError(): string\n {\n return $this->lastError;\n }", "function get_error_message()\r\n {\r\n return $this->error;\r\n }", "function getErrorMsg()\r\n\t{\r\n\t\treturn $this->msg;\r\n\t}", "public function failure(string $message) {\n print json_encode(\n array_merge([\n 'status' => 'failure',\n 'response' => [],\n 'error' => $message,\n ],\n $this->info(),\n $this->debug(),\n ),\n $this->mode\n );\n }", "function getLastErrorMessage()\n {\n \treturn $this->lastError;\n }", "public function getLastErrorMsg() {\n\t\tif (!$this->connection) {\n\t\t\treturn '';\n\t\t}\n\t\treturn implode('; ',$this->connection->errorInfo());\n\t}", "public function getErrorMessage() {\n if($this->isSuccess()) {\n return null;\n }\n\n return $this->data[\"error\"][\"message\"];\n }", "public function getLastError()\r\n\t{\r\n\t\treturn $this->lastErrorMessage;\r\n\t}", "function get_error_message()\n\t{\n\t\treturn $this->error;\n\t}", "public function getErrorString()\n {\n return $this->error;\n }", "public function getLastError() {\n if ($this->_data['url'] == 'http://exec.fail.com/') return 'exec fail';\n if ($this->_data['url'] == 'http://getinfo.fail.com/') return 'getinfo fail';\n if ($this->_data['url'] == 'http://setopt.fail.com/') return 'setopt fail';\n if ($this->_data['url'] == 'http://setoptarray.fail.com/') return 'setoptarray fail';\n\n return '';\n }", "public function getLastErrorMessage() {\r\n return $this->_lastErrorMessage;\r\n }", "public static function render_json_error( $message ) {\n\t\t\techo json_encode( '{ \"object\": \"error\", \"message\": \"' . $message . '\" }' );\n\t\t}", "public static function render_json_error( $message ) {\n\t\t\techo json_encode( '{ \"object\": \"error\", \"message\": \"' . $message . '\" }' );\n\t\t}", "public function getErrorMessage() {\n\t\treturn ($this->last_exception) ? $this->last_exception->getMessage() : 'Database temporarily unavailable';\n\t}", "public function getErrorMessage()\n {\n return $this->errorMessage;\n }", "public function getErrorMessage()\n {\n return $this->errorMessage;\n }", "public function getErrorMessage()\n {\n return $this->errorMessage;\n }", "protected function getErrorMessage()\n {\n return $this->exception\n ? $this->exception->getMessage()\n : '';\n }", "private static function getMessage(ResponseInterface $response)\n {\n try {\n return ResponseMediator::getContent($response)['error'] ?? null;\n } catch (DecodingFailedException $e) {\n // return nothing\n }\n }", "function errorJSON($json, $msg) {\n\t\t\t$json[\"error\"] = $msg;\n\t\t\techo json_encode($json);\n\t\t\treturn;\n\t\t}", "public function errorMessage()\n\t{\n\t\tif ($this->hasValidationMessages()) {\n\t\t\treturn $this->errorMessages()[0];\n\t\t}\n\n\t\treturn $this->getMessage();\n\t}", "public function getLastError()\n\t{\n\t\treturn $this->_lastErrorMessage;\n\t}", "protected function errmsg()\r\n\t{\r\n\t\treturn isset($this->context_params['errmsg']) ?\r\n\t\t\t$this->context_params['errmsg'] : '';\r\n\t}", "public function error_message() {\n\t\treturn $this->error_message;\n\t}", "public function getError() : ?string {\n\n // formatted API error\n $error = $this->getVal('body/error/message');\n if($error !== null) {\n return $error;\n }\n\n // exception API error\n $error = $this->getVal('body/exception/message');\n if($error !== null) {\n return $error;\n }\n\n // curl error\n $error = $this->getCurlError();\n if(!StringEx::isNullOrEmpty($error)) {\n return $error;\n }\n\n // the error message must be in the body if nowhere else\n $error = $this->getVal('body');\n if($error !== null) {\n if(is_array($error)) {\n return $this->getXml('body');\n }\n return $error;\n }\n return null;\n }", "public function message()\n {\n return $this->error;\n }", "public function getError_message() { return $this->error_message; }", "public function get_error_message()\n {\n }", "public function get_error_message() {\n\t\treturn $this->_error_message;\n\t}", "public function errorInfo() {\n\t\treturn (is_array($this->errors)) ? array_pop($this->errors) : null;\n\t}", "public function getMessage() {\n\t\t\t$full_error = \"\";\n\t\t\tforeach($this->errorInfo() as $error) {\n\t\t\t\t$full_error .= $error . \"\\n\";\t\n\t\t\t}\n\t\t\treturn $full_error;\n\t\t}", "public function getErrorMessage()\n {\n return $this->error;\n }" ]
[ "0.7629576", "0.73837215", "0.72978276", "0.72855353", "0.70815706", "0.70006037", "0.65535176", "0.65133536", "0.64748436", "0.64532423", "0.637134", "0.6318291", "0.6225379", "0.6201429", "0.6186253", "0.615064", "0.6106194", "0.61053735", "0.6104015", "0.60757095", "0.6042206", "0.6023595", "0.60152406", "0.60112345", "0.5992784", "0.59926033", "0.597002", "0.5914678", "0.5912588", "0.5901155", "0.589843", "0.5894668", "0.5894424", "0.58729565", "0.58624697", "0.58520883", "0.5847656", "0.5829516", "0.5826771", "0.5826771", "0.5826771", "0.5826771", "0.5809465", "0.5802792", "0.5802726", "0.5800033", "0.57982683", "0.5791242", "0.5788356", "0.57882303", "0.5787748", "0.57812726", "0.5775657", "0.5772267", "0.5768876", "0.57661927", "0.57642955", "0.57575864", "0.57563436", "0.573545", "0.5730315", "0.5727695", "0.5722767", "0.5714911", "0.5714263", "0.5704272", "0.5703777", "0.5703777", "0.56986195", "0.5697506", "0.5697094", "0.5694664", "0.56910956", "0.5677976", "0.5675034", "0.56719863", "0.56649303", "0.56549287", "0.56543434", "0.56443065", "0.56443065", "0.5640597", "0.56389755", "0.56389755", "0.56389755", "0.5636353", "0.56308514", "0.5627672", "0.562452", "0.5615658", "0.5610876", "0.5610601", "0.56085813", "0.5603904", "0.55940664", "0.5593013", "0.55913454", "0.5586776", "0.55861354", "0.5582107" ]
0.75717056
1
Decode the SVN access control file (that shall be in JSON form) into a hashed array containing the decoded elements.
Декодируйте файл контроля доступа SVN (который должен быть в формате JSON) в массив с хэшированными элементами.
private static function parseAccessFile( $svnaccess_contents ) { $svnaccess_specs = json_decode( $svnaccess_contents, TRUE ); if( json_last_error() != JSON_ERROR_NONE ) { throw new USVN_Exception( "Error parsing SVN access control file: %s", self::getJsonErrorMsg() ); } return $svnaccess_specs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function draftinfo_decode($str)\n {\n $info = array();\n\n foreach (preg_split('/;\\s+/', $str) as $part) {\n list($key, $val) = explode('=', $part, 2);\n if (strpos($val, 'B::') === 0) {\n $val = base64_decode(substr($val, 3));\n }\n else if ($key == 'folder') {\n $val = base64_decode($val);\n }\n\n $info[$key] = $val;\n }\n\n return $info;\n }", "function parse_repository_txt( $file_contents = '' ) {\n\t\t\t$repositories_array = array();\n\t\t\t\n\t\t\t$file_contents = str_replace(array(\"\\r\\n\", \"\\r\"), \"\\n\", $file_contents);\n\t\t\t$file_contents = trim($file_contents);\n\t\t\t$file_contents_array = preg_split(\"/(\\r\\n|\\n|\\r)/\", $file_contents );\n\t\t\tif ( !empty( $file_contents_array ) ) {\n\t\t\t\tforeach( $file_contents_array as $repo_item_string ) {\n\t\t\t\t\tif ( !empty( $repo_item_string ) ) {\n\t\t\t\t\t\tlist( $tmp_array['slug'], $tmp_array['version'], $tmp_array['updated_on'] ) = explode( '|', $repo_item_string );\n\t\t\t\t\t\t$tmp_array = array_map( 'trim', $tmp_array );\n\t\t\t\t\t\tif ( ( isset( $tmp_array['slug'] ) ) && ( !empty( $tmp_array['slug'] ) ) ) {\n\t\t\t\t\t\t\t$repositories_array[$tmp_array['slug']] = (object)$tmp_array;\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\treturn $repositories_array;\n\t\t}", "public static function str2array($str)\r\n\t\t{\r\n\t\t\t$rest = array();\r\n\t\t\tif(strpos($str,'|')>0)\r\n\t\t\t{\r\n\t\t\t\t$array = explode('|',$str);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$array=array($str);\r\n\t\t\t}\r\n\t\t\tforeach($array as $token)\r\n\t\t\t{\r\n\t\t\t\tlist($key,$value) = explode('&',$token);\r\n\t\t\t\t$nkey=base64_decode($key);\r\n\t\t\t\t$nvalue = (substr($value,0,1) != '$' ? base64_decode($value) : str2array(base64_decode(substr($value,1))) );\r\n\t\t\t\t$rest[$nkey] = $nvalue;\r\n\t\t\t\t//printf(\"Decoded %s,%s to %s,%s\\n\",$key,$value,$nkey,$nvalue);\r\n\t\t\t}\r\n\t\t\treturn $rest;\r\n\t\t}", "public function parseOutput() : array\n {\n $lines = explode(PHP_EOL, $this->processResponse->getOutput());\n $fileIndex = [];\n foreach ($lines as $l) {\n $fileStatus = substr($l, 0, 2);\n switch ($fileStatus){\n case 'A ':\n $fileIndex['added'][] = substr($l, 2);\n break;\n case 'AA':\n $fileIndex['bothAdded'][] = substr($l, 2);\n break;\n case 'AU':\n $fileIndex['addedByUs'][] = substr($l, 2);\n break;\n case 'UA':\n $fileIndex['addedByThem'][] = substr($l, 2);\n break;\n case ' M':\n case 'M ':\n $fileIndex['modified'][] = substr($l, 2);\n break;\n case 'UU':\n $fileIndex['bothModified'][] = substr($l, 2);\n break;\n case 'UD':\n $fileIndex['deletedByThem'][] = substr($l, 2);\n break;\n case 'D ':\n $fileIndex['deleted'][] = substr($l, 2);\n break;\n case ' D':\n $fileIndex['deletedRemote'][] = substr($l, 2);\n break;\n case 'DD':\n $fileIndex['bothDeleted'][] = substr($l, 2);\n break;\n case 'DU':\n $fileIndex['deletedByUs'][] = substr($l, 2);\n break;\n case 'R ':\n $fileIndex['renamed'][] = substr($l, 2);\n break;\n case 'C ':\n $fileIndex['copied'][] = substr($l, 2);\n break;\n case '??':\n $fileIndex['unTracked'][] = substr($l, 2);\n break;\n case '!!':\n $fileIndex['ignored'][] = substr($l, 2);\n break;\n default:\n if (substr($l, 2)) {\n dump($fileStatus);\n $fileIndex['unknown'][] = substr($l, 2);\n }\n\n break;\n }\n }\n return $fileIndex;\n }", "function _getSVNEntries($filename)\n {\n $content = file_get_contents($filename);\n if (substr($content, 0, 5) != '<?xml') {\n // Not XML; assume newer (>= SVN 1.4) SVN entries format\n // http://svn.apache.org/repos/asf/subversion/trunk/subversion/libsvn_wc/README\n\n // The directory entries are seperated by #0c; look for the first #0c\n // The hex GUID (xxxx-xxxx-xxxx-xxxx-xxxx) may not always be set\n // The list of files follows this\n if (!preg_match('/\\x0c\\n(.*)$/ms', $content, $matches)) {\n return false;\n }\n\n // Each file entry seems to look something like this:\n // [filename]\n // [type of file e.g. \"dir\", \"file\"]\n // [varying number of \\n]\n // [optional \"deleted\" string]\n $files = explode(\"\\x0c\", trim($matches[1]));\n foreach ($files as $file) {\n $lines = explode(\"\\n\", trim($file));\n if (isset($lines[1]) && $lines[1] == 'file') {\n $deleted = false;\n foreach ($lines as $line) {\n // 'deleted' means it's already gone\n // 'delete' means it's marked as ready to delete\n if ($line == 'deleted' || $line == 'delete') {\n $deleted = true;\n }\n }\n\n if (!$deleted) {\n $entries[] = $lines[0];\n }\n }\n }\n } elseif (function_exists('simplexml_load_string')) {\n // this breaks simplexml because \"svn:\" is an invalid namespace, so strip it\n $content = str_replace('xmlns=\"svn:\"', '', $content);\n $all = simplexml_load_string($content);\n $entries = array();\n foreach ($all->entry as $entry) {\n if ($entry['kind'] == 'file') {\n // 'deleted' means it's already gone\n // 'delete' means it's marked as ready to delete\n if (isset($entry['deleted']) || isset($entry['delete'])) {\n continue;\n }\n array_push($entries, $entry['name']);\n }\n }\n } else {\n require_once 'XML/Unserializer.php';\n $options = array(\n XML_UNSERIALIZER_OPTION_ATTRIBUTES_PARSE => true,\n XML_UNSERIALIZER_OPTION_ATTRIBUTES_ARRAYKEY => false\n );\n $unserializer = new XML_Unserializer($options);\n $status = $unserializer->unserialize($content);\n if (PEAR::isError($status)) {\n return false;\n }\n $tree = $unserializer->getUnserializedData();\n\n // loop through the xml tree and keep only valid entries being files\n $entries = array();\n foreach ($tree['entry'] as $entry) {\n if ($entry['kind'] == 'file') {\n // 'deleted' means it's already gone\n // 'delete' means it's marked as ready to delete\n if (isset($entry['deleted']) || isset($entry['delete'])) {\n continue;\n }\n array_push($entries, $entry['name']);\n }\n }\n\n unset($unserializer, $tree);\n }\n\n if (isset($entries) && is_array($entries)) {\n return $entries;\n }\n\n return false;\n }", "static public function define_decode_contents() {\n $contents = array();\n\n //$contents[] = new restore_decode_content('decisiontree', array('intro'), 'decisiontree');\n \n\n return $contents;\n }", "function getJsonDataFileContentsAsArray($fileName) : array\n{\n validateFilePath($fileName);\n\n return json_decode(file_get_contents($fileName), true);\n}", "protected function decode()\n\t{\n\t\t$value = $_COOKIE[$name];\n\t\t$pos = strrpos( $value, '#' );\n\t\t\n\t\tif( $pos === false )\n\t\t{\n\t\t\treturn array();\n\t\t}\n\t\t\n\t\tlist( $expire, $path, $domain, $secure, $httponly ) = explode( ':', substr( $value, $pos + 1 ) );\n\t\t$value = substr( $value, 0, $pos );\n\t\t\n\t\treturn array( 'value' => $value, 'expire' => (int)$expire, 'path' => $path, 'domain' => $domain, 'secure' => (bool)$secure, 'httponly' => (bool)$httponly );\n\n\t}", "function decode_jsons($data){\n\t\tforeach($data as $key => $value){\n\t\t\tif(substr($value,0,9)=='_db_json'.\"\\n\"){\n\t\t\t\t$data[$key] = json_decode(substr($value,9),true);\n\t\t\t}\n\t\t}\n\t\treturn $data;\n\t}", "function _theme_userapi_parseinifile($filename)\n{\n $output = array();\n $contents = file($filename);\n foreach ($contents as $line) {\n $line = trim($line);\n $length = strlen($line);\n if ($length > 0) {\n if (substr($line, 0, 1) == '[' && substr($line, -1, 1) == ']') {\n $section = substr($line, 1, $length-2);\n } else {\n $parts = explode('=', $line);\n if (isset($section) && !empty($section)) {\n $output[$section][trim($parts[0])] = trim($parts[1]);\n } else {\n $output[trim($parts[0])] = trim($parts[1]);\n }\n }\n }\n }\n return $output;\n}", "public static function decode( string $data ): array;", "function file_to_array(string $file_name)\n{\n if (file_exists($file_name)) {\n $data = file_get_contents($file_name);\n $decoded = json_decode($data, true);\n return is_array($decoded) ? $decoded : [];\n } else {\n return false;\n }\n // $data = file_get_contents($file_name);\n // if ($data) {\n // $decoded = json_decode($data, true);\n // return $decoded;\n // } else if ($data === '') {\n // return [];\n // } else {\n // return false;\n // }\n}", "protected function data_decode($txt){ return unserialize($txt);}", "protected function decode($var)\n {\n return (array) YamlParser::parse($var);\n }", "public function read(): array\n {\n if (! $this->files->exists($this->path())) {\n return [];\n }\n\n return json_decode($this->files->get($this->path()), true, 512, JSON_THROW_ON_ERROR);\n }", "public function decode(string $id): array;", "public function load( File $file ): array {\n return json_decode( $file->read(), true );\n }", "function read_state(){\r\n return unserialize(file_get_contents(\"tmp/oauthtestentry.php\"));\r\n}", "function load_htpasswd()\n{\n if (!file_exists(HTPASSWDFILE)) {\n return Array();\n }\n\n $res = Array();\n foreach (file(HTPASSWDFILE) as $l) {\n $array = explode(':', $l);\n $user = $array[0];\n $pass = chop($array[1]);\n $res[$user] = $pass;\n }\n return $res;\n}", "private function parseFile($file)\n {\n return json_decode(\n file_get_contents($file)\n );\n }", "private function decryptData()\n {\n $files = $this->getFileContents();\n\n if (empty($files)) throw new Exception('No files to decode');\n\n $contents = [];\n\n foreach ($files as $file) {\n $contents[] = $this->decryptSingleFile($file);\n }\n\n usort($contents, function(Chunk $a, Chunk $b) {\n return $a->getStart() <=> $b->getStart();\n });\n\n $result = array_reduce($contents, function(string $acc, Chunk $item) {\n return $acc.$item->getContent();\n }, \"\");\n\n return json_decode($result);\n }", "function entries(){\r\n\t\t// Code\r\n\t\tif(false === $tableStruct = file_cull_contents($this->struct, -12, 8, SEEK_END))\r\n\t\t\treturn !trigger_error('[' . basename(__FILE__) . '] &lt; ' . __LINE__ . ' &gt;', E_USER_WARNING);\r\n\t\t$tableStruct = unpack('N*', desanitize($tableStruct));\r\n\t\treturn array(\r\n\t\t\t'history' => $tableStruct[1] + $tableStruct[2], \r\n\t\t\t'unique' => $tableStruct[1]\r\n\t\t);\r\n\t}", "public static function decodeAccessCode($access_code)\n\t{\n\t\t$len = App::getSetting('core_tickets.ptac_auth_code_len');\n\t\tif (strlen($access_code) < ($len+1)) return false;\n\n\t\t$matches = Strings::extractRegexMatch('#^(.+)(.{'.$len.'})$#', $access_code, -1);\n\t\tif (!$matches) return false;\n\n\t\tlist (, $ticket_id, $auth) = $matches;\n\n\t\t$ticket_id = Util::baseDecode($ticket_id, 'letters');\n\n\t\treturn array(\n\t\t\t'ticket_id' => $ticket_id,\n\t\t\t'auth' => $auth\n\t\t);\n\t}", "function load_htpasswd()\n{\n if ( !file_exists(HTPASSWDFILE))\n return Array();\n\n $res = Array();\n foreach(file(HTPASSWDFILE) as $l)\n {\n $array = explode(':',$l);\n $user = $array[0];\n $pass = chop($array[1]);\n $res[$user] = $pass;\n }\n return $res;\n}", "private function readFile() {\n \n $handle = fopen($this->filename, \"r\");\n $contents = fread($handle, filesize($this->filename));\n fclose($handle);\n \n return json_decode($contents, true);\n }", "public function recoveryCodes(): array\n {\n return json_decode(decrypt($this->two_factor_recovery_codes), true);\n }", "public function decode(string $jwt): array;", "function uncache_var($file) {\n\tif(!file_exists($file)) return array();\n\t$handle = fopen($file,'r');\n\t$contents = fread($handle, filesize($file));\n\tfclose($handle);\n\treturn unserialize($contents);\n}", "function File_Get_Array_From_JSON($FileName, $zip=false) {\n\t// liest eine JSON Datei und erstellt eine Array\n if (! is_file($FileName)) \t{ LOGGING(\"helper.php: The file $FileName does not exist.\", 3); exit; }\n\t\tif (! is_readable($FileName))\t{ LOGGING(\"helper.php: The file $FileName could not be loaded.\", 3); exit;}\n if (! $zip) {\n\t\t\t\treturn json_decode(file_get_contents($FileName), true);\n } else {\n\t\t\t\treturn json_decode(gzuncompress(file_get_contents($FileName)), true);\n\t }\n}", "function _readSVNEntries($entries)\n {\n $ret = array();\n $ignore = $this->_options['ignore'];\n // implicitly ignore packagefile\n $ignore[] = $this->_options['packagefile'];\n $include = $this->_options['include'];\n $this->ignore = array(false, false);\n $this->_setupIgnore($ignore, 1);\n $this->_setupIgnore($include, 0);\n foreach ($entries as $entry) {\n $directory = @dirname(@dirname($entry));\n if (!$directory) {\n continue;\n }\n $d = $this->_getSVNEntries($entry);\n if (!is_array($d)) {\n continue;\n }\n\n foreach ($d as $entry) {\n if ($ignore) {\n if ($this->_checkIgnore($entry,\n $directory . DIRECTORY_SEPARATOR . $entry, 1)) {\n continue;\n }\n }\n\n if ($include) {\n if ($this->_checkIgnore($entry,\n $directory . DIRECTORY_SEPARATOR . $entry, 0)) {\n continue;\n }\n }\n $ret[] = $directory . DIRECTORY_SEPARATOR . $entry;\n }\n }\n return $ret;\n }", "function _ini_to_array($path) {\n return parse_ini_file($path, TRUE);\n }", "function ju_json_file_read(string $p) {return ju_json_decode(ju_contents($p));}", "private function _stage_two($file_path, $decode) {\n\n $data = $this->fileReadDecode($file_path);\n\n\n if (isset($data[$this->ip])) {\n\n $decode[$this->ip] = array(\n 'count' => $data[$this->ip]['count'],\n 'locked' => $data[$this->ip]['locked'],\n 'url' => $data[$this->ip]['url'],\n 'time' => $data[$this->ip]['time'],\n 'verify' => $data[$this->ip]['verify']\n );\n\n $count = $data[$this->ip]['count'];\n $decode = $this->setLock($data, $decode, $count);\n }\n\n return $decode;\n }", "public static function getFileContent($file)\n {\n $content = [];\n\n if (Storage::disk('permissions')->exists($file)) {\n $content = Storage::disk('permissions')->get($file);\n $content = json_decode($content, true);\n }\n\n return $content;\n }", "public function decode() {\r\n $this->files = $this->adapter->extract($this->getPath());\r\n }", "private function fetchKeysetData(): array\n {\n $keysResponse = $this->httpClient->request('GET', '');\n\n return json_decode($keysResponse->getBody()->getContents(), true);\n }", "function readModulInfo($fileJson)\n{\n if ( file_exists($fileJson) )\n {\n return json_decode( file_get_contents($fileJson) ,true); \n }\n}", "public function decode($data)\n {\n $offset = 0;\n $errcode = self::unpack(self::BIT_B16_SIGNED, substr($data, $offset, 2));\n $offset += 2;\n $apiVersions = $this->decodeArray(substr($data, $offset), [$this, 'apiVersion']);\n $offset += $apiVersions['length'];\n\n return [\n 'apiVerions' => $apiVersions['data'],\n 'errorCode' => $errcode,\n ];\n }", "function get_clan_from_file($clan)\n{\n return unserialize(file_get_contents(\"$clan.data\"));\n}", "function decode( string $data, int $depth = 10 ) : array {\n\t$depth\t= intRange( $depth, 1, 50 );\n\t$out\t= \n\t\\json_decode( \n\t\t\\utf8_encode( $data ), true, $depth, \n\t\t\\JSON_BIGINT_AS_STRING\n\t);\n\t\n\tif ( empty( $out ) || false === $out ) {\n\t\treturn [];\n\t}\n\t\n\treturn $out;\n}", "function ca_deserialize_permission_string($permission_str)\n{\n $forms_and_views = explode(\"|\", $permission_str);\n\n $data = array();\n foreach ($forms_and_views as $form_info)\n {\n if (empty($form_info))\n continue;\n\n list($form_id, $view_str) = explode(\":\", $form_info);\n $view_ids = explode(\",\", $view_str);\n $data[$form_id] = $view_ids;\n }\n\n return $data;\n}", "function static_entry_to_array ( $entryFile ) {\n // Reads a blog entry and returns an key/value pair array.\n //\n // Returns false on fail...\n global $sb_info;\n $blog_entry_data = array();\n \n $str = sb_read_file( $entryFile );\n $exploded_array = explode( '|', $str );\n \n if ( count( $exploded_array ) > 1 ) {\n if ( count( $exploded_array ) <= 6 ) {\n // Old List Format: subject, date, content \n $blog_entry_data[ 'VERSION' ] = $sb_info[ 'version' ];\n $blog_entry_data[ 'SUBJECT' ] = $exploded_array[0];\n $blog_entry_data[ 'DATE' ] = $exploded_array[1];\n $blog_entry_data[ 'CONTENT' ] = $exploded_array[2];\n \n } else {\n // New Format: key/value pairs\n // VERSION, SUBJECT, DATE, CONTENT\n \n $blog_entry_data = explode_with_keys( $exploded_array );\n }\n return( $blog_entry_data );\n } else {\n // Exploded array only contained 1 item, so something is wrong...\n return( false );\n }\n }", "function geo_hash_decode(string $geoHash): array\n {\n return geo_hash()->decode($geoHash);\n }", "public function extractJSON($path){\n $user = array();\n $str = file_get_contents($path);\n $json = json_decode($str,true);\n foreach ($json as $item){\n $user = $item;\n }\n return $user;\n }", "private function from_file_cache()\n {\n \treturn file_exists( $this->cache_file ) ? json_decode( file_get_contents( $this->cache_file ) ) : false;\n }", "function readIssListFile($file) {\n #depracated\n if ($obj = readArray($file)) { return $obj; }\n return array();\n}", "private function digestParse($txt) {\n $needed_parts = array('nonce'=>1, 'nc'=>1, 'cnonce'=>1, 'qop'=>1, 'username'=>1, 'uri'=>1, 'response'=>1);\n $data = array();\n $parts = explode(\",\",$txt);\n foreach($parts as $part) {\n $div = strpos($part,\"=\");\n $name = trim(substr($part,0,$div));\n $value = trim(substr($part,$div + 1));\n if($value[0] == \"\\\"\") {\n $value = substr($value,1, strlen($value) - 2);\n }\n unset($needed_parts[$name]);\n $data[$name] = $value;\n }\n\n return $needed_parts ? false : $data;\n }", "public function getAuthInfoArray() {}", "public function get_json_acl() {\n return json_encode(array_values($this->acl));\n }", "public function load(){\n\t\t$this->entries = array();\n\n\t\tif (!file_exists($this->filepath)){\n\t\t\treturn;\n\t\t}\n\n\t\t$json = file_get_contents($this->filepath);\n\t\tif (!$json) return;\n\t\t$this->entries = json_decode(file_get_contents($this->filepath), true);\n\t\t$this->rehash();\n\t}", "public static function get_changes_as_array($p_changes_binary)\n {\n $l_changes = unserialize($p_changes_binary);\n\n if ($l_changes && is_array($l_changes))\n {\n if (array_key_exists(\"isys_cmdb_dao_category_s_person_login::user_pass\", $l_changes))\n {\n $l_changes[\"isys_cmdb_dao_category_s_person_login::user_pass\"][\"to\"] = \"***\";\n }\n if (array_key_exists(\"C__CONTACT__PERSON_PASSWORD\", $l_changes))\n {\n $l_changes[\"C__CONTACT__PERSON_PASSWORD\"][\"to\"] = \"***\";\n }\n if (array_key_exists(\"C__CONTACT__PERSON_PASSWORD_SECOND\", $l_changes))\n {\n $l_changes[\"C__CONTACT__PERSON_PASSWORD_SECOND\"][\"to\"] = \"***\";\n }\n\n return $l_changes;\n }\n\n else return [];\n }", "protected function ReadData()\n\t{\n\t\t$this->dataRead = true;\n\n\t\t/* get data from git_rev_list */\n\t\t$exe = new GitPHP_GitExe($this->project);\n\t\t$args = array();\n\t\t$args[] = '--header';\n\t\t$args[] = '--parents';\n\t\t$args[] = '--max-count=1';\n\t\t$args[] = $this->hash;\n\t\t$ret = $exe->Execute(GIT_REV_LIST, $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/* In case we returned something unexpected */\n\t\t$tok = strtok($lines[0], ' ');\n\t\tif ($tok != $this->hash)\n\t\t\treturn;\n\n\t\t/* Read all parents */\n\t\t$tok = strtok(' ');\n\t\twhile ($tok !== false) {\n\t\t\ttry {\n\t\t\t\t$this->parents[] = new GitPHP_Commit($this->project, $tok);\n\t\t\t} catch (Exception $e) {\n\t\t\t\terror_log($e);\n\t\t\t}\n\t\t\t$tok = strtok(' ');\n\t\t}\n\n\t\tforeach ($lines as $i => $line) {\n\t\t\tif (preg_match('/^tree ([0-9a-fA-F]{40})$/', $line, $regs)) {\n\t\t\t\t/* Tree */\n\t\t\t\ttry {\n\t\t\t\t\t$tree = $this->project->GetTree($regs[1]);\n\t\t\t\t\tif ($tree) {\n\t\t\t\t\t\t$tree->SetCommit($this);\n\t\t\t\t\t\t$this->tree = $tree;\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\terror_log($e);\n\t\t\t\t}\n\t\t\t} else if (preg_match('/^author (.*) ([0-9]+) (.*)$/', $line, $regs)) {\n\t\t\t\t/* author data */\n\t\t\t\t$this->author = $regs[1];\n\t\t\t\t$this->authorEpoch = $regs[2];\n\t\t\t\t$this->authorTimezone = $regs[3];\n\t\t\t} else if (preg_match('/^committer (.*) ([0-9]+) (.*)$/', $line, $regs)) {\n\t\t\t\t/* committer data */\n\t\t\t\t$this->committer = $regs[1];\n\t\t\t\t$this->committerEpoch = $regs[2];\n\t\t\t\t$this->committerTimezone = $regs[3];\n\t\t\t} else {\n\t\t\t\t/* commit comment */\n\t\t\t\tif (!(preg_match('/^[0-9a-fA-F]{40}/', $line) || preg_match('/^parent [0-9a-fA-F]{40}/', $line))) {\n\t\t\t\t\t$trimmed = trim($line);\n\t\t\t\t\tif (empty($this->title) && (strlen($trimmed) > 0))\n\t\t\t\t\t\t$this->title = $trimmed;\n\t\t\t\t\tif (!empty($this->title)) {\n\t\t\t\t\t\tif ((strlen($trimmed) > 0) || ($i < (count($lines)-1)))\n\t\t\t\t\t\t\t$this->comment[] = $trimmed;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "public function loadJsonPermissions(): array\n {\n if (! file_exists(resource_path('permissions/permissions.json'))) {\n return [];\n }\n\n return $this->jsonPermissions ? $this->jsonPermissions : $this->jsonPermissions = json_decode(file_get_contents(resource_path('permissions/permissions.json')), true);\n }", "protected function loadPageStates()\n {\n \tif(!empty($_POST[self::STATE_INPUT_NAME]))\n \t{\n \t\tif(($data=base64_decode($_POST[self::STATE_INPUT_NAME]))!==false)\n \t\t{\n \t\t\tif(extension_loaded('zlib'))\n \t\t\t\t$data=@gzuncompress($data);\n \t\t\tif(($data=Benben::app()->getSecurityManager()->validateData($data))!==false)\n \t\t\t\treturn unserialize($data);\n \t\t}\n \t}\n \treturn array();\n }", "function json2array(string $name): array\n{\n return json_decode(file_get_contents(\"data/$name.json\"), true);\n}", "private function getDictionary($file_name) {\n\t\t\t$dictionary_file = file_get_contents($file_name);\n\t\t\treturn (array) explode(\"\\n\", $dictionary_file);\n\t\t}", "public function decodeToken(string $token) : array;", "private function extractLevelData(){\n $zip = new ZipArchive;\n if( !$zip->open($this->file) ){\n throw new Exception(\"Unable to open the level file to extract its content\");\n }\n $data = $zip->getFromName(self::filename);\n $zip->close();\n return json_decode($data, true);\n }", "public function getRevisions() {\n\t\t$listEntries = Temboo_Results::getSubItemByKey($this->base, \"items\");\n\t\t$resultArray = array();\n\t\tif(!is_null($listEntries)) {\n\t\t\tforeach ($listEntries as $entry) {\n\t\t \tarray_push($resultArray, new Google_Drive_Revision_output($entry));\n\t\t\t}\n\t\t}\n\t\treturn $resultArray;\n\t}", "function getJsonDataFromFile($path) : array\n {\n $jsonData = file_get_contents($path);\n $decodedData = json_decode($jsonData, TRUE);\n\n return $decodedData;\n }", "public function decodeJson($file)\n {\n return json_decode($file, true);\n }", "public static function decodeFile($file) {\n return self::decode(file_get_contents($file));\n }", "function parse_list() {\n\t$file = file(_GITLIST);\n\t\n\tforeach($file as $line) {\n\t\t//echo $line;\n\t\t\n\t\t// Perl-style regex: /regex/\n\t\tpreg_match(\"/(.*) => {(.*)}/\",$line,$match);\n\t\t// First part is the directory\n\t\t$directory[] = $match[1];\n\t\t// Second part is a comma-separated list of branch=source pairs\n\t\t$sources[] = explode(\",\",$match[2]);\n\t}\n\t\n\tforeach($sources as $key => $source) {\n\t\t$tmp = null;\n\t\tforeach($source as $item) {\n\t\t\t$tmp[]=explode(\"=\",$item);\n\t\t}\n\t\t$sources[$key] = $tmp;\n\t}\n\t\n\treturn array($directory,$sources);\n}", "public static function getJsonVersionInfos()\n {\n return json_decode(\\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::getUrl('http://get.typo3.org/json'), true);\n }", "function parse_var_file($filename)\r\n{\r\n\t$result = array();\r\n\r\n\t$raw_lines = file($filename);\r\n\r\n\twhile (list(, $line) = each($raw_lines))\r\n\t{\r\n\t\t$equal_pos = strpos($line, '=');\r\n\t\tif ($equal_pos === false)\r\n\t\t{\r\n\t\t\t$result[trim($line)] = null;\r\n\t\t} \r\n\t\telse\r\n\t\t{\r\n\t\t\t$key = trim(substr($line, 0, $equal_pos));\r\n\t\t\tif (strlen($key) > 0)\r\n\t\t\t{\r\n\t\t\t\t$result[$key] = trim(substr($line, $equal_pos + 1));\r\n\t\t\t} \r\n\t\t} \r\n\t} \r\n\treturn $result;\r\n}", "function readLockState(){\n $state = array();\n if (file_exists($GLOBALS['pathToState'])) {\n $stateFile = file_get_contents($GLOBALS['pathToState']);\n $state = json_decode($stateFile, true);\n }\n return $state;\n}", "private function getDataFromFile()\n {\n if (false === file_exists($this->getFile())) {\n return array();\n }\n \n $return = array();\n \n $string = file_get_contents($this->getFile());\n \n if (false === empty($string)) {\n $return = unserialize($string);\n }\n\n return count($return) > 0 ? $return : array();\n }", "private function readDictionaryJSON($filename)\n {\n $definitionFile = $filename.'.definition.json';\n assert('file_exists($definitionFile)');\n\n $fileContent = file_get_contents($definitionFile);\n $lang = json_decode($fileContent, true);\n\n if (empty($lang)) {\n \\SimpleSAML\\Logger::error('Invalid dictionary definition file ['.$definitionFile.']');\n return array();\n }\n\n $translationFile = $filename.'.translation.json';\n if (file_exists($translationFile)) {\n $fileContent = file_get_contents($translationFile);\n $moreTrans = json_decode($fileContent, true);\n if (!empty($moreTrans)) {\n $lang = array_merge_recursive($lang, $moreTrans);\n }\n }\n\n return $lang;\n }", "public static function decodeGuardData(): array\n {\n return [\n [null],\n [''],\n [0],\n [false],\n ];\n }", "function getAuthCode() {\n return array((int)$this->response['AUTHCODE'] => $this->authCodes[(int)$this->response['AUTHCODE']]);\n }", "public function get_contents_array($file)\n {\n }", "public function get_contents_array($file)\n {\n }", "function getCredentials($credsFile)\n{\n $credsStr = file_get_contents($credsFile);\n $credsArr = array();\n $linesArr = explode(\";\", $credsStr);\n $linesArr = explode(\"\\n\", $linesArr[0]);\n foreach ($linesArr as $index => $line) {\n\n $valueSplit = explode(\":\", $line);\n $credsArr[$valueSplit[0]] = $valueSplit[1];\n }\n return ($credsArr);\n}", "public function getInstallationAccessToken(): array\n {\n $jwt = $this->createJwt();\n $installationId = $this->source->installation_id;\n\n return Http::withHeaders([\n 'Authorization' => \"Bearer $jwt\",\n 'Accept' => 'application/vnd.github.machine-man-preview+json',\n ])\n ->post(\"https://api.github.com/app/installations/$installationId/access_tokens\")\n ->throw()\n ->json();\n }", "protected function loadFromFile($file)\n\t{\n\t\t$collection = $this->getCollection($file);\n\t\t$criteria = array('configId' => $this->configId);\n\t\t$data = $collection->findOne($criteria);\n\n\t\tif (empty($data))\n\t\t\treturn array();\n\n\t\t// remove _id from data, because it's not an AuthItem\n\t\tif (isset($data['_id']))\n\t\t{\n\t\t\t$this->_id = $data['_id'];\n\t\t\tunset($data['_id']);\n\t\t}\n\n\t\t// remove configId from data, because it's not an AuthItem\n\t\tif (isset($data['configId']))\n\t\t{\n\t\t\t$this->configId = $data['configId'];\n\t\t\tunset($data['configId']);\n\t\t}\n\n\t\treturn $data;\n\t}", "public function read()\n {\n return json_decode($this->files->get($this->path()), true);\n }", "public function parse() {\n $parsed_data = [];\n $mapinfo_lines = split(PHP_EOL, $this->bytes);\n foreach ($mapinfo_lines as $line) {\n $line = trim($line);\n if ($this->clean_token($line) == 'nojump' || $this->clean_token($line) == 'nocrouch') {\n $parsed_data['jumpcrouch'] = 0;\n }\n if ($this->clean_token($line) == 'allowjump' || $this->clean_token($line) == 'allowcrouch') {\n $parsed_data['jumpcrouch'] = 1;\n }\n \n $line_tokens = split(\"=\", $line);\n if (in_array($this->clean_token($line_tokens[0]), ['sky1', 'skybox'])) {\n $parsed_data['sky1'] = $this->strip_quotes($line_tokens[1]);\n }\n if ($this->clean_token($line_tokens[0]) == 'sky2') {\n $parsed_data['sky2'] = $this->strip_quotes($line_tokens[1]);\n }\n }\n \n return($parsed_data);\n }", "function get_htpasswd($path)\r\n{\r\n\t$ret = array();\r\n\t$m = null;\r\n\tpreg_match_all('/([^\\n\\r:]+):([^\\r\\n]+)/m', file_get_contents($path.'/.htpasswd'), $m);\r\n\tforeach ($m[1] as $i => $v) $ret[$v] = $m[2][$i];\r\n\treturn $ret;\r\n}", "public static function decode( \n\t\tstring\t\t$data\t= '', \n\t\tint\t\t$depth\t= 10 \n\t) : array {\n\t\tif ( empty( $data ) ) {\n\t\t\treturn [];\n\t\t}\n\t\t$depth\t= static::intRange( $depth, 1, 50 );\n\t\t$out\t= \n\t\t\\json_decode( \n\t\t\t\\utf8_encode( $data ), true, $depth, \n\t\t\t\\JSON_BIGINT_AS_STRING\n\t\t);\n\t\t\n\t\tif ( empty( $out ) || false === $out ) {\n\t\t\treturn [];\n\t\t}\n\t\t\n\t\treturn $out;\n\t}", "static public function define_decode_rules() {\n $rules = array();\n\n return $rules;\n\n }", "protected function loadPageStates()\n\t{\n\t\tif(!empty($_POST[self::STATE_INPUT_NAME]))\n\t\t{\n\t\t\tif(($data=base64_decode($_POST[self::STATE_INPUT_NAME]))!==false)\n\t\t\t{\n\t\t\t\tif(extension_loaded('zlib'))\n\t\t\t\t\t$data=@gzuncompress($data);\n\t\t\t\tif(($data=Yii::app()->getSecurityManager()->validateData($data))!==false)\n\t\t\t\t\treturn unserialize($data);\n\t\t\t}\n\t\t}\n\t\treturn array();\n\t}", "function get_htpasswd()\r\n { \r\n if($f = @fopen($this->ht_dir.'/'.$this->htpasswd_file, \"r\"))\r\n {\r\n $users = array();\r\n flock($f,2);\r\n while($f && !feof($f))\r\n {\r\n $usr = array();\r\n if(preg_match(\"/^([a-zA-Z]*):(.*)/\",fgets($f, 1024),$usr))\r\n { \r\n $users[$usr[1]] = $usr[2];\r\n }\r\n }\r\n flock($f,3);\r\n fclose($f);\r\n ksort($users);\r\n return $users;\r\n }\r\n else\r\n {\r\n return FALSE;\r\n }\r\n }", "function urlhash_Decode( $in ) {\n\tglobal $urlhash_Hashids;\n\treturn $urlhash_Hashids->decode($in)[0];\t// NOTE: always returns an array\n}", "public function decode($filename);", "protected function http_digest_parse($txt){\n // Protect against missing data\n $needed_parts = array('nonce'=>1, 'nc'=>1, 'cnonce'=>1, 'qop'=>1, 'username'=>1, 'uri'=>1, 'response'=>1);\n $data = array();\n $keys = implode('|', array_keys($needed_parts));\n \n preg_match_all('@(' . $keys . ')=(?:([\\'\"])([^\\2]+?)\\2|([^\\s,]+))@', $txt, $matches, PREG_SET_ORDER);\n \n foreach ($matches as $m) {\n $data[$m[1]] = $m[3] ? $m[3] : $m[4];\n unset($needed_parts[$m[1]]);\n }\n \n return $needed_parts ? false : $data;\n }", "function decodeCLIHeader($s) {\n \t$aHeaders = array();\n \t$aRawLines = explode('..', $s);\n \tforeach ($aRawLines as $sLine) {\n \t\t$aPair = explode('.', $sLine);\n \t\tif (2 == count($aPair)) {\n \t\t\t$sKey = base64_decode($aPair[0]);\n \t\t\t$sValue = base64_decode($aPair[1]);\n \t\t\t$aHeaders[strtoupper($sKey)] = $sValue;\n \t\t} // if got a pair\n \t} // foreach line\n\n \treturn $aHeaders;\n\n\t\t// more dangerous and possibly slower way: $aHeaders = @eval('return ' . $s . ';');\n\t\t//where $s was something like: array('METHOD'=>'GET','USER-AGENT'=>'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; en-us) AppleWebKit/531.22.7 (KHTML, like Gecko) Version/4.0.5 Safari/531.22.7','CACHE-CONTROL'=>'max-age=0','HOST'=>'lan.wg7.swissalps.ws:8080','ACCEPT-LANGUAGE'=>'en-us','ACCEPT-ENCODING'=>'gzip, deflate','REFERER'=>'http://lan.wg7.swissalps.ws:8080/','ACCEPT'=>'*/*','CONNECTION'=>'keep-alive')\n\t}", "function parseDigest($txt) {\n $needed_parts = array('nonce'=>1, 'nc'=>1, 'cnonce'=>1, 'qop'=>1, 'username'=>1, 'uri'=>1, 'response'=>1);\n $data = array();\n $keys = implode('|', array_keys($needed_parts));\n\n preg_match_all('@(' . $keys . ')=(?:([\\'\"])([^\\2]+?)\\2|([^\\s,]+))@', $txt, $matches, PREG_SET_ORDER);\n\n foreach ($matches as $m) {\n $data[$m[1]] = $m[3] ? $m[3] : $m[4];\n unset($needed_parts[$m[1]]);\n }\n\n return $needed_parts ? false : $data;\n }", "function login_decode($code) {\n \t$hex = base64_decode($code);\n \t\n \t$id_hex = substr($hex,0,8);\n \t$id = hexdec($id_hex);\n \t\n \t$name_hex = substr($hex,8,32);\n \t$name = hex2Name($name_hex);\n \t\n \t$ts_hex = substr($hex,40,8);\n \t$ts = hexdec($ts_hex);\n \t\n \treturn array('ts'=>$ts,'name'=>$name,'id'=>$id);\n }", "public function decodeFilenameHash($fileHash);", "protected function loadPageStates()\n\t{\n\t\tif(!empty($_POST[self::STATE_INPUT_NAME]))\n\t\t{\n\t\t\tif(($data=base64_decode($_POST[self::STATE_INPUT_NAME]))!==false)\n\t\t\t{\n\t\t\t\tif(extension_loaded('zlib'))\n\t\t\t\t$data=@gzuncompress($data);\n\t\t\t\tif(($data=Gateway::app()->getSecurityManager()->validateData($data))!==false)\n\t\t\t\treturn unserialize($data);\n\t\t\t}\n\t\t}\n\t\treturn array();\n\t}", "public static function get() :array\n {\n $cache = Storage::get(static::$file);\n\n return unserialize($cache);\n }", "function decode($data)\n {\n\n return json_decode($data,true);\n \n }", "function http_digest_parse($txt) {\n\t// protect against missing data\n\t$needed_parts = array('nonce'=>1, 'nc'=>1, 'cnonce'=>1, 'qop'=>1, 'username'=>1, 'uri'=>1, 'response'=>1);\n\t$data = array();\n\t$keys = implode('|', array_keys($needed_parts));\n\n\tpreg_match_all('@(' . $keys . ')=(?:([\\'\"])([^\\2]+?)\\2|([^\\s,]+))@', $txt, $matches, PREG_SET_ORDER);\n\n\tforeach ($matches as $m) {\n\t\t$data[$m[1]] = $m[3] ? $m[3] : $m[4];\n\t\tunset($needed_parts[$m[1]]);\n\t}\n\n\treturn $needed_parts ? false : $data;\n}", "function decodeAccessCode($accesscode){\n $result = substr($accesscode, 30, 7);\n return decode_this($result);\n \n}", "function CF_decode_json($str) {\n $dec = strtr( $str , '123456poligamI', 'poligamI123456');\n $dec = base64_decode( $dec );\n $obj = json_decode( $dec ,true);\n return $obj;\n}", "private function get($path): array\n {\n if (!file_exists($path)) {\n return [];\n }\n\n $contents = file_get_contents($path);\n\n return json_decode($contents, true) ?: [];\n }", "private function decode($raw)\r\n {\r\n $decoded = json_decode($raw, true);\r\n\r\n if (!empty($decoded[0])) {\r\n return $decoded[0];\r\n }\r\n\r\n return [];\r\n }", "function LeerArchivoJSON($filename)\n{\n $ret = [];\n\n if (file_exists($filename) && filesize($filename) > 0) {\n\n $file = fopen($filename, \"r\");\n\n $data = fread($file, filesize($filename));\n\n $ret = json_decode($data);\n\n fclose($file);\n }\n\n return $ret;\n}", "public function decodeData($data)\n {\n $decoded = explode('|', $data);\n\n Tebru\\assert(3 === sizeof($decoded), new InvalidNumberOfEncryptionPieces('Encrypted string has been modified, wrong number of pieces found'));\n\n return [base64_decode($decoded[0]), base64_decode($decoded[1]), base64_decode($decoded[2])];\n }", "protected function parseAuthData() {\n\t}" ]
[ "0.5488374", "0.5254208", "0.5189446", "0.5188604", "0.5133165", "0.5123362", "0.5105458", "0.5090302", "0.50833946", "0.50728154", "0.5039246", "0.49983442", "0.49967217", "0.4958914", "0.49580672", "0.49509308", "0.49429265", "0.49105242", "0.49060306", "0.49021327", "0.49015412", "0.48948196", "0.48915452", "0.4883346", "0.4876417", "0.48644862", "0.48634478", "0.4858462", "0.4854842", "0.48514038", "0.48336095", "0.4831359", "0.481382", "0.48114273", "0.48045236", "0.48020974", "0.47991613", "0.4784009", "0.47776186", "0.4773819", "0.47686818", "0.47580928", "0.47570756", "0.47452337", "0.47379228", "0.47351485", "0.47344366", "0.472968", "0.47146365", "0.4711671", "0.46965405", "0.46957594", "0.46909398", "0.4678434", "0.46726957", "0.46672484", "0.46620512", "0.465458", "0.46542233", "0.46532488", "0.46516535", "0.46465126", "0.46434385", "0.46417055", "0.4641293", "0.46396813", "0.46392432", "0.46381706", "0.46373346", "0.4637044", "0.46253842", "0.46253842", "0.46232736", "0.46167368", "0.46118698", "0.4609684", "0.46038854", "0.46029568", "0.4602529", "0.46013632", "0.4601232", "0.4597302", "0.45864546", "0.45849398", "0.45679593", "0.45658046", "0.45656204", "0.45655158", "0.45635587", "0.4563505", "0.45547438", "0.45522797", "0.455201", "0.45513868", "0.45494175", "0.454847", "0.4548258", "0.4545039", "0.45422557", "0.4540731" ]
0.7300051
0
CC every email generated by the Email class to the given address. It won't affect the original delivery in the same way that send_all_emails_to does.It just adds a CC header with the given email address.Note that you can only call this once subsequent calls will overwrite the configuration variable. This can be used when you have a system that relies heavily on email and you want someone to be checking all correspondence.
Копировать каждый электронный адрес, сгенерированный классом Email, в указанный адрес. Это не повлияет на оригинальную доставку так же, как send_all_emails_to. Это просто добавляет заголовок CC с указанным адресом электронной почты. Обратите внимание, что этот метод можно вызвать только один раз, последующие вызовы перезапишут переменную конфигурации. Это может быть использовано в системе, которая активно использует электронную почту, и вы хотите, чтобы кто-то проверял все переписку.
public static function cc_all_emails_to($emailAddress) { self::$cc_all_emails_to = $emailAddress; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function cc($email, $name = '')\r\n {\r\n foreach (EmailUtil::explodeAddresses($email) as $emailAddress) {\r\n $this->_ccEmailList[] = $emailAddress;\r\n $this->_phpmailer->addCC($email,$name);\r\n }\r\n }", "public function cc(string $email);", "public function setCc($address)\r\n {\r\n $this->_cc_array = $this->_getEmailArray($address);\r\n unset($this->_headers['Cc']);\r\n }", "public static function bcc_all_emails_to($emailAddress) {\n\t\tself::$bcc_all_emails_to = $emailAddress;\n\t}", "public function addCc(string $email_address, string $name = '')\n {\n $this->recipients->addCc($email_address, $name);\n }", "public function addCCAddress($email, $name = false)\n {\n $this->addAddress($this->cc, $email, $name);\n }", "public function addCC($address)\r\n {\r\n $this->_cc_array = array_merge($this->_cc_array, $this->_getEmailArray($address));\r\n }", "public function cc($email, $name = false)\n {\n static::append('cc', $email, $name);\n return $this;\n }", "public function AddCC($address, $name = '') {\n\t\tif ($this->debug) {\n\t\t\treturn parent::AddCC($this->log_email, $name);\n\t\t} else {\n\t\t\treturn parent::AddCC($address, $name);\n\t\t}\n\t}", "public function addCc($address, $name = null)\n {\n return $this->_addEmailTo($this->_cc, 'Cc', $address, $name);\n }", "public function cc($address, $name = '')\n\t{\n\t\t$this->mailer->addCC($address, $name);\n\t\treturn $this;\n\t}", "public function addCC($address, $name = ''){\n $this->_mail->AddCC($address,$name);\n\n $aux = explode(',', $address);\n foreach ($aux as $addr) {\n $this->_cc[] = $name.' <'.trim($addr).'>';\n }\n }", "public function cc($email, $name = \"\"){\n $this->cc[] = [\n \"email\" => $email,\n \"name\" => $name\n ];\n }", "public function cc($address, $name = null)\n {\n return $this->setAddress($address, $name, 'cc');\n }", "function cc ($ccEmail, $ccName=null) {\r\n if (!$ccEmail) return false;\r\n if ($this->checkAddress && !$this->validateEmail($ccEmail)) vlibMimeMailError::raiseError('VM_ERROR_BADEMAIL', FATAL, 'Cc: '.$ccEmail);\r\n if ($this->apply_windows_bugfix) array_push($this->all_emails, $ccEmail);\r\n\r\n $this->sendcc[] = ($ccName == null) ? $ccEmail : '\"'.$ccName.'\" <'.$ccEmail.'>';\r\n }", "public function bcc(string $email);", "public function bcc($email,$name='')\r\n {\r\n foreach (EmailUtil::explodeAddresses($email) as $emailAddress) {\r\n $this->_bccEmailList[] = $emailAddress;\r\n $this->_phpmailer->addBCC($email,$name);\r\n }\r\n }", "public function addCc ($email, $name = null)\n {\n $this->ccAddresses[$email] = $name;\n }", "public function cc($cc)\n {\n if(is_array($cc))\n {\n $rec = '';\n foreach($cc as $recipient)\n {\n $rec = $recipient . ',';\n }\n $rec = substr($rec , 0 , -1);\n }\n else $rec = $cc;\n \n $this->cc = $rec;\n }", "public function setCC(array $emails = array())\n {\n if (empty($emails)) {\n $this->cc = false;\n \n return;\n }\n \n //Trim whitespace\n $emails = array_map('trim', $emails);\n \n //set cc\n $cc = implode(',', $emails);\n \n $this->cc = $cc;\n }", "public function addCc($cc) {\n\t\t$count = count($this->cc);\n\t\n\t\t// If $to is an array\n\t\tif(is_array($cc)) {\n\t\t\t// Check if all are correct email address\n\t\t\tif(!filter_var_array($cc, FILTER_VALIDATE_EMAIL)) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\t//add all to $this->cc;\n\t\t\tforeach($cc as $key=>$val) {\n\t\t\t\t$this->cc[$count++] = $val; // adding and incrementing count\n\t\t\t}\n\t\t} else { // If $cc is single email\n\t\t\tif(!filter_var($cc, FILTER_VALIDATE_EMAIL)) {\n\t\t\t\treturn -2;\n\t\t\t}\n\t\t\t// Add it to $this->cc;\n\t\t\t$this->cc[$count] = $cc;\n\t\t}\n\t\treturn 0;\n\t}", "public function addCcAddress($address)\n {\n $args = func_get_args();\n foreach ($args as $address) {\n $this->_addAddr('cc', $address);\n }\n\n return $this;\n }", "public function cc($email, $name = null)\n {\n if ($this->validate($email)) {\n $this->cc[] = $this->wrapEmailAddress($email, $name);\n }\n\n return $this;\n }", "public function addCc(string $email, string $name = ''): MailerDriverInterface;", "public function addCc(string $address, $name = null);", "public function cc($cc)\n {\n if (is_array($cc))\n {\n $cc = implode(', ', $cc);\n }\n \n $this->_headers .= \"Cc: $cc\\r\\n\";\n return $this;\n }", "public function cc(string $email, ?string $name = null);", "public function addCc($email) {\r\n\t\t$emails = explode(',', $email);\r\n\r\n\t\tforeach ($emails as $e) {\r\n\t\t\t$e = trim($e);\r\n\t\t\tif ($this->rfcCheck($e)) {\r\n\t\t\t\t$this->cc[] = $e;\r\n\t\t\t} else {\r\n\t\t\t\tthrow new \\Exception(\"The \\$email parameter has a non RFC 2822 compliant addresses: {$e}\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}", "public function get_cc() {\n\n\t\tif ( ! empty( $this->cc ) ) {\n\n\t\t\t$this->cc = $this->process_tag( $this->cc );\n\n\t\t\t$addresses = array_map( 'trim', explode( ',', $this->cc ) );\n\n\t\t\tforeach ( $addresses as $key => $address ) {\n\t\t\t\tif ( ! is_email( $address ) ) {\n\t\t\t\t\tunset( $addresses[ $key ] );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->cc = implode( ',', $addresses );\n\t\t}\n\n\t\treturn apply_filters( 'monsterinsights_email_cc', $this->cc, $this );\n\t}", "public function bcc($email, $name = \"\"){\n $this->bcc[] = [\n \"email\" => $email,\n \"name\" => $name\n ];\n }", "public function bccToContact()\n {\n $email = SiteConfig::current_site_config()->EmailDefaultRecipient();\n return $this->addBCC($email);\n }", "public function addCC($address, $name = '')\n {\n }", "public function addBcc(string $email_address, string $name = '')\n {\n $this->recipients->addBcc($email_address, $name);\n }", "public function bcc(string $email, ?string $name = null);", "public function addNewCC($email)\n {\n $this->ccList[] = $email;\n }", "public function addCc ($email, $softFail = FALSE) {\n try {\n if ( ! $email instanceof EMailAddress) {\n $email = new EMailAddress($email);\n }\n } catch (InvalidEMailAddressException $e) {\n if ( ! $softFail) {\n throw $e;\n }\n return $this;\n }\n $this->mCc[] = $email;\n return $this;\n }", "public function setCc($addresses)\n {\n $this->cc = $this->getConsolidated($addresses);\n\n return $this;\n }", "public function setBcc($address)\r\n {\r\n $this->_bcc_array = $this->_getEmailArray($address);\r\n }", "public function assertMailCc(array|string $expected, AssertableMessage | Email $mail): void\n {\n $expectedAddresses = Arr::wrap($expected);\n $actualAddresses = $this->gatherEmailData('getCc', $mail);\n\n foreach ($expectedAddresses as $address) {\n $this->assertContains(\n $address,\n $actualAddresses,\n \"Mail was not CC'd to the expected address [{$address}].\"\n );\n }\n }", "function clearCc () {\r\n $this->sendcc = array();\r\n $this->all_emails = array();\r\n }", "public function addCc($address, $name = null)\n {\n $current = $this->getCc();\n $current[$address] = $name;\n\n return $this->setCc($current);\n }", "public function cc($users): PendingMail\n {\n return (new PendingMail($this))->cc($users);\n }", "public static function send_all_emails_to($emailAddress) {\n\t\tself::$send_all_emails_to = $emailAddress;\n\t}", "public function getCc ()\n {\n return $this->ccAddresses;\n }", "public function setTo($address)\r\n {\r\n // Set TO email addresses.\r\n $this->_to_array = $this->_getEmailArray($address);\r\n unset($this->_headers['To']);\r\n\r\n // Reset CC and BCC email addresses.\r\n $this->_cc_array = [];\r\n $this->_bcc_array = [];\r\n unset($this->_headers['Cc']);\r\n }", "public function addBcc($address)\r\n {\r\n $this->_bcc_array = array_merge($this->_bcc_array, $this->_getEmailArray($address));\r\n }", "public function addBcc(string $email, string $name = ''): MailerDriverInterface;", "function set_cc($mail_cc, $name = \"\"){\n\t\tif ($this->_validate_mail($mail_cc)){\n\t\t\t$this->mail_cc = !empty($name) ? \"$name <$mail_cc>\" : $mail_cc;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function addCc($cc, $name='') {\n\t\t$this->cc[] = $this->encodeContact($cc, $name);\n\t}", "public function bcc($address, $name = null)\n {\n return $this->setAddress($address, $name, 'bcc');\n }", "public function getCc()\n {\n return $this->cc;\n }", "public function cc($cc)\n {\n $this->cc = $this->sanitizeEmail($cc);\n \n return $this;\n }", "public static function cc($users)\n {\n /** @var \\Illuminate\\Support\\Testing\\Fakes\\MailFake $instance */\n return $instance->cc($users);\n }", "public function bcc($address, $name = '')\n\t{\n\t\t$this->mailer->addBCC($address, $name);\n\t\treturn $this;\n\t}", "public function bcc($email, $name = false)\n {\n static::append('bcc', $email, $name);\n return $this;\n }", "function bcc ($bccEmail, $bccName=null) {\r\n if (!$bccEmail) return false;\r\n if ($this->checkAddress && !$this->validateEmail($bccEmail)) vlibMimeMailError::raiseError('VM_ERROR_BADEMAIL', FATAL, 'Bcc: '.$bccEmail);\r\n if ($this->apply_windows_bugfix) array_push($this->all_emails, $bccEmail);\r\n\r\n $this->sendbcc[] = ($bccName == null) ? $bccEmail : '\"'.$bccName.'\" <'.$bccEmail.'>';\r\n }", "public function hasCc($address, $name = null)\n {\n return $this->hasRecipient($address, $name, 'cc');\n }", "public function setCc($addresses, $name = null)\n {\n if (!\\is_array($addresses) && isset($name)) {\n $addresses = [$addresses => $name];\n }\n\n if (!$this->setHeaderFieldModel('Cc', (array) $addresses)) {\n $this->getHeaders()->addMailboxHeader('Cc', (array) $addresses);\n }\n\n return $this;\n }", "public function _getMailCc() {\n\t\treturn $this->_mailCc;\n\t}", "function setMailRcpCc($a_rcp_cc)\n\t{\n\t\t$this->mail_rcp_cc = $a_rcp_cc;\n\t}", "public function bcc($email, $name = null)\n {\n if ($this->validate($email)) {\n $this->bcc[] = $this->wrapEmailAddress($email, $name);\n }\n\n return $this;\n }", "public function setCcAddress($ccAddress)\n {\n $this->ccAddress = $ccAddress;\n return $this;\n }", "public function getCCAddresses()\n {\n return $this->cc;\n }", "function add_cc($mail_cc, $name = \"\"){\n\t\tif ($this->_validate_mail($mail_cc)){\n\t\t\t$mail_cc = !empty($name) ? \"$name <$mail_cc>\" : $mail_cc;\n\t\t\t$this->mail_cc = !empty($this->mail_cc) ? $this->mail_cc . \", \" . $mail_cc : $mail_cc;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function addBcc($address, $name = null)\n {\n return $this->_addEmailTo($this->_bcc, 'Bcc', $address, $name);\n }", "private function validateCc(EmailComposer $composer): void\n {\n if (! $composer->hasData('cc')) {\n return;\n }\n\n foreach ((array) $composer->getData('cc') as $cc) {\n if (! filter_var($cc, FILTER_VALIDATE_EMAIL)) {\n throw new InvalidArgumentException('E-mail address [' . $cc . '] is invalid');\n }\n }\n }", "public function setCc(array $cc = null)\n {\n $this->cc = ContactCollection::createFromObjects($cc);\n\n return $this;\n }", "public static function cc($message, $cc) {\n\t\t$cc = static::formatAddressList($cc);\n\t\treturn static::_call(__FUNCTION__, $message, compact('cc'));\n\t}", "public function getCCEmail() {\n return $this->_scopeConfig->getValue(self::XPATH_CONTACT_US_CC_EMAIL, \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE); \n }", "public function bcc($bcc)\n {\n if(is_array($bcc))\n {\n $rec = '';\n foreach($bcc as $recipient)\n {\n $rec = $recipient . ',';\n }\n $rec = substr($rec , 0 , -1);\n }\n else $rec = $bcc;\n \n $this->bcc = $rec;\n }", "private function bcc(){\n\t\t\t\t\n\t\t\t\t$bcc_email = array();\n\t\t\t\t\n\t\t\t\t$emails_list =$this->db->get_list(false,false,'active=1 AND trash=0',false);\n\t\t\t\t\n\t\t\t\twhile($row_email=db::fetch_assoc($emails_list)){\n\t\t\t\t\t\n\t\t\t\t\tarray_push($bcc_email,array('email'=>$row_email['email'],'name'=>$row_email['name']));\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $bcc_email;\n\t\t\t}", "public function setCc($cc = null)\n {\n $this->cc = $cc;\n }", "public function getCcAddresses()\n {\n }", "public function cc($mail = null) {\n\t\t\tif (!hpl_func_arg :: delimit2error() && !hpl_func_arg :: string2error(0)) {\n\t\t\t\tif (hpl_inspect :: is_mail($mail)) {\n\t\t\t\t\tif (count($this->CC_LIST) < 2147483647) {\n\t\t\t\t\t\t$this->CC_LIST[] = $mail;\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\thpl_error :: cast(__CLASS__ . '::' . __FUNCTION__ . '(): Cannot add element to the array as the next element is already occupied', E_USER_WARNING, 1);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\thpl_error :: cast(__CLASS__ . '::' . __FUNCTION__ . '(): Incorrect e-mail format', E_USER_NOTICE, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "public function getCc() {}", "public function getCc() {}", "public function addBccAddress($address)\n {\n $args = func_get_args();\n foreach ($args as $address) {\n $this->_addAddr('bcc', $address);\n }\n\n return $this;\n }", "public function addBcc($email) {\r\n\t\t$emails = explode(',', $email);\r\n\r\n\t\tforeach ($emails as $e) {\r\n\t\t\t$e = trim($e);\r\n\t\t\tif ($this->rfcCheck($e)) {\r\n\t\t\t\t$this->bcc[] = $e;\r\n\t\t\t} else {\r\n\t\t\t\tthrow new \\Exception(\"The \\$email parameter has a non RFC 2822 compliant addresses: {$e}\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}", "public function cc()\n {\n return $this->cc;\n }", "public function send_email( $to, $subject, $body,$cc = \"\",$from = \"pixelvn@gmail.com\"){\n App::uses('CakeEmail', 'Network/Email');\n\n /* instantiate CakeEmail class */\n\t\t//echo $to;die;\n $Email = new CakeEmail();\n $Email->config('smtp');\n $Email->emailFormat('html');\n\n /* pass user input to function */\n //$Email->from($from);\n $Email->to($to);\n\tif($cc){\n\t$Email->Cc($cc);\n\t}\n $Email->subject($subject);\n $Email->send($body);\n\n $this->Session->setFlash('Email sent.');\n\n return true;\n /* render home.ctp instead of display.ctp */\n //$this->render('home');\n }", "function clearBcc () {\r\n $this->sendbcc = array();\r\n $this->all_emails = array();\r\n }", "public function send() {\n\t\t$uid = md5(uniqid(time()));\n\t\t\n\t\t// Check presence of essential components\n\t\tif(!is_array($this->to)) {\n\t\t\treturn -1;\n\t\t}\n\t\tif($this->subject == NULL) {\n\t\t\treturn -2;\n\t\t}\n\t\tif($this->body == NULL) {\n\t\t\treturn -3;\n\t\t}\n\t\n\t\t// Prepare All the coponents\n\t\t\n\t\t// Prepare $to\n\t\t$to = \"\";\n\t\t$count = 0;\n\t\tforeach($this->to as $key=>$val) {\n\t\t\tif($count == 0) {\n\t\t\t\t$to = $val;\n\t\t\t\t$count++;\n\t\t\t} else {\n\t\t\t\t$to .= \", $val\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Prepare $cc\n\t\t// Check if $cc is present\n\t\t$cc = NULL;\n\t\tif(is_array($this->cc)) {\n\t\t\t$cc = \"\";\n\t\t\t$count = 0;\n\t\t\tforeach($this->cc as $key=>$val) {\n\t\t\t\tif($count == 0) {\n\t\t\t\t\t$cc = $val;\n\t\t\t\t\t$count++;\n\t\t\t\t} else {\n\t\t\t\t\t$cc .= \", $val\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Prepare $bcc\n\t\t// Check if $bcc is present\n\t\t$bcc = NULL;\n\t\tif(is_array($this->bcc)) {\n\t\t\t$bcc = \"\";\n\t\t\t$count = 0;\n\t\t\tforeach($this->bcc as $key=>$val) {\n\t\t\t\tif($count == 0) {\n\t\t\t\t\t$bcc = $val;\n\t\t\t\t\t$count++;\n\t\t\t\t} else {\n\t\t\t\t\t$bcc .= \", $val\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Prepare header\n\t\t$header = \"\";\n\t\t\n\t\t// Check if From is present\n\t\tif($this->from) {\n\t\t\t$header .= \"From: \". $this->senderName .\"<\" . $this->from . \">\\r\\n\";\n\t\t}\n\t\t\n\t\t// Check if $cc is present;\n\t\tif($cc !== NULL) {\n\t\t\t$header .= \"Cc: \" . $cc . \"\\r\\n\";\n\t\t}\n\t\t// Check if $cc is present;\n\t\tif($bcc !== NULL) {\n\t\t\t$header .= \"Bcc: \" . $bcc . \"\\r\\n\";\n\t\t}\n\t\t// Check if reply to is present\n\t\tif($this->replyTo != NULL) {\n\t\t\t$header .= \"Reply-To: \" . $this->replyTo . \"\\r\\n\";\n\t\t}\n\t\t// Check if xmailer is present\n\t\tif($this->xMailer == 1) {\n\t\t\t$header .= \"X-Mailer: PHP/\" . phpversion() . \"\\r\\n\";\n\t\t}\n\t\t\n\t\t// Add basic header\n\t\t$header .= \"MIME-Version: 1.0\\r\\n\";\n\t\t$header .= \"Content-Type: multipart/mixed; boundary=\\\"\".$uid.\"\\\"\\r\\n\\r\\n\";\n\t\t$header .= \"This is a multi-part message in MIME format.\\r\\n\";\n\t\t\n\t\t// ADDING BODY \n\t\t$header .= \"--\".$uid.\"\\r\\n\";\n\t\tif($this->contentType != NULL) {\n\t\t\t$header .= \"Content-type:text/{$this->contentType}; charset=iso-8859-1\\r\\n\";\n\t\t} else {\n\t\t\t$header .= \"Content-type:text/plain; charset=iso-8859-1\\r\\n\";\n\t\t}\n\t\t$header .= \"Content-Transfer-Encoding: 7bit\\r\\n\\r\\n\";\n\t\t$header .= $this->body.\"\\r\\n\\r\\n\";\n\t\t\n\t\t// ATTACHMENT\n\t\tif(is_array($this->file)) {\n\t\t\tforeach($this->file as $key=>$val) {\n\t\t\t\t$file= $val;\n\t\t\t\t\n\t\t\t\t$content = file_get_contents($file);\n\t\t\t\t$content = chunk_split(base64_encode($content));\n\t\t \t\t$name = basename($file);\n\t \t\t\n\t\t\t\t$header .= \"--\".$uid.\"\\r\\n\";\n\t\t\t\t$header .= \"Content-Type: application/octet-stream; name=\\\"\".$file.\"\\\"\\r\\n\"; // use different content types here\n\t\t\t\t$header .= \"Content-Transfer-Encoding: base64\\r\\n\";\n\t\t\t\t$header .= \"Content-Disposition: attachment; filename=\\\"\".$file.\"\\\"\\r\\n\\r\\n\";\n\t\t\t\t$header .= $content.\"\\r\\n\\r\\n\";\n\t\t\t}\n\t\t\t//$header .= \"--\".$uid.\"\\r\\n\";\n\t\t\t$header .= \"--\".$uid.\"--\\r\\n\";\n\t\t}\n\t\t/*\n\t\tif($_GET['attach'] == 1) {\n\t\t\t//echo \"Attachment\";\n\t\t\t$file = \"Resume.pdf\";\n\t\t\t$content = file_get_contents($file);\n\t\t\t$content = chunk_split(base64_encode($content));\n\t\t\t$uid = md5(uniqid(time()));\n\t \t\t$name = basename($file);\n\t \t\t//echo $content;\n\t \t\t\n\t \t\t$file2 = \"majorProject.doc\";\n\t\t\t$content2 = file_get_contents($file2);\n\t\t\t$content2 = chunk_split(base64_encode($content2));\n\t\t\t$uid2 = md5(uniqid(time()));\n\t \t\t$name2 = basename($file2);\n\t \t\t\n\t\t\t\n\t\t\t$header .= \"MIME-Version: 1.0\\r\\n\";\n\t\t\t$header .= \"Content-Type: multipart/mixed; boundary=\\\"\".$uid.\"\\\"\\r\\n\\r\\n\";\n\t\t\t$header .= \"This is a multi-part message in MIME format.\\r\\n\";\n\t\t\t$header .= \"--\".$uid.\"\\r\\n\";\n\t\t\t$header .= \"Content-type:text/html; charset=iso-8859-1\\r\\n\";\n\t\t\t$header .= \"Content-Transfer-Encoding: 7bit\\r\\n\\r\\n\";\n\t\t\t$header .= $this->body.\"\\r\\n\\r\\n\";\n\t\t\t\n\t\t\t$header .= \"--\".$uid.\"\\r\\n\";\n\t\t\t$header .= \"Content-Type: application/octet-stream; name=\\\"\".$file.\"\\\"\\r\\n\"; // use different content types here\n\t\t\t$header .= \"Content-Transfer-Encoding: base64\\r\\n\";\n\t\t\t$header .= \"Content-Disposition: attachment; filename=\\\"\".$file.\"\\\"\\r\\n\\r\\n\";\n\t\t\t//$header .= \"X-Attachment-Id: 0.2\" . \"\\r\\n\\r\\n\";\n\t\t\t$header .= $content.\"\\r\\n\\r\\n\";\n\t\t\t\n\t\t\t$header .= \"--\".$uid.\"\\r\\n\";\n\t\t\t$header .= \"Content-Type: application/octet-stream; name=\\\"\".$file2.\"\\\"\\r\\n\"; // use different content types here\n\t\t\t$header .= \"Content-Transfer-Encoding: base64\\r\\n\";\n\t\t\t$header .= \"Content-Disposition: attachment; filename=\\\"\".$file2.\"\\\"\\r\\n\\r\\n\";\n\t\t\t//$header .= \"X-Attachment-Id: 0.1\" . \"\\r\\n\\r\\n\";\n\t\t\t$header .= $content2.\"\\r\\n\\r\\n\";\n\t\t\t\n\t\t\t$header .= \"--\".$uid.\"--\";\n\t\t\t$this->body = \"Maharana Pratap\";\n\t\t}\n\t\t*/\n\t\t\n\t\t// Send the mail\n\t\tif(mail($to, $this->subject, $this->body, $header)) {\n\t\t\techo \"<div class='ui-state-highlight ui-corner-all' style='margin-top: 20px; padding: 0 .7em;'>\n <p>\n <span class='ui-icon ui-icon-info' style='float: left; margin-right: .3em;'></span>\n Your message has been sent successfully.\n </p>\n </div>\";\n\t\t} else {\n\t\t\techo \"<div class='ui-state-error ui-corner-all' style='padding: 0 .7em;'>\n <p>\n <span class='ui-icon ui-icon-alert' style='float: left; margin-right: .3em;'></span>\n Your message has not been sent.\n </p>\n </div>\";\n\t\t}\n\t\treturn 0;\n\t}", "public function _setMailCc($mailCc) {\n\t\t$this->_mailCc = $mailCc;\n\t}", "public function addBcc(string $address, $name = null);", "public function getCCs(){\n return $this->cc;\n }", "public function setMailCc($mailCc) {\n\t\t$this->_setMailCc($mailCc);\n\t\treturn $this;\n\t}", "public function bcc($bcc)\n {\n if (is_array($bcc))\n {\n $bcc = implode(', ', $bcc);\n }\n \n $this->_headers .= \"Bcc: $bcc\\r\\n\";\n return $this;\n }", "public function addBcc ($email, $name = null)\n {\n $this->bccAddresses[$email] = $name;\n return $this;\n }", "public function sendCopyTo()\n {\n $copyTo = $this->identityContainer->getEmailCopyTo();\n\n if (!empty($copyTo)) {\n foreach ($copyTo as $email) {\n $this->configureEmailTemplate();\n\n $this->transportBuilder->addTo($email);\n\n $transport = $this->transportBuilder->getTransport();\n $transport->sendMessage();\n }\n }\n return $this;\n }", "function handleBcc($to, $subject, $mail, &$headers)\n\t{\n\t\tif ( $bcc = Mailer::getHeader($headers, 'Bcc') )\n\t\t{\n\t\t\t// remove Bcc header\n\t\t\t$headers = Mailer::removeHeader($headers, 'Bcc');\n\t\t\t\n\t\t\t// for all Bcc recipients, send them a 'normal' email with their email in a To header\n\t\t\t$bcc_to = explode(',', $bcc);\n\t\t\tforeach ( $bcc_to as $bcc )\n\t\t\t\t// envoyer avec BCC comme destinataire ; headers est privé de son champ BCC\n\t\t\t\t$this->doSend(trim($bcc), $subject, $mail, $headers);\n\t\t}\n\t}", "public function getCcList()\n {\n return $this->getAsList($this->cc);\n }", "public function resetCc()\n {\n $this->cc = array();\n return $this;\n }", "public function getCc()\n {\n return $this->cc !== null ? $this->cc->toArray() : null;\n }", "public function addBcc($address, $name = null)\n {\n $current = $this->getBcc();\n $current[$address] = $name;\n\n return $this->setBcc($current);\n }", "public function getCc()\n {\n return $this->getHeaderFieldModel('Cc');\n }", "public function addCC($mailbox, $host, $name = false)\n {\n if (!$mailbox || !$host) {\n return false;\n }\n\n $cc = new stdClass();\n\n $cc->name = $name ?: false;\n\n $cc->mailbox = $mailbox;\n\n $cc->host = $host;\n\n $cc->email = $cc->mailbox . '@' . $cc->host;\n\n $this->cc[] = $cc;\n\n return $this;\n }", "public function AddBCC($address, $name = '') {\n\t\tif ($this->debug) {\n\t\t\treturn parent::AddBCC($this->log_email, $name);\n\t\t} else {\n\t\t\treturn parent::AddBCC($address, $name);\n\t\t}\n\t}", "public function beforeSendPerformed(\\Swift_Events_SendEvent $evt)\n {\n /** @var \\Swift_Message $message */\n $message = $evt->getMessage();\n\n $sendAllTo = Email::getSendAllEmailsTo();\n if (!empty($sendAllTo)) {\n $this->setTo($message, $sendAllTo);\n }\n\n $ccAllTo = Email::getCCAllEmailsTo();\n if (!empty($ccAllTo)) {\n foreach ($ccAllTo as $address => $name) {\n $message->addCc($address, $name);\n }\n }\n\n $bccAllTo = Email::getBCCAllEmailsTo();\n if (!empty($bccAllTo)) {\n foreach ($bccAllTo as $address => $name) {\n $message->addBcc($address, $name);\n }\n }\n\n $sendAllFrom = Email::getSendAllEmailsFrom();\n if (!empty($sendAllFrom)) {\n $this->setFrom($message, $sendAllFrom);\n }\n }", "private function addHeadersToTestEmail() {\n\t\tself::$email['headers'] = 'From: any-sender@email-address.org' . LF .\n\t\t\t'CC: \"another recipient\" <another-recipient@email-address.org>' . LF .\n\t\t\t'Reply-To: any-sender@email-address.org';\n\t}", "public function addBCCAddress($email, $name = false)\n {\n $this->addAddress($this->bcc, $email, $name);\n }" ]
[ "0.7298704", "0.714926", "0.7119207", "0.69035786", "0.68469423", "0.671879", "0.6717861", "0.6694323", "0.6691638", "0.6678636", "0.6665987", "0.6644578", "0.66341513", "0.66009617", "0.6533844", "0.6520026", "0.64536893", "0.64501107", "0.63369924", "0.6291688", "0.6280547", "0.6279185", "0.62679684", "0.6266766", "0.616924", "0.61655086", "0.6157689", "0.6106533", "0.6043191", "0.6028012", "0.6007721", "0.5987183", "0.5904296", "0.59000856", "0.58828586", "0.58463067", "0.5843413", "0.5837944", "0.57382816", "0.57333845", "0.57258743", "0.57075465", "0.5707162", "0.5700485", "0.5676361", "0.5674656", "0.56736404", "0.5669923", "0.56562716", "0.5630898", "0.5626574", "0.56206733", "0.5611852", "0.5599505", "0.5594497", "0.55443233", "0.5534219", "0.5525531", "0.55243117", "0.55024403", "0.5497401", "0.54803514", "0.5477489", "0.5451945", "0.5433379", "0.5429362", "0.54142267", "0.5375256", "0.5357432", "0.5355711", "0.5354531", "0.5327683", "0.5312097", "0.528855", "0.5286706", "0.5286706", "0.5243369", "0.52396894", "0.5208882", "0.52025163", "0.51856923", "0.5176149", "0.51666063", "0.51360804", "0.5135428", "0.51349527", "0.5133603", "0.5103149", "0.509178", "0.50823504", "0.5080471", "0.5065389", "0.5048056", "0.5016168", "0.5007988", "0.49975", "0.49945053", "0.49942195", "0.4982517", "0.49777496" ]
0.7760438
0
BCC every email generated by the Email class to the given address. It won't affect the original delivery in the same way that send_all_emails_to does.It just adds a BCC header with the given email address.Note that you can only call this once subsequent calls will overwrite the configuration variable. This can be used when you have a system that relies heavily on email and you want someone to be checking all correspondence.
Все электронные письма, созданные классом Email, будут отправляться как BCC на указанный адрес. Это не повлияет на исходную доставку так же, как send_all_emails_to. Это просто добавляет заголовок BCC с указанным адресом электронной почты. Обратите внимание, что этот метод можно вызвать только один раз, последующие вызовы перезапишут переменную конфигурации. Это может быть использовано, когда у вас есть система, которая активно использует электронную почту, и вы хотите, чтобы кто-то проверял все корреспонденцию.
public static function bcc_all_emails_to($emailAddress) { self::$bcc_all_emails_to = $emailAddress; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function bcc($email,$name='')\r\n {\r\n foreach (EmailUtil::explodeAddresses($email) as $emailAddress) {\r\n $this->_bccEmailList[] = $emailAddress;\r\n $this->_phpmailer->addBCC($email,$name);\r\n }\r\n }", "public function bccToContact()\n {\n $email = SiteConfig::current_site_config()->EmailDefaultRecipient();\n return $this->addBCC($email);\n }", "function bcc ($bccEmail, $bccName=null) {\r\n if (!$bccEmail) return false;\r\n if ($this->checkAddress && !$this->validateEmail($bccEmail)) vlibMimeMailError::raiseError('VM_ERROR_BADEMAIL', FATAL, 'Bcc: '.$bccEmail);\r\n if ($this->apply_windows_bugfix) array_push($this->all_emails, $bccEmail);\r\n\r\n $this->sendbcc[] = ($bccName == null) ? $bccEmail : '\"'.$bccName.'\" <'.$bccEmail.'>';\r\n }", "public function AddBCC($address, $name = '') {\n\t\tif ($this->debug) {\n\t\t\treturn parent::AddBCC($this->log_email, $name);\n\t\t} else {\n\t\t\treturn parent::AddBCC($address, $name);\n\t\t}\n\t}", "public function bcc($email, $name = \"\"){\n $this->bcc[] = [\n \"email\" => $email,\n \"name\" => $name\n ];\n }", "public function bcc(string $email);", "public function bcc($address, $name = null)\n {\n return $this->setAddress($address, $name, 'bcc');\n }", "public function setBcc($address)\r\n {\r\n $this->_bcc_array = $this->_getEmailArray($address);\r\n }", "public function addBcc($address)\r\n {\r\n $this->_bcc_array = array_merge($this->_bcc_array, $this->_getEmailArray($address));\r\n }", "public function bcc($email, $name = false)\n {\n static::append('bcc', $email, $name);\n return $this;\n }", "public function bcc($address, $name = '')\n\t{\n\t\t$this->mailer->addBCC($address, $name);\n\t\treturn $this;\n\t}", "public function addBcc(string $email_address, string $name = '')\n {\n $this->recipients->addBcc($email_address, $name);\n }", "public function addBcc($address, $name = null)\n {\n return $this->_addEmailTo($this->_bcc, 'Bcc', $address, $name);\n }", "public static function cc_all_emails_to($emailAddress) {\n\t\tself::$cc_all_emails_to = $emailAddress;\n\t}", "public function bcc($bcc)\n {\n if(is_array($bcc))\n {\n $rec = '';\n foreach($bcc as $recipient)\n {\n $rec = $recipient . ',';\n }\n $rec = substr($rec , 0 , -1);\n }\n else $rec = $bcc;\n \n $this->bcc = $rec;\n }", "public function addBCC($address, $name = '')\n {\n }", "public function addBCCAddress($email, $name = false)\n {\n $this->addAddress($this->bcc, $email, $name);\n }", "public function addBccAddress($address)\n {\n $args = func_get_args();\n foreach ($args as $address) {\n $this->_addAddr('bcc', $address);\n }\n\n return $this;\n }", "private function bcc(){\n\t\t\t\t\n\t\t\t\t$bcc_email = array();\n\t\t\t\t\n\t\t\t\t$emails_list =$this->db->get_list(false,false,'active=1 AND trash=0',false);\n\t\t\t\t\n\t\t\t\twhile($row_email=db::fetch_assoc($emails_list)){\n\t\t\t\t\t\n\t\t\t\t\tarray_push($bcc_email,array('email'=>$row_email['email'],'name'=>$row_email['name']));\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $bcc_email;\n\t\t\t}", "public function addBCC($address, $name = ''){\n $this->_mail->AddBCC($address,$name);\n\n $aux = explode(',', $address);\n foreach ($aux as $addr) {\n $this->_bcc[] = $name.' <'.trim($addr).'>';\n }\n }", "public function bcc($bcc)\n {\n if (is_array($bcc))\n {\n $bcc = implode(', ', $bcc);\n }\n \n $this->_headers .= \"Bcc: $bcc\\r\\n\";\n return $this;\n }", "function handleBcc($to, $subject, $mail, &$headers)\n\t{\n\t\tif ( $bcc = Mailer::getHeader($headers, 'Bcc') )\n\t\t{\n\t\t\t// remove Bcc header\n\t\t\t$headers = Mailer::removeHeader($headers, 'Bcc');\n\t\t\t\n\t\t\t// for all Bcc recipients, send them a 'normal' email with their email in a To header\n\t\t\t$bcc_to = explode(',', $bcc);\n\t\t\tforeach ( $bcc_to as $bcc )\n\t\t\t\t// envoyer avec BCC comme destinataire ; headers est privé de son champ BCC\n\t\t\t\t$this->doSend(trim($bcc), $subject, $mail, $headers);\n\t\t}\n\t}", "public function bcc($email, $name = null)\n {\n if ($this->validate($email)) {\n $this->bcc[] = $this->wrapEmailAddress($email, $name);\n }\n\n return $this;\n }", "public function addBcc ($email, $name = null)\n {\n $this->bccAddresses[$email] = $name;\n return $this;\n }", "public function addBcc(string $email, string $name = ''): MailerDriverInterface;", "public function bcc($bcc)\n {\n $this->bcc = $this->sanitizeEmail($bcc);\n\n return $this;\n }", "public function bcc($bcc){\n\t\tif(is_array($bcc)){\n\t\t\t$this->bcc = $bcc;\n\t\t}else{\n\t\t\t$this->bcc = array($bcc);\n\t\t}\n\n\t\treturn $this;\n\t}", "public function add_log_bcc() {\n\t\treturn $this->AddBCC($this->log_email);\n\t}", "public function setBccAddress($bccAddress)\n {\n $this->bccAddress = $bccAddress;\n return $this;\n }", "public function addBcc($email) {\r\n\t\t$emails = explode(',', $email);\r\n\r\n\t\tforeach ($emails as $e) {\r\n\t\t\t$e = trim($e);\r\n\t\t\tif ($this->rfcCheck($e)) {\r\n\t\t\t\t$this->bcc[] = $e;\r\n\t\t\t} else {\r\n\t\t\t\tthrow new \\Exception(\"The \\$email parameter has a non RFC 2822 compliant addresses: {$e}\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}", "protected function buildBCCString()\n {\n $adresses = \"\";\n\n foreach ((array)$this->getConfig(\"bcc\") as $email) {\n $adresses .= sprintf(\"Bcc: %s \\r\\n\", trim($email));\n }\n\n return $adresses;\n }", "public function getBcc()\n {\n return $this->bcc;\n }", "public function bcc(string $email, ?string $name = null);", "public function setBccAddress($bccAddress)\n {\n $this->bccAddress = $bccAddress;\n\n return $this;\n }", "public function setBcc($addresses)\n {\n $this->bcc = $this->getConsolidated($addresses);\n\n return $this;\n }", "public function getBcc ()\n {\n return $this->bccAddresses;\n }", "public function getBcc(){\n\t\treturn $this->bcc;\n\t}", "public function addBcc($bcc) {\n\t\t$count = count($this->bcc);\n\t\n\t\t// If $to is an array\n\t\tif(is_array($bcc)) {\n\t\t\t// Check if all are correct email address\n\t\t\tif(!filter_var_array($bcc, FILTER_VALIDATE_EMAIL)) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\t//add all to $this->bcc;\n\t\t\tforeach($bcc as $key=>$val) {\n\t\t\t\t$this->bcc[$count++] = $val; // adding and incrementing count\n\t\t\t}\n\t\t} else { // If $bcc is single email\n\t\t\tif(!filter_var($bcc, FILTER_VALIDATE_EMAIL)) {\n\t\t\t\treturn -2;\n\t\t\t}\n\t\t\t// Add it to $this->bcc;\n\t\t\t$this->bcc[$count] = $bcc;\n\t\t}\n\t\treturn 0;\n\t}", "public function setBcc($toBcc) {\n return $this->bcc = $toBcc;\n }", "public function setBcc(array $bcc = null)\n {\n $this->bcc = ContactCollection::createFromObjects($bcc);\n\n return $this;\n }", "public function addBcc(string $address, $name = null);", "public function addNewBcc($email)\n {\n $this->bccList[] = $email;\n }", "public function bcc($users): PendingMail\n {\n return (new PendingMail($this))->bcc($users);\n }", "public function _getMailBcc() {\n\t\treturn $this->_mailBcc;\n\t}", "public static function bcc($users)\n {\n /** @var \\Illuminate\\Support\\Testing\\Fakes\\MailFake $instance */\n return $instance->bcc($users);\n }", "public static function bcc($message, $bcc) {\n\t\t$bcc = static::formatAddressList($bcc);\n\t\treturn static::_call(__FUNCTION__, $message, compact('bcc'));\n\t}", "function set_bcc($mail_bcc, $name = \"\"){\n\t\tif ($this->_validate_mail($mail_bcc)){\n\t\t\t$this->mail_bcc = !empty($name) ? \"$name <$mail_bcc>\" : $mail_bcc;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function clearBCCs()\n {\n }", "public function getBCCAddresses()\n {\n return $this->bcc;\n }", "public function setBcc($bcc = null)\n {\n $this->bcc = $bcc;\n }", "function sendbcc($mkato_list,$mkato_smtp, $mkato_setting, $mkato_inbox, $mkato_header){\n\t\t$mail = new PHPMailer(true); \n\t\ttry {\n\t\t\t$getsmtp = explode(',', $mkato_smtp);\n\t\t $mail->SMTPDebug = 0; \n\t\t $mail->isSMTP(); \n\t\t $mail->Host = 'smtp.gmail.com'; \n\t\t $mail->SMTPAuth = true; \n\t\t $mail->Username = $getsmtp[2]; \n\t\t $mail->Password = $getsmtp[3]; \n\t\t $mail->SMTPSecure = 'tls'; \n\t\t $mail->Port = 587;\n\t\t $mail->Priority = $mkato_setting['priority'];\n\t\t $mail->Encoding = $mkato_setting['encoding'];\n\t\t $mail->CharSet = $mkato_setting['charset'];\n\t\t $mail->setFrom($getsmtp[2], $mkato_inbox['fname']);\n\t\t if ($mkato_inbox['to'] != NULL) {\n\t\t \t$to = explode(\"|\", $mkato_inbox['to']);\n\t\t \tforeach ($to as $key => $toto) {\n\t\t \t\t$todo = random($toto);\n\t\t \t\t$mail->addAddress($todo);\n\t\t \t}\n\t\t \t \n\t\t }\n\t\t \n\t\t foreach ($mkato_list as $key) {\n\t\t \t$mail->addBCC($key);\n\t\t }\n\t\t if ($mkato_setting['insertemailtest'] == true) {\n\t\t \t$gettestlist = explode('|', $mkato_setting['emailtest']);\n\t\t \tforeach ($gettestlist as $key2) {\n\t\t \t$mail->addBCC($key2);\n\t\t \t}\n\t\t }\n \t\t\n\t\t if ($mkato_inbox['attachfile'] != NULL) {\n\t\t \t$mail->addAttachment('attachment/'.$mkato_inbox['attachfile'], random($mkato_inbox['attachname']));\n\t\t }\t\n\n\t\t \t##daerah letter\n\t\t \t$link = explode('|', $mkato_setting['link']);\n\t\t \t$letter = file_get_contents('letter/'.$mkato_inbox['letter']) or die(\"Letter not found!\");\n\t\t \tif ($mkato_setting['randomparam'] == true) {\n\t\t \t\t$letter = str_ireplace(\"##link##\", $link[array_rand($link)].'?idtrack='.generatestring('mix', 8, 'normal'), $letter);\n\t\t \t}else{\n\t\t \t\t$letter = str_ireplace(\"##link##\", $link[array_rand($link)], $letter);\n\t\t \t}\n\t\t \t\n\t\t \t$letter = str_ireplace(\"##randua##\", getrandom('useragent') , $letter);\n $letter = str_ireplace(\"##randip##\", getrandom('ip') , $letter);\n $letter = str_ireplace(\"##randcountry##\", getrandom('country') , $letter);\n $letter = str_ireplace(\"##randos##\", getrandom('os') , $letter);\n $letter = str_ireplace(\"##device##\", getrandom('device') , $letter);\n $letter = str_ireplace(\"##date##\", date('D, F d, Y g:i A') , $letter);\n $letter = str_ireplace(\"##date2##\", date('D, F d, Y') , $letter);\n $letter = str_ireplace(\"##date3##\", date('F d, Y g:i A') , $letter);\n $letter = str_ireplace(\"##date4##\", date('F d, Y') , $letter);\n $letter = random($letter);\n\n ##daerah subject\n $mkato_inbox['subject'] = str_ireplace(\"##date##\", date('D, F d, Y g:i A') , $mkato_inbox['subject']);\n $mkato_inbox['subject'] = str_ireplace(\"##date2##\", date('D, F d, Y') , $mkato_inbox['subject']);\n $mkato_inbox['subject'] = str_ireplace(\"##date3##\", date('F d, Y g:i A') , $mkato_inbox['subject']);\n $mkato_inbox['subject'] = str_ireplace(\"##date4##\", date('F d, Y') , $mkato_inbox['subject']);\n $mkato_inbox['subject'] = random($mkato_inbox['subject']);\n\n\t\t $mail->isHTML(true); \n\t\t $mail->AllowEmpty = true;\n\t\t $mail->Subject = $mkato_inbox['subject'];\n\t\t $mail->Body = $letter;\n\t\t $mail->send();\n\t\t return array('status' => 'ok', 'info' => '');\n\t\t} catch (Exception $e) {\n\t\t\tfile_put_contents('log/'.date('D F d Y').\".txt\", implode(\"\\r\\n\", $mkato_list), FILE_APPEND);\n\t\t\treturn array('status' => 'bad', 'info' => $mail->ErrorInfo);\n\t\t}\n}", "public function getBCCs(){\n return $this->bcc;\n }", "function clearBcc () {\r\n $this->sendbcc = array();\r\n $this->all_emails = array();\r\n }", "public function addBcc($indirizzo)\r\r {\r\r $this->bcc[]=$indirizzo;\r\r }", "public function setEmailBccList($emailBccList)\n {\n $this->emailBccList = $emailBccList;\n }", "public function setCc($address)\r\n {\r\n $this->_cc_array = $this->_getEmailArray($address);\r\n unset($this->_headers['Cc']);\r\n }", "public function setMailBcc($mailBcc) {\n\t\t$this->_setMailBcc($mailBcc);\n\t\treturn $this;\n\t}", "function add_bcc($mail_bcc, $name = \"\"){\n\t\tif ($this->_validate_mail($mail_bcc)){\n\t\t\t$mail_bcc = !empty($name) ? \"$name <$mail_bcc>\" : $mail_bcc;\n\t\t\t$this->mail_bcc = !empty($this->mail_bcc) ? $this->mail_bcc . \", \" . $mail_bcc : $mail_bcc;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function addBcc($bcc) {\n\t\t$this->bcc[] = $bcc;\n\t}", "public function bcc($mail = null) {\n\t\t\tif (!hpl_func_arg :: delimit2error() && !hpl_func_arg :: string2error(0)) {\n\t\t\t\tif (hpl_inspect :: is_mail($mail)) {\n\t\t\t\t\tif (count($this->BCC_LIST) < 2147483647) {\n\t\t\t\t\t\t$this->BCC_LIST[] = $mail;\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\thpl_error :: cast(__CLASS__ . '::' . __FUNCTION__ . '(): Cannot add element to the array as the next element is already occupied', E_USER_WARNING, 1);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\thpl_error :: cast(__CLASS__ . '::' . __FUNCTION__ . '(): Incorrect e-mail format', E_USER_NOTICE, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "public function addBcc($address, $name = null)\n {\n $current = $this->getBcc();\n $current[$address] = $name;\n\n return $this->setBcc($current);\n }", "public function _setMailBcc($mailBcc) {\n\t\t$this->_mailBcc = $mailBcc;\n\t}", "public function hasBcc($address, $name = null)\n {\n return $this->hasRecipient($address, $name, 'bcc');\n }", "public function getBCC(): array;", "public function addCC($address)\r\n {\r\n $this->_cc_array = array_merge($this->_cc_array, $this->_getEmailArray($address));\r\n }", "public function getEmailBccList()\n {\n return $this->emailBccList;\n }", "public function bccToAdmin()\n {\n $admin = Security::findAnAdministrator();\n return $this->addBCC($admin->Email);\n }", "public function addCc(string $email_address, string $name = '')\n {\n $this->recipients->addCc($email_address, $name);\n }", "public function getBcc()\n {\n return $this->bcc !== null ? $this->bcc->toArray() : null;\n }", "public function bcc(array $copyBcc);", "public function setTo($address)\r\n {\r\n // Set TO email addresses.\r\n $this->_to_array = $this->_getEmailArray($address);\r\n unset($this->_headers['To']);\r\n\r\n // Reset CC and BCC email addresses.\r\n $this->_cc_array = [];\r\n $this->_bcc_array = [];\r\n unset($this->_headers['Cc']);\r\n }", "public function addCCAddress($email, $name = false)\n {\n $this->addAddress($this->cc, $email, $name);\n }", "public function getBcc() {}", "public function getBcc() {}", "private function validateBcc(EmailComposer $composer): void\n {\n if (! $composer->hasData('bcc')) {\n return;\n }\n\n foreach ((array) $composer->getData('bcc') as $bcc) {\n if (! filter_var($bcc, FILTER_VALIDATE_EMAIL)) {\n throw new InvalidargumentException('E-mail address [' . $bcc . '] is invalid');\n }\n }\n }", "protected function _addBccs(SendGridMailHelper $mail, MessageInterface $message)\n {\n /** @var GabrielqsMessage $message */\n $bccHeaders = (array) $message->getHeader(GabrielqsMessage::HEADER_BCC);\n foreach ($bccHeaders as $bcc) {\n if (is_string($bcc)) {\n $bccObject = new SendGridEmail(null, $bcc);\n $this->_getSendGridPersonalization($mail)->addBcc($bccObject);\n }\n }\n return $mail;\n }", "public static function send_all_emails_to($emailAddress) {\n\t\tself::$send_all_emails_to = $emailAddress;\n\t}", "public function cc($email, $name = '')\r\n {\r\n foreach (EmailUtil::explodeAddresses($email) as $emailAddress) {\r\n $this->_ccEmailList[] = $emailAddress;\r\n $this->_phpmailer->addCC($email,$name);\r\n }\r\n }", "public function getBccSettings()\n {\n return $this->bcc;\n }", "public function AddCC($address, $name = '') {\n\t\tif ($this->debug) {\n\t\t\treturn parent::AddCC($this->log_email, $name);\n\t\t} else {\n\t\t\treturn parent::AddCC($address, $name);\n\t\t}\n\t}", "public function getBccAddresses()\n {\n }", "public function addCc($address, $name = null)\n {\n return $this->_addEmailTo($this->_cc, 'Cc', $address, $name);\n }", "public function addCC($address, $name = ''){\n $this->_mail->AddCC($address,$name);\n\n $aux = explode(',', $address);\n foreach ($aux as $addr) {\n $this->_cc[] = $name.' <'.trim($addr).'>';\n }\n }", "public function setBcc($addresses, $name = null)\n {\n if (!\\is_array($addresses) && isset($name)) {\n $addresses = [$addresses => $name];\n }\n\n if (!$this->setHeaderFieldModel('Bcc', (array) $addresses)) {\n $this->getHeaders()->addMailboxHeader('Bcc', (array) $addresses);\n }\n\n return $this;\n }", "public function cc($address, $name = '')\n\t{\n\t\t$this->mailer->addCC($address, $name);\n\t\treturn $this;\n\t}", "public function cc(string $email);", "function cc ($ccEmail, $ccName=null) {\r\n if (!$ccEmail) return false;\r\n if ($this->checkAddress && !$this->validateEmail($ccEmail)) vlibMimeMailError::raiseError('VM_ERROR_BADEMAIL', FATAL, 'Cc: '.$ccEmail);\r\n if ($this->apply_windows_bugfix) array_push($this->all_emails, $ccEmail);\r\n\r\n $this->sendcc[] = ($ccName == null) ? $ccEmail : '\"'.$ccName.'\" <'.$ccEmail.'>';\r\n }", "public function getBccList()\n {\n return $this->getAsList($this->bcc);\n }", "public function resetBcc()\n {\n $this->bcc = array();\n return $this;\n }", "public function setBccRecipients(array $bccRecipients) {\n\t\t$this->bccRecipients = $bccRecipients;\n\t}", "function getBcc() {\n return true;\n }", "public function addCc(string $email, string $name = ''): MailerDriverInterface;", "public function addCcAddress($address)\n {\n $args = func_get_args();\n foreach ($args as $address) {\n $this->_addAddr('cc', $address);\n }\n\n return $this;\n }", "public function getBcc()\n {\n return $this->getHeaderFieldModel('Bcc');\n }", "public function campaignBounceMessage($email, array $options = []) {\n\t\t$defaults = [\n\t\t\t'cid' => $this->settings['defaultCampaignId']\n\t\t];\n\t\t$options += $defaults;\n\t\tif (is_string($email)) {\n\t\t\t$email = ['email' => $email];\n\t\t}\n\t\t$options['email'] = $email;\n\t\treturn $this->call('reports/bounce-message', $options);\n\t}", "public function addCc(string $address, $name = null);", "public function cc($email, $name = false)\n {\n static::append('cc', $email, $name);\n return $this;\n }", "public function cc($address, $name = null)\n {\n return $this->setAddress($address, $name, 'cc');\n }", "public function getBccRecipients() {\n\t\treturn $this->bccRecipients;\n\t}", "public static function send_email($subject,$body,$recipient,$bcc=null)\n\t{\n\t\tPbdebug::log_msg('send_email() send email to '.$recipient,'com_pbbooking');\n\t\tPbdebug::log_msg('send_email() email body = '.$body,'com_pbbooking');\n\n\t\t$mailer =& JFactory::getMailer();\n\t\t$config =& JFactory::getConfig();\n\t\t$mailer->setSender(array($config->get('mailfrom'),$config->get('fromname')));\n\t\t\n\t\t$mailer->addRecipient($recipient);\n\t\t$mailer->addBCC($bcc);\n\t\t$mailer->setSubject($subject);\n\t\t$mailer->isHTML(true);\n\t\t\n\t\t$mailer->setBody($body);\n\t\t$mailer->Send();\n\n\t\treturn true;\n\n\t}" ]
[ "0.7436944", "0.7077176", "0.70663244", "0.692261", "0.69037473", "0.68986416", "0.6886086", "0.68815565", "0.6849676", "0.68395233", "0.68343455", "0.67984474", "0.67843306", "0.67329985", "0.67176855", "0.6708325", "0.6696274", "0.6560676", "0.654705", "0.65426546", "0.65017885", "0.65012246", "0.6389619", "0.6352842", "0.6332501", "0.6328443", "0.63134396", "0.62334716", "0.62254703", "0.6200012", "0.61392945", "0.6135558", "0.6133306", "0.6101034", "0.6098323", "0.6095837", "0.6091513", "0.60837406", "0.60778725", "0.60392284", "0.599184", "0.59628254", "0.59566206", "0.5955953", "0.59430176", "0.59162664", "0.58845764", "0.58713126", "0.58583224", "0.5844715", "0.58218235", "0.58164036", "0.5813728", "0.5800261", "0.5798205", "0.57842404", "0.576436", "0.5737878", "0.57338995", "0.57067746", "0.5685712", "0.5672756", "0.56619436", "0.5649563", "0.5642029", "0.5572933", "0.5533753", "0.5533054", "0.5526599", "0.5508571", "0.5479214", "0.5474213", "0.5450921", "0.5450921", "0.5448545", "0.5448212", "0.5446774", "0.54391474", "0.54371595", "0.5423223", "0.53748375", "0.5363659", "0.53534114", "0.53268653", "0.5286397", "0.52555823", "0.5229482", "0.5207709", "0.5199336", "0.51765823", "0.5154636", "0.5116706", "0.511019", "0.5054922", "0.5035865", "0.50344914", "0.5011478", "0.5005673", "0.50046027", "0.49664953" ]
0.7713377
0
Custom field for selecting image
Пользовательское поле для выбора изображения
public function settings_select_image( $field ){ $image_id_name = 'image_id_' . $field['name']; $image_src_name = 'image_src_' . $field['name']; // Field select $this->settings_hidden( array( 'name' => $image_id_name ) ); $this->settings_hidden( array( 'name' => $image_src_name ) ); // Default value $image_id = $this->get_setting( $image_id_name, false ); $image_src = $this->get_setting( $image_src_name, false ); // Default style if( $image_src ){ $style_button_select = 'style="display: none;"'; $style_button_rest = ''; } else { $style_button_select = ''; $style_button_rest = 'style="display: none;"'; } ?> <div class="span preview-image" id="preview-image-<?php echo $field['name']; ?>" data-name="<?php echo $field['name']; ?>" style="display: block; margin-bottom: 5px;"> <?php if( $image_src ){ echo "<img src='{$image_src}' style='width: 100%;'>"; } ?> </div> <button <?php echo $style_button_select; ?> class="button button-select-image" data-name="<?php echo $field['name']; ?>"><?php _e( 'Select Image', 'gravityforms-popup' ); ?></button> <button <?php echo $style_button_rest; ?> class="button button-change-image" data-name="<?php echo $field['name']; ?>"><?php _e( 'Change Image', 'gravityforms-popup' ); ?></button> <button <?php echo $style_button_rest; ?> class="button button-primary button-delete-image" data-name="<?php echo $field['name']; ?>"><?php _e( 'Delete Image', 'gravityforms-popup' ); ?></button> <?php }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function add_smt_image_field() {\n // this will add the custom meta field to the add new term page\n wp_enqueue_media(); \n ?>\n <div class=\"form-field\">\n <label for=\"smt_image\"><?php _e( 'Category Image:', 'journey' ); ?></label>\n <input type=\"text\" name=\"smt_image[image]\" id=\"smt_image[image]\" class=\"smt-image\" value=\"<?php echo $smtimage; ?>\">\n <input class=\"upload_image_button button\" name=\"_add_smt_image\" id=\"_add_smt_image\" type=\"button\" value=\"Select/Upload Image\" />\n <script>\n jQuery(document).ready(function() {\n jQuery('#_add_smt_image').click(function() {\n wp.media.editor.send.attachment = function(props, attachment) {\n jQuery('.smt-image').val(attachment.url);\n }\n wp.media.editor.open(this);\n return false;\n });\n });\n </script>\n </div>\n<?php\n}", "function rbm_do_field_image( $name, $label = false, $value = false, $args = array() ) {\n\n\tglobal $rbm_fh_deprecated_support;\n\n\t$args['type'] = 'image';\n\t$args['button_text'] = 'Upload / Choose Image';\n\t$args['button_remove_text'] = 'Remove Image';\n\t$args['window_title'] = 'Choose Image';\n\t$args['window_button_text'] = 'Use Image';\n\n\n\t$args['label'] = $label;\n\t$args['value'] = $value;\n\n\t$rbm_fh_deprecated_support->fields->do_field_media( $name, $args );\n}", "function cmb_after_url_input_cb($field_args, $field) {\n?>\n <strong>Preview</strong>\n <img class=\"gif_image\" src=\"<?php echo $field->value() ?>\" />\n <button class=\"open_giphy_search btn\" type=\"button\">Add/Replace Gif</button>\n<?php\n}", "function journey_smt_edit_meta_field($term) {\n wp_enqueue_media();\n // put the term ID into a variable\n $t_id = $term->term_id;\n \n // retrieve the existing value(s) for this meta field. This returns an array\n $term_meta = get_option( \"social_category_$t_id\" ); ?>\n \n <tr class=\"form-field\">\n <th scope=\"row\" valign=\"top\"><label for=\"_smt_image\"><?php _e( 'Category Image', 'journey' ); ?></label></th>\n <td>\n <?php\n $smtimage = esc_attr( $term_meta['image'] ) ? esc_attr( $term_meta['image'] ) : ''; \n ?>\n <input type=\"text\" name=\"smt_image[image]\" id=\"smt_image[image]\" class=\"smt-image\" value=\"<?php echo $smtimage; ?>\">\n <input class=\"upload_image_button button\" name=\"_smt_image\" id=\"_smt_image\" type=\"button\" value=\"Select/Upload Image\" />\n </td>\n </tr>\n <tr class=\"form-field\">\n <th scope=\"row\" valign=\"top\"></th>\n <td style=\"height: 150px;\">\n <style>\n div.img-wrap {\n background: #c3c3c3;\n border: 2px solid #afafaf;\n background-size:contain; \n max-width: 250px; \n max-height: 250px; \n width: 100%; \n height: 100%; \n overflow:hidden; \n }\n div.img-wrap img {\n max-width: 100%;\n }\n </style>\n <div class=\"img-wrap\">\n \n <img src=\"<?php if($smtimage){ ?><?php echo $smtimage; ?><?php } else { echo 'http://placehold.it/250'; } ?>\" id=\"smt-img\">\n </div>\n <script>\n jQuery(document).ready(function() {\n jQuery('#_smt_image').click(function() {\n wp.media.editor.send.attachment = function(props, attachment) {\n jQuery('#smt-img').attr(\"src\",attachment.url)\n jQuery('.smt-image').val(attachment.url)\n }\n wp.media.editor.open(this);\n return false;\n });\n });\n </script>\n </td>\n </tr>\n<?php\n}", "function _wp_image_editor_choose($args = array())\n{\n}", "function hs_field_image($arr) {\n\n\textract($arr);\n\t$index = 0;\n\n\tif(isset($parent)) {\n\t\t$value = isset(get_option($register_id)[$parent][$index][$id]) ? get_option($register_id)[$parent][$index][$id] : '';\n\t\t$name = $register_id.'['.$parent.']['.$index.']'.'['.$id.']';\n\n\t}else {\n\t\t$value = isset(get_option($register_id)[$id]) ? get_option($register_id)[$id] : '';\n\t\t$name = $register_id.'['.$id.']';\n\t} ?>\n\n\t<input type=\"text\" rows=\"7\" class=\"regular-text\" id=\"<?php echo $id; ?>\" name=\"<?php echo $name; ?>\" value=\"<?php echo $value; ?>\">\n\n\t<button class=\"button button-primary upload-btn\">Upload</button>\n\n\t\t<div class=\"view leo-upload-view\" style=\"margin-top: 10px;\">\n\t\t\t<?php if($value): ?>\n\t\t\t\t<img src=\"<?php echo $value; ?>\" style=\"max-width: 349px; height: auto;\">\n\t\t\t\t<span class=\"close\">x</span>\n\t\t\t<?php endif; ?>\n\t\t</div>\n\n<?php }", "protected function _image_upload(){\n\t\t$url = array(\n\t\t\t'name' => 'aisis_options[jumbo_image]',\n\t\t\t'class' => 'input-xlarge',\n\t\t\t'id' => 'jumboImage',\n\t\t\t'placeholder' => 'Image for Jumbotron',\n\t\t\t'value' => $this->_helper->get_option('aisis_options', 'jumbo_image'),\n\t\t\t'label' => array(\n\t\t\t\t'class' => 'control-label',\n\t\t\t\t'value' => 'Image <a href=\"#\" id=\"imagePop\" rel=\"popover\" \n\t\t\tdata-content=\"To insert an image, click upload and then select or upload an image. from there scroll down and click <strong>insert into post</strong>. Or place a url or an\n\t\t\timage here.\" \n\t\t\tdata-trigger=\"hover\"\n\t\t\tdata-original-title=\"Image For Jumbotron\"><i class=\"icon-info-sign\"></i></a>',\n\t\t\t),\n\t\t);\n\t\t\n\t\t$input = new CoreTheme_Form_Elements_Url($url);\n\t\treturn $input;\n\t}", "public static function field_logo_avimayeur(){\n ?>\n <img src=\"<?php echo get_option('img_logo'); ?>\" class=\"img-logo\" alt=\"\" /><br />\n <input type=\"file\"\n id=\"img_logo\"\n name=\"img_logo\"\n value=\"<?php echo get_option('img_logo'); ?>\"\n />\n <?php\n }", "public function fileinputimage() {\r\n $this->defaultOption();\r\n $textbox = '';\r\n// $textbox = '<div class=\"col-xs-3\">';\r\n $type = 'text';\r\n if ($this->formOption['TYPE'] != null) {\r\n $type = $this->formOption['TYPE'];\r\n }\r\n\r\n $minlength = \"\";\r\n $maxlength = \"\";\r\n if ($this->formOption['MINLENGTH'] != null) {\r\n $minlength = ' minlength=\"' . $this->formOption['MINLENGTH'] . '\"';\r\n }\r\n\r\n if ($this->formOption['MAXLENGTH'] != null) {\r\n $maxlength = ' maxlength=\"' . $this->formOption['MAXLENGTH'] . '\"';\r\n }\r\n /* $textbox .= '<input type=\"' . $type . '\" \r\n placeholder=\"' . $this->formOption['PLACEHOLDER'] . '\"\r\n name=\"' . $this->formOption['NAME'] . '\"\r\n id=\"' . $this->formOption['ID'] . '\"\r\n ' . $this->formOption['REQUIRED'] . '\r\n ' . $this->formOption['MANUAL_ATTRIBUT'] . '\r\n value=\"' . $this->formOption['VALUE'] . '\"\r\n ' . $minlength . $maxlength . '\r\n class=\"form-control\">';\r\n */\r\n $value = '';\r\n if ($this->formOption['VALUE'] != '') {\r\n $value = '<img src=\"' . $this->formOption['VALUE'] . '\" alt=\"\" />';\r\n }\r\n $textbox .= '<div class=\"fileinput fileinput-new\" id=\"fileinput-' . $this->formOption['ID'] . '\" data-provides=\"fileinput\">\r\n <div class=\"fileinput-preview thumbnail\" id=\"view-' . $this->formOption['ID'] . '\" data-trigger=\"fileinput\" style=\"width: 200px; height: 150px;\"> \r\n ' . $value . '\r\n </div>\r\n <div>\r\n <span class=\"btn red btn-outline btn-file\">\r\n <span class=\"fileinput-new\"> Select image </span>\r\n <span class=\"fileinput-exists\"> Change </span>\r\n <input ' . $this->formOption['MANUAL_ATTRIBUT'] . ' id=\"' . $this->formOption['ID'] . '\" type=\"file\" name=\"' . $this->formOption['NAME'] . '\"> </span>\r\n <a href=\"javascript:;\" class=\"btn red fileinput-exists\" data-dismiss=\"fileinput\"> Remove </a>\r\n </div>\r\n </div>';\r\n// $textbox .= '<div>';\r\n $rs = $this->formGroup($textbox);\r\n $this->ResetObject();\r\n return $rs;\r\n }", "private static function image_uploader_field( $name, $value = '') {\n\n $image = ' button\">Upload image';\n $image_size = 'full'; \n $display = 'none';\n \n if( $image_attributes = wp_get_attachment_image_src( $value, $image_size ) ) {\n \n // $image_attributes[0] - image URL\n // $image_attributes[1] - image width\n // $image_attributes[2] - image height\n \n $image = '\"><img src=\"' . $image_attributes[0] . '\" \n style=\"max-width:95%;display:block;\" />';\n $display = 'inline-block';\n \n }\n \n return '\n <div>\n <a href=\"#\" class=\"upload_image_button' . $image . '</a>\n <input type=\"hidden\" name=\"icr_option[' . $name . ']\" \n id=\"' . $name . '\" \n value=\"' . esc_attr( $value ) . '\" />\n <a href=\"#\" class=\"remove_image_button\" \n style=\"display:inline-block;display:' . $display . '\">\n Remove image\n </a>\n </div>';\n }", "private static function image( $name, $field, $value, $widget ) {\r\n\r\n \t$image_src = wp_get_attachment_image_src( $value, 'thumbnail' );\r\n $image = $image_src ? $image_src[0] : Defaults::placeholder(); ?>\r\n\r\n <div class=\"imacon-image-wrap imacon-field\" data-id=\"<?php echo $name ?>\">\r\n <div class=\"imacon-preview\"><img src=\"<?php echo $image; ?>\"></div>\r\n <span class=\"imacon-remove-image <?php echo ( ! $value ) ? 'hidden' : ''; ?>\">x</span>\r\n <input type=\"hidden\" id=\"<?php echo $widget->get_field_id( $name ); ?>\" name=\"<?php echo $widget->get_field_name( $name ); ?>\" value=\"<?php echo $value; ?>\" class=\"imacon-<?php echo $name ?>\" />\r\n </div>\r\n\r\n <?php }", "function edit_form_image_editor($post)\n{\n}", "function image() {\n if ($this->subfield) {\n return $this->subfield->image();\n } else {\n return self::field_icon($this);\n }\n }", "function WPBikeRent_Theme_image_uploader_field( $name, $value = '') {\n\t\t$image = ' button\">Upload image';\n\t\t$image_size = 'full';\n\t\t$display = 'none';\n\t \n\t\tif( $image_attributes = wp_get_attachment_image_src( $value, $image_size ) ) {\n\t\t\t$image = '\"><img src=\"' . $image_attributes[0] . '\" style=\"max-width:95%;display:block;height: 100px;\" />';\n\t\t\t$display = 'inline-block';\n\t\t} \n\t \n\t\treturn '\n\t\t<div>\n\t\t\t<a href=\"#\" class=\"misha_upload_image_button' . $image . '</a>\n\t\t\t<input type=\"hidden\" name=\"' . $name . '\" id=\"' . $name . '\" value=\"' . $value . '\" />\n\t\t\t<a href=\"#\" class=\"misha_remove_image_button\" style=\"display:inline-block;display:' . $display . '\">Remove image</a>\n\t\t</div>';\n\t}", "function bio_get_image() {\n\t\twp_enqueue_script('jquery');\n\t\twp_enqueue_media();\n?>\n\t\t<script type=\"text/javascript\">\n\t\t\tjquery(document).ready(function($) {\n\t\t\t\t$('.pilih-foto').click(function(e) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tvar image = wp.media({\n\t\t\t\t\t\ttitle\t\t: 'Pilih Foto',\n\t\t\t\t\t\tmultiple\t: false\n\t\t\t\t\t}).open()\n\t\t\t\t\t.on('select', function(e) {\n\t\t\t\t\t\tvar uploaded_image = image.state().get('selection').first();\n\t\t\t\t\t\tvar image_url = uploaded_image.tojson().url;\n\t\t\t\t\t\t$('#foto').val(image_url);\n\t\t\t\t\t\t$('#tampil-foto').html('<img src=\"' + image_url + '\" width=\"150\">');\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\t\t</script>\n<?php\n\t}", "function bttk_get_image_field( $id, $name, $image, $label ){\r\n $obj = new BlossomThemes_Toolkit_Functions();\r\n $output = '';\r\n $output .= '<div class=\"widget-upload\">';\r\n $output .= '<label for=\"' . esc_attr( $id ) . '\">' . esc_html( $label ) . '</label><br/>';\r\n if ( filter_var( $image, FILTER_VALIDATE_URL ) === false ) {\r\n $image = str_replace('http://','',$image);\r\n }\r\n if ( !filter_var( $image, FILTER_VALIDATE_URL ) === false ) {\r\n $image = $obj->bttk_get_attachment_id( $image );\r\n }\r\n $output .= '<input id=\"' . esc_attr( $id ) . '\" class=\"bttk-upload\" type=\"hidden\" name=\"' . esc_attr( $name ) . '\" value=\"' . esc_attr( $image ) . '\" placeholder=\"' . __('No file chosen', 'blossomthemes-toolkit') . '\" />' . \"\\n\";\r\n if ( function_exists( 'wp_enqueue_media' ) ) {\r\n if ( $image == '' ) {\r\n $output .= '<input id=\"upload-' . esc_attr( $id ) . '\" class=\"bttk-upload-button button\" type=\"button\" value=\"' . __('Upload', 'blossomthemes-toolkit') . '\" />' . \"\\n\";\r\n } else {\r\n $output .= '<input id=\"upload-' . esc_attr( $id ) . '\" class=\"bttk-upload-button button\" type=\"button\" value=\"' . __('Change', 'blossomthemes-toolkit') . '\" />' . \"\\n\";\r\n }\r\n } else {\r\n $output .= '<p><i>' . __('Upgrade your version of WordPress for full media support.', 'blossomthemes-toolkit') . '</i></p>';\r\n }\r\n\r\n $output .= '<div class=\"bttk-screenshot\" id=\"' . esc_attr( $id ) . '-image\">' . \"\\n\";\r\n\r\n if ( $image != '' ) {\r\n $remove = '<a class=\"bttk-remove-image\">'.__('Remove Image','blossomthemes-toolkit').'</a>';\r\n $attachment_id = $image;\r\n $attachment_id = str_replace('http://','',$attachment_id);\r\n if ( !filter_var( $image, FILTER_VALIDATE_URL ) === false ) {\r\n $attachment_id = $obj->bttk_get_attachment_id( $attachment_id );\r\n }\r\n $image_array = wp_get_attachment_image_src( $attachment_id, 'full');\r\n $image = preg_match('/(^.*\\.jpg|jpeg|png|gif|ico*)/i', $image_array[0]);\r\n if ( $image ) {\r\n $output .= '<img src=\"' . esc_url( $image_array[0] ) . '\" alt=\"\" />' . $remove;\r\n } else {\r\n // Standard generic output if it's not an image.\r\n $output .= '<small>' . __( 'Please upload valid image file.', 'blossomthemes-toolkit' ) . '</small>';\r\n } \r\n }\r\n $output .= '</div></div>' . \"\\n\";\r\n \r\n echo $output;\r\n }", "function edit_texonomy_field( $taxonomy ) {\r\n\tif ( get_bloginfo( 'version' ) >= 3.5 ) {\r\n\t\twp_enqueue_media();\r\n\t} else {\r\n\t\twp_enqueue_style( 'thickbox' );\r\n\t\twp_enqueue_script( 'thickbox' );\r\n\t}\r\n\r\n\tif ( taxonomy_image_url( $taxonomy->term_id, NULL, TRUE ) == DEFAULT_IMAGE ) {\r\n\t\t$image_text = \"\";\r\n\t} else {\r\n\t\t$image_text = taxonomy_image_url( $taxonomy->term_id, NULL, TRUE );\r\n\t\techo '<tr class=\"form-field\">\r\n\t\t\t\t<th scope=\"row\" valign=\"top\"><label for=\"taxonomy_image\">' . esc_html__('Image', 'applique') . '</label></th>\r\n\t\t\t\t<td><img class=\"taxonomy-image\" src=\"' . esc_url( $image_text ) . '\"/><br/><input type=\"text\" name=\"taxonomy_image\" id=\"taxonomy_image\" value=\"' . $image_text . '\" /><br />\r\n\t\t\t\t<button class=\"upload_image_button button\">' . esc_html__( 'Upload image', 'applique' ) . '</button>\r\n\t\t\t\t<button class=\"remove_image_button button\">' . esc_html__( 'Remove image', 'applique' ) . '</button>\r\n\t\t\t\t</td>\r\n\t\t\t </tr>' . script();\r\n\t}\r\n}", "function zAddTexonomyField() {\n if (get_bloginfo('version') >= 3.5)\n wp_enqueue_media();\n else {\n wp_enqueue_style('thickbox');\n wp_enqueue_script('thickbox');\n }\n \n echo '<div class=\"form-field\">\n <input type=\"hidden\" name=\"zci_taxonomy_image_id\" id=\"zci_taxonomy_image_id\" value=\"\" />\n <label for=\"zci_taxonomy_image\">' . __('Image', 'categories-images') . '</label>\n <input type=\"text\" name=\"zci_taxonomy_image\" id=\"zci_taxonomy_image\" value=\"\" />\n <br/>\n <button class=\"z_upload_image_button button\">' . __('Upload/Add image', 'categories-images') . '</button>\n </div>';\n }", "function type_url_form_image()\n{\n}", "public static function image_select_field( $settings, $value ) {\n ob_start();\n ?>\n <div class=\"rf-vc-image-select\">\n <?php if ( ! empty( $settings['value'] ) ): ?>\n <?php foreach( $settings['value'] as $image => $template ): ?>\n <div class=\"rf-vc-image-option <?php echo ( $value == $template ) ? 'selected' : ''; ?>\" data-template=\"<?php echo $template; ?>\">\n <img src=\"<?php echo $image; ?>\" alt=\"\"/>\n </div>\n <?php endforeach; ?>\n <?php endif; ?>\n <input type=\"hidden\" name=\"<?php echo esc_attr( $settings['param_name'] ); ?>\" class=\"wpb_vc_param_value <?php echo esc_attr( $settings['param_name'] ); ?> <?php echo esc_attr( $settings['type'] ); ?>_field\"\n value=\"<?php echo esc_attr( $value ); ?>\"/>\n </div>\n <?php\n return ob_get_clean();\n }", "function cp_v2_media_settings_field( $name, $settings, $value, $default_value = null ) {\r\n\r\n\t$input_name = $name;\r\n\t$type = isset( $settings['type'] ) ? $settings['type'] : '';\r\n\t$class = isset( $settings['class'] ) ? $settings['class'] : '';\r\n\r\n\t$btn_label = '' !== $value ? __( 'Change Image', 'convertpro' ) : __( 'Select Image', 'convertpro' );\r\n\t$img_arr = explode( '|', $value );\r\n\t$img_id = isset( $img_arr[0] ) ? (int) $img_arr[0] : 0;\r\n\t$img_url = isset( $img_arr[1] ) ? $img_arr[1] : 0;\r\n\t$img_data = false;\r\n\t$map_style = isset( $settings['map_style'] ) ? wp_json_encode( $settings['map_style'] ) : '';\r\n\r\n\t$display_size = false;\r\n\tif ( $img_id > 0 ) {\r\n\t\t$display_size = true;\r\n\t}\r\n\r\n\tif ( false === $display_size ) {\r\n\t\t$hide_size = 'hide-for-default';\r\n\t} else {\r\n\t\t$hide_size = '';\r\n\t}\r\n\r\n\t$img_src_html = ( '' !== $img_url ) ? $img_url : '';\r\n\r\n\tif ( 0 === $img_id ) {\r\n\t\t$img_src_html = CP_V2_BASE_URL . 'assets/' . $img_url;\r\n\t}\r\n\r\n\t$data_default = explode( '|', $default_value );\r\n\r\n\t$img = ( empty( $value ) ) ? '<p class=\"description\">' . __( 'No Image Selected', 'convertpro' ) . '</p>' : '<img src=\"' . $img_src_html . '\"/>';\r\n\t$display = ( '' !== $value ) ? 'style=\"display:block;\"' : 'style=\"display:none;\"';\r\n\t$uid = uniqid();\r\n\r\n\t$_SESSION[ $input_name ] = $uid;\r\n\r\n\t$data_atts = \"data-img-id='\" . $img_id . \"'\";\r\n\t$data_atts .= \" data-img-url='\" . $img_url . \"'\";\r\n\r\n\t$output = '';\r\n\t$output .= '<div class=\"' . $input_name . '_' . $uid . '_container cp-media-container\">' . $img . '</div>';\r\n\r\n\t$output .= '<input type=\"hidden\" data-type=\"background_image\" data-mapstyle=\"' . htmlspecialchars( $map_style, ENT_QUOTES, 'UTF-8' ) . '\" id=\"cp_' . $input_name . '_' . $uid . '\" class=\"form-control cp-input cp-' . $type . ' ' . $input_name . ' ' . $type . ' ' . $class . '\" name=\"' . $input_name . '\" value=\"' . $value . '\" ' . $data_atts . ' />';\r\n\r\n\t$output .= '<div class=\"cp-media-actions\">';\r\n\t$rmv_btn = ( empty( $value ) ) ? 'display:none;' : '';\r\n\t$dflt_btn = ( empty( $default_value ) ) ? 'display:none;' : '';\r\n\r\n\tif ( empty( $default_value ) ) {\r\n\t\t$output .= '<button style=\"' . $rmv_btn . '\" id=\"remove_' . $input_name . '_' . $uid . '\" ' . $display . ' class=\"button button-secondary cp-remove-media form-control cp-input cp-' . $type . '\">' . __( 'Remove', 'convertpro' ) . '</button>';\r\n\t}\r\n\r\n\t$output .= '<button style=\"' . $dflt_btn . '\" data-default=\"' . $data_default[1] . '\" id=\"default_' . $input_name . '_' . $uid . '\" ' . $display . ' class=\"button button-secondary cp-default-media form-control cp-input cp-' . $type . '\">' . __( 'Default', 'convertpro' ) . '</button>';\r\n\t$output .= '<button id=\"' . $input_name . '_' . $uid . '\" data-uid=\"' . $uid . '\" class=\"button button-secondary cp-upload-media form-control cp-input cp-' . $type . '\">' . $btn_label . '</button>';\r\n\t$output .= '</div>';\r\n\r\n\t$selected = '';\r\n\r\n\t$output .= '</div>';\r\n\t$output .= '<div data-global=\"1\" class=\"cp-element-container cp-media-sizes ' . $hide_size . '\" data-name=\"' . $input_name . '_' . $uid . '\" data-element=\"cp-media-' . $uid . '\" data-operator=\"!==\" data-value=\"\">';\r\n\t$output .= '<strong><label for=\"cp_' . $input_name . '_size\">' . __( 'Select Size', 'convertpro' ) . '</label></strong>';\r\n\t$output .= '<p>';\r\n\r\n\t$output .= '<select id=\"cp_' . $input_name . '_size\" class=\"cp-media-' . $uid . ' form-control cp-input cp-media-size\" name=\"' . $input_name . '_size\" data-id=\"' . $img_arr[0] . '\" >';\r\n\r\n\tif ( false !== $display_size ) {\r\n\r\n\t\t$output .= '<option ' . $selected . ' value=\"\">' . __( 'Full', 'convertpro' ) . '</option>';\r\n\t}\r\n\r\n\t$output .= '</select></p>';\r\n\treturn $output;\r\n}", "function drawImageUploadField($name, $label, $value_array, $image_folder, $image_size_text = '', $additional_class = '', $callback = '') {\n $post_name = $name.'_file';\n $value = $value_array[$name];\n $post_value = $_POST[$post_name];\n ?>\n <div class=\"form-group\">\n <label class=\"col-md-3 control-label\"><?php echo $label; ?></label>\n <div class=\"col-md-9\">\n <input title=\"Search for a file to add\" type=\"file\" name=\"<?php echo $name; ?>\" id=\"<?php echo $name; ?>\" class=\"uploadify image <?php echo $additional_class; ?>\"<?php echo ($callback != ''?' data-callback=\"'.$callback.'\"':''); ?>>\n <?php\n if (!empty($image_size_text)) {\n ?>\n <p class=\"help-block\">\n <small class='text-muted'><?php echo $image_size_text; ?></small>\n </p>\n <?php\n }\n ?>\n <div class=\"details\">\n <?php\n if (!empty($value)) {\n ?>\n <img src=\"<?php echo $image_folder.$value; ?>\" />\n <?php\n if (empty($post_value)) {\n ?>\n <div>\n <a href=\"#\" class=\"remove\">Remove Image</a>\n </div>\n <?php\n }\n }\n ?>\n <input type=\"hidden\" name=\"<?php echo $post_name; ?>\" value=\"<?php echo $value; ?>\" />\n </div>\n </div>\n </div>\n <?php\n}", "function add_texonomy_field() {\r\n\tif ( get_bloginfo( 'version' ) >= 3.5 ) {\r\n\t\twp_enqueue_media();\r\n\t} else {\r\n\t\twp_enqueue_style( 'thickbox' );\r\n\t\twp_enqueue_script( 'thickbox' );\r\n\t}\r\n\r\n\techo '<div class=\"form-field\">\r\n\t\t\t<label for=\"taxonomy_image\">' . esc_html__( 'Image', 'applique' ) . '</label>\r\n\t\t\t<input type=\"text\" name=\"taxonomy_image\" id=\"taxonomy_image\" value=\"\" />\r\n\t\t\t<br/>\r\n\t\t\t<button class=\"upload_image_button button\">' . esc_html__( 'Upload image', 'applique' ) . '</button>\r\n\t\t </div>' . script();\r\n}", "function kemi_social_images_cb( $args ) {\n // get the value of the setting we've registered with register_setting()\n $options = get_option( 'kemi_social_images_options' );\n // output the field\n // Save attachment ID\n wp_enqueue_media();\n ?>\n <input type=\"hidden\" id=\"<?php echo esc_attr( $args['label_for'] ); ?>\"\n data-custom=\"<?php echo esc_attr( $args['kemi_social_images_custom_data'] ); ?>\"\n name=\"kemi_social_images_options[<?php echo esc_attr( $args['label_for'] ); ?>]\"\n value=\"<?php echo $options['kemi_social_images']; ?>\" />\n <div class='image-preview-wrapper'>\n\t\t\t<img id='image-preview' src='<?php echo wp_get_attachment_url( $options['kemi_social_images'] ); ?>' height='100'>\n\t\t</div>\n\t\t<input id=\"upload_image_button\" type=\"button\" class=\"button\" value=\"<?php _e( 'Upload image' ); ?>\" />\n\t\t<input type='hidden' name='image_attachment_id' id='image_attachment_id' value='<?php echo $options['kemi_social_images']; ?>'>\n <?php\n if ( isset( $_POST['submit'] ) && isset( $_POST['image_attachment_id'] ) ) :\n\t\tupdate_option( 'kemi_social_images_options', absint( $_POST['image_attachment_id'] ) );\n exit();\n\tendif;\n}", "function ghostpool_category_media_field( $option, $term_meta ) { \n \t\t\t\n\t// Load scripts\n\twp_enqueue_media();\n\t\n\t?>\n\t<script>\n\tjQuery( document ).ready( function( $ ) {\n\t\tvar mediaUploader;\n\t\t$( '#gp_upload_image_<?php echo esc_attr( $option[\"id\"] ); ?>' ).click( function( e ) {\n\t\t\te.preventDefault();\n\t\t\tif ( mediaUploader ) {\n\t\t\t\tmediaUploader.open();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tmediaUploader = wp.media.frames.file_frame = wp.media({\n\t\t\t\ttitle: '<?php esc_html_e( \"Choose Image\", \"socialize\" ); ?>',\n\t\t\t\tbutton: {\n\t\t\t\t\ttext: '<?php esc_html_e( \"Choose Image\", \"socialize\" ); ?>'\n\t\t\t\t}, \n\t\t\t\tmultiple: false \n\t\t\t});\n\t\t\tmediaUploader.on( 'select', function() {\n\t\t\t\tvar attachment = mediaUploader.state().get( 'selection' ).first().toJSON();\n\t\t\t\t$( '#gp_term_meta_<?php echo esc_attr( $option[\"id\"] ); ?>' ).val( attachment.url );\n\t\t\t\t$( '#gp-cat-image-preview-<?php echo esc_attr( $option[\"id\"] ); ?>' ).show();\n\t\t\t\t$( '#gp-cat-image-preview-<?php echo esc_attr( $option[\"id\"] ); ?> img' ).attr( 'src', attachment.sizes.thumbnail.url );\n\t\t\t\t$( '#gp-remove-image-<?php echo esc_attr( $option[\"id\"] ); ?>' ).show();\n\t\t\t});\n\t\t\tmediaUploader.open();\n\t\t});\n\t\t$( '#gp-remove-image-<?php echo esc_attr( $option[\"id\"] ); ?>' ).click( function( e ) {\n\t\t\te.preventDefault();\n\t\t\t$( '#gp_term_meta_<?php echo esc_attr( $option[\"id\"] ); ?>' ).val( '' );\n\t\t\t$( '#gp-cat-image-preview-<?php echo esc_attr( $option[\"id\"] ); ?>' ).hide();\n\t\t\t$( this ).hide();\n\t\t});\n\t});\n\t</script>\n\n\t<?php \n\t$image_thumb = '';\n\tif ( isset( $term_meta[$option['id']] ) ) {\n\t\tglobal $wpdb;\n\t\t$attachment = $wpdb->get_col( $wpdb->prepare( \"SELECT ID FROM $wpdb->posts WHERE guid='%s';\", $term_meta[$option['id']] ) ); \n\t\t$image_id = isset( $attachment[0] ) ? $attachment[0] : ''; \n\t\tif ( $image_id ) {\n\t\t\t$image_thumb = wp_get_attachment_image_src( $image_id, 'thumbnail' );\t\n\t\t\t$image_thumb = isset( $image_thumb[0] ) ? $image_thumb[0] : '';\n\t\t}\n\t} ?>\n\n\t<div id=\"gp-cat-image-preview-<?php echo esc_attr( $option['id'] ); ?>\" class=\"gp-cat-image-preview\"<?php if ( isset( $term_meta[$option['id']] ) ) { ?> style=\"display: block;\"<?php } ?>>\n\t\t<img src=\"<?php echo $image_thumb; ?>\" alt=\"\" />\n\t</div>\n\n\t<input type=\"button\" id=\"gp_upload_image_<?php echo esc_attr( $option[\"id\"] ); ?>\" class=\"gp-upload-image-button button button-primary\" value=\"<?php if ( isset( $term_meta[$option['id']] ) ) { esc_attr_e( 'Change Image', 'socialize' ); } else { esc_attr_e( 'Add Image', 'socialize' ); } ?>\" />\n\t<?php if ( isset( $term_meta[$option['id']] ) ) { ?>\n\t\t<a class=\"gp-remove-image-button\" id=\"gp-remove-image-<?php echo esc_attr( $option[\"id\"] ); ?>\" href=\"#\"><?php esc_attr_e( 'Remove Image', 'socialize' ); ?></a>\n\t<?php } ?>\n\n\t<input id=\"gp_term_meta_<?php echo esc_attr( $option['id'] ); ?>\" type=\"hidden\" name=\"gp_term_meta[<?php echo esc_attr( $option['id'] ); ?>]\" value=\"<?php echo esc_attr( isset( $term_meta[$option['id']] ) ? $term_meta[$option['id']] : '' ); ?>\" />\n\t<p class=\"description\"><?php echo esc_attr( $option['desc'] ); ?></p>\n\t\n<?php }", "function add_image_attachment_fields_to_edit($form_fields, $post) {\n \n // $form_fields is a an array of fields to include in the attachment form\n // $post is nothing but attachment record in the database\n // $post->post_type == 'attachment'\n // attachments are considered as posts in WordPress. So value of post_type in wp_posts table will be attachment\n // now add our custom field to the $form_fields array\n // input type=\"text\" name/id=\"attachments[$attachment->ID][custom1]\"\n \n $form_fields[\"category\"] = array(\n \"label\" => __(\"Category\"),\n \"input\" => \"text\", // this is default if \"input\" is omitted\n \"value\" => get_post_meta($post->ID, \"_category\", true),\n \"helps\" => __(\"Category is a custom field.\"),\n );\n \n return $form_fields;\n}", "public function getName()\n\t{\n\t\treturn 'choice_image';\n\t}", "function my_image_attachment_fields_to_edit($form_fields, $post) {\n\t// only activate for images that already attached to pages, ignore images attached to posts\n\tif (get_post_type($post->post_parent) == 'page') {\n\t\t// get the list of pages for our select box\n\t\t$all_pages = get_pages();\n\t\t$select_code = get_pages_as_select_field($post, $all_pages);\n\t\t// $form_fields is a special array of fields to include in the attachment form\n\t\t// $post is the attachment record in the database\n\t\t// $post->post_type == 'attachment'\n\t\t// (attachments are treated as posts in WordPress)\n\t\t// add our custom field to the $form_fields array\n\t\t// input type=\"text\" name/id=\"attachments[$attachment->ID][custom1]\"\n\t\t$form_fields[\"post_parent\"] = array(\n\t\t\t\"label\" => __(\"Attatched to page\"),\n\t\t\t\"input\" => \"html\", \n\t\t\t\"html\" => $select_code\n\t\t);\n\t}\n\treturn $form_fields;\n}", "function _get_image_upload_option( $oid, $o ){ \n\n\t\t$up_url = $this->input_text($o['input_id'], $o['input_name'], esc_url($o['val']), 'regular-text uploaded_url', 'text', '', $o['placeholder']);\n\t\t\n\t\t$button_id = (isset($o['special'])) ? $oid.'OID'.$o['special'] : $oid;\n\t\t\n\t\t$up_button = $this->input_button( $button_id, __( 'Upload Image', 'pagelines' ), 'image_upload_button', 'title=\"'.$this->settings_field.'\"' );\n\t\t\n\t\t$reset_button = sprintf('<span title=\"%1$s\" id=\"%2$s\" class=\"image_reset_button button reset_%1$s\">Remove</span>', $button_id, $this->settings_field); \n\t\t\n\t\t$ajax_url = $this->input_hidden('', 'wp_ajax_action_url', admin_url(\"admin-ajax.php\"), 'ajax_action_url');\n\t\t\n\t\t$preview_size = $this->input_hidden('', 'img_size_'.$oid, $o['imagepreview'], 'image_preview_size'); \n\t\t\n\t\t// Output\n\t\t$label = $this->input_label($oid, $o['inputlabel']);\n\t\tprintf('<p>%s %s<br/> %s %s %s %s</p>',$label, $up_url, $up_button, $reset_button, $ajax_url, $preview_size);\t\t\n\t\t\n\t\t$special_image_class = '';\n\t\t\n\t\tif($o['val'])\n\t\t\t$active_image_url = $o['val'];\n\t\telseif($o['placeholder']){\n\t\t\t$active_image_url = $o['placeholder'];\n\t\t\t$special_image_class = 'default-image-preview';\n\t\t}else\n\t\t\t$active_image_url = false;\n\t\t\t\t\n\t\tif($active_image_url)\n\t\t\tprintf('<img class=\"pagelines_image_preview %s\" id=\"image_%s\" src=\"%s\" style=\"max-width:%spx\"/>', $special_image_class, $button_id, $active_image_url, $o['imagepreview']);\n\t}", "public function getImageFields();", "function carawebs_add_project_images() {\n\nif(get_field('images')):\n\n\t?><h2 class=\"headline centre centreline\">Project Images</h2><?php\n\n\twhile(has_sub_field('images')): ?>\n\n <img class=\"padding_bottom\" src =\"<?php echo get_sub_field('image'); ?>\"title=\"<?php echo get_sub_field('hover_text'); ?>\"><?php\n\n\tendwhile;\n\n\n\tendif;\n}", "public function parse_images_field($value)\n {\n }", "function tt_media_field_input( $column ) {\n if ( $column == 'tt_media-column' ) {\n global $post; ?>\n <div id=\"wrapper-<?php echo $post->ID; ?>\" class=\"tt-m-alt\">\n <input type=\"text\" class=\"large-text\" id=\"alt-<?php echo $post->ID; ?>\" value=\"<?php echo wp_strip_all_tags( __( get_post_meta( $post->ID, '_wp_attachment_image_alt', true ) ) ); ?>\" />\n <img class=\"waiting\" src=\"<?php echo esc_url( admin_url( \"images/loading.gif\" ) ); ?>\" style=\"display: none\" />\n </div>\n<?php }\n}", "public function _action_admin_featured_image_label() {\n\t\tremove_meta_box( 'postimagediv', $this->post_type, 'side' );\n\t\tadd_meta_box(\n\t\t\t'postimagediv',\n\t\t\t__( 'Project Cover Image', 'fw' ),\n\t\t\t'post_thumbnail_meta_box',\n\t\t\t$this->post_type,\n\t\t\t'side'\n\t\t);\n\t}", "function control_galleryField($name, $value='', $accept_videos=false, $accept_images = true, $single=false){\n\t_gc(__FUNCTION__);\t\n\trequire_script('Scripts/Controls/control_galleryField.js');\n\t$controlTemplate = '<input class=\"galleryField\" type=\"text\"/>';\n\t$imgPath = conf('IMAGE_RESIZED_DIRECTORY');\n\t$pControl = phpQuery::newDocument($controlTemplate);\n\tif (is_array($value)){\n\t\t$val = implode(',',$value);\n\t} else {\n\t\t$val = $value;\n\t}\n\t$pControl->find('input')->attr('name',$name)->attr('id',$name)->attr('data-imagePath',$imgPath)->val($val);\n\tif ($accept_videos){\n\t\trequire_script('Scripts/browse_videos.js');\n\t\t$pControl->find('input')->addClass('accept_video');\n\t}\n\tif ($accept_images){\n\t\trequire_script('Scripts/browse_images.js');\n\t\t$pControl->find('input')->addClass('accept_image');\n\t}\n\tif ($single){\n\t\t$pControl->find('input')->addClass('single');\n\t}\n\t_d($pControl->html());\n\t_u();\n\treturn $pControl;\n}", "function be_attachment_field_credit( $form_fields, $post ) {\n\t$form_fields['n-image-size'] = array(\n\t\t'label' => 'Image Size',\n\t\t'input' => 'html',\n\t\t'helps' => 'Size relative to column width',\n 'options' => array(\n 'portrait' => __( 'portrtait', '_n' ),\n 'landscape' => __( 'landscape', '_n' )\n ),\n 'application' => 'image',\n 'exclusions' => array( 'audio', 'video' )\t\t\n\t);\n\n $form_fields['n-image-size']['html'] = \"<select name='attachments[{$post->ID}][profile_image_select]'>\";\n $form_fields['n-image-size']['html'] .= '<option '.selected(get_post_meta($post->ID, \"_profile_image_select\", true), 'default',false).' value=\"2\">x2</option>';\n $form_fields['n-image-size']['html'] .= '<option '.selected(get_post_meta($post->ID, \"_profile_image_select\", true), 'default',false).' value=\"3\">x3</option>';\n $form_fields['n-image-size']['html'] .= '</select>';\n\n\treturn $form_fields;\n}", "function render_field( $field )\n\t{\n\t\t// vars\n\t\t$i = 0;\n\t\t$e = '<ul class=\"acf-image-select-list ' . esc_attr($field['class']) . '\" data-image-select-multiple=\"'.$field['multiple'].'\">';\n\t\t\n\t\t// add choices\n\t\tif( is_array($field['choices']) )\n\t\t{\n\t\t\tforeach( $field['choices'] as $key => $value )\n\t\t\t{\n\t\t\t\t// vars\n\t\t\t\t$i++;\n\t\t\t\t$atts = '';\n\t\t\t\t$class = '';\n\n\t\t\t\t// if there is no value and this is the first of the choices, select this on by default\n\t\t\t\tif( $field['value'] === array() )\n\t\t\t\t{\n\t\t\t\t\tif( $i === 1 )\n\t\t\t\t\t{\n\t\t\t\t\t\t$atts = 'checked=\"checked\" data-checked=\"checked\"';\n\t\t\t\t\t\t$class = 'acf-image-select-selected';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif( ! is_array($field['value']) )\n\t\t\t\t\t{\n\t\t\t\t\t\tif( strval($key) === strval($field['value']) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$atts = 'checked=\"checked\" data-checked=\"checked\"';\n\t\t\t\t\t\t\t$class = 'acf-image-select-selected';\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// HTML\n\t\t\t\t$field_id = esc_attr($field['id']) . '-' . esc_attr($key);\n\t\t\t\t$e .= '<li class=\"acf-image-select\">';\n\t\t\t\t\t\n\t\t\t\t\t$e .= '<label for=\"' . $field_id . '\" class=\"'.$class.'\">';\n\t\t\t\t\t\t$e .= '<input id=\"' . $field_id . '\" class=\"item-input\" type=\"radio\" name=\"' . esc_attr($field['name']) . '\" value=\"' . esc_attr($key) . '\" ' . $atts . ' />';\n\t\t\t\t\t\t$e .= '<img class=\"item-image ' . $field_id . '-image\" alt=\"'.$value.'\" src=\"'.$field['image_path'].esc_attr($key).'.'.$field['image_extension'].'\">';\n\t\t\t\t\t\t$e .= '<br/>';\n\t\t\t\t\t\t$e .= '<span class=\"item-title ' . $field_id . '-title\">'.$value.'</span>';\n\t\t\t\t\t$e .= '</label>';\n\t\t\t\t$e .= '</li>';\n\t\t\t}\n\t\t}\n\t\t\n\t\t$e .= '</ul>';\n\t\t\n\t\techo $e;\n\t\t\n\t}", "function getBrfPictureSelector()\n{\n return new Selector_BrfPictureSelector('brf_picture');\n}", "function validate_image_field($field)\n {\n }", "function image_attachment_fields_to_edit($form_fields, $post)\n{\n}", "function control_fileField($name, $value='', $single=false){\n\t_gc(__FUNCTION__);\t\n\trequire_script('Scripts/Controls/control_fileField.js');\n\t$controlTemplate = '<input class=\"fileField\" type=\"hidden\"/>';\n\t//$imgPath = conf('IMAGE_RESIZED_DIRECTORY');\n\t$pControl = phpQuery::newDocument($controlTemplate);\n\tif (is_array($value)){\n\t\t$val = implode(',',$value);\n\t} else {\n\t\t$val = $value;\n\t}\n\t$pControl->find('input')->attr('name',$name)->attr('id',$name)->val($val);\n\tif ($single){\n\t\t$pControl->find('input')->addClass('single');\n\t}\n\t_u();\n\treturn $pControl;\n}", "function carawebs_thinking_images() {\n\nif(get_field('extra_images')):\n\n\twhile(has_sub_field('extra_images')):\n\n\t$attachment_id = get_sub_field('image');\n\t$size = \"medium\"; // (thumbnail, medium, large, full or custom size)\n \t$image = wp_get_attachment_image_src( $attachment_id, $size );\n\n\t\t// url = $image[0];\n\t\t// width = $image[1];\n\t\t// height = $image[2];\n\t\t?>\n\t\t<div class=\"post_image\">\n\t\t\t<img src=\"<?php echo $image[0]; ?>\">\n\n\t\t\t<?php\n\t\t\tif(get_sub_field('text')): ?>\n\t\t\t<div class=\"image_hover_wrap\"><?php the_sub_field('text'); ?></div>\n\t\t\t<?php\n\t\t\tendif;\n\n\t\t?></div>\n\t\t<?php\n\n\tendwhile;\n\n\tendif;\n\n\n}", "private function simple_image_uploader( $value ) {\n\t\t$upload =isset($this->_saved_options[ $value[ 'id' ] ]) ? $this->_saved_options[ $value[ 'id' ] ] : 0;\n\t\t$id = $value[ 'id' ];\n\t\t$this->form_element_start( $value ); \n\t\t?>\n\t\t<div>\n\t\t<input type=\"file\" name=\"<?php echo $id; ?>\" class=\"upload_input\" />\n\t\t<span class=\"submit\"><input name=\"save\" type=\"submit\" value=\"Upload\" class=\"button upload_save\" /></span>\n\t\t</div>\n\t\t\t<?php\n\t\t\t$src = wp_get_attachment_image_src( $upload, 'mini' );\n\t\t\tif(false !== $src){\n\t\t\t$srcfull = wp_get_attachment_image_src( $upload, 'full' );\n\t\techo '<br><div id=\"'. $id.'_preview\"><a title=\"Large Preview\" href=\"'.$srcfull[0].'\" class=\"thickbox\" target=\"_blank\"><div class=\"img-mini\" style=\"background-image:url('.$src[0].');\"> </div></a>';\n\t\t\t?>\n\t\t\t<span class=\"submit\"><input name=\"reset\" class=\"inline-reset\" type=\"button\" data-type=\"image\" data-id=\"<?php echo $value['id']; ?>\" title=\"Reset to Default Value\" value=\"Remove\" /></span>\n\t\t\t<div class=\"small\">Images are stored in the Media Library.</div>\n\t\t\t<input type=\"hidden\" class=\"upload-input-text\" id=\"<?php echo $id; ?>_id\" name=\"<?php echo $id; ?>_id\" value=\"<?php echo $upload; ?>\"/>\n\t\t</div>\n\t \t<?php \n\t\t} else {\n\t\t\t$this->_tk->update_option( $id );\n\t\t}\n\t\t$this->form_element_end( $value );\n\t}", "public function _action_admin_featured_image_label() {\r\n\t\tremove_meta_box( 'postimagediv', $this->post_type, 'side' );\r\n\t\tadd_meta_box(\r\n\t\t\t'postimagediv',\r\n\t\t\t__( 'Project Cover Image', 'pt_portfolio' ),\r\n\t\t\t'post_thumbnail_meta_box',\r\n\t\t\t$this->post_type,\r\n\t\t\t'side'\r\n\t\t);\r\n\t}", "function field_to_image($field, $path = null)\n {\n if(empty($field))\n {\n $image = base_url('public/images/no_image.png');\n return \"<a href='$image' class='fancybox thumbnail'><img src='$image' width='100px' alt=''/></a>\";\n }\n\n if (strpos($field, 'facebook') !== false)\n {\n $image = $field;\n }\n elseif (strpos($field, 'jpg') !== false || strpos($field, 'jpeg') !== false || strpos($field, 'png') !== false)\n {\n if(!is_null($path))\n {\n $image = base_url($path . $field);\n }\n else\n {\n $image = $field;\n }\n }\n else\n {\n $image = base_url('public/images/no_image.png');\n }\n\n return \"<a href='$image' class='fancybox thumbnail'><img src='$image' width='100px' alt=''/></a>\";\n }", "public function getTypeImage(){\n return $this->typeImage; \n }", "function stylish_cover_image( $post, $args ) {\n\twp_nonce_field( $args['id'], $args['id'] . '_nonce' );\n\t\n\t/*\n\t * Use get_post_meta() to retrieve an existing value\n\t * from the database and use the value for the form.\n\t */\n\t$value = get_post_meta( $post->ID, '_' . $args['id'], true );\n\t\n\techo '<p class=\"hide-if-no-js preview-cover-image\">';\n\tif( ! empty( $value ) ) {\n\t\techo wp_get_attachment_image( intval( $value ), 'stylish-preview-cover' );\n\t}\n\techo '</p>';\n\t\n\techo '<p class=\"hide-if-no-js\">';\n\t\n\techo '<a ';\n\techo 'href=\"#\" ';\n\techo 'class=\"select-cover-image\" ';\n\techo 'data-uploader-title=\"' . __( 'Select Cover Image', 'stylish' ) . '\" ';\n\techo 'data-uploader-button-text=\"' . __( 'Set cover image', 'stylish' ) . '\" ';\n\techo 'data-mime-type=\"image\" ';\n\techo 'data-multiple=\"false\" ';\n\techo 'data-thumbnail=\"stylish-preview-cover\" ';\n\tif( ! empty( $value ) ) {\n\t\techo 'style=\"display: none;\" ';\n\t}\n\techo '>' . __( 'Set cover image', 'stylish' ) . '</a>';\n\t\n\techo '<a ';\n\techo 'href=\"#\" ';\n\techo 'class=\"remove-cover-image\" ';\n\tif( empty( $value ) ) {\n\t\techo 'style=\"display: none;\" ';\n\t}\n\techo '>' . __( 'Remove cover image', 'stylish' ) . '</a>';\n\t\n\techo '<input ';\n\techo 'class=\"cover-image-id\" ';\n\techo 'name=\"' . esc_attr( $args['id'] ) . '\"';\n\techo 'value=\"' . esc_attr( $value ) . '\" ';\n\techo 'type=\"hidden\" ';\n\techo '/>';\n\t\n\techo '</p>';\n}", "function default_post_custom_fields_show_custom_meta_box($post) { ?>\n <table class=\"form-table\">\n <tr>\n \t<th>\n \t\t<span>Selecione a Hero Image.</span>\n \t\t<br>\n \t\t<span>(Resolução ideal: 1920px X 400px)</span>\n \t</th>\n \t\t<td>\n\t\t\t\t<?php\n\t\t // get value of this field if it exists for this post\n\t\t $widget_image = get_post_meta($post->ID, 'widget_image'); ?>\n\t\t <ul class=\"product_gallery_list\"><?php\n\t\t\t \tif(\"\" === $widget_image[0] || NULL === $widget_image[0]) {\n\t\t\t \t\techo \"Esse post ainda não possui uma Hero Image.\";\n\t\t\t \t} else { ?>\n \t\t\t\t\t<li>\n \t\t\t\t\t\t<div class=\"product_gallery_container\">\n \t\t\t\t\t\t\t<div class=\"product_gallery_close\">\n \t\t\t\t\t\t\t\t<img src=\"<?php echo esc_url($widget_image[0]); ?>\" style=\"max-width: 150px;object-fit: cover;\">\n \t\t\t\t\t\t\t\t<span class=\"gallery-item-hover-close\">X</span>\n \t\t\t\t\t\t\t</div>\n \t\t\t\t\t\t\t<input type=\"hidden\" name=\"widget_image\" value=\"<?php echo esc_url($widget_image[0]); ?>\">\n \t\t\t\t\t\t</div>\n \t\t\t\t\t</li>\n\t\t\t <?php } ?>\n\t\t \t</ul>\n \t\t<div class=\"product_gallery_button_container\">\n \t\t\t<input id=\"product_gallery_button\" class=\"button\" type=\"button\" value=\"Adicionar Imagem\" />\n \t\t</div>\n\t\t </td>\n\t\t </tr>\n\t\t</table>\n\t<?php }", "function wp_ajax_image_editor()\n{\n}", "function TEMPLATE_the_acf_option_image( $field = null, $size = 'full' )\n{\n \n $image = get_field( $field, 'option' ); \n\n // Since the array given us doesn't include a \"full\" size in the sizes array, \n // we need to step up one to get it\n if( $size == 'full' ){\n $image = $image['url'];\n }else{\n $image = $image['sizes'][$size];\n }\n \n echo $image;\n}", "public function input_image($Str_FieldName)\n\t{\n\t\t//Get field value.\n\t\t$Str_InputValue = '';\n\t\tif (isset($this->Arr_Fields[$Str_FieldName]['value'])\n\t\t&& $this->Arr_Fields[$Str_FieldName]['value'][0])\n\t\t{\n\t\t\t$Str_InputValue = $this->Arr_Fields[$Str_FieldName]['value'][0];\n\t\t}\n\n\t\t$Str_ImageInput = '<input name=\"'.$Str_FieldName.'\" id=\"'.$Str_FieldName.'\" type=\"image\"'.$this->get_all_field_attributes_as_string($Str_FieldName).' value=\"'.$Str_InputValue.'\" />';\n\n\n\t\treturn $Str_ImageInput;\n\t}", "function zEditTexonomyField($taxonomy) {\n if (get_bloginfo('version') >= 3.5)\n wp_enqueue_media();\n else {\n wp_enqueue_style('thickbox');\n wp_enqueue_script('thickbox');\n }\n \n if ($this->zTaxonomyImageUrl( $taxonomy->term_id, NULL, TRUE ) == $this->zci_placeholder) {\n $image_url = \"\";\n $image_id = \"\";\n } else {\n $image_url = $this->zTaxonomyImageUrl( $taxonomy->term_id, NULL, TRUE );\n $image_id = $this->zTaxonomyImageID( $taxonomy->term_id );\n }\n echo '<tr class=\"form-field\">\n <th scope=\"row\" valign=\"top\"><label for=\"zci_taxonomy_image\">' . __('Image', 'categories-images') . '</label></th>\n <td><input type=\"hidden\" name=\"zci_taxonomy_image_id\" id=\"zci_taxonomy_image_id\" value=\"'.esc_attr($image_id).'\" /><img class=\"zci-taxonomy-image\" src=\"' . esc_url( $this->zTaxonomyImageUrl( $taxonomy->term_id, 'medium', TRUE ) ) . '\"/><br/><input type=\"text\" name=\"zci_taxonomy_image\" id=\"zci_taxonomy_image\" value=\"'.esc_url($image_url).'\" /><br />\n <button class=\"z_upload_image_button button\">' . __('Upload/Add image', 'categories-images') . '</button>\n <button class=\"z_remove_image_button button\">' . __('Remove image', 'categories-images') . '</button>\n </td>\n </tr>';\n }", "function generate_meta_for_acf_image($value, $post_id, $field)\n{\n $image_data = json_encode(acf_get_attachment($value));\n\n if ($post_id == 'options') {\n update_option('options_image_'. $value, maybe_serialize($image_data), true);\n } else {\n update_post_meta($post_id, 'image_' . $value, maybe_serialize($image_data));\n }\n\n return $value;\n}", "public function getFormType(){\n\t\treturn 'image';\n\t}", "public function getCMSFields(){\n $imgfield = UploadField::create('FeaturePhoto')->setTitle(\"Feature Photo\");\n // $imgfield->folderName = \"TravelAgentImages\"; \n $imgfield->getValidator()->allowedExtensions = array('jpg','jpeg','gif','png');\n\t $fields = parent::getCMSFields();\n\t $fields->insertBefore($imgfield, 'Content');\n\t return $fields;\n\t}", "function TEMPLATE_the_acf_image( $field = null, $size, $subfield = false )\n{\n global $post;\n\n $size = isset( $size ) ? $size : 'thumbnail';\n \n if( $subfield == false ){\n $image = get_field( $field, $post->ID );\n }else{\n $image = get_sub_field( $field, $post->ID );\n }\n\n // Since the array given us doesn't include a \"full\" size in the sizes array, \n // we need to step up one to get it\n if( $size == 'full' ){\n $image = $image['url'];\n }else{\n $image = $image['sizes'][$size];\n }\n \n echo $image;\n}", "function carawebs_post_images() {\n\nif(get_field('extra_images')):\n\n\twhile(has_sub_field('extra_images')):\n\n\t$attachment_id = get_sub_field('image');\n\t$size = \"carawebs_frontpage_thumbnail\"; // (thumbnail, medium, large, full or custom size)\n \t$image = wp_get_attachment_image_src( $attachment_id, $size );\n\n\t\t// url = $image[0];\n\t\t// width = $image[1];\n\t\t// height = $image[2];\n\t\t?>\n\t\t<div class=\"post_image\">\n\t\t\t<img src=\"<?php echo $image[0]; ?>\"><?php\n\t\t\tif(get_sub_field('text')): ?><div class=\"image_hover_wrap\"><?php the_sub_field('text'); ?></div>\n\t\t\t<?php\n\t\t\tendif;\n\n\t\t?></div>\n\t\t<?php\n\n\tendwhile;\n\n\tendif;\n\n\n}", "public function imageInput()\n{\n$IPBHTML = \"\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n$IPBHTML .= <<<EOF\n\n\t\t\t<tr>\n\t\t\t\t<th colspan='2'>{$this->lang->words['image']}</th>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td style='width: 40%'>\n\t\t\t\t\t<label>{$this->lang->words['upload_image']}</label>\n\t\t\t\t</td>\n\t\t\t\t<td style='width: 60%'>\n\t\t\t\t\t<input type=\"file\" name=\"upload_photo\" id='upload_photo' value=\"\" size=\"40\" />\n\t\t\t\t</td>\n\t\t\t</tr>\nEOF;\n\nreturn $IPBHTML;\n}", "public function JQ_ImagePicker() {\n $this->JS('image-picker.js');\n $this->CSS('image-picker.css');\n }", "function gwyns_imagemap_selector_enqueue_admin_scripts() {\n\twp_enqueue_script('jquery');\n\twp_enqueue_script('jquery-colorPicker', plugins_url() . '/gwyns-imagemap-selector/imagemap-creator/js/jquery.colorPicker.js');\n\twp_enqueue_media();\n\t// wp_enqueue_script('media-upload');\n\t// wp_enqueue_script('thickbox');\n?>\n<script type=\"text/javascript\">\n// Deals with calling the WordPress Media popup box\nfunction myMediaPopupHandler()\n{\n\tevent.preventDefault();\n\n\tframe = wp.media({\n\t\ttitle:\t '<?php _e('Choose', 'gwyns-imagemap-selector'); ?>',\n\t\tlibrary:\t {\t\t\t\t \n\t\t}\n\t});\n\n\tframe.on( 'toolbar:render:select', function(view) {\n\t\tview.set({\n\t\t\tselect: {\n\t\t\t\tstyle: 'primary',\n\t\t\t\ttext: '<?php _e('Choose', 'gwyns-imagemap-selector'); ?>',\n\t\t\t\tclick: function() {\n\t\t\t\t\tvar attachment = frame.state().get('selection').first();\t\t\t\t\t\t\t\t\t\tjQuery('#upload_image').val(attachment.attributes.url);\t\t\t\t\t\t\t\t\t\t\tframe.close();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t});\n \n\tframe.setState('library').open();\n \nreturn false;\n}\n</script>\n<?php\n}", "function imagepicker_settings_page($op = NULL) {\n drupal_add_css(drupal_get_path('module', 'imagepicker') .'/imagepicker.css');\n $content = drupal_get_form('imagepicker_settings_form');\n return $content;\n}", "function wp_media_insert_url_form($default_view = 'image')\n{\n}", "function jet_engine_custom_cb_render_image( $post_id = 0, $field = 'thumbnail', $size = 100 ) {\n\n\t$size = absint( $size );\n\n\tif ( ! $size ) {\n\t\t$size = 100;\n\t}\n\n\tif ( 'thumbnail' === $field ) {\n\t\tif ( has_post_thumbnail( $post_id ) ) {\n\t\t\treturn get_the_post_thumbnail( $post_id, array( $size, $size ) );\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t} else {\n\t\t$value = get_post_meta( $post_id, $field, true );\n\n\t\tif ( $value ) {\n\t\t\treturn wp_get_attachment_image( $value, array( $size, $size ) );\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\n\t}\n\n}", "function ayecode_admin_media_scripts()\n{\n ?>\n <script>\n jQuery(document).ready(function($) {\n $(document).on('click', '.avatar-image-upload', function(e) {\n e.preventDefault();\n var $button = $(this);\n var file_frame = wp.media.frames.file_frame = wp.media({\n title: 'Select or Upload an Custom Avatar',\n library: {\n type: 'image' // mime type\n },\n button: {\n text: 'Select Avatar'\n },\n multiple: false\n });\n file_frame.on('select', function() {\n var attachment = file_frame.state().get('selection').first().toJSON();\n $button.siblings('#ayecode-custom-avatar').val(attachment.sizes.thumbnail.url);\n $button.siblings('.custom-avatar-preview').attr('src', attachment.sizes.thumbnail.url);\n });\n file_frame.open();\n });\n });\n </script>\n <?php\n}", "private function wp_media_uploader( $value ) {\n\t\t$image_stored = isset($this->_saved_options[ $value['id'] ]) ? $this->_saved_options[ $value['id'] ]: null;\n\t\t$this->form_element_start( $value ); \n\t\t// Save Post ID and create function to return first attachment to the post.\n\t\t$id= $value['id'];\n\t\t$post_ID = $this->create_empty_post($value);\n\t\t$button_value = 'Select an Image';\n\t\t?>\n\t\t<div>\n\t\t\t<input type=\"hidden\" option=\"<?php echo $post_ID; ?>\" name=\"<?php echo $id; ?>\" class=\"upload_input\" value=\"<?php echo $image_stored; ?>\"/>\n\t\t\t<div class='upload-image' id='holder-<?php echo $post_ID; ?>' nonce='<?php echo wp_create_nonce( \"set_post_thumbnail-$post_ID\" ); ?>'>\n\t\t\t\t<?php \n\t\t\t\tif( isset( $image_stored ) && false != $image_stored ) {\n\t\t\t\t\t$temp_image = $this->get_upload_image_html( $image_stored );\n\t\t\t\t\tif( false != $temp_image ) {\n\t\t\t\t\t\t$button_value = 'Remove';\n\t\t\t\t\t\techo $temp_image;\n\t\t\t\t\t}\n\t\t\t\t} ?>\n\t\t\t</div>\n\t\t\t<span class=\"submit\"><input name=\"save\" type=\"button\" value=\"<?php echo $button_value;?>\" data=\"<?php echo $value['name']; ?>\" class=\"tk_image_upload button upload_save\" id=\"tkbtn-<?php echo $post_ID; ?>\" rel=\"<?php echo $post_ID; ?>\"/></span>\n\t\t</div>\n\t\t<?php\t\n\t\t$this->form_element_end( $value );\t\n\t}", "public function getCMSFields() {\n $imgfield = UploadField::create('DefaultPhoto')->setTitle(\"Default Cover Photo (Used on individual resort if feature photo is empty)\");\n // $imgfield->folderName = \"HolderPage\"; \n $imgfield->getValidator()->allowedExtensions = array('jpg','jpeg','gif','png');\n\t $fields = parent::getCMSFields();\n \t$fields->insertBefore($imgfield, 'Content');\n\t return $fields;\n }", "function image_link_input_fields($post, $url_type = '')\n{\n}", "public function getFormType() {\n return 'image';\n }", "function __construct()\n\t{\n\t\t// vars\n\t\t$this->name = 'image_select';\n\t\t$this->label = __('Image Select');\n\t\t$this->category = __(\"Choice\",'acf');\n\t\t$this->defaults = array(\n\t\t\t'choices'\t\t\t=>\tarray(),\n\t\t\t'default_value'\t\t=>\t'',\n\t\t\t'multiple' => 0,\n\t\t\t'image_path'\t\t=>\tget_template_directory_uri() . '/images/',\n\t\t\t'image_extension' => 'png',\n\t\t);\n\t\t\n\t\t// settings\n\t\t$this->settings = array(\n\t\t\t'path'\t\t\t\t=> apply_filters('acf/helpers/get_path', __FILE__),\n\t\t\t'dir'\t\t\t\t=> apply_filters('acf/helpers/get_dir', __FILE__),\n\t\t\t'version'=> '1.0.0'\n\t\t);\n\t\t\n\t\t// do not delete!\n \tparent::__construct();\n \n\t}", "function jig_image_attachment_fields_to_edit($form_fields, $post){\r\n\t\t\tif($this->settings['custom_link_feature'] === 'enable' && function_exists('get_current_screen')){\r\n\t\t\t\t$screen = get_current_screen();\r\n\t\t\t\tif(!empty($screen) && $screen->base == 'post' && $screen->id == 'attachment' && $screen->post_type == 'attachment'){\r\n\t\t\t\t\techo '<style type=\"text/css\">\r\n\t\t\t\t\t\t\t.compat-attachment-fields,\r\n\t\t\t\t\t\t\t.compat-field-jig_image_link input{\r\n\t\t\t\t\t\t\t\twidth:100%;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t.compat-field-jig_image_link th,\r\n\t\t\t\t\t\t\t.compat-field-jig_image_link_target th,\r\n\t\t\t\t\t\t\t.compat-field-jig_custom_class th{\r\n\t\t\t\t\t\t\t\tvertical-align: top;\r\n\t\t\t\t\t\t\t\tmax-width: 30px;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t</style>';\r\n\t\t\t\t}\r\n\t\t\t\t$form_fields[\"jig_image_link\"] = array(\r\n\t\t\t\t\t\"label\" => __('JIG Link', 'jig_td'),\r\n\t\t\t\t\t\"input\" => \"text\",\r\n\t\t\t\t\t\"value\" => get_post_meta($post->ID, \"_jig_image_link\", true),\r\n\t\t\t\t\t\"helps\" => __('Use this with Justified Image Grid to point the image link to a custom URL', 'jig_td'),\r\n\t\t\t\t);\r\n\t\t\t\t$form_fields[\"jig_image_link_target\"] = array(\r\n\t\t\t\t\t\"label\" => __('JIG Target', 'jig_td'),\r\n\t\t\t\t\t\"input\" => \"html\",\r\n\t\t\t\t\t\"html\" => \"<select name='attachments[{$post->ID}][jig_image_link_target]'>\t\r\n\t\t\t\t\t\t\t<option \".selected(get_post_meta($post->ID, \"_jig_image_link_target\", true), 'default',false).\" value='default'>\".\r\n\t\t\t\t\t\t\t__('Default','jig_td').\"</option>\r\n\r\n\t\t\t\t\t\t\t<option \".selected(get_post_meta($post->ID, \"_jig_image_link_target\", true), '_blank',false).\" value='_blank'>\".\r\n\t\t\t\t\t\t\t__('New tab','jig_td').\"</option>\r\n\r\n\t\t\t\t\t\t\t<option \".selected(get_post_meta($post->ID, \"_jig_image_link_target\", true), '_self',false).\" value='_self'>\".\r\n\t\t\t\t\t\t\t__('Same tab','jig_td').\"</option>\r\n\r\n\t\t\t\t\t\t\t<option \".selected(get_post_meta($post->ID, \"_jig_image_link_target\", true), 'video',false).\" value='video'>\".\r\n\t\t\t\t\t\t\t__('Lightbox','jig_td').\"</option>\r\n\r\n\t\t\t\t\t\t\t<option \".selected(get_post_meta($post->ID, \"_jig_image_link_target\", true), 'videoplayer',false).\" value='videoplayer'>\".\r\n\t\t\t\t\t\t\t__('Video player','jig_td').\"</option>\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t</select>\"\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t\tif($this->settings['image_custom_classes'] === 'enable'){\r\n\t\t\t\t$form_fields[\"jig_custom_class\"] = array(\r\n\t\t\t\t\t\"label\" => __('JIG Class', 'jig_td'),\r\n\t\t\t\t\t\"input\" => \"text\",\r\n\t\t\t\t\t\"value\" => get_post_meta($post->ID, \"_jig_custom_class\", true)\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t\treturn $form_fields;\r\n\t\t}", "public function getFieldTypeIdentifier(): string\n {\n return 'enhancedimage';\n }", "function jma_gbs_image_input_box()\n{\n $cpts = $screens = array();\n if (function_exists('jma_ghb_get_cpt')) {\n $cpts = jma_ghb_get_cpt();\n }\n foreach ($cpts as $slug => $obj) {\n $screens[] = $slug;\n }\n $screens = apply_filters('jma_gbs_image_input_screens_filter', $screens);\n foreach ($screens as $screen) {\n add_meta_box(\n 'jma_gbs_image_input_section',\n __('<span style=\"color:red\">Theme Modifications - Page Display Options</span>', 'jma_textdomain'),\n 'jma_gbs_page_options',\n $screen,\n 'side'\n );\n }\n}", "public static function field_hero_takeawaypage(){\n $yes_hero_takeawaypage = esc_attr(get_option('yes_hero_takeawaypage'));\n $add_hero_takeawaypage = esc_attr(get_option('add_hero_takeawaypage'));\n ?>\n <p>\n <input type=\"checkbox\"\n id=\"yes_hero_takeawaypage\"\n name=\"yes_hero_takeawaypage\"\n value=\"1\"\n <?php checked(1, $yes_hero_takeawaypage, true) ?>\n />\n <span class=\"info\">\n Ajouter l'image comme d'arrière plan\n </span>\n </p>\n <p class=\"height-space\">\n <input type=\"file\"\n id=\"add_hero_takeawaypage\"\n name=\"add_hero_takeawaypage\"\n value=\"<?php echo get_option('add_hero_takeawaypage'); ?>\"\n />\n </p>\n <p>\n <img src=\"<?php echo get_option('add_hero_takeawaypage'); ?>\"\n class=\"img-hero\"\n alt=\"\"\n />\n </p>\n <?php\n }", "public function image ($path = null, $options = [])\n\t\t{\n\t\t\t/** @var boolean $fileLoaded - файл уже загружен */\n\t\t\t$fileLoaded = ArrayHelper::remove($options, 'fileLoaded', false);\n\t\t\t/** @var text $removeText - текст для кнопки \"Remove\" */\n\t\t\t$removeText = ArrayHelper::remove($options, 'removeText', 'Remove');\n\t\t\t/** @var text $removeKey - текст для кнопки \"Remove\" */\n\t\t\t$removeKey = ArrayHelper::remove($options, 'removeKey', 0);\n\t\t\t/** @var text $removeKey - текст для кнопки \"Remove\" */\n\t\t\t$deleteUrl = ArrayHelper::remove($options, 'deleteUrl', '');\n\n\t\t\t$options = array_merge($this->inputOptions, $options);\n\t\t\t$this->adjustLabelFor($options);\n\n\t\t\t$this->parts[ '{input}' ] = Html::tag('div',\n\t\t\t\tHtml::tag('div',\n\t\t\t\t\tHtml::tag('div',\n\t\t\t\t\t\t$path ? Html::img($path . '?' . time()) : '',\n\t\t\t\t\t\t[ 'class' => 'fileinput-preview thumbnail', 'data-trigger' => 'fileinput' ]\n\t\t\t\t\t)\n\t\t\t\t\t. Html::tag('div',\n\t\t\t\t\t\tHtml::tag('div',\n\t\t\t\t\t\t\tHtml::tag('span', Yii::tr('Select image'), [ 'class' => 'fileinput-new' ])\n\t\t\t\t\t\t\t. Html::tag('span', Yii::tr('Change'), [ 'class' => 'fileinput-exists' ])\n\t\t\t\t\t\t\t. Html::activeFileInput($this->model, $this->attribute),\n\t\t\t\t\t\t\t[ 'class' => 'btn btn-default btn-file' ]\n\t\t\t\t\t\t)\n\t\t\t\t\t\t. Html::a(Yii::tr($removeText), '#', [\n\t\t\t\t\t\t\t'class' => 'btn btn-default fileinput-exists delete-loadedfile-ajax',\n\t\t\t\t\t\t\t'data-dismiss' => 'fileinput',\n\t\t\t\t\t\t\t'data-delete-key' => $removeKey,\n\t\t\t\t\t\t\t'data-delete-url' => $deleteUrl,\n\t\t\t\t\t\t])\n\t\t\t\t\t),\n\t\t\t\t\t[\n\t\t\t\t\t\t'class' => 'fileinput' . ( $fileLoaded ? ' fileinput-exists' : ' fileinput-new' ),\n\t\t\t\t\t\t'data-provides' => 'fileinput'\n\t\t\t\t\t]\n\t\t\t\t),\n\t\t\t\t[ 'class' => 'image' ]\n\t\t\t);\n\t\t\t$this->enableLabel = false;\n\n\t\t\treturn $this;\n\t\t}", "public function dataImageUrlField($value) {\n return $this->setProperty('dataImageUrlField', $value);\n }", "function image_switch($image, $field, $maxwidth=400, $maxheight=400){\n\t\t$html = '';\n\t\t$field = Sanitize::sanitize_html_string($field);\n\t\tif( $image && file_exists($image) )\n\t\t\t$i = true;\n\t\tif( $i )\n\t\t\t$html .= \"<div id='$field-cur'><img style='max-width:\".$maxwidth.\"px; max-height:\".$maxheight.\"px;' src='/$image' /><br><br><a class='subalert' href='#' onClick=\\\"$('$field-cur').style.display='none';$('$field-new').style.display='block';$('$field').value='';return false;\\\">Change</a></div>\";\n\t\t$html .= \"<div id='$field-new' style='display:\" . ($i?'none':'block') . \"'><input type='file' name='$field' id='$field-file' />\";\n\t\tif( $i )\n\t\t\t$html .= \"<br><br><a class='subalert' href='#' onClick=\\\"$('$field-new').style.display='none';$('$field-cur').style.display='block';$('$field').value=$('$field').defaultValue;return false;\\\">Cancel</a>\";\n\t\t$html .= \"</div>\";\n\t\t$html .= \"<input type='hidden' name='$field' id='$field' value='$image' />\";\n\t\treturn $html;\n\t}", "public function addImageFields()\n\t{\n\t\tforeach(func_get_args() as $argument) $this->add(new SpoonImageField((string) $argument));\n\t}", "public function itg_save_field_image($field_name, $inputs, &$node) {\n // Assign fid to field.\n if ($inputs[$node->language][0]['fid'] > 0) {\n $node->{$field_name}[$node->language][0]['fid'] = $inputs[$node->language][0]['fid'];\n }\n // Assign alternative text.\n if ($inputs[$node->language][0]['alt'] != '') {\n $node->{$field_name}[$node->language][0]['alt'] = $inputs[$node->language][0]['alt'];\n }\n // Assign title text.\n if ($inputs[$node->language][0]['title'] != '') {\n $node->{$field_name}[$node->language][0]['title'] = $inputs[$node->language][0]['title'];\n }\n // Assign display mode.\n if ($inputs[$node->language][0]['display'] != '') {\n $node->{$field_name}[$node->language][0]['display'] = $inputs[$node->language][0]['display'];\n } \n }", "function ministry_taxonomy_image( $q_obj = null ) {\n $q_obj = $q_obj === null ? get_queried_object() : $q_obj;\n if(get_field('ministry_group_image', $q_obj->taxonomy . '_' . $q_obj->term_id)) {\n return get_field('ministry_group_image', $q_obj->taxonomy . '_' . $q_obj->term_id)['url'] ? get_field('ministry_group_image', $q_obj->taxonomy . '_' . $q_obj->term_id)['url'] : get_field('ministry_featured_image', 'options')['url'];\n } else {\n return get_field('ministry_featured_image', 'options') ? get_field('ministry_featured_image', 'options')['url'] : get_field('default_featured_image', 'options')['url'];\n }\n }", "function df_gallery_image_select($id, $value) {\r\n\tglobal $post_id,$post;\r\n\tif(!$post_id) {\r\n\t\t$post_id = $post->ID;\r\n\t}\r\n\t\r\n\t?>\r\n\t<div id=\"df_images_container\">\r\n\t\t<ul class=\"df_gallery_images\">\r\n\t\t\t<?php\r\n\t\t\t\tif ( $value ) {\r\n\t\t\t\t\t$product_image_gallery = $value;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Backwards compat\r\n\t\t\t\t\t$attachment_ids = get_posts( 'post_parent=' . $post_id . '&numberposts=-1&post_type=attachment&orderby=menu_order&order=ASC&post_mime_type=image&fields=ids&meta_value=0' );\r\n\t\t\t\t\t$attachment_ids = array_diff( $attachment_ids, array( get_post_thumbnail_id() ) );\r\n\t\t\t\t\t$product_image_gallery = implode( ',', $attachment_ids );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$attachments = array_filter( explode( ',', $product_image_gallery ) );\r\n\r\n\t\t\t\tif ( $attachments )\r\n\t\t\t\t\tforeach ( $attachments as $attachment_id ) {\r\n\t\t\t\t\t\techo '<li class=\"image\" data-attachment_id=\"' . $attachment_id . '\">\r\n\t\t\t\t\t\t\t' . wp_get_attachment_image( $attachment_id, array(80,80) ) . '\r\n\t\t\t\t\t\t\t<ul class=\"actions\">\r\n\t\t\t\t\t\t\t\t<li><a href=\"#\" class=\"delete\" title=\"' . __( 'Delete image', THEME_NAME ) . '\">' . __( 'Delete', THEME_NAME ) . '</a></li>\r\n\t\t\t\t\t\t\t</ul>\r\n\t\t\t\t\t\t</li>';\r\n\t\t\t\t\t}\r\n\t\t\t?>\r\n\t\t</ul>\r\n\r\n\t\t<input type=\"hidden\" id=\"<?php echo $id;?>\" name=\"<?php echo $id;?>\" value=\"<?php echo esc_attr( $product_image_gallery ); ?>\" />\r\n\r\n\t</div>\r\n\t<p class=\"add_product_images hide-if-no-js\">\r\n\t\t<a href=\"#\"><?php _e( 'Add images', THEME_NAME ); ?></a>\r\n\t</p>\r\n\t<script type=\"text/javascript\">\r\n\t\tjQuery(document).ready(function($){\r\n\r\n\t\t\t// Uploading files\r\n\t\t\tvar product_gallery_frame;\r\n\t\t\tvar $image_gallery_ids = $('#<?php echo $id;?>');\r\n\t\t\tvar $df_gallery_images = $('#df_images_container ul.df_gallery_images');\r\n\r\n\t\t\tjQuery('.add_product_images').on( 'click', 'a', function( event ) {\r\n\r\n\t\t\t\tvar $el = $(this);\r\n\t\t\t\tvar attachment_ids = $image_gallery_ids.val();\r\n\r\n\t\t\t\tevent.preventDefault();\r\n\r\n\t\t\t\t// If the media frame already exists, reopen it.\r\n\t\t\t\tif ( product_gallery_frame ) {\r\n\t\t\t\t\tproduct_gallery_frame.open();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Create the media frame.\r\n\t\t\t\tproduct_gallery_frame = wp.media.frames.downloadable_file = wp.media({\r\n\t\t\t\t\t// Set the title of the modal.\r\n\t\t\t\t\ttitle: '<?php _e( 'Add Images to Product Gallery', THEME_NAME ); ?>',\r\n\t\t\t\t\tbutton: {\r\n\t\t\t\t\t\ttext: '<?php _e( 'Add to gallery', THEME_NAME ); ?>',\r\n\t\t\t\t\t},\r\n\t\t\t\t\tmultiple: true\r\n\t\t\t\t});\r\n\r\n\t\t\t\t// When an image is selected, run a callback.\r\n\t\t\t\tproduct_gallery_frame.on( 'select', function() {\r\n\r\n\t\t\t\t\tvar selection = product_gallery_frame.state().get('selection');\r\n\r\n\t\t\t\t\tselection.map( function( attachment ) {\r\n\r\n\t\t\t\t\t\tattachment = attachment.toJSON();\r\n\r\n\t\t\t\t\t\tif ( attachment.id ) {\r\n\t\t\t\t\t\t\tattachment_ids = attachment_ids ? attachment_ids + \",\" + attachment.id : attachment.id;\r\n\r\n\t\t\t\t\t\t\t$df_gallery_images.append('\\\r\n\t\t\t\t\t\t\t\t<li class=\"image\" data-attachment_id=\"' + attachment.id + '\">\\\r\n\t\t\t\t\t\t\t\t\t<img src=\"' + attachment.url + '\" width=\"80\" height=\"80\"/>\\\r\n\t\t\t\t\t\t\t\t\t<ul class=\"actions\">\\\r\n\t\t\t\t\t\t\t\t\t\t<li><a href=\"#\" class=\"delete\" title=\"<?php _e( 'Delete image', THEME_NAME ); ?>\"><?php _e( 'Delete', THEME_NAME ); ?></a></li>\\\r\n\t\t\t\t\t\t\t\t\t</ul>\\\r\n\t\t\t\t\t\t\t\t</li>');\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t} );\r\n\r\n\t\t\t\t\t$image_gallery_ids.val( attachment_ids );\r\n\t\t\t\t});\r\n\r\n\t\t\t\t// Finally, open the modal.\r\n\t\t\t\tproduct_gallery_frame.open();\r\n\t\t\t});\r\n\r\n\t\t\t// Image ordering\r\n\t\t\t$df_gallery_images.sortable({\r\n\t\t\t\titems: 'li.image',\r\n\t\t\t\tcursor: 'move',\r\n\t\t\t\tscrollSensitivity:40,\r\n\t\t\t\tforcePlaceholderSize: true,\r\n\t\t\t\tforceHelperSize: false,\r\n\t\t\t\thelper: 'clone',\r\n\t\t\t\topacity: 0.65,\r\n\t\t\t\tplaceholder: 'wc-metabox-sortable-placeholder',\r\n\t\t\t\tstart:function(event,ui){\r\n\t\t\t\t\tui.item.css('background-color','#f6f6f6');\r\n\t\t\t\t},\r\n\t\t\t\tstop:function(event,ui){\r\n\t\t\t\t\tui.item.removeAttr('style');\r\n\t\t\t\t},\r\n\t\t\t\tupdate: function(event, ui) {\r\n\t\t\t\t\tvar attachment_ids = '';\r\n\r\n\t\t\t\t\t$('#df_images_container ul li.image').css('cursor','default').each(function() {\r\n\t\t\t\t\t\tvar attachment_id = jQuery(this).attr( 'data-attachment_id' );\r\n\t\t\t\t\t\tattachment_ids = attachment_ids + attachment_id + ',';\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t\t$image_gallery_ids.val( attachment_ids );\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\t// Remove images\r\n\t\t\t$('#df_images_container').on( 'click', 'a.delete', function() {\r\n\r\n\t\t\t\t$(this).closest('li.image').remove();\r\n\r\n\t\t\t\tvar attachment_ids = '';\r\n\r\n\t\t\t\t$('#df_images_container ul li.image').css('cursor','default').each(function() {\r\n\t\t\t\t\tvar attachment_id = jQuery(this).attr( 'data-attachment_id' );\r\n\t\t\t\t\tattachment_ids = attachment_ids + attachment_id + ',';\r\n\t\t\t\t});\r\n\r\n\t\t\t\t$image_gallery_ids.val( attachment_ids );\r\n\r\n\t\t\t\treturn false;\r\n\t\t\t} );\r\n\r\n\t\t});\r\n\t</script>\r\n\t<?php\r\n\r\n}", "function renderFileupload($name,$in_value){\n echo(\"\n <script>\n $('#stepForm')\n .attr( 'enctype', 'multipart/form-data')\n .attr( 'encoding', 'multipart/form-data');\n </script>\n \");\n\n echo(\"\n <label for='\".$name.\"' class='col-sm-4'>$name</label>\");\n \n if($in_value != NULL){\n echo(\"\n <img src='\".$in_value.\"' width='350px' />\n \");\n }\n\n echo(\"\n <span class='col-sm-4'></span>\n <input type='file' id='\".$name.\"' name='\".$name.\"' value=''>\n \");\n\n echo(\"\");\n \n \n}", "function save_field_image($post_id, $field, $old, $new) {\n\t\t$this->save_field_file($post_id, $field, $old, $new);\n\t}", "function logo_image_meta_box() {\n global $post;\n \n $image_src = '';\n \n $image_id = get_post_meta($post->ID, '_image_id', true);\n $image_src = wp_get_attachment_url($image_id);\n?>\n\t\t<img id=\"logo_image\" src=\"<?php\n echo $image_src;\n?>\" style=\"max-width:100%;\" />\n\t\t<input type=\"hidden\" name=\"upload_image_id\" id=\"upload_image_id\" value=\"<?php\n echo $image_id; ?>\" />\n\t\t<p>\n <?php //echo gettype($post->ID) ;?>\n\t\t\t<a title=\"Set logo image\" href=\"#\" id=\"set-logo-image\">Set logo image</a>\n\t\t\t<a title=\"Remove logo image\" href=\"#\" id=\"remove-logo-image\"\n\t\t\tstyle=\"<?php\n echo (!$image_id ? 'display:none;' : ''); ?>\">Remove logo image</a>\n\t\t</p>\n\n\t\t<script type=\"text/javascript\">\n\t\t\tjQuery(document).ready(function($) {\n\n\t\t\t// save the send_to_editor handler function\n\t\t\twindow.send_to_editor_default = window.send_to_editor;\n\n\t\t\t$('#set-logo-image').click(function(){\n\n\t\t\t\t// replace the default send_to_editor handler function with our own\n\t\t\t\twindow.send_to_editor = window.attach_image;\n\t\t\t\ttb_show('', 'media-upload.php?post_id=<?php\n echo $post->ID\n?>&amp;type=image&amp;TB_iframe=true');\n\t\t\t\treturn false;\n\t\t\t});\n\n\t\t\t$('#remove-logo-image').click(function() {\n\t\t\t\t$('#upload_image_id').val('');\n\t\t\t\t$('img').attr('src', '');\n\t\t\t\t$(this).hide();\n\n\t\t\t\treturn false;\n\t\t\t});\n\n // handler function which is invoked after the user selects an image from the gallery popup.\n // this function displays the image and sets the id so it can be persisted to the post meta\n window.attach_image = function(html) {\n\n // turn the returned image html into a hidden image element so we can easily pull the relevant attributes we need\n $('body').append('<div id=\"temp_image\">' + html + '</div>');\n\n var img = $('#temp_image').find('img');\n\n imgurl = img.attr('src');\n imgclass = img.attr('class');\n imgid = parseInt(imgclass.replace(/\\D/g, ''), 10);\n\n $('#upload_image_id').val(imgid);\n $('#remove-logo-image').show();\n\n $('img#logo_image').attr('src', imgurl);\n try{tb_remove();}catch(e){};\n $('#temp_image').remove();\n\n // restore the send_to_editor handler function\n window.send_to_editor = window.send_to_editor_default;\n }\n });\n</script>\n<?php\n}", "function render_field( $field ) {\n\t\tif ( !isset( $this->json_content['icons'] ) ){\n\t\t\t_e('No icons found');\n\t\t\treturn;\n\t\t}\n\n\t\t// icons SELECT input\n\t\techo '<select name=\"'. $field['name'] .'\" id=\"'. $field['name'] .'\" class=\"acf-svgiconpicker\">';\n\t\techo '<option value=\"\">'. __('None').'</option>';\n\t\tforeach ( $this->json_content['icons'] as $icon ) {\n\t\t\t$icon_full = $this->json_content['prefix'] . $icon['name'];\n\t\t\techo '<option value=\"'. $icon_full .'\" '. selected( $field['value'], $icon_full, false ) .'>'. $icon['name'] .'</option>';\n\t\t}\n\t\techo '</select>';\n\t}", "function philosophy_taxonomy_language_featured_image_by_csf($options){\n\n\t$options[] = array(\n\t\t 'id' => 'language_featured_image',\n\t\t 'taxonomy' => 'language', // or array( 'category', 'post_tag' )\n\n\t\t // begin: fields\n\t\t 'fields' => array(\n\n\t\t // begin: a field\n\t\t array(\n\t\t 'id' => 'featured_image',\n\t\t 'type' => 'image',\n\t\t 'title' => __('Add Featured Image','philosophy'),\n\t\t ),\n\t\t \n\n\t\t ), \n\t\t);\n\n\treturn $options;\n\n}", "function ministry_featured_image( $id = null ) {\n if(has_post_thumbnail($id)) {\n return get_the_post_thumbnail_url($id);\n } elseif(get_field('ministry_featured_image', 'options') && get_field('ministry_featured_image', 'options')['url']) {\n return get_field('ministry_featured_image', 'options')['url'];\n } else {\n return get_field('default_featured_image', 'options')['url'];\n }\n }", "public function editProductImage($model,$image) {\n\t\t\n\t}", "public function getImage(){ }", "public function image_picker_html(){\n\t\t$dir = array_key_exists('dir', $_GET)? trim($_GET['dir']) : '';\n\t\t$dir = $this->set_dir($dir);\n\t\t$this->data['dir'] =$dir;\n\t\t\n\t\t\n\t\t$this->view->set_image_path($this->image_path);\n\t\t\n\t\treturn $this->view->html_image_selector($dir);\n\t\t\n\t}", "function load_image_to_edit($attachment_id, $mime_type, $size = 'full')\n{\n}", "function matrix_upload_image( $object, $box ){\n\t\n\twp_nonce_field( basename( __FILE__ ), 'matrix_upload_image_nonce' ); ?>\n \n <p><?php _e( \"Use this button to upload images if you do not want these images to be added into the slider / gallery\", 'matrix' ); ?></p>\n <script>\n\tjQuery(document).ready(function(){\n\t\t\t\t\n\t\t\tjQuery('.upload_slider_button').click(function() {\n\t\t\t\t tb_show('', 'media-upload.php?post_id=&type=image&amp;TB_iframe=true&amp;referer=matrix-settings');\n\t\t\t\t return false;\n\t\t\t});\n\n\t});\n\t</script>\n <input class=\"upload_slider_button\" type=\"button\" value=\"<?php _e( \"Upload Custom Images\", 'matrix' ); ?>\" />\n <p><?php _e( \"To use these images in the post, copy and paste the 'Link URL' of each image into the corresponding field in WordPress's media uploader.\", 'matrix' ); ?></p>\n\n<?php }", "function fusion_element_image() {\n\n\tglobal $fusion_settings;\n\n\tfusion_builder_map(\n\t\tfusion_builder_frontend_data(\n\t\t\t'FusionSC_Imageframe',\n\t\t\t[\n\t\t\t\t'name' => esc_attr__( 'Image', 'fusion-builder' ),\n\t\t\t\t'shortcode' => 'fusion_imageframe',\n\t\t\t\t'icon' => 'fusiona-image',\n\t\t\t\t'preview' => FUSION_BUILDER_PLUGIN_DIR . 'inc/templates/previews/fusion-image-frame-preview.php',\n\t\t\t\t'preview_id' => 'fusion-builder-block-module-image-frame-preview-template',\n\t\t\t\t'help_url' => 'https://theme-fusion.com/documentation/fusion-builder/elements/image-element/',\n\t\t\t\t'params' => [\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'upload',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Image', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Upload an image to display.', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'element_content',\n\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t\t'dynamic_data' => true,\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Image ID', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Image ID from Media Library.', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'image_id',\n\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t\t'hidden' => true,\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Image Max Width', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Set the maximum width the image should take up. Enter value including any valid CSS unit, ex: 200px. Leave empty to use full image width.', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'max_width',\n\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'radio_button_set',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Style Type', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Select the style type.', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'style_type',\n\t\t\t\t\t\t'value' => [\n\t\t\t\t\t\t\t'' => esc_attr__( 'Default', 'fusion-builder' ),\n\t\t\t\t\t\t\t'none' => esc_attr__( 'None', 'fusion-builder' ),\n\t\t\t\t\t\t\t'glow' => esc_attr__( 'Glow', 'fusion-builder' ),\n\t\t\t\t\t\t\t'dropshadow' => esc_attr__( 'Drop Shadow', 'fusion-builder' ),\n\t\t\t\t\t\t\t'bottomshadow' => esc_attr__( 'Bottom Shadow', 'fusion-builder' ),\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'range',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Glow / Drop Shadow Blur', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Choose the amount of blur added to glow or drop shadow effect. In pixels.', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'blur',\n\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t\t'min' => '0',\n\t\t\t\t\t\t'max' => '50',\n\t\t\t\t\t\t'step' => '1',\n\t\t\t\t\t\t'default' => $fusion_settings->get( 'imageframe_blur' ),\n\t\t\t\t\t\t'dependency' => [\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'element' => 'style_type',\n\t\t\t\t\t\t\t\t'value' => 'none',\n\t\t\t\t\t\t\t\t'operator' => '!=',\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'element' => 'style_type',\n\t\t\t\t\t\t\t\t'value' => 'bottomshadow',\n\t\t\t\t\t\t\t\t'operator' => '!=',\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'colorpickeralpha',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Style Color', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Controls the style color for all style types except border. Hex colors will use a subtle auto added alpha level to produce a nice effect.', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'stylecolor',\n\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t\t'default' => $fusion_settings->get( 'imgframe_style_color' ),\n\t\t\t\t\t\t'dependency' => [\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'element' => 'style_type',\n\t\t\t\t\t\t\t\t'value' => 'none',\n\t\t\t\t\t\t\t\t'operator' => '!=',\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'radio_button_set',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Hover Type', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Select the hover effect type.', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'hover_type',\n\t\t\t\t\t\t'value' => [\n\t\t\t\t\t\t\t'none' => esc_attr__( 'None', 'fusion-builder' ),\n\t\t\t\t\t\t\t'zoomin' => esc_attr__( 'Zoom In', 'fusion-builder' ),\n\t\t\t\t\t\t\t'zoomout' => esc_attr__( 'Zoom Out', 'fusion-builder' ),\n\t\t\t\t\t\t\t'liftup' => esc_attr__( 'Lift Up', 'fusion-builder' ),\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'default' => 'none',\n\t\t\t\t\t\t'preview' => [\n\t\t\t\t\t\t\t'selector' => '.fusion-imageframe',\n\t\t\t\t\t\t\t'type' => 'class',\n\t\t\t\t\t\t\t'toggle' => 'hover',\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'range',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Border Size', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'In pixels.', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'bordersize',\n\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t\t'min' => '0',\n\t\t\t\t\t\t'max' => '50',\n\t\t\t\t\t\t'step' => '1',\n\t\t\t\t\t\t'default' => $fusion_settings->get( 'imageframe_border_size' ),\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'colorpickeralpha',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Border Color', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Controls the border color. ', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'bordercolor',\n\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t\t'default' => $fusion_settings->get( 'imgframe_border_color' ),\n\t\t\t\t\t\t'dependency' => [\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'element' => 'bordersize',\n\t\t\t\t\t\t\t\t'value' => '0',\n\t\t\t\t\t\t\t\t'operator' => '!=',\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Border Radius', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Controls the image border radius. In pixels (px), ex: 1px, or \"round\". ', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'borderradius',\n\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t\t'dependency' => [\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'element' => 'style_type',\n\t\t\t\t\t\t\t\t'value' => 'bottomshadow',\n\t\t\t\t\t\t\t\t'operator' => '!=',\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'radio_button_set',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Align', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Choose how to align the image.', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'align',\n\t\t\t\t\t\t'value' => [\n\t\t\t\t\t\t\t'none' => esc_attr__( 'Text Flow', 'fusion-builder' ),\n\t\t\t\t\t\t\t'left' => esc_attr__( 'Left', 'fusion-builder' ),\n\t\t\t\t\t\t\t'right' => esc_attr__( 'Right', 'fusion-builder' ),\n\t\t\t\t\t\t\t'center' => esc_attr__( 'Center', 'fusion-builder' ),\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'default' => 'none',\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'radio_button_set',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Image lightbox', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Show image in lightbox. Lightbox must be enabled in Theme Options or the image will open up in the same tab by itself.', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'lightbox',\n\t\t\t\t\t\t'value' => [\n\t\t\t\t\t\t\t'yes' => esc_attr__( 'Yes', 'fusion-builder' ),\n\t\t\t\t\t\t\t'no' => esc_attr__( 'No', 'fusion-builder' ),\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'default' => 'no',\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Gallery ID', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Set a name for the lightbox gallery this image should belong to.', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'gallery_id',\n\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t\t'dependency' => [\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'element' => 'lightbox',\n\t\t\t\t\t\t\t\t'value' => 'no',\n\t\t\t\t\t\t\t\t'operator' => '!=',\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'upload',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Lightbox Image', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Upload an image that will show up in the lightbox.', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'lightbox_image',\n\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t\t'dependency' => [\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'element' => 'lightbox',\n\t\t\t\t\t\t\t\t'value' => 'no',\n\t\t\t\t\t\t\t\t'operator' => '!=',\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Lightbox Image ID', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Lightbox Image ID from Media Library.', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'lightbox_image_id',\n\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t\t'hidden' => true,\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Image Alt Text', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'The alt attribute provides alternative information if an image cannot be viewed.', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'alt',\n\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t\t'dynamic_data' => true,\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'link_selector',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Picture Link URL', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Add the URL the picture will link to, ex: http://example.com.', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'link',\n\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t\t'dynamic_data' => true,\n\t\t\t\t\t\t'dependency' => [\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'element' => 'lightbox',\n\t\t\t\t\t\t\t\t'value' => 'yes',\n\t\t\t\t\t\t\t\t'operator' => '!=',\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'radio_button_set',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Link Target', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => __( '_self = open in same window<br />_blank = open in new window.', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'linktarget',\n\t\t\t\t\t\t'value' => [\n\t\t\t\t\t\t\t'_self' => esc_attr__( '_self', 'fusion-builder' ),\n\t\t\t\t\t\t\t'_blank' => esc_attr__( '_blank', 'fusion-builder' ),\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'default' => '_self',\n\t\t\t\t\t\t'dependency' => [\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'element' => 'lightbox',\n\t\t\t\t\t\t\t\t'value' => 'yes',\n\t\t\t\t\t\t\t\t'operator' => '!=',\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'element' => 'link',\n\t\t\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t\t\t\t'operator' => '!=',\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'fusion_animation_placeholder' => [\n\t\t\t\t\t\t'preview_selector' => '.fusion-imageframe',\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'checkbox_button_set',\n\t\t\t\t\t\t'heading' => esc_attr__( 'Element Visibility', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'hide_on_mobile',\n\t\t\t\t\t\t'value' => fusion_builder_visibility_options( 'full' ),\n\t\t\t\t\t\t'default' => fusion_builder_default_visibility( 'array' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Choose to show or hide the element on small, medium or large screens. You can choose more than one at a time.', 'fusion-builder' ),\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => esc_attr__( 'CSS Class', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Add a class to the wrapping HTML element.', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'class',\n\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t\t'group' => esc_attr__( 'General', 'fusion-builder' ),\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'type' => 'textfield',\n\t\t\t\t\t\t'heading' => esc_attr__( 'CSS ID', 'fusion-builder' ),\n\t\t\t\t\t\t'description' => esc_attr__( 'Add an ID to the wrapping HTML element.', 'fusion-builder' ),\n\t\t\t\t\t\t'param_name' => 'id',\n\t\t\t\t\t\t'value' => '',\n\t\t\t\t\t\t'group' => esc_attr__( 'General', 'fusion-builder' ),\n\t\t\t\t\t],\n\t\t\t\t\t'fusion_filter_placeholder' => [\n\t\t\t\t\t\t'selector_base' => 'imageframe-cid',\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t]\n\t\t)\n\t);\n}", "function onepix_taxonomy_add_meta_field() {\n \n global $onepix_option;\n // this will add the custom meta field to the add new term page\n\t?>\n\t<div class=\"form-field\">\n <label for=\"term_meta_imgurl\"><?php _e( TAXONOMY_NAME . ' Image URL', '1pixel' ); ?></label>\n <input type=\"text\" name=\"term_meta[imgurl_term_meta]\" id=\"term_meta_imgurl\" value=\"\">\n <input type='button' data-input-id='term_meta_imgurl' id='imgurl_term_meta_button' value='Upload Image' class='button upload-media-btn' >\n <p class=\"description\"><?php _e( 'Enter the url for the image for this category','1pixel' ); ?></p>\n\t</div>\n <div class=\"form-field\">\n <label for=\"term_meta[order_term_meta]\"><?php _e(TAXONOMY_NAME . ' Display Order', '1pixel'); ?></label>\n <input type=\"text\" name=\"term_meta[order_term_meta]\" id=\"term_meta[order_term_meta]\" value=\"\">\n <p class=\"description\"><?php _e('Enter a number for the display order for this category', '1pixel'); ?></p>\n </div>\n <?php\n}", "static function inputImageInline($form_name,$id,$label,$value,$invalid,$required,$class='',$readonly=false) {\n return Template::load(\n \"webcontent/render/fields/image_inline.php\",\n array(\n \"form_name\"=>$form_name,\n \"id\"=>$id,\n \"label\"=>$label,\n \"value\"=>$value,\n \"invalid\"=>$invalid,\n \"required\"=>$required,\n \"class\"=>$class,\n \"readonly\"=>$readonly\n )\n );\n }", "public function image_box() {\n remove_meta_box('postimagediv', 'euhwc_logocomp_entry', 'side');\n add_meta_box('postimagediv', __('Logo'), 'post_thumbnail_meta_box', 'euhwc_logocomp_entry', 'normal', 'high');\n }", "public function setImage( string $file );", "function default_image()\n { \n return 'admin/images/rec2.jpg';\n }", "function pf_add_media_custom_field( $form_fields, $post ) {\n\n ob_start();\n\n $left_value = get_post_meta( $post->ID, 'pf_keypoint_left', true );\n $left_value = $left_value ? $left_value : '50';\n\n $top_value = get_post_meta( $post->ID, 'pf_keypoint_top', true );\n $top_value = $top_value ? $top_value : '50';\n\n $img = wp_get_attachment_image_src( $post->ID, 'large')[0];\n\n\n ?>\n <div class=\"pf_keypoint_wrapper\">\n <div class=\"pf_keypoint_figure\">\n <span class=\"pf_keypoint\" style=\"top:<?php echo $top_value; ?>%; left: <?php echo $left_value; ?>%;\"></span>\n <img src=\"<?php echo $img; ?>\" />\n </div>\n <label>percent left:</label>\n <input type=\"text\" class=\"pf_keypoint_left\" name=\"attachments[<?php echo $post->ID; ?>][pf_keypoint_left]\" value=\"<?php echo $left_value; ?>\" />\n <label>Percent top:</label>\n <input type=\"text\" class=\"pf_keypoint_top\" name=\"attachments[<?php echo $post->ID; ?>][pf_keypoint_top]\" value=\"<?php echo $top_value; ?>\" />\n </div>\n <?php\n $keypoint_html = ob_get_clean();\n\n // Adding the tag field\n $form_fields['pf_keypoint'] = array(\n 'label' => __( 'Keypoint:' ),\n 'input' => 'html',\n 'html' => $keypoint_html\n );\n\n return $form_fields;\n}", "public function getImageTag();", "function image_dropdown ($textfield) {\n //\n global $theme_vars;\n \n // Changed this to only display Image files. This function\n // is used in comment.php if the blog owner has img tag\n // enabled for comments. (09/08/05 - alex)\n $dir = IMAGES_DIR;\n $contents = sb_folder_listing( $dir, array( '.jpg', '.jpeg', '.gif', '.png' ) );\n \n $str = NULL;\n if ($contents) {\n if ( count( $contents ) > 0 ) {\n \n $itemArray = array();\n $item = array( 'label' => '--', 'value' => '--' );\n array_push( $itemArray, $item );\n \n for ( $i = 0; $i < count( $contents ); $i++ ) {\n $str_url = $dir.$contents[$i];\n $img_size = @getimagesize( $str_url );\n if ( $img_size == false ) {\n // Image is invalid...\n } else {\n $width = $img_size[0];\n $height = $img_size[1];\n $max_image_width = $theme_vars[ 'max_image_width' ];\n /*\n if ( $width > $max_image_width ) {\n $height_resized = round( $height * ( $max_image_width / $width ) );\n $width_resized = $max_image_width;\n }\n */\n $temp_label = $contents[$i].' - '.$width.' x '.$height;\n $temp_value = '[img='.basename($dir).'/'.$contents[$i].' popup=false]';\n $temp_string = $contents[$i];\n \n $item = array( 'label' => $temp_label, 'value' => $temp_value, 'string' => $temp_string );\n array_push( $itemArray, $item );\n }\n }\n $str = HTML_dropdown( false, 'image_list', $itemArray, false, \"ins_image_dropdown(document.getElementById('$textfield'),document.getElementById('image_list'));\" );\n }\n }\n \n return ( $str );\n }" ]
[ "0.72196347", "0.7175724", "0.70355934", "0.68821675", "0.68384457", "0.67718905", "0.6733773", "0.6715307", "0.666732", "0.65539306", "0.6539699", "0.6539385", "0.6518171", "0.6508009", "0.649963", "0.649392", "0.6428693", "0.64150685", "0.6408063", "0.64078355", "0.6391754", "0.6361357", "0.63378024", "0.63231575", "0.6268586", "0.62674284", "0.6267057", "0.6263519", "0.6244494", "0.6241427", "0.6193288", "0.6173668", "0.61689", "0.6168355", "0.61515445", "0.6131468", "0.6128921", "0.6126393", "0.61230826", "0.6116903", "0.61015946", "0.6097262", "0.6093858", "0.60897577", "0.60807866", "0.60717005", "0.6058437", "0.60473126", "0.6044383", "0.6031092", "0.60279787", "0.60053515", "0.59885746", "0.5988244", "0.5977763", "0.59698766", "0.5956337", "0.5946109", "0.5919441", "0.591739", "0.5905327", "0.5902712", "0.5899183", "0.5893841", "0.58919597", "0.5882872", "0.5882457", "0.58807284", "0.58663154", "0.58574814", "0.58461803", "0.58459526", "0.5839541", "0.5835309", "0.5834577", "0.5826787", "0.5820291", "0.58161056", "0.5815597", "0.5812658", "0.58100057", "0.57998013", "0.5793518", "0.57892597", "0.57880306", "0.5783289", "0.57818496", "0.57808185", "0.5780324", "0.5777408", "0.5771042", "0.5768845", "0.57481956", "0.5746832", "0.5731437", "0.57302505", "0.57237756", "0.5716527", "0.5714344", "0.57049793" ]
0.72539604
0
Custom field for updating Gravity Forms Popup cookie
Пользовательское поле для обновления куки Gravity Forms Popup
public function settings_update_gravityforms_popup_cookie_type(){ $link = "admin-ajax.php?action=gravityforms_popup_update_cookie"; $label = __( 'Update Cookie', 'gravityforms-popup' ); $desc = __( 'Clicking this will force all visitor to view the popup (again)', 'gravityforms-popup' ); // Display notification if( isset( $_GET['update_cookie'] ) ){ if( 'success' == $_GET['update_cookie'] ){ echo '<span style="font-weight: bold; display: block; padding-bottom: 10px; color: green; font-size: .8em; ">'; _e( 'Cookie has been updated', 'gravityforms-popup' ); echo '</span>'; } else { echo '<span style="font-weight: bold; display: block; padding-bottom: 10px; color: red; font-size: .8em;">'; _e( 'Cookie cannot be updated', 'gravityforms-popup' ); echo '</span>'; } } echo "<a href='{$link}' class='button'>{$label}</a>"; echo "<span style='display: block; padding-top: 10px; font-size: .8em;'>{$desc}</span>"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function set_cookie_value(){\n \t$settings_link \t= admin_url( \"admin.php?page=gf_settings&subview=gravityforms-popup\" );\n\n \t$timestamp = current_time( 'timestamp' );\n\n if( $this->get_plugin_setting( 'use_multisite_cookie', 0 ) > 0 ){\n $update = update_site_option( 'gravityforms_popup_cookie', 'gravityforms_popup_cookie-' . $timestamp );\n } else {\n $update = update_option( 'gravityforms_popup_cookie', 'gravityforms_popup_cookie-' . $timestamp );\n }\n\n \tif( $update ){\n \t\twp_redirect( $settings_link . \"&update_cookie=success\" );\n \t} else { \t\t\n \t\twp_redirect( $settings_link . \"&update_cookie=fail\" );\n \t}\n\n \tdie();\n }", "function custom_cf7_scripts() { ?>\n\t<script type=\"text/javascript\">\n var wpcf7Elm = document.querySelector('#popmake-1072 .wpcf7');\n wpcf7Elm.addEventListener('wpcf7submit', function (event) {\n var $form = $(event.target),\n $popup = $form.parents('.pum');\n if (!$popup.length) {\n return;\n }\n $popup.trigger('pumSetCookie');\n setTimeout(function () {\n $popup.popmake('close');\n }, 2000);\n }, false);\n\t</script><?php\n}", "public function cookie_callback()\n {\n printf(\n '<input type=\"text\" id=\"cookie\" name=\"%s[cookie]\" value=\"%s\" />',\n Config::key(),\n Config::get('cookie')\n );\n }", "function popmake_render_popup_secure_logout_meta_box() {\r\n\tglobal $post, $popmake_options;?>\r\n\t<input type=\"hidden\" name=\"popup_secure_logout_defaults_set\" value=\"true\" />\r\n\t<div id=\"popmake_popup_secure_logout_fields\" class=\"popmake_meta_table_wrap\">\r\n\t\t<table class=\"form-table\">\r\n\t\t\t<tbody>\r\n\t\t\t\t<?php do_action( 'popmake_popup_secure_logout_meta_box_fields', $post->ID );?>\r\n\t\t\t</tbody>\r\n\t\t</table>\r\n\t</div><?php\r\n}", "function get_cookies_allowed_html($language_suffix = null)\n {\n $html = '';\n ob_start();\n\n $language_suffix = null;\n $reset_acf_settings = false;\n $post_id = 'options' . $language_suffix;\n\n if (get_field('cookies_allowed_default_language_scripts', 'options')) {\n add_filter('acf/settings/current_language', [ $this, 'cookies_allowed_get_default_language' ], 100);\n $reset_acf_settings = true;\n }\n\n $highest_cookie_allowed_level = ( get_field(\n 'highest_cookie_allowed_level',\n $post_id\n ) ) ? get_field('highest_cookie_allowed_level', $post_id) : 3;\n\n if ($reset_acf_settings) {\n remove_filter(\n 'acf/settings/current_language',\n [ $this, 'cookies_allowed_get_default_language' ],\n 100\n );\n }\n\n if (class_exists('NumberFormatter')) {\n $numbertoword = new NumberFormatter(\"nl\", NumberFormatter::SPELLOUT);\n }\n\n $policy_page_url = '#';\n $previous_cookie_level = $this->get_cookies_allowed_level();\n\n $acf_cookie_modal_text = get_field('cookie_modal_text', $post_id);\n $default_cookie_modal_text = sprintf(\n __(\n '<h4>What are cookies?</h4><p>Cookies are small files that are placed by us on your computer, tablet or smartphone in order to use a website properly. Some cookies are necessary for optimal use of the website. Some cookies are extra.</p><h4>Manage your cookie settings</h4><p>Functional cookies are needed to use the website, which is why they are always on. For an optimal online experience, we recommend to enable additional cookies</p><p>More information about the different types of cookies and their effect can be found in our <a href=\"%s\">Cookie Policy</a> page.</p>',\n 'cookies-allowed'\n ),\n $policy_page_url\n );\n\n $acf_cookie_notice_text = get_field('cookie_notice_text', $post_id);\n $default_cookie_notice_text = sprintf(\n __(\n '<p> %s uses cookies to optimize your experience on this website. By using this website you automatically agree to the use of functional cookies and anonymous Analytic cookies.</p>',\n 'cookies-allowed'\n ),\n $_SERVER[\"SERVER_NAME\"]\n );\n\n $acf_highest_cookie_notice_text = get_field('highest_cookie_notice_text', $post_id);\n $default_highest_cookie_notice_text = __(\n '<p>We also use user specific analytic and marketing cookies, by clicking on \\'Allow cookies\\' you also agree to the use of these cookies. Go to <a href=\"#\" class=\"js-cookie-modal\"> Settings </a> to manage your cookies on this website.</p>',\n 'cookies-allowed'\n );\n\n ?>\n <div id=\"cookies-allowed\"\n data-page-reload=\"<?php echo get_field('cookies_allowed_reload_page', $post_id) ? 'true' : 'false'; ?>\">\n <div id=\"cookie-notice\" class=\"cookie-notice\"\n data-highest-cookie-allowed-level=\"<?php echo $highest_cookie_allowed_level ?>\">\n <div class=\"cookie-notice__container\">\n <div class=\"cookie-notice__wrapper\">\n <div class=\"cookie-notice__content\">\n <?php // echo $this->get_cookies_allowed_level();\n ?>\n <?php if ($this->get_cookies_allowed_level() < 1) : ?>\n <?php echo empty($acf_cookie_notice_text) ? $default_cookie_notice_text : $acf_cookie_notice_text; ?>\n <?php else : ?>\n <?php echo empty($acf_highest_cookie_notice_text) ? $default_highest_cookie_notice_text : $acf_highest_cookie_notice_text; ?>\n <?php endif; ?>\n </div>\n <div class=\"cookie-notice__buttons\">\n <button class=\"cookie__button cookie__button--opacity\"\n onclick=\"allowCookies(<?php echo $highest_cookie_allowed_level ?>);\"><?php esc_html_e(\n 'Allow cookies',\n 'cookies-allowed'\n ); ?></button>\n <?php if ($this->get_cookies_allowed_level() < 1) : ?>\n <button class=\"cookie__button cookie__button--settings\"\n onclick=\"toggleCookieModal();\"><?php esc_html_e(\n 'Settings',\n 'cookies-allowed'\n ); ?></button>\n <?php endif; ?>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"cookie-modal\">\n <div class=\"cookie-modal__backdrop js-cookie-modal\"></div>\n <div class=\"cookie-modal__wrapper\">\n <div class=\"cookie-modal__content\">\n <h3 class=\"cookie-modal__title\"><?php esc_html_e(\n 'Manage your settings',\n 'cookies-allowed'\n ); ?></h3>\n <div class=\"cookie-modal__entry\">\n <?php echo empty($acf_cookie_modal_text) ? $default_cookie_modal_text : $acf_cookie_modal_text; ?>\n </div>\n <div class=\"cookie-modal__entry\">\n <h4><?php esc_html_e('Cookie types:', 'cookies-allowed'); ?></h4>\n <div class=\"cookie-modal__checkbox__wrapper\">\n <input class=\"cookie-modal__checkbox\" id=\"allow-cookies-check1\" type=\"checkbox\"\n checked=\"checked\" disabled onclick=\"allowCookies(1);\">\n <label class=\"cookie-modal__label\"\n for=\"allow-cookies-check1\"><?php esc_html_e(\n 'Functional & Analytic cookies (anonymous)',\n 'cookies-allowed'\n ); ?></label>\n </div>\n <?php if ($highest_cookie_allowed_level >= 2) : ?>\n <div class=\"cookie-modal__checkbox__wrapper\">\n <input class=\"cookie-modal__checkbox\" id=\"allow-cookies-check2\"\n type=\"checkbox\" <?php if ($this->is_cookies_allowed_level(2) || $this->is_cookies_allowed_level(3)) {\n echo( 'checked' );\n } ?>\n onclick=\"if(this.checked){allowCookies(2)}else{allowCookies(1)};\">\n <label class=\"cookie-modal__label\"\n for=\"allow-cookies-check2\"><?php esc_html_e(\n 'Analytic cookies (user specific)',\n 'cookies-allowed'\n ); ?></label>\n </div>\n <?php endif; ?>\n <?php if ($highest_cookie_allowed_level == 3) : ?>\n <div class=\"cookie-modal__checkbox__wrapper\">\n <input class=\"cookie-modal__checkbox\" id=\"allow-cookies-check3\"\n type=\"checkbox\" <?php if ($this->is_cookies_allowed_level(3)) {\n echo( 'checked' );\n } ?>\n onclick=\"if(this.checked){allowCookies(3)}else{allowCookies(2)};\">\n <label class=\"cookie-modal__label\"\n for=\"allow-cookies-check3\"><?php esc_html_e(\n 'Marketing & Advertising cookies',\n 'cookies-allowed'\n ); ?></label>\n </div>\n <?php endif; ?>\n </div>\n <div class=\"cookie-modal__entry cookie-modal__buttons\">\n <button class=\"cookie__button cookie__button--large cookie__button--success\"\n onclick=\"toggleCookieModal();\"><?php esc_html_e(\n 'Save',\n 'cookies-allowed'\n ); ?></button>\n <button\n class=\"cookie__button cookie__button--large cookie__button--ghost js-cookie-modal\"\n onclick=\"allowCookies(<?php echo $previous_cookie_level ?>);\"><?php esc_html_e(\n 'Cancel',\n 'cookies-allowed'\n ); ?></button>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <?php\n $html .= ob_get_clean();\n\n return $html;\n }", "function setting_label_ga_code() { ?>\n <input type=\"text\" name=\"ga-code\" id=\"ga-code\" value=\"<?php echo get_option('ga-code'); ?>\" />\n<?php }", "function acf_add_cookies_allowed_options_page()\n {\n if (function_exists('acf_add_options_page')) {\n $language_suffix = null;\n\n acf_add_options_page([\n 'page_title' => 'Cookie Opties',\n 'menu_title' => 'Cookie Opties',\n 'menu_slug' => 'cookie-options',\n 'icon_url' => 'dashicons-art',\n 'post_id' => 'options' . $language_suffix,\n 'redirect' => false,\n ]);\n }\n }", "function add_admin_cookie_bar_meta_tag() {\n global $wp_query;\n\n $admin_url = base64_encode(esc_url(home_url('/')) . 'wp-admin/post.php?post=' . $wp_query->post->ID . '&amp;action=edit');\n\n echo '<script type=\"text/javascript\">jQuery( document ).ready(function() { adminCookieBar(\"' . $admin_url . '\"); });</script>' . PHP_EOL;\n}", "function loginform() {\n echo \"\\t<p>\\n\";\n echo \"\\t\\t<label title=\\\"\".__('If you don\\'t have Google Authenticator enabled for your WordPress account, leave this field empty.','google-authenticator').\"\\\">\".__('Google Authenticator code','google-authenticator').\"<span id=\\\"google-auth-info\\\"></span><br />\\n\";\n echo \"\\t\\t<input type=\\\"text\\\" name=\\\"googleotp\\\" id=\\\"googleotp\\\" class=\\\"input\\\" value=\\\"\\\" size=\\\"20\\\" style=\\\"ime-mode: inactive;\\\" /></label>\\n\";\n echo \"\\t</p>\\n\";\n}", "function login_form_nonce_field() {\n\t$token = bin2hex( openssl_random_pseudo_bytes( 16 ) );\n\tsetcookie( 'csrftoken', $token, time() + DAY_IN_SECONDS );\n\n\twp_nonce_field( 'nonceid_' . $token, 'nonceauth' );\n}", "function cookies_gdpr_settings_api_init()\n{\n // fields to it\n add_settings_section(\n 'cookies_gdpr_setting_section',\n 'Pliki cookies',\n 'cookies_gdpr_setting_section_callback_function',\n 'general'\n );\n\n add_settings_field(\n 'cookies_gdpr_setting_privacy_policy_link',\n 'Adres polityki prywatności',\n 'cookies_gdpr_setting_cookies_gdpr_id_callback_function',\n 'general',\n 'cookies_gdpr_setting_section'\n );\n\n register_setting('general', 'cookies_gdpr_setting_privacy_policy_link');\n}", "function cli_set_expire() { \n \n // First time visit and class exists.\n\tif ( class_exists( 'Cookie_Law_Info_Public' ) ) {\n\t?>\n\t<script type=\"text/javascript\">\n\n\t\tCLI_ACCEPT_COOKIE_EXPIRE = 182;\n\t\t\n\t</script>\n\t<?php\n\t}\n}", "function popmake_siul_add_popup_meta_box() {\r\n\t/** Exit Popup Meta **/\r\n\tadd_meta_box( 'popmake_popup_secure_logout', __( 'Secure Idle User Logout Settings', 'popup-maker-secure-idle-user-logout' ), 'popmake_render_popup_secure_logout_meta_box', 'popup', 'normal', 'high' );\r\n}", "function session_api_settings_form() {\n // Find modules that implement hook_session_api_cleanup().\n $modules = module_implements('session_api_cleanup');\n\n // Cookie expiry.\n $form['session_api_cookie_expire_time'] = array(\n '#type' => 'textfield',\n '#title' => t('Cookie expire time'),\n '#description' => t(\"The <strong>Session API</strong> module sets an additional cookie in the end users' browsers in order to better track sessions across logins and logouts. This is the amount of time, in seconds, that the cookie will stay valid in a user's browser.\"),\n '#default_value' => variable_get('session_api_cookie_expire_time', 2592000),\n );\n\n return system_settings_form($form);\n}", "function display_form_3()\n{\n ?>\n <input type=\"text\" name=\"wccpf_form_field_3\" id=\"wccpf_form_field_3\" value=\"<?php echo esc_attr(get_option('wccpf_form_field_3')); ?>\" />\n <?php\n}", "public function cookie_key_callback()\n {\n printf(\n '<input type=\"text\" id=\"cookie_key\" name=\"%s[cookie_key]\" value=\"%s\" />',\n Config::key(),\n Config::get('cookie_key')\n );\n }", "public function format_for_set_cookie()\n {\n }", "function manage_cookie_page(){\n\tadd_option('cookie_message', $_POST['message']);\n\tadd_option('cookie_days', $_POST['cookie_days']);\n\tadd_option('button_txt', $_POST['button_txt']);\n\n\tif (isset($_POST['submit'])) {\n\t\tupdate_option('cookie_message', $_POST['message']);\n\t\tupdate_option('cookie_days', $_POST['cookie_days']);\n\t\tupdate_option('button_txt', $_POST['button_txt']);\n\t}\n\n echo '<h1>Manage Cookies</h1>\n\t \t<form method=\"POST\">\n\t\t \t<ul>\n\t\t \t\t<li>\n\t\t \t\t\t<label for=\"message\">Message</label><br />\n\t\t \t\t\t<input type=\"text\" name=\"message\" id=\"message\" value=\"'.get_option('cookie_message').'\">\n\t\t \t\t</li>\n\t\t \t\t<li>\n\t\t \t\t\t<label for=\"button_txt\">Button Text</label><br />\n\t\t \t\t\t<input type=\"text\" name=\"button_txt\" id=\"button_txt\" value=\"'.get_option('button_txt').'\">\n\t\t \t\t</li>\n\t\t \t\t<li>\n\t\t \t\t\t<label for=\"days\">Days</label><br />\n\t\t \t\t\t<input type=\"number\" name=\"cookie_days\" id=\"days\" value=\"'.get_option('cookie_days').'\">\n\t\t \t\t</li>\n\t\t \t\t<li>\n\t\t \t\t\t'.get_submit_button().'\n\t\t \t\t</li>\n\t\t \t</ul>\n\t\t\t</form>\n '; \n}", "function wfc_save_cookie() {\r\n\tremove_action( 'wp_footer', 'wfc_save_cookie' );\r\n\r\n\tif ( ! is_admin()) {\r\n\t\twfc_tracker()->save();\r\n\t}\r\n}", "function sc_settings_field_cb( $args ){\n\n // Get the value of the registered setting\n // $option_name from register_setting()\n $options = get_option( 'sc_settings_options' );\n // output the field\n ?>\n <input id=\"<?php echo esc_attr( $args['label_for'] ); ?>\"\n type=\"text\"\n data-custom=\"<?php echo esc_attr( $args['sc_settings_custom_data'] ); ?>\"\n name=\"sc_settings_options[<?php echo esc_attr( $args['label_for'] ); ?>]\">\n\n <p class=\"description\">\n <?php esc_html_e( 'Enter a valid Googgle Map AP.', 'sc' ); ?>\n </p>\n <?php\n}", "function shortcode_settings_page( $atts ) {\n $a = shortcode_atts( array(\n 'usage' => 'show',\n 'settings' => 'hide',\n 'necessary' => 'show',\n ), $atts );\n \n $accept_usage_option = \"\";\n $accept_settings_option = \"\";\n $reject_usage_option = \"\";\n $reject_settings_option = \"\";\n\n $cookies_policy_to_obj = decode_cookie('cookies_policy');\n\n // If the user accept the Google Analitics cookies\n // turn ON the radio selection\n if(property_exists($cookies_policy_to_obj, 'usage')) {\n if ($cookies_policy_to_obj->usage === true) {\n $accept_usage_option = \"checked='checked'\";\n } else {\n $accept_usage_option = \"\";\n }\n }\n\n // If the user doesn't consent the cookies\n // turn OFF the radio selection\n if(property_exists($cookies_policy_to_obj, 'usage')) {\n if ($cookies_policy_to_obj->usage === false) {\n $reject_usage_option = \"checked='checked'\";\n } else {\n $reject_usage_option = \"\";\n }\n }\n\n // If the user accept the Settings cookies\n // turn ON the radio selection\n if(property_exists($cookies_policy_to_obj, 'settings')) {\n if ($cookies_policy_to_obj->settings === true) {\n $accept_settings_option = \"checked='checked'\";\n } else {\n $accept_settings_option = \"\";\n }\n }\n\n // If the user reject the Settings cookies\n // turn OFF the radio selection\n if(property_exists($cookies_policy_to_obj, 'settings')) {\n if ($cookies_policy_to_obj->settings === false) {\n $reject_settings_option = \"checked='checked'\";\n } else {\n $reject_settings_option = \"\";\n }\n }\n\n $output = '<form method=\"post\" action=\"/latin/cookies/\" id=\"ds-cookie-consent-form\" class=\"tna-form tna-form-engagement\">';\n $output .= '<fieldset class=\"jsOFF\">';\n $output .= '<h2>Cookie settings</h2>';\n $output .= '<p>';\n $output .= 'We use Javascript to set most of our cookies. Unfortunately Javascript is not running on your browser, so you cannot change your settings. <br>';\n $output .= '<br>';\n $output .= 'You can try:</p>';\n $output .= '<ul>';\n $output .= '<li>reloading the page</li>';\n $output .= '<li>turning on Javascript in your browser</li>';\n $output .= '</ul>';\n $output .= '</fieldset>';\n $output .= '<fieldset class=\"jsON\">';\n $output .= (!empty($_POST)) ? cookie_success_message() : '';\n $output .= '<legend class=\"sr-only\">Cookie settings</legend>';\n $output .= '<h2>' . get_option('our_first_field_headline') . '</h2>';\n $output .= get_option('our_first_field');\n $output .= '<br><br>';\n $output .= '<div class=\"form-group\">';\n $output .= '<input type=\"radio\" id=\"measure_website_use\" name=\"measure-website-use\" value=\"yes\" ' . $accept_usage_option . '>';\n $output .= '<label for=\"measure_website_use\">Use cookies that measure my website use</label><br>';\n $output .= '</div>';\n $output .= '<div class=\"form-group\">';\n $output .= '<input type=\"radio\" id=\"donot_measure_website_use\" name=\"measure-website-use\" value=\"no\" ' . $reject_usage_option . '>';\n $output .= '<label for=\"donot_measure_website_use\">Do not use cookies that measure my website use</label><br>';\n $output .= '</div>';\n $output .= (isset($atts['settings']) && $atts['settings'] == 'show') ? '<h2>' . get_option('our_second_field_headline') . '</h2>' : '';\n $output .= (isset($atts['settings']) && $atts['settings'] == 'show') ? get_option('our_second_field') : '';\n $output .= (isset($atts['settings']) && $atts['settings'] == 'show') ?'<br><br>' : '';\n $output .= (isset($atts['settings']) && $atts['settings'] == 'show') ?'<input type=\"radio\" id=\"remember_your_settings\" name=\"remember-your-settings\" value=\"yes\" ' . $accept_settings_option . '>' : '';\n $output .= (isset($atts['settings']) && $atts['settings'] == 'show') ?'<label for=\"remember_your_settings\">Use cookies that remember my settings on the site</label><br>' : '';\n $output .= (isset($atts['settings']) && $atts['settings'] == 'show') ?'<input type=\"radio\" id=\"donot_remember_your_settings\" name=\"remember-your-settings\" value=\"no\" ' . $reject_settings_option . '>' : '';\n $output .= (isset($atts['settings']) && $atts['settings'] == 'show') ?'<label for=\"donot_remember_your_settings\">Do not use cookies that remember my settings on the site</label><br>' : '';\n $output .= '<h2>' . get_option('our_third_field_headline') . '</h2>';\n $output .= get_option('our_third_field');\n $output .= '<br><br>';\n $output .= '<div class=\"tna-form__row\"><input type=\"submit\" name=\"submit\" id=\"form_submit\" value=\"Save cookies\" class=\"tna-button\"></div>';\n $output .= '</fieldset>';\n $output .= '</form>';\n\n return $output;\n}", "public function cookie();", "function display_form_4()\n{\n ?>\n <input type=\"text\" name=\"wccpf_form_field_4\" id=\"wccpf_form_field_4\" value=\"<?php echo esc_attr(get_option('wccpf_form_field_4')); ?>\" />\n <?php\n}", "function tc_cookie_frontend() {\n\t\t// May be cookie already accepted\n\t\tif (!$this->tc_is_cookie_accepted()) {\n\n\t\t // Add multi language support\n\t\t\t// Depending on plugins version\n\t\t\tif ( defined( 'ICL_SITEPRESS_VERSION' ) && version_compare( ICL_SITEPRESS_VERSION, '3.2', '>=' ) ) {\n\t\t\t\t$this->options['tc_message'] = apply_filters( 'wpml_translate_single_string', $this->options['tc_message'], 'Toledo Cookie', 'Message' );\n\t\t\t} elseif ( function_exists( 'icl_t' ) ) {\n\t\t\t\t$this->options['tc_message'] = icl_t( 'Toledo Cookie', 'Message', $this->options['tc_message']);\n\t\t\t}\n\n\t\t\t$icon_url = ($current_icon = $this->options['tc_icon']) !== '' ? wp_get_attachment_image_src($current_icon) : '';\n\n\t\t\t// Message output\n $banner_bg = ($this->options['tc_banner_color'] !== '') ? \" style='background-color: {$this->options['tc_banner_color']};'\" : '';\n $button_bg = ($this->options['tc_button_color'] !== '') ? \" style='background-color: {$this->options['tc_button_color']};'\" : '';\n $text_color = ($this->options['tc_text_color'] !== '') ? \" style='color: {$this->options['tc_text_color']};'\" : '';\n\n\t\t\t?>\n\n\t\t\t<div class=\"tc-cookie tc-cookie--bottom\" id=\"toledo-cookie-banner\" role=\"banner\"<?= $banner_bg ?>>\n\n\t\t\t\t<?php if($icon_url): ?>\n\t\t\t\t\t<div class=\"tc-cookie__logo\">\n\t\t\t\t\t\t<img src=\"<?= $icon_url[0] ?>\" alt=\"Cookies icon\">\n\t\t\t\t\t</div>\n\t\t\t <?php endif; ?>\n\n\t\t\t\t<div class=\"tc-cookie__message\"<?= $text_color ?>>\n\t\t\t\t\t<?= $this->options['tc_message'] ?>\n\n <?php\n if ($this->options['tc_link'] != ''){\n echo __('You can read', 'toledo-cookie') . ' <a href=\"#\" target=\"_blank\">' . __('additional info.', 'toledo-cookie') . '</a>';\n }\n ?>\n\n\t\t\t\t\t<a href=\"#\" class=\"tc-cookie__accept toledo-cookie-accept\"<?= $button_bg ?>><?= __('Accept', 'toledo-cookie') ?></a>\n\t\t\t\t</div>\n\n <a href=\"#\" class=\"tc-cookie__close toledo-cookie-accept\">\n <svg viewBox=\"0 0 512 512\"\n <g>\n <g>\n <path d=\"M403.1,108.9c-81.2-81.2-212.9-81.2-294.2,0s-81.2,212.9,0,294.2c81.2,81.2,212.9,81.2,294.2,0 S484.3,190.1,403.1,108.9z M390.8,390.8c-74.3,74.3-195.3,74.3-269.6,0c-74.3-74.3-74.3-195.3,0-269.6s195.3-74.3,269.6,0 C465.2,195.5,465.2,316.5,390.8,390.8z\"/>\n </g>\n <polygon points=\"340.2,160 255.8,244.2 171.8,160.4 160,172.2 244,256 160,339.8 171.8,351.6 255.8,267.8 340.2,352 352,340.2 267.6,256 352,171.8 \t\"/>\n </g>\n </svg>\n </a>\n\t\t\t</div>\n\n\t\t<?php\n // TODO Here possible apply filters for output if user want to modify it.\n\t\t}\n\t}", "public function cookies_settings_fields() {\n $fields = array(\n \tarray(\n \t\t'id' => 'message_field',\n \t\t'label' => __('Cookies message','set-cookies'),\n \t\t'section' => 'message_section',\n \t\t'type' => 'wysiwig',\n \t),\n \tarray(\n \t\t'id' => 'cookies_link',\n \t\t'label' => __('Terms and conditions link', 'set-cookies'),\n \t\t'section' => 'message_section',\n \t\t'type' => 'text'\n \t),\n \tarray(\n \t\t'id' => 'banner_color_field',\n \t\t'label' => __('Banner color (hex)', 'set-cookies'),\n \t\t'section' => 'color_section',\n \t\t'type' => 'text'\n \t),\n \tarray(\n \t\t'id' => 'accept_color_field',\n \t\t'label' => __('“Accept” button colour (hex)', 'set-cookies'),\n \t\t'section' => 'color_section',\n \t\t'type' => 'text'\n \t),\n \tarray(\n \t\t'id' => 'geo_asia',\n \t\t'label' => __('Content for Japan', 'set-cookies'),\n \t\t'section' => 'geolocation_section',\n \t\t'type' => 'textarea'\n \t),\n \tarray(\n \t\t'id' => 'geo_sa',\n \t\t'label' => __('Content for Brazil', 'set-cookies'),\n \t\t'section' => 'geolocation_section',\n \t\t'type' => 'textarea'\n \t),\n \tarray(\n \t\t'id' => 'geo_arabic',\n \t\t'label' => __('Content for UAE', 'set-cookies'),\n \t\t'section' => 'geolocation_section',\n \t\t'type' => 'textarea'\n \t)\n );\n \tforeach( $fields as $field ){\n \tadd_settings_field( $field['id'], $field['label'], array( $this, 'cookies_field_callback' ), 'cookies_fields', $field['section'], $field );\n register_setting( 'cookies_fields', $field['id'] );\n \t}\n }", "function display_form_5()\n{\n ?>\n <input type=\"text\" name=\"wccpf_form_field_5\" id=\"wccpf_form_field_5\" value=\"<?php echo esc_attr(get_option('wccpf_form_field_5')); ?>\" />\n <?php\n}", "function wfc_track_gform_submit( $entry, $form ) {\r\n\tremove_action( 'template_redirect', 'wfc_track_gform_submit' );\r\n\r\n\t$form_id = rgar( $form, 'id' );\r\n\r\n\t$form_ids = wfc_tracker()->get_local_cookie( 'wfc__f' );\r\n\t$form_ids = trim( $form_ids );\r\n\t$form_ids = $form_ids != '' ? explode( ',', $form_ids ) : array();\r\n\r\n\tif ( ! in_array( $form_id, $form_ids ) ) {\r\n\t\t$form_ids[] = $form_id;\r\n\t}\r\n\r\n\twfc_tracker()->set_cookie( 'wfc__f', implode( ',', $form_ids ) );\r\n}", "public function ajax_login_meta_box() {\n global $post; ?>\n <input type=\"hidden\" name=\"popup_ajax_login_modals_defaults_set\" value=\"true\" />\n <div id=\"popmake_popup_ajax_login_modals_fields\" class=\"popmake_meta_table_wrap\">\n <table class=\"form-table\">\n <tbody>\n <?php do_action( 'popmake_popup_ajax_login_meta_box_fields', $post->ID );?>\n </tbody>\n </table>\n </div><?php\n }", "function display_form_6()\n{\n ?>\n <input type=\"text\" name=\"wccpf_form_field_6\" id=\"wccpf_form_field_6\" value=\"<?php echo esc_attr(get_option('wccpf_form_field_6')); ?>\" />\n <?php\n}", "function rgpd_cookies() { ?>\n\n\t<script>\n\tfunction launchGA(){\n\t\t\t(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n\t\t\t(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\n\t\t\tm=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n\t\t\t})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');\n\t\t\tga('create', 'UA-185358618-1', 'auto');\n\t\t\tga('send', 'pageview');\n \t}\t\n\n\t\tvoid 0 === window._axcb && (window._axcb = []);\n\t\twindow._axcb.push(function(axeptio) {\n\t\t\taxeptio.on(\"cookies:complete\", function(choices) {\n\t\t\t\tif(choices.google_analytics) {\n\t\t\t\t\tlaunchGA();\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t</script>\n<?php\n}", "function showFreeUserModal()\r\n{\r\n\tif(!isset($_COOKIE['free_user_modal']) || $_COOKIE['free_user_modal']=='')\r\n\t{\r\n\t\t## set the cookie for 2days\r\n\t\tsetcookie('free_user_modal', GetUserIP() ,time()+(2 * 24 * 60 * 60), \"/\", \".dentistonline.ro\",0);\r\n\t\treturn true;\r\n\t}\r\n\telse return false;\r\n}", "function fd_callback( $post, $metabox ) \n{\n\t//global $post;\n // Display code/markup goes here. Don't forget to include nonces!\n // Add a nonce field so we can check for it later.\n //wp_nonce_field( 'fd_payment_nonce' , 'fd_payment_nonce' );\n echo \"<input type='text' id='\".$metabox['args'].\"' name='\".$metabox['args'].\"' value='\".esc_attr( get_post_meta( $post->ID, $metabox['args'], true ) ).\"' style='width: 100%;padding: 4px;' />\";\n\n}", "function service_cpt_info_cb()\n {\n global $post;\n $field = get_post_meta($post->ID, '_service_field', true);\n\n\n //implement security\n wp_nonce_field(__FILE__, 'cpt_nonce'); ?>\n\n <label for=\"_service_field\">Field: </label>\n <input\n type=\"text\"\n id=\"_service_field\"\n name=\"_service_field\"\n class=\"widefat\"\n value=\"<?php echo esc_attr($field); ?>\"\n />\n <?php }", "function display_form_2()\n{\n ?>\n <input type=\"text\" name=\"wccpf_form_field_2\" id=\"wccpf_form_field_2\" value=\"<?php echo esc_attr(get_option('wccpf_form_field_2')); ?>\" />\n <?php\n}", "function cbv_custom_meta_box_markup($post){\n $custom_page_title = get_post_meta( $post->ID, '_custom_page_title', true );\n // We'll use this nonce field later on when saving.\n wp_nonce_field( 'somerandomstr', '_cbvnonce' );\n?>\n <div id=\"custom-page-title\">\n <input type=\"text\" name=\"_custom_page_title\" id=\"_custom_page_title\" spellcheck=\"true\" autocomplete=\"off\" value=\"<?php echo esc_attr( $custom_page_title ); ?>\" style=\"width: 100%;height: 34px;\">\n </div>\n<?php\n}", "function cookie()\n{\n global $content;\n\n $content['title'] = 'Cookies';\n $content['class'] = 'VHtml';\n $content['method'] = 'showHtml';\n $content['arg'] = 'html/cookie.html';\n\n return;\n\n}", "function spgfwpdb_gform_editor_js()\n\t\t{\n \n \n\t\t\t?>\n\t\t\t<script type='text/javascript'>\n\t\t\t\t\t\n\t\t\t\tfieldSettings[\"select\"] += \", .spgfwpdb_choices_setting\";\n\t\t\t\tfieldSettings[\"multiselect\"] += \", .spgfwpdb_choices_setting\";\n\t\t\t\tfieldSettings[\"checkbox\"] += \", .spgfwpdb_choices_setting\";\n\t\t\t\tfieldSettings[\"radio\"] += \", .spgfwpdb_choices_setting\";\n\t\t\t\tfieldSettings[\"list\"] += \", .spgfwpdb_choices_setting\";\n\t\t\t\tfieldSettings[\"product\"] += \", .spgfwpdb_choices_setting\";\n\t\t\t\tfieldSettings[\"option\"] += \", .spgfwpdb_choices_setting\";\n\t\t\t\tfieldSettings[\"shipping\"] += \", .spgfwpdb_choices_setting\";\n\t\t\t\tjQuery(document).bind(\"gform_load_field_settings\", function(event, field, form) {\n\t\t\t\t\tjQuery(\"#spgfwpdb_choices_value\").val(field.spgfwpdb_choices);\n\t\t\t\t});\n\t\t\t\t\t\t\n\t\t\t\tfieldSettings[\"text\"] += \", .spgfwpdb_lookup_setting\";\n\t\t\t\tfieldSettings[\"textarea\"] += \", .spgfwpdb_lookup_setting\";\n\t\t\t\tjQuery(document).bind(\"gform_load_field_settings\", function(event, field, form) {\n\t\t\t\t\tjQuery(\"#spgfwpdb_lookup_value\").val(field.spgfwpdb_lookup);\n\t\t\t\t});\n\n\t\t\t</script>\n\t\t\t<?php\n\t\t\t\t\n\t\t\t\t\n\t\t}", "function html_red_flag_code() {\n global $product;\n\techo '<form style=\"clear:both;\" id=\"red_flag_protocol\" action=\"' . esc_url( $_SERVER['REQUEST_URI'] ) . '\" method=\"post\">';\n\techo '<p><input id=\"red_flag_protocol_submitted\" type=\"submit\" name=\"red-flag-protocol-submitted';\n echo $product->id;\n echo '\" value=\"Alert Jeff\" style=\"background-color: #d6001c;border: none;font-weight: 600;margin-top:5px;\"></p>';\n\techo '</form>';\n}", "function ep_signoff_meta_box() {\n add_meta_box(\n 'ep_signoff_meta_box', // $id\n 'EPortfolio Settings', // $title\n 'show_ep_signoff_meta_box', // $callback\n 'page', // $screen\n 'normal', // $context\n 'high' // $priority\n );\n }", "function external() {\n global $adm, $show, $database, $trf, $txtf, $txt, $group, $language, $id, $structure;\n //$sq = new sql;\n\n if ($show == \"add\") {\n $adm->assign(\"entrydate\", date(\"Y-m-d H:i:s\"));\n }\n\n // additional fields for expiration date.\n $never_expires_checked = '';\n $never_expires_extra = '';\n $current_date = $adm->fields[\"expiration_date\"][\"value\"];\n $txt_never_expires = $trf->display('never_expires');\n\n // on save, update and add, check never_expires flag.\n // if it is on, then set expiration_date to ''\n if (('add' == $do || 'update' == $do) && $adm->values['never_expires']) {\n $adm->fields['expiration_date']['value'] = '';\n $adm->values['expiration_date'] = '';\n }\n\n if ((int)$adm->fields[\"publishing_date\"][\"value\"] <= 0) {\n $adm->fields[\"publishing_date\"][\"value\"] = date('Y-m-d H:i:s');\n }\n\n // For form, if expiration_date is null or 0000-00-00....\n // then set never_expires flag to ON and set expiration_date = ''\n if ((int)$adm->fields[\"expiration_date\"][\"value\"] <= 0) {\n $adm->fields[\"expiration_date\"][\"value\"] = '';\n $never_expires_checked = 'checked=\"checked\"';\n $current_date = date('Y-m-d H:i:s');\n }\n\n $never_expires_extra = \" <input type='checkbox' id='never_expires' name='never_expires' value='1' style='vertical-align:middle;'\"\n . \"onChange=\\\"javascript:expField('never_expires');\\\" \"\n . \"onClick=\\\"javascript:expField('never_expires');\\\"$never_expires_checked /> $txt_never_expires\";\n\n $never_expires_extra .= <<<EOB\n <script type='text/javascript' language='javascript'>\n var expiration_date_val = '{$current_date}';\n var last_state = 2;\n expField = function(chk_box){\n var el = document.getElementById(chk_box);\n if (!el || el == '' || el == 'undefined') return;\n if (el.checked) {\n if (last_state != 1 && document.forms[0].elements['expiration_date'].value.length > 0)\n {\n expiration_date_val = document.forms[0].elements['expiration_date'].value;\n document.forms[0].elements['expiration_date'].style.color = 'gray';\n }\n document.forms[0].elements['expiration_date'].value = '{$txt_never_expires}';\n document.forms[0].elements['expiration_date'].disabled = true;\n last_state = 1;\n } else {\n if (last_state != 0 && expiration_date_val.length > 0) {\n document.forms[0].elements['expiration_date'].value = expiration_date_val;\n document.forms[0].elements['expiration_date'].style.color = 'black';\n }\n document.forms[0].elements['expiration_date'].disabled = false;\n last_state = 0;\n }\n }\n expField('never_expires');\n </script>\nEOB;\n\n $adm->assignProp(\"expiration_date\", \"extra\", $never_expires_extra);\n\n $adm->assignProp(\"content\", \"type\", \"nothing\");\n $adm->assignProp(\"lead\", \"rows\", \"3\");\n $adm->assignProp(\"lead\", \"cols\", \"60\");\n $adm->displayOnly(\"content\");\n $adm->assign(\"content\", \"<iframe id=\\\"contentFreim\\\" name=\\\"contentFreim\\\" src=\\\"editor/editor.php?id=$id&type=news&rnd=\".randomNumber().\"\\\" WIDTH=100% HEIGHT=350 marginwidth=\\\"0\\\" marginheight=\\\"0\\\" scrolling=\\\"no\\\" frameborder=\\\"0\\\">\n </iframe>\");\n\n $adm->assignProp(\"ngroup\", \"type\", \"select\");\n $adm->assignExternal(\"ngroup\", \"module_news_groups\", \"id\", \"name\", \"ORDER BY name ASC\", true);\n\n\n $tpls_with_news_module = templateHelpers::findTemplatesWithModule($language, 'news');\n $tpls_with_news_module = array_unique($tpls_with_news_module);\n\n $_select .= '<select name=\"news_content_id\" onChange=\"var exbd = ' .\n 'document.forms[\\'vorm\\'].elements[\\'extra_buttons_preview\\']; ' .\n 'if(this.value!=\\'-\\'){exbd.disabled=false;}else{exbd.disabled=true;}\">' .\n '<option value=\"-\">- '.$txtf->display(\"select_preview_content\").' -</option></select>';\n\n $jsonar = array();\n\n if ($tpls_with_news_module && count($tpls_with_news_module)) {\n $result = &$database->query('\n SELECT\n `title`, `content`, `module`\n FROM\n `content`\n WHERE\n `language` = ? AND `template` IN (?@)\n ORDER BY\n `content` ASC\n ', $language, $tpls_with_news_module);\n\n while ($_data = $result->fetch_assoc()) {\n $ar = split(\";\", $_data['module']);\n for ($c = 0; $c < sizeof($ar); $c++) {\n $a = split(\"=\", $ar[$c]);\n if($a[0] == 'news' && !empty($a[1])\n && isset($adm->fields['ngroup']['list'][$a[1]]))\n {\n $jsonar[$a[1]][$_data[\"content\"]] = htmlspecialchars($_data[\"title\"]);\n break;\n } elseif ($a[0] == 'news' && empty($a[1])) {\n $jsonar[0][$_data[\"content\"]] = htmlspecialchars($_data[\"title\"]);\n break;\n }\n }\n }\n }\n $_select .= getFuncPreviewPages($jsonar);\n\n // getting all users to testing preview\n $result = &$database->query(\"SELECT `user`, `username` FROM `module_user_users`\"\n . \" WHERE `active` = 1 ORDER BY `username`\");\n\n if ($result && $result->num_rows()) {\n $_select .= \"<select name=\\\"preview_user_id\\\">\";\n $_select .= '<option value=\"-\">- '.$trf->display(\"select_preview_user\").' -</option>';\n\n while($row = $result->fetch_assoc()) {\n $_select .= \"<option value=\\\"$row[user]\\\">\" . htmlspecialchars($row[\"username\"]) . \"</option>\";\n }\n $_select .= '</select>';\n }\n\n $adm->general[\"extra_buttons\"] = array(\n \"1\" => array(\n $trf->display('preview'),\n \"javascript: previewContent();\\\" disabled=\\\"true\\\" id=\\\"extra_buttons_preview\",\n \"pic/button_preview.gif\",\n $_select,\n )\n );\n $adm->assignProp(\"ngroup\", \"java\", \"onChange=\\\"refreshPreviewPages()\\\"\");\n\n $adm->displayButtons(\"pic\");\n //$adm->displayOnly(\"pic\");\n $adm->assignProp(\"pic\",\"type\",\"onlyhidden\");\n $prod_image = $adm->fields[\"pic\"][\"value\"];\n //$adm->assign(\"pic\", \"\");\n if ($prod_image != \"\") {\n $adm->assignProp(\"pic\", \"extra\", \"\n <table border=0 cellpadding=0 cellspacing=0>\n <tr valign=top><td><div align=\\\"left\\\" id=\\\"newspic\\\"><img src=\\\"\" . $prod_image . \"\\\" border=0></div></td>\n <td>&nbsp;&nbsp;</td>\n <td><button type=button onClick=\\\"newWindow('editor/Inc/insimage1.php',660,350);\\\"><img src=\\\"pic/button_accept.gif\\\" alt=\\\"\\\" border=\\\"0\\\">\".str_replace(\"+\", \" \", $txtf->display(\"pic_choose\")).\"</button>\n <button type=button onClick=\\\"javascript:clearPic();\\\"><img src=\\\"pic/button_decline.gif\\\" alt=\\\"\\\" border=\\\"0\\\">\".str_replace(\"+\", \" \", $txtf->display(\"pic_del\")).\"</button>\n </td></tr></table>\");\n }\n else {\n $adm->assignProp(\"pic\", \"extra\", \"\n <table border=0 cellpadding=0 cellspacing=0>\n <tr valign=top><td><div align=\\\"left\\\" id=\\\"newspic\\\">&nbsp;</div></td>\n <td>&nbsp;&nbsp;</td>\n <td><button type=button onClick=\\\"newWindow('editor/Inc/insimage1.php',660,350);\\\"><img src=\\\"pic/button_accept.gif\\\" alt=\\\"\\\" border=\\\"0\\\">\".str_replace(\"+\", \" \", $txtf->display(\"pic_choose\")).\"</button>\n <button type=button onClick=\\\"javascript:clearPic();\\\"><img src=\\\"pic/button_decline.gif\\\" alt=\\\"\\\" border=\\\"0\\\">\".str_replace(\"+\", \" \", $txtf->display(\"pic_del\")).\"</button>\n </td></tr></table>\");\n }\n}", "function setValueUnifiedLoginCookie($value) {\n\t\tglobal $system;\n\t\t$cookieName = $system[\"config\"][\"system\"][\"parameters\"]['siteShortName'] . 'LoginOption';\n\t\tsetcookie($cookieName,$value);\n\t}", "public function add_login_field()\n\t{\n\t\t?>\n\t\t<p>\n\t\t\t<label for=\"activation-code\"><?php echo __( 'Activation Code (New User Only)', 'user-activation-email' ); ?><br>\n\t\t\t\t<input type=\"text\" id=\"activation-code\" class=\"input\" name=\"activation-code\" tabindex=\"20\" value=\"<?php if( isset( $_GET['uae-key'] ) ) echo urldecode( $_GET['uae-key'] ); ?>\">\n\t\t\t</label>\n\t\t</p>\n\t\t<?php\n\t}", "function bc_template_settings_field_callback(){ \n\t\t\n\t\t\t$bc_admin_mainteneance__message_header = ''.__('Customize this feature under','bootclean').': ';\n\t\t\t$bc_admin_mainteneance__message_header .= '<b>' . __('Options','bootclean') . '> <a href=\"' . admin_url( 'options-general.php?page=bc_mainteneance_mode' ) . '\">' .__('BC Mainteneance','bootclean');\n\t\t\t$bc_admin_mainteneance__message_header .= '</a></b>.'; \n\t\t\t?>\n\t\t\t<label for=\"bc-coming-soon\">\n\t\t\t\t<input id=\"bc-coming-soon\" type=\"checkbox\" value=\"1\" name=\"options_bc_coming_soon\" <?php checked( get_option( 'options_bc_coming_soon', false ) ); ?>> <?php _e('Only logged users can view this site.','bootclean'); ?>\n\t\t\t</label>\n\t\t\t<!--<p class=\"description\"><?php echo $bc_admin_mainteneance__message_header; ?></p>-->\n\t\t\t<?php \n\t\t}", "function pronamic_cookies_modal( $name, $arguments = array() ) {\n $title = __( 'Cookie Law Notice', 'pronamic-cookes' );\n $description = get_option( 'pronamic_cookie_text' );\n\n if ( is_array( $arguments ) && ! empty( $arguments ) )\n extract( $arguments, EXTR_IF_EXISTS );\n\n ?>\n <div class=\"pronamic_csection_modal\">\n <h2><?php echo $title; ?></h2>\n <a href=\"#\" class=\"jCloseModal pronamic_csection_modal_close\">&times;</a>\n <?php if ( $description ) : ?>\n\t <div class=\"pronamic_csection_modal_content\">\n\t <?php if ( get_option( 'pronamic_cookie_link' ) ): ?>\n\t <a target=\"_blank\" href=\"<?php echo esc_url( get_option( 'pronamic_cookie_link' ) ); ?>\">\n\t <?php echo $description; ?>\n\t </a>\n\t <?php else : ?>\n\t <?php echo $description; ?>\n\t <?php endif;?>\n\t </div>\n <?php endif;?>\n <div class=\"pronamic_csection_modal_footer\">\n <a href=\"#\" class=\"pronamic_csection_button pronamic_csection_button_green jAcceptCookie\" data-name=\"<?php echo $name; ?>\"><?php _e( 'Accept cookie', 'pronamic-cookies' ); ?></a>\n <a href=\"#\" class=\"pronamic_csection_button pronamic_csection_button_red jCloseModal\"><?php _e( 'Decline cookie', 'pronamic-cookies' ); ?></a>\n </div>\n </div>\n\t<?php\n}", "public function action_editor_js() { ?>\n\t\t<script type=\"text/javascript\">\n\t\t\t/*\n\t\t\t * Tell Gravity Forms that every field type should\n\t\t\t * support the .reject_val_setting input.\n\t\t\t */\n\t\t\tjQuery.map(fieldSettings, function (el, i) {\n\t\t\t\tfieldSettings[i] += ', .reject_val_setting';\n\t\t\t});\n\t\t\t/*\n\t\t\t * When the field settings are initialized, populate\n\t\t\t * the custom field setting.\n\t\t\t */\n\t\t\tjQuery(document).on('gform_load_field_settings', function(ev, field) {\n\t\t\t\tjQuery('#field_reject_val').val(field.rejectVal || '');\n\t\t\t});\n\t\t</script>\n\t\t<?php \n\t}", "function wp_cookie_constants()\n{\n}", "function apprenants_build_meta_box( $post ){\r\n\twp_nonce_field( basename( __FILE__ ), 'apprenants_meta_box_nonce' );\r\n\r\n\t// retrieve the _apprenants_git current value\r\n\t$current_git = get_post_meta( $post->ID, '_apprenants_git', true );\r\n\r\n\t// retrieve the _apprenants_linkedin current value\r\n\t$current_linkedin = get_post_meta( $post->ID, '_apprenants_linkedin', true );\r\n\r\n\t\r\n\t?>\r\n\t<div class='inside'>\r\n\r\n\t\t<h3><?php _e( 'git', 'apprenants_example_plugin' ); ?></h3>\r\n\t\t<p>\r\n\t\t\t<input type=\"text\" name=\"git\" value=\"<?php echo $current_git; ?>\" /> \r\n\t\t</p>\r\n\r\n\t\t<h3><?php _e( 'linkedin', 'apprenants_example_plugin' ); ?></h3>\r\n\t\t<p>\r\n\t\t\t<input type=\"text\" name=\"linkedin\" value=\"<?php echo $current_linkedin; ?>\" /> \r\n\t\t</p>\r\n\r\n\t\t\r\n\t</div>\r\n\t<?php\r\n}", "function setMyCookie() {\n\tif (isset($_POST['cookie_ok'])) {\n\t\tsetcookie('notice', 'my cookie', time()+86400 * get_option('cookie_days'));\n\t}\n\n}", "function refer_field_js(){\n\n // If we are on buddypres xprofile forms, register and profile edit fields\n \tif( bp_current_action() == \"edit\" ){\n\n\t\twp_register_script( 'refer_field', get_stylesheet_directory_uri() . '/js/refer_field.js', array( 'jquery' ), ver(), true );\n\t\twp_enqueue_script('refer_field'); \n\n \t}\n}", "public function post_delete_cookie () {\n\t\tif ( isset( $_POST['posted_display_id'] ) && is_numeric( $_POST['posted_display_id'] ) ) {\n\t\t\t$db = new Posted_Display_Admin_Db();\n\n\t\t\t$options = $db->get_options( $_POST['posted_display_id'] );\n\t\t\tif ( isset( $options['type'] ) && $options['type'] === 'Cookie' && $_POST['type'] !== 'Cookie' ) {\n\t\t\t\t$cookie_name = $this->text_domain . '-' . esc_html( $_POST['posted_display_id'] );\n\t\t\t\tsetcookie( $cookie_name, '', time() - 3600, '/', $_SERVER['SERVER_NAME'] );\n\t\t\t}\n\t\t}\n\t}", "function pronamic_cookies_button( $name, $arguments = array() ) {\n $title = __( 'Cookie Law Notice', 'pronamic-cookes' );\n $button = __( 'Accept cookie', 'pronamic-cookies' );\n $description = get_option( 'pronamic_cookie_text' );\n\n if ( is_array( $arguments ) && ! empty( $arguments ) )\n extract( $arguments, EXTR_IF_EXISTS );\n\n ?>\n <a href='#' class='pronamic_csection_show_button jShowCookieLawModal'><?php echo $button; ?></a>\n <div class=\"pronamic_csection_modal\">\n <h2><?php echo $title; ?></h2>\n <a href=\"#\" class=\"jCloseModal pronamic_csection_modal_close\">&times;</a>\n <?php if ( $description ) : ?>\n\t <div class=\"pronamic_csection_modal_content\">\n\t <?php if ( get_option( 'pronamic_cookie_link' ) ) : ?>\n\t <a target=\"_blank\" href=\"<?php echo esc_url( get_option( 'pronamic_cookie_link' ) ); ?>\">\n\t <?php echo $description; ?>\n\t </a>\n\t <?php else : ?>\n\t <?php echo $description; ?>\n\t <?php endif;?>\n\t </div>\n <?php endif;?>\n <div class=\"pronamic_csection_modal_footer\">\n <a href=\"#\" class=\"pronamic_csection_button pronamic_csection_button_green jAcceptCookie\" data-name=\"<?php echo $name; ?>\"><?php _e( 'Accept cookie', 'pronamic-cookies' ); ?></a>\n <a href=\"#\" class=\"pronamic_csection_button pronamic_csection_button_red jCloseModal\"><?php _e( 'Decline cookie', 'pronamic-cookies' ); ?></a>\n </div>\n </div>\n\t<?php\n}", "public function wpsc_add_cookie() {\n\t\tdo_action( 'wpsc_add_cookie', 'cookie_notice_accepted' );\n\t}", "public function mce_popup() {\n\n\t\tpods_view( PODS_DIR . 'ui/admin/shortcode.php', compact( array_keys( get_defined_vars() ) ) );\n\t}", "function fba_csrf_field(){\n\n $fba_csrf_hash = hash('sha256', $_SERVER['HTTP_USER_AGENT'].$_SERVER['REMOTE_ADDR'].time());\n $_SESSION['fba_csrf'] = $fba_csrf_hash;\n $fba_csrf_html = \"<input type=\\\"hidden\\\" id=\\\"fba_csrf\\\" name=\\\"fba_csrf\\\" value=\\\"$fba_csrf_hash\\\">\";\n echo($fba_csrf_html);\n\n }", "function wp_get_cookie_login()\n{\n}", "function org_fundraiseup_url_callback() {\r\n global $post;\r\n\r\n // Nonce field to validate form request came from current site\r\n wp_nonce_field( basename( __FILE__ ), 'organization_fields' );\r\n\r\n // Get the location data if it's already been entered\r\n $location = get_post_meta( $post->ID, 'fundraiseup_url', true );\r\n\r\n // Output the field\r\n echo '<input type=\"text\" name=\"fundraiseup_url\" value=\"' . esc_attr( $location ) . '\" class=\"widefat\">';\r\n}", "public function frontdesk_key_field()\n {\n\n $option = get_option($this->token . '_frontdesk_key');\n\n $data = get_option('pf_frontdesk_key', '');\n if ($option && strlen($option) > 0 && $option != '') {\n $data = $option;\n }\n\n echo '<input id=\"frontdesk_key\" type=\"text\" name=\"' . $this->token . '_frontdesk_key\" value=\"' . $data . '\"/>\n\t\t\t\t\t<label for=\"frontdesk_key\"><span class=\"description\">' . __('Enter your API key generated by your CRM.', $this->token) . '</span></label>';\n\n }", "function woocommerce_form_field($key, $args, $value = \\null)\n {\n }", "public function frontend_scripts(){\n\n \t// Only add scripts on visible page\n \tif( $this->is_visible() ){\n \t\twp_enqueue_script( 'gravityforms-popup-frontend', $this->get_base_url() . \"/js/gravityforms-popup-frontend.js\", array( 'jquery' ), $this->_version, true );\n \t\twp_enqueue_style( 'gravityforms-popup-frontend', $this->get_base_url() . \"/css/gravityforms-popup-frontend.css\", array(), $this->_version );\n\n \t\t// Adding parameters\n \t\t$params = array(\n \t\t\t'seconds_to_appearance' \t=> $this->get_plugin_setting( 'seconds_to_appearance', 10 ),\n 'appearance_point_id' => apply_filters( 'gravityforms_popup_appearance_point_id', '#footer' ), // Display popup when the bottom of the window reaches this ID\n \t\t\t'endpoint'\t\t\t\t\t=> admin_url( '/admin-ajax.php?action=gravityforms_popup_endpoint' ),\n \t\t\t'displayed_nonce'\t\t\t=> wp_create_nonce( 'gravityforms_popup_displayed' ),\n \t\t\t'cookie_name'\t\t\t\t=> 'gravityforms_popup_cookie',\n \t\t\t'cookie_value'\t\t\t\t=> $this->get_cookie_value(),\n \t\t\t'cookie_days'\t\t\t\t=> 7,\n 'display_on_bottom_page' => $this->get_plugin_setting( 'display_on_bottom_page', 0 ),\n 'form_id' => $this->get_plugin_setting( 'gform', 0 ),\n 'use_multisite_cookie' => $this->get_plugin_setting( 'use_multisite_cookie', 0 ),\n 'domain' => $this->domain()\n \t\t\t);\n\n \t\t\twp_localize_script( 'gravityforms-popup-frontend', 'gravityforms_popup_params', $params );\n \t}\n }", "function show_franskild_meta_box ( $post ) {\n\t\n wp_nonce_field( basename( __FILE__), 'franskild_colab_nonce' );\n\t$meta = get_post_meta( $post->ID );\n\t?>\n\n\t<div>\n\t\t<label for=\"colab-name\"><?php _e( 'Name', 'franskild' ); ?></label>\n\t</div>\n\t<div>\n\t\t<input type=\"text\" name=\"colab_name\" id=\"colab-name\" value=\"<?php if ( ! empty ( $meta['colab_name'] ) ) { echo esc_attr( $meta['colab_name'][0] ); } ?>\">\n\t</div>\n\t<div>\n\t\t<label for=\"colab-url\"><?php _e( 'URL', 'franskild' ); ?></label>\n\t</div>\n\t<div>\n\t\t<input type=\"url\" name=\"colab_url\" id=\"colab-url\" value=\"<?php if ( ! empty ( $meta['colab_name'] ) ) { echo esc_attr( $meta['colab_url'][0] ); } ?>\">\n\t</div>\n\t<?php\n\n}", "function stijlenvorm_admin_notice_example_notice(){\n \n /* Check transient, if available display notice */\n if( get_transient( 'stijlenvorm-admin-notice-example' ) ){\n if (get_page_title_for_slug('cookies')) {\n \t $url = get_edit_post_link(get_page_title_for_slug('cookies')->ID);\n ?>\n <div class=\"notice-error notice is-dismissible\">\n <p>We zien dat je al een pagina hebt met de url <code>/cookies</code> Voeg hierin de shortcodes <code class=\"selectable\">&#91;cookie_options&#93;</code> en <code class=\"selectable\">&#91;cookie_overview&#93;</code> toe. <a href=\"<?php echo $url; ?>\">Voeg shortcodes toe</a>.</p>\n </div>\n <?php\n } else {\n $url = 'post-new.php?post_type=page&post_title=Cookies&pre_content=Op+deze+website+worden+cookies+gebruikt.+Een+cookie+is+een+klein+bestand+dat+informatie+bevat.+Deze+informatie+bestaat+uit+de+pagina%27s+die+u+bezocht+heeft+en+een+aantal+gegevens+over+uw+bezoek.+Ook+gebruiken+we+cookies+voor+enkele+functionaliteiten+op+de+website+waaronder+het+tonen+van+video%27s+en+het+laden+van+websites+van+partners.%0D%0ADe+cookies+worden+lokaal+op+uw+eigen+pc+opgeslagen+en+bevatten+alleen+geanonimiseerde+informatie.%0D%0A%0D%0AMet+behulp+van+de+onderstaande+instellingen+kunt+u+een+keuze+maken+uit+de+cookies+die+u+wilt+accepteren.+Het+niet+accepteren+van+cookies+zal+resulteren+in+een+beperkte+functionaliteit+binnen+de+website.%0D%0A%0D%0A%5Bcookie_options%5D%0D%0A%3Ch4%3ECookies+verwijderen+of+uitschakelen%3C%2Fh4%3E%0D%0AJe+kan+cookies+van+ons+natuurlijk+ook+uitschakelen+en+verwijderen.%C2%A0+Hoe+je+cookies+kan+uitschakelen+of+verwijderen+staat+hier+uitgelegd%3A%0D%0A%3Cul+class%3D%22bullet-list%22%3E%0D%0A+%09%3Cli%3E%3Ca+href%3D%22https%3A%2F%2Fsupport.google.com%2Fchrome%2Fanswer%2F95647%3Fhl%3Dnl%22+target%3D%22_blank%22+rel%3D%22noopener%22%3EChrome%3C%2Fa%3E%3C%2Fli%3E%0D%0A+%09%3Cli%3E%3Ca+href%3D%22https%3A%2F%2Fsupport.mozilla.org%2Fnl%2Fkb%2Fcookies-verwijderen-gegevens-wissen-websites-opgeslagen%22+target%3D%22_blank%22+rel%3D%22noopener%22%3EFirefox%3C%2Fa%3E%3C%2Fli%3E%0D%0A+%09%3Cli%3E%3Ca+href%3D%22https%3A%2F%2Fsupport.microsoft.com%2Fnl-nl%2Fhelp%2F17442%2Fwindows-internet-explorer-delete-manage-cookies%22+target%3D%22_blank%22+rel%3D%22noopener%22%3EInternet+Explorer%3C%2Fa%3E%3C%2Fli%3E%0D%0A+%09%3Cli%3E%3Ca+href%3D%22https%3A%2F%2Fsupport.microsoft.com%2Fnl-nl%2Fhelp%2F10607%2Fwindows-10-view-delete-browser-history-microsoft-edge%22+target%3D%22_blank%22+rel%3D%22noopener%22%3EEdge%3C%2Fa%3E%3C%2Fli%3E%0D%0A+%09%3Cli%3E%3Ca+href%3D%22https%3A%2F%2Fsupport.apple.com%2Fnl-nl%2FHT201265%22+target%3D%22_blank%22+rel%3D%22noopener%22%3ESafari+%28iOS%29%3C%2Fa%3E%3C%2Fli%3E%0D%0A+%09%3Cli%3E%3Ca+href%3D%22https%3A%2F%2Fsupport.apple.com%2Fkb%2FPH21411%3Flocale%3Dnl_NL%22+target%3D%22_blank%22+rel%3D%22noopener%22%3ESafari+%28macOS%29%3C%2Fa%3E%3C%2Fli%3E%0D%0A%3C%2Ful%3E%0D%0A%0D%0A%5Bcookie_overview%5D%0D%0A';\n ?>\n <div class=\"notice-error notice is-dismissible\">\n <p>Vergeet niet de pagina aan te maken voor cookies of je huidige cookie pagina aan te passen met de shortcodes <code class=\"selectable\">&#91;cookie_options&#93;</code> en <code class=\"selectable\">&#91;cookie_overview&#93;</code>! <a href=\"<?php echo admin_url().$url; ?>\">Maak pagina aan</a> of <a href=\"<?php echo admin_url(); ?>edit.php?post_type=page\">Pas pagina aan</a>.</p>\n </div>\n <?php } ?>\n <script>\n jQuery.fn.selectText = function(){\n this.find('input').each(function() {\n if(jQuery(this).prev().length == 0 || !jQuery(this).prev().hasClass('p_copy')) { \n jQuery('<p class=\"p_copy\" style=\"position: absolute; z-index: -1;\"></p>').insertBefore(jQuery(this));\n }\n jQuery(this).prev().html(jQuery(this).val());\n });\n var doc = document;\n var element = this[0];\n if (doc.body.createTextRange) {\n var range = document.body.createTextRange();\n range.moveToElementText(element);\n range.select();\n } else if (window.getSelection) {\n var selection = window.getSelection(); \n var range = document.createRange();\n range.selectNodeContents(element);\n selection.removeAllRanges();\n selection.addRange(range);\n }\n };\n jQuery(\".selectable\").click(function() {\n jQuery(this).selectText();\n });\n </script>\n <?php /* Delete transient, only display this notice once. */\n delete_transient( 'stijlenvorm-admin-notice-example' );\n }\n}", "function wp_remote_retrieve_cookie_value($response, $name)\n{\n}", "public function afterSave()\n {\n if (Yii::app()->getModule('poll')->guestCookies === TRUE && Yii::app()->user->isGuest) {\n $cookieName = 'Poll_'. $this->poll->id;\n $cookie = new CHttpCookie($cookieName, $this->id);\n $cookie->expire = time() + 60 * 60 * 24 * 365;\n Yii::app()->request->cookies[$cookieName] = $cookie;\n }\n }", "public function cn_refuse_opt() {\n\t\techo '\n\t\t<fieldset>\n\t\t\t<label><input id=\"cn_refuse_opt\" type=\"checkbox\" name=\"cookie_notice_options[refuse_opt]\" value=\"1\" ' . checked( true, $this->options['general']['refuse_opt'], false ) . ' />' . __( 'Enable to give to the user the possibility to refuse third party non functional cookies.', 'cookie-notice' ) . '</label>\n\t\t\t<div id=\"cn_refuse_opt_container\"' . ( $this->options['general']['refuse_opt'] === false ? ' style=\"display: none;\"' : '' ) . '>\n\t\t\t\t<div id=\"cn_refuse_text\">\n\t\t\t\t\t<input type=\"text\" class=\"regular-text\" name=\"cookie_notice_options[refuse_text]\" value=\"' . esc_attr( $this->options['general']['refuse_text'] ) . '\" />\n\t\t\t\t\t<p class=\"description\">' . __( 'The text of the button to refuse the consent.', 'cookie-notice' ) . '</p>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</fieldset>';\n\t}", "function showOfertaModal()\r\n{\r\n\treturn false;\r\n\t/*if(!isset($_COOKIE['oferta_modal']) || $_COOKIE['oferta_modal']=='')\r\n\t{\r\n\t\t## set the cookie for 30mins\r\n\t\tsetcookie('oferta_modal', GetUserIP() ,time()+1800, \"/\", \".dentistonline.ro\",0);\r\n\t\treturn true;\r\n\t}\r\n\telse return false;*/\r\n}", "function meta_box_callback( $post ) {\n wp_nonce_field( basename( __FILE__ ), 'meta_box_nonce' );\n $prfx_stored_meta = get_post_meta( $post->ID );\n ?>\n\n <p>\n <label for=\"reference\" class=\"prfx-row-title\"><?php _e( 'Label_name', 'meta-textdomain' )?></label>\n <input type=\"text\" name=\"reference\" required id=\"reference\" value=\"<?php if ( isset ( $prfx_stored_meta['reference'] ) ) echo $prfx_stored_meta['reference'][0]; ?>\" />\n </p>\n\n<?php\n}", "function yourls_cookie_value( $user ) {\n\treturn yourls_apply_filter( 'set_cookie_value', yourls_salt( $user ?? '' ), $user );\n}", "function thn_credits_meta( $post ) {\n $thndata = get_post_meta($post->ID, 'thn_slide_link', TRUE);\n wp_nonce_field( 'thn_meta_box_nonce', 'meta_box_nonce' ); \n\n // The actual fields for data entry\n echo '<input type=\"text\" id=\"thn_sldurl\" name=\"thn_sldurl\" value=\"'.$thndata.'\" size=\"75\" />';\n}", "function addNewUserNameInLogin($type, $class = '')\n{\n\n\n ?>\n\n <input type=\"hidden\" name=\"dig_nounce\" class=\"dig_nounce\"\n value=\"<?php echo wp_create_nonce('dig_form') ?>\">\n <p class=\"woocommerce-FormRow woocommerce-FormRow--wide form-row form-row-wide <?php echo $class; ?>\"\n id=\"dig_wc_log_otp_container\" otp=\"1\" style=\"display: none;\">\n <label for=\"dig_wc_log_otp\"><?php _e(\"OTP\", \"digits\"); ?> <span class=\"required\">*</span></label>\n <input type=\"text\" class=\"input-text\" name=\"dig_wc_log_otp\" id=\"dig_wc_log_otp\"/>\n </p>\n\n\n <input type=\"hidden\" name=\"username\" id=\"loginuname\" value=\"\"/>\n <?php\n}", "function popblocker() {\r\n\r\nif (isset($_GET['popblock'])){\r\n\r\nif (!isset($_COOKIE['wow-modal-id-4'])) {\r\n\r\nsetcookie('wow-modal-id-4', 'yes', time()+1209600, COOKIEPATH, COOKIE_DOMAIN, false);\r\n\r\n}\r\n}\r\n}", "public function html_field_confirm_destroy($args) {\n $field_id = DKOFBLOGIN_SLUG . '-' . $args['field'];\n $field_name = DKOFBLOGIN_OPTIONS_KEY . '[' . $args['field'] . ']';\n echo '<label for=\"', $field_id, '\">';\n echo '<input id=\"', $field_id, '\" name=\"' . $field_name . '\" type=\"checkbox\" value=\"1\" />';\n echo ' Confirm destruction of fblogin metadata?</label>';\n }", "function yourls_nonce_field($action, $name = 'nonce', $user = false, $echo = true ) {\n\t$field = '<input type=\"hidden\" id=\"'.$name.'\" name=\"'.$name.'\" value=\"'.yourls_create_nonce( $action, $user ).'\" />';\n\tif( $echo )\n\t\techo $field.\"\\n\";\n\treturn $field;\n}", "function Ocean_Popup_Login() {\n\treturn Ocean_Popup_Login::instance();\n}", "function wp_generate_auth_cookie($user_id, $expiration, $scheme = 'auth', $token = '')\n{\n}", "public function add_cookie_script() {\n\t\t$domain = ( 2 == PLL()->options['force_lang'] ) ? wp_parse_url( PLL()->links_model->home, PHP_URL_HOST ) : COOKIE_DOMAIN;\n\t\t$js = sprintf(\n\t\t\t'(function() {\n\t\t\t\tvar expirationDate = new Date();\n\t\t\t\texpirationDate.setTime( expirationDate.getTime() + %d * 1000 );\n\t\t\t\tdocument.cookie = \"%s=%s; expires=\" + expirationDate.toUTCString() + \"; path=%s%s\";\n\t\t\t}());',\n\t\t\tesc_js( apply_filters( 'pll_cookie_expiration', YEAR_IN_SECONDS ) ),\n\t\t\tesc_js( PLL_COOKIE ),\n\t\t\tesc_js( pll_current_language() ),\n\t\t\tesc_js( COOKIEPATH ),\n\t\t\t$domain ? '; domain=' . esc_js( $domain ) : ''\n\t\t);\n\t\techo '<script type=\"text/javascript\">' . $js . '</script>'; // phpcs:ignore WordPress.Security.EscapeOutput\n\t}", "public function renderGaTrackingIdField( $args ) {\n\t\t$value = $this->trackingId ?: '';\n\t\techo '<input type=\"text\" id=\"' . $args['label_for'] . '\" name=\"' . $args['label_for'] . '\" value=\"' . esc_attr( $value ) . '\" placeholder=\"UA-XXXXXXX-ZZ\" />';\n\t}", "protected function renewCookie()\n {}", "function wp_nonce_field($action = -1, $name = '_wpnonce', $referer = \\true, $echo = \\true)\n{\n}", "function lasaphire_videomodal_settings_number_field_callback(){\n\t$lasaphire_videomodal_expiration_time = get_option( 'lasaphire_videomodal_expiration_time' );\n\t?>\n\t\t<label for=\"lasaphire_videomodal_expiration_time\">\n\t\t\t<input type=\"number\" name=\"lasaphire_videomodal_expiration_time\" min=\"0\" max=\"60\" value=\"<?php echo esc_attr( isset( $lasaphire_videomodal_expiration_time ) ? (int) $lasaphire_videomodal_expiration_time : 0 ); ?>\">\n\t\t</label>\n\t<?php\n}", "function mtps_cookie_declaration( $atts ) {\n $cookiebot_field_value = mtps_get_field_value( 'mtps_cookiebot_field' );\n $cookiebot_id = apply_filters( 'mtps_cookiebot_id', $cookiebot_field_value );\n\n if ( $cookiebot_id ) {\n $current_locale = substr( get_locale(), 0, 2 );\n return '<script src=\"https://consent.cookiebot.com/' . esc_attr( $cookiebot_id ) . '/cd.js\" data-culture=\"' . esc_attr( $current_locale ) . '\" id=\"CookieDeclaration\" async></script>'; // phpcs:ignore\n }\n\n return '';\n}", "function company_details_callback_function( $post ){\n\n wp_nonce_field('save_company_data_function', 'company_data_meta_box_nonce');\n //variables to maintane the value of fields in metabox while refreshing\n $name_value = get_post_meta($post->ID, '_company_name_key', true);\n $email_value = get_post_meta($post->ID, '_company_email_key', true);\n $job_expiry_value = get_post_meta($post->ID, '_job_expiry_key', true);\n?>\n <div>\n <label for=\"company_name_field\">Company Name</label>\n <input type=\"text\" id=\"company_name_field\" name=\"company_name_field\" value=\"<?php echo esc_attr( $name_value ); ?>\" size=\"25\" />\n <label for=\"company_email_field\">Company Email</label>\n <input type=\"email\" id=\"company_email_field\" name=\"company_email_field\" value=\"<?php echo esc_attr( $email_value ); ?>\" size=\"25\" oninput=\"ValidateEmail()\"/>\n <p>Enter Date: <input type = \"text\" id = \"expiry_datepicker\" name=\"expiry_datepicker\" value=\"<?php echo esc_attr( $job_expiry_value ); ?>\"></p>\n\n </div>\n <?php\n}", "function set_user_cookie($args){\n //$ip =$this->get_client_ip();\n $cookie_name = 'evore_'.$args['email'].'_'.$args['e_id'].'_'.$args['repeat_interval'];\n $cookie_value = 'rated';\n setcookie($cookie_name, $cookie_value, time() + (86400 * 30), \"/\");\n }", "private function nonce_field() {\n\t\twp_nonce_field( 'sugar_calendar_nonce', 'sc_mb_nonce', true );\n\t}", "public function popup_form () {\n return \"\n <div class='popup-form blog-form' aria-alive='off' aria-labelledby='popup-form-title'>\n <div class='popup-form-underlay'></div>\n <div class='popup-form-body'>\n <a href='#' class='blog-form-close' aria-label='\" . __(\"Close\", \"blog_forms\") . \"'></a>\n <h3 id='popup-form-title'>\n \" . __(\"Get insights sent straight to your inbox:\", \"blog_forms\") . \"\n </h3>\n \" . $this->form(2078) . \"\n \" . $this->thanks() . \"\n </div>\n </div>\";\n }", "public function meta_setter() {\n?>\n\n<p>\n\t<label>\n\t\t<?php echo esc_attr( $this->labels['choose'] ); ?>\n\t\t<input type=\"text\" class=\"<?php echo $this->id; ?>-color-picker color-picker-hex\" value=\"#000000\" data-hide=\"false\" />\n\t</label>\n</p>\n\n<?php\n\t}", "function cmb_after_url_input_cb($field_args, $field) {\n?>\n <strong>Preview</strong>\n <img class=\"gif_image\" src=\"<?php echo $field->value() ?>\" />\n <button class=\"open_giphy_search btn\" type=\"button\">Add/Replace Gif</button>\n<?php\n}", "public function display_formsubmit_popup(){\r\n\t\tglobal $cm, $yachtclass;\r\n\t\t$loggedin_member_id = $yachtclass->loggedin_member_id();\r\n\t\t\r\n\t\tif ($loggedin_member_id == 0){\r\n\t\t\t$default_content = '\r\n\t\t\t<hr/>\r\n\t\t\t<p>If you would like to improve your browsing experience and save your preferences, <a href=\"'. $cm->get_page_url(0, \"register\") .'\">sign up</a> or <a href=\"'. $cm->get_page_url(0, \"login\") .'\">log in</a> to your account.</p>\r\n\t\t\t';\r\n\t\t}else{\r\n\t\t\t$default_content = '';\r\n\t\t}\r\n\t\t\r\n\t\t$returntext = '\r\n\t\t<div id=\"formsubmitoverlay\" class=\"\">\r\n\t\t\t<div class=\"fc-formsubmit-container\">\r\n\t\t\t\t<a class=\"fc-close-formsubmit\" href=\"javascript:void(0);\"><i class=\"fas fa-times\"></i><span class=\"com_none\">Close</span></a>\r\n\t\t\t\t<i class=\"far fa-check-circle\"><span class=\"com_none\">Success</span></i>\r\n\t\t\t\t\r\n\t\t\t\t<h2>Thank You</h2>\r\n\t\t\t\t<p id=\"formsubmitcontent\"></p>\r\n\t\t\t\t'. $default_content .'\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t';\r\n\t\t\r\n\t\t$returntext .= '\r\n\t\t<script type=\"text/javascript\">\r\n\t\t\t$(document).ready(function(){\r\n\t\t\t\t\r\n\t\t\t\t$(\".fc-close-formsubmit\").click(function(){\r\n\t\t\t\t\t$(\"#formsubmitoverlay\").fadeOut(300);\r\n\t\t\t\t});\r\n\t\t\t})\r\n\t\t</script> \r\n\t\t';\r\n\t\t\r\n\t\treturn $returntext;\r\n\t}", "function mh_contact_email_callback( $post) {\n\twp_nonce_field('mh_save_contact_email_data', 'mh_contact_email_meta_box_nonce');\n\n\t$value = get_post_meta($post->ID, '_contact_email_value_key', true);\n\n\techo '<label for=\"mh_contact_email_field\"> User Email Address</label>';\n\techo '<input type=\"email\" id=\"mh_contact_email_field\" name=\"mh_contact_email_field\" value=\"' . esc_attr( $value ) . '\" size=\"\"25 />';\n}", "function mbinfo_figure_meta_box_callback( $post ) {\n\n // Add a nonce field so we can check for it later.\n wp_nonce_field( 'mbinfo_figure_save_meta_box_data', 'mbinfo_figure_meta_box_nonce' );\n\n /*\n * Use get_post_meta() to retrieve an existing value\n * from the database and use the value for the form.\n */\n $value = get_post_meta( $post->ID, Mbinfo::$ATTR_DATE, true );\n\n echo '<label>Date ' .\n '<input type=\"text\" id=\"' . Mbinfo::$ATTR_DATE . '\" name=\"' . Mbinfo::$ATTR_DATE . '\" value=\"' . $value . '\"/></label>';\n}", "function putCookie($CODE)\r\n{\r\n\tsetcookie(\"LOGINRE\", $CODE, time()+604800); /* expire in 1 hour */ \r\n\t//setcookie(\"LOGINRE\", $CODE, time()+31536000, \"/\", \".redefectiva.net\", 0);\r\n}", "function mbYTPlayer_init()\n{\n global $mbYTPlayer_version;\n\n load_plugin_textdomain('mbYTPlayer', false, basename( dirname( __FILE__ ) ) . '/languages/' );\n\n if (isset($_COOKIE['ytpdonate']) && $_COOKIE['ytpdonate'] !== \"false\") {\n update_option('mbYTPlayer_donate', \"true\");\n echo '\n <script type=\"text/javascript\">\n expires = \"; expires= -10000\";\n document.cookie = \"ytpdonate=false\" + expires + \"; path=/\";\n </script>\n ';\n }\n \n}", "function wc_setcookie($name, $value, $expire = 0, $secure = \\false, $httponly = \\false)\n {\n }", "public static function showV3($site_key, $after_field_id = 'Form_ContactForm_Comment', $debug = 'no_debug', $extra_class = \"mt-4 mb-4\")\n {\n $debug_mode = ($debug == 'no_debug') ? '' : 'return false; // debug mode is on ';\n\n if (strpos($extra_class, 'show-inline-badge') !== false) {\n $api_js = \"https://www.google.com/recaptcha/api.js?render=explicit&onload=alexGetRecaptchaValue\";\n $recaptcha_client = \"var recaptchaClient = grecaptcha.render('CustomContactUsForm-inline-badge', {\n 'sitekey': '$site_key',\n 'badge': 'inline',\n 'size': 'invisible'\n });\";\n } else {\n $api_js = \"https://www.google.com/recaptcha/api.js?render=$site_key&onload=alexRecaptchaReadyCallback\";\n $recaptcha_client = \"var recaptchaClient = '$site_key';\";\n }\n $str = <<<EOF\n <!-- Start of the Google Recaptcha v3 code -->\n \n <script src=\"$api_js\"></script>\n\n\n <script>\n \n // Display google recaptcha v3\n var alexEL = document.getElementById('$after_field_id');\n if ( alexEL ) {\n alexEL.parentNode.insertAdjacentHTML('afterend', '<div id=\"CustomContactUsForm-inline-badge\" class=\"inline-badge-div $extra_class\"></div><input type=\"hidden\" id=\"CustomContactUsForm-recaptcha\" name=\"g-recaptcha-response\">');\n }\n\n function alexGetRecaptchaValue(id) {\n $debug_mode\n if ( typeof(id)=='undefined' ) {\n id = 'CustomContactUsForm-recaptcha';\n }\n if ( document.getElementById(id) && document.getElementById(id).value == '' ) {\n\n $recaptcha_client\n\n grecaptcha.ready(function() {\n grecaptcha.execute(recaptchaClient, {\n action: 'CustomContactUsForm'\n }).then(function (token) {\n document.getElementById(id).value = token;\n });\n });\n }\n\n }\n\n setTimeout('alexGetRecaptchaValue(\"CustomContactUsForm-recaptcha\")', 10000);\n \n function alexRecaptchaReadyCallback() {\n if ( alexEL ) {\n alexEL.addEventListener('click',function(e){\n alexGetRecaptchaValue(\"CustomContactUsForm-recaptcha\");\n });\n }\n } \n\n </script>\n\n <!-- End of the Google Recaptcha code -->\nEOF;\n return $str;\n }", "function signup_box() {\n global $post;\n\n if ( !$signup_type = get_post_meta($post->ID, '_registration_type_value', true) ) {\n $signup_type = $this->options['registration-type'];\n }\n\n if ( !$signupCount = get_post_meta($post->ID, '_event_signups_value', true) ) {\n $signupCount = $this->options['signups-default'];\n }\n\n if ( !$overflowCount = get_post_meta($post->ID, '_event_overflow_value', true) ) {\n $overflowCount = $this->options['overflow-default'];\n }\n\n include ($this->pluginPath . '/includes/meta-boxes/signups-box.php');\n }", "function woocommerce_login_form($args = array())\n {\n }", "function wp_setcookie($username, $password = '', $already_md5 = \\false, $home = '', $siteurl = '', $remember = \\false)\n{\n}", "function strawberryfields_meta_box_callback( $post ) {\n\n\t// Add an nonce field so we can check for it later.\n\twp_nonce_field( 'strawberryfields_meta_box', 'strawberryfields_meta_box_nonce' );\n\n\t/*\n\t * Use get_post_meta() to retrieve an existing value\n\t * from the database and use the value for the form.\n\t */\n\t$value = get_post_meta( $post->ID, '_strawberry_fields_favorite_song', true );\n\n\techo '<label for=\"strawberryfields_song_for_post\">';\n\t_e( 'What Beatles song goes with this post?', 'strawberryfields_textdomain' );\n\techo '</label> ';\n\techo '<input type=\"text\" id=\"strawberryfields_song_for_post\" name=\"strawberryfields_song_for_post\" value=\"' . esc_attr( $value ) . '\" size=\"25\" />';\n\n}", "function cah_ajax_field_new_query_name_cb( $args ) {\n ?>\n <input type=\"hidden\" name=\"<?= $args['option_name'] . '[do_what]' ?>\" value=\"new\">\n <input\n id=\"<?= esc_attr( $args['label_for'] ); ?>\"\n name=\"<?= $args['option_name'] . '[' . $args['label_for'] . ']' ?>\"\n type=\"text\"\n size=\"30\"\n maxlength=\"30\"\n placeholder=\"My Custom Query\"\n required>\n <span class=\"tooltip\"> Name your new query.</span>\n <?\n}", "function gp_post_flickr_meta_box_callback($post) {\n\t wp_nonce_field(basename(__FILE__), 'gp_post_flickr_meta_box_nonce'); \n\t $value = get_post_meta( $post->ID, '_gp_post_flickr_meta_photoset_key', true );\n\n\n\t echo '<label for=\"photoset-id-post-class\">';\n\t\t_e(\"Add photoset ID from Flickr to get all the photos from that set\", '12345678');\n\t\techo '</label>';\n\t\techo '<input type=\"text\" id=\"gp_post_flickr_field_set_id\" name=\"gp_post_flickr_field_set_id\" value=\"' . esc_attr( $value ) . '\" size=\"25\" />';\n}", "public function preferences() {\n\n $prefs = $this->prefs;\n ?>\n <div class=\"hook-instance\">\n <h3><?php _e('Points on first sale for referrer', 'mycred'); ?></h3>\n <div class=\"row\">\n <div class=\"col-lg-2 col-md-6 col-sm-12 col-xs-12\">\n <div class=\"form-group\">\n <label for=\"<?php echo $this->field_id(array('referrer' => 'creds')); ?>\"><?php echo $this->core->plural(); ?></label>\n <input type=\"text\" name=\"<?php echo $this->field_name(array('referrer' => 'creds')); ?>\" id=\"<?php echo $this->field_id(array('referrer' => 'creds')); ?>\" value=\"<?php echo $this->core->number($prefs['referrer']['creds']); ?>\" class=\"form-control\" />\n </div>\n </div>\n <div class=\"col-lg-4 col-md-6 col-sm-12 col-xs-12\">\n <div class=\"form-group\">\n <label for=\"<?php echo $this->field_id(array('referrer', 'limit')); ?>\"><?php _e('Limit', 'mycred'); ?></label>\n <?php echo $this->hook_limit_setting($this->field_name(array('referrer', 'limit')), $this->field_id(array('referrer', 'limit')), $prefs['referrer']['limit']); ?>\n </div>\n </div>\n <div class=\"col-lg-6 col-md-12 col-sm-12 col-xs-12\">\n <div class=\"form-group\">\n <label for=\"<?php echo $this->field_id(array('referrer' => 'log')); ?>\"><?php _e('Log template', 'mycred'); ?></label>\n <input type=\"text\" name=\"<?php echo $this->field_name(array('referrer' => 'log')); ?>\" id=\"<?php echo $this->field_id(array('referrer' => 'log')); ?>\" value=\"<?php echo esc_attr($prefs['referrer']['log']); ?>\" class=\"form-control\" />\n <span class=\"description\"><?php echo $this->available_template_tags(array('general')); ?></span>\n <span class=\"description\"> <?php _e('add %product_name% in log template represnet value of referred product in log'); ?></span>\n\n </div>\n\n </div>\n\n </div>\n\n </div>\n <div class=\"hook-instance\">\n <h3><?php _e('Points on first sale for referee', 'mycred'); ?></h3>\n <div class=\"row\">\n <div class=\"col-lg-2 col-md-6 col-sm-12 col-xs-12\">\n <div class=\"form-group\">\n <label for=\"<?php echo $this->field_id(array('referee' => 'creds')); ?>\"><?php echo $this->core->plural(); ?></label>\n <input type=\"text\" name=\"<?php echo $this->field_name(array('referee' => 'creds')); ?>\" id=\"<?php echo $this->field_id(array('referee' => 'creds')); ?>\" value=\"<?php echo $this->core->number($prefs['referee']['creds']); ?>\" class=\"form-control\" />\n </div>\n </div>\n <div class=\"col-lg-4 col-md-6 col-sm-12 col-xs-12\">\n <div class=\"form-group\">\n <label for=\"<?php echo $this->field_id(array('referee', 'limit')); ?>\"><?php _e('Limit', 'mycred'); ?></label>\n <?php echo $this->hook_limit_setting($this->field_name(array('referee', 'limit')), $this->field_id(array('referee', 'limit')), $prefs['referee']['limit']); ?>\n </div>\n </div>\n <div class=\"col-lg-6 col-md-12 col-sm-12 col-xs-12\">\n <div class=\"form-group\">\n <label for=\"<?php echo $this->field_id(array('referee' => 'log')); ?>\"><?php _e('Log template', 'mycred'); ?></label>\n <input type=\"text\" name=\"<?php echo $this->field_name(array('referee' => 'log')); ?>\" id=\"<?php echo $this->field_id(array('referee' => 'log')); ?>\" value=\"<?php echo esc_attr($prefs['referee']['log']); ?>\" class=\"form-control\" />\n <span class=\"description\"><?php echo $this->available_template_tags(array('general')); ?></span>\n </div>\n </div>\n </div>\n\n </div>\n <div class=\"hook-instance\">\n <h3><?php _e('Referral Links', 'mycred'); ?></h3>\n <div class=\"row\">\n <div class=\"col-lg-6 col-md-6 col-sm-12 col-xs-12\">\n <div class=\"form-group\">\n <label for=\"<?php echo $this->field_id(array('setup' => 'links')); ?>-numeric\"><input type=\"radio\" name=\"<?php echo $this->field_name(array('setup' => 'links')); ?>\" id=\"<?php echo $this->field_id(array('setup' => 'links')); ?>-numeric\" <?php checked($prefs['setup']['links'], 'numeric'); ?> value=\"numeric\" /> <?php _e('Assign numeric referral IDs to each user.', 'mycred'); ?></label>\n <span class=\"description\"><?php printf('%s: %s', __('Example', 'mycred'), esc_url(add_query_arg(array($this->ref_key => 1), home_url('/')))); ?></span>\n </div>\n </div>\n <div class=\"col-lg-6 col-md-6 col-sm-12 col-xs-12\">\n <div class=\"form-group\">\n <label for=\"<?php echo $this->field_id(array('setup' => 'links')); ?>-username\"><input type=\"radio\" name=\"<?php echo $this->field_name(array('setup' => 'links')); ?>\" id=\"<?php echo $this->field_id(array('setup' => 'links')); ?>-username\" <?php checked($prefs['setup']['links'], 'username'); ?> value=\"username\" /> <?php _e('Assign usernames as IDs for each user.', 'mycred'); ?></label>\n <span class=\"description\"><?php printf('%s: %s', __('Example', 'mycred'), esc_url(add_query_arg(array($this->ref_key => 'john+doe'), home_url('/')))); ?></span>\n </div>\n </div>\n </div>\n <div class=\"row\">\n\n <div class=\"col-lg-6 col-md-6 col-sm-12 col-xs-12\">\n <div class=\"form-group\">\n <label><?php _e('Available Shortcodes', 'mycred'); ?></label>\n <p class=\"form-control-static\">\n <a href=\"http://codex.mycred.me/shortcodes/mycred_woocommerce_referral/\" target=\"_blank\">[mycred_woocommerce_referral]</a>\n </p>\n </div>\n </div>\n </div>\n </div>\n\n <?php\n// do_action('mycred_affiliate_prefs', $prefs, $this);\n }" ]
[ "0.7517184", "0.67336386", "0.6207939", "0.6125926", "0.5979121", "0.58795094", "0.5874751", "0.5855656", "0.58415484", "0.5802828", "0.57753813", "0.576489", "0.5741566", "0.573963", "0.5735254", "0.5722787", "0.56882113", "0.56764567", "0.5667639", "0.5662902", "0.5647339", "0.5625334", "0.5601474", "0.55867887", "0.55809534", "0.55806005", "0.5574084", "0.5572964", "0.556687", "0.55536455", "0.55478436", "0.5545272", "0.55372894", "0.55370027", "0.5536559", "0.5529765", "0.55206424", "0.55150723", "0.551159", "0.5508425", "0.5498959", "0.5492227", "0.54917836", "0.5484852", "0.5480237", "0.547063", "0.5468383", "0.5466416", "0.5462339", "0.544106", "0.5432228", "0.54173714", "0.5401257", "0.5384814", "0.5381607", "0.5363927", "0.5351394", "0.5348926", "0.5347865", "0.5342071", "0.53284866", "0.53251415", "0.5321814", "0.5321535", "0.53175765", "0.5311712", "0.53042245", "0.52939314", "0.5289634", "0.5286607", "0.528608", "0.52824104", "0.52814144", "0.52811676", "0.5275864", "0.5273253", "0.52727026", "0.5272434", "0.5270689", "0.52697927", "0.52693987", "0.5264457", "0.52601975", "0.52564263", "0.525578", "0.5243554", "0.5238545", "0.5231587", "0.52220285", "0.5217883", "0.5215089", "0.5208713", "0.5207097", "0.52063245", "0.520315", "0.52025634", "0.5197848", "0.5194384", "0.51927596", "0.5188164" ]
0.7612525
0
/Poll BBB /Poll() sends UDP packet to BBB to get the temperature value and receives the value from the BBB.
/Пoll BBB /Poll() отправляет UDP-пакет на BBB для получения значения температуры и получает это значение с BBB.
function poll() { $remote_ip =$GLOBALS['BBBip']; /* IP Address of BBB */ $remote_port = $GLOBALS['BBBport']; /* Port number of BBB */ $rip = ''; $rport = 0; fwrite($GLOBALS['log'],date("Y-F-d H:i:s",time())." > Polling BBB...\n"); socket_sendto($GLOBALS['sock'], $GLOBALS['led'], 100 , 0 , $remote_ip , $remote_port); /* Send UDP packet to BBB */ echo $GLOBALS['led']." <br>"; fwrite($GLOBALS['log'],date("Y-F-d H:i:s",time())." > UDP ".$GLOBALS['led']." sent to BBB.\n"); /* Blocking Receive for UDP packet from BBB */ $r = socket_recvfrom($GLOBALS['sock'], $buf, 2, 0, $rip, $rport); echo "$buf received with size $r<br> from IP: $rip , port: $rport"; if(!strcmp($buf,"OK")) { echo "<br>LED OK<br>"; fwrite($GLOBALS['log'],date("Y-F-d H:i:s",time())." > LED OK.\n"); } else { echo "<br>LED Fail<br>"; fwrite($GLOBALS['log'],date("Y-F-d H:i:s",time())." > LED Fail.\n"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function poll()\r\n {\r\n\t $remote_ip = $GLOBALS['BBBip'];\t/*\tIP Address of BBB\t*/\r\n\t $remote_port = $GLOBALS['BBBport'];\t\t\t/*\tPort number of BBB\t*/\r\n\t $rip = '';\r\n\t $rport = 0;\r\n\t \r\n\t fwrite($GLOBALS['log'],date(\"Y-F-d H:i:s:u\",time()).\" > Polling BBB...\\n\");\r\n\t if($GLOBALS['precision']==1)\r\n\t {\r\n\t\tsocket_sendto($GLOBALS['sock'], $GLOBALS['temp1'], 100 , 0 , $remote_ip , $remote_port);\t/*\tSend UDP packet to BBB\t*/\r\n\t\tfwrite($GLOBALS['log'],date(\"Y-F-d H:i:s:u\",time()).\" > UDP \".$GLOBALS['temp1'].\" sent to BBB.\\n\");\r\n\t }\r\n\t if($GLOBALS['precision']==2)\r\n\t {\r\n\t\tsocket_sendto($GLOBALS['sock'], $GLOBALS['temp2'], 100 , 0 , $remote_ip , $remote_port);\t/*\tSend UDP packet to BBB\t*/\r\n\t\tfwrite($GLOBALS['log'],date(\"Y-F-d H:i:s:u\",time()).\" > UDP \".$GLOBALS['temp2'].\" sent to BBB.\\n\");\r\n\t }\r\n\t if($GLOBALS['precision']==3)\r\n\t {\r\n\t\tsocket_sendto($GLOBALS['sock'], $GLOBALS['temp3'], 100 , 0 , $remote_ip , $remote_port);\t/*\tSend UDP packet to BBB\t*/\r\n\t\tfwrite($GLOBALS['log'],date(\"Y-F-d H:i:s:u\",time()).\" > UDP \".$GLOBALS['temp3'].\" sent to BBB.\\n\");\r\n\t }\r\n\t \r\n\t $r = socket_recvfrom($GLOBALS['sock'], $buf, 512, 0, $rip, $rport);\t/*\tBlocking Receive for UDP packet from BBB\t*/\r\n\t \r\n\t fwrite($GLOBALS['log'],date(\"Y-F-d H:i:s:u\",time()).\" > $r bytes of Temperature received: $buf degrees from IP: $rip , port: $rport.\\n\");\t \r\n\t //static $x =30;\r\n\t //return ++$x;\r\n\t return (float)$buf;\r\n }", "function ss_lwrfenergypoller ($myip, $wifilinkip, $sendport, $recvport, $broadcast_string) {\n\t\n//Send the broadcast string, as a UDP datagram to the bvroadcast address on your network\n$sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);\nsocket_set_option($sock, SOL_SOCKET, SO_BROADCAST, 1);\nsocket_sendto($sock, $broadcast_string, strlen($broadcast_string), 0, '255.255.255.255', $sendport);\nsocket_close($sock);\n\n//Listen for the response\n$socket = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);\nsocket_bind($socket, $myip, $recvport);\nsocket_recvfrom($socket, $buf, 1024 , 0, $wifilinkip , $sendport);\n\n//Ignore the first 5 characters of the response\n$watts = substr($buf, 5);\n\n//The explode function breaks the rest of the string up into multiple variables\n//using \",\" as the delimiter\nlist($current_watts, $max_watts, $total_today, $total_yesterday) = explode(\",\", $watts);\n\n//I only really care about the current reading, since cacti can work out the rest\n//I can easily return the other values if necessary by returning them here\nreturn $current_watts;\n}", "public function poll();", "function updateCpsTemp($hwRsp) {\n\n // filters data brought from $cmd and extracts temp values\n $newCmd = substr($hwRsp, 1, -1);\n $splitCmd = explode(',', $newCmd);\n\n foreach($splitCmd as $parameter) {\n $paraExtract = explode(\"=\", $parameter);\n if ($paraExtract[0] == \"ackid\") {\n $ackid = strtoupper($paraExtract[1]);\n }\n else if ($paraExtract[0] == \"zone1\") {\n $temp1 = $paraExtract[1];\n }\n else if ($paraExtract[0] == \"zone2\") {\n $temp2 = $paraExtract[1];\n }\n else if ($paraExtract[0] == \"zone3\") {\n $temp3 = $paraExtract[1];\n }\n else if ($paraExtract[0] == \"zone4\") {\n $temp4 = $paraExtract[1];\n }\n }\n\n if($ackid === null || $temp1===null || $temp2===null || $temp3===null || $temp4 === null) {\n $result['rslt'] = \"fail\";\n $result['reason'] = \"NO TEMPERATURE INFO RECEIVED\";\n return $result;\n }\n\n sscanf($temp1, \"%d%s\", $temp1Val, $temp1Unit);\n sscanf($temp2, \"%d%s\", $temp2Val, $temp2Unit);\n sscanf($temp3, \"%d%s\", $temp3Val, $temp3Unit);\n sscanf($temp4, \"%d%s\", $temp4Val, $temp4Unit);\n\n $temp_hi = max($temp1Val, $temp2Val, $temp3Val, $temp4Val);\n\n // combine temp value and unit to send to t_nodes\n $newTemp_hi = $temp_hi . $temp1Unit;\n \n // extract node number from cmd\n $ackidArray = explode(\"-\", $ackid);\n $node = $ackidArray[0];\n\n $nodeObj = new NODE($node);\n if($nodeObj->rslt == 'fail') {\n $result['rslt'] = $nodeObj->rslt;\n $result['reason'] = $nodeObj->reason;\n return $result;\n }\n \n // update t_nodes w/ highest temp\n $nodeObj->updateTemp($newTemp_hi);\n\n \n $refObj = new REF();\n if ($refObj->rslt == FAIL) {\n $result['rslt'] = $refObj->rslt;\n $result['reason'] = $refObj->reason;\n return $result;\n }\n\n // obtain temp_max from refObj\n $tempMax = $refObj->ref['temp_max'];\n\n // makes new alm if temp is out of range\n if ($temp_hi > $tempMax) {\n $almid = $ackid . '-T';\n $almObj = new ALMS($almid);\n if (count($almObj->rows) == 0) {\n $src = 'POWER';\n $almtype = 'TEMPERATURE';\n $cond = 'TEMPERATURE OUT-OF-RANGE';\n $sa = 'N';\n $sev = 'MIN';\n $remark = $almid . ' : ' . $cond;\n $almObj = new ALMS();\n $almObj->newAlm($almid, $src, $almtype, $cond, $sev, $sa, $remark);\n if ($almObj->rslt == 'fail') {\n $result[\"rslt\"] = \"fail\";\n $result[\"reason\"] = \"Fail to create alarm\";\n return $result;\n }\n }\n }\n\n // sys-clr alm if temp is in range\n if ($temp_hi < $tempMax) {\n $almid = $ackid . '-T';\n $almObj = new ALMS($almid);\n if (count($almObj->rows) !== 0) {\n $remark = 'SYSTEM CLEAR ALARM: ' . $almid . ' : TEMPERATURE IN-RANGE';\n $almObj->sysClr($almid, $remark);\n if ($almObj->rslt == 'fail') {\n $result[\"rslt\"] = \"fail\";\n $result[\"reason\"] = \"Fail to clear alarm\";\n return $result;\n }\n }\n }\n $result['rslt'] = SUCCESS;\n $result['reason'] = \"TEMP ALARM UPDATE SUCCESS\";\n return $result;\n}", "private function getWifiBridge()\r\n {\r\n $_WiFisock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);\r\n if ( !$_WiFisock)\r\n die(socket_strerror(socket_last_error()));\r\n \r\n if (!socket_set_option($_WiFisock, SOL_SOCKET, SO_REUSEADDR, 1))\r\n die(socket_strerror(socket_last_error()));\r\n \r\n if (!socket_bind($_WiFisock, $this->_MyIp, $this->_WiFiPort))\r\n {\r\n socket_close($_WiFisock);\r\n die(socket_strerror(socket_last_error()));\r\n }\r\n\r\n socket_set_option($_WiFisock, SOL_SOCKET, SO_RCVTIMEO, array('sec'=>1,'usec'=>0));\r\n socket_clear_error();\r\n\r\n // \"AT+Q\\r\" send first to leave wifi control mode\r\n\r\n $msg = \"HF-A11ASSISTHREAD\";\r\n \r\n socket_set_option($_WiFisock, SOL_SOCKET, SO_BROADCAST, 1);\r\n if (!socket_sendto($_WiFisock, $msg, strlen($msg), 0, $this->_LedIp, $this->_WiFiPort))\r\n {\r\n socket_close($_WiFisock);\r\n die(socket_strerror(socket_last_error()));\r\n }\r\n\r\n usleep(50000); // 50ms delay\r\n \r\n while(true)\r\n {\r\n $buffer = null;\r\n $adr = '';\r\n $prt = 0;\r\n\r\n $erg = socket_recvfrom($_WiFisock, $buffer, 512, 0, $adr, $prt); // we receive our own broadcast herer first\r\n\r\n if ($erg===false)\r\n {\r\n // no bytes available, socket closed\r\n socket_close($_WiFisock);\r\n die(\"LED Controller not found\");\r\n }\r\n elseif ($erg===0)\r\n {\r\n // socket closed\r\n efree($buffer);\r\n socket_close($_WiFisock);\r\n die(socket_strerror(socket_last_error()));\r\n }\r\n else // 192.168.178.74,F0FE6B319886,HF-LPB100\r\n { // +-+---------------- magic signature bytes\r\n $erg = false;\r\n $arr = explode(\",\", $buffer);\r\n if (count($arr)==3 && strlen($arr[1])==12) // && $arr[2]=='HF-LPB100' \r\n {\r\n $this->_LedIp = $arr[0]; // controller IP address\r\n $this->_LedSig = substr($arr[1], 9, 3); // 3 signature bytes (last 3 byte of controller MAC)\r\n socket_close($_WiFisock);\r\n return true;\r\n }\r\n }\r\n }\r\n \r\n socket_close($_WiFisock);\r\n return false;\r\n }", "public function transfer()\r\n {\r\n $this->poll();\r\n }", "public function getrawdata(){\n\t\t// responds JSON data of reading to ajax poll.\n\t\t\n\t\t\n\t\t$this->model->getrawdata();\n\t\t\n\t}", "public function run() {\n\n //open data flow\n $teleinfoBuffer = $this->_teleinfoBuffer;\n $handle = fopen($teleinfoBuffer, \"r\");\n\n //wait packet end to start process on the next one\n while (fread($handle, 1) != chr(2));\n\n //Run\n $char = '';\n $teleinfoPacketString = '';\n while (1) {\n $time = time();\n \n //read all char until the packet end\n while ($char != chr(2)) {\n $char = fread($handle, 1);\n if ($char != chr(2)) {\n $teleinfoPacketString .= $char;\n }\n }\n\n $teleinfoPacket = new TeleinfoPacket($teleinfoPacketString, $time);\n\n //notify observers\n $this->notifyObservers(self::EVENT_RECEIVED, $teleinfoPacket);\n $teleinfoPacketString = '';\n $char = '';\n }\n }", "public function poll()\n {\n\n session_write_close(); // prevents locking\n // If output buffering hasn't been setup yet...\n if(count(ob_list_handlers()) < 2) {\n // Buffer output, but flush always after any output\n ob_start();\n ob_implicit_flush(true);\n \n // Set the headers such that our response doesn't get cached\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 set_time_limit(30);\n $this->users->needLogin();\n $factor = 0;\n $start = time();\n $answer = NULL;\n do\n {\n $answer = $this->poll->dispatchEvents();\n for ($time = 2.5 + min($factor * 1.5, 7.5); $time >= 1; $time -= 0.5)\n {\n if ($this->poll->getBreak($_SESSION['user']['user_id']))\n break;\n usleep(500); \n }\n $factor++;\n }\n while (!$answer && time() - $start < 30);\n if ($answer)\n $this->template->addJSON($answer);\n $this->template->addJSON(array());\n }", "public function getHumidity()\n{\nreturn $this->humidity;\n}", "function getpu() {\n\n$enabledebug=SETTINGS_APPMILUR_ENABLEDEBUG;\nSQLexec(\"update milur_config set value='' where parametr='DEBUG'\");\t \n\nif ($enabledebug==1) {$debug=date('m/d/Y H:i:s', time()).\"<br>\";}\n\n$host= SETTINGS_APPMILUR_IP;\n$port= SETTINGS_APPMILUR_PORT;\n// $socket = socket_create(AF_INET, SOCK_STREAM, getprotobyname(\"tcp\")); // Create Socket\n$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);\nsocket_set_option($socket,SOL_SOCKET, SO_RCVTIMEO, array(\"sec\"=>5, \"usec\"=>0));\n\n\n if (socket_connect($socket, $host, $port)) { //Connect\n\n\n\n\nif ($enabledebug==1) {$debug.='Socket СЃonnected '.$host.'('. $port.')<br>';}\n\n\n//$objname='current'; \n$objname=SETTINGS_APPMILUR_MODEL;\n\naddClassObject('Milur',$objname);\n\n\n$t1=gg($objname.\".t1\");\n$t2=gg($objname.\".t2\");\nif (!isset($t1)) {sg($objname.\".t1\",SETTINGS_APPMILUR_T1);}\nif (!isset($t2)) {sg($objname.\".t2\",SETTINGS_APPMILUR_T2);}\n\n//sg($objname.\".lasttimestamp\",gg($objname.\".timestamp\")); \n\n \n \n//circle 1\n $sendStr = 'ff 08 00 ff ff ff ff ff ff 4f 2d'; // 16 hexadecimal data\n $sendStrArray = str_split(str_replace(' ', '', $sendStr), 2); // The 16 binary data into a set of two arrays\n \n for ($j = 0; $j <count ($sendStrArray); $j++) {\n socket_write ($socket, Chr (hexdec ($sendStrArray[$j]))); // by group data transmission\n }\n $receiveStr = \"\";\n $receiveStr = socket_read($socket, 1024, PHP_BINARY_READ); // The 2 band data received \n $receiveStrHex = bin2hex ($receiveStr); // the 2 hexadecimal data convert 16 hex\n\nif ($enabledebug==1) {\n$debug.=\"cicle 1 connect<br>\";\n$debug.=\" send:\".$sendStr.\"<br>\" ; \n//$debug.=\" answer:\" . $receiveStr.\"<br>\"; \n//$debug.=\" answerSTR:\" .hex2str($receiveStrHex).\"<br>\";\n$debug.=\" answerHEX:\" . $receiveStrHex.'<br>';\n}\n//echo $debug;\n\n\n \n \n//цикл 3\n $sendStr = 'ff 01 03 00 61'; // P\n $sendStrArray = str_split(str_replace(' ', '', $sendStr), 2); // The 16 binary data into a set of two arrays\n \n for ($j = 0; $j <count ($sendStrArray); $j++) {\n socket_write ($socket, Chr (hexdec ($sendStrArray[$j]))); // by group data transmission\n }\n $receiveStr = \"\";\n $receiveStr = socket_read($socket, 2048); // The 2 band data received \n $receiveStrHex = bin2hex ($receiveStr); // the 2 hexadecimal data convert 16 hex\n \n$phex=substr($receiveStrHex,12,2).substr($receiveStrHex,10,2).substr($receiveStrHex,8,2);\n$p=hexdec($phex)/1000; \n\nif ($enabledebug==1) {\n$debug.=\"cicle 3 P:<br>\";\n$debug.= \"P:\".$sendStr .'<br>'; \n//$debug.= \" answer:\" . $receiveStr; \n//$debug.= \" answerSTR:\" .hex2str($receiveStrHex);\n$debug.= \" answerHEX:\" . $receiveStrHex.'<br>';\n$debug.= \" answerPHEX:\" . $phex.'<br>'; \n$debug.= \" answerP:\" . $p.'<br>';\n}\n if ($p<>0) sg($objname.\".P\",round($p));\n// if ($p<>0) sg($objname.\".timestamp\",time()); \n\n \n \n //цикл 4\n $sendStr = 'ff 01 01 81 a0 '; // U\n $sendStrArray = str_split(str_replace(' ', '', $sendStr), 2); // The 16 binary data into a set of two arrays\n \n for ($j = 0; $j <count ($sendStrArray); $j++) {\n socket_write ($socket, Chr (hexdec ($sendStrArray[$j]))); // by group data transmission\n }\n $receiveStr = \"\";\n $receiveStr = socket_read($socket, 2048); // The 2 band data received \n $receiveStrHex = bin2hex ($receiveStr); // the 2 hexadecimal data convert 16 hex\n \n$uhex=substr($receiveStrHex,12,2).substr($receiveStrHex,10,2).substr($receiveStrHex,8,2);\n$u=hexdec($uhex)/1000; \n\nif ($enabledebug==1) {\n$debug.=\"cicle 4 U:<br>\";\n$debug.= \"U:\".$sendStr.'<br>' ; \n//$debug.=\" answer:\" . $receiveStr; \n//$debug.=\" answerSTR:\" .hex2str($receiveStrHex);\n$debug.=\" answerHEX:\" . $receiveStrHex.'<br>'; \n$debug.=\" answerUHEX:\" . $uhex.'<br>'; \n$debug.=\" answerU:\" . $u.'<br>'; \n}\n if ($u<>0) sg($objname.\".U\",round($u)); \n\nsocket_close($socket); // Close Socket \nif ($enabledebug==1) {$debug.='Socked closed.<br>';}\n\n\n } \nelse \n{\nif ($enabledebug==1) {$debug='Error create socket '.$host.'('. $port.')';}\n}\n socket_close($socket); // Close Socket \nif ($enabledebug==1) {\nSQLexec(\"update milur_config set value='$debug' where parametr='DEBUG'\");\t \nsg($objname.'.debug',$debug);}\n\n\n\nSQLexec(\"update milur_config set value=UNIX_TIMESTAMP() where parametr='LASTCYCLE_TS'\");\t\t \nSQLexec(\"update milur_config set value=now() where parametr='LASTCYCLE_TXT'\");\t\t \t \n\n }", "function getvalues($id) {\n\n debmes('Вызвали getvalues id:'.$id, 'bletool');\n\n$cmd_rec = SQLSelectOne(\"SELECT * FROM ble_devices where ID='$id'\");\n$id=$cmd_rec['ID'];\n$mac=$cmd_rec['MAC'];\n$type=$cmd_rec['TYPE'];\n\n\n\n\n$sql='update ble_devices set UPDATED=\\''.date('Y-m-d H:i:s').\"', UPDATEDTS='\".time().\"' where ID=\".$id;\nsqlexec($sql);\ndebmes($sql, 'bletool');\n\n\n\n\n\ndebmes(\"get values from $mac $type run at \".gg('sysdate').' '.gg('timenow').\"<br>\", 'bletool');\n\n//file_put_contents($file, $debug);\n\n\n//echo \"это линус\";\n//$cmd='nmap -sn 192.168.1.0/24';\n//$cmd='echo 192.168.1.{1..254}|xargs -n1 -P0 ping -c1|grep \"bytes from\"';\n$data = array();\n\n$this->resethci();\n\nswitch ($type) {\n\n case \"eQ-3-radiator-thermostat\":\n require(DIR_MODULES.$this->name.'/eQ-3-radiator-thermostat_values.php');\nbreak;\n case \"mi-band-1s\":\n// require(DIR_MODULES.$this->name.'/eQ-3-radiator-thermostat.php');\nbreak;\n\n case \"mi-band-2\":\n// require(DIR_MODULES.$this->name.'/mi-band-2.php');\nbreak;\n case \"mi-flora-plant\":\n require(DIR_MODULES.$this->name.'/mi-flora-plant_values.php');\n//\t}}\nbreak;\n\n case \"xiaomi-smart-thermostat\":\n require(DIR_MODULES.$this->name.'/xiaomi-smart-thermostat_values.php');\n//\t}}\nbreak;\n\n case \"xiaomi-smart-thermostat2\":\n require(DIR_MODULES.$this->name.'/xiaomi-smart-thermostat2_values.php');\n//\t}}\nbreak;\n\n\n}\n\n\n}", "function tampilDataPolling() {\n $tahun_grafik = $this->tahun_grafik;\n $bulan_tabel = $this->bulan_tabel;\n $bulan = $this->bulan;\n\n $this->en_rekap->bulan = $this->bulan;\n $this->en_rekap->tahun = $this->tahun_grafik;\n//------------------------------------------------------------------------------\n $tahun_exist_grafik = $this->en_rekap->getData(\"tahunexist\");\n $count_tahun_exist_grafik = mysqli_num_rows($tahun_exist_grafik);\n\n $data_polling_tahunan = $this->en_rekap->getData(\"tahunan\");\n $count_data_polling_tahunan = mysqli_num_rows($data_polling_tahunan);\n if ($count_data_polling_tahunan != 0) {\n $data_polling_tahunan_jadi = mysqli_fetch_array($data_polling_tahunan);\n } else {\n $data_polling_tahunan_jadi[0] = 0;\n }\n\n $tahun_exist_bulan = $this->en_rekap->getData(\"tahunexist\");\n $count_tahun_exist_bulan = mysqli_num_rows($tahun_exist_bulan);\n\n $data_polling_bulanan = $this->en_rekap->getData(\"bulanan\");\n $count_data_polling_bulanan = mysqli_num_rows($data_polling_bulanan);\n if ($count_data_polling_bulanan != 0) {\n $data_polling_bulanan_jadi = mysqli_fetch_array($data_polling_bulanan);\n } else {\n $data_polling_bulanan_jadi[0] = 0;\n }\n//------------------------------------------------------------------------------\n $dr_bulan = $this->en_rekap->getData(\"bulanan_1\");\n if (mysqli_num_rows($dr_bulan) == 0) {\n $dj_bulan[0] = $dj_bulan[1] = $dj_bulan[2] = $persen_tp_bulan = $persen_p_bulan = $persen_sp_bulan = 0;\n $dj_bulan[3] = $dj_bulan[0] + $dj_bulan[1] + $dj_bulan[2];\n } else {\n $dj_bulan = mysqli_fetch_array($dr_bulan);\n if (($dj_bulan[0] + $dj_bulan[1] + $dj_bulan[2]) == 0) {\n $persen_tp_bulan = 0;\n $persen_p_bulan = 0;\n $persen_sp_bulan = 0;\n } else {\n $persen_tp_bulan = ($dj_bulan[0] / ($dj_bulan[0] + $dj_bulan[1] + $dj_bulan[2])) * 100;\n $persen_p_bulan = ($dj_bulan[1] / ($dj_bulan[0] + $dj_bulan[1] + $dj_bulan[2])) * 100;\n $persen_sp_bulan = ($dj_bulan[2] / ($dj_bulan[0] + $dj_bulan[1] + $dj_bulan[2])) * 100;\n }\n }\n $total_bulanan = $dj_bulan[3];\n\n\n $dr_tahun = $this->en_rekap->getData(\"tahunan_1\");\n $djc_tahun[3] = 0;\n if (mysqli_num_rows($dr_tahun) == 0) {\n for ($i = 1; $i <= 12; $i++) {\n $dj_tahun[$i][0] = $dj_tahun[$i][1] = $dj_tahun[$i][2] = $persen_tp_tahun[$i] = $persen_p_tahun[$i] = $persen_sp_tahun[$i] = 0;\n $djc_tahun[3] += $dj_tahun[$i][0] + $dj_tahun[$i][1] + $dj_tahun[$i][2];\n }\n } else {\n $dj_tahun = mysqli_fetch_array($dr_tahun);\n for ($i = 1; $i <= 12; $i++) {\n if ($dj_tahun[4] == $i) {\n $persen_tp_tahun[$i] = ($dj_tahun[0] / ($dj_tahun[0] + $dj_tahun[1] + $dj_tahun[2])) * 100;\n $persen_p_tahun[$i] = ($dj_tahun[1] / ($dj_tahun[0] + $dj_tahun[1] + $dj_tahun[2])) * 100;\n $persen_sp_tahun[$i] = ($dj_tahun[2] / ($dj_tahun[0] + $dj_tahun[1] + $dj_tahun[2])) * 100;\n $djc_tahun[3] += $dj_tahun[3];\n $dj_tahun = mysqli_fetch_array($dr_tahun);\n } else {\n $persen_tp_tahun[$i] = 0;\n $persen_p_tahun[$i] = 0;\n $persen_sp_tahun[$i] = 0;\n $djc_tahun[3] += 0;\n }\n }\n }\n $total_tahunan = $djc_tahun[3];\n\n $lokasi_cetak = \"\";\n $q_sql = $this->en_konten->getLokasi();\n if (mysqli_num_rows($q_sql) != 0) {\n $r_sql = mysqli_fetch_array($q_sql);\n $lokasi_cetak = $r_sql[0];\n }\n\n include_once './bn_data_poling.php';\n }", "public function socketBroadcastNotify()\n {\n }", "public function postPoll() {\n\t\t// not implemented\n\t}", "public function pollAction()\n {\n try {\n $feeds = Doctrine_Query::create()\n ->from('Zfplanet_Model_Feed f')\n ->where(\n 'f.uri NOT IN (SELECT s.topic_url FROM Zfplanet_Model_Subscription s'\n . ' WHERE s.subscription_state = ?)',\n Zend_Feed_Pubsubhubbub::SUBSCRIPTION_VERIFIED)\n ->execute();\n if (!$feeds) {\n return;\n }\n $chelper = $this->_helper->getHelper('Cache');\n if ($chelper->hasCache('feed')) {\n Zend_Feed_Reader::setCache($chelper->getCache('feed'));\n Zend_Feed_Reader::useHttpConditionalGet();\n }\n $notifier = $this->_getTwitterNotifier();\n foreach($feeds as $feed) {\n if ($notifier->isEnabled()) $feed->setTwitterNotifier($notifier);\n $feed->setLuceneIndexer($this->_getLuceneIndexer());\n $feed->setLogger($this->getInvokeArg('bootstrap')->getResource('ErrorLog'));\n $feed->synchronise();\n }\n $this->_helper->getHelper('Cache')->removePagesTagged(array('allentries'));\n $this->_doPubsubhubbubNotification();\n echo 'Polling completed without error', PHP_EOL;\n } catch (Exception $e) {\n $logger = $this->getInvokeArg('bootstrap')->getResource('ErrorLog');\n $message = 'Other Error/Exception: ' . get_class($e) . ': '\n . $e->getMessage() . PHP_EOL\n . 'Stack Trace: ' . PHP_EOL . $e->getTraceAsString();\n $logger->log($message, Zend_Log::ERR);\n echo $message;\n }\n }", "public function ping() {\n\n\t\t$data = Nabaztag::getInstance(NAB_SERIAL)->getNewData();\n\n\t\tif(isset($data['tts'])) {\n\n\t\t\t$mb = new MessageBlock(rand(11111, 99999));\n\t\t\t$mb->addLocalStream('broadcast/broad/tts/' . urlencode($data['tts']));\n\t\t\t$this->data = $mb->getHex();\n\n\t\t\tNabaztag::getInstance(NAB_SERIAL)->setSeen('tts', true);\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function pollInterval()\n {\n return 10;\n }", "public function sendConfig()\n {\n $config = $this->config;\n $message = new MSMessage($this->id);\n\n $message->set($this->node_address, $this->sensor_address, 'V_VAR1',0);\n $message->setMessage($config->dimmer_delay);\n MqttSender::sendMessage($message);\n\n usleep(1000*10);\n $message->set($this->node_address, $this->sensor_address, 'V_VAR2',0);\n $message->setMessage($config->level_min);\n MqttSender::sendMessage($message);\n usleep(1000*10);\n $message->set($this->node_address, $this->sensor_address, 'V_VAR3',0);\n $message->setMessage($config->level_max);\n MqttSender::sendMessage($message);\n usleep(1000*10);\n $message->set($this->node_address, $this->sensor_address, 'V_VAR4',0);\n $message->setMessage($config->enable_delay);\n MqttSender::sendMessage($message);\n }", "function getinfo2() {\n$enabledebug=SETTINGS_APPMILUR_ENABLEDEBUG;\nSQLexec(\"update milur_config set value='' where parametr='DEBUG'\");\t \n\nif ($enabledebug==1) {$debug=date('m/d/Y H:i:s', time()).\"<br>\";}\n\n$host= SETTINGS_APPMILUR_IP;\n$port= SETTINGS_APPMILUR_PORT;\n// $socket = socket_create(AF_INET, SOCK_STREAM, getprotobyname(\"tcp\")); // Create Socket\n$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);\nsocket_set_option($socket,SOL_SOCKET, SO_RCVTIMEO, array(\"sec\"=>5, \"usec\"=>0));\n\n\n\n if (socket_connect($socket, $host, $port)) { //Connect\n\nif ($enabledebug==1) {$debug.='Socket СЃonnected '.$host.'('. $port.')<br>';}\n\n\n//$objname='current'; \n$objname=SETTINGS_APPMILUR_MODEL;\n\naddClassObject('Milur',$objname);\n\n$t1=gg($objname.\".t1\");\n$t2=gg($objname.\".t2\");\nif (!isset($t1)) {sg($objname.\".t1\",SETTINGS_APPMILUR_T1);}\nif (!isset($t2)) {sg($objname.\".t2\",SETTINGS_APPMILUR_T1);}\n\n//sg($objname.\".lasttimestamp\",gg($objname.\".timestamp\")); \n\n \n \n//circle 1\n $sendStr = 'ff 08 00 ff ff ff ff ff ff 4f 2d'; // 16 hexadecimal data\n $sendStrArray = str_split(str_replace(' ', '', $sendStr), 2); // The 16 binary data into a set of two arrays\n \n for ($j = 0; $j <count ($sendStrArray); $j++) {\n socket_write ($socket, Chr (hexdec ($sendStrArray[$j]))); // by group data transmission\n }\n $receiveStr = \"\";\n $receiveStr = socket_read($socket, 1024, PHP_BINARY_READ); // The 2 band data received \n $receiveStrHex = bin2hex ($receiveStr); // the 2 hexadecimal data convert 16 hex\n\nif ($enabledebug==1) {\n$debug.=\"cicle 1 connect<br>\";\n$debug.=\" send:\".$sendStr.\"<br>\" ; \n//$debug.=\" answer:\" . $receiveStr.\"<br>\"; \n//$debug.=\" answerSTR:\" .hex2str2($receiveStrHex).\"<br>\";\n$debug.=\" answerHEX:\" . $receiveStrHex.'<br>';\n}\n//echo $debug;\n\n\n \n //цикл 2\n \n $sendStr = 'ff 01 20 41 b8'; // модель\n $sendStrArray = str_split(str_replace(' ', '', $sendStr), 2); // The 16 binary data into a set of two arrays\n \n for ($j = 0; $j <count ($sendStrArray); $j++) {\n socket_write ($socket, Chr (hexdec ($sendStrArray[$j]))); // by group data transmission\n }\n\n $receiveStr = \"\";\n $receiveStr = socket_read($socket, 1024, PHP_BINARY_READ); // The 2 band data received \n $receiveStrHex = bin2hex ($receiveStr); // the 2 hexadecimal data convert 16 hex\nif ($enabledebug==1) {\n$debug.=\"cicle 2 model:<br>\";\n$debug.=\"send:\".$sendStr .\"<br>\"; \n//$debug.=\"answer:\" . $receiveStr.\"<br>\"; \n//$debug.=\"answerSTR:\" .hex2str2($receiveStrHex).\"<br>\";\n$debug.=\"answerHEX:\" . $receiveStrHex.'<br>';\n}\n\nif ($receiveStr<>0) sg($objname.\".model\",$receiveStr); \n//if ($receiveStr<>0) sg($objname.\".timestamp\",time()); \n \n\nsocket_close($socket); // Close Socket \nif ($enabledebug==1) {$debug.='Socked closed.<br>';}\n\n\n } \nelse \n{\nif ($enabledebug==1) {$debug='Error create socket '.$host.'('. $port.')';}\n}\n socket_close($socket); // Close Socket \nif ($enabledebug==1) {\nSQLexec(\"update milur_config set value='$debug' where parametr='DEBUG'\");\t \nsg($objname.'.debug',$debug);}\n\n\n\nSQLexec(\"update milur_config set value=UNIX_TIMESTAMP() where parametr='LASTCYCLE_TS'\");\t\t \nSQLexec(\"update milur_config set value=now() where parametr='LASTCYCLE_TXT'\");\t\t \t \n\n }", "function updateCpsVolt($hwRsp) {\n \n $variableArray = ['voltage1', 'voltage2', 'voltage3', 'voltage4'];\n $voltArray = [];\n $responseArray = convertRspToKeyValueArray($hwRsp);\n foreach($responseArray as $key=>$value) {\n if (in_array($key, $variableArray)) {\n sscanf($value, \"%d%s\", $volt, $unit);\n if (is_numeric($volt)) {\n $voltArray[] = $volt;\n }\n }\n }\n\n // Check if empty then return fail\n if (count($voltArray) === 0) {\n $result['rslt'] = \"fail\";\n $result['reason'] = \"NO VOLTAGE INFO RECEIVED\";\n return $result;\n }\n\n // Obtain ackid\n $ackid = \"\";\n if (isset($responseArray['ackid'])) {\n $ackid = $responseArray['ackid'];\n } else {\n $result['rslt'] = \"fail\";\n $result['reason'] = \"MISSING ACKID\";\n return $result;\n }\n\n // Obtain node from ackid\n $ackidArray = explode(\"-\", $ackid);\n $node = $ackidArray[0];\n\n // get lowest and highest values from volt\n $volt_hi = max($voltArray);\n $volt_low = min($voltArray);\n \n $newVolt_hiVal = round((int)($volt_hi/1000));\n $newVolt_lowVal = round((int)($volt_low/1000));\n \n // put units back onto volt values to prepare sending to t_nodes\n // $newVolt_hi = round((int)($volt_hi/1000)) . 'V';\n // $newVolt_low = round((int)($volt_low/1000)) . 'V';\n $newVolt_hi = round((int)($volt_hi/1000)) . 'V';\n $newVolt_low = round((int)($volt_low/1000)) . 'V';\n\n $refObj = new REF();\n if ($refObj->rslt == FAIL) {\n $result['rslt'] = $refObj->rslt;\n $result['reason'] = $refObj->reason;\n return $result;\n }\n\n $voltRange = $refObj->ref['volt_range'];\n \n $voltRangeArray = explode(\"-\", $voltRange);\n $minVolt = $voltRangeArray[0];\n $maxVolt = $voltRangeArray[1];\n \n $nodeObj = new NODE($node);\n if($nodeObj->rslt == 'fail') {\n $result['rslt'] = $nodeObj->rslt;\n $result['reason'] = $nodeObj->reason;\n return $result;\n }\n // write to t_nodes the volt_hi by default or the voltage that is out of range\n if ($volt_low < $minVolt) {\n $nodeObj->updateVolt($newVolt_low);\n }\n else{\n $nodeObj->updateVolt($newVolt_hi);\n }\n\n // makes new alm if voltage is out of range\n if (($newVolt_hiVal > $maxVolt) || ($newVolt_lowVal < $minVolt)) {\n $almid = $ackid . '-V';\n $almObj = new ALMS($almid);\n if (count($almObj->rows) == 0) {\n $src = 'POWER';\n $almtype = 'VOLTAGE';\n $cond = 'VOLTAGE OUT-OF-RANGE';\n $sa = 'N';\n $sev = 'MIN';\n $remark = $hwRsp . ' - ' . $almid . ' : ' . $cond . 'VOLT_HI=' . $newVolt_hiVal . '||VOLT_LOW=' . $newVolt_lowVal;\n $almObj = new ALMS();\n $almObj->newAlm($almid, $src, $almtype, $cond, $sev, $sa, $remark);\n //logError if failed here\n }\n }\n\n // sys-clr alm if voltage is in range\n if (($newVolt_hiVal <= $maxVolt) && ($newVolt_lowVal >= $minVolt)) {\n $almid = $ackid . '-V';\n $almObj = new ALMS($almid);\n if (count($almObj->rows) !== 0) {\n $remark = 'SYSTEM CLEAR ALARM: ' . $almid . ' : VOLTAGE IN-RANGE';\n $almObj->sysClr($almid, $remark);\n //logError if failed here\n }\n }\n $result['rslt'] = SUCCESS;\n $result['reason'] = \"VOLTAGE ALARM UPDATE SUCCESS\";\n return $result;\n}", "public function listen()\n {\n $read = $write = array();\n while (true) {\n $poll = new \\ZMQPoll();\n $poll->add($this->socket, \\ZMQ::POLL_IN);\n\n $events = $poll->poll($read, $write, $this->heartbeat_interval);\n\n if ($events) {\n $message = new Message($this->socket);\n $message->recv();\n\n $sender = $message->pop();\n $message->pop(); // empty, don't need this\n $header = $message->pop();\n\n switch($header) {\n case(Mdp::CLIENT):\n $this->clientProcess($sender, $message);\n break;\n case(Mdp::WORKER):\n $this->workerProcess($sender, $message);\n break;\n default:\n $this->addRecord(Logger::ALERT, 'Unknown Header', array('header' => $header));\n break;\n }\n }\n\n if (microtime(true) > $this->heartbeat_at) {\n $this->purgeWorkers();\n foreach ($this->workers as $worker) {\n $this->workerSend($worker, Mdp::HEARTBEAT);\n }\n $this->heartbeat_at = microtime(true) + ($this->heartbeat_interval / 1000);\n }\n\n $this->addRecord(Logger::DEBUG, 'Stats', array(\n 'workers' => count($this->workers),\n //'waiting' => count($this->waiting),\n 'servicesCount' => count($this->services),\n 'service' => array_keys($this->services),\n 'memory' => array(\n 'memory_limit' => ini_get('memory_limit'),\n 'usage/peak' => call_user_func(function () {\n $convert = function($size) {\n $unit = array('b','kb','mb','gb','tb','pb');\n return round($size/pow(1024,($i=floor(log($size,1024)))),2).''.$unit[$i];\n };\n return $convert(memory_get_usage(true)).'/'.$convert(memory_get_peak_usage(true));\n }),\n ),\n ));\n }\n }", "function show_linea_sensor($BBDD_NAME, $BBDD_TABLE_ARDUINO, $conexion){\n\tmysql_select_db(\"$BBDD_NAME\", $conexion)\n\tor die(\"Error en la selección de la base de datos\");\n\n\t#Efectuamos la consulta SQL\n\t$tabla = mysql_query (\"select * from $BBDD_TABLE_ARDUINO\" )\n\tor die(\"Error en la consulta SQL\");\n\n\t//Asignación del ultimo valor de la tabla a las variables\n\twhile ($registro = mysql_fetch_array($tabla)){\n\t \n\t\t$Time=$registro['TIME'];\n\t\t$temperatura= $registro['Temperatura'];\n\t\t$humedad= $registro['Humedad'];\n\t\t$corriente= $registro['Corriente'];\n\t\t\n\t}\n\t\t$dispositivo= $BBDD_TABLE_ARDUINO;\n\n\tif ($BBDD_TABLE_ARDUINO==\"arduino1\"){\n\t\t\t\n\t\t\tglobal $temp_sup_1;\n\t\t\tglobal $hum_sup_1;\n\t\t\tglobal $temp_inf_1;\n\t\t\tglobal $hum_inf_1;\n\t\t\t\n\t\t\t$variable_error = comprobar_error($temp_sup_1, $temp_inf_1, $hum_sup_1, $hum_inf_1, $Time, $temperatura, $humedad, $corriente, $dispositivo);\n\t\t\t\n\t\t\t//imprimir los datos de arduino en fondo verde o rojo\n\t\t\tif($variable_error=='0')\t//color verde\n\t\t\t{\n\t\t\t\t?><header class=\"panel-heading bg-success font-bold\" style=\"font-size:18px\">CPD Merino</header>\n\t\t\t\t\t<div class=\"panel-body bg-success lter\" style=\"font-size:15px ; text-align:left\"><?php\n\t\t\t\t\t\tshow_results_bbdd_sensores($temperatura, $humedad, $corriente, $temp_inf_1, $temp_sup_1, $hum_inf_1, $hum_sup_1);\n\t\t\t\t?>\n\t\t\t\t\t</div>\n\t\t\t\t<?php\n\n\t\t\t}\n\t\t\telse{\t\t\t\t\t//color rojo\n\t\t\n\t\t\t\t?><header class=\"panel-heading bg-danger font-bold\" style=\"font-size:18px\">CPD Merino</header>\n\t\t\t\t\t<div class=\"panel-body bg-danger lter\" style=\"font-size:15px ; text-align:left\"><?php\n\t\t\t\t\t\tshow_results_bbdd_sensores($temperatura, $humedad, $corriente, $temp_inf_1, $temp_sup_1, $hum_inf_1, $hum_sup_1);\n\t\t\t\t?>\n\t\t\t\t\t</div>\n\t\t\t\t<?php\n\t\t\n\t\t\t\t}\n\t}\n\t\n\n\tif ($BBDD_TABLE_ARDUINO==\"arduino2\"){\n\n\t\t\tglobal $temp_sup_2;\n\t\t\tglobal $hum_sup_2;\n\t\t\tglobal $temp_inf_2;\n\t\t\tglobal $hum_inf_2;\n\t\t\t\n\t\t\t$variable_error = comprobar_error($temp_sup_2, $temp_inf_2, $hum_sup_2, $hum_inf_2, $Time, $temperatura, $humedad, $corriente, $dispositivo);\n\t\t\t\n\t\t\t//imprimir los datos de arduino en fondo verde o rojo\n\t\t\tif($variable_error=='0')\t//color verde\n\t\t\t{\n\t\t\t\t?><header class=\"panel-heading bg-success font-bold\" style=\"font-size:18px\">CPD Administración</header>\n\t\t\t\t\t<div class=\"panel-body bg-success lter\" style=\"font-size:15px ; text-align:left\"><?php\n\t\t\t\t\t\tshow_results_bbdd_sensores($temperatura, $humedad, $corriente, $temp_inf_2, $temp_sup_2, $hum_inf_2, $hum_sup_2);\n\t\t\t\t?>\n\t\t\t\t\t</div>\n\t\t\t\t<?php\n\n\t\t\t}\n\t\t\telse{\t\t\t\t\t//color rojo\n\t\t\n\t\t\t\t?><header class=\"panel-heading bg-danger font-bold\" style=\"font-size:18px\">CPD Administración</header>\n\t\t\t\t\t<div class=\"panel-body bg-danger lter\" style=\"font-size:15px ; text-align:left\"><?php\n\t\t\t\t\t\tshow_results_bbdd_sensores($temperatura, $humedad, $corriente, $temp_inf_2, $temp_sup_2, $hum_inf_2, $hum_sup_2);\n\t\t\t\t?>\n\t\t\t\t\t</div>\n\t\t\t\t<?php\n\t\t\n\t\t\t\t}\n\n\t}\n\n\tif ($BBDD_TABLE_ARDUINO==\"arduino3\"){\n\t\n\t\t\tglobal $temp_sup_3;\n\t\t\tglobal $hum_sup_3;\n\t\t\tglobal $temp_inf_3;\n\t\t\tglobal $hum_inf_3;\n\t\t\t\n\t\t\t$variable_error = comprobar_error($temp_sup_3, $temp_inf_3, $hum_sup_3, $hum_inf_3, $Time, $temperatura, $humedad, $corriente, $dispositivo);\n\t\t\t\n\t\t\t//imprimir los datos de arduino en fondo verde o rojo\n\t\t\tif($variable_error=='0')\t//color verde\n\t\t\t{\n\t\t\t\t?><header class=\"panel-heading bg-success font-bold\" style=\"font-size:18px\">WISP Lomas</header>\n\t\t\t\t\t<div class=\"panel-body bg-success lter\" style=\"font-size:15px ; text-align:left\"><?php\n\t\t\t\t\t\tshow_results_bbdd_sensores($temperatura, $humedad, $corriente, $temp_inf_3, $temp_sup_3, $hum_inf_3, $hum_sup_3);\n\t\t\t\t?>\n\t\t\t\t\t</div>\n\t\t\t\t<?php\n\n\t\t\t}\n\t\t\telse{\t\t\t\t\t//color rojo\n\t\t\n\t\t\t\t?><header class=\"panel-heading bg-danger font-bold\" style=\"font-size:18px\">WISP Lomas</header>\n\t\t\t\t\t<div class=\"panel-body bg-danger lter\" style=\"font-size:15px ; text-align:left\"><?php\n\t\t\t\t\t\tshow_results_bbdd_sensores($temperatura, $humedad, $corriente, $temp_inf_3, $temp_sup_3, $hum_inf_3, $hum_sup_3);\n\t\t\t\t?>\n\t\t\t\t\t</div>\n\t\t\t\t<?php\n\t\t\n\t\t\t\t}\n\n\t}\n\n\tif ($BBDD_TABLE_ARDUINO==\"arduino4\"){\n\n\t\t\tglobal $temp_sup_4;\n\t\t\tglobal $hum_sup_4;\n\t\t\tglobal $temp_inf_4;\n\t\t\tglobal $hum_inf_4;\n\t\t\t\n\t\t\t$variable_error = comprobar_error($temp_sup_4, $temp_inf_4, $hum_sup_4, $hum_inf_4, $Time, $temperatura, $humedad, $corriente, $dispositivo);\n\t\t\t\n\t\t\t//imprimir los datos de arduino en fondo verde o rojo\n\t\t\tif($variable_error=='0')\t//color verde\n\t\t\t{\n\t\t\t\t?><header class=\"panel-heading bg-success font-bold\" style=\"font-size:18px\">WISP Hospital</header>\n\t\t\t\t\t<div class=\"panel-body bg-success lter\" style=\"font-size:15px ; text-align:left\"><?php\n\t\t\t\t\t\tshow_results_bbdd_sensores($temperatura, $humedad, $corriente, $temp_inf_4, $temp_sup_4, $hum_inf_4, $hum_sup_4);\n\t\t\t\t?>\n\t\t\t\t\t</div>\n\t\t\t\t<?php\n\n\t\t\t}\n\t\t\telse{\t\t\t\t\t//color rojo\n\t\t\n\t\t\t\t?><header class=\"panel-heading bg-danger font-bold\" style=\"font-size:18px\">WISP Hospital</header>\n\t\t\t\t\t<div class=\"panel-body bg-danger lter\" style=\"font-size:15px ; text-align:left\"><?php\n\t\t\t\t\t\tshow_results_bbdd_sensores($temperatura, $humedad, $corriente, $temp_inf_4, $temp_sup_4, $hum_inf_4, $hum_sup_4);\n\t\t\t\t?>\n\t\t\t\t\t</div>\n\t\t\t\t<?php\n\t\t\n\t\t\t\t}\n\n\t}\n\n\n\t}", "public function update(float $temperature, float $humidity, float $pressure): void\n {\n }", "function read_sensor_data_custom () {\n\n\n // read ds18b20 sensor data\n\t$DS18B20_reading = exec (\"sudo python /home/pi/remote_pi/read_DS18B20_thermometers.py\");\n\tif ($DS18B20_reading <> \"\")\t{\n $DS18B20_reading = \"{\" . $DS18B20_reading . \"}\";\n\t\t/// must be tested.\n\t\t$DS18B20_reading = json_decode($DS18B20_reading);\n //error_log (\"$$$$$$$$$$$$$$$$$$$$$$ DS18B20_reading = $DS18B20_reading\");\n\n foreach ( $DS18B20_reading as $key => $value) {\n\n // error_log (\"kkkkkkkkkkkkkkkkkey $key\");\n // error_log (\"vvvvvvvvvvvvvvvalue $value\");\n // chech if value is in \"reasonable\" range. e.g. not an error.\n if ($value > -50 && $value < 200){\n add_sensor_reading($key,$value);\n }\n }\n\t}\n\n}", "function ReadHoldRegisters() {\n\n\t\t//Retourne des valeurs aleatoires entre 0 et 4095 sans ouvrir les sockets\t\n\t\tif ( $this->Simulation ) {\n\t\t\tif ( $this->Nbre > 125 ) $this->Nbre = 125;\n\t\t\tfor ( $i=0; $i<=$this->Nbre; $i++ ) {\n\t\t\t\t$buffer[400000 + $this->DebutAdresse + $i] = rand(0, 4095); //Simulation ANA\n//\t\t\t\t$buffer[400000 + $this->DebutAdresse + $i] = ( 256*rand(65, 90) + rand(65, 90) ) ;//Simulation ASCII\n\t\t\t}\n\t\t\treturn $buffer;\n\t\t} // FIN Simulation\n\n\t\tif ( !$this->MemoConn ) return array();\n\n\t\tif ( $this->BridgeRoute ) $this->SetBridgeRoute();\n\n\t\tif ( $this->Nbre > 125 ) $this->Nbre = 125;\n\t\t$obuf = array ( 0=>chr(0), 1=>chr(0), 2=>chr(0), 3=>chr(0), 4=>chr(0), 5=>chr(6), 6=>chr($this->Unit), 7=>chr(3) ) ;\n\t\tlist( $obuf[9], $obuf[8] ) = $this->WordToBytes( (int)$this->DebutAdresse );\n\t\tlist( $obuf[11], $obuf[10] ) = $this->WordToBytes( (int)$this->Nbre );\n\n\t\tif ( $this->Debug ) { //Affichage des octets ?s si en mode Debug\n\t\t\techo \"<b>Registros leidos</b><br>\"; \n\t\t\tfor ($i=0;$i<count($obuf);$i++ ) {\n\t\t\t\techo \"Octeto [$i] =\". ord($obuf[$i]).\"<br>\";\n\t\t\t}\n\t\t}\t\t\n\n\t\t//--------- ECRITURE DU SOCKET --------------\n\t\tfwrite( $this->Fp, implode( \"\", $obuf ) );\n\n\t\t//--------- LECTURE DU SOCKET ---------------\n\t\t$OctetRecu = fgetc($this->Fp); //Lire le 1er octet du socket pour utiliser apr?socket_get_status()\n\t\t$status = socket_get_status($this->Fp);\n\t\t$OctetRecu .= fread($this->Fp, $status[\"unread_bytes\"]); //Lire les octets restants\n\n\t\tif ( $OctetRecu[7] != $obuf[7] ) { \n\t\t\techo \"<FONT SIZE='3' COLOR='#090762'><b>\";\n\t\t\techo \"Error de lectura de los registros de salidas de \".sprintf(\"4%05d\", $this->DebutAdresse).\" \".sprintf(\"4%05d\", ($this->DebutAdresse + $this->Nbre)).\"<br>\"; \n\t\t\tfor ( $i=0; $i<count($OctetRecu); $i++ ) {\n\t\t\t\techo \"OctRecu[$i] =\". ord($OctetRecu[$i]).\"<br>\";\n\t\t\t}\n\t\t\techo \"</b></FONT>\\n\";\n\t\t\t$this->MemoConn = False;\n\t\t\treturn array();\n\t\t}\n\t\t//Recupération des DATAs\n\t\t$i = 1;\n\t\t$buffer = array();\n\t\tif ($this->TypeFloat) {\n\t\t\tfor ($j=0; $j < ord($OctetRecu[8]); $j=$j+4) {\n\t\t\t\t$buffer[400000 + $this->DebutAdresse + $i] = $this->BytesToFloat( ord($OctetRecu[$j+9]), ord($OctetRecu[$j+10]), ord($OctetRecu[$j+11]), ord($OctetRecu[$j+12]) );\n\t\t\t\t$i++;\n\t\t\t\t$i++;\n\t\t\t}\n\t\t} elseif ($this->TypeDouble) {\n\t\t\tfor ($j=0; $j < ord($OctetRecu[8]); $j=$j+4) {\n\t\t\t\t$buffer[400000 + $this->DebutAdresse + $i] = $this->BytesToDouble( ord($OctetRecu[$j+9]), ord($OctetRecu[$j+10]), ord($OctetRecu[$j+11]), ord($OctetRecu[$j+12]) );\n\t\t\t\t//$buffer[400000 + $this->DebutAdresse + $i] = $this->BytesToDouble( ord($OctetRecu[$j+11]), ord($OctetRecu[$j+12]), ord($OctetRecu[$j+9]), ord($OctetRecu[$j+10]) );\n\t\t\t\t$i++;\n\t\t\t\t$i++;\n\t\t\t}\n\t\t} else {\n\t\t\tfor ($j=0; $j < ord($OctetRecu[8]); $j=$j+2) {\n\t\t\t\t$buffer[400000 + $this->DebutAdresse + $i] = $this->BytesToWord( $OctetRecu[$j+9], $OctetRecu[$j+10] );\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Affichage des octets recu si mode Debug\n\t\tif ( $this->Debug ) {\n\t\t\tfor ( $i=0; $i<strlen($OctetRecu); $i++ ) {\n\t\t\t\techo \"OctRecu[$i] =\". ord($OctetRecu[$i]).\"<br>\";\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $buffer ;\n\t\t\n\t}", "public function onRun($currenttick) {\r\n\t\tif($this->waiting_for_puller) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// needs to request new data\r\n\t\tif( is_null($this->lastData) ) {\r\n\t\t\t$newPullTask = new \\BuddyChannels\\Tasks\\ReadRSSTask_ASyncPuller($this->rssurl);\r\n\t\t\t$this->plugin->getServer()->getScheduler()->scheduleAsyncTask($newPullTask);\r\n\t\t\t$this->waiting_for_puller = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// read complete\r\n\t\tforeach($this->lastData as $cur_timestamp => $cur_msg ) {\r\n\t\t\tif($cur_timestamp > $this->last_known_timestamp) {\r\n\t\t\t\t$this->last_known_timestamp = $cur_timestamp;\r\n\t\t\t}\r\n\t\t\tif( ! $this->firstRun ) {\r\n\t\t\t\t// READMORE IS [&#133;]\r\n\t\t\t\t$cur_msg = \"&f\" . str_replace( \"[&#133;]\", \"&1... read more on the website \" . $this->website, $cur_msg);\r\n\t\t\t\t$currentMessage = new \\BuddyChannels\\ForeignMessage(\r\n\t\t\t\t\t-1, // serverid\r\n\t\t\t\t\t$this->website, // servername\r\n\t\t\t\t\t\"\", // username\r\n\t\t\t\t\t\"\", // userrank\r\n\t\t\t\t\t0, // channel number\r\n\t\t\t\t\t\"Public\", // channel name\r\n\t\t\t\t\t$cur_msg, // msg \r\n\t\t\t\t\ttrue // shout\r\n\t\t\t\t);\r\n\t\t\t\techo \"DEBUG: Making new BuddyChannels Msg for $cur_msg \\n\";\r\n\t\t\t\t$newSMTask = new \\BuddyChannels\\Tasks\\SendMessageTask($currentMessage, $this->plugin);\r\n\t\t\t}\r\n\t\t}\r\n\t\t// unset data for next tick\r\n\t\t$this->lastData = null;\r\n\t\t\r\n\t\tif( $this->firstRun ) {\r\n\t\t\t\t$this->firstRun = false;\r\n\t\t\t\t// echo \"DEBUG: BuddyChannels RSS Reader started feed at timestamp $this->last_known_timestamp \\n\";\r\n\t\t}\r\n }", "function eventLoop() {\n\n\t\t// Socket not connected at all?\n\t\tif($this->socket == null)\n\t\t\treturn;\n\n\t\t// Server closed connection?\n\t\tif(feof($this->socket))\n\t\t{\n\t\t\tstream_socket_shutdown($this->socket, STREAM_SHUT_RDWR);\n\t\t\t$this->socket = null;\n\t\t\treturn;\n\t\t}\n\n\t\t//\n\t\t$byte = $this->readBytes(1, true);\n\t\tif(strlen($byte) > 0)\n\t\t{\n\t\t\t$cmd = ord($byte);\n\t\t\t$bytes = ord($this->readBytes(1,true));\n\n\t\t\t$payload = \"\";\n\t\t\tif($bytes>0)\n\t\t\t\t$payload = $this->readBytes($bytes, false);\n\n\t\t\tswitch( $cmd & 0xf0 ) {\n\t\t\t\tcase 0xd0: // PINGRESP\n\t\t\t\t\t$this->debugMessage(\"Ping response received\");\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 0x30: // PUBLISH\n\t\t\t\t\t$msg_qos = ( $cmd & 0x06 ) >> 1; // QoS = bits 1 & 2\n\t\t\t\t\t$this->processMessage($payload, $msg_qos );\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$this->timeSincePingReq = time();\n\t\t\t$this->timeSincePingResp = time();\n\t\t}\n\n\t\tif( $this->timeSincePingReq < (time() - $this->keepAlive ) ) {\n\t\t\t$this->debugMessage(\"Nothing received for a while, pinging..\");\n\t\t\t$this->sendPing();\n\t\t}\n\n\n\t\tif( $this->timeSincePingResp < (time() - ($this->keepAlive*2)) ) {\n\t\t\t$this->debugMessage(\"Not seen a package in a while, reconnecting..\");\n\t\t\tstream_socket_shutdown($this->socket, STREAM_SHUT_RDWR);\n\t\t\t$this->socket = null;\n\t\t}\n\n\t}", "function mtUptime($host) {\r\n\r\n // Instanciate MT API call\r\n $API = new routeros_api();\r\n $API->debug = false;\r\n \r\n // Set a default return value if connection to MT fails\r\n $mtuptime = 0;\r\n \r\n // Query Mikrotik\r\n if ($API->connect($host, 'admin', 'DataCom')) {\r\n $API->write('/system/resource/print');\r\n $ARRAY = $API->read();\r\n $API->disconnect();\r\n $mtuptime = ExtractUptime($ARRAY[0]['uptime']);\r\n $rawuptime = $ARRAY[0]['uptime'];\r\n };\r\n\r\n // Return Uptime\r\n return(array($mtuptime,$rawuptime));\r\n}", "public function work()\n {\n $sockResult = $this->getSock();\n $temps = $this->parseSockData($sockResult);\n\n return $temps;\n }", "public function getUpdate(){\n\t\t// responds JSON data of reading to ajax poll.\n\t\t$reqBearer = $this->bearer;\t\n\t\t\n\t\t$this->model->getUpdate($reqBearer);\n\t\t\n\t}", "function get()\n {\n $time_string = $this->thing->Read([\"nmea\", \"refreshed_at\"]);\n\n // And if there is no timestamp create one now.\n\n if ($time_string == false) {\n $time_string = $this->thing->time();\n $this->thing->Write([\"nmea\", \"refreshed_at\"], $time_string);\n }\n\n $this->nmea = $this->thing->Read([\"nmea\", \"nmea\"]);\n }", "function ping() {\r\n\t\t$response = new \\HTTP\\Response();\r\n\t\t$response->header->session = $GLOBALS['_SESSION_']->code;\r\n\t\t$response->header->method = $_REQUEST[\"method\"];\r\n\t\t$response->header->date = time();\r\n\t\t$response->message = \"PING RESPONSE\";\r\n\t\t$response->success = 1;\r\n\r\n\t\t$_comm = new \\Monitor\\Communication();\r\n\t\t$_comm->update(json_encode($response));\r\n\t\tapi_log($response);\r\n\t\tprint formatOutput($response);\r\n\t}", "public function arduino() {\n\n\t $request = Scope::getRequestScope();\n\n\t $channel1 = new Channel();\n\t $channel1->setRealPower($request->get('realPower1'));\n\t $channel1->setApparentPower($request->get('apparentPower1'));\n\t $channel1->setPowerFactor($request->get('powerFactor1'));\n\t $channel1->setVrms($request->get('Vrms1'));\n\t $channel1->setIrms($request->get('Irms1'));\n\t $channel1->setWhInc($request->get('whInc1'));\n\t $channel1->setWh($request->get('wh1'));\n\t $channel1->setPhase(1);\n\n\t $channel2 = new Channel();\n\t $channel2->setRealPower($request->get('realPower2'));\n\t $channel2->setApparentPower($request->get('apparentPower2'));\n\t $channel2->setPowerFactor($request->get('powerFactor2'));\n\t $channel2->setVrms($request->get('Vrms2'));\n\t $channel2->setIrms($request->get('Irms2'));\n\t $channel2->setWhInc($request->get('whInc2'));\n\t $channel2->setWh($request->get('wh2'));\n\t $channel2->setPhase(2);\n\n\t $channel1->persist();\n\t $channel2->persist();\n\t }", "public function pingMy()\n {\n if (!$this->Socket) {\n return false; }\n socket_set_timeout($this->Socket, 5);\n fwrite($this->Socket, \"\\xFE\\x01\"); //Send the server list ping request (two bytes)\n @$data = fread($this->Socket, 1024); //Get the info and store it in $data\n\n if ($data != false && substr($data, 0, 1) == \"\\xFF\") //Ensure we're getting a kick message as expected\n {\n $data = substr($data, 9); //Remove packet, length and starting characters\n $data = explode(\"\\x00\\x00\", $data); //0000 separated info\n $protocolVersion = $data[0]; //Get it all into separate variables\n @$serverVersion = mb_convert_encoding($data[1], 'UTF-8', 'UCS-2');;\n @$motd = $data[2];\n $motd = mb_convert_encoding($motd, 'UTF-8', 'UCS-2');\n @$players = mb_convert_encoding($data[3], 'UTF-8', 'UCS-2');\n @$max_players = mb_convert_encoding($data[4], 'UTF-8', 'UCS-2');\n sleep(0.2);\n return array('status' => 1,\n 'HostName' => $motd,\n 'Players' => $players,\n 'MaxPlayers' => $max_players,\n 'Version' => $serverVersion);\n\n }\n else\n {\n return false;\n }\n }", "protected function _handleLiveBroadcast()\n {\n $json = HttpClient::api_body_decode($this->value);\n if (!is_object($json)) {\n $this->_client->debug('Failed to decode live broadcast JSON: %s', json_last_error_msg());\n\n return;\n }\n /** @var EventPayload\\Live $livePayload */\n $livePayload = $this->_client->mapToJson($json, new EventPayload\\Live());\n switch ($this->op) {\n case self::ADD:\n $this->_rtc->emit('live-started', [$livePayload]);\n break;\n case self::REMOVE:\n $this->_rtc->emit('live-stopped', [$livePayload]);\n break;\n default:\n $this->_client->debug('Unsupported live broadcast op: \"%s\"', $this->op);\n }\n }", "function getThermalSensorsData() {\n\n\t$_gb = exec(\"/sbin/sysctl -a | grep temperature\", $dfout);\n\t$dfout_filtered = array_filter($dfout, function($v) {\n\t\treturn strpos($negsign, ' -') === false;\n\t});\n\treturn join(\"|\", $dfout_filtered);\n\n}", "public function loop()\n {\n // read until there are no more messages waiting\n while ($this->read());\n\n foreach ($this->state as $identifier => $info) {\n if ($info['last_change'] + self::RETRANSMIT_TIME < time()) {\n $info['onfail']();\n $this->state[$identifier]['last_change'] = time();\n }\n }\n\n if (time() > $this->lastControlMessage + $this->keepalive) {\n // send a ping request\n $this->pingreq();\n }\n }", "function OnVdMainLoop()\n{\n\tglobal $Ap , $Ap_Vd, $Vd_Timer, $Vd_Mbs\t;\n\n\t$Vd_Timer->RunTimer()\t;// Polling Here.\n\t// \n\tif($msg_err = $Vd_Mbs->Mbs_tmr_chk_timeout() ){\n\t\t$Ap_Vd->VDSend( \"PTW1\"\n , '-ERR' .$msg_err\n\t\t\t\t\t\t\t// $msg_err = \"NAC# Re-send [$tx_id][\". $this->Mbs_Cmd_Queue[$tx_id][\"VDCmd\" ] .\"] more than \". $this->MaxRetry_times . \" times.\" ;\n\t\t\t\t\t\t\t//\t\t\t\t \"NAC# Re-send [101][STDOA+] more than 3 times.\" ;\n\t\t\t\t\t\t\t// NAC : None Ack\n );\n\t\t//是否用另一個 ioBox 緊急停止 >> also send to another VD , and the VD send to iob engercy stop\n \n\t}\n}", "public function tick()\n {\n if(isset($this->port)){\n //setup socket for incoming connections\n try {\n /**\n * @todo fix @\n */\n $connection = @socket_accept($this->listenSocket);\n } catch (Exception $e) {\n /*\n * Some implementations could transform php-errors to exceptions\n */\n throw new ZabbixAgentSocketException('Socket error on accept.');\n }\n\n //commands processing\n if ($connection > 0) {\n $commandRaw = socket_read($connection, 1024);\n\n if ($commandRaw !== false) {\n $command = trim($commandRaw);\n try {\n $itemArguments=$this->extractArguments($command);\n $agentItem = $this->getItem($command);\n $buf = ZabbixProtocol::serialize($agentItem,$itemArguments);\n } catch (Exception $e) {\n socket_close($connection);\n throw new ZabbixAgentException(\"Serialize item error.\", 0, $e);\n }\n\n $writeResult = socket_write($connection, $buf, strlen($buf));\n socket_close($connection);\n if ($writeResult === false) {\n throw new ZabbixAgentSocketException('Socket write error.');\n }\n } else {\n throw new ZabbixAgentSocketException('Socket read error.');\n }\n }\n }\n if($this->activeAvailable)\n {\n $this->checkForActiveChecksUpdates();\n $this->processActiveChecks();\n $this->sendActiveChecksResults();\n }\n\n return $this;\n }", "function vB_DataManager_Poll(&$registry, $errtype = ERRTYPE_STANDARD)\n\t{\n\t\tparent::vB_DataManager($registry, $errtype);\n\n\t\t($hook = vBulletinHook::fetch_hook('polldata_start')) ? eval($hook) : false;\n\t}", "function processBody() {\n $data = '';\n $counter = 0;\n\n do {\n $status = socket_get_status($this->socket);\n if ($status['eof'] == 1) {\n break;\n }\n\n if ($status['unread_bytes'] > 0) {\n $buffer = fread($this->socket, $status['unread_bytes']);\n $counter = 0;\n } else {\n $buffer = fread($this->socket, 128);\n $counter++;\n usleep(2);\n }\n\n $data .= $buffer;\n } while ( ($status['unread_bytes'] > 0) || ($counter++ < 10) );\n\n return $data;\n }", "abstract public function receive_values();", "protected function poll()\n {\n // Store child socket stream.\n $this->read[] = $this->socketStream;\n $this->write[] = $this->socketStream;\n $this->except = [];\n\n do {\n // Stream_select need variable reference, so reassignment.\n $read = $this->read;\n $write = $this->write;\n $except = $this->except;\n\n // Synchronous I/O multiplexing: select / poll / epoll.\n // Waits for one of a set of file descriptors to become ready to perform I/O.\n // Warning raised if select system call is interrupted by an incoming signal,\n // timeout on zero, FALSE on error.\n // `man 2 select` seek more information if needed.\n $number = @stream_select($read, $write, $except, $this->selectTimeout);\n\n if ($number > 0) {\n foreach ($read as $socket_stream) {\n // TODO Heartbeat mechanism need timer.\n\n // If no pending connections:\n // blocking I/O socket - accept() blocks the caller until a connection is present.\n // nonblocking I/O socket - accept() fails with the error EAGAIN or EWOULDBLOCK.\n // In order to be notified of incoming connections on a socket, we can use select(2) or poll(2).\n // Remote_address is set to user ip:port.\n // `man 2 accept` seek more information if needed.\n\n $socket_connection = @stream_socket_accept($socket_stream, $this->acceptTimeout, $remote_address);\n\n if (false !== $socket_connection) {\n // Set read operations unbuffered.\n stream_set_read_buffer($socket_stream, 0);\n\n // Connect success, callback trigger.\n call_user_func($this->onConnection);\n\n // Do handshake, auto judge if handshake yet.\n if (WebSocket::doHandshake($socket_connection)) {\n while (true) {\n $decoded_string = WebSocket::decode($socket_connection);\n if ($decoded_string) {\n call_user_func_array(\n $this->onMessage,\n [new Connection($socket_connection), $decoded_string]\n );\n }\n }\n }\n }\n }\n } elseif ($number === 0 || $number === false) {\n // Timeout or Error\n continue;\n } else {\n }\n } while (true);\n }", "function get_signal($device_id,$code){\r\n\t\r\n\t$status = 0;\r\n\t$error_string = \"\";\r\n\t\r\n\t$control_arr;\r\n\t$pair_arr;\r\n\t$schedule_arr;\r\n\t\r\n\t$c_status = 0;\r\n\t$p_status = 0;\r\n\t$sc_status = 0;\r\n\t$tmp_uid_list = \"\";\r\n\t\r\n\t\tif(strcmp(trim($code),SCODE) == 0)\r\n\t\t{\r\n\t\t\t$deviceid_list = explode(\",\", $device_id);\r\n\t\t\t\r\n\t\t\t$conn = mysql_connect(DBHOST, DBUSER, DBPASS);\r\n\t\t\tif(! $conn )\r\n\t\t\t{\r\n\t\t\t\tdie('Could not connect: ' . mysql_error());\r\n\t\t\t}\r\n\t\t\tmysql_select_db(DBNAME);\r\n\t\t\t\t\t\t\r\n\t\t\t$i = 0;\r\n\t\t\twhile ($i < count($deviceid_list)) \r\n\t\t\t{\n\t\t\t\t$sql = \"SELECT * FROM power_control_sendout WHERE maindevice_id = '$deviceid_list[$i]' AND send_status = '0' ORDER BY control_on ASC\";\r\n\t $retval = mysql_query( $sql, $conn );\r\n\t\r\n\t if(! $retval )\r\n\t {\r\n\t die('Could not get data: ' . mysql_error());\r\n\t }\r\n\t\t\t\t\r\n\t while($row = mysql_fetch_array($retval, MYSQL_ASSOC))\r\n\t {\r\n\t \tif(!strcmp($row['control_type'], \"1\"))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$control_arr[] = array(\"maindevice_id\" => $row['maindevice_id'],\"device_id\" => $row['device_id'],\"control_status\" => $row['control_status']); \r\n\t\t\t\t\t\t$c_status = 1;\r\n\t\t\t\t\t\t$tmp_uid_list .= ($row['id'] . \",\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse \r\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!strcmp($row['control_type'], \"2\"))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$pair_arr[] = array(\"maindevice_id\" => $row['maindevice_id'],\"device_id\" => $row['device_id'],\"control_status\" => $row['control_status']);\r\n\t\t\t\t\t\t\t$p_status = 1;\r\n\t\t\t\t\t\t\t$tmp_uid_list .= ($row['id'] . \",\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif(!strcmp($row['control_type'], \"3\"))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$schedule_arr[] = array(\"maindevice_id\" => $row['maindevice_id'],\"device_id\" => $row['device_id'],\"control_status\" => $row['control_status'],\"schedule_on\" => $row['schedule_on']); \r\n\t\t\t\t\t\t\t\t$sc_status = 1;\r\n\t\t\t\t\t\t\t\t$tmp_uid_list .= ($row['id'] . \",\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t}\n\t\t\t\t\t}\r\n\t $update_time_val = $row['update_time'];\r\n\t }\r\n\t\t\t\t$i++;\n\t\t\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\t$status = 5;\r\n\t\t}\r\n\t\t/*echo json_encode($control_arr);echo \"<br/>\";\r\n\t\techo json_encode($pair_arr);echo \"<br/>\";\r\n\t\techo json_encode($schedule_arr);echo \"<br/>\";\r\n\t\tprint_r($control_arr);\r\n\t\tprint_r($pair_arr);\r\n\t\tprint_r($schedule_arr);\r\n\t\tdie();*/\r\n\t\t\r\n\t\t$active_req = 0;\r\n\t\t\r\n\t\tif($c_status == 1 || $p_status == 1 || $sc_status == 1)\r\n\t\t{\r\n\t\t\t$active_req = 1;\r\n\t\t}\r\n\t\t\r\n\t\t$tmp_uid_list = rtrim($tmp_uid_list,',');\r\n\t\t\r\n return (array(\"active_req\" => $active_req,\"c_status\" => $c_status,\"c_signal\" => json_encode($control_arr),\"p_status\" => $p_status,\"p_signal\" => json_encode($pair_arr),\"sc_status\" => $sc_status,\"sc_signal\" => json_encode($schedule_arr),\"uid_list\" => $tmp_uid_list ,\"status\" => $status,\"error_string\" => $error_string));\r\n\r\n}", "public function test()\n {\n $client = new ModbusClient();\n $client->connect($this->address_ip, $this->port);\n $response = $client -> readHoldingRegisters($this->slave == 0 ? 255 : $this->slave, 31999, 124);\n $endianness = false;\n if ($response->hasException())\n throw $response->getException();\n if (!$response->success())\n return false;\n $states = $response->getData()->withEndianness($endianness)->readBitmap(2, ModbusDataCollection::BIT_16);\n $output = sprintf(\"states: %s %s\", $states[0] ? 'ON' : 'OFF', ($states[1] or $states[2]) ? 'FAULT' : 'OK');\n\n\n $current = $response->getData()->withEndianness($endianness)->readFloat32(28);\n $output .= sprintf(\"\\ncurrent 1: %.2f A\", $current);\n $current = $response->getData()->withEndianness($endianness)->readFloat32(30);\n $output .= sprintf(\"\\ncurrent 2: %.2f A\", $current);\n $current = $response->getData()->withEndianness($endianness)->readFloat32(32);\n $output .= sprintf(\"\\ncurrent 3: %.2f A\", $current);\n $current = $response->getData()->withEndianness($endianness)->readFloat32(34);\n $output .= sprintf(\"\\ncurrent N: %.2f A\", $current);\n\n $voltage = $response->getData()->withEndianness($endianness)->readFloat32(56);\n $output .= sprintf(\"\\nvoltage 12: %.2f VAC\", $voltage);\n $voltage = $response->getData()->withEndianness($endianness)->readFloat32(58);\n $output .= sprintf(\"\\nvoltage 23: %.2f VAC\", $voltage);\n $voltage = $response->getData()->withEndianness($endianness)->readFloat32(60);\n $output .= sprintf(\"\\nvoltage 31: %.2f VAC\", $voltage);\n\n $voltage = $response->getData()->withEndianness($endianness)->readFloat32(62);\n $output .= sprintf(\"\\nvoltage 1N: %.2f VAC\", $voltage);\n $voltage = $response->getData()->withEndianness($endianness)->readFloat32(64);\n $output .= sprintf(\"\\nvoltage 2N: %.2f VAC\", $voltage);\n $voltage = $response->getData()->withEndianness($endianness)->readFloat32(66);\n $output .= sprintf(\"\\nvoltage 3N: %.2f VAC\", $voltage);\n\n $frequency = $response->getData()->withEndianness($endianness)->readFloat32(68);\n $output .= sprintf(\"\\nfrequency: %.2f Hz\", $frequency);\n $frequency = $response->getData()->withEndianness($endianness)->readFloat32(70);\n $output .= sprintf(\"\\nmax frequency: %.2f Hz\", $frequency);\n\n\n\n $power = $response->getData()->withEndianness($endianness)->readFloat32(72);\n $output .= sprintf(\"\\nactive power L1: %.2f kW\", $power / 10);\n $power = $response->getData()->withEndianness($endianness)->readFloat32(74);\n $output .= sprintf(\"\\nactive power L2: %.2f kW\", $power / 10);\n $power = $response->getData()->withEndianness($endianness)->readFloat32(76);\n $output .= sprintf(\"\\nactive power L3: %.2f kW\", $power / 10);\n $power = $response->getData()->withEndianness($endianness)->readFloat32(78);\n $output .= sprintf(\"\\nactive power total: %.2f kW\", $power / 10);\n $power = $response->getData()->withEndianness($endianness)->readFloat32(80);\n $output .= sprintf(\"\\nreactive power L1: %.2f kVAR\", $power / 10);\n $power = $response->getData()->withEndianness($endianness)->readFloat32(82);\n $output .= sprintf(\"\\nreactive power L2: %.2f kVAR\", $power / 10);\n $power = $response->getData()->withEndianness($endianness)->readFloat32(84);\n $output .= sprintf(\"\\nreactive power L3: %.2f kVAR\", $power / 10);\n $power = $response->getData()->withEndianness($endianness)->readFloat32(86);\n $output .= sprintf(\"\\nreactive power total: %.2f kVAR\", $power / 10);\n $power = $response->getData()->withEndianness($endianness)->readFloat32(88);\n $output .= sprintf(\"\\napparent power L1: %.2f kVA\", $power / 10);\n $power = $response->getData()->withEndianness($endianness)->readFloat32(90);\n $output .= sprintf(\"\\napparent power L2: %.2f kVA\", $power / 10);\n $power = $response->getData()->withEndianness($endianness)->readFloat32(92);\n $output .= sprintf(\"\\napparent power L3: %.2f kVA\", $power / 10);\n $power = $response->getData()->withEndianness($endianness)->readFloat32(94);\n $output .= sprintf(\"\\napparent power total: %.2f kVA\", $power / 10);\n\n $power = $response->getData()->withEndianness($endianness)->readInt64(96);\n $output .= sprintf(\"\\nactive energy: %.2f kWh\", $power);\n\n $power = $response->getData()->withEndianness($endianness)->readInt64(100);\n $output .= sprintf(\"\\nreactive energy: %.2f kWh\", $power);\n $power = $response->getData()->withEndianness($endianness)->readInt64(104);\n $output .= sprintf(\"\\nactive energy counted positively: %.2f kWh\", $power);\n $power = $response->getData()->withEndianness($endianness)->readInt64(108);\n $output .= sprintf(\"\\nactive energy counted negatively: %.2f kWh\", $power);\n $power = $response->getData()->withEndianness($endianness)->readInt64(112);\n $output .= sprintf(\"\\nreactive energy counted positively: %.2f kWh\", $power);\n $power = $response->getData()->withEndianness($endianness)->readInt64(116);\n $output .= sprintf(\"\\nreactive energy counted negatively: %.2f kWh\", $power);\n $power = $response->getData()->withEndianness($endianness)->readInt64(120);\n $output .= sprintf(\"\\ntotal apparent energy: %.2f kWh\", $power);\n\n $response = $client -> readHoldingRegisters($this->slave == 0 ? 255 : $this->slave, 32199, 14);\n $endianness = false;\n if ($response->hasException())\n throw $response->getException();\n if (!$response->success())\n return false;\n\n $powerFactor = $response->getData()->withEndianness($endianness)->readFloat32(6);\n $output .= sprintf(\"\\npower factor1: %.2f Pi\", $powerFactor);\n $powerFactor = $response->getData()->withEndianness($endianness)->readFloat32(8);\n $output .= sprintf(\"\\npower factor2: %.2f Pi\", $powerFactor);\n $powerFactor = $response->getData()->withEndianness($endianness)->readFloat32(10);\n $output .= sprintf(\"\\npower factor3: %.2f Pi\", $powerFactor);\n $powerFactor = $response->getData()->withEndianness($endianness)->readFloat32(12);\n $output .= sprintf(\"\\npower factor: %.2f Pi\", $powerFactor);\n\n return $output;\n }", "function moyenne() {\n\tglobal $heatzone,$avg,$_XTemplate;\n /*\n\t//echo(\"moyenne\");\n\t$objResponse = new xajaxResponse();\n\t//$objResponse->assign(\"TEMPERATUREEXTERIEURE\",\"innerHTML\", rand(5, 15));\n\t$objResponse->assign(\"moyenne\",\"innerHTML\", rand(5, 15));\n\t// Return Object\n return $objResponse;\n }\n */\n\t\n $DB=mysqli_connect(mysqli_HOST, mysqli_LOGIN, mysqli_PWD);\n mysqli_select_db($DB,mysqli_DB);\n // If new value receved => Refresh Interface (DIV IDs)\n $objResponse = new xajaxResponse();\n\t// Calculate MAX value measurement interval\n\tif ($avg!=1) {\n\t $sql = \"SELECT * FROM `chauffage_clef` WHERE `clef`='zWaveDelay';\";\n\t $return = mysqli_query($DB,$sql);\n $row = mysqli_fetch_array($return, MYSQLI_BOTH);\n\t $zWaveDelay = $row[\"valeur\"]; if ($zWaveDelay==\"\") { $zWaveDelay = \"5\"; }\n\t $MaxInterval = strval(intval($zWaveDelay)*2);\n\t} else {\n\t $MaxInterval = \"2\";\n\t} // END IF\n //$retour = mysqli_query($DB,\"SELECT AVG(`valeur`) FROM `\" . TABLE_CHAUFFAGE_TEMP . \"` WHERE (`moyenne` = '\".$avg.\"' AND `valeur`<>0 AND `update`>=DATE_SUB(now(), INTERVAL \".$MaxInterval.\" MINUTE));\");\n \n\t// Thermostats ONLY?\n\t$sql = \"SELECT * FROM `chauffage_clef` WHERE `clef`='HeaterOUT';\";\n\t$return = mysqli_query($DB,$sql);\n $row = mysqli_fetch_array($return, MYSQLI_BOTH);\n\t$HeaterOut = $row[\"valeur\"];\n\tif (($avg==1) && ($HeaterOut==\"\")) { $comp = \">=\"; } else { $comp = \"=\"; }\n\t$retour = mysqli_query($DB,\"SELECT AVG(`valeur`) FROM `\" . TABLE_CHAUFFAGE_TEMP . \"` WHERE (`moyenne` \".$comp.\" '\".$avg.\"' AND `valeur`<>0);\");\n\t//echo(\"HeaterOUT=\".$HeaterOut.\", sql= SELECT AVG(`valeur`) FROM `\" . TABLE_CHAUFFAGE_TEMP . \"` WHERE (`moyenne` \".$comp.\" '\".$avg.\"' AND `valeur`<>0);\");\n\t$row = mysqli_fetch_array($retour, MYSQLI_BOTH);\n\t//echo(\"Temp=\".round($row[0],1));\n $objResponse->assign(\"moyenne\",\"innerHTML\", round($row[0],1));\n\t//$objResponse->assign(\"moyenne\",\"innerHTML\", round(rand(0,25),1));\n\t// Set display mean comparator dsplayed to update by long TCP push (via /bin/temperatures.php)\n\t$sql = \"UPDATE `chauffage_clef_TEMP` SET `valeur` = '\" . $comp . \" \" . $avg . \"' WHERE `chauffage_clef_TEMP`.`clef` = 'mean_display';\";\n\t$return = mysqli_query($DB,$sql);\n\t\n\t// HEATER STATUS\n\t$heater = \"\"; $chaudiere = \"\";\n $retour = mysqli_query($DB,\"SELECT * FROM `\" . TABLE_CHAUFFAGE_CLEF_TEMP . \"` WHERE 1;\");\n while ($row = mysqli_fetch_array($retour, MYSQLI_BOTH)) {\n if ($row['clef']==\"boiler\") { if ($row['valeur'] == \"0\" ) { $heater = \"OFF\"; } \n\t else if ( $row['valeur'] == \"1\" ) { $heater = \"BOILER\";} } // END IF\n\t if ($row['clef']==\"chaudiere\") { if ($row['valeur'] == \"0\" ) { $chaudiere = \"OFF\";} \n\t else if ( $row['valeur'] == \"1\" ) { $chaudiere = \"HEATER\";} } // END IF\n } // END WHILE\n\tif ($chaudiere==\"OFF\" && $heater==\"BOILER\") { $chaudiere = \"BOILER\"; } // ENDIF\n\t$objResponse->assign(\"divchaudiere\",\"innerHTML\", $chaudiere);\n\t\n\t// ABSENCE STATUS\n\t$retour = mysqli_query($DB,\"SELECT `valeur` FROM `\" . TABLE_CHAUFFAGE_CLEF . \"` WHERE `clef` = 'absence';\");\n $row = mysqli_fetch_array($retour, MYSQLI_BOTH);\n\t$objResponse->assign(\"divabsence\",\"innerHTML\", $row[0]);\n \n\t// Close DB\n\tmysqli_close($DB);\n\n\t// Return Object\n return $objResponse; \n }", "function getcounters() {\n\n$enabledebug=SETTINGS_APPMILUR_ENABLEDEBUG;\nSQLexec(\"update milur_config set value='' where parametr='DEBUG'\");\t \n\nif ($enabledebug==1) {$debug=date('m/d/Y H:i:s', time()).\"<br>\";}\n\n$host= SETTINGS_APPMILUR_IP;\n$port= SETTINGS_APPMILUR_PORT;\n// $socket = socket_create(AF_INET, SOCK_STREAM, getprotobyname(\"tcp\")); // Create Socket\n\n$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);\nsocket_set_option($socket,SOL_SOCKET, SO_RCVTIMEO, array(\"sec\"=>5, \"usec\"=>0));\n\n\n if (socket_connect($socket, $host, $port)) { //Connect\n\nif ($enabledebug==1) {$debug.='Socket СЃonnected '.$host.'('. $port.')<br>';}\n\n\n//$objname='current'; \n$objname=SETTINGS_APPMILUR_MODEL;\n\naddClassObject('Milur',$objname);\n\n$t1=gg($objname.\".t1\");\n$t2=gg($objname.\".t2\");\nif (!isset($t1)) {sg($objname.\".t1\",SETTINGS_APPMILUR_T1);}\nif (!isset($t2)) {sg($objname.\".t2\",SETTINGS_APPMILUR_T2);}\n\n//sg($objname.\".lasttimestamp\",gg($objname.\".timestamp\")); \n\n \n \n//circle 1\n $sendStr = 'ff 08 00 ff ff ff ff ff ff 4f 2d'; // 16 hexadecimal data\n $sendStrArray = str_split(str_replace(' ', '', $sendStr), 2); // The 16 binary data into a set of two arrays\n \n for ($j = 0; $j <count ($sendStrArray); $j++) {\n socket_write ($socket, Chr (hexdec ($sendStrArray[$j]))); // by group data transmission\n }\n $receiveStr = \"\";\n $receiveStr = socket_read($socket, 1024, PHP_BINARY_READ); // The 2 band data received \n $receiveStrHex = bin2hex ($receiveStr); // the 2 hexadecimal data convert 16 hex\n\nif ($enabledebug==1) {\n$debug.=\"cicle 1 connect<br>\";\n$debug.=\" send:\".$sendStr.\"<br>\" ; \n//$debug.=\" answer:\" . $receiveStr.\"<br>\"; \n//$debug.=\" answerSTR:\" .hex2str2($receiveStrHex).\"<br>\";\n$debug.=\" answerHEX:\" . $receiveStrHex.'<br>';\n}\n//echo $debug;\n\n //цикл 5 счетчик общий\n $sendStr = 'ff 01 04 41 a3'; // S0\n $sendStrArray = str_split(str_replace(' ', '', $sendStr), 2); // The 16 binary data into a set of two arrays\n \n for ($j = 0; $j <count ($sendStrArray); $j++) {\n socket_write ($socket, Chr (hexdec ($sendStrArray[$j]))); // by group data transmission\n }\n $receiveStr = \"\";\n $receiveStr = socket_read($socket, 1024, PHP_BINARY_READ); // The 2 band data received \n $receiveStrHex = bin2hex ($receiveStr); // the 2 hexadecimal data convert 16 hex\n \n//$s0hex=substr($receiveStrHex,12,2).substr($receiveStrHex,10,2).substr($receiveStrHex,8,2);\n$s0hex=substr($receiveStrHex,7,8);\n\n\n$s0=strrev($s0hex)/1000;\n\n//$s0=hexdec($s0hex)/1000; \n\n//джоули в ват/часы\n///1 J = 0.00027777777777778 Wh\n//$sk0=$s0*0.00027777777777778; \n// echo \"S0:\".$sendStr ; \nif ($enabledebug==1) {\n$debug.=\"cicle 5 S0:<br>\";\n//$debug.= \" answer:\" . $receiveStr; \n//$debug.= \" answerSTR:\" .hex2str2($receiveStrHex);\n$debug.= \" answerHEX:\" . $receiveStrHex.'<br>'; \n$debug.= \" answerS0HEX:\" . $s1hex.'<br>'; \n$debug.= \" answerS0:\" . $s0.'<br>';\n$debug.= \" answerSK0:\" . $sk0.'<br>'; \n}\n// echo '<br>'; \nif ($s0<>0) {sg($objname.\".S0\",$s0); sg($objname.\".countersts\",time()); }\n \n//цикл 6 счетчик тариф 1\n $sendStr = 'ff 01 05 80 63'; // S1\n $sendStrArray = str_split(str_replace(' ', '', $sendStr), 2); // The 16 binary data into a set of two arrays\n \n for ($j = 0; $j <count ($sendStrArray); $j++) {\n socket_write ($socket, Chr (hexdec ($sendStrArray[$j]))); // by group data transmission\n }\n $receiveStr = \"\";\n $receiveStr = socket_read($socket, 1024, PHP_BINARY_READ); // The 2 band data received \n $receiveStrHex = bin2hex ($receiveStr); // the 2 hexadecimal data convert 16 hex\n//$receiveStrHex=ff 01 05 04 56 59 16 00 21a1 \n//$s1hex=substr($receiveStrHex,12,2).substr($receiveStrHex,10,2).substr($receiveStrHex,8,2);\n$s1hex=substr($receiveStrHex,7,8);\n//$s1=hexdec($s1hex)/1000; \n//$sk1=$s1*0.00027777777777778; \n\n$s1=strrev($s1hex)/1000;\n\n// echo \"S1:\".$sendStr ; \nif ($enabledebug==1) {\n$debug.=\"cicle 6.1 S1:<br>\";\n//$debug.= \" answer:\" . $receiveStr; \n//$debug.= \" answerSTR:\" .hex2str2($receiveStrHex);\n$debug.= \" answerHEX:\" . $receiveStrHex.'<br>'; \n$debug.= \" answerS1HEX:\" . $s1hex.'<br>'; \n$debug.= \" answerS1:\" . $s1.'<br>';\n$debug.= \" answerSK1:\" . $sk1.'<br>'; \n$debug.= \" answerS2hex:\" . $receiveStrHex.'<br>'; \nsg($objname.\"S1hex\",$receiveStrHex); \n\n}\n//echo '<br>'; \nif ($s1<>0) { sg($objname.\".S1\",$s1); sg($objname.\".countersts\",time()); } \n\n//if ($s1hex<>0) sg($objname.\"S1hex\",$s1hex); \n \n//цикл 6 счетчик тариф 2\n $sendStr = 'ff 01 06 c0 62'; // S2\n $sendStrArray = str_split(str_replace(' ', '', $sendStr), 2); // The 16 binary data into a set of two arrays\n \n for ($j = 0; $j <count ($sendStrArray); $j++) {\n socket_write ($socket, Chr (hexdec ($sendStrArray[$j]))); // by group data transmission\n }\n $receiveStr = \"\";\n $receiveStr = socket_read($socket, 1024, PHP_BINARY_READ); // The 2 band data received \n $receiveStrHex = bin2hex ($receiveStr); // the 2 hexadecimal data convert 16 hex\n \n//$s2hex=substr($receiveStrHex,12,2).substr($receiveStrHex,10,2).substr($receiveStrHex,8,2);\n$s2hex=substr($receiveStrHex,7,8);\n//$s2=hexdec($s2hex)/1000; \n$s2=strrev($s2hex)/1000;\n\n\n//джоули РІ ват/часы\n///1 J = 0.00027777777777778 Wh\n \n//$sk2=$s2*0.00027777777777778;\n// echo \"S2:\".$sendStr ; \nif ($enabledebug==1) {\n$debug.=\"cicle 6.2 S2:<br>\";\n//$debug.= \" answer:\" . $receiveStr; \n//$debug.= \" answerSTR:\" .hex2str2($receiveStrHex);\n$debug.= \" answerHEX:\" . $receiveStrHex.'<br>'; \n$debug.= \" answerS2HEX:\" . $s2hex.'<br>'; \n$debug.= \" answerS2:\" . $s2.'<br>';\n$debug.= \" answerSK2:\" . $sk2.'<br>'; \n$debug.= \" answerS2hex:\" . $receiveStrHex.'<br>'; \nsg($objname.\"S2hex\",$receiveStrHex); \n}\n//echo '<br>'; \n\nif ($s2<>0) {sg($objname.\".S2\",$s2); sg($objname.\".countersts\",time()); }\n//if ($s2hex<>0) sg($objname.\".S2hex\",$s2hex); \n\n\nsocket_close($socket); // Close Socket \nif ($enabledebug==1) {$debug.='Socked closed.<br>';}\n\n\n } \nelse \n{\nif ($enabledebug==1) {$debug='Error create socket '.$host.'('. $port.')';}\n}\n socket_close($socket); // Close Socket \nif ($enabledebug==1) {\nSQLexec(\"update milur_config set value='$debug' where parametr='DEBUG'\");\t \nsg($objname.'.debug',$debug);}\n\n}", "public function ApplyChanges() {\n\t\t\tparent::ApplyChanges();\n\t\t\t\n\t\t\t$this->RegisterVariableFloat(\"Volt\", \"Volt\", \"Volt.230\", 1);\n\t\t\t$this->RegisterVariableFloat(\"Ampere\", \"Ampere\", \"Ampere.16\", 2);\n\t\t\t$this->RegisterVariableFloat(\"Watt\", \"Watt\", \"Watt.14490\", 3);\n\t\t\t$this->RegisterVariableFloat(\"kWh\", \"Total kWh\", \"Electricity\", 4);\n\t\t\t\n\t\t\t$this->SetTimerInterval(\"Poller\", $this->ReadPropertyInteger(\"Poller\"));\n\t\t\t\n\t\t}", "public function dataBuffer()\n {\n return $this->bb;\n }", "function mtStatusPing($host) {\r\n // Default ping target\r\n $pingtarg = '199.87.117.108';\r\n $pubip = '0.0.0.0';\r\n $tunuser = \"deflt\";\r\n\r\n // Instanciate MT API call\r\n $API = new routeros_api();\r\n $API->debug = false;\r\n \r\n // Query SW for current stats\r\n $res = mssql_query(\"select [RTD].NodeID, [Nodes].IP_Address, [RTD].DateTime, [RTD].MinResponseTime-20 as RTT, [RTD].PercentLoss from ResponseTime_Detail as RTD left join Nodes on [Nodes].NodeID=[RTD].NodeID where IP_Address='\".$host.\"' and DateTime = (select max(DateTime) from ResponseTime_Detail where NodeID=[RTD].NodeID);\");\r\n $ar = mssql_fetch_array($res);\r\n \r\n // Output results\r\n $avgpingtime = $ar['RTT'];\r\n $packetloss = $ar['PercentLoss'];\r\n \r\n // Handle failed connects\r\n if(!isset($ar)) {\r\n $avgpingtime = 0;\r\n $packetloss = 100;\r\n };\r\n\r\n // If we do not have 100% packet loss then query the mikrotiks\r\n if ($packetloss!=100) {\r\n // Query Mikrotik for tunnel end point\r\n if ($API->connect($host, 'admin', 'DataCom')) {\r\n $API->write('/interface/sstp-client/print');\r\n $TARGET = $API->read();\r\n if(empty($TARGET)) {\r\n $API->write('/interface/l2tp-client/print');\r\n $TARGET = $API->read();\r\n $TARGET[0]['connect-to'].=\":0\";\r\n };\r\n $tunuser = $TARGET[0]['user'];\r\n $pingtargarr = explode(':',$TARGET[0]['connect-to']);\r\n $pingtarg = $pingtargarr[0];\r\n $API->disconnect();\r\n };\r\n \r\n // Query Tunnel End point for real public ip\r\n if ($API->connect($pingtarg, 'admin', 'd@t@c0m!')) {\r\n $API->write('/ppp/active/print');\r\n $TUNNELS = $API->read();\r\n foreach($TUNNELS as $item) {\r\n if($item['name']==$tunuser) $pubip = $item['caller-id'];\r\n };\r\n $API->disconnect();\r\n };\r\n\t};\r\n \r\n // Set status based on packetloss and ping time\r\n if ($packetloss>50)\r\n $status = 40002;\r\n else if ($packetloss>20 || $avgpingtime>250)\r\n $status = 40001;\r\n else\r\n $status = 40000;\r\n\r\n // Handle NULL ping time\r\n if((!isset($avgpingtime))||($avgpingtime==\"\")) {\r\n $avgpingtime = 0;\r\n }; \r\n\r\n return(array($status,$avgpingtime,$packetloss,$pubip));\r\n}", "public function ReceiveData($JSONString) {\n\t $data = json_decode($JSONString);\n \n\t // Datenverarbeitung und schreiben der Werte in die Statusvariablen\n\t \n\t if($data->Values->ID == $this->ReadPropertyInteger(\"ID\"))\n\t {\n\t $command = $data->Values->Command;\n\t switch($command)\n\t {\n\t case 35:\n\t SetValue($this->GetIDForIdent(\"temperatur\"), $data->Values->Value/2-20);\n\t break;\n\t \n\t case 36:\n\t SetValue($this->GetIDForIdent(\"light\"), 0.1*10**(0.05*$data->Values->Value));\n\t break;\n\t }\n\t }\n \n\t}", "function getConsumption() {\r\n\r\n// --------------\r\n// This function reads the consumption from the database.\r\n// It is run at the beginning of the script.\r\n// --------------\r\n\r\n// -------------------------------------------------------------------------\r\n// Global variables\r\n// -------------------------------------------------------------------------\r\n\tglobal $net2ftp_globals, $net2ftp_settings, $net2ftp_result;\r\n\r\n\r\n// -------------------------------------------------------------------------\r\n// Initial checks\r\n// -------------------------------------------------------------------------\r\n\r\n// Verify if a database is used, and if consumption checking is turned on. If not: don't continue.\r\n\tif ($net2ftp_settings[\"use_database\"] != \"yes\" || $net2ftp_settings[\"check_consumption\"] != \"yes\") { return true; }\r\n\r\n// When user is not logged in, the FTP server is not set\r\n\tif ($net2ftp_globals[\"ftpserver\"] == \"\") { return true; }\r\n\r\n// If the REMOTE_ADDR is not filled in, then there is a problem (IP spoofing), so return an error\r\n\tif ($net2ftp_globals[\"REMOTE_ADDR\"] == \"\") { \r\n\t\tsetErrorVars(false, __(\"Unable to determine your IP address.\"), debug_backtrace(), __FILE__, __LINE__);\r\n\t\treturn false; \r\n\t}\r\n\r\n// Add slashes to variables which are used in a SQL query, and which are\r\n// potentially unsafe (supplied by the user).\r\n\t// $date is calculated in this function\r\n\t// $time is calculated in this function\r\n\t$REMOTE_ADDR_safe = addslashes($net2ftp_globals[\"REMOTE_ADDR\"]);\r\n\t$net2ftp_ftpserver_safe = addslashes($net2ftp_globals[\"ftpserver\"]);\r\n\t\r\n// ----------------------------------------------\r\n// Do not log accesses, errors and consumption while the logs are being rotated\r\n// ----------------------------------------------\r\n\t$logStatus = getLogStatus();\r\n\tif ($net2ftp_result[\"success\"] == false) { return false; }\r\n\tif ($logStatus != 0) { return true; }\r\n\r\n// -------------------------------------------------------------------------\r\n// Set the change flags to the initial value\r\n// -------------------------------------------------------------------------\r\n\t$net2ftp_globals[\"consumption_datatransfer_changeflag\"] = 0;\r\n\t$net2ftp_globals[\"consumption_database_updated\"] = 0;\r\n\r\n// -------------------------------------------------------------------------\r\n// Get date\r\n// -------------------------------------------------------------------------\r\n\t$date = date(\"Y-m-d\");\r\n\r\n// -------------------------------------------------------------------------\r\n// Connect\r\n// -------------------------------------------------------------------------\r\n\t$mydb = connect2db();\r\n\tif ($net2ftp_result[\"success\"] == false) { return false; }\r\n\r\n// -------------------------------------------------------------------------\r\n// Get consumed data volume and execution time by the current IP address\r\n// -------------------------------------------------------------------------\r\n\t$sqlquery1 = \"SELECT datatransfer, executiontime FROM net2ftp_log_consumption_ipaddress WHERE date = '$date' AND ipaddress = '$REMOTE_ADDR_safe';\";\r\n\t$result1 = mysql_query(\"$sqlquery1\") or die(\"Unable to execute SQL SELECT query (getConsumption > sqlquery1) <br /> $sqlquery1\");\r\n\t$nrofrows1 = mysql_num_rows($result1);\r\n\r\n\tif ($nrofrows1 == 0) { \r\n\t\t$net2ftp_globals[\"consumption_ipaddress_datatransfer\"] = 0;\r\n\t\t$net2ftp_globals[\"consumption_ipaddress_executiontime\"] = 0; \r\n\t}\r\n\telseif ($nrofrows1 == 1) { \r\n\t\t$resultRow1 = mysql_fetch_row($result1); \r\n\t\t$net2ftp_globals[\"consumption_ipaddress_datatransfer\"] = $resultRow1[0];\r\n\t\t$net2ftp_globals[\"consumption_ipaddress_executiontime\"] = $resultRow1[1]; \r\n\t}\r\n\telse { \r\n\t\tsetErrorVars(false, __(\"Table net2ftp_log_consumption_ipaddress contains duplicate rows.\"), debug_backtrace(), __FILE__, __LINE__);\r\n\t\treturn false; \r\n\t}\r\n\r\n// -------------------------------------------------------------------------\r\n// Get consumed data volume and execution time to the current FTP server\r\n// -------------------------------------------------------------------------\r\n\t$sqlquery2 = \"SELECT datatransfer, executiontime FROM net2ftp_log_consumption_ftpserver WHERE date = '$date' AND ftpserver = '$net2ftp_ftpserver_safe';\";\r\n\t$result2 = mysql_query(\"$sqlquery2\") or die(\"Unable to execute SQL SELECT query (getConsumption > sqlquery2) <br /> $sqlquery2\");\r\n\t$nrofrows2 = mysql_num_rows($result2);\r\n\r\n\tif ($nrofrows2 == 0) { \r\n\t\t$net2ftp_globals[\"consumption_ftpserver_datatransfer\"] = 0;\r\n\t\t$net2ftp_globals[\"consumption_ftpserver_executiontime\"] = 0; \r\n\t}\r\n\telseif ($nrofrows2 == 1) { \r\n\t\t$resultRow2 = mysql_fetch_row($result2); \r\n\t\t$net2ftp_globals[\"consumption_ftpserver_datatransfer\"] = $resultRow2[0];\r\n\t\t$net2ftp_globals[\"consumption_ftpserver_executiontime\"] = $resultRow2[1]; \r\n\t}\r\n\telse { \r\n\t\tsetErrorVars(false, __(\"Table net2ftp_log_consumption_ftpserver contains duplicate rows.\"), debug_backtrace(), __FILE__, __LINE__);\r\n\t\treturn false; \r\n\t}\r\n\r\n\r\n// Return true\r\n\treturn true;\r\n\r\n}", "function handleHeartbeat() {\n echo \"Heartbeat - \";\n \n if ($this->commanded==1) {\n //Start thinking\n $this->jab->composing($this->last_msg_from,$this->last_msg_id);\n $command = strtolower($this->last_message);\n\n echo \"Command Received:\\n\";\n echo \" '\".$command.\"'\\n\";\n \n\n if (strcmp($command, \"robot, make me a sandwich\")==0) {\n echo \" - Command Recognized: sandwich\\n\";\n $this->jab->composing($this->last_msg_from,$this->last_msg_id,false);\n $this->jab->message($this->last_msg_from,\"chat\",NULL,\"Sorry, I'm all out of mustard.\");\n } elseif (strcmp($command, \"robot, shut down\")==0) {\n echo \" - Command Recognized: exiting\\n\";\n $this->jab->composing($this->last_msg_from,$this->last_msg_id,false);\n $this->jab->message($this->last_msg_from,\"chat\",NULL,\"Goodbye!\");\n exit;\n } else {\n echo \" - Command Not Recognized\\n\";\n $this->jab->message($this->last_msg_from,\"chat\",NULL,\"Sorry, I don't recognize that command.\");\n }\n $this->commanded = 0;\n } else {\n echo \"Waiting for incoming message ...\\n\";\n }\n }", "public function update( $temperature, $humidity, $pressure )\n {\n $this->temperature = $temperature;\n $this->humidity = $humidity;\n $this->display();\n }", "public function ping() {\n\n\t\t$data = Nabaztag::getInstance(NAB_SERIAL)->getData('pinginterval');\n\n\t\tif(isset($data['seen']) && $data['seen'] == false) {\n\n\t\t\tif($data == null) {\n\n\t\t\t\t$interval = 5;\n\t\t\t} else {\n\n\t\t\t\t$interval = $data['data'];\n\t\t\t}\n\n\t\t\t$this->data = array($interval);\n\t\t\tNabaztag::getInstance(NAB_SERIAL)->setSeen('pinginterval', true);\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "function broadcastData($conn) {\r\n\r\n\t\t\t\tglobal $wizGradeBroadcastTB, $fiVal;\r\n\r\n\t\t\t\t$broadcastData = $conn->query(\"SELECT bID, bTitle, broadcastMsg, date\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\tFROM $wizGradeBroadcastTB\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\tORDER BY bID DESC\")->fetchAll(PDO::FETCH_ASSOC);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\tarray_unshift($broadcastData,\"\");\r\n\t\t\t\tunset($broadcastData[0]);\r\n\r\n\t\t\t\treturn $broadcastData;\r\n\t\t\t\r\n\t\t}", "public function ProcessValues()\n\t{\n\t\t$success = false;\n\n\t\t// Sleep for two seconds to make sure all variables of the sensor instance have been updated\n\t\tIPS_Sleep(2000);\n\n\t\t$vadVariableId \t\t\t= $this->getVadVariableId();\n\t\t$vddVariableId \t\t\t= $this->getVddVariableId();\n\t\t$temperatureVariableId \t= $this->getTemperatureVariableId();\n\t\t$xsensVariableId \t\t= $this->getXsensVariableId();\n\n\t\tif ($vadVariableId && $vddVariableId && $temperatureVariableId && $xsensVariableId)\n\t\t{\n\t\t\t$vad \t\t\t\t= GetValueFloat($vadVariableId);\n\t\t\t$vdd \t\t\t\t= GetValueFloat($vddVariableId);\n\t\t\t$temperature \t\t= GetValueFloat($temperatureVariableId);\n\t\t\t$xsens\t\t\t \t= GetValueFloat($xsensVariableId);\n\n\t\t\t$humidity \t\t\t= $this->calculateHumidity($vdd, $vad, $temperature);\n\t\t\t$dewPoint \t\t\t= $this->calculateDewPoint($temperature, $humidity);\n\t\t\t$voc\t\t\t\t= $this->calculateVolatileOrganicCompounds($xsens);\n\t\t\t$airQualityIndex\t= $this->getAirQualityIndex($voc);\n\n\t\t\tSetValueFloat($this->GetIDForIdent('temperature'), round($temperature, 1));\n\t\t\tSetValueFloat($this->GetIDForIdent('dewPoint'), round($dewPoint, 1));\n\t\t\tSetValueInteger($this->GetIDForIdent('voc'), round($voc));\n\t\t\tSetValueInteger($this->GetIDForIdent('airQuality'), $airQualityIndex);\n\n\t\t\tif ($humidity)\n\t\t\t{\n\t\t\t\tSetValueFloat($this->GetIDForIdent('humidity'), round($humidity, 1));\n\t\t\t}\n\n\t\t\t$success = true;\n\t\t\t$this->SetStatus(102);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Incompatible instance\n\t\t\t$this->setStatus(200);\n\t\t}\n\n\t\treturn $success;\n\t}", "function CereusTransporter_bosun_send_data( $data_array )\n\t{\n\t\t$db_url = read_config_option( 'cereus_transporter_db_fullurl' );\n\t\t$db_type = read_config_option( 'cereus_transporter_dbtype' );\n\n\t\t// curl for bosun and opentsdb\n\t\t$curl = NULL;\n\n\t\t// init request\n\t\t$curl = curl_init();\n\t\t$db_url = rtrim( $db_url, '/' );\n\t\t$page = '/api/put?details';\n\t\tif ( read_config_option( 'log_verbosity' ) >= POLLER_VERBOSITY_DEBUG ) {\n\t\t\t$page .= '?details';\n\t\t}\n\t\tcurl_setopt( $curl, CURLOPT_URL, $db_url . $page );\n\t\tcurl_setopt( $curl, CURLOPT_RETURNTRANSFER, TRUE );\n\t\tcurl_setopt( $curl, CURLOPT_BINARYTRANSFER, TRUE );\n\t\tcurl_setopt( $curl, CURLOPT_POST, TRUE );\n\n\t\t$metrics = array();\n\n\t\t// preparing points\n\t\t$points = array();\n\t\tforeach ( $data_array as $point ) {\n\t\t\tif ( read_config_option( 'log_verbosity' ) >= POLLER_VERBOSITY_DEBUG ) {\n\t\t\t\tcacti_log( \"DEBUG: Appending the following data to request: [\" . $db_type . \"] [\" . $point[ 'timestamp' ] . \"] [\" . $point[ 'tags' ][ 'hostname' ] . \"] [\" . json_encode( $point[ 'tags' ] ) . \"] [\" . $point[ 'tags' ][ 'type' ] . \"] [\" . $point[ 'value' ] . \"]\", TRUE, \"CereusTransporter\" );\n\t\t\t}\n\t\t\tif ( strlen( $point[ 'metric' ] ) > 0 ) {\n\t\t\t\t// prepare metrics info for bosun\n\t\t\t\tif ( $db_type == 'bosun' && is_null( $metrics[ $point[ 'metric' ] ] ) ) {\n\t\t\t\t\t$metrics_temp = array();\n\t\t\t\t\t$metric = array();\n\t\t\t\t\t$metric[ 'Metric' ] = $point[ 'metric' ];\n\t\t\t\t\t$point[ 'value' ] = (int)$point[ 'value' ]; // make value integer\n\t\t\t\t\t$rate = $point[ 'tags' ][ 'rate' ];\n\t\t\t\t\t$desc = $point[ 'tags' ][ 'metric_text' ];\n\t\t\t\t\t$unit = $point[ 'tags' ][ 'units' ];\n\t\t\t\t\t$tags = $point[ 'tags' ];\n\t\t\t\t\t$metrics_host = array();\n\t\t\t\t\t$metrics_host_param = array();\n\t\t\t\t\t$metrics_host_tags = array();\n\n\t\t\t\t\t$metrics_host_tags[ 'host' ] = $point[ 'tags' ][ 'host' ];\n\t\t\t\t\t$metrics_host_param[ 'tags' ] = $metrics_host_tags;\n\t\t\t\t\t$metrics_host_param[ 'Name' ] = 'hostname';\n\t\t\t\t\t$metrics_host_param[ 'Value' ] = $tags[ 'hostname' ];\n\t\t\t\t\t$metrics_host[] = $metrics_host_param;\n\t\t\t\t\t$metrics_host_param[ 'Name' ] = 'polling_time';\n\t\t\t\t\t$metrics_host_param[ 'Value' ] = $tags[ 'polling_time' ];\n\t\t\t\t\t$metrics_host[] = $metrics_host_param;\n\t\t\t\t\t$metrics_host_param[ 'Name' ] = 'host_type';\n\t\t\t\t\t$metrics_host_param[ 'Value' ] = $tags[ 'host_type' ];\n\t\t\t\t\t$metrics_host[] = $metrics_host_param;\n\t\t\t\t\t$metrics[ $point[ 'tags' ][ 'host' ] ] = $metrics_host;\n\n\t\t\t\t\tunset( $tags[ 'metric_text' ] ); // delete unwanted data\n\n\t\t\t\t\tunset( $tags[ 'rate' ] ); // delete unwanted data\n\t\t\t\t\tunset( $tags[ 'namecache' ] ); // delete unwanted data\n\t\t\t\t\tunset( $tags[ 'type' ] ); // delete unwanted data\n\t\t\t\t\tunset( $tags[ 'units' ] ); // delete unwanted data\n\t\t\t\t\tunset( $tags[ 'host_type' ] ); // delete unwanted data\n\t\t\t\t\tunset( $tags[ 'hostname' ] ); // delete unwanted data\n\t\t\t\t\tunset( $tags[ 'polling_time' ] ); // delete unwanted data\n\t\t\t\t\t$metric[ 'tags' ] = $tags;\n\t\t\t\t\tif ( isset( $desc ) && strlen( $desc ) > 0 ) {\n\t\t\t\t\t\t$metric[ 'Name' ] = 'desc';\n\t\t\t\t\t\t$metric[ 'Value' ] = $desc;\n\t\t\t\t\t\t$metrics_temp[] = $metric;\n\t\t\t\t\t}\n\t\t\t\t\tif ( isset( $rate ) ) {\n\t\t\t\t\t\t$metric[ 'Name' ] = 'rate';\n\t\t\t\t\t\t$metric[ 'Value' ] = $rate;\n\t\t\t\t\t\t$metrics_temp[] = $metric;\n\t\t\t\t\t}\n\t\t\t\t\t// Unit name is taken from Vertical Label of Graph Template for datasource\n\t\t\t\t\t// If there are multiple Graph Templates, only one value will be taken\n\t\t\t\t\t// Vertical Label text should be from this list, or bosun will skip it:\n\t\t\t\t\t// https://godoc.org/bosun.org/metadata#Unit\n\t\t\t\t\tif ( isset( $unit ) ) {\n\t\t\t\t\t\t$metric[ 'Name' ] = 'unit';\n\t\t\t\t\t\t$metric[ 'Value' ] = $unit;\n\t\t\t\t\t\t$metrics_temp[] = $metric;\n\t\t\t\t\t}\n\t\t\t\t\t$metrics[ $point[ 'metric' ] ] = $metrics_temp;\n\t\t\t\t}\n\t\t\t\tif ( isset( $point[ 'tags' ][ 'index_type' ] ) ) {\n\t\t\t\t\t$point[ 'tags' ][ $point[ 'tags' ][ 'index_type' ] ] = $point[ 'tags' ][ 'index_value' ];\n\t\t\t\t\tunset( $point[ 'tags' ][ 'index_type' ] ); // delete unwanted data\n\t\t\t\t\tunset( $point[ 'tags' ][ 'index_value' ] ); // delete unwanted data\n\t\t\t\t}\n\t\t\t\tunset( $point[ 'tags' ][ 'metric_text' ] ); // delete unwanted data\n\t\t\t\tunset( $point[ 'tags' ][ 'units' ] ); // delete unwanted data\n\t\t\t\t$points[] = $point;\n\t\t\t}\n\t\t}\n\n\t\tif ( sizeof( $points ) > 0 ) {\n\t\t\tif ( read_config_option( 'log_verbosity' ) >= POLLER_VERBOSITY_DEBUG ) {\n\t\t\t\tcacti_log( \"DEBUG: Adding [\" . sizeof( $points ) . \"] of data points for [\" . $point[ 'tags' ][ 'hostname' ] . \"]\", TRUE, \"CereusTransporter\" );\n\t\t\t}\n\n\t\t\t$db_url = rtrim( read_config_option( 'cereus_transporter_db_fullurl' ), '/' );\n\t\t\tif ( $db_type == 'bosun' && sizeof( $metrics ) > 0 ) {\n\t\t\t\t$metrics_post = array();\n\t\t\t\tforeach ( $metrics as $metrics_outer ) {\n\t\t\t\t\tforeach ( $metrics_outer as $metric ) {\n\t\t\t\t\t\t$metrics_post[] = $metric;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$json = json_encode( $metrics_post );\n\t\t\t\tif ( read_config_option( 'log_verbosity' ) >= POLLER_VERBOSITY_DEBUG ) {\n\t\t\t\t\tcacti_log( \"DEBUG: Bosun Metrics for hostname [\" . $point[ 'tags' ][ 'hostname' ] . \"]: \" . $json, TRUE, \"CereusTransporter\" );\n\t\t\t\t}\n\t\t\t\t$metacurl = curl_init();\n\t\t\t\tcurl_setopt( $metacurl, CURLOPT_URL, $db_url . '/api/metadata/put' );\n\t\t\t\tcurl_setopt( $metacurl, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json; charset=UTF-8',\n\t\t\t\t\t\"Accept:application/json, text/javascript, */*; q=0.01\",\n\t\t\t\t\t'Content-Length: ' . strlen( $json ) ) );\n\t\t\t\tcurl_setopt( $metacurl, CURLOPT_RETURNTRANSFER, TRUE );\n\t\t\t\tcurl_setopt( $metacurl, CURLOPT_BINARYTRANSFER, TRUE );\n\t\t\t\tcurl_setopt( $metacurl, CURLOPT_POST, TRUE );\n\t\t\t\tcurl_setopt( $metacurl, CURLOPT_POSTFIELDS, $json );\n\t\t\t\t$curl_result = curl_exec( $metacurl );\n\t\t\t\tif ( $curl_result === FALSE ) {\n\t\t\t\t\tcacti_log( \"ERROR: Metadata Curl to [\" . $db_url . \"] was not succesful: [\" . curl_error( $metacurl ) . \"]\", TRUE, \"CereusTransport\" );\n\t\t\t\t}\n\t\t\t\tcurl_close( $metacurl );\n\t\t\t}\n\n\t\t\t$json = json_encode( $points );\n\t\t\tif ( read_config_option( 'log_verbosity' ) >= POLLER_VERBOSITY_DEBUG ) {\n\t\t\t\tcacti_log( \"DEBUG: Adding [\" . sizeof( $points ) . \"] of data points for [\" . $point[ 'tags' ][ 'hostname' ] . \"] TSDB JSON: \" . $json, TRUE, \"CereusTransporter\" );\n\t\t\t}\n\t\t\tcurl_setopt( $curl, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json; charset=UTF-8',\n\t\t\t\t\"Accept:application/json, text/javascript, */*; q=0.01\",\n\t\t\t\t'Content-Length: ' . strlen( $json ) ) );\n\t\t\tcurl_setopt( $curl, CURLOPT_POSTFIELDS, $json );\n\t\t\t$curl_result = curl_exec( $curl );\n\t\t\tif ( $curl_result === FALSE ) {\n\t\t\t\tcacti_log( \"ERROR: Data Curl to [\" . $db_url . \"] for [\" . $point[ 'tags' ][ 'hostname' ] . \"] was not succesful: [\" . curl_error( $curl ) . \"]\", TRUE, \"CereusTransport\" );\n\t\t\t}\n\t\t\tcurl_close( $curl );\n\n\t\t\tif ( read_config_option( 'log_verbosity' ) >= POLLER_VERBOSITY_HIGH ) {\n\t\t\t\tcacti_log( \"Finished adding [\" . sizeof( $points ) . \"] of data points for [\" . $point[ 'tags' ][ 'hostname' ] . \"]\", TRUE, \"CereusTransporter\" );\n\t\t\t}\n\t\t}\n\t}", "function extractanswereq3 ($message, $id){\n\ndebmes('extractanswereq3: '.$message, 'bletool');\n\n$bytes=explode(\" \",$message);\n\n\n\n $data = str_pad(base_convert($bytes[3], 16, 2),8,\"0\",STR_PAD_LEFT);\n//debmes($bytes, 'bletool');\ndebmes('data:'.$bytes[3].':'.$data, 'bletool');\n\n//09:52:20 0.07985800 data:09:00001001 - manual\n// 08:00001000 - auto\n// data:0c:00001100 - auto boost\n// 87654321\n//\t\t\t 01234567\t\n// 1:7 - manual/auto\n// 2:6 - vacation\n// 3:5 boost\n// 4:4 dst\n// 5:3 open window\n// 6:2 locked\n// 7:1 unknown\n// 8:0 low battery\n\n\n\nswitch ($data[7]) {\n\n\tcase \"0\":\n\t$mode='auto';\n\tbreak;\n\n\tcase \"1\":\n\t$mode='manual';\n\tbreak;\n}\n\nswitch ($data[6]) {\n\n\tcase \"1\":\n\t$vacation='1';\n\tbreak;\n\n\tcase \"0\":\n\t$vacation='0';\n\tbreak;\n}\n\nswitch ($data[5]) {\n\n\tcase \"1\":\n\t$boost='1';\n\tbreak;\n\n\tcase \"0\":\n\t$boost='0';\n\tbreak;\n}\n\nswitch ($data[4]) {\n\n\tcase \"1\":\n\t$dst='1';\n\tbreak;\n\n\tcase \"0\":\n\t$dst='0';\n\tbreak;\n}\n\nswitch ($data[3]) {\n\n\tcase \"1\":\n\t$ow='1';\n\tbreak;\n\n\tcase \"0\":\n\t$ow='1';\n\tbreak;\n}\n\nswitch ($data[0]) {\n\n\tcase \"1\":\n\t$bat='1';\n\tbreak;\n\n\tcase \"0\":\n\t$bat='0';\n\tbreak;\n}\n\nswitch ($data[2]) {\n\n\tcase \"1\":\n\t$locked='1';\n\tbreak;\n\n\tcase \"0\":\n\t$locked='0';\n\tbreak;\n}\n\n\n\n\n\n\n\n\t$sql=\"SELECT * FROM ble_commands where DEVICE_ID='$id' and TITLE='mode'\";\n\t$cmd_rec2 = SQLSelectOne($sql);\n\t$cmd_rec2['TITLE']='mode';\n\t$cmd_rec2['DEVICE_ID']=$id;\n\t$cmd_rec2['VALUE']=$mode;\n debmes('mode:'.$mode, 'bletool');\n\t$cmd_rec2['UPDATED']=date('Y-m-d H:i:s');\n\n\tif (!$cmd_rec2['ID']) \n\t{\n\t//$cmd_rec['ONLINE']=$onlinest;\n\tSQLInsert('ble_commands', $cmd_rec2);\n\t} else {\n\tSQLUpdate('ble_commands', $cmd_rec2);\n\t}\n\n\nif ($cmd_rec2['LINKED_OBJECT']!='' && $cmd_rec2['LINKED_PROPERTY']!='') {\nsetGlobal($cmd_rec2['LINKED_OBJECT'].'.'.$cmd_rec2['LINKED_PROPERTY'],$mode ,array($this->name => '0'));\n}\n\n\n\t$sql=\"SELECT * FROM ble_commands where DEVICE_ID='$id' and TITLE='open_window'\";\n\t$cmd_rec2 = SQLSelectOne($sql);\n\t$cmd_rec2['TITLE']='open_window';\n\t$cmd_rec2['DEVICE_ID']=$id;\n debmes('open_window:'.$ow, 'bletool');\n\t$cmd_rec2['VALUE']=$ow;\n\t$cmd_rec2['UPDATED']=date('Y-m-d H:i:s');\n\n\tif (!$cmd_rec2['ID']) \n\t{\n\t//$cmd_rec['ONLINE']=$onlinest;\n\tSQLInsert('ble_commands', $cmd_rec2);\n\t} else {\n\tSQLUpdate('ble_commands', $cmd_rec2);\n\t}\n\n\nif ($cmd_rec2['LINKED_OBJECT']!='' && $cmd_rec2['LINKED_PROPERTY']!='') {\nsetGlobal($cmd_rec2['LINKED_OBJECT'].'.'.$cmd_rec2['LINKED_PROPERTY'],$ow ,array($this->name => '0'));\n}\n\n\n\n\n\t$sql=\"SELECT * FROM ble_commands where DEVICE_ID='$id' and TITLE='dst'\";\n\t$cmd_rec2 = SQLSelectOne($sql);\n\t$cmd_rec2['TITLE']='dst';\n debmes('dst:'.$dst, 'bletool');\n\t$cmd_rec2['DEVICE_ID']=$id;\n\t$cmd_rec2['VALUE']=$dst;\n\t$cmd_rec2['UPDATED']=date('Y-m-d H:i:s');\n\n\tif (!$cmd_rec2['ID']) \n\t{\n\t//$cmd_rec['ONLINE']=$onlinest;\n\tSQLInsert('ble_commands', $cmd_rec2);\n\t} else {\n\tSQLUpdate('ble_commands', $cmd_rec2);\n\t}\n\nif ($cmd_rec2['LINKED_OBJECT']!='' && $cmd_rec2['LINKED_PROPERTY']!='') {\nsetGlobal($cmd_rec2['LINKED_OBJECT'].'.'.$cmd_rec2['LINKED_PROPERTY'],$dst ,array($this->name => '0'));\n}\n\n\n\t$sql=\"SELECT * FROM ble_commands where DEVICE_ID='$id' and TITLE='locked'\";\n\t$cmd_rec2 = SQLSelectOne($sql);\n\t$cmd_rec2['TITLE']='locked';\n\t$cmd_rec2['DEVICE_ID']=$id;\n\t$cmd_rec2['VALUE']=$locked;\n\t$cmd_rec2['UPDATED']=date('Y-m-d H:i:s');\n\n\tif (!$cmd_rec2['ID']) \n\t{\n\t//$cmd_rec['ONLINE']=$onlinest;\n\tSQLInsert('ble_commands', $cmd_rec2);\n\t} else {\n\tSQLUpdate('ble_commands', $cmd_rec2);\n\t}\n\nif ($cmd_rec2['LINKED_OBJECT']!='' && $cmd_rec2['LINKED_PROPERTY']!='') {\nsetGlobal($cmd_rec2['LINKED_OBJECT'].'.'.$cmd_rec2['LINKED_PROPERTY'],$locked ,array($this->name => '0'));\n}\n\n\n\t$sql=\"SELECT * FROM ble_commands where DEVICE_ID='$id' and TITLE='boost'\";\n\t$cmd_rec2 = SQLSelectOne($sql);\n\t$cmd_rec2['TITLE']='boost';\n debmes('boost:'.$boost, 'bletool');\n\t$cmd_rec2['DEVICE_ID']=$id;\n\t$cmd_rec2['VALUE']=$boost;\n\t$cmd_rec2['UPDATED']=date('Y-m-d H:i:s');\n\n\tif (!$cmd_rec2['ID']) \n\t{\n\t//$cmd_rec['ONLINE']=$onlinest;\n\tSQLInsert('ble_commands', $cmd_rec2);\n\t} else {\n\tSQLUpdate('ble_commands', $cmd_rec2);\n\t}\n\nif ($cmd_rec2['LINKED_OBJECT']!='' && $cmd_rec2['LINKED_PROPERTY']!='') {\nsetGlobal($cmd_rec2['LINKED_OBJECT'].'.'.$cmd_rec2['LINKED_PROPERTY'],$boost ,array($this->name => '0'));\n}\n\n\t$sql=\"SELECT * FROM ble_commands where DEVICE_ID='$id' and TITLE='lowbattery'\";\n\t$cmd_rec2 = SQLSelectOne($sql);\n\t$cmd_rec2['TITLE']='lowbattery';\n debmes('lowbattery:'.$bat, 'bletool');\n\t$cmd_rec2['DEVICE_ID']=$id;\n\t$cmd_rec2['VALUE']=$bat;\n\t$cmd_rec2['UPDATED']=date('Y-m-d H:i:s');\n\n\tif (!$cmd_rec2['ID']) \n\t{\n\t//$cmd_rec['ONLINE']=$onlinest;\n\tSQLInsert('ble_commands', $cmd_rec2);\n\t} else {\n\tSQLUpdate('ble_commands', $cmd_rec2);\n\t}\n\nif ($cmd_rec2['LINKED_OBJECT']!='' && $cmd_rec2['LINKED_PROPERTY']!='') {\nsetGlobal($cmd_rec2['LINKED_OBJECT'].'.'.$cmd_rec2['LINKED_PROPERTY'],$bat,array($this->name => '0'));\n}\n\n\n\n\n\t$sql=\"SELECT * FROM ble_commands where DEVICE_ID='$id' and TITLE='vacation'\";\n\t$cmd_rec2 = SQLSelectOne($sql);\n\t$cmd_rec2['TITLE']='vacation';\n\t$cmd_rec2['DEVICE_ID']=$id;\n\t$cmd_rec2['VALUE']=$vacation;\n\t$cmd_rec2['UPDATED']=date('Y-m-d H:i:s');\n debmes('vacation:'.$vacation, 'bletool');\n\n\tif (!$cmd_rec2['ID']) \n\t{\n\t//$cmd_rec['ONLINE']=$onlinest;\n\tSQLInsert('ble_commands', $cmd_rec2);\n\t} else {\n\tSQLUpdate('ble_commands', $cmd_rec2);\n\t}\n\n\nif ($cmd_rec2['LINKED_OBJECT']!='' && $cmd_rec2['LINKED_PROPERTY']!='') {\nsetGlobal($cmd_rec2['LINKED_OBJECT'].'.'.$cmd_rec2['LINKED_PROPERTY'],$vacation ,array($this->name => '0'));\n}\n\n\n\n\n\n\t$sql=\"SELECT * FROM ble_commands where DEVICE_ID='$id' and TITLE='target_t'\";\n\t$cmd_rec2 = SQLSelectOne($sql);\n\t$cmd_rec2['TITLE']='target_t';\n\t$cmd_rec2['DEVICE_ID']=$id;\n\t$newvalue=hexdec($bytes[6])/2;\n debmes('target_t:'.$newvalue, 'bletool');\n\n\t$cmd_rec2['VALUE']=$newvalue;\n\t$cmd_rec2['UPDATED']=date('Y-m-d H:i:s');\ndebmes($cmd_rec2, 'bletool');\n\n\tif (!$cmd_rec2['ID']) \n\t{\n\t//$cmd_rec['ONLINE']=$onlinest;\n\tSQLInsert('ble_commands', $cmd_rec2);\n\t} else {\n\tSQLUpdate('ble_commands', $cmd_rec2);\n\t}\n\nif ($cmd_rec2['LINKED_OBJECT']!='' && $cmd_rec2['LINKED_PROPERTY']!='') {\nsetGlobal($cmd_rec2['LINKED_OBJECT'].'.'.$cmd_rec2['LINKED_PROPERTY'],$newvalue ,array($this->name => '0'));\n}\n\n\n\t$sql=\"SELECT * FROM ble_commands where DEVICE_ID='$id' and TITLE='percentage'\";\n\t$cmd_rec2 = SQLSelectOne($sql);\n\t$cmd_rec2['TITLE']='percentage';\n\t$cmd_rec2['DEVICE_ID']=$id;\n\t$newvalue=hexdec($bytes[4])/2;\n\t$cmd_rec2['VALUE']=$newvalue;\n\t$cmd_rec2['UPDATED']=date('Y-m-d H:i:s');\n\n\tif (!$cmd_rec2['ID']) \n\t{\n\t//$cmd_rec['ONLINE']=$onlinest;\n\tSQLInsert('ble_commands', $cmd_rec2);\n\t} else {\n\tSQLUpdate('ble_commands', $cmd_rec2);\n\t}\n\nif ($cmd_rec2['LINKED_OBJECT']!='' && $cmd_rec2['LINKED_PROPERTY']!='') {\nsetGlobal($cmd_rec2['LINKED_OBJECT'].'.'.$cmd_rec2['LINKED_PROPERTY'],$newvalue ,array($this->name => '0'));\n}\n\n\n\n\n\n\n\n}", "function printUpdateHTML($get)\n {\n # (I hope!), do a filesystem lookup!\n\n $xml_cmd = \"<?xml version='1.0' encoding='ISO-8859-1'?>\";\n $xml_cmd .= \"<mpsr_rxmonitor_command>\";\n $xml_cmd .= \"<rx_boards>\";\n $xml_cmd .= \"<rx_board id='\".$this->plot_id.\"'/>\";\n $xml_cmd .= \"</rx_boards>\";\n $xml_cmd .= \"<params>\";\n $xml_cmd .= \"<param key='all'/>\";\n $xml_cmd .= \"</params>\";\n $xml_cmd .= \"<plots>\";\n $xml_cmd .= \"<plot type='hg'/>\";\n $xml_cmd .= \"<plot type='sp'/>\";\n $xml_cmd .= \"</plots>\";\n $xml_cmd .= \"</mpsr_rxmonitor_command>\";\n\n $host = \"localhost\";\n $port = $this->inst->config[\"SERVER_RX_MONITOR_PORT\"];\n\n $xml_reply = \"<?xml version='1.0' encoding='ISO-8859-1'?>\";\n $xml_reply .= \"<rx_board_update>\";\n $xml_reply .= \"<http_server>http://\".$_SERVER[\"SERVER_NAME\"].\":\".$_SERVER[\"SERVER_PORT\"].\"</http_server>\"; \n $xml_reply .= \"<url_prefix>mopsr</url_prefix>\";\n $xml_reply .= \"<img_prefix>monitor/rx</img_prefix>\";\n\n if ($this->connect_to_socket)\n {\n list ($socket, $result) = openSocket($host, $port);\n $response = \"initial\";\n\n if ($result == \"ok\")\n {\n $reply = \"\";\n $bytes_written = socketWrite ($socket, $xml_cmd.\"\\r\\n\");\n $max = 100;\n while ($socket && ($result == \"ok\") && ($response != \"\") && ($max > 0))\n {\n list ($result, $response) = socketRead($socket);\n if ($result == \"ok\")\n {\n $reply .= $response;\n }\n $max--;\n }\n $reply = str_replace (\"<?xml version='1.0' encoding='ISO-8859-1'?>\", \"\", $reply);\n $reply = str_replace (\"/data/mopsr/\", \"\", $reply);\n $xml_reply .= $reply;\n $xml_reply .= \"<error type='no error'>None</error>\";\n }\n else\n {\n $xml_reply .= \"<error type='connection' host='\".$host.\"' port='\".$port.\"'>\".$result.\"</error>\";\n }\n\n $xml_reply .= \"</rx_board_update>\";\n }\n else\n {\n $xml_reply .= \"<rx_board id='\".$this->rx_id.\"'>\";\n\n # get a listing of the images for this RX board\n $cmd = \"find \".$this->inst->config[\"SERVER_RX_MONITOR_DIR\"].\" -name '2???-??-??-??:??:??.\".$this->rx_id.\".*.??.*x*.png' -printf '%f\\n' | sort -n\";\n $images = Array();\n $lastline = exec($cmd, $images, $rval);\n if (($rval == 0) && (count($images) > 0))\n {\n $to_use = Array();\n\n # use associative array to store only the most recent images of a module + type + resolution\n foreach ($images as $image)\n {\n list ($time, $rid, $module, $type, $res, $ext) = explode(\".\", $image);\n if (!array_key_exists($module, $to_use))\n $to_use[$module] = Array();\n $to_use[$module][$type.\".\".$res] = $image;\n }\n\n $xml_reply .= \"<plots>\";\n # now build XML\n foreach (array_keys($to_use) as $module)\n {\n $xml_reply .= \"<module id='\".$module.\"'>\";\n foreach (array_keys($to_use[$module]) as $key)\n {\n list ($type, $res) = explode(\".\", $key);\n list ($xres, $yres) = explode(\"x\", $res);\n $xml_reply .= \"<plot type='\".$type.\"' width='\".$xres.\"' height='\".$yres.\"'>\".$to_use[$module][$key].\"</plot>\";\n }\n $xml_reply .= \"</module>\";\n }\n $xml_reply .= \"</plots>\";\n }\n else\n {\n $xml_reply .= \"<error return_value='\".$rval.\"'>\".$lastline.\"</error>\";\n }\n\n $xml_reply .= \"<params>\";\n $xml_reply .= \"<param key='board_health'>OK</param>\";\n $xml_reply .= \"<param key='dac_temp'>27.0</param>\";\n $xml_reply .= \"<param key='lna_gain'>4</param>\";\n $xml_reply .= \"<param key='input0_volts'>1.23</param>\";\n $xml_reply .= \"<param key='input1_volts'>4.56</param>\";\n $xml_reply .= \"<param key='input2_volts'>7.89</param>\";\n $xml_reply .= \"<param key='input3_volts'>1.23</param>\";\n $xml_reply .= \"<param key='input4_volts'>4.56</param>\";\n $xml_reply .= \"<param key='input5_volts'>7.89</param>\";\n $xml_reply .= \"<param key='fpga_status'>programmed</param>\";\n $xml_reply .= \"<param key='fpga_error_state'>None</param>\";\n $xml_reply .= \"<param key='fpga_temp'>43.21</param>\";\n $xml_reply .= \"</params>\";\n $xml_reply .= \"</rx_board>\";\n\n $xml_reply .= \"</rx_board_update>\";\n }\n header('Content-type: text/xml');\n echo $xml_reply;\n }", "public function run()\n {\n $queue = new \\ZMQSocket(new \\ZMQContext(), \\ZMQ::SOCKET_PUSH, \"MySock1\");\n $queue->connect(\"tcp://127.0.0.1:5555\");\n\n $rpcData = array(\n \"id\" => 1,\n \"params\" =>array(),\n /**\n \"params\" => array(array(\n \"message\" => \"Seb.Test.ping\",\n \"created\" => time(),\n \"someData\" => mt_rand(0, 49344409875093475),\n )),\n * **/\n \"method\" => \"Seb.Test.ping\",\n //\"extended\" => array(),\n );\n\n $rpcBatch = array();\n for($i=0;$i<2;$i++) {\n $rpcData = (array)$rpcData;\n $rpcData['id'] = $i;\n $rpcBatch[]=$rpcData;\n }\n $mqData = $rpcBatch;\n\n // {\"method\":\"Seb.Test.ping\", \"id\":\"1\", \"version\":\"1.1\", \"jsonrpc\":\"1.1\", \"params\":[]}\n /* Assign socket 1 to the queue, send and receive */\n $queue->send(json_encode($mqData), \\ZMQ::MODE_NOBLOCK);\n //$queue->send(json_encode($mqData), \\ZMQ::MODE_NOBLOCK);\n //$queue->send(json_encode($mqData), \\ZMQ::MODE_NOBLOCK);\n //$queue->send(json_encode($mqData), \\ZMQ::MODE_NOBLOCK);\n\n }", "function sabSpeedAdjuster()\n{\n\t// Check the current ping\n\t$avgPing = getping($wan2_ip,$ping_ip);\n\t// Get SABnzbd XML\n\t$sabnzbdXML = simplexml_load_file('http://'.$sabnzbd_ip.':'.$sabnzbd_port.'/api?mode=queue&start=START&limit=LIMIT&output=xml&apikey='.$sabnzbd_api);\n\t// Get current SAB speed limit\n\t$sabSpeedLimitCurrent = $sabnzbdXML->speedlimit;\n\t\n\t// Check to see if SAB is downloading\n\tif (($sabnzbdXML->status) == 'Downloading'):\n\t\t\t// If it is downloading and ping is over X value, slow it down\n\t\t\tif ($avgPing > $ping_throttle):\n\t\t\t\tif ($sabSpeedLimitCurrent > $sabnzbdSpeedLimitMin):\n\t\t\t\t\t// Reduce speed by 256KBps\n\t\t\t\t\techo 'Ping is over '.$ping_throttle;\n\t\t\t\t\techo '<br>';\n\t\t\t\t\techo 'Slowing down SAB';\n\t\t\t\t\t$sabSpeedLimitSet = $sabSpeedLimitCurrent - 256;\n\t\t\t\t\tshell_exec('curl \"http://'.$sabnzbd_ip.':'.$sabnzbd_port.'/api?mode=config&name=speedlimit&value='.$sabSpeedLimitSet.'&apikey='.$sabnzbd_api.'\"');\n\t\t\t\telse:\n\t\t\t\t\techo 'Ping is over '.$ping_throttle.' but SAB cannot slow down anymore';\n\t\t\t\tendif;\t\n\t\t\telseif (($avgPing + 9) < $ping_throttle):\n\t\t\t\tif ($sabSpeedLimitCurrent < $sabnabdSpeedLimitMax):\n\t\t\t\t\t// Increase speed by 256KBps\n\t\t\t\t\techo 'SAB is downloading and ping is '.($avgPing + 9).' so increasing download speed.';\n\t\t\t\t\t$sabSpeedLimitSet = $sabSpeedLimitCurrent + 256;\n\t\t\t\t\tshell_exec('curl \"http://'.$sabnzbd_ip.':'.$sabnzbd_port.'/api?mode=config&name=speedlimit&value='.$sabSpeedLimitSet.'&apikey='.$sabnzbd_api.'\"');\n\t\t\t\telse:\n\t\t\t\t\techo 'SAB is downloading. Ping is low enough but we are at global download speed limit.';\n\t\t\t\tendif;\n\t\t\telse:\n\t\t\t\techo 'SAB is downloading. Ping is ok but not low enough to speed up SAB.';\n\t\t\tendif;\n\t\telse:\n\t\t\t// do nothing, \n\t\t\techo 'SAB is not downloading.';\n\t\tendif;\n}", "public function it_reads_temperature_values()\n {\n // Arrange\n $warmer = new Warmer();\n $sensor = new TemperatureSensor();\n $warmer->connectTemperature($sensor);\n \n // Act\n $warmer->readTemperatures(); \n $temperatureOutside = $warmer->getTemperature(Warmer::OUTSIDE);\n \n // Assert\n $this->assertTrue(is_numeric($temperatureOutside));\n }", "function _get_http_bl_values() {\r\n $values = array();\r\n\r\n if ($this->_rip)\r\n {\r\n $this->__ez_debug(\"Request: \".$this->http_bl_access_key . '.' . $this->_rip . '.' . $this->_http_bl_host);\r\n $this->__ez_debug(\"network-connection: gethostbyname (debug display)\");\r\n $this->__ez_debug(\"resolved?: \" . gethostbyname($this->http_bl_access_key . '.' . $this->_rip . '.' . $this->_http_bl_host));\r\n\r\n $this->__ez_debug(\"timemark\");\r\n $this->__ez_debug(\"Checking DNSBL: {$this->_http_bl_host}.\");\r\n $this->__ez_debug(\"network-connection: gethostbyname\");\r\n\r\n\r\n $response = gethostbyname($this->http_bl_access_key . '.' . $this->_rip . '.' . $this->_http_bl_host);\r\n $this->__ez_debug(\"Raw HTTP:BL response: {$response}\");\r\n $this->__ez_debug(\"timemark\");\r\n\r\n if (!strstr($response, $this->_http_bl_host)) { //if the domain does not resolve then it will be the same thing we passed to gethostbyname\r\n\r\n $this->__ez_debug(\"response is: \".var_export($response, true));\r\n\r\n $response = explode(\".\" ,$response);\r\n\r\n if ($response[0] == 127) { //First octet must be 127, else there is an error condition\r\n $this->__ez_debug(\"HTTP:BL correct octet response.\");\r\n $values['last_activity'] = $response[1];\r\n $values['threat'] = $response[2];\r\n\r\n if ($response[3] == 0)//if it's 0 then there's only 1 thing it can be\r\n $values['Search_Engine'] = true;\r\n if ($response[3] & 1)//does it have the same bits as 1 set\r\n $values['Suspicious'] = true;\r\n if ($response[3] & 2)//does it have the same bits as 2 set\r\n $values['Harvester'] = true;\r\n if ($response[3] & 4)//does it have the same bits as 4 set\r\n $values['Comment_Spammer'] = true;\r\n }\r\n else {\r\n $this->__ez_debug(\"HTTP:BL incorrect octet response.\");\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n return $values;\r\n }", "function check_charge_state($host, $mode){\n$msg = ''; \n$reg_string_all = \"/(?<=)Operational|Optimal|[0-9]+/\"; \n$reg_string_other = \"/(?<=)OK|Yes/\";\n\n#static numerical value for variable\n#temperature\n$msg_temp = 0;\n#voltage\n$msg_volt = 0;\n#operational\n$msg_oper = 0;\n#charge %\n$msg_charge = 0;\n#ready status\n$msg_ready = 0;\n\t\n\t$handle_to_read = file(\"/battery/\".$host.\".txt\");\n\ttry{\n\t\t/* read txt file with input:\n\t\t\t#Voltage: 4005 mV\n\t\t\t#Temperature: 14 C\n\t\t\t#Battery State : Operational\n\t\t\t#Relative State of Charge: 95 %\n\n\t\t\t#or for 10.10.10.11\n\t\t\t#/c0/bbu BBU Ready = Yes\n\t\t\t#/c0/bbu BBU Status = OK\n\t\t\t#/c0/bbu Battery Voltage = OK\n\t\t\t#/c0/bbu Battery Temperature Status= OK\n\t\t*/\n\t\tforeach($handle_to_read as $key => $handle){\n\t\t\tif($host == '10.10.10.11'){\n\t\t\t\t#match value in lines\n\t\t\t\tpreg_match($reg_string_other, $handle, $exit_other);\n\t\t\t\t#create new array with output preg_match and seperation on $key=>$value\n\t\t\t\t$exit_other_array = array($key => $exit_other);\n\t\t\t\t#if input for function(argv[2]) is operational\n\t\t\t\tif($mode == 'operational'){\n\t\t\t\t\tforeach($exit_other_array as $key => $server_other){\n\t\t\t\t\t#value equal value[index 0];\n\t\t\t\t\t#return 4 key index 0-3 (4 lines)\n\t\t\t\t\t$server_other = $server_other[0];\n\t\t\t\t\t\tif($key == 0){\n\t\t\t\t\t\t\t#if state is YES or ok return state 1 (OK)\n\t\t\t\t\t\t\tif($server_other == 'OK' || $server_other == 'Yes'){\t\n\t\t\t\t\t\t\t\t$msg_ready = 1;\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$msg_ready = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}if($key == 1){\n\t\t\t\t\t\t\tif($server_other == 'OK' || $server_other == 'Yes'){\t\n\t\t\t\t\t\t\t\t$msg_oper = 1;\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$msg_oper = 0;\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#return msg in format value value on on with new line\n\t\t\t\t\t$msg = \"$msg_ready\\n$msg_oper\\non\\non\\n\"; \n\t\t\t\t}elseif($mode == 'parameters'){\n\t\t\t\t\t#if input for function(argv[2]) is parameters\n\t\t\t\t\tforeach($exit_other_array as $key => $server_other){\n\t\t\t\t\t#value equal value[index 0];\n\t\t\t\t\t#return 4 key index 0-3 (4 lines)\n\t\t\t\t\t$server_other = $server_other[0];\n\t\t\t\t\t\tif($key == 2){\n\t\t\t\t\t\t\tif($server_other == 'OK' || $server_other == 'Yes'){\t\n\t\t\t\t\t\t\t\t$msg_volt = 1;\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$msg_volt = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}if($key == 3){\n\t\t\t\t\t\t\tif($server_other == 'OK' || $server_other == 'Yes'){\t\n\t\t\t\t\t\t\t\t$msg_temp = 1;\t\t\t\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$msg_temp = 0;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$msg = \"$msg_volt\\n$msg_temp\\non\\non\\n\"; \t\t\n\t\t\t\t}else{\n\t\t\t\t\t$msg = \"Sorry bad mode\";\n\t\t\t\t}\n\t\t\t\t#Here it works the same way\n\t\t\t}else{\n\t\t\t\tpreg_match($reg_string_all, $handle, $exit_all);\n\t\t\t\t$exit_array = array($key => $exit_all);\n\t\t\t\tif($mode == 'operational'){\n\t\t\t\t\tforeach($exit_array as $key => $server_raid){\n\t\t\t\t\t\t$server_raid = $server_raid[0];\n\t\t\t\t\t\tif($key == 2){\n\t\t\t\t\t\t\tif($server_raid == 'Operational' || $server_raid == 'Optimal'){\t\n\t\t\t\t\t\t\t\t$msg_oper = 1;\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$msg_oper = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}if($key == 3){\n\t\t\t\t\t\t\tif($server_raid != 0){\n\t\t\t\t\t\t\t\t$msg_charge = $server_raid;\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$msg_charge = $server_raid;\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$msg = \"$msg_oper\\n$msg_charge\\non\\non\\n\";\n\t\t\t\t}elseif($mode == 'parameters'){\n\t\t\t\t\tforeach($exit_array as $key => $server_raid){\n\t\t\t\t\t\t$server_raid = $server_raid[0];\n\t\t\t\t\t\tif($key == 0){\n\t\t\t\t\t\t\tif($server_raid != 0){\n\t\t\t\t\t\t\t\t#convert value for diagram MRTG 4000 on 4.00\n\t\t\t\t\t\t\t\t$msg_volt = $server_raid*0.001;\n\t\t\t\t\t\t\t\t$msg_volt = round($msg_volt,2);\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$msg_volt = $server_raid*0.001;\n\t\t\t\t\t\t\t\t$msg_volt = round($msg_volt,2);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}if($key == 1){\n\t\t\t\t\t\t\tif($server_raid != 0){\n\t\t\t\t\t\t\t\t$msg_temp = $server_raid;\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$msg_temp = $server_raid;\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$msg = \"$msg_volt\\n$msg_temp\\non\\non\\n\";\n\t\t\t\t}else{\n\t\t\t\t\t$msg = \"Sorry bad mode\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\n\t\techo $msg;\n\t}catch(Exception $e){\n\t $msg = 'Connection ERROR'.$e;\n\t print($msg);\n $status = 3;\n\t}\n}", "public function onRead() {\n\t\tstart:\n\t\tif ($this->type === 'udp') {\n\t\t\t$this->onUdpPacket($this->read($this->highMark));\n\t\t}\n\t\tif ($this->state === self::STATE_ROOT) {\n\t\t\tif (false === ($hdr = $this->readExact(2))) {\n\t\t\t\treturn; // not enough data\n\t\t\t}\n\t\t\t$this->pctSize = Binary::bytes2int($hdr, true);\n\t\t\t$this->setWatermark($this->pctSize);\n\t\t\t$this->state = self::STATE_PACKET;\n\t\t}\n\t\tif ($this->state === self::STATE_PACKET) {\n\t\t\tif (false === ($pct = $this->readExact($this->pctSize))) {\n\t\t\t\treturn; // not enough data\n\t\t\t}\n\t\t\t$this->state = self::STATE_ROOT;\n\t\t\t$this->setWatermark(2);\n\t\t\t$this->onUdpPacket($pct);\n\t\t}\n\t\tgoto start;\n\t}", "function server_alert_daemon()\n\t{\n\t\t$this->load->model(array('Kalkun_model', 'Message_model'));\n\t\t$this->load->model('server_alert/server_alert_model', 'plugin_model');\n\n\t\t$tmp_data = $this->plugin_model->get('active');\n\t\tforeach ($tmp_data->result() as $tmp)\n\t\t{\n\t\t\t$fp = fsockopen($tmp->ip_address, $tmp->port_number, $errno, $errstr, 60);\n\t\t\tif ( ! $fp)\n\t\t\t{\n\t\t\t\t$data['coding'] = 'default';\n\t\t\t\t$data['message'] = $tmp->respond_message.\"\\n\\nKalkun Server Alert\";\n\t\t\t\t$data['date'] = date('Y-m-d H:i:s');\n\t\t\t\t$data['dest'] = $tmp->phone_number;\n\t\t\t\t$data['delivery_report'] = 'default';\n\t\t\t\t$data['class'] = '1';\n\t\t\t\t$data['uid'] = '1';\n\t\t\t\t$this->Message_model->send_messages($data);\n\t\t\t\t$this->plugin_model->change_state($tmp->id_server_alert, 'false');\n\t\t\t}\n\t\t}\n\t}", "function gettemphumidityreport($customerno, $STdate, $EDdate, $deviceid, $vehicleno, $interval, $stime, $etime, $switchto, $mail_type, $vgroupname = null) {\n $finalreport = '';\n $veh_temp_details = Array();\n $days = array();\n\n $unit = $this->getunitdetailsfromdeviceid($deviceid, $customerno);\n\n if (isset($totaldays)) {\n foreach ($totaldays as $userdate) {\n //Date Check Operations\n $data = NULL;\n $STdate = date(\"Y-m-d\", strtotime($STdate));\n if ($userdate == $STdate) {\n $f_STdate = $userdate . \" \" . $stime . \":00\";\n } else {\n $f_STdate = $userdate . \" 00:00:00\";\n }\n $EDdate = date(\"Y-m-d\", strtotime($EDdate));\n if ($userdate == $EDdate) {\n $f_EDdate = $userdate . \" \" . $etime . \":00\";\n } else {\n $f_EDdate = $userdate . \" 23:59:59\";\n }\n $unitno = $unit['unitno'];\n $location = \"../../../customer/$customerno/unitno/$unitno/sqlite/$userdate.sqlite\";\n if (file_exists($location)) {\n $location = \"sqlite:\" . $location;\n $data = $this->gethumiditydata_fromsqlite($location, $deviceid, $interval, $f_STdate, $f_EDdate, false, null, $customerno);\n $vehicleid = $data['vehicleid'];\n }\n if ($data[0] != NULL && count($data[0]) > 1) {\n $days = array_merge($days, $data[0]);\n }\n }\n }\n if ($days != NULL && count($days) > 0) {\n $customer_details = $this->getcustomerdetail_byid($customerno);\n $fromdate = date('d-m-Y H:i', strtotime($STdate . ' ' . $stime));\n $todate = date('d-m-Y H:i', strtotime($EDdate . ' ' . $etime));\n $title = 'Humidity And Temperature Report';\n if ($switchto == 3) {\n $subTitle = array(\n \"Warehouse: $vehicleno\",\n \"Start Date: $fromdate\",\n \"End Date: $todate\",\n \"Interval: $interval mins\"\n );\n } else {\n $subTitle = array(\n \"Vehicle No: $vehicleno\",\n \"Start Date: $fromdate\",\n \"End Date: $todate\",\n \"Interval: $interval mins\"\n );\n }\n if (!is_null($vgroupname)) {\n $subTitle[] = \"Group-name: $vgroupname\";\n }\n if ($mail_type == 'pdf') {\n $finalreport = $this->pdf_header($title, $subTitle, $customer_details);\n } else if ($mail_type == 'xls') {\n $finalreport = $this->excel_header($title, $subTitle, $customer_details);\n } else {\n return;\n }\n\n $finalreport .= \"<hr /><br/><br/>\n <table id='search_table_2' align='center' style='width: auto; font-size:13px; text-align:center;border-collapse:collapse; border:1px solid #000;'>\n <tbody>\";\n //$veh_temp_details = '';\n if (isset($vehicleid)) {\n $veh_temp_details = $this->getunitdetailsfromvehid($vehicleid, $customerno);\n }\n $finalreport .= $this->create_humiditytemp_from_report($days, $unit, $veh_temp_details, $switchto, $customerno);\n }\n return $finalreport;\n }", "public function run_task(){\n print_r(\"OHLC querying started\\n\");\n $this->timestamp = strtotime(date('Y-m-d H:i'));\n $payload = $this->send_get();\n if (!empty($payload)){\n $this->send_post($payload);\n }\n print_r(\"OHLC querying ended\\n\");\n }", "public function testOnDataHeartbeatNoStateChanged(): void\n {\n $socket = new UDPSocketStub();\n $this->assertEmpty($socket->getData());\n\n // Use make so we don't store it in db.\n $server = factory(Server::class)->make(['game_name' => 'nolf2']);\n $server->cache();\n\n $listingServer = new ListingController($socket);\n\n $query = \"\\\\heartbeat\\\\27889\\\\gamename\\\\nolf2\\\\final\\\\\\\\queryid\\\\1.0\";\n\n $listingServer->onData($query, $server->address);\n $data = $socket->getData();\n\n // No update\n $this->assertEquals('\\\\status\\\\\\\\final\\\\', $data);\n }", "public function run_task(){\n print_r(\"OHLC querying started\\n\");\n\n $this->timestamp = strtotime(date('Y-m-d H:i')) - 61;\n $payload = $this->send_get();\n if (!empty($payload)){\n $this->send_post($payload);\n }\n\n print_r(\"OHLC querying ended\\n\");\n }", "public function testOnDataHeartbeatNoStateChangedNoServer(): void\n {\n $socket = new UDPSocketStub();\n $this->assertEmpty($socket->getData());\n\n $listingServer = new ListingController($socket);\n\n $query = \"\\\\heartbeat\\\\27889\\\\gamename\\\\nolf2\\\\final\\\\\\\\queryid\\\\1.0\";\n\n $listingServer->onData($query, '127.0.0.1:27889');\n $data = $socket->getData();\n\n $this->assertNotEmpty($data);\n\n // Because we don't have a server with that address, we need more info\n $this->assertEquals(\"\\\\status\\\\\\\\final\\\\\", $data);\n }", "function ReadInputRegisters() {\n\t\t\n\t\t//Retourne des valeurs aleatoires entre 0 et 4095 sans ouvrir les sockets\t\n\t\tif ( $this->Simulation ) {\n\t\t\tif ( $this->Nbre > 125 ) $this->Nbre = 125;\n\t\t\tfor ( $i=0; $i<=$this->Nbre; $i++ ) {\n\t\t\t\t$buffer[300000 + $this->DebutAdresse + $i] = rand(0, 4095);\n\t\t\t}\n\t\t\treturn $buffer;\n\t\t} // FIN Simulation\n\n\t\tif ( !$this->MemoConn ) return array();\n\n\t\tif ( $this->BridgeRoute ) $this->SetBridgeRoute();\n\n\t\tif ( $this->Nbre > 125 ) $this->Nbre = 125;\n\t\t$obuf = array ( 0=>chr(0), 1=>chr(0), 2=>chr(0), 3=>chr(0), 4=>chr(0), 5=>chr(6), 6=>chr($this->Unit), 7=>chr(4) ) ;\n\t\tlist( $obuf[9], $obuf[8] ) = $this->WordToBytes( (int)$this->DebutAdresse );\n\t\tlist( $obuf[11], $obuf[10] ) = $this->WordToBytes( (int)$this->Nbre );\n\n\t\tif ( $this->Debug ) { //Affichage des octets emis si en mode Debug\n\t\t\techo \"<b>Lectura de los registros de entrada</b><br>\"; \n\t\t\tfor ($i=0;$i<count($obuf);$i++ ) {\n\t\t\t\techo \"Octeto[$i] =\". ord($obuf[$i]).\"<br>\";\n\t\t\t}\n\t\t}\t\t\n\n\t\t//--------- ECRITURE DU SOCKET --------------\n\t\tfwrite( $this->Fp, implode( \"\", $obuf ) );\n\n\t\t//--------- LECTURE DU SOCKET ---------------\n\t\t$OctetRecu = fgetc($this->Fp); //Lire le 1er octet du socket pour utiliser apr?socket_get_status()\n\t\t$status = socket_get_status($this->Fp);\n\t\t$OctetRecu .= fread($this->Fp, $status[\"unread_bytes\"]); //Lire les octets restants\n\n\t\tif ( $OctetRecu[7] != $obuf[7] ) { \n\t\t\techo \"<FONT SIZE='3' COLOR='#090762'><b>\";\n\t\t\techo \"Error de lectura de los registros de entradas de \".sprintf(\"3%05d\", $this->DebutAdresse).\" \".sprintf(\"3%05d\", ($this->DebutAdresse + $this->Nbre)).\"<br>\"; \n\t\t\tfor ( $i=0; $i<count($OctetRecu); $i++ ) {\n\t\t\t\techo \"OctRecu[$i] =\". ord($OctetRecu[$i]).\"<br>\";\n\t\t\t}\n\t\t\techo \"</b></FONT>\\n\";\n\t\t\t$this->MemoConn = False;\n\t\t\treturn array();\n\t\t}\n\t\t//Recupération des DATAs\n\t\t$i = 1;\n\t\t$buffer = array();\n\t\tif ( $this->TypeFloat ) {\n\t\t\tfor ($j=0; $j < ord($OctetRecu[8]); $j=$j+4) {\n\t\t\t\t$buffer[300000 + $this->DebutAdresse + $i] = $this->BytesToFloat( ord($OctetRecu[$j+9]), ord($OctetRecu[$j+10]), ord($OctetRecu[$j+11]), ord($OctetRecu[$j+12]) );\n\t\t\t\t$i++;\n\t\t\t\t$i++;\n\t\t\t}\n\t\t} elseif ( $this->TypeDouble ) {\n\t\t\tfor ($j=0; $j < ord($OctetRecu[8]); $j=$j+4) {\n\t\t\t\t$buffer[300000 + $this->DebutAdresse + $i] = $this->BytesToDouble( ord($OctetRecu[$j+9]), ord($OctetRecu[$j+10]), ord($OctetRecu[$j+11]), ord($OctetRecu[$j+12]) );\n\t\t\t\t$i++;\n\t\t\t\t$i++;\n\t\t\t}\n\t\t} else {\n\t\t\tfor ($j=0; $j < ord($OctetRecu[8]); $j=$j+2) {\n\t\t\t\t$buffer[300000 + $this->DebutAdresse + $i] = $this->BytesToWord( $OctetRecu[$j+9], $OctetRecu[$j+10] );\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Affichage des octets recu si mode Debug\n\t\tif ( $this->Debug ) {\n\t\t\tfor ( $i=0; $i<strlen($OctetRecu); $i++ ) {\n\t\t\t\techo \"OctRecu[$i] =\". ord($OctetRecu[$i]).\"<br>\";\n\t\t\t}\n\t\t}\n\t\n\t\tif ( $this->Debug ) { //Affichage des octets recu si mode Debug\n\t\t\tfor ( $i=0; $i<strlen($OctetRecu); $i++ ) {\n\t\t\t\techo \"OctRecu[$i] =\". ord($OctetRecu[$i]).\"<br>\";\n\t\t\t}\n\t\t}\n\n\t\treturn $buffer ;\n\t}", "public function runLoop()\n \t{\n \t\t//$order = 0;\n\t\t//$startAddress = 100;\n\t\t//$quantity = 1;\n\t\t//$packet = new ReadCoilsRequest($startAddress, $quantity);\t\n\t\t\t \n \t\t$mainLoop = $this->loop;\n \t\t//$mainConnection = $this->connection;\n\t\t\n \t\ttry {\n \t\t\t$timer = $mainLoop->addPeriodicTimer(1, function () {\n\n\t\t\t});\n\t\t\t$mainLoop->addTimer(480, function () use ($mainLoop, $timer) {\n\t\t\t $mainLoop->cancelTimer($timer);\n\t\t\t echo 'Done' . PHP_EOL;\n\t\t\t});\t\n\t\t\t$mainLoop->run();\n\n \t\t} catch(Exception $exception){\n \t\t\techo 'An exception occurred' . PHP_EOL;\n \t\techo $exception->getMessage() . PHP_EOL;\n \t\techo $exception->getTraceAsString() . PHP_EOL;\n \t\t}\n \t}", "private function refreshData()\n {\n $output = [];\n exec('brctl show 2>> /dev/null', $output);\n foreach ($output as $line) {\n \n }\n }", "function listen( ) {\n\t\tif ( !strpos($this->buff,\"\\n\") )\n \t$this->buff .= stream_socket_recvfrom($this->r,1500000,0,$peer);\n\n\t\t// Check if a whole package has arrived\n\t\tif ( $pos = strpos($this->buff,\"\\n\") ) {\n\t\t\t$start = strpos($this->buff,\"{\");\n\t\t\t$pkt = substr($this->buff,$start,$pos+1-$start);\n\t\t\t$this->buff = strpos($this->buff,$pos+1);\n\n\t\t\t// Decode and check fail\n\t\t\tif ( !$json = json_decode($pkt,true) ) {\n\t\t\t\tnote(critical, \"INVALID JSON! \".$pkt.\"\\n\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// Ignore prev sent messages\n\t\t\tif ( isset($this->sent[$pkt]) || $json['from'] == $this->peer ) {\n\t\t\t\tunset($this->sent[$pkt]);\n\t\t\t\treturn false;\n\t\t\t}\n\n if( isset($json['port']) ){\n echo \"get from tcp socket on port \".$json['port'].\"\\n\";\n\n $peer = explode(':',$peer);\n $fp = fsockopen($peer[0], $json['port'], $errno, $errstr, 30);\n if (!$fp) {\n echo \"$errstr ($errno)<br />\\n\";\n } else {\n $string = '';\n while (!feof($fp)) {\n $string .= fgets($fp, 128);\n }\n fclose($fp);\n $json = json_decode($string,true);\n echo \"got $string\\n\";\n }\n\n }\n\n\t\t\t//if ( $this->log && (!isset($json['type']) || $json['type'] != 'log') ) {\n\t\t\tif ( $this->log && (!isset($json['type']) || $json['type'] != 'log') ) {\n\t\t\t\terrorhandler::recive_pkt($json,$pkt);\n }\n\n \treturn $json;\n\t\t}\n\n\t\treturn false;\n }", "public function poll()\n {\n // Return any elapsed time for timers\n return $this->listTimers(true);\n }", "function talk_to_server_recent_texty($un) {\n\t\t\t// loop until a socket connection is created\n\t\t\tdo {\n\t\t\t\t$socket_fd = stream_socket_client('localhost:'.get_random_port(), $errno, $errstr, 25);\n\t\t\t} while (!$socket_fd);\n\t\t\t\n\t\t\t// $message is the string that will be sent over the open socket to the server\n\t\t\t// It will be in the format: function_name,username,email,password,firstname,lastname\n\t\t\t// String will delimit different data fields by commas, even if a data field is empty\n\t\t\t$message = LAST_TEXTY_FUNC . \",\" . $un;\n\t\t\t$message = append_commas($message); // append commas until message's length is PHP_MSG_SIZE\n\t\t\tfwrite($socket_fd, $message);\n\t\t\t$received_message;\n\t\t\tstream_set_blocking($socket_fd, 1); // Blocks the stream until data is available on it\n\t\t\t$received_message = stream_get_contents($socket_fd);\n\t\t\tfclose($socket_fd);\n\t\t\treturn $received_message;\n\t\t}", "function broadcastInfo($conn, $bID) {\r\n\r\n\t\t\t\tglobal $wizGradeBroadcastTB;\r\n\r\n\t\t\t\t$broadcastData = $conn->query(\"SELECT bID, bTitle, broadcastMsg, date\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\tFROM $wizGradeBroadcastTB\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\tWHERE bID = $bID\")->fetchAll(PDO::FETCH_ASSOC);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\tarray_unshift($broadcastData,\"\");\r\n\t\t\t\tunset($broadcastData[0]);\r\n\r\n\t\t\t\treturn $broadcastData;\r\n\t\t\t\r\n\t\t}", "public function receiveTelegram()\n {\n $ip = Setting::where(['key' => 'inverter_ip'])->firstOrFail()->value;\n $port = Setting::where(['key' => 'inverter_port'])->firstOrFail()->value;\n\n $sock = @stream_socket_client(\n 'tcp://'.$ip.':'.$port,\n $errorCode,\n $errorStr,\n 10\n );\n\n if ($sock === false) {\n throw new \\Exception($errorStr, $errorCode); // Todo: throw custom exception and save to DB for later use\n }\n\n $checksum = $this->getInverterChecksum();\n\n $sentBytes = fwrite($sock, $checksum, strlen($checksum));\n\n if ($sentBytes === false) {\n throw new \\Exception('Error sending checksum to inverter');\n }\n\n $buffer = @fread($sock, 128);\n fclose($sock);\n\n if ($buffer === false || strlen($buffer) <= 90) {\n throw new \\Exception('Could not read 99 bytes from inverter');\n }\n\n return $buffer;\n }", "function getrawmithermostat($mac) {\n\ndebmes('вызвали getrawmithermostat', 'bletool');\n//set_time_limit(10);\n//ob_implicit_flush(true);\n\n\n$this->resethci();\n\n\n\n$state=0;\n\n//$exe_command = 'ping google.com';\n//$exe_command = 'gatttool --device=c4:7c:8d:63:71:c8 -I';\n//$exe_command = 'gatttool -t random -b --device=c4:7c:8d:63:71:c8 -I';\n$exe_command = 'gatttool -t random -I';\n\n//sg('test.mif',$exe_command);\n//$exe_command = 'gatttool -I';\n//$exe_command = 'gatttool ';\n//$exe_command = 'sudo timeout -s INT 30s hcitool lescan';\n\n\n$descriptorspec = array(\n 0 => array(\"pipe\", \"r\"), // stdin\n 1 => array(\"pipe\", \"w\"), // stdout -> we use this\n 2 => array(\"pipe\", \"w\") // stderr \n);\n$i=0;\n$s=0;\n$process = proc_open($exe_command, $descriptorspec, $pipes);\n\nif (is_resource($process))\n{\n\n\n\n while( ! feof($pipes[1]))\n {\ndebmes('state:'.$state, 'bletool');\nif ($state==0) {\n// echo $i.' send conect:';\n\nfputs($pipes[0], \"connect $mac\".\"\\n\");\nsleep(2);\n}\n\nif ($state==1&&$s==0) { \n//echo $i.' send 0x33 A01F:';\nfputs($pipes[0], 'char-write-req 0x0010 0100'.\"\\n\");\nsleep(3);\n$s=$s+1;\n//$state=2;\n}\n\nif ($state==12) { \nfputs($pipes[0], 'char-read-hnd 0x35'.\"\\n\");\nsleep(1);\n}\n\n\nif ($state==3) { \n//echo $i.' send exit:';\n fputs($pipes[0], 'exit'.\"\\n\");\n}\n\n//fputs($pipes[0], 'help'.\"\\n\");\n//}\n\n\n// fputs($pipes[0], 'char-read-hnd 0x35'.\"\\n\");\n\n $return_message = fgets($pipes[1], 1024);\n // $return_message2 = fgets($pipes[2], 1024);\n if (strlen($return_message) == 0) break;\n if ($i>50) break;\n\n//echo $i.\" state:\".$state.\" \".$return_message.'<br />';\nif (strpos($return_message, 'Connection successful')>0) $state=1;\nif (strpos($return_message, 'Characteristic value was written successfully')>0) $state=2;\n\nif (strpos($return_message, 'Notification handle')>0)\n{ $state=3; \n\n$value=explode(\":\",\n\nsubstr($return_message,strpos($return_message, 'Notification handle'))\n)[1];\n//echo \"value: \".$value.\"<br>\";\n }\n\nif (strpos($return_message, 'Disconnected')>0) $state=3;\n// ob_flush();\n// flush();\n$i=$i+1;\n\n }\n//sleep(1);\n}\n//echo \"<br>\";\nreturn $value;\n}", "public function bustime(){\n\t\n\t\t$response = $this->httpRequest( $this->busAPIURL. 'gettime?key=' .$this->busAPIKey );\n\t\treturn simplexml_load_string( $response ); \n\t\t\n\t}", "public function update($temperature, $humidity, $pressure)\n {\n $this->temperature = $temperature;\n $this->humidity = $humidity;\n $this->display();\n }", "private function receive(&$message, &$pid, &$resourceName, &$resourceValue, $timeInterval = 700) { // {{{\n\t\tif ($this->isIntercomBroken()) return false;\n\n\t\t$data = null;\n\t\t$isAlive = true;\n\n\t\tdo {\n\t\t\t$data = $this->intercomRead->receive($timeInterval);\n\t\t\t$isDataEmpty = empty($data);\n\t\t\tif ($isDataEmpty) {\n\t\t\t\t$isAlive = $this->isPidAlive($this->intercomInterlocutorPid);\n\t\t\t\tif ($isAlive) {\n\t\t\t\t\tfor ($i = 0; $i < 120; ++$i) { }\n\t\t\t\t\tusleep(mt_rand(10000, 200000));\n\t\t\t\t}\n\t\t\t}\n\t\t} while ($isDataEmpty && $isAlive);\n\n\t\tif (!$isDataEmpty)\n\t\t\t$this->decodeMessage($data, $message, $pid, $resourceName, $resourceValue);\n\n\t\tif (defined('DEBUG_MODE')) {\n\t\t\t$dbgStr = '[' . getmypid() . \"] received \";\n\t\t\tswitch ($message) {\n\t\t\t\tcase self::$ADDORUPDATESYN: $dbgStr .= 'ADDORUPDATESYN'; break;\n\t\t\t\tcase self::$ADDORUPDATEACK: $dbgStr .= 'ADDORUPDATEACK'; break;\n\t\t\t\tcase self::$ADDORUPDATENACK: $dbgStr .= 'ADDORUPDATE_N_ACK'; break;\n\t\t\t\tcase self::$UNRELADDORUPDATESYN: $dbgStr .= 'UNRELADDORUPDATESYN'; break;\n\t\t\t\tcase self::$UNRELADDORUPDATEACK: $dbgStr .= 'UNRELADDORUPDATEACK'; break;\n\t\t\t\tcase self::$UNRELADDORUPDATENACK: $dbgStr .= 'UNRELADDORUPDATE_N_ACK'; break;\n\t\t\t\tcase self::$ERASESYN: $dbgStr .= 'ERASESYN'; break;\n\t\t\t\tcase self::$ERASEACK: $dbgStr .= 'ERASEACK'; break;\n\t\t\t\tcase self::$ERASENACK: $dbgStr .= 'ERASE_N_ACK'; break;\n\t\t\t\tcase self::$UNRELERASESYN: $dbgStr .= 'UNRELERASESYN'; break;\n\t\t\t\tcase self::$UNRELERASEACK: $dbgStr .= 'UNRELERASEACK'; break;\n\t\t\t\tcase self::$UNRELERASENACK: $dbgStr .= 'UNRELERASE_N_ACK'; break;\n\t\t\t\tcase self::$READSYN: $dbgStr .= 'READSYN'; break;\n\t\t\t\tcase self::$READACK: $dbgStr .= 'READACK'; break;\n\t\t\t\tcase self::$READNACK: $dbgStr .= 'READ_N_ACK'; break;\n\t\t\t\tcase self::$UNRELREADSYN: $dbgStr .= 'UNRELREADSYN'; break;\n\t\t\t\tcase self::$UNRELREADACK: $dbgStr .= 'UNRELREADACK'; break;\n\t\t\t\tcase self::$UNRELREADNACK: $dbgStr .= 'UNRELREAD_N_ACK'; break;\n\t\t\t\tcase self::$READALLSYN: $dbgStr .= 'READALLSYN'; break;\n\t\t\t\tcase self::$READALLACK: $dbgStr .= 'READALLACK'; break;\n\t\t\t\tcase self::$READALLNACK: $dbgStr .= 'READALL_N_ACK'; break;\n\t\t\t\tcase self::$LOCKSYN: $dbgStr .= 'LOCKSYN'; break;\n\t\t\t\tcase self::$LOCKACK: $dbgStr .= 'LOCKACK'; break;\n\t\t\t\tcase self::$LOCKNACK: $dbgStr .= 'LOCK_N_ACK'; break;\n\t\t\t\tcase self::$UNLOCKSYN: $dbgStr .= 'UNLOCKSYN'; break;\n\t\t\t\tcase self::$UNLOCKACK: $dbgStr .= 'UNLOCKACK'; break;\n\t\t\t\tcase self::$UNLOCKNACK: $dbgStr .= 'UNLOCK_N_ACK'; break;\n\t\t\t}\n\t\t\techo \"{$dbgStr}, {$resourceName}, \" . serialize($resourceValue) . \" from {$pid} /// {$data}\\n\";\n\t\t}\n\n\t\treturn !$isDataEmpty;\n\t}", "function MTD_DESCARGAR_BACKTONES()\n {\n global $vg_smpp_port_wap, $vg_smpp_host, $vg_db_conexion;\n\n //CHEQUEO DE REINTENTO\n if ($this->MTD_CHEQUEO_REINTENTO() == false)\n {\n return \"-5\";\n }\n\n //REUTILIZACION DE CODIGO DE V2\n $fp = fsockopen($vg_smpp_host, $vg_smpp_port_wap, $errno, $errstr);\n if (!$fp)\n {\n FN_NET_LOGGER(\"MTD_DESCARGAR_BACKTONES > msisdn:\".$this->vlc_msisdn.\" tono:\".$this->vlc_id_tono.\" Error de conexion con el servicio host:$vg_smpp_host puerto:$vg_smpp_port_wap\", 2);\n return \"-1\";\n }\n //ENVIAR A ASYNC MULTI LA COMPRA DE DESCARGA\n //$vf_reason=5;\n //$vf_isquery=0;\n //FN_NET_LOGGER(\"MTD_DESCARGAR_BACKTONES > msisdn:\".$this->vlc_msisdn.\" tono:\".$this->vlc_id_tono.\" Envio a Async\", 2);\n\n //$vf_resultado_compra=-1;\n //$vf_resultado_compra= FN_SEND_ASYNC($this->vlc_msisdn,$this->vlc_id_tono,$vf_reason,$vf_isquery);\n $vf_resultado_compra=0;\n\n // FN_NET_LOGGER(\"MTD_DESCARGAR_BACKTONES > msisdn:\".$this->vlc_msisdn.\" tono:\".$this->vlc_id_tono.\" Async Responde:$vf_resultado_compra \", 2);\n if ($vf_resultado_compra == 0)\n {\n\n $vl_arreglo_datos= array();\n $vl_arreglo_datos= $this->MTD_DB_LISTAR_TONO();\n $vl_nombre_tono= $vl_arreglo_datos[0][1].\" - \".$vl_arreglo_datos[0][2];\n\t\t\t$query = \"DELETE FROM ringtones WHERE msisdn='\".$this->vlc_msisdn.\"' and tono=\".$this->vlc_id_tono.\"\";\n $vl_resultado =false;\n $vl_resultado =FN_RUN_NONQUERY($query,$vg_db_conexion);\n\n $query = \"INSERT INTO ringtones (msisdn,tono,fecha) VALUES ('\".$this->vlc_msisdn.\"',$this->vlc_id_tono,unix_timestamp())\";\n $vl_resultado =false;\n $vl_resultado =FN_RUN_NONQUERY($query,$vg_db_conexion);\n\n $codigo = FN_DB_ULTIMO_REGISTRO();\n FN_NET_LOGGER(\"MTD_DESCARGAR_BACKTONES msisdn:\".$this->vlc_msisdn.\" tono:\".$this->vlc_id_tono.\" Id:$codigo \");\n if ($vg_configuracion_regional == 'PY')\n {\n $this->vlc_msisdn = preg_replace('/^098/','59598',$this->vlc_msisdn);\n }\n elseif($vg_configuracion_regional == 'BO')\n {\n $this->vlc_msisdn = preg_replace('/^7/','5917',$this->vlc_msisdn);\n }\n\n $url = \"http://backtones.com.bo/bajar.php?msisdn=\".$this->vlc_msisdn.\"&amp;id=\".$codigo;\n\n $content = \"\\r\\n\\r\\n\";\n $content.= \"--asdlfkjiurwghasf\\r\\n\";\n $content.= \"Content-Type: application/xml\\r\\n\\r\\n\";\n $content.= \"<?xml version=\\\"1.0\\\"?>\n <!DOCTYPE pap PUBLIC \\\"-//WAPFORUM//DTD PAP//EN\\\"\n \\\"http://www.wapforum.org/DTD/pap_1.0.dtd\\\">\n <pap>\n <push-message push-id=\\\"9fjeo39jf084@pi.com\\\"\n progress-notes-requested=\\\"false\\\">\n <address address-value=\\\"WAPPUSH=+\".$this->vlc_msisdn.\"/TYPE=PLMN@entel.bo\\\">\n </address>\n <quality-of-service\n priority=\\\"low\\\"\n delivery-method=\\\"unconfirmed\\\"\n network-required=\\\"true\\\"\n network=\\\"gsm\\\"\n bearer-required=\\\"true\\\"\n bearer=\\\"sms\\\">\n </quality-of-service>\n </push-message>\n </pap>\\r\\n\\r\\n\";\n $content.= \"--asdlfkjiurwghasf\\r\\n\";\n $content.= \"Content-Type: text/vnd.wap.si\\r\\n\\r\\n\";\n $content.= \"<?xml version=\\\"1.0\\\"?>\n <!DOCTYPE si PUBLIC \\\"-//WAPFORUM//DTD SI 1.0//EN\\\"\n \\\"http://www.wapforum.org/DTD/si.dtd\\\">\n <si>\n <indication href=\\\"$url\\\" action=\\\"signal-high\\\">\n $vl_nombre_tono\n Te quedan 3 intentos para realizar la descarga, el precio por cada descarga es 3 Bs. la descarga estara habilitada por 4 horas, para consultas llamar al *611\n </indication>\n </si>\\r\\n\\r\\n\";\n\n $content .= \"--asdlfkjiurwghasf--\\r\\n\";\n\n $headers = \"POST /wappush HTTP/1.1\\r\\n\";\n $headers.= \"User-Agent: SS7Solutions/1.1\\r\\n\";\n $headers.= \"Content-Type: multipart/related; boundary=asdlfkjiurwghasf; type=\\\"application/xml\\\";\\r\\n\";\n $headers.= \"Content-Length: \".strlen($content).\"\\r\\n\\r\\n\";\n\n fputs($fp,$headers,strlen($headers));\n fputs($fp,$content,strlen($content));\n FN_NET_LOGGER(\"DESCARGA BACKTONE> Envio de MSG a WAPPUSH > msisdn: \".$this->vlc_msisdn);\n FN_NET_LOGGER(\"DESCARGA BACKTONE> PUSH MSG > URL: $url \");\n\n return $this->MTD_APLICAR_TEMPLATE_POPUP_DESCARGA($this->vlc_msisdn,'descargar');\n\n }\n else\n {\n FN_NET_LOGGER(\"DESCARGA BACKTONE> fallo de compra> msisdn: \".$this->vlc_msisdn);\n return $this->MTD_RETORNOS_RESPUESTA_ASYNC($vf_resultado_compra);\n }\n\n }", "public function poll(Poll $poll) {}", "public function ping() {\n spMQTTDebug::Log('ping()');\n $pingreqobj = $this->getMessageObject(spMQTTMessageType::PINGREQ);\n $pingreqobj->write();\n $pingrespobj = null;\n $pingresp = $pingreqobj->read(spMQTTMessageType::PINGRESP, $pingrespobj);\n spMQTTDebug::Log('ping(): response ' . ($pingresp ? 1 : 0));\n return $pingresp;\n }", "protected function listenPolling($cycle = 1)\r\n {\r\n $this->_logger->log(__CLASS__.' '.__METHOD__, array('cycle' => $cycle));\r\n\r\n $this->_connector->setParams(array('timeout' => 60)); // 1min\r\n\r\n ListenerProcess::addComment($this->listener->listener_id, 'comment', 'Start polling');\r\n\r\n $messages = null;\r\n\r\n $process = $this;\r\n $logger = $process->_logger;\r\n\r\n\r\n\r\n $this->_connector->onReceiveMessage = function ($message, $stationId) use (&$process, &$logger) {\r\n $logger->log(__CLASS__.' '.__METHOD__ . ' New message', array('message' => $message, 'listener_id' => $process->listener->listener_id, 'overwrite' => $process->settings->overwrite_data_on_listening));\r\n\r\n $messageId = ListenerLog::addNew($message, $process->listener->listener_id, $process->settings->overwrite_data_on_listening, 'poller', $stationId);\r\n\r\n ListenerProcess::addComment($process->listener->listener_id, 'comment', 'got msg #' . $messageId);\r\n\r\n };\r\n\r\n $result = $this->_connector->readData($messages);\r\n $this->_logger->log(__CLASS__.' '.__METHOD__ .' Complete listen datalogger.', array('cycle' => $cycle, 'result' => $result));\r\n\r\n\r\n return $result;\r\n }", "public function execute()\n {\n $value = $this->getSocket(self::SOCKET_VALUE)->getNode(0)->getValue();\n\n if ($this->hasSocket($value)) {\n $this->activate($value);\n }\n }", "function main() {\n \t//select all polls\n \t$res_polls = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'tx_jkpoll_poll','');\n\t\twhile ($row_polls = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res_polls)) {\t\n\t\t\t//check if update is necessary\n\t\t\t$pos = strpos($row_polls['answers'], '|');\n\t\t\tif ($pos > 0) {\n\t\t\t\t// get every answer\n\t\t\t\t$answers = explode(\"\\n\", $row_polls['answers']);\n\t\t\t\t$answers_new = \"\";\n\t\t\t\t$votes_new = \"\";\n\t\t\t\t$colors_new = \"\";\n\t\t\t\tforeach ($answers as $answer) {\t\t\t\t\n\t\t\t\t\tlist ($votes, $text, $color) = explode('|', $answer);\t\t\t\t\n\t\t\t\t\t$answers_new .= $text.\"\\n\";\n\t\t\t\t\t$votes_new .= $votes.\"\\n\";\n\t\t\t\t\t$colors_new .= $color.\"\\n\";\n\t\t\t\t} \n\t\t\t\t$answers_new = trim($answers_new);\n\t\t\t\t$votes_new = trim($votes_new);\n\t\t\t\t$colors_new = trim($colors_new);\n\t\t\t\t\n\t\t\t\t//write back to database\t\t\t\n\t\t\t\t$updateFields = array(\n\t\t\t\t\t'answers' => $answers_new,\n\t\t\t\t\t'votes' => $votes_new,\n\t\t\t\t\t'colors' => $colors_new\n\t\t\t\t);\n\t\t\t\t$GLOBALS['TYPO3_DB']->exec_UPDATEquery('tx_jkpoll_poll', 'uid='.$row_polls['uid'], $updateFields);\n\t\t\t}\n\t\t} \n\t\t$content.= '<br />Update complete!';\n return $content; \n }", "public function getSocketData();", "public function passive_status()\n\t{\n\t\t\n\t\t $beacons= $_POST['arr'];\n\t\tif($beacons[0]=='checkall')\n\t\t{\n\t\t\t$val = array_shift($beacons);\n\t\t}\n\t\t$count = count($beacons);\n\t\tfor($m=0;$m<$count;$m++)\n\t\t{ \n\t\t\t$id=$beacons[$m];\n\t\t\t$this->mod_beacon->change_status_to_passive($id);\n\t\t}\n\t}", "function execute_cmd($cmd, $notify = ''){\necho $cmd;\nif(empty($_REQUEST['host'])){\n$host = '127.0.0.1';\n}else{\n$host = $_REQUEST['host'];\n}\n\n# change tv.local to the hostname/address of your frontend\n$fp = fsockopen($host, 6546, $errno, $errstr, 35);\n\nif (!$fp) {\n\techo \"ERROR: $errstr ($errno)<br />\\n\";\n} else {\n\tstream_set_timeout ( $fp, 0, 100000);\n\t$banner = stream_get_contents($fp);\n\t\n\t$banner = \"\";\n\t\n\t$c = fgetc($fp);\n\twhile ($c !== false && $c != \"#\")\n\t{\n\t\t#echo \"c = $c<br>\\n\";\n\t\t$banner .= $c;\n\t\t$c = fgetc($fp);\n\t}\n\tif ($c !== false)\n\t{\n\t\t$c = fgetc($fp); #Read in the extra space after the #\n\t}\n\t\n\t\t\n\t$cmd = \"$cmd\\x0d\\x0a\";\n \n\tfwrite($fp,$cmd);\n\t$res = fgets($fp);\nprint_r($res);\n\tfclose($fp);\n}\nif(!empty($notify)){\nexecute_cmd('message ' . $notify);\n}\nreturn;\n}", "public function network_realtime_bid() {\n $this->Finditquick_model->real_time_bid_adjustment();\n }", "function updateConsigne($newTemp) {\n\tglobal $heatzone;\n $objResponse = new xajaxResponse();\n $DB=mysqli_connect(mysqli_HOST, mysqli_LOGIN, mysqli_PWD);\n mysqli_select_db($DB,mysqli_DB);\n mysqli_query($DB ,\"UPDATE `\" . TABLE_CHAUFFAGE_CLEF. \"` SET `valeur` = '\" . $newTemp . \"' WHERE (`ZoneNber`='\".$heatzone.\"' AND `clef` = 'temperature');\");\n mysqli_close($DB);\n $objResponse->assign(\"consigneconfort\",\"innerHTML\", $newTemp);\n\t//sleep(10);\n\texec('php /data/www/smartcan/bin/chauffage.php');\n\texec('php /data/www/smartcan/bin/temperatures.php');\n return $objResponse; \n }", "function sms_getBroadcastResponse(&$broadcast_response, &$error)\n{\n\t$sql = \"SELECT * FROM communications WHERE phone_to='BROADCAST_RESPONSE' \".\n\t\t\"ORDER BY communication_time DESC LIMIT 1\";\n\treturn db_db_getrow($sql, $broadcast_response, $error);\n}", "function service()\n {\n $this->logState('init');\n $this->start();\n $this->checkMemory(false);\n\n while (!$this->shutdown) {\n $timeouts = array_values($this->pollTimeouts);\n $timeouts[] = 60; // default max timeout\n\n // Wait for something on one of our sockets\n $sockets = array();\n $managers = array();\n foreach ($this->managers as $manager) {\n foreach ($manager->getSockets() as $socket) {\n $sockets[] = $socket;\n $managers[] = $manager;\n }\n $timeouts[] = intval($manager->timeout());\n }\n\n $timeout = min($timeouts);\n if ($sockets) {\n $read = $sockets;\n $write = array();\n $except = array();\n $this->logState('listening');\n common_log(LOG_DEBUG, \"Waiting up to $timeout seconds for socket data...\");\n $ready = stream_select($read, $write, $except, $timeout, 0);\n\n if ($ready === false) {\n common_log(LOG_ERR, \"Error selecting on sockets\");\n } else if ($ready > 0) {\n foreach ($read as $socket) {\n $index = array_search($socket, $sockets, true);\n if ($index !== false) {\n $this->logState('queue');\n $managers[$index]->handleInput($socket);\n } else {\n common_log(LOG_ERR, \"Saw input on a socket we didn't listen to\");\n }\n }\n }\n }\n\n if ($timeout > 0 && empty($sockets)) {\n // If we had no listeners, sleep until the pollers' next requested wakeup.\n common_log(LOG_DEBUG, \"Sleeping $timeout seconds until next poll cycle...\");\n $this->logState('sleep');\n sleep($timeout);\n }\n\n $this->logState('poll');\n $this->poll();\n\n $this->logState('idle');\n $this->idle();\n\n $this->checkMemory();\n }\n\n $this->logState('shutdown');\n $this->finish();\n }", "public function get120Volt()\n {\n return Socket::getVolt();\n }", "public function checkForActiveChecksUpdates()\n {\n $currentTime=time();\n if(($currentTime-$this->serverActiveUpdateLast)>$this->serverActiveUpdateInterval)\n {\n $ans='';\n $fp = fsockopen($this->serverActive, $this->serverActivePort, $errNo, $errStr, 30);\n if (!$fp) {\n throw new ZabbixActiveAgentException($errStr ($errNo));\n } else {\n $data=$this->getActiveRequest();\n $out=ZabbixProtocol::buildPacket($data);\n fwrite($fp, $out);\n while (!feof($fp)) {\n $ans.=fgets($fp, 128);\n }\n fclose($fp);\n\n\n if(ZabbixProtocol::ZABBIX_MAGIC!=substr($ans,0,4))\n throw new ZabbixActiveAgentException(\"Invalid packet received. Packet header mismatch.\");\n //if(ZabbixProtocol::ZABBIX_DELIMITER!=unpack(\"C\",substr($ans,4,1)))\n // throw new ZabbixActiveAgentException(\"Invalid packet received.\"); //GOT 0x00\n $payloadLength=ZabbixProtocol::getLengthFromPacket(substr($ans,5,8));\n $payloadJson=substr($ans,13,$payloadLength);\n\n if(strlen($payloadJson)!=$payloadLength)\n throw new ZabbixActiveAgentException(\"Invalid packet received. Wrong payload length.\");\n\n $payload=json_decode($payloadJson,true);\n\n switch (json_last_error()) {\n case JSON_ERROR_NONE:{break;}\n case JSON_ERROR_DEPTH:throw new ZabbixActiveAgentException(\"Configuration update error, JSON_ERROR_DEPTH\");\n case JSON_ERROR_STATE_MISMATCH:throw new ZabbixActiveAgentException(\"Configuration update error, JSON_ERROR_STATE_MISMATCH\");\n case JSON_ERROR_CTRL_CHAR:throw new ZabbixActiveAgentException(\"Configuration update error, JSON_ERROR_CTRL_CHAR\");\n case JSON_ERROR_SYNTAX:throw new ZabbixActiveAgentException(\"Configuration update error, JSON_ERROR_SYNTAX\");\n case JSON_ERROR_UTF8:throw new ZabbixActiveAgentException(\"Configuration update error, JSON_ERROR_UTF8\");\n default:throw new ZabbixActiveAgentException(\"Configuration update error, no error code provided.\");\n }\n if(!isset($payload['data']))\n throw new ZabbixActiveAgentException(\"Configuration update error, payload does not contain data, got value:\".$payload['data']);\n\n $this->serverActiveConfiguration=$payload['data'];\n $this->serverActiveUpdateLast=$currentTime;\n\n $this->logger(PHPZA_LL_DEBUG,__FUNCTION__.\" update: \".$payloadJson);\n return $payload;\n }\n }\n $this->logger(PHPZA_LL_INFO,__FUNCTION__.\" done\");\n return null;\n }" ]
[ "0.8333123", "0.6396786", "0.58309764", "0.5603553", "0.52946126", "0.524572", "0.51929545", "0.50372154", "0.50299317", "0.4994431", "0.4953395", "0.4942598", "0.49290723", "0.48883685", "0.48837763", "0.48817623", "0.48804468", "0.487602", "0.4860553", "0.48539156", "0.48340973", "0.4799474", "0.4790593", "0.47352153", "0.47251984", "0.4696485", "0.46900165", "0.46699998", "0.46533307", "0.45542765", "0.4550033", "0.45460132", "0.45443818", "0.4536647", "0.45351687", "0.45187363", "0.45160013", "0.45065573", "0.45044655", "0.44976568", "0.4493688", "0.44813955", "0.4481014", "0.44793886", "0.44656074", "0.44602585", "0.444857", "0.44462553", "0.44391012", "0.44245967", "0.442447", "0.4420008", "0.44199008", "0.44099003", "0.43802387", "0.43799224", "0.43718237", "0.43696934", "0.43670517", "0.43606344", "0.4349378", "0.4347508", "0.43437016", "0.43434012", "0.43375814", "0.4336507", "0.43292865", "0.43192226", "0.431442", "0.4312506", "0.43095273", "0.4301156", "0.43010443", "0.42961836", "0.42895624", "0.4285534", "0.4281158", "0.42792454", "0.4274536", "0.42693692", "0.4265521", "0.42653397", "0.42648807", "0.42647418", "0.4250784", "0.4249422", "0.4240324", "0.42371935", "0.42369714", "0.4226591", "0.4219323", "0.42192423", "0.4215803", "0.421089", "0.42103451", "0.42068112", "0.4205025", "0.4203836", "0.41982272", "0.41977838" ]
0.7595136
1
Create array of single error by code
Создать массив из одного ошибки по коду
protected function getErrorByCode($code){ if(!isset($this->errors[$code])){ $code = 0; } return [$code => $this->errors[$code]]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getError(): array;", "abstract function getErrors(): array;", "private function error() {\n\t\treturn array(0 => \"ERROR\");\n\t}", "function getErrors(): array;", "protected function get_errors() : array\n {\n }", "public function getErrorsAsArray(): array;", "private function error_information($code)\n {\n $errorData = array();\n\n switch ($code) \n {\n case 9999:\n $errorData['message'] = 'Generic error. Error code does not exist.';\n $errorData['severity'] = 1;\n break;\n case 1001:\n $errorData['message'] = 'Missing theme file.';\n $errorData['severity'] = 1;\n break;\n case 2001:\n $errorData['message'] = 'Bad configuration parameters. The controller value must be a string.';\n $errorData['severity'] = 1;\n break; \n default:\n $errorData = null;\n }\n\n return $errorData;\n }", "public function getErrors($code)\n {\n $errList = [\n 11 => 'В запросе нет обязательных параметров',\n 12 => 'Истекло время жизни токена',\n 13 => 'Пользователь не найден',\n 14 => 'Пароль неверный',\n 15 => 'Запрос(request) не передан',\n 16 => 'Недостаточно прав (попытка работы с чужим заказом)',\n 17 => 'Запрос (request) пуст',\n 18 => 'Запрос (request) в неправильном формате',\n 19 => 'В маршруте не хватает точек, либо информация неполная',\n 20 => 'Отмена уже невозможна (курьер в пути к получателю)',\n 21 => 'Заказ не существует',\n 22 => 'Ошибка в товарах',\n 23 => 'Ошибка в точке (ах) пути',\n 24 => 'Запросы слишком частые',\n 25 => 'Неверно указан способ оплаты товара',\n 26 => 'Текущему пользователю недоступно создание заказов на выкуп',\n 27 => 'Оплата наличными недоступна',\n 28 => 'Превышено кол-во заказов для запрашивания информации',\n 50 => 'Время начала забора слишком мало',\n 51 => 'Время конца забора слишком большое',\n 52 => 'Время начала доставки слишком мало',\n 53 => 'Время начала доставки слишком большое',\n 60 => 'Недостаточно денег на балансе',\n 403 => 'API недоступно',\n 404 => 'Метод не найден',\n 500 => 'Неизвестная ошибка'\n ];\n\n return $errList[$code];\n }", "public function getErrors(): array;", "public function getErrors(): array;", "public function getErrors(): array;", "public function getErrors(): array;", "public function getErrors(): array;", "public function getErrors(): array;", "public function getErrors(): array;", "public function getErrors(): array;", "function getError()\n\t{\n\t\treturn array($this->error_code,$this->error_text);\n\t}", "public function getErrorList(): array\n\t{\n\t\treturn [\n\t\t\t12 => 1,\n\t\t\t25 => 1,\n\t\t\t43 => 1,\n\t\t\t62 => 1,\n\t\t\t79 => 1,\n\t\t\t116 => 1,\n\t\t];\n\t}", "public function errorCodes() : array\n {\n return [\n ];\n }", "function getError (){\n return array ('code'=>$this->_err_code, 'string'=>$this->_err_string, 'line'=>$this->_err_line, 'col'=>$this->_err_col);\n }", "public function constructor_throw_coding_exception_provider() {\n $data = array(\n array(0, 1, 100),\n array(1, 100, 100),\n array(1, 100, 99)\n );\n\n return $data;\n }", "public function getErrors(){\n\t\t$i = 0;\n\t\tforeach($this->errors as $error){\n\t\t\tif(count($error) != 0){\n\t\t\t\t$output[$i]['message'] = $error['message'];\n\t\t\t\t$output[$i]['code'] = $error['code'];\n\t\t\t\t\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $output;\n\t}", "public function errorCodes() : array\n {\n return [\n 'identifier.required' => UserErrorCode::ERR_EMPTY_IDENTIFIER,\n 'identifier.string' => UserErrorCode::ERR_INVALID_IDENTIFIER,\n 'relations.array' => UserErrorCode::ERR_INVALID_RELATIONS\n ];\n }", "public function errorCodes() : array\n {\n return [\n 'email.required' => AuthErrorCode::ERR_EMPTY_EMAIL,\n 'email.email' => AuthErrorCode::ERR_INVALID_EMAIL,\n 'password.required' => AuthErrorCode::ERR_EMPTY_PASSWORD,\n 'password.min' => AuthErrorCode::ERR_INVALID_PASSWORD,\n ];\n }", "public function error(): array\n {\n $code = $this->error['code'] ?? 0;\n $message = $this->error['message'] ?? '';\n\n if (empty($message)) {\n $message = $this->isPdo()\n ? $this->conn->errorInfo()\n : (pg_last_error($this->conn) ?: '');\n }\n\n return compact('code', 'message');\n }", "public function error()\n\t{\n\t\treturn [];\n\t}", "public function asArray() {\n $error = [self::KEY_ERROR => static::ERROR_STRING];\n if (!is_null($this->description)) {\n $error[self::KEY_DESCRIPTION] = $this->description;\n }\n if (!is_null($this->context)) {\n $error[self::KEY_CONTEXT] = $this->context;\n }\n return $error;\n }", "public function getErrors() : array;", "#[ArrayShape([0 => \"string\", 1 => \"int\", 2 => \"string\"])]\n #[TentativeType]\n public function errorInfo(): array {}", "#[ArrayShape([0 => \"string\", 1 => \"int\", 2 => \"string\"])]\n #[TentativeType]\n public function errorInfo(): array {}", "function _opsError($err_code,$err_text)\n {\n return array(\n 'response_code' => $err_code,\n 'response_text' => $err_text,\n 'is_success' => 0\n );\n }", "public function errorCodes() {\n\n // Get all error codes from database\n $errorCodesModel = new ErrorCodesModel();\n $errors = $errorCodesModel->getAll();\n\n // todo maybe create a different array to be more easy to use error models in view\n }", "public function getErrorCodes(): array\n {\n return static::ERROR_CODES;\n }", "public function getErrorCodes();", "public function getErrorList()\n {\n return [\n 32 => 1,\n 33 => 1,\n 43 => 1,\n 45 => 1,\n 95 => 1,\n 99 => 1,\n 105 => 2,\n 111 => 1,\n 112 => 1,\n 146 => 1,\n 152 => 1,\n 173 => 1,\n 174 => 1\n ];\n }", "public function errorMessageArray()\n\t{\n\t\treturn $this->error_message;\n\t}", "public function errorMessages(): array;", "public function getErrors() : array\n {\n return [];\n }", "protected function getErrors(){\n\t\t$resp = array();\n\t\tforeach ($this->errors as $val) {\n\t\t\tswitch($val['error']){\n\t\t\t\tcase 'required':\n\t\t\t\t\t$resp[$val['error']] = 'El campo '.$val['field']. ' es requerido';\n\t\t\t\tbreak;\n\t\t\t\tcase 'min_len':\n\t\t\t\t\t$resp[$val['error']] = 'La longitud del campo '.$val['field'].' no puede ser menor a ' .$val['len']. ' caracteres';\n\t\t\t\tbreak;\n\t\t\t\tcase 'max_len':\n\t\t\t\t\t$resp[$val['error']] = 'La longitud del campo '.$val['field'].' no puede ser mayor a ' .$val['len']. ' caracteres';\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 'alpha_numeric':\n\t\t\t\t\t$resp[$val['error']] = 'El campo '.$val['field'].' solo puede contener caracteres alfanumericos';\n\t\t\t\tbreak;\n\t\t\t\tcase 'alpha_spaces':\n\t\t\t\t\t$resp[$val['error']] = 'El campo '.$val['field'].' solo puede contener caracteres alfanumericos con espacios';\n\t\t\t\tbreak;\n\t\t\t\tcase 'alphabetic':\n\t\t\t\t\t$resp[$val['error']] = 'El campo '.$val['field'].' solo puede contener letras';\n\t\t\t\tbreak;\n\t\t\t\tcase 'integer':\n\t\t\t\t\t$resp[$val['error']] = 'El campo '.$val['field'].' solo puede contener numeros enteros';\n\t\t\t\tbreak;\n\t\t\t\tcase 'float':\n\t\t\t\t\t$resp[$val['error']] = 'El campo '.$val['field'].' solo puede contener numeros enteros o decimales';\n\t\t\t\tbreak;\n\t\t\t\tcase 'email':\n\t\t\t\t\t$resp[$val['error']] = 'El campo '.$val['field'].' contiene una direccion de email invalida';\n\t\t\t\tbreak;\n\t\t\t\tcase 'date':\n\t\t\t\t\t$resp[$val['error']] = 'El campo '.$val['field'].' tiene un formato incorrecto';\n\t\t\t\tbreak;\n\t\t\t\tcase 'file_exists':\n\t\t\t\t\t$resp[$val['error']] = 'No subio ningun archivo '.$val['field'];\n\t\t\t\tbreak;\n\t\t\t\tcase 'file_validate_problem':\n\t\t\t\t\t$resp[$val['error']] = 'El archivo '.$val['field'].' ha tenido algun problema';\n\t\t\t\tbreak;\n\t\t\t\tcase 'file_validate_format':\n\t\t\t\t\t$resp[$val['error']] = 'El archivo '.$val['field'].' no cuenta con una extension valida';\n\t\t\t\tbreak;\n\t\t\t\tcase 'file_validate_size':\n\t\t\t\t\t$resp[$val['error']] = 'El archivo '.$val['field'].' es muy grande';\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\t\n\t\t}\n\t\treturn $resp;\n\t}", "public function getErrorsArray($convert_to_string = null);", "public function getErrorList()\n {\n return [\n 33 => 1,\n 46 => 1,\n 69 => 1,\n 83 => 1,\n 88 => 1,\n 102 => 1\n ];\n }", "private static function error($text){\n\t\t$arr = array(\n\t\t\t'error_message' => $text\n\t\t);\n\n\t\treturn $arr;\n\t}", "private function alert_information($code)\n {\n $errorData = array();\n\n switch ($code) \n {\n case 9999:\n $errorData['message'] = 'Generic alert. Alert code does not exist.';\n $errorData['severity'] = 1;\n break; \n case 1001;\n $errorData['message'] = 'The user requested controller does not exist.';\n $errorData['severity'] = 5;\n break; \n default:\n $errorData = null;\n }\n\n return $errorData;\n }", "protected function genErrors($errors){\n if(is_numeric($errors) or empty($errors)){\n $errors = $this->getErrorByCode($errors);\n }elseif (is_string($errors)){\n $errors = [0 => $errors];\n }\n $formatted = [];\n foreach ($errors as $code=>$value){\n $formatted[] = [\n 'code' => $code,\n 'value' => $value\n ];\n }\n return $formatted;\n }", "private function getError()\n {\n $message = [];\n $dataArray = $this->leadData;\n $dataArray['token_rdstation'] = $this->publicToken;\n $dataArray['identificador'] = $this->identifier;\n // check error\n foreach ($this->requiredFields as $field) {\n if (empty($dataArray[$field]) || is_null($dataArray[$field])) {\n $message[] = 'This field '.$field.' can\\'t is empty.';\n }\n }\n\n if (!strlen($dataArray['token_rdstation']) == 32) {\n $message[] = 'Invalid token.';\n }\n\n if (count($message) == 0) {\n $message[] = 'Error including the lead on the RdStation.';\n }\n\n return [\n 'status' => false,\n 'message' => json_encode($message),\n ];\n }", "public function failures() : array;", "public function getErrorList()\n {\n return [];\n\n }", "public function getErrorList()\n {\n return array(\n 8 => 1,\n );\n }", "private function getError($code){ \n\t\t$response['error_code'] = $code;\n\t\treturn ['res_code'=>$code, 'response'=>$response];\n\t}", "function GetErrors($DataArray)\n\t{\n\t\n\t\t$Errors = array();\n\t\t$n = 0;\n\t\twhile(isset($DataArray['L_ERRORCODE' . $n . '']))\n\t\t{\n\t\t\t$LErrorCode = isset($DataArray['L_ERRORCODE' . $n . '']) ? $DataArray['L_ERRORCODE' . $n . ''] : '';\n\t\t\t$LShortMessage = isset($DataArray['L_SHORTMESSAGE' . $n . '']) ? $DataArray['L_SHORTMESSAGE' . $n . ''] : '';\n\t\t\t$LLongMessage = isset($DataArray['L_LONGMESSAGE' . $n . '']) ? $DataArray['L_LONGMESSAGE' . $n . ''] : '';\n\t\t\t$LSeverityCode = isset($DataArray['L_SEVERITYCODE' . $n . '']) ? $DataArray['L_SEVERITYCODE' . $n . ''] : '';\n\t\t\t\n\t\t\t$CurrentItem = array(\n\t\t\t\t\t\t\t\t'L_ERRORCODE' => $LErrorCode, \n\t\t\t\t\t\t\t\t'L_SHORTMESSAGE' => $LShortMessage, \n\t\t\t\t\t\t\t\t'L_LONGMESSAGE' => $LLongMessage, \n\t\t\t\t\t\t\t\t'L_SEVERITYCODE' => $LSeverityCode\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\n\t\t\tarray_push($Errors, $CurrentItem);\n\t\t\t$n++;\n\t\t}\n\t\t\n\t\treturn $Errors;\n\t\t\n\t}", "public function getErrorList()\r\n {\r\n return array(3 => 1);\r\n\r\n }", "public function getErrorMessages(): array;", "public function getErrorMessages(): array;", "public function provide_errors()\n\t{\n\t\t// [data, rules, labels, expected]\n\t\treturn array(\n\t\t\t// No Error\n\t\t\tarray(\n\t\t\t\tarray('username' => 'frank'),\n\t\t\t\tarray('username' => array(array('not_empty', NULL))),\n\t\t\t\tarray('username' => 'Username'),\n\t\t\t\tarray(),\n\t\t\t),\n\t\t\t// Error from message file\n\t\t\tarray(\n\t\t\t\tarray('username' => ''),\n\t\t\t\tarray('username' => array(array('not_empty', NULL))),\n\t\t\t\tarray('username' => 'Username'),\n\t\t\t\tarray('username' => 'Username must not be empty'),\n\t\t\t),\n\t\t\t// Error with another field as a parameter\n\t\t\tarray(\n\t\t\t\tarray('password' => '123', 'confirm' => '456'),\n\t\t\t\tarray('confirm' => array(array('matches', array(':validation', ':field', 'password')))),\n\t\t\t\tarray('password' => 'Password', 'confirm' => 'Confirm'),\n\t\t\t\tarray('confirm' => 'Confirm must be the same as Password'),\n\t\t\t),\n\t\t\t// Error with array field value\n\t\t\tarray(\n\t\t\t\tarray('newsletters' => array('news', 'sport', 'club')),\n\t\t\t\tarray('newsletters' => array(array(array($this, 'validation_fail'), NULL))),\n\t\t\t\tarray(),\n\t\t\t\tarray('newsletters' => 'Validation.newsletters.validation_fail'),\n\t\t\t),\n\t\t\t// No error message exists, display the path expected\n\t\t\tarray(\n\t\t\t\tarray('username' => 'John'),\n\t\t\t\tarray('username' => array(array('strpos', array(':value', 'Kohana')))),\n\t\t\t\tarray(),\n\t\t\t\tarray('username' => 'Validation.username.strpos'),\n\t\t\t),\n\t\t);\n\t}", "public function getErrorList()\n {\n return array();\n\n }", "public function getErrorList()\n {\n $testFile = func_get_arg(0);\n $parts = explode('.', $testFile);\n\n switch ($parts[1]) {\n case 'UTF-8':\n return array();\n case 'ISO-8859-1':\n return array(1 => 1);\n default:\n }\n\n throw new \\RuntimeException('Unknown sniff test fixture encountered: ' . $testFile);\n\n }", "public function getErrorList() {\n\t\treturn [\n\t\t\t31 => 1,\n\t\t\t33 => 1,\n\t\t\t39 => 1,\n\t\t\t46 => 1,\n\t\t\t53 => 2,\n\t\t\t57 => 1,\n\t\t\t60 => 1,\n\t\t\t74 => 1,\n\t\t\t87 => 2,\n\t\t\t88 => 1,\n\t\t];\n\t}", "public function get_error_array()\n {\n return $this->_error_array;\n }", "public function error(): array\n\t{\n\t\t$error = [\n\t\t\t'code' => '00000',\n\t\t\t'message' => '',\n\t\t];\n\n\t\t$sqlsrvErrors = sqlsrv_errors( SQLSRV_ERR_ALL );\n\n\t\tif (!is_array( $sqlsrvErrors )) {\n\t\t\treturn $error;\n\t\t}\n\n\t\t$sqlsrvError = array_shift( $sqlsrvErrors );\n\n\t\tif (isset( $sqlsrvError['SQLSTATE'] )) {\n\t\t\t$error['code'] = isset( $sqlsrvError['code'] ) ? $sqlsrvError['SQLSTATE'] . '/' . $sqlsrvError['code'] : $sqlsrvError['SQLSTATE'];\n\t\t} else if (isset( $sqlsrvError['code'] )) {\n\t\t\t$error['code'] = $sqlsrvError['code'];\n\t\t}\n\n\t\tif (isset( $sqlsrvError['message'] )) {\n\t\t\t$error['message'] = $sqlsrvError['message'];\n\t\t}\n\n\t\treturn $error;\n\t}", "private function parseError($msg=\"Invalid request\"){\n\t\treturn array('type'=>'error', 'name'=>'onError', 'message'=>$msg);\n\t}", "public function getErrors(): array\n {\n return $this->arrayError;\n }", "function makeError($code){\n\t\t\tglobal $rarr;\n\t\t\t$rarr['status'] = $code;\n\t\t\tif ($code == ERR_NOACTION)\n\t\t\t\t$rarr['error'] = \"Invalid Action\";\n\t\t\telse if ($code == ERR_DBCONN)\n\t\t\t\t$rarr['error'] = \"Database connection error\";\n\t\t\telse if ($code == ERR_AUTH)\n\t\t\t\t$rarr['error'] = \"Problem while authenticating the user\";\n\t\t\telse if ($code == ERR_LOGINFAIL)\n\t\t\t\t$rarr['error'] = \"Wrong username or password\";\n\t\t\telse if ($code == ERR_ARGS)\n\t\t\t\t$rarr['error'] = \"Invalid parameters passed or required parameters missing\";\n\t\t\telse if ($code == ERR_NOUSER)\n\t\t\t\t$rarr['error'] = 'Non-existant user';\n\t\t\telse if ($code == ERR_ERR)\n\t\t\t\t$rarr['error'] = 'Some problem occured';\n\t\t\telse if ($code == ERR_USER_EXISTS)\n\t\t\t\t$rarr['error'] = 'User already exists';\n\t\t\telse if ($code == ERR_NOPOST)\n\t\t\t\t$rarr['error'] = 'Post doesn\\'t exist.';\n\t\t\tdie(json_encode($rarr));\n\t\t}", "private static function getErrorStatus($status_code)\n\t\t{\n\t\t\tif ($status_code == '1000') {\n\t\t\t\t$data = array (\n\t\t\t\t\t'code' => '1000',\n\t\t\t\t\t'status' => 'Access denied'\n\t\t\t\t);\n\t\t\t}\n\t\t\telse if ($status_code == '1010') {\n\t\t\t\t$data = array (\n\t\t\t\t\t'code' => '1010',\n\t\t\t\t\t'status' => 'Client does not registered'\n\t\t\t\t);\n\t\t\t}\n\t\t\telse if ($status_code == '1020') {\n\t\t\t\t$data = array (\n\t\t\t\t\t'code' => '1020',\n\t\t\t\t\t'status' => 'All fields is required'\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn (array) $data;\n\t\t}", "public function get_errors_array()\n\t{\n\t\treturn $this->error_msg;\n\t}", "public function errors(){\n $cluster = $this->cluster;\n if( count($cluster) ){\n $errors = array();\n foreach( $cluster as $key => $data ){\n $key = explode('.', $key);\n $label = $key[0];\n $method = $key[1];\n if( empty($errors[$label]) ){\n if( empty($this->is_required( $label )) and empty(trim($data['value'])) ){\n continue;\n } else {\n $message = $this->$method( $label, $data ); \n }\n if( !empty( $message ) ){\n $errors[$label] = $message;\n } \n }\n }\n }\n return json_encode( $errors );\n }", "public function toArray()\n {\n if ($this->id !== null) {\n $errorObject[\"id\"] = $this->id;\n }\n\n if ($this->links !== null) {\n $errorObject[\"links\"] = $this->links;\n }\n\n $errorObject[\"status\"] = $this->status;\n\n if ($this->code !== null) {\n if (env(\"APP_DEBUG\", false)) {\n $errorObject[\"code\"] = \"0x\" . str_pad(dechex(intval($this->code)), 8, \"0\", STR_PAD_LEFT);\n } else {\n $errorObject[\"code\"] = $this->code;\n }\n }\n\n $errorObject[\"title\"] = $this->title;\n\n if ($this->detail !== null) {\n $errorObject[\"detail\"] = $this->detail;\n }\n\n if ($this->source !== null) {\n $errorObject[\"source\"] = $this->source;\n }\n\n if ($this->meta !== null) {\n $errorObject[\"meta\"] = $this->meta;\n }\n\n return $errorObject;\n }", "public function getErrorList()\n {\n return [21 => 1, 24 => 1, 56 => 1, 64 => 1, 73 => 1, 84 => 1, 130 => 1, 136 => 1, 144 => 1, 152 => 1, 160 => 1, 168 => 1, 176 => 1, 184 => 1, 192 => 1, 200 => 1, 208 => 1, 216 => 1, 224 => 1, 232 => 1, 240 => 1, 248 => 1, 256 => 1, 264 => 1, 272 => 1, 280 => 1, 290 => 1, 294 => 1, 311 => 1, 336 => 1, 361 => 1, 364 => 1, 399 => 1, 403 => 1];\n }", "public static function returnError($msg) {\n\t\treturn array(\n\t\t\t'status' => 'ERROR',\n\t\t\t'data' => NULL,\n\t\t\t'msg' => $msg\n\t\t);\n\t}", "public function getErrors();", "public function getErrors();", "public function getErrors();", "public function getErrors();", "public function getErrors();", "public function getErrors();", "public function getErrors();", "public function getErrors();", "public function getErrors();", "public function getErrors();", "public function getErrors();", "public function getErrors();", "public function getErrors();", "public function providerWrongInputNumber(): array\r\n {\r\n\r\n $data = [[0, ERROR_MESSAGE], [-1, ERROR_MESSAGE], [-3, ERROR_MESSAGE]];\r\n\r\n return $data;\r\n }", "public function getErrorContext(): array;", "public static function get_errors()\n\t\t{\n\n\t\t\tif (!self::is_error()) {\n\t\t\t\treturn array();\n\t\t\t}\n\t\t\t$errors = array();\n\t\t\t$errbuf = self::get_buffer(self::E_ERROR);\n\t\t\tfor ($i = 0, $sz = sizeof($errbuf); $i < $sz; $i++) {\n\t\t\t\t$errors[] = $errbuf[$i]['message'];\n\t\t\t}\n\n\t\t\treturn $errors;\n\t\t}", "public function getErrors():array\n {\n return $this->arrayError;\n }", "public function allError(): array\n {\n return $this->errorMsg;\n }", "public function getExceptionsData(): array\n {\n $errors = [];\n foreach ($this->exceptions as $key => $exception) {\n $error = array(\n 'key' => $key,\n 'code' => $exception instanceof LSException && $exception instanceof StickToDefaultValues ? ($exception->overwriteCode() ? $exception->getCode() : $exception->getDefaultCode()) : $exception->getCode(),\n 'message' => $exception instanceof LSException && $exception instanceof StickToDefaultValues ? ($exception->overwriteMessage() ? $exception->getMessage() : $exception->getDefaultMessage()) : $exception->getMessage(),\n );\n\n $errors[] = $error;\n }\n\n return $errors;\n }", "public function getErrorList()\n {\n return array(\n 6 => 1,\n 7 => 1,\n 8 => 1,\n 9 => 1,\n 10 => 1,\n 11 => 1,\n 12 => 1,\n 13 => 1,\n 14 => 2,\n 15 => 1,\n 16 => 1,\n 22 => 1,\n 29 => 1,\n 30 => 1,\n 36 => 1,\n 37 => 2,\n 42 => 2,\n 43 => 2,\n 44 => 2,\n 45 => 2,\n 47 => 2,\n 48 => 2,\n 49 => 2,\n 52 => 2,\n 56 => 2,\n 60 => 1,\n 61 => 1,\n 62 => 1,\n 64 => 1,\n 70 => 1,\n 71 => 1,\n 77 => 1,\n 80 => 1,\n 81 => 1,\n 82 => 1,\n 85 => 2,\n 87 => 1,\n 89 => 1,\n 92 => 1,\n 93 => 1,\n 98 => 1,\n 99 => 1,\n 100 => 1,\n 101 => 1,\n 104 => 1,\n 105 => 1,\n 106 => 1,\n 107 => 1,\n 112 => 1,\n 113 => 1,\n 116 => 1,\n 117 => 1,\n 118 => 1,\n 119 => 1,\n 120 => 1,\n );\n\n }", "final protected function errorMessage($message) {\n return array(\n \"error\" => array(\"message\" => $message)\n );\n }", "public function customValidation($arrayError){\n $errArray = [];\n foreach($arrayError as $key=>$error){\n foreach($error as $key2=>$err){\n if($err==\"\"){\n $errArray[] = \"Header column (\".$key2.\" at column \".$key.\") is empty or incorrect in csv file\";\n }\n }\n }\n return $errArray;\n }", "public function getErrorList()\n\t{\n\t\treturn array(\n\t\t\t9 => 1,\n\t\t\t11 => 1,\n\t\t\t13 => 2,\n\t\t\t15 => 2,\n\t\t\t27 => 2,\n\t\t\t29 => 2,\n\t\t\t31 => 1,\n\t\t\t33 => 2,\n\t\t\t35 => 4,\n\t\t\t37 => 2,\n\t\t\t39 => 2,\n\t\t\t41 => 4,\n\t\t\t43 => 3,\n\t\t\t45 => 2,\n\t\t\t47 => 4,\n\t\t\t49 => 1,\n\t\t\t51 => 14\n\t\t);\n\n\t}", "public function get_error_codes()\n {\n }", "public function get_errors();", "public function getErrorData()\n {\n return array();\n }", "public static function getDBErrors(): array\n {\n return [\n 'Undefined column' => 'Erro no sistema. (Cód Erro: ABS1001)',\n 'app_usuario_un' => 'E-mail informado não disponível para uso',\n '42703' => 'Erro no sistema (DB-42703)', // undefined column\n '23505' => 'Já existe registro com esses dados', // unicidade\n '23502' => 'Campo obrigatório não informado (DB205)',\n 'not-null constraint' => 'Verifique campos obrigatórios (DB206)',\n 'unique constraint' => 'Já existe registro com esses dados (DB207)',\n 'constraint' => 'Verifique os dados informados (DB208)',\n '01000' => 'Warning: General warning',\n '01004' => 'Warning: String data, right-truncated',\n '01006' => 'Warning: Privilege not revoked',\n '01007' => 'Warning: Privilege not granted',\n '01S00' => 'Invalid connection string attribute',\n '07001' => 'Warning: Wrong number of parameters',\n '07002' => 'Warning: Count field incorrect',\n '07005' => 'Warning: Prepared statement not executed',\n '07006' => 'Warning: Restricted data type attribute violation',\n '07009' => 'Warning: Invalid descriptor index',\n '08001' => 'Client unable to establish connection',\n '08002' => 'Connection name in use',\n '08003' => 'Connection does not exist',\n '08004' => 'Server rejected the connection',\n '08006' => 'Connection failure',\n '08S01' => 'Communication link failure',\n '21S01' => 'Insert value list does not match column list',\n '22001' => 'String data right truncation',\n '22002' => 'Indicator variable required but not supplied',\n '22003' => 'Numeric value out of range',\n '22007' => 'Invalid datetime format',\n '22008' => 'Datetime field overflow',\n '22012' => 'Division by zero',\n '22015' => 'Interval field overflow',\n '22018' => 'Invalid character value for cast specification',\n '22025' => 'Invalid escape character',\n '23000' => 'Integrity constraint violation',\n '24000' => 'Invalid cursor state',\n '28000' => 'Invalid authorization specification',\n '34000' => 'Invalid cursor name',\n '3D000' => 'Invalid catalog name',\n '40001' => 'Serialization failure',\n '40003' => 'Statement completion unknown',\n '42000' => 'Syntax error or access violation',\n '42S01' => 'Base table or view already exists',\n '42S02' => 'Base table or view not found',\n '42S11' => 'Index already exists',\n '42S12' => 'Index not found',\n '42S21' => 'Column already exists',\n '42S22' => 'Column not found',\n 'HY000' => 'General error',\n 'HY001' => 'Memory allocation error',\n 'HY004' => 'Invalid SQL data type',\n 'HY008' => 'Operation canceled',\n 'HY009' => 'Invalid use of null pointer',\n 'HY010' => 'Function sequence error',\n 'HY011' => 'Attribute cannot be set now',\n 'HYT00' => 'Timeout expired',\n 'IM001' => 'Driver does not support this function',\n 'IM017' => 'Polling is disabled',\n '23502' => 'Null value not allowed - check constraint violation',\n '23503' => 'Foreign key violation',\n '23505' => 'Unique constraint violation',\n '23514' => 'Check constraint violation',\n '24000' => 'Invalid cursor state',\n '40002' => 'Transaction rollback',\n '42000' => 'Syntax error or access violation',\n '42S02' => 'Table not found',\n '42S22' => 'Column not found',\n 'HY000' => 'General error',\n '25P02' => 'Transaction aborted',\n ];\n }", "public function getErrors(): array\n {\n return array_reduce(\n $this->errors,\n function (array $output, stdClass $input) {\n if (isset($output[$input->field])) {\n $output[$input->field][] = $input->message;\n } else {\n $output[$input->field] = [$input->message];\n }\n return $output;\n },\n []\n );\n }", "public function get_errors() {\n $result = array();\n foreach (parent::get_errors() as $error) {\n if (is_a($error, 'qtype_preg_accepting_error') || is_a($error, 'qtype_preg_modifier_error')) {\n $result[] = $error;\n }\n }\n return $result;\n }", "public static function validateErrorMessage()\n {\n return array(\n new Main\\Entity\\Validator\\Length(0, 500),\n );\n }", "public static function InvalidValueProvider(): array {\n return [\n [[]],\n [[1]],\n [(object)[]],\n [(object)[1]]\n ];\n }", "abstract function error_code();" ]
[ "0.72091204", "0.7171159", "0.69811493", "0.6917204", "0.67092717", "0.67084056", "0.6673717", "0.66727513", "0.66722494", "0.66722494", "0.66722494", "0.66722494", "0.66722494", "0.66722494", "0.66722494", "0.66722494", "0.6669275", "0.6666328", "0.66222894", "0.6600939", "0.6581272", "0.6553688", "0.6493383", "0.64902323", "0.6465462", "0.6463426", "0.6455571", "0.6434958", "0.6395917", "0.6395917", "0.63753456", "0.63542134", "0.6346788", "0.63395387", "0.63323325", "0.6329702", "0.63296384", "0.6324297", "0.6320872", "0.63079786", "0.62663424", "0.6262692", "0.62622684", "0.62292665", "0.62228656", "0.62112474", "0.61931986", "0.6179823", "0.61760426", "0.61647767", "0.6155064", "0.61449295", "0.61449295", "0.61448175", "0.61384994", "0.6132614", "0.61212957", "0.6092728", "0.60926896", "0.6084738", "0.6077323", "0.6076347", "0.60759926", "0.6063944", "0.6049962", "0.6046256", "0.60379654", "0.6028683", "0.6004644", "0.6004644", "0.6004644", "0.6004644", "0.6004644", "0.6004644", "0.6004644", "0.6004644", "0.6004644", "0.6004644", "0.6004644", "0.6004644", "0.6004644", "0.599662", "0.59957254", "0.5994506", "0.59651625", "0.5962088", "0.59618694", "0.5960068", "0.5958041", "0.5928912", "0.59189767", "0.5917595", "0.5908847", "0.5907744", "0.58809143", "0.58753", "0.58726877", "0.586257", "0.5857977", "0.58568877" ]
0.7298259
0
Set an array with all the combined data (real estate data, location, work zones) of the record/model RealEstate which ID is $id.
Создайте массив со всеми объединенными данными (данные недвижимости, расположение, зоны работы) записи/модели RealEstate, ID которой равен $id.
private function setRealEstateData($id, RealEstateRequest $attributes) { $data = []; // Set REAL ESTATE fiscal data $data['real_estate'] = [ 'user_id' => Auth::id(), 'web' => $attributes->input('web', null), 'business_name' => $attributes->input('business_name', null), 'commercial_name' => $attributes->input('commercial_name', null), 'vat_number' => $attributes->input('vat_number', null), 'session_title_id' => $attributes->input('session_title_id', null), 'name' => $attributes->input('name', null), 'surname' => $attributes->input('surname', null), 'phone_1' => $attributes->input('phone_1', null), 'phone_2' => $attributes->input('phone_2', null), 'punctuation' => $attributes->input('punctuation', null), 'status' => $attributes->input('status', null), 'origin' => $attributes->input('origin', null), 'language' => $attributes->input('language', null), ]; // Set REAL ESTATE, address, gps location $locations = $attributes->input('locations', null); $data['locations'] = []; foreach ($locations['country_id'] as $key => $location) { $data['locations'][] = [ 'realestate_id' => (0 < $id) ? $id : null, 'country_id' => $locations['country_id'][$key], 'state_id' => $locations['state_id'][$key], 'county_id' => $locations['county_id'][$key], 'city_id' => $locations['city_id'][$key], 'street' => $locations['street'][$key], 'postcode' => $locations['postcode'][$key], 'latitude' => $locations['latitude'][$key], 'longitude' => $locations['longitude'][$key], ]; } // Set REAL ESTATE, zones $zones = $attributes->input('zones', null); $data['zones'] = []; if ($zones != null) { foreach ($zones['id'] as $key => $zone) { $data['zones'][] = [ 'id' => $zones['pkey_id'][$key], 'realestate_id' => (0 < $id) ? $id : null, 'zoneable_id' => $zone, 'zoneable_type' => 'App\\' . $zones['model'][$key], ]; } } else { $data['zones'][] = [ //'id' => $zones['pkey_id'][$key], //'realestate_id' => (0 < $id) ? $id : null, 'zoneable_id' => 1, 'zoneable_type' => 'App\\Country', ]; } return $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setallvalues($id='',$condition='')\n\t{\n\t\t$rs=$this->fetchrecordset($id, $condition);\n\t\tif($ardoc= mysql_fetch_array($rs))\n\t\t{\t\t\t\n\t\t\t$this->id = $ardoc['id'];\n\t\t\t$this->company_name = $ardoc['company_name'];\n\t\t\t$this->main_location = $ardoc['main_location'];\n\t\t\t$this->address = $ardoc['address'];\n\t\t\t$this->street = $ardoc['street'];\n\t\t\t$this->city = $ardoc['city'];\n\t\t\t$this->zip = $ardoc['zip'];\n\t\t\t$this->state = $ardoc['state'];\n\t\t\t$this->country = $ardoc['country'];\n\t\t\t$this->email = $ardoc['email'];\n\t\t\t$this->primary_phone = $ardoc['primary_phone'];\n\t\t\t$this->secondary_phone = $ardoc['secondary_phone'];\n\t\t\t$this->fax = $ardoc['fax'];\n\t\t\t$this->web_url = $ardoc['web_url'];\n\t\t\t$this->note = $ardoc['note'];\n\t\t\t$this->case_policies = $ardoc['case_policies'];\n\t\t\t$this->invoice_policies = $ardoc['invoice_policies'];\n\t\t\t$this->active = $ardoc['status'];\n\t\t}\n\t}", "function setallvalues($id='',$condition='')\n\t{\n\t\t$rs=$this->fetchrecordset($id, $condition);\n\t\tif($ardoc= mysql_fetch_array($rs))\n\t\t{\n\t\t\t$this->id\t\t\t\t\t\t= $ardoc['id'];\n\t\t\t$this->client_id\t\t\t\t= $ardoc['client_id'];\n\t\t\t$this->case_type\t\t\t\t= $ardoc['case_type'];\n\t\t\t$this->assing_to\t\t\t\t= $ardoc['assing_to'];\n\t\t\t$this->created_on\t\t\t\t= date(DATE_FORMAT,strtotime($ardoc['created_on']));\n\t\t\t$this->due_date\t\t\t\t\t= date(DATE_FORMAT,strtotime($ardoc['due_date']));\n\t\t\t$this->salesperson_affiliate\t= $ardoc['salesperson_affiliate'];\n\t\t\t$this->client_matter_number\t\t= $ardoc['client_matter_number'];\n\t\t\t$this->doi\t\t\t\t\t\t= date(DATE_FORMAT,strtotime($ardoc['doi']));\n\t\t\t$this->report_date\t\t\t\t= date(DATE_FORMAT,strtotime($ardoc['report_date']));\n\t\t\t$this->carrier\t\t\t\t\t= $ardoc['carrier'];\n\t\t\t$this->end_client\t\t\t\t= $ardoc['end_client'];\n\t\t\t$this->toonari_client\t\t\t= $ardoc['toonari_client'];\n\t\t\t$this->budget\t\t\t\t\t= $ardoc['budget'];\n\t\t\t$this->hours\t\t\t\t\t= $ardoc['hours'];\n\t\t\t$this->hourly_rate\t\t\t\t= $ardoc['hourly_rate'];\n\t\t\t$this->person_investigated_fname= $ardoc['person_investigated_fname'];\n\t\t\t$this->person_investigated_mname= $ardoc['person_investigated_mname'];\n\t\t\t$this->person_investigated_lname= $ardoc['person_investigated_lname'];\n\t\t\t$this->clientnote\t\t\t\t= $ardoc['clientnote'];\n\t\t\t$this->address\t\t\t\t\t= $ardoc['address'];\n\t\t\t$this->street\t\t\t\t\t= $ardoc['street'];\n\t\t\t$this->city\t\t\t\t\t\t= $ardoc['city'];\n\t\t\t$this->state\t\t\t\t\t= $ardoc['state'];\n\t\t\t$this->zip\t\t\t\t\t\t= $ardoc['zip'];\n\t\t\t$this->sex\t\t\t\t\t\t= $ardoc['sex'];\n\t\t\t$this->height\t\t\t\t\t= $ardoc['height'];\n\t\t\t$this->weight\t\t\t\t\t= $ardoc['weight'];\n\t\t\t$this->build\t\t\t\t\t= $ardoc['build'];\n\t\t\t$this->other_characteristics\t= $ardoc['other_characteristics'];\n\t\t\t$this->cell_phone\t\t\t\t= $ardoc['cell_phone'];\n\t\t\t$this->email\t\t\t\t\t= $ardoc['email'];\n\t\t\t$this->facebook\t\t\t\t\t= $ardoc['facebook'];\n\t\t\t$this->twitter\t\t\t\t\t= $ardoc['twitter'];\n\t\t\t$this->myspace\t\t\t\t\t= $ardoc['myspace'];\n\t\t\t$this->note\t\t\t\t\t\t= $ardoc['note'];\n\t\t\t$this->priority\t\t\t\t\t= $ardoc['priority'];\n\t\t\t$this->estimated_completion_date= date(DATE_FORMAT,strtotime($ardoc['estimated_completion_date']));\n\t\t\t$this->active\t\t\t\t\t= $ardoc['active'];\n\t\t}\n\t}", "function setallvalues($id='',$condition='')\n\t{\n\t\t$rs=$this->fetchrecordset($id, $condition);\n\t\tif($ardoc= mysql_fetch_array($rs))\n\t\t{\t\t\t\n\t\t\t$this->id = $ardoc['id'];\n\t\t\t$this->client_id = $ardoc['client_id'];\n\t\t\t$this->full_name = $ardoc['full_name'];\n\t\t\t$this->email = $ardoc['email'];\n\t\t\t$this->office_phone = $ardoc['office_phone'];\n\t\t\t$this->mobile = $ardoc['mobile'];\n\t\t\t$this->fax = $ardoc['fax'];\n\t\t\t$this->active = $ardoc['status'];\n\t\t}\n\t}", "public function find($id)\n {\n $data = [];\n $dataRealEstate = $this->realEstate->find($id);\n\n // Array to associate the model used in the polymorphic relation with its translation to spanish.\n $zoneable_types = [\n 'App\\Country' => 'Pa&iacute;s',\n 'App\\State' => 'Autonom&iacute;a',\n 'App\\County' => 'Provincia',\n 'App\\City' => 'Ciudad',\n ];\n\n if (0 < $dataRealEstate->id) {\n // Get the Real Estate\n $data['real_estate'] = $dataRealEstate->toArray();\n\n // Get the related location and its associated texts/names\n $locations = $dataRealEstate->locations;\n if (!is_null($locations)) {\n $data['locations'] = [];\n foreach ($locations as $key => $location) {\n $data['locations'][$key] = $location->toArray();\n $data['locations'][$key]['country_name'] = $location->country->name;\n $data['locations'][$key]['state_name'] = $location->state->name;\n $data['locations'][$key]['county_name'] = $location->county->name;\n $data['locations'][$key]['city_name'] = $location->city->name;\n }\n }\n\n // Get the related zones and its associated texts/names\n $zones = $dataRealEstate->zones;\n if (!is_null($zones)) {\n $data['zones'] = [];\n foreach ($zones as $zone) {\n $data['zones'][] = [\n 'id' => $zone->id,\n 'realestate_id' => $zone->realestate_id,\n 'zoneable_id' => $zone->zoneable_id,\n 'zoneable_type' => substr($zone->zoneable_type, 4), // Remove 'App\\' because when we update it is added and we can have 'App\\App\\City'\n 'text_type' => html_entity_decode($zoneable_types[$zone->zoneable_type]), // Spanish accents to HTML\n 'text_name' => $zone->zoneable->name,\n ];\n }\n }\n\n // Get the related ratings\n $ratings = $dataRealEstate->ratings;\n\n if (!is_null($ratings)) {\n $data['ratings'] = [];\n foreach ($ratings as $rating) {\n $comment_keys = explode(';', $rating->comment_key);\n\n $translations = DB::table('rating_comments')\n ->whereIn('key', $comment_keys)\n ->get('es')\n ->pluck('es')\n ->toArray();\n\n $translations = implode('. ', $translations);\n $data['ratings'][] = [\n 'id' => $rating->id,\n 'card_id' => $rating->card_id,\n // @ TODO @DCA 2020-08-31 este campo aparentemente solo es necesario para ver los tipos fijos de valoraciones que tiene una inmobiliaria y no se usa en la vista\n // 'comment_key' => $rating->comment_key,\n 'rating' => $rating->rating,\n 'open_comment' => $rating->open_comment,\n 'comment_key_translated' => $translations,\n ];\n }\n }\n }\n\n return $data;\n }", "function setAllValues($id=\"\",$condition=\"\")\n\t{\n\t\t$rs=$this->fetchRecordSet($id, $condition);\n\t\tif($areligibility= mysql_fetch_array($rs))\n\t\t{\n\t\t\t$this->state_party_id = $areligibility[\"state_party_id\"];\n\t\t\t$this->language_name = $areligibility[\"language_name\"];\n\t\t\t$this->state_party = $areligibility[\"state_party\"];\n\t\t\t$this->state_party_id = $areligibility[\"state_party_id\"];\n\t\t\t$this->state_party_active = $areligibility[\"state_party_active\"];\n\t\t\t$this->state_name = $areligibility[\"state_name\"];\n\t\t\t$this->created_by = $areligibility[\"created_by\"];\n\t\t}\n\t}", "function setallvalues($id='',$condition='')\n\t{\n\t\t$rs=$this->fetchrecordset($id, $condition);\n\t\t\n\t\tif($ardoc= mysql_fetch_array($rs))\n\t\t{\n\t\t\t$this->id\t\t\t= $ardoc['id'];\n\t\t\t$this->case_id\t\t= $ardoc['case_id'];\n\t\t\t$this->table_name\t\t= $ardoc['table_name'];\n\t\t\t$this->table_id\t= $ardoc['table_id'];\n\t\t\t$this->sequence_no\t= $ardoc['sequence_no'];\n\t\t}\n\t}", "function setAllValuesarr($id=\"\",$condition=\"\")\n\t{\n\t\t$rs=$this->fetchRecordSet1($id, $condition);\n\t\t$i=0;\n\t\twhile($areligibility= mysql_fetch_array($rs))\n\t\t{\n\t\t\t$arr[$i]['state_party_id'] = $areligibility[\"state_party_id\"];\n\t\t\t$arr[$i]['language_name'] = $areligibility[\"language_name\"];\n\t\t\t$arr[$i]['language_id'] = $areligibility[\"edlangid\"];\n\t\t\t$arr[$i]['state_party'] = $areligibility[\"state_party\"];\n\t\t\t$arr[$i]['election_type_name'] = $areligibility[\"election_type_name\"];\n\t\t\t$arr[$i]['state_name'] = $areligibility[\"state_name\"];\n\t\t\t$arr[$i]['description'] = $areligibility[\"description\"];\n\t\t\t$arr[$i]['registration_deadline_date'] = $areligibility[\"registration_deadline_date\"];\n\t\t\t$arr[$i]['registration_deadline_description'] = $areligibility[\"registration_deadline_description\"];\n\t\t\t$arr[$i]['state_party_id'] = $areligibility[\"state_party_id\"];\n\t\t\t$arr[$i]['election_type_mapid'] = $areligibility[\"election_type_mapid\"];\n\t\t\t$arr[$i]['state_mapid'] = $areligibility[\"state_mapid\"];\n\t\t\t$arr[$i]['language_icon'] = $areligibility[\"language_icon\"];\n\t\t\t$i++;\n\t\t}\n\t\treturn $arr;\n\t}", "function setAllValues($id=\"\",$condition=\"\")\n\t{\n\t\t$rs=$this->fetchRecordSetNew($id, $condition);\n\n\t\tif($artf_entry= mysql_fetch_array($rs))\n\t\t{\t\n\t\t\t$this->entry_payment_id = $artf_entry[\"entry_payment_id\"];\n\t\t\t$this->entry_id = $artf_entry[\"entry_id\"];\n\t\t\t$this->contest_id = $artf_entry[\"contest_id\"];\n\t\t\t$this->transaction_id = $artf_entry[\"transaction_id\"];\n\t\t\t$this->payment_description = $artf_entry[\"payment_description\"];\n\t\t\t$this->payment_iscancel = $artf_entry[\"payment_iscancel\"];\n\t\t\t$this->payment_status = $artf_entry[\"payment_status\"];\n\t\t}\n\t}", "protected function setupTravelValues()\n {\n $__id = json_decode($this->saved_quote->customer_entity_data_id);\n $this->main_entity = $this->customer;\n $all = [];\n foreach ($__id as $_id) {\n $all[] = $this->getFullEntityDetails($_id);\n }\n $this->other_entities = $all;\n }", "private function populateData() {\n /**\n * @todo: USE OOP\n */\n $recurrenceData = recurrenceDA::lookupRecurrenceByRecurrenceID($this->getID());\n $this->setEventID($recurrenceData[0]['eventID']);\n $this->setDeleted($recurrenceData[0]['deleted']);\n $this->setRecurrenceStartTime($recurrenceData[0]['recurrenceStartTime']);\n $this->setRecurrenceEndTime($recurrenceData[0]['recurrenceEndTime']);\n \n }", "protected static function setData() {\n self::$data = array(\n 0 =>\n array(\n 'id' => 1288,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL ANTOLIN DEL CAMPO',\n 'municipio_id' => 55,\n 'co_stat_data' => 'A',\n ),\n 1 =>\n array(\n 'id' => 1289,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL ARISMENDI',\n 'municipio_id' => 56,\n 'co_stat_data' => 'A',\n ),\n 2 =>\n array(\n 'id' => 1290,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL DIAZ',\n 'municipio_id' => 57,\n 'co_stat_data' => 'A',\n ),\n 3 =>\n array(\n 'id' => 1291,\n 'co_prrq_asap' => '02',\n 'nombre' => 'ZABALA',\n 'municipio_id' => 57,\n 'co_stat_data' => 'A',\n ),\n 4 =>\n array(\n 'id' => 1292,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL GARCIA',\n 'municipio_id' => 58,\n 'co_stat_data' => 'A',\n ),\n 5 =>\n array(\n 'id' => 1293,\n 'co_prrq_asap' => '02',\n 'nombre' => 'FRANCISCO FAJARDO',\n 'municipio_id' => 58,\n 'co_stat_data' => 'A',\n ),\n 6 =>\n array(\n 'id' => 1308,\n 'co_prrq_asap' => '02',\n 'nombre' => 'BOLIVAR',\n 'municipio_id' => 59,\n 'co_stat_data' => 'A',\n ),\n 7 =>\n array(\n 'id' => 1294,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL GOMEZ',\n 'municipio_id' => 59,\n 'co_stat_data' => 'A',\n ),\n 8 =>\n array(\n 'id' => 1295,\n 'co_prrq_asap' => '03',\n 'nombre' => 'GUEVARA',\n 'municipio_id' => 59,\n 'co_stat_data' => 'A',\n ),\n 9 =>\n array(\n 'id' => 1296,\n 'co_prrq_asap' => '04',\n 'nombre' => 'MATASIETE',\n 'municipio_id' => 59,\n 'co_stat_data' => 'A',\n ),\n 10 =>\n array(\n 'id' => 1297,\n 'co_prrq_asap' => '05',\n 'nombre' => 'SUCRE',\n 'municipio_id' => 59,\n 'co_stat_data' => 'A',\n ),\n 11 =>\n array(\n 'id' => 1298,\n 'co_prrq_asap' => '02',\n 'nombre' => 'AGUIRRE',\n 'municipio_id' => 60,\n 'co_stat_data' => 'A',\n ),\n 12 =>\n array(\n 'id' => 1309,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL MANEIRO',\n 'municipio_id' => 60,\n 'co_stat_data' => 'A',\n ),\n 13 =>\n array(\n 'id' => 1300,\n 'co_prrq_asap' => '02',\n 'nombre' => 'ADRIAN',\n 'municipio_id' => 61,\n 'co_stat_data' => 'A',\n ),\n 14 =>\n array(\n 'id' => 1299,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL MARCANO',\n 'municipio_id' => 61,\n 'co_stat_data' => 'A',\n ),\n 15 =>\n array(\n 'id' => 1301,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL MARIÑO',\n 'municipio_id' => 62,\n 'co_stat_data' => 'A',\n ),\n 16 =>\n array(\n 'id' => 1302,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL PENINSULA DE MACANAO',\n 'municipio_id' => 63,\n 'co_stat_data' => 'A',\n ),\n 17 =>\n array(\n 'id' => 1303,\n 'co_prrq_asap' => '02',\n 'nombre' => 'SAN FRANCISCO',\n 'municipio_id' => 63,\n 'co_stat_data' => 'A',\n ),\n 18 =>\n array(\n 'id' => 1304,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL TUBORES',\n 'municipio_id' => 64,\n 'co_stat_data' => 'A',\n ),\n 19 =>\n array(\n 'id' => 1305,\n 'co_prrq_asap' => '02',\n 'nombre' => 'LOS BARALES',\n 'municipio_id' => 64,\n 'co_stat_data' => 'A',\n ),\n 20 =>\n array(\n 'id' => 1306,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL VILLALBA',\n 'municipio_id' => 65,\n 'co_stat_data' => 'A',\n ),\n 21 =>\n array(\n 'id' => 1307,\n 'co_prrq_asap' => '02',\n 'nombre' => 'VICENTE FUENTES',\n 'municipio_id' => 65,\n 'co_stat_data' => 'A',\n ),\n 22 =>\n array(\n 'id' => 1368,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL ANACO',\n 'municipio_id' => 87,\n 'co_stat_data' => 'A',\n ),\n 23 =>\n array(\n 'id' => 1369,\n 'co_prrq_asap' => '02',\n 'nombre' => 'SAN JOAQUIN',\n 'municipio_id' => 87,\n 'co_stat_data' => 'A',\n ),\n 24 =>\n array(\n 'id' => 1371,\n 'co_prrq_asap' => '02',\n 'nombre' => 'CACHIPO',\n 'municipio_id' => 88,\n 'co_stat_data' => 'A',\n ),\n 25 =>\n array(\n 'id' => 1370,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL ARAGUA',\n 'municipio_id' => 88,\n 'co_stat_data' => 'A',\n ),\n 26 =>\n array(\n 'id' => 1372,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL FERNANDO DE PEÑALVER',\n 'municipio_id' => 89,\n 'co_stat_data' => 'A',\n ),\n 27 =>\n array(\n 'id' => 1373,\n 'co_prrq_asap' => '02',\n 'nombre' => 'SAN MIGUEL',\n 'municipio_id' => 89,\n 'co_stat_data' => 'A',\n ),\n 28 =>\n array(\n 'id' => 1374,\n 'co_prrq_asap' => '03',\n 'nombre' => 'SUCRE',\n 'municipio_id' => 89,\n 'co_stat_data' => 'A',\n ),\n 29 =>\n array(\n 'id' => 1376,\n 'co_prrq_asap' => '02',\n 'nombre' => 'SANTA BARBARA',\n 'municipio_id' => 90,\n 'co_stat_data' => 'A',\n ),\n 30 =>\n array(\n 'id' => 1375,\n 'co_prrq_asap' => '01',\n 'nombre' => 'VALLE DE GUANAPE',\n 'municipio_id' => 90,\n 'co_stat_data' => 'A',\n ),\n 31 =>\n array(\n 'id' => 1378,\n 'co_prrq_asap' => '02',\n 'nombre' => 'ATAPIRIRE',\n 'municipio_id' => 91,\n 'co_stat_data' => 'A',\n ),\n 32 =>\n array(\n 'id' => 1379,\n 'co_prrq_asap' => '03',\n 'nombre' => 'BOCA DEL PAO',\n 'municipio_id' => 91,\n 'co_stat_data' => 'A',\n ),\n 33 =>\n array(\n 'id' => 1377,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL FRANCISCO DE MIRANDA',\n 'municipio_id' => 91,\n 'co_stat_data' => 'A',\n ),\n 34 =>\n array(\n 'id' => 1380,\n 'co_prrq_asap' => '04',\n 'nombre' => 'EL PAO',\n 'municipio_id' => 91,\n 'co_stat_data' => 'A',\n ),\n 35 =>\n array(\n 'id' => 1381,\n 'co_prrq_asap' => '05',\n 'nombre' => 'MUCURA',\n 'municipio_id' => 91,\n 'co_stat_data' => 'A',\n ),\n 36 =>\n array(\n 'id' => 1420,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL INDEPENDENCIA',\n 'municipio_id' => 92,\n 'co_stat_data' => 'A',\n ),\n 37 =>\n array(\n 'id' => 1382,\n 'co_prrq_asap' => '02',\n 'nombre' => 'MAMO',\n 'municipio_id' => 92,\n 'co_stat_data' => 'A',\n ),\n 38 =>\n array(\n 'id' => 1383,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL PUERTO LA CRUZ',\n 'municipio_id' => 93,\n 'co_stat_data' => 'A',\n ),\n 39 =>\n array(\n 'id' => 1384,\n 'co_prrq_asap' => '02',\n 'nombre' => 'POZUELOS',\n 'municipio_id' => 93,\n 'co_stat_data' => 'A',\n ),\n 40 =>\n array(\n 'id' => 1385,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL ONOTO',\n 'municipio_id' => 94,\n 'co_stat_data' => 'A',\n ),\n 41 =>\n array(\n 'id' => 1386,\n 'co_prrq_asap' => '02',\n 'nombre' => 'SAN PABLO',\n 'municipio_id' => 94,\n 'co_stat_data' => 'A',\n ),\n 42 =>\n array(\n 'id' => 1387,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL JOSE GREGORIO MONAGAS',\n 'municipio_id' => 95,\n 'co_stat_data' => 'A',\n ),\n 43 =>\n array(\n 'id' => 1388,\n 'co_prrq_asap' => '02',\n 'nombre' => 'PIAR',\n 'municipio_id' => 95,\n 'co_stat_data' => 'A',\n ),\n 44 =>\n array(\n 'id' => 1389,\n 'co_prrq_asap' => '03',\n 'nombre' => 'SAN DIEGO DE CABRUTICA',\n 'municipio_id' => 95,\n 'co_stat_data' => 'A',\n ),\n 45 =>\n array(\n 'id' => 1390,\n 'co_prrq_asap' => '04',\n 'nombre' => 'SANTA CLARA',\n 'municipio_id' => 95,\n 'co_stat_data' => 'A',\n ),\n 46 =>\n array(\n 'id' => 1391,\n 'co_prrq_asap' => '05',\n 'nombre' => 'UVERITO',\n 'municipio_id' => 95,\n 'co_stat_data' => 'A',\n ),\n 47 =>\n array(\n 'id' => 1392,\n 'co_prrq_asap' => '06',\n 'nombre' => 'ZUATA',\n 'municipio_id' => 95,\n 'co_stat_data' => 'A',\n ),\n 48 =>\n array(\n 'id' => 1393,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL LIBERTAD',\n 'municipio_id' => 96,\n 'co_stat_data' => 'A',\n ),\n 49 =>\n array(\n 'id' => 1394,\n 'co_prrq_asap' => '02',\n 'nombre' => 'EL CARITO',\n 'municipio_id' => 96,\n 'co_stat_data' => 'A',\n ),\n 50 =>\n array(\n 'id' => 1395,\n 'co_prrq_asap' => '03',\n 'nombre' => 'SANTA INES',\n 'municipio_id' => 96,\n 'co_stat_data' => 'A',\n ),\n 51 =>\n array(\n 'id' => 1396,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL CLARINES',\n 'municipio_id' => 97,\n 'co_stat_data' => 'A',\n ),\n 52 =>\n array(\n 'id' => 1397,\n 'co_prrq_asap' => '02',\n 'nombre' => 'GUANAPE',\n 'municipio_id' => 97,\n 'co_stat_data' => 'A',\n ),\n 53 =>\n array(\n 'id' => 1398,\n 'co_prrq_asap' => '03',\n 'nombre' => 'SABANA DE UCHIRE',\n 'municipio_id' => 97,\n 'co_stat_data' => 'A',\n ),\n 54 =>\n array(\n 'id' => 1399,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL PEDRO MARIA FREITES',\n 'municipio_id' => 98,\n 'co_stat_data' => 'A',\n ),\n 55 =>\n array(\n 'id' => 1400,\n 'co_prrq_asap' => '02',\n 'nombre' => 'LIBERTADOR',\n 'municipio_id' => 98,\n 'co_stat_data' => 'A',\n ),\n 56 =>\n array(\n 'id' => 1401,\n 'co_prrq_asap' => '03',\n 'nombre' => 'SANTA ROSA',\n 'municipio_id' => 98,\n 'co_stat_data' => 'A',\n ),\n 57 =>\n array(\n 'id' => 1402,\n 'co_prrq_asap' => '04',\n 'nombre' => 'URICA',\n 'municipio_id' => 98,\n 'co_stat_data' => 'A',\n ),\n 58 =>\n array(\n 'id' => 1403,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL PIRITU',\n 'municipio_id' => 99,\n 'co_stat_data' => 'A',\n ),\n 59 =>\n array(\n 'id' => 1404,\n 'co_prrq_asap' => '02',\n 'nombre' => 'SAN FRANCISCO',\n 'municipio_id' => 99,\n 'co_stat_data' => 'A',\n ),\n 60 =>\n array(\n 'id' => 1405,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL SAN JOSE DE GUANIPA',\n 'municipio_id' => 100,\n 'co_stat_data' => 'A',\n ),\n 61 =>\n array(\n 'id' => 1411,\n 'co_prrq_asap' => '03',\n 'nombre' => 'BERGANTIN',\n 'municipio_id' => 101,\n 'co_stat_data' => 'A',\n ),\n 62 =>\n array(\n 'id' => 1412,\n 'co_prrq_asap' => '04',\n 'nombre' => 'CAIGUA',\n 'municipio_id' => 101,\n 'co_stat_data' => 'A',\n ),\n 63 =>\n array(\n 'id' => 1409,\n 'co_prrq_asap' => '01',\n 'nombre' => 'EL CARMEN',\n 'municipio_id' => 101,\n 'co_stat_data' => 'A',\n ),\n 64 =>\n array(\n 'id' => 1413,\n 'co_prrq_asap' => '05',\n 'nombre' => 'EL PILAR',\n 'municipio_id' => 101,\n 'co_stat_data' => 'A',\n ),\n 65 =>\n array(\n 'id' => 1414,\n 'co_prrq_asap' => '06',\n 'nombre' => 'NARICUAL',\n 'municipio_id' => 101,\n 'co_stat_data' => 'A',\n ),\n 66 =>\n array(\n 'id' => 1410,\n 'co_prrq_asap' => '02',\n 'nombre' => 'SAN CRISTOBAL',\n 'municipio_id' => 101,\n 'co_stat_data' => 'A',\n ),\n 67 =>\n array(\n 'id' => 1415,\n 'co_prrq_asap' => '01',\n 'nombre' => 'EDMUNDO BARRIOS',\n 'municipio_id' => 102,\n 'co_stat_data' => 'A',\n ),\n 68 =>\n array(\n 'id' => 1416,\n 'co_prrq_asap' => '02',\n 'nombre' => 'MIGUEL OTERO SILVA',\n 'municipio_id' => 102,\n 'co_stat_data' => 'A',\n ),\n 69 =>\n array(\n 'id' => 1421,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL SANTA ANA',\n 'municipio_id' => 103,\n 'co_stat_data' => 'A',\n ),\n 70 =>\n array(\n 'id' => 1408,\n 'co_prrq_asap' => '02',\n 'nombre' => 'PUEBLO NUEVO',\n 'municipio_id' => 103,\n 'co_stat_data' => 'A',\n ),\n 71 =>\n array(\n 'id' => 1417,\n 'co_prrq_asap' => '01',\n 'nombre' => 'EL CHAPARRO',\n 'municipio_id' => 104,\n 'co_stat_data' => 'A',\n ),\n 72 =>\n array(\n 'id' => 1418,\n 'co_prrq_asap' => '02',\n 'nombre' => 'TOMAS ALFARO CALATRAVA',\n 'municipio_id' => 104,\n 'co_stat_data' => 'A',\n ),\n 73 =>\n array(\n 'id' => 1407,\n 'co_prrq_asap' => '02',\n 'nombre' => 'BOCA DE CHAVEZ',\n 'municipio_id' => 105,\n 'co_stat_data' => 'A',\n ),\n 74 =>\n array(\n 'id' => 1406,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL BOCA DE UCHIRE',\n 'municipio_id' => 105,\n 'co_stat_data' => 'A',\n ),\n 75 =>\n array(\n 'id' => 1419,\n 'co_prrq_asap' => '02',\n 'nombre' => 'EL MORRO',\n 'municipio_id' => 106,\n 'co_stat_data' => 'A',\n ),\n 76 =>\n array(\n 'id' => 1365,\n 'co_prrq_asap' => '01',\n 'nombre' => 'LECHERIAS',\n 'municipio_id' => 106,\n 'co_stat_data' => 'A',\n ),\n 77 =>\n array(\n 'id' => 1367,\n 'co_prrq_asap' => '02',\n 'nombre' => 'CHORRERON',\n 'municipio_id' => 107,\n 'co_stat_data' => 'A',\n ),\n 78 =>\n array(\n 'id' => 1366,\n 'co_prrq_asap' => '01',\n 'nombre' => 'GUANTA',\n 'municipio_id' => 107,\n 'co_stat_data' => 'A',\n ),\n 79 =>\n array(\n 'id' => 1436,\n 'co_prrq_asap' => '01',\n 'nombre' => 'ENCONTRADOS',\n 'municipio_id' => 108,\n 'co_stat_data' => 'A',\n ),\n 80 =>\n array(\n 'id' => 1437,\n 'co_prrq_asap' => '02',\n 'nombre' => 'UDON PEREZ',\n 'municipio_id' => 108,\n 'co_stat_data' => 'A',\n ),\n 81 =>\n array(\n 'id' => 1521,\n 'co_prrq_asap' => '02',\n 'nombre' => 'MORALITO',\n 'municipio_id' => 109,\n 'co_stat_data' => 'A',\n ),\n 82 =>\n array(\n 'id' => 1438,\n 'co_prrq_asap' => '01',\n 'nombre' => 'SAN CARLOS DEL ZULIA',\n 'municipio_id' => 109,\n 'co_stat_data' => 'A',\n ),\n 83 =>\n array(\n 'id' => 1439,\n 'co_prrq_asap' => '03',\n 'nombre' => 'SANTA BARBARA',\n 'municipio_id' => 109,\n 'co_stat_data' => 'A',\n ),\n 84 =>\n array(\n 'id' => 1440,\n 'co_prrq_asap' => '04',\n 'nombre' => 'SANTA CRUZ DEL ZULIA',\n 'municipio_id' => 109,\n 'co_stat_data' => 'A',\n ),\n 85 =>\n array(\n 'id' => 1441,\n 'co_prrq_asap' => '05',\n 'nombre' => 'URRIBARRI',\n 'municipio_id' => 109,\n 'co_stat_data' => 'A',\n ),\n 86 =>\n array(\n 'id' => 1449,\n 'co_prrq_asap' => '02',\n 'nombre' => 'BARI',\n 'municipio_id' => 110,\n 'co_stat_data' => 'A',\n ),\n 87 =>\n array(\n 'id' => 1448,\n 'co_prrq_asap' => '01',\n 'nombre' => 'JESUS MARIA SEMPRUN',\n 'municipio_id' => 110,\n 'co_stat_data' => 'A',\n ),\n 88 =>\n array(\n 'id' => 1455,\n 'co_prrq_asap' => '01',\n 'nombre' => 'ALONSO DE OJEDA',\n 'municipio_id' => 111,\n 'co_stat_data' => 'A',\n ),\n 89 =>\n array(\n 'id' => 1457,\n 'co_prrq_asap' => '03',\n 'nombre' => 'CAMPO LARA',\n 'municipio_id' => 111,\n 'co_stat_data' => 'A',\n ),\n 90 =>\n array(\n 'id' => 1458,\n 'co_prrq_asap' => '04',\n 'nombre' => 'ELEAZAR LOPEZ CONTRERAS',\n 'municipio_id' => 111,\n 'co_stat_data' => 'A',\n ),\n 91 =>\n array(\n 'id' => 1456,\n 'co_prrq_asap' => '02',\n 'nombre' => 'LIBERTAD',\n 'municipio_id' => 111,\n 'co_stat_data' => 'A',\n ),\n 92 =>\n array(\n 'id' => 1459,\n 'co_prrq_asap' => '05',\n 'nombre' => 'VENEZUELA',\n 'municipio_id' => 111,\n 'co_stat_data' => 'A',\n ),\n 93 =>\n array(\n 'id' => 1461,\n 'co_prrq_asap' => '02',\n 'nombre' => 'BARTOLOME DE LAS CASAS',\n 'municipio_id' => 112,\n 'co_stat_data' => 'A',\n ),\n 94 =>\n array(\n 'id' => 1460,\n 'co_prrq_asap' => '01',\n 'nombre' => 'LIBERTAD',\n 'municipio_id' => 112,\n 'co_stat_data' => 'A',\n ),\n 95 =>\n array(\n 'id' => 1462,\n 'co_prrq_asap' => '03',\n 'nombre' => 'RIO NEGRO',\n 'municipio_id' => 112,\n 'co_stat_data' => 'A',\n ),\n 96 =>\n array(\n 'id' => 1463,\n 'co_prrq_asap' => '04',\n 'nombre' => 'SAN JOSE DE PERIJA',\n 'municipio_id' => 112,\n 'co_stat_data' => 'A',\n ),\n 97 =>\n array(\n 'id' => 1465,\n 'co_prrq_asap' => '02',\n 'nombre' => 'LA SIERRITA',\n 'municipio_id' => 113,\n 'co_stat_data' => 'A',\n ),\n 98 =>\n array(\n 'id' => 1466,\n 'co_prrq_asap' => '03',\n 'nombre' => 'LAS PARCELAS',\n 'municipio_id' => 113,\n 'co_stat_data' => 'A',\n ),\n 99 =>\n array(\n 'id' => 1467,\n 'co_prrq_asap' => '04',\n 'nombre' => 'LUIS DE VICENTE',\n 'municipio_id' => 113,\n 'co_stat_data' => 'A',\n ),\n 100 =>\n array(\n 'id' => 1468,\n 'co_prrq_asap' => '05',\n 'nombre' => 'MONSEÑOR MARCOS SERGIO GODOY',\n 'municipio_id' => 113,\n 'co_stat_data' => 'A',\n ),\n 101 =>\n array(\n 'id' => 1469,\n 'co_prrq_asap' => '06',\n 'nombre' => 'RICAURTE',\n 'municipio_id' => 113,\n 'co_stat_data' => 'A',\n ),\n 102 =>\n array(\n 'id' => 1464,\n 'co_prrq_asap' => '01',\n 'nombre' => 'SAN RAFAEL',\n 'municipio_id' => 113,\n 'co_stat_data' => 'A',\n ),\n 103 =>\n array(\n 'id' => 1470,\n 'co_prrq_asap' => '07',\n 'nombre' => 'TAMARE',\n 'municipio_id' => 113,\n 'co_stat_data' => 'A',\n ),\n 104 =>\n array(\n 'id' => 1488,\n 'co_prrq_asap' => '01',\n 'nombre' => 'ALTAGRACIA',\n 'municipio_id' => 114,\n 'co_stat_data' => 'A',\n ),\n 105 =>\n array(\n 'id' => 1489,\n 'co_prrq_asap' => '02',\n 'nombre' => 'ANA MARIA CAMPOS',\n 'municipio_id' => 114,\n 'co_stat_data' => 'A',\n ),\n 106 =>\n array(\n 'id' => 1490,\n 'co_prrq_asap' => '03',\n 'nombre' => 'FARIA',\n 'municipio_id' => 114,\n 'co_stat_data' => 'A',\n ),\n 107 =>\n array(\n 'id' => 1491,\n 'co_prrq_asap' => '04',\n 'nombre' => 'SAN ANTONIO',\n 'municipio_id' => 114,\n 'co_stat_data' => 'A',\n ),\n 108 =>\n array(\n 'id' => 1523,\n 'co_prrq_asap' => '05',\n 'nombre' => 'SAN JOSE',\n 'municipio_id' => 114,\n 'co_stat_data' => 'A',\n ),\n 109 =>\n array(\n 'id' => 1525,\n 'co_prrq_asap' => '02',\n 'nombre' => 'DONALDO GARCIA',\n 'municipio_id' => 115,\n 'co_stat_data' => 'A',\n ),\n 110 =>\n array(\n 'id' => 1495,\n 'co_prrq_asap' => '01',\n 'nombre' => 'EL ROSARIO',\n 'municipio_id' => 115,\n 'co_stat_data' => 'A',\n ),\n 111 =>\n array(\n 'id' => 1496,\n 'co_prrq_asap' => '03',\n 'nombre' => 'SIXTO ZAMBRANO',\n 'municipio_id' => 115,\n 'co_stat_data' => 'A',\n ),\n 112 =>\n array(\n 'id' => 1498,\n 'co_prrq_asap' => '03',\n 'nombre' => 'DOMITILA FLORES',\n 'municipio_id' => 116,\n 'co_stat_data' => 'A',\n ),\n 113 =>\n array(\n 'id' => 1526,\n 'co_prrq_asap' => '02',\n 'nombre' => 'EL BAJO',\n 'municipio_id' => 116,\n 'co_stat_data' => 'A',\n ),\n 114 =>\n array(\n 'id' => 1499,\n 'co_prrq_asap' => '04',\n 'nombre' => 'FRANCISCO OCHOA',\n 'municipio_id' => 116,\n 'co_stat_data' => 'A',\n ),\n 115 =>\n array(\n 'id' => 1500,\n 'co_prrq_asap' => '05',\n 'nombre' => 'LOS CORTIJOS',\n 'municipio_id' => 116,\n 'co_stat_data' => 'A',\n ),\n 116 =>\n array(\n 'id' => 1501,\n 'co_prrq_asap' => '06',\n 'nombre' => 'MARCIAL HERNANDEZ',\n 'municipio_id' => 116,\n 'co_stat_data' => 'A',\n ),\n 117 =>\n array(\n 'id' => 1497,\n 'co_prrq_asap' => '01',\n 'nombre' => 'SAN FRANCISCO',\n 'municipio_id' => 116,\n 'co_stat_data' => 'A',\n ),\n 118 =>\n array(\n 'id' => 1503,\n 'co_prrq_asap' => '02',\n 'nombre' => 'EL MENE',\n 'municipio_id' => 117,\n 'co_stat_data' => 'A',\n ),\n 119 =>\n array(\n 'id' => 1504,\n 'co_prrq_asap' => '03',\n 'nombre' => 'JOSE CENOVIO URRIBARRI',\n 'municipio_id' => 117,\n 'co_stat_data' => 'A',\n ),\n 120 =>\n array(\n 'id' => 1505,\n 'co_prrq_asap' => '04',\n 'nombre' => 'PEDRO LUCAS URRIBARRI',\n 'municipio_id' => 117,\n 'co_stat_data' => 'A',\n ),\n 121 =>\n array(\n 'id' => 1502,\n 'co_prrq_asap' => '01',\n 'nombre' => 'SANTA RITA',\n 'municipio_id' => 117,\n 'co_stat_data' => 'A',\n ),\n 122 =>\n array(\n 'id' => 1506,\n 'co_prrq_asap' => '01',\n 'nombre' => 'MANUEL MANRIQUE',\n 'municipio_id' => 118,\n 'co_stat_data' => 'A',\n ),\n 123 =>\n array(\n 'id' => 1507,\n 'co_prrq_asap' => '02',\n 'nombre' => 'RAFAEL MARIA BARALT',\n 'municipio_id' => 118,\n 'co_stat_data' => 'A',\n ),\n 124 =>\n array(\n 'id' => 1508,\n 'co_prrq_asap' => '03',\n 'nombre' => 'RAFAEL URDANETA',\n 'municipio_id' => 118,\n 'co_stat_data' => 'A',\n ),\n 125 =>\n array(\n 'id' => 1509,\n 'co_prrq_asap' => '01',\n 'nombre' => 'BOBURES',\n 'municipio_id' => 119,\n 'co_stat_data' => 'A',\n ),\n 126 =>\n array(\n 'id' => 1510,\n 'co_prrq_asap' => '02',\n 'nombre' => 'EL BATEY',\n 'municipio_id' => 119,\n 'co_stat_data' => 'A',\n ),\n 127 =>\n array(\n 'id' => 1511,\n 'co_prrq_asap' => '03',\n 'nombre' => 'GIBRALTAR',\n 'municipio_id' => 119,\n 'co_stat_data' => 'A',\n ),\n 128 =>\n array(\n 'id' => 1512,\n 'co_prrq_asap' => '04',\n 'nombre' => 'HERAS',\n 'municipio_id' => 119,\n 'co_stat_data' => 'A',\n ),\n 129 =>\n array(\n 'id' => 1513,\n 'co_prrq_asap' => '05',\n 'nombre' => 'MONSEÑOR ARTURO C ALVAREZ',\n 'municipio_id' => 119,\n 'co_stat_data' => 'A',\n ),\n 130 =>\n array(\n 'id' => 1514,\n 'co_prrq_asap' => '06',\n 'nombre' => 'ROMULO GALLEGOS',\n 'municipio_id' => 119,\n 'co_stat_data' => 'A',\n ),\n 131 =>\n array(\n 'id' => 1422,\n 'co_prrq_asap' => '01',\n 'nombre' => 'ISLA DE TOAS',\n 'municipio_id' => 120,\n 'co_stat_data' => 'A',\n ),\n 132 =>\n array(\n 'id' => 1423,\n 'co_prrq_asap' => '02',\n 'nombre' => 'MONAGAS',\n 'municipio_id' => 120,\n 'co_stat_data' => 'A',\n ),\n 133 =>\n array(\n 'id' => 1424,\n 'co_prrq_asap' => '02',\n 'nombre' => 'GENERAL URDANETA',\n 'municipio_id' => 121,\n 'co_stat_data' => 'A',\n ),\n 134 =>\n array(\n 'id' => 1425,\n 'co_prrq_asap' => '03',\n 'nombre' => 'LIBERTADOR',\n 'municipio_id' => 121,\n 'co_stat_data' => 'A',\n ),\n 135 =>\n array(\n 'id' => 1426,\n 'co_prrq_asap' => '04',\n 'nombre' => 'MANUEL GUANIPA MATOS',\n 'municipio_id' => 121,\n 'co_stat_data' => 'A',\n ),\n 136 =>\n array(\n 'id' => 1427,\n 'co_prrq_asap' => '05',\n 'nombre' => 'MARCELINO BRICEÑO',\n 'municipio_id' => 121,\n 'co_stat_data' => 'A',\n ),\n 137 =>\n array(\n 'id' => 1428,\n 'co_prrq_asap' => '06',\n 'nombre' => 'PUEBLO NUEVO',\n 'municipio_id' => 121,\n 'co_stat_data' => 'A',\n ),\n 138 =>\n array(\n 'id' => 1518,\n 'co_prrq_asap' => '01',\n 'nombre' => 'SAN TIMOTEO',\n 'municipio_id' => 121,\n 'co_stat_data' => 'A',\n ),\n 139 =>\n array(\n 'id' => 1429,\n 'co_prrq_asap' => '01',\n 'nombre' => 'AMBROSIO',\n 'municipio_id' => 122,\n 'co_stat_data' => 'A',\n ),\n 140 =>\n array(\n 'id' => 1434,\n 'co_prrq_asap' => '08',\n 'nombre' => 'ARISTIDES CALVANI',\n 'municipio_id' => 122,\n 'co_stat_data' => 'A',\n ),\n 141 =>\n array(\n 'id' => 1519,\n 'co_prrq_asap' => '02',\n 'nombre' => 'CARMEN HERRERA',\n 'municipio_id' => 122,\n 'co_stat_data' => 'A',\n ),\n 142 =>\n array(\n 'id' => 1430,\n 'co_prrq_asap' => '03',\n 'nombre' => 'GERMAN RIOS LINARES',\n 'municipio_id' => 122,\n 'co_stat_data' => 'A',\n ),\n 143 =>\n array(\n 'id' => 1432,\n 'co_prrq_asap' => '05',\n 'nombre' => 'JORGE HERNANDEZ',\n 'municipio_id' => 122,\n 'co_stat_data' => 'A',\n ),\n 144 =>\n array(\n 'id' => 1431,\n 'co_prrq_asap' => '04',\n 'nombre' => 'LA ROSA',\n 'municipio_id' => 122,\n 'co_stat_data' => 'A',\n ),\n 145 =>\n array(\n 'id' => 1435,\n 'co_prrq_asap' => '09',\n 'nombre' => 'PUNTA GORDA',\n 'municipio_id' => 122,\n 'co_stat_data' => 'A',\n ),\n 146 =>\n array(\n 'id' => 1433,\n 'co_prrq_asap' => '06',\n 'nombre' => 'ROMULO BETANCOURT',\n 'municipio_id' => 122,\n 'co_stat_data' => 'A',\n ),\n 147 =>\n array(\n 'id' => 1520,\n 'co_prrq_asap' => '07',\n 'nombre' => 'SAN BENITO',\n 'municipio_id' => 122,\n 'co_stat_data' => 'A',\n ),\n 148 =>\n array(\n 'id' => 1443,\n 'co_prrq_asap' => '02',\n 'nombre' => 'CARLOS QUEVEDO',\n 'municipio_id' => 123,\n 'co_stat_data' => 'A',\n ),\n 149 =>\n array(\n 'id' => 1444,\n 'co_prrq_asap' => '03',\n 'nombre' => 'FRANCISCO JAVIER PULGAR',\n 'municipio_id' => 123,\n 'co_stat_data' => 'A',\n ),\n 150 =>\n array(\n 'id' => 1442,\n 'co_prrq_asap' => '01',\n 'nombre' => 'SIMON RODRIGUEZ',\n 'municipio_id' => 123,\n 'co_stat_data' => 'A',\n ),\n 151 =>\n array(\n 'id' => 1522,\n 'co_prrq_asap' => '02',\n 'nombre' => 'JOSE RAMON YEPEZ',\n 'municipio_id' => 124,\n 'co_stat_data' => 'A',\n ),\n 152 =>\n array(\n 'id' => 1445,\n 'co_prrq_asap' => '01',\n 'nombre' => 'LA CONCEPCION',\n 'municipio_id' => 124,\n 'co_stat_data' => 'A',\n ),\n 153 =>\n array(\n 'id' => 1446,\n 'co_prrq_asap' => '03',\n 'nombre' => 'MARIANO PARRA LEON',\n 'municipio_id' => 124,\n 'co_stat_data' => 'A',\n ),\n 154 =>\n array(\n 'id' => 1447,\n 'co_prrq_asap' => '04',\n 'nombre' => 'SAN JOSE',\n 'municipio_id' => 124,\n 'co_stat_data' => 'A',\n ),\n 155 =>\n array(\n 'id' => 1451,\n 'co_prrq_asap' => '02',\n 'nombre' => 'ANDRES BELLO',\n 'municipio_id' => 125,\n 'co_stat_data' => 'A',\n ),\n 156 =>\n array(\n 'id' => 1452,\n 'co_prrq_asap' => '03',\n 'nombre' => 'CHIQUINQUIRA',\n 'municipio_id' => 125,\n 'co_stat_data' => 'A',\n ),\n 157 =>\n array(\n 'id' => 1450,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CONCEPCION',\n 'municipio_id' => 125,\n 'co_stat_data' => 'A',\n ),\n 158 =>\n array(\n 'id' => 1453,\n 'co_prrq_asap' => '04',\n 'nombre' => 'EL CARMELO',\n 'municipio_id' => 125,\n 'co_stat_data' => 'A',\n ),\n 159 =>\n array(\n 'id' => 1454,\n 'co_prrq_asap' => '05',\n 'nombre' => 'POTRERITOS',\n 'municipio_id' => 125,\n 'co_stat_data' => 'A',\n ),\n 160 =>\n array(\n 'id' => 1471,\n 'co_prrq_asap' => '01',\n 'nombre' => 'ANTONIO BORJAS ROMERO',\n 'municipio_id' => 126,\n 'co_stat_data' => 'A',\n ),\n 161 =>\n array(\n 'id' => 1472,\n 'co_prrq_asap' => '02',\n 'nombre' => 'BOLIVAR',\n 'municipio_id' => 126,\n 'co_stat_data' => 'A',\n ),\n 162 =>\n array(\n 'id' => 1473,\n 'co_prrq_asap' => '03',\n 'nombre' => 'CACIQUE MARA',\n 'municipio_id' => 126,\n 'co_stat_data' => 'A',\n ),\n 163 =>\n array(\n 'id' => 1474,\n 'co_prrq_asap' => '04',\n 'nombre' => 'CARACCIOLO PARRA PEREZ',\n 'municipio_id' => 126,\n 'co_stat_data' => 'A',\n ),\n 164 =>\n array(\n 'id' => 1475,\n 'co_prrq_asap' => '05',\n 'nombre' => 'CECILIO ACOSTA',\n 'municipio_id' => 126,\n 'co_stat_data' => 'A',\n ),\n 165 =>\n array(\n 'id' => 1478,\n 'co_prrq_asap' => '08',\n 'nombre' => 'CHIQUINQUIRA',\n 'municipio_id' => 126,\n 'co_stat_data' => 'A',\n ),\n 166 =>\n array(\n 'id' => 1477,\n 'co_prrq_asap' => '07',\n 'nombre' => 'COQUIVACOA',\n 'municipio_id' => 126,\n 'co_stat_data' => 'A',\n ),\n 167 =>\n array(\n 'id' => 1476,\n 'co_prrq_asap' => '06',\n 'nombre' => 'CRISTO DE ARANZA',\n 'municipio_id' => 126,\n 'co_stat_data' => 'A',\n ),\n 168 =>\n array(\n 'id' => 1479,\n 'co_prrq_asap' => '09',\n 'nombre' => 'FRANCISCO EUGENIO BUSTAMANTE',\n 'municipio_id' => 126,\n 'co_stat_data' => 'A',\n ),\n 169 =>\n array(\n 'id' => 1480,\n 'co_prrq_asap' => '10',\n 'nombre' => 'IDELFONSO VASQUEZ',\n 'municipio_id' => 126,\n 'co_stat_data' => 'A',\n ),\n 170 =>\n array(\n 'id' => 1481,\n 'co_prrq_asap' => '11',\n 'nombre' => 'JUANA DE AVILA',\n 'municipio_id' => 126,\n 'co_stat_data' => 'A',\n ),\n 171 =>\n array(\n 'id' => 1527,\n 'co_prrq_asap' => '12',\n 'nombre' => 'LUIS HURTADO HIGUERA',\n 'municipio_id' => 126,\n 'co_stat_data' => 'A',\n ),\n 172 =>\n array(\n 'id' => 1482,\n 'co_prrq_asap' => '13',\n 'nombre' => 'MANUEL DAGNINO',\n 'municipio_id' => 126,\n 'co_stat_data' => 'A',\n ),\n 173 =>\n array(\n 'id' => 1483,\n 'co_prrq_asap' => '14',\n 'nombre' => 'OLEGARIO VILLALOBOS',\n 'municipio_id' => 126,\n 'co_stat_data' => 'A',\n ),\n 174 =>\n array(\n 'id' => 1484,\n 'co_prrq_asap' => '15',\n 'nombre' => 'RAUL LEONI',\n 'municipio_id' => 126,\n 'co_stat_data' => 'A',\n ),\n 175 =>\n array(\n 'id' => 1487,\n 'co_prrq_asap' => '18',\n 'nombre' => 'SAN ISIDRO',\n 'municipio_id' => 126,\n 'co_stat_data' => 'A',\n ),\n 176 =>\n array(\n 'id' => 1485,\n 'co_prrq_asap' => '16',\n 'nombre' => 'SANTA LUCIA',\n 'municipio_id' => 126,\n 'co_stat_data' => 'A',\n ),\n 177 =>\n array(\n 'id' => 1486,\n 'co_prrq_asap' => '17',\n 'nombre' => 'VENANCIO PULGAR',\n 'municipio_id' => 126,\n 'co_stat_data' => 'A',\n ),\n 178 =>\n array(\n 'id' => 1524,\n 'co_prrq_asap' => '02',\n 'nombre' => 'ALTA GUAJIRA',\n 'municipio_id' => 127,\n 'co_stat_data' => 'A',\n ),\n 179 =>\n array(\n 'id' => 1493,\n 'co_prrq_asap' => '03',\n 'nombre' => 'ELIAS SANCHEZ RUBIO',\n 'municipio_id' => 127,\n 'co_stat_data' => 'A',\n ),\n 180 =>\n array(\n 'id' => 1494,\n 'co_prrq_asap' => '04',\n 'nombre' => 'GUAJIRA',\n 'municipio_id' => 127,\n 'co_stat_data' => 'A',\n ),\n 181 =>\n array(\n 'id' => 1492,\n 'co_prrq_asap' => '01',\n 'nombre' => 'SINAMAICA',\n 'municipio_id' => 127,\n 'co_stat_data' => 'A',\n ),\n 182 =>\n array(\n 'id' => 1515,\n 'co_prrq_asap' => '01',\n 'nombre' => 'LA VICTORIA',\n 'municipio_id' => 128,\n 'co_stat_data' => 'A',\n ),\n 183 =>\n array(\n 'id' => 1516,\n 'co_prrq_asap' => '02',\n 'nombre' => 'RAFAEL URDANETA',\n 'municipio_id' => 128,\n 'co_stat_data' => 'A',\n ),\n 184 =>\n array(\n 'id' => 1517,\n 'co_prrq_asap' => '03',\n 'nombre' => 'RAUL CUENCA',\n 'municipio_id' => 128,\n 'co_stat_data' => 'A',\n ),\n 185 =>\n array(\n 'id' => 1549,\n 'co_prrq_asap' => '22',\n 'nombre' => '23 DE ENERO',\n 'municipio_id' => 129,\n 'co_stat_data' => 'A',\n ),\n 186 =>\n array(\n 'id' => 1528,\n 'co_prrq_asap' => '01',\n 'nombre' => 'ALTAGRACIA',\n 'municipio_id' => 129,\n 'co_stat_data' => 'A',\n ),\n 187 =>\n array(\n 'id' => 1529,\n 'co_prrq_asap' => '02',\n 'nombre' => 'ANTIMANO',\n 'municipio_id' => 129,\n 'co_stat_data' => 'A',\n ),\n 188 =>\n array(\n 'id' => 1530,\n 'co_prrq_asap' => '03',\n 'nombre' => 'CANDELARIA',\n 'municipio_id' => 129,\n 'co_stat_data' => 'A',\n ),\n 189 =>\n array(\n 'id' => 1531,\n 'co_prrq_asap' => '04',\n 'nombre' => 'CARICUAO',\n 'municipio_id' => 129,\n 'co_stat_data' => 'A',\n ),\n 190 =>\n array(\n 'id' => 1532,\n 'co_prrq_asap' => '05',\n 'nombre' => 'CATEDRAL',\n 'municipio_id' => 129,\n 'co_stat_data' => 'A',\n ),\n 191 =>\n array(\n 'id' => 1533,\n 'co_prrq_asap' => '06',\n 'nombre' => 'COCHE',\n 'municipio_id' => 129,\n 'co_stat_data' => 'A',\n ),\n 192 =>\n array(\n 'id' => 1534,\n 'co_prrq_asap' => '07',\n 'nombre' => 'EL JUNQUITO',\n 'municipio_id' => 129,\n 'co_stat_data' => 'A',\n ),\n 193 =>\n array(\n 'id' => 1535,\n 'co_prrq_asap' => '08',\n 'nombre' => 'EL PARAISO',\n 'municipio_id' => 129,\n 'co_stat_data' => 'A',\n ),\n 194 =>\n array(\n 'id' => 1536,\n 'co_prrq_asap' => '09',\n 'nombre' => 'EL RECREO',\n 'municipio_id' => 129,\n 'co_stat_data' => 'A',\n ),\n 195 =>\n array(\n 'id' => 1537,\n 'co_prrq_asap' => '10',\n 'nombre' => 'EL VALLE',\n 'municipio_id' => 129,\n 'co_stat_data' => 'A',\n ),\n 196 =>\n array(\n 'id' => 1538,\n 'co_prrq_asap' => '11',\n 'nombre' => 'LA PASTORA',\n 'municipio_id' => 129,\n 'co_stat_data' => 'A',\n ),\n 197 =>\n array(\n 'id' => 1539,\n 'co_prrq_asap' => '12',\n 'nombre' => 'LA VEGA',\n 'municipio_id' => 129,\n 'co_stat_data' => 'A',\n ),\n 198 =>\n array(\n 'id' => 1540,\n 'co_prrq_asap' => '13',\n 'nombre' => 'MACARAO',\n 'municipio_id' => 129,\n 'co_stat_data' => 'A',\n ),\n 199 =>\n array(\n 'id' => 1541,\n 'co_prrq_asap' => '14',\n 'nombre' => 'SAN AGUSTIN',\n 'municipio_id' => 129,\n 'co_stat_data' => 'A',\n ),\n 200 =>\n array(\n 'id' => 1542,\n 'co_prrq_asap' => '15',\n 'nombre' => 'SAN BERNARDINO',\n 'municipio_id' => 129,\n 'co_stat_data' => 'A',\n ),\n 201 =>\n array(\n 'id' => 1543,\n 'co_prrq_asap' => '16',\n 'nombre' => 'SAN JOSE',\n 'municipio_id' => 129,\n 'co_stat_data' => 'A',\n ),\n 202 =>\n array(\n 'id' => 1544,\n 'co_prrq_asap' => '17',\n 'nombre' => 'SAN JUAN',\n 'municipio_id' => 129,\n 'co_stat_data' => 'A',\n ),\n 203 =>\n array(\n 'id' => 1545,\n 'co_prrq_asap' => '18',\n 'nombre' => 'SAN PEDRO',\n 'municipio_id' => 129,\n 'co_stat_data' => 'A',\n ),\n 204 =>\n array(\n 'id' => 1546,\n 'co_prrq_asap' => '19',\n 'nombre' => 'SANTA ROSALIA',\n 'municipio_id' => 129,\n 'co_stat_data' => 'A',\n ),\n 205 =>\n array(\n 'id' => 1547,\n 'co_prrq_asap' => '20',\n 'nombre' => 'SANTA TERESA',\n 'municipio_id' => 129,\n 'co_stat_data' => 'A',\n ),\n 206 =>\n array(\n 'id' => 1548,\n 'co_prrq_asap' => '21',\n 'nombre' => 'SUCRE',\n 'municipio_id' => 129,\n 'co_stat_data' => 'A',\n ),\n 207 =>\n array(\n 'id' => 1550,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL ANDRES BELLO',\n 'municipio_id' => 130,\n 'co_stat_data' => 'A',\n ),\n 208 =>\n array(\n 'id' => 1552,\n 'co_prrq_asap' => '01',\n 'nombre' => 'AYACUCHO',\n 'municipio_id' => 131,\n 'co_stat_data' => 'A',\n ),\n 209 =>\n array(\n 'id' => 1553,\n 'co_prrq_asap' => '02',\n 'nombre' => 'RIVAS BERTI',\n 'municipio_id' => 131,\n 'co_stat_data' => 'A',\n ),\n 210 =>\n array(\n 'id' => 1554,\n 'co_prrq_asap' => '03',\n 'nombre' => 'SAN PEDRO DEL RIO',\n 'municipio_id' => 131,\n 'co_stat_data' => 'A',\n ),\n 211 =>\n array(\n 'id' => 1555,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL BOLIVAR',\n 'municipio_id' => 132,\n 'co_stat_data' => 'A',\n ),\n 212 =>\n array(\n 'id' => 1556,\n 'co_prrq_asap' => '02',\n 'nombre' => 'EL PALOTAL',\n 'municipio_id' => 132,\n 'co_stat_data' => 'A',\n ),\n 213 =>\n array(\n 'id' => 1557,\n 'co_prrq_asap' => '03',\n 'nombre' => 'GENERAL JUAN VICENTE GOMEZ',\n 'municipio_id' => 132,\n 'co_stat_data' => 'A',\n ),\n 214 =>\n array(\n 'id' => 1558,\n 'co_prrq_asap' => '04',\n 'nombre' => 'ISAIAS MEDINA ANGARITA',\n 'municipio_id' => 132,\n 'co_stat_data' => 'A',\n ),\n 215 =>\n array(\n 'id' => 1559,\n 'co_prrq_asap' => '02',\n 'nombre' => 'AMENODORO RANGEL LAMUS',\n 'municipio_id' => 133,\n 'co_stat_data' => 'A',\n ),\n 216 =>\n array(\n 'id' => 1615,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CARDENAS',\n 'municipio_id' => 133,\n 'co_stat_data' => 'A',\n ),\n 217 =>\n array(\n 'id' => 1560,\n 'co_prrq_asap' => '03',\n 'nombre' => 'LA FLORIDA',\n 'municipio_id' => 133,\n 'co_stat_data' => 'A',\n ),\n 218 =>\n array(\n 'id' => 1561,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL CORDOBA',\n 'municipio_id' => 134,\n 'co_stat_data' => 'A',\n ),\n 219 =>\n array(\n 'id' => 1562,\n 'co_prrq_asap' => '01',\n 'nombre' => ' FERNANDEZ FEO',\n 'municipio_id' => 135,\n 'co_stat_data' => 'A',\n ),\n 220 =>\n array(\n 'id' => 1563,\n 'co_prrq_asap' => '02',\n 'nombre' => 'ALBERTO ADRIANI',\n 'municipio_id' => 135,\n 'co_stat_data' => 'A',\n ),\n 221 =>\n array(\n 'id' => 1564,\n 'co_prrq_asap' => '03',\n 'nombre' => 'SANTO DOMINGO',\n 'municipio_id' => 135,\n 'co_stat_data' => 'A',\n ),\n 222 =>\n array(\n 'id' => 1565,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL FRANCISCO DE MIRANDA',\n 'municipio_id' => 136,\n 'co_stat_data' => 'A',\n ),\n 223 =>\n array(\n 'id' => 1567,\n 'co_prrq_asap' => '02',\n 'nombre' => 'BOCA DE GRITA',\n 'municipio_id' => 137,\n 'co_stat_data' => 'A',\n ),\n 224 =>\n array(\n 'id' => 1566,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL GARCIA DE HEVIA',\n 'municipio_id' => 137,\n 'co_stat_data' => 'A',\n ),\n 225 =>\n array(\n 'id' => 1568,\n 'co_prrq_asap' => '03',\n 'nombre' => 'JOSE ANTONIO PAEZ',\n 'municipio_id' => 137,\n 'co_stat_data' => 'A',\n ),\n 226 =>\n array(\n 'id' => 1569,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL GUASIMOS',\n 'municipio_id' => 138,\n 'co_stat_data' => 'A',\n ),\n 227 =>\n array(\n 'id' => 1570,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL INDEPENDENCIA',\n 'municipio_id' => 139,\n 'co_stat_data' => 'A',\n ),\n 228 =>\n array(\n 'id' => 1571,\n 'co_prrq_asap' => '02',\n 'nombre' => 'JUAN GERMAN ROSCIO',\n 'municipio_id' => 139,\n 'co_stat_data' => 'A',\n ),\n 229 =>\n array(\n 'id' => 1572,\n 'co_prrq_asap' => '03',\n 'nombre' => 'ROMAN CARDENAS',\n 'municipio_id' => 139,\n 'co_stat_data' => 'A',\n ),\n 230 =>\n array(\n 'id' => 1574,\n 'co_prrq_asap' => '02',\n 'nombre' => 'EMILIO CONSTANTINO GUERRERO',\n 'municipio_id' => 140,\n 'co_stat_data' => 'A',\n ),\n 231 =>\n array(\n 'id' => 1573,\n 'co_prrq_asap' => '01',\n 'nombre' => 'JAUREGUI',\n 'municipio_id' => 140,\n 'co_stat_data' => 'A',\n ),\n 232 =>\n array(\n 'id' => 1575,\n 'co_prrq_asap' => '03',\n 'nombre' => 'MONSEÑOR MIGUEL ANTONIO SALAS',\n 'municipio_id' => 140,\n 'co_stat_data' => 'A',\n ),\n 233 =>\n array(\n 'id' => 1576,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL JOSE MARIA VARGAS',\n 'municipio_id' => 141,\n 'co_stat_data' => 'A',\n ),\n 234 =>\n array(\n 'id' => 1580,\n 'co_prrq_asap' => '04',\n 'nombre' => 'BRAMON',\n 'municipio_id' => 142,\n 'co_stat_data' => 'A',\n ),\n 235 =>\n array(\n 'id' => 1577,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL JUNIN',\n 'municipio_id' => 142,\n 'co_stat_data' => 'A',\n ),\n 236 =>\n array(\n 'id' => 1578,\n 'co_prrq_asap' => '02',\n 'nombre' => 'LA PETROLIA',\n 'municipio_id' => 142,\n 'co_stat_data' => 'A',\n ),\n 237 =>\n array(\n 'id' => 1579,\n 'co_prrq_asap' => '03',\n 'nombre' => 'QUINIMARI',\n 'municipio_id' => 142,\n 'co_stat_data' => 'A',\n ),\n 238 =>\n array(\n 'id' => 1581,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL LIBERTAD',\n 'municipio_id' => 143,\n 'co_stat_data' => 'A',\n ),\n 239 =>\n array(\n 'id' => 1582,\n 'co_prrq_asap' => '02',\n 'nombre' => 'CIPRIANO CASTRO',\n 'municipio_id' => 143,\n 'co_stat_data' => 'A',\n ),\n 240 =>\n array(\n 'id' => 1583,\n 'co_prrq_asap' => '03',\n 'nombre' => 'MANUEL FELIPE RUGELES',\n 'municipio_id' => 143,\n 'co_stat_data' => 'A',\n ),\n 241 =>\n array(\n 'id' => 1586,\n 'co_prrq_asap' => '03',\n 'nombre' => 'DORADAS',\n 'municipio_id' => 144,\n 'co_stat_data' => 'A',\n ),\n 242 =>\n array(\n 'id' => 1585,\n 'co_prrq_asap' => '02',\n 'nombre' => 'EMETERIO OCHOA',\n 'municipio_id' => 144,\n 'co_stat_data' => 'A',\n ),\n 243 =>\n array(\n 'id' => 1584,\n 'co_prrq_asap' => '01',\n 'nombre' => 'LIBERTADOR',\n 'municipio_id' => 144,\n 'co_stat_data' => 'A',\n ),\n 244 =>\n array(\n 'id' => 1587,\n 'co_prrq_asap' => '04',\n 'nombre' => 'SAN JOAQUIN DE NAVAY',\n 'municipio_id' => 144,\n 'co_stat_data' => 'A',\n ),\n 245 =>\n array(\n 'id' => 1589,\n 'co_prrq_asap' => '02',\n 'nombre' => 'CONSTITUCION',\n 'municipio_id' => 145,\n 'co_stat_data' => 'A',\n ),\n 246 =>\n array(\n 'id' => 1588,\n 'co_prrq_asap' => '01',\n 'nombre' => 'LOBATERA',\n 'municipio_id' => 145,\n 'co_stat_data' => 'A',\n ),\n 247 =>\n array(\n 'id' => 1590,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL MICHELENA',\n 'municipio_id' => 146,\n 'co_stat_data' => 'A',\n ),\n 248 =>\n array(\n 'id' => 1592,\n 'co_prrq_asap' => '02',\n 'nombre' => 'LA PALMITA',\n 'municipio_id' => 147,\n 'co_stat_data' => 'A',\n ),\n 249 =>\n array(\n 'id' => 1591,\n 'co_prrq_asap' => '01',\n 'nombre' => 'PANAMERICANO',\n 'municipio_id' => 147,\n 'co_stat_data' => 'A',\n ),\n 250 =>\n array(\n 'id' => 1594,\n 'co_prrq_asap' => '02',\n 'nombre' => 'NUEVA ARCADIA',\n 'municipio_id' => 148,\n 'co_stat_data' => 'A',\n ),\n 251 =>\n array(\n 'id' => 1593,\n 'co_prrq_asap' => '01',\n 'nombre' => 'PEDRO MARIA UREÑA',\n 'municipio_id' => 148,\n 'co_stat_data' => 'A',\n ),\n 252 =>\n array(\n 'id' => 1597,\n 'co_prrq_asap' => '02',\n 'nombre' => 'BOCONO',\n 'municipio_id' => 149,\n 'co_stat_data' => 'A',\n ),\n 253 =>\n array(\n 'id' => 1598,\n 'co_prrq_asap' => '03',\n 'nombre' => 'HERNANDEZ',\n 'municipio_id' => 149,\n 'co_stat_data' => 'A',\n ),\n 254 =>\n array(\n 'id' => 1596,\n 'co_prrq_asap' => '01',\n 'nombre' => 'SAMUEL DARIO MALDONADO',\n 'municipio_id' => 149,\n 'co_stat_data' => 'A',\n ),\n 255 =>\n array(\n 'id' => 1603,\n 'co_prrq_asap' => '05',\n 'nombre' => 'DR FRANCISCO ROMERO LOBO',\n 'municipio_id' => 150,\n 'co_stat_data' => 'A',\n ),\n 256 =>\n array(\n 'id' => 1599,\n 'co_prrq_asap' => '01',\n 'nombre' => 'LA CONCORDIA',\n 'municipio_id' => 150,\n 'co_stat_data' => 'A',\n ),\n 257 =>\n array(\n 'id' => 1600,\n 'co_prrq_asap' => '02',\n 'nombre' => 'PEDRO MARIA MORANTES',\n 'municipio_id' => 150,\n 'co_stat_data' => 'A',\n ),\n 258 =>\n array(\n 'id' => 1601,\n 'co_prrq_asap' => '03',\n 'nombre' => 'SAN JUAN BAUTISTA',\n 'municipio_id' => 150,\n 'co_stat_data' => 'A',\n ),\n 259 =>\n array(\n 'id' => 1602,\n 'co_prrq_asap' => '04',\n 'nombre' => 'SAN SEBASTIAN',\n 'municipio_id' => 150,\n 'co_stat_data' => 'A',\n ),\n 260 =>\n array(\n 'id' => 1604,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL SEBORUCO',\n 'municipio_id' => 151,\n 'co_stat_data' => 'A',\n ),\n 261 =>\n array(\n 'id' => 1606,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL SUCRE',\n 'municipio_id' => 152,\n 'co_stat_data' => 'A',\n ),\n 262 =>\n array(\n 'id' => 1607,\n 'co_prrq_asap' => '02',\n 'nombre' => 'ELEAZAR LOPEZ CONTRERAS',\n 'municipio_id' => 152,\n 'co_stat_data' => 'A',\n ),\n 263 =>\n array(\n 'id' => 1608,\n 'co_prrq_asap' => '03',\n 'nombre' => 'SAN PABLO',\n 'municipio_id' => 152,\n 'co_stat_data' => 'A',\n ),\n 264 =>\n array(\n 'id' => 1610,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL URIBANTE',\n 'municipio_id' => 153,\n 'co_stat_data' => 'A',\n ),\n 265 =>\n array(\n 'id' => 1611,\n 'co_prrq_asap' => '02',\n 'nombre' => 'CARDENAS',\n 'municipio_id' => 153,\n 'co_stat_data' => 'A',\n ),\n 266 =>\n array(\n 'id' => 1612,\n 'co_prrq_asap' => '03',\n 'nombre' => 'JUAN PABLO PEÑALOZA',\n 'municipio_id' => 153,\n 'co_stat_data' => 'A',\n ),\n 267 =>\n array(\n 'id' => 1613,\n 'co_prrq_asap' => '04',\n 'nombre' => 'POTOSI',\n 'municipio_id' => 153,\n 'co_stat_data' => 'A',\n ),\n 268 =>\n array(\n 'id' => 1551,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL ANTONIO ROMULO COSTA',\n 'municipio_id' => 154,\n 'co_stat_data' => 'A',\n 'co_stat_old' => 'M',\n 'fe_ini' => NULL,\n ),\n 269 =>\n array(\n 'id' => 1595,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL RAFAEL URDANETA',\n 'municipio_id' => 155,\n 'co_stat_data' => 'A',\n ),\n 270 =>\n array(\n 'id' => 1609,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL TORBES',\n 'municipio_id' => 156,\n 'co_stat_data' => 'A',\n ),\n 271 =>\n array(\n 'id' => 1614,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL SAN JUDAS TADEO',\n 'municipio_id' => 157,\n 'co_stat_data' => 'A',\n ),\n 272 =>\n array(\n 'id' => 1605,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL SIMON RODRIGUEZ',\n 'municipio_id' => 158,\n 'co_stat_data' => 'A',\n ),\n 273 =>\n array(\n 'id' => 1616,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL BOLIVAR',\n 'municipio_id' => 159,\n 'co_stat_data' => 'A',\n ),\n 274 =>\n array(\n 'id' => 1617,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL CAMATAGUA',\n 'municipio_id' => 160,\n 'co_stat_data' => 'A',\n ),\n 275 =>\n array(\n 'id' => 1618,\n 'co_prrq_asap' => '02',\n 'nombre' => 'NO UBNA CARMEN DE CURA',\n 'municipio_id' => 160,\n 'co_stat_data' => 'A',\n ),\n 276 =>\n array(\n 'id' => 1619,\n 'co_prrq_asap' => '01',\n 'nombre' => 'NO URBANA CHORONI',\n 'municipio_id' => 161,\n 'co_stat_data' => 'A',\n ),\n 277 =>\n array(\n 'id' => 1621,\n 'co_prrq_asap' => '03',\n 'nombre' => 'UBNA MADRE MARIA DE SAN JOSE',\n 'municipio_id' => 161,\n 'co_stat_data' => 'A',\n ),\n 278 =>\n array(\n 'id' => 1625,\n 'co_prrq_asap' => '07',\n 'nombre' => 'URBANA ANDRES ELOY BLANCO',\n 'municipio_id' => 161,\n 'co_stat_data' => 'A',\n ),\n 279 =>\n array(\n 'id' => 1622,\n 'co_prrq_asap' => '04',\n 'nombre' => 'URBANA JOAQUIN CRESPO',\n 'municipio_id' => 161,\n 'co_stat_data' => 'A',\n ),\n 280 =>\n array(\n 'id' => 1624,\n 'co_prrq_asap' => '06',\n 'nombre' => 'URBANA JOSE CASANOVA GODOY',\n 'municipio_id' => 161,\n 'co_stat_data' => 'A',\n ),\n 281 =>\n array(\n 'id' => 1620,\n 'co_prrq_asap' => '02',\n 'nombre' => 'URBANA LAS DELICIAS',\n 'municipio_id' => 161,\n 'co_stat_data' => 'A',\n ),\n 282 =>\n array(\n 'id' => 1663,\n 'co_prrq_asap' => '08',\n 'nombre' => 'URBANA LOS TACARIGUAS',\n 'municipio_id' => 161,\n 'co_stat_data' => 'A',\n ),\n 283 =>\n array(\n 'id' => 1623,\n 'co_prrq_asap' => '05',\n 'nombre' => 'URBANA PEDRO JOSE OVALLES',\n 'municipio_id' => 161,\n 'co_stat_data' => 'A',\n ),\n 284 =>\n array(\n 'id' => 1626,\n 'co_prrq_asap' => '01',\n 'nombre' => 'JOSE ANGEL LAMAS',\n 'municipio_id' => 162,\n 'co_stat_data' => 'A',\n ),\n 285 =>\n array(\n 'id' => 1627,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL JOSE FELIX RIBAS',\n 'municipio_id' => 163,\n 'co_stat_data' => 'A',\n ),\n 286 =>\n array(\n 'id' => 1628,\n 'co_prrq_asap' => '02',\n 'nombre' => 'CASTOR NIEVES RIOS',\n 'municipio_id' => 163,\n 'co_stat_data' => 'A',\n ),\n 287 =>\n array(\n 'id' => 1629,\n 'co_prrq_asap' => '03',\n 'nombre' => 'NO URBANA LAS GUACAMAYAS',\n 'municipio_id' => 163,\n 'co_stat_data' => 'A',\n ),\n 288 =>\n array(\n 'id' => 1630,\n 'co_prrq_asap' => '04',\n 'nombre' => 'NO URBANA PAO DE ZARATE',\n 'municipio_id' => 163,\n 'co_stat_data' => 'A',\n ),\n 289 =>\n array(\n 'id' => 1631,\n 'co_prrq_asap' => '05',\n 'nombre' => 'NO URBANA ZUATA',\n 'municipio_id' => 163,\n 'co_stat_data' => 'A',\n ),\n 290 =>\n array(\n 'id' => 1632,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL JOSE RAFAEL REVENGA',\n 'municipio_id' => 164,\n 'co_stat_data' => 'A',\n ),\n 291 =>\n array(\n 'id' => 1633,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL LIBERTADOR',\n 'municipio_id' => 165,\n 'co_stat_data' => 'A',\n ),\n 292 =>\n array(\n 'id' => 1634,\n 'co_prrq_asap' => '02',\n 'nombre' => 'NO URBANA SAN MARTIN DE PORRES',\n 'municipio_id' => 165,\n 'co_stat_data' => 'A',\n ),\n 293 =>\n array(\n 'id' => 1635,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL MARIO BRICEÑO IRAGORRY',\n 'municipio_id' => 166,\n 'co_stat_data' => 'A',\n ),\n 294 =>\n array(\n 'id' => 1636,\n 'co_prrq_asap' => '02',\n 'nombre' => 'CAÑA DE AZUCAR',\n 'municipio_id' => 166,\n 'co_stat_data' => 'A',\n ),\n 295 =>\n array(\n 'id' => 1638,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL SAN CASIMIRO',\n 'municipio_id' => 167,\n 'co_stat_data' => 'A',\n ),\n 296 =>\n array(\n 'id' => 1639,\n 'co_prrq_asap' => '02',\n 'nombre' => 'NO URBANA GUIRIPA',\n 'municipio_id' => 167,\n 'co_stat_data' => 'A',\n ),\n 297 =>\n array(\n 'id' => 1640,\n 'co_prrq_asap' => '03',\n 'nombre' => 'NO URBANA OLLAS DE CARAMACATE',\n 'municipio_id' => 167,\n 'co_stat_data' => 'A',\n ),\n 298 =>\n array(\n 'id' => 1641,\n 'co_prrq_asap' => '04',\n 'nombre' => 'NO URBANA VALLE MORIN',\n 'municipio_id' => 167,\n 'co_stat_data' => 'A',\n ),\n 299 =>\n array(\n 'id' => 1642,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL SAN SEBASTIAN',\n 'municipio_id' => 168,\n 'co_stat_data' => 'A',\n ),\n 300 =>\n array(\n 'id' => 1643,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL SANTIAGO MARIÑO',\n 'municipio_id' => 169,\n 'co_stat_data' => 'A',\n ),\n 301 =>\n array(\n 'id' => 1647,\n 'co_prrq_asap' => '05',\n 'nombre' => 'NO UBNA ALFREDO PACHECO MIRANDA',\n 'municipio_id' => 169,\n 'co_stat_data' => 'A',\n ),\n 302 =>\n array(\n 'id' => 1644,\n 'co_prrq_asap' => '02',\n 'nombre' => 'NO URBANA AREVALO APONTE',\n 'municipio_id' => 169,\n 'co_stat_data' => 'A',\n ),\n 303 =>\n array(\n 'id' => 1645,\n 'co_prrq_asap' => '03',\n 'nombre' => 'NO URBANA CHUAO',\n 'municipio_id' => 169,\n 'co_stat_data' => 'A',\n ),\n 304 =>\n array(\n 'id' => 1646,\n 'co_prrq_asap' => '04',\n 'nombre' => 'NO URBANA SAMAN DE GUERE',\n 'municipio_id' => 169,\n 'co_stat_data' => 'A',\n ),\n 305 =>\n array(\n 'id' => 1648,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL SANTOS MICHELENA',\n 'municipio_id' => 170,\n 'co_stat_data' => 'A',\n ),\n 306 =>\n array(\n 'id' => 1649,\n 'co_prrq_asap' => '02',\n 'nombre' => 'NO URBANA TIARA',\n 'municipio_id' => 170,\n 'co_stat_data' => 'A',\n ),\n 307 =>\n array(\n 'id' => 1650,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL SUCRE',\n 'municipio_id' => 171,\n 'co_stat_data' => 'A',\n ),\n 308 =>\n array(\n 'id' => 1651,\n 'co_prrq_asap' => '02',\n 'nombre' => 'NO URBANA BELLA VISTA',\n 'municipio_id' => 171,\n 'co_stat_data' => 'A',\n ),\n 309 =>\n array(\n 'id' => 1652,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL TOVAR',\n 'municipio_id' => 172,\n 'co_stat_data' => 'A',\n ),\n 310 =>\n array(\n 'id' => 1655,\n 'co_prrq_asap' => '04',\n 'nombre' => ' NO URBANA TAGUAY',\n 'municipio_id' => 173,\n 'co_stat_data' => 'A',\n ),\n 311 =>\n array(\n 'id' => 1653,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL URDANETA',\n 'municipio_id' => 173,\n 'co_stat_data' => 'A',\n ),\n 312 =>\n array(\n 'id' => 1654,\n 'co_prrq_asap' => '02',\n 'nombre' => 'NO URBANA LAS PEÑITAS',\n 'municipio_id' => 173,\n 'co_stat_data' => 'A',\n ),\n 313 =>\n array(\n 'id' => 1664,\n 'co_prrq_asap' => '03',\n 'nombre' => 'NO URBANA SAN FRANCISCO DE CARA',\n 'municipio_id' => 173,\n 'co_stat_data' => 'A',\n ),\n 314 =>\n array(\n 'id' => 1656,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL ZAMORA',\n 'municipio_id' => 174,\n 'co_stat_data' => 'A',\n ),\n 315 =>\n array(\n 'id' => 1659,\n 'co_prrq_asap' => '05',\n 'nombre' => 'NO URBANA AUGUSTO MIJARES',\n 'municipio_id' => 174,\n 'co_stat_data' => 'A',\n ),\n 316 =>\n array(\n 'id' => 1657,\n 'co_prrq_asap' => '02',\n 'nombre' => 'NO URBANA MAGDALENO',\n 'municipio_id' => 174,\n 'co_stat_data' => 'A',\n ),\n 317 =>\n array(\n 'id' => 1665,\n 'co_prrq_asap' => '03',\n 'nombre' => 'NO URBANA SAN FRANCISCO DE ASIS',\n 'municipio_id' => 174,\n 'co_stat_data' => 'A',\n ),\n 318 =>\n array(\n 'id' => 1658,\n 'co_prrq_asap' => '04',\n 'nombre' => 'NO URBANA VALLES DE TUCUTUNEMO',\n 'municipio_id' => 174,\n 'co_stat_data' => 'A',\n ),\n 319 =>\n array(\n 'id' => 1660,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAP FRANCISCO LINARES ALCANTARA',\n 'municipio_id' => 175,\n 'co_stat_data' => 'A',\n ),\n 320 =>\n array(\n 'id' => 1661,\n 'co_prrq_asap' => '02',\n 'nombre' => 'NO UBNA FRANCISCO DE MIRANDA',\n 'municipio_id' => 175,\n 'co_stat_data' => 'A',\n ),\n 321 =>\n array(\n 'id' => 1662,\n 'co_prrq_asap' => '03',\n 'nombre' => 'NO UBNA MONSEÑOR FELICIANO GONZALEZ',\n 'municipio_id' => 175,\n 'co_stat_data' => 'A',\n ),\n 322 =>\n array(\n 'id' => 1666,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL ACOSTA',\n 'municipio_id' => 176,\n 'co_stat_data' => 'A',\n ),\n 323 =>\n array(\n 'id' => 1667,\n 'co_prrq_asap' => '02',\n 'nombre' => 'SAN FRANCISCO',\n 'municipio_id' => 176,\n 'co_stat_data' => 'A',\n ),\n 324 =>\n array(\n 'id' => 1668,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL AGUASAY',\n 'municipio_id' => 177,\n 'co_stat_data' => 'A',\n ),\n 325 =>\n array(\n 'id' => 1669,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL BOLIVAR',\n 'municipio_id' => 178,\n 'co_stat_data' => 'A',\n ),\n 326 =>\n array(\n 'id' => 1670,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL CARIPE',\n 'municipio_id' => 179,\n 'co_stat_data' => 'A',\n ),\n 327 =>\n array(\n 'id' => 1671,\n 'co_prrq_asap' => '02',\n 'nombre' => 'EL GUACHARO',\n 'municipio_id' => 179,\n 'co_stat_data' => 'A',\n ),\n 328 =>\n array(\n 'id' => 1672,\n 'co_prrq_asap' => '03',\n 'nombre' => 'LA GUANOTA',\n 'municipio_id' => 179,\n 'co_stat_data' => 'A',\n ),\n 329 =>\n array(\n 'id' => 1673,\n 'co_prrq_asap' => '04',\n 'nombre' => 'SABANA DE PIEDRA',\n 'municipio_id' => 179,\n 'co_stat_data' => 'A',\n ),\n 330 =>\n array(\n 'id' => 1674,\n 'co_prrq_asap' => '05',\n 'nombre' => 'SAN AGUSTIN',\n 'municipio_id' => 179,\n 'co_stat_data' => 'A',\n ),\n 331 =>\n array(\n 'id' => 1675,\n 'co_prrq_asap' => '06',\n 'nombre' => 'TERESEN',\n 'municipio_id' => 179,\n 'co_stat_data' => 'A',\n ),\n 332 =>\n array(\n 'id' => 1677,\n 'co_prrq_asap' => '02',\n 'nombre' => 'AREO',\n 'municipio_id' => 180,\n 'co_stat_data' => 'A',\n ),\n 333 =>\n array(\n 'id' => 1676,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL CEDEÑO',\n 'municipio_id' => 180,\n 'co_stat_data' => 'A',\n ),\n 334 =>\n array(\n 'id' => 1678,\n 'co_prrq_asap' => '03',\n 'nombre' => 'SAN FELIX',\n 'municipio_id' => 180,\n 'co_stat_data' => 'A',\n ),\n 335 =>\n array(\n 'id' => 1679,\n 'co_prrq_asap' => '04',\n 'nombre' => 'VIENTO FRESCO',\n 'municipio_id' => 180,\n 'co_stat_data' => 'A',\n ),\n 336 =>\n array(\n 'id' => 1680,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL EZEQUIEL ZAMORA',\n 'municipio_id' => 181,\n 'co_stat_data' => 'A',\n ),\n 337 =>\n array(\n 'id' => 1681,\n 'co_prrq_asap' => '02',\n 'nombre' => 'EL TEJERO',\n 'municipio_id' => 181,\n 'co_stat_data' => 'A',\n ),\n 338 =>\n array(\n 'id' => 1682,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL LIBERTADOR',\n 'municipio_id' => 182,\n 'co_stat_data' => 'A',\n ),\n 339 =>\n array(\n 'id' => 1683,\n 'co_prrq_asap' => '02',\n 'nombre' => 'CHAGUARAMAS',\n 'municipio_id' => 182,\n 'co_stat_data' => 'A',\n ),\n 340 =>\n array(\n 'id' => 1684,\n 'co_prrq_asap' => '03',\n 'nombre' => 'LAS ALHUACAS',\n 'municipio_id' => 182,\n 'co_stat_data' => 'A',\n ),\n 341 =>\n array(\n 'id' => 1685,\n 'co_prrq_asap' => '04',\n 'nombre' => 'TABASCA',\n 'municipio_id' => 182,\n 'co_stat_data' => 'A',\n ),\n 342 =>\n array(\n 'id' => 1687,\n 'co_prrq_asap' => '02',\n 'nombre' => 'ALTO DE LOS GODOS',\n 'municipio_id' => 183,\n 'co_stat_data' => 'A',\n ),\n 343 =>\n array(\n 'id' => 1688,\n 'co_prrq_asap' => '03',\n 'nombre' => 'BOQUERON',\n 'municipio_id' => 183,\n 'co_stat_data' => 'A',\n ),\n 344 =>\n array(\n 'id' => 1686,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL MATURIN',\n 'municipio_id' => 183,\n 'co_stat_data' => 'A',\n ),\n 345 =>\n array(\n 'id' => 1692,\n 'co_prrq_asap' => '07',\n 'nombre' => 'EL COROZO',\n 'municipio_id' => 183,\n 'co_stat_data' => 'A',\n ),\n 346 =>\n array(\n 'id' => 1693,\n 'co_prrq_asap' => '08',\n 'nombre' => 'EL FURRIAL',\n 'municipio_id' => 183,\n 'co_stat_data' => 'A',\n ),\n 347 =>\n array(\n 'id' => 1694,\n 'co_prrq_asap' => '09',\n 'nombre' => 'JUSEPIN',\n 'municipio_id' => 183,\n 'co_stat_data' => 'A',\n ),\n 348 =>\n array(\n 'id' => 1695,\n 'co_prrq_asap' => '10',\n 'nombre' => 'LA PICA',\n 'municipio_id' => 183,\n 'co_stat_data' => 'A',\n ),\n 349 =>\n array(\n 'id' => 1689,\n 'co_prrq_asap' => '04',\n 'nombre' => 'LAS COCUIZAS',\n 'municipio_id' => 183,\n 'co_stat_data' => 'A',\n ),\n 350 =>\n array(\n 'id' => 1690,\n 'co_prrq_asap' => '05',\n 'nombre' => 'SAN SIMON',\n 'municipio_id' => 183,\n 'co_stat_data' => 'A',\n ),\n 351 =>\n array(\n 'id' => 1696,\n 'co_prrq_asap' => '11',\n 'nombre' => 'SAN VICENTE',\n 'municipio_id' => 183,\n 'co_stat_data' => 'A',\n ),\n 352 =>\n array(\n 'id' => 1691,\n 'co_prrq_asap' => '06',\n 'nombre' => 'SANTA CRUZ',\n 'municipio_id' => 183,\n 'co_stat_data' => 'A',\n ),\n 353 =>\n array(\n 'id' => 1698,\n 'co_prrq_asap' => '02',\n 'nombre' => 'APARICIO',\n 'municipio_id' => 184,\n 'co_stat_data' => 'A',\n ),\n 354 =>\n array(\n 'id' => 1697,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL PIAR',\n 'municipio_id' => 184,\n 'co_stat_data' => 'A',\n ),\n 355 =>\n array(\n 'id' => 1699,\n 'co_prrq_asap' => '03',\n 'nombre' => 'CHAGUARAMAL',\n 'municipio_id' => 184,\n 'co_stat_data' => 'A',\n ),\n 356 =>\n array(\n 'id' => 1700,\n 'co_prrq_asap' => '04',\n 'nombre' => 'EL PINTO',\n 'municipio_id' => 184,\n 'co_stat_data' => 'A',\n ),\n 357 =>\n array(\n 'id' => 1701,\n 'co_prrq_asap' => '05',\n 'nombre' => 'GUANAGUANA',\n 'municipio_id' => 184,\n 'co_stat_data' => 'A',\n ),\n 358 =>\n array(\n 'id' => 1702,\n 'co_prrq_asap' => '06',\n 'nombre' => 'LA TOSCANA',\n 'municipio_id' => 184,\n 'co_stat_data' => 'A',\n ),\n 359 =>\n array(\n 'id' => 1703,\n 'co_prrq_asap' => '07',\n 'nombre' => 'TAGUAYA',\n 'municipio_id' => 184,\n 'co_stat_data' => 'A',\n ),\n 360 =>\n array(\n 'id' => 1705,\n 'co_prrq_asap' => '02',\n 'nombre' => 'CACHIPO',\n 'municipio_id' => 185,\n 'co_stat_data' => 'A',\n ),\n 361 =>\n array(\n 'id' => 1704,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL PUNCERES',\n 'municipio_id' => 185,\n 'co_stat_data' => 'A',\n ),\n 362 =>\n array(\n 'id' => 1706,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL SANTA BARBARA',\n 'municipio_id' => 186,\n 'co_stat_data' => 'A',\n ),\n 363 =>\n array(\n 'id' => 1707,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL SOTILLO',\n 'municipio_id' => 187,\n 'co_stat_data' => 'A',\n ),\n 364 =>\n array(\n 'id' => 1708,\n 'co_prrq_asap' => '02',\n 'nombre' => 'LOS BARRANCOS DE FAJARDO',\n 'municipio_id' => 187,\n 'co_stat_data' => 'A',\n ),\n 365 =>\n array(\n 'id' => 1709,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL URACOA',\n 'municipio_id' => 188,\n 'co_stat_data' => 'A',\n ),\n 366 =>\n array(\n 'id' => 1756,\n 'co_prrq_asap' => '01',\n 'nombre' => 'PIO TAMAYO',\n 'municipio_id' => 189,\n 'co_stat_data' => 'A',\n ),\n 367 =>\n array(\n 'id' => 1710,\n 'co_prrq_asap' => '02',\n 'nombre' => 'QUEBRADA HONDA DE GUACHE',\n 'municipio_id' => 189,\n 'co_stat_data' => 'A',\n ),\n 368 =>\n array(\n 'id' => 1711,\n 'co_prrq_asap' => '03',\n 'nombre' => 'YACAMBU',\n 'municipio_id' => 189,\n 'co_stat_data' => 'A',\n ),\n 369 =>\n array(\n 'id' => 1757,\n 'co_prrq_asap' => '01',\n 'nombre' => 'FREITEZ',\n 'municipio_id' => 190,\n 'co_stat_data' => 'A',\n ),\n 370 =>\n array(\n 'id' => 1712,\n 'co_prrq_asap' => '02',\n 'nombre' => 'JOSE MARIA BLANCO',\n 'municipio_id' => 190,\n 'co_stat_data' => 'A',\n ),\n 371 =>\n array(\n 'id' => 1720,\n 'co_prrq_asap' => '08',\n 'nombre' => 'AGUEDO FELIPE ALVARADO',\n 'municipio_id' => 191,\n 'co_stat_data' => 'A',\n ),\n 372 =>\n array(\n 'id' => 1721,\n 'co_prrq_asap' => '09',\n 'nombre' => 'BUENA VISTA',\n 'municipio_id' => 191,\n 'co_stat_data' => 'A',\n ),\n 373 =>\n array(\n 'id' => 1713,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CATEDRAL',\n 'municipio_id' => 191,\n 'co_stat_data' => 'A',\n ),\n 374 =>\n array(\n 'id' => 1714,\n 'co_prrq_asap' => '02',\n 'nombre' => 'CONCEPCION',\n 'municipio_id' => 191,\n 'co_stat_data' => 'A',\n ),\n 375 =>\n array(\n 'id' => 1715,\n 'co_prrq_asap' => '03',\n 'nombre' => 'EL CUJI',\n 'municipio_id' => 191,\n 'co_stat_data' => 'A',\n ),\n 376 =>\n array(\n 'id' => 1716,\n 'co_prrq_asap' => '04',\n 'nombre' => 'JUAN DE VILLEGAS',\n 'municipio_id' => 191,\n 'co_stat_data' => 'A',\n ),\n 377 =>\n array(\n 'id' => 1722,\n 'co_prrq_asap' => '10',\n 'nombre' => 'JUAREZ',\n 'municipio_id' => 191,\n 'co_stat_data' => 'A',\n ),\n 378 =>\n array(\n 'id' => 1717,\n 'co_prrq_asap' => '05',\n 'nombre' => 'SANTA ROSA',\n 'municipio_id' => 191,\n 'co_stat_data' => 'A',\n ),\n 379 =>\n array(\n 'id' => 1718,\n 'co_prrq_asap' => '06',\n 'nombre' => 'TAMACA',\n 'municipio_id' => 191,\n 'co_stat_data' => 'A',\n ),\n 380 =>\n array(\n 'id' => 1719,\n 'co_prrq_asap' => '07',\n 'nombre' => 'UNION',\n 'municipio_id' => 191,\n 'co_stat_data' => 'A',\n ),\n 381 =>\n array(\n 'id' => 1934,\n 'co_prrq_asap' => '08',\n 'nombre' => 'CORONEL MARIANO PERAZA',\n 'municipio_id' => 192,\n 'co_stat_data' => 'A',\n ),\n 382 =>\n array(\n 'id' => 1724,\n 'co_prrq_asap' => '02',\n 'nombre' => 'CUARA',\n 'municipio_id' => 192,\n 'co_stat_data' => 'A',\n ),\n 383 =>\n array(\n 'id' => 1725,\n 'co_prrq_asap' => '03',\n 'nombre' => 'DIEGO DE LOZADA',\n 'municipio_id' => 192,\n 'co_stat_data' => 'A',\n ),\n 384 =>\n array(\n 'id' => 1933,\n 'co_prrq_asap' => '07',\n 'nombre' => 'JOSE BERNARDO DORANTE',\n 'municipio_id' => 192,\n 'co_stat_data' => 'A',\n ),\n 385 =>\n array(\n 'id' => 1723,\n 'co_prrq_asap' => '01',\n 'nombre' => 'JUAN BAUTISTA RODRIGUEZ',\n 'municipio_id' => 192,\n 'co_stat_data' => 'A',\n ),\n 386 =>\n array(\n 'id' => 1726,\n 'co_prrq_asap' => '04',\n 'nombre' => 'PARAISO DE SAN JOSE',\n 'municipio_id' => 192,\n 'co_stat_data' => 'A',\n ),\n 387 =>\n array(\n 'id' => 1727,\n 'co_prrq_asap' => '05',\n 'nombre' => 'SAN MIGUEL',\n 'municipio_id' => 192,\n 'co_stat_data' => 'A',\n ),\n 388 =>\n array(\n 'id' => 1932,\n 'co_prrq_asap' => '06',\n 'nombre' => 'TINTORERO',\n 'municipio_id' => 192,\n 'co_stat_data' => 'A',\n ),\n 389 =>\n array(\n 'id' => 1729,\n 'co_prrq_asap' => '02',\n 'nombre' => 'ANZOATEGUI',\n 'municipio_id' => 193,\n 'co_stat_data' => 'A',\n ),\n 390 =>\n array(\n 'id' => 1728,\n 'co_prrq_asap' => '01',\n 'nombre' => 'BOLIVAR',\n 'municipio_id' => 193,\n 'co_stat_data' => 'A',\n ),\n 391 =>\n array(\n 'id' => 1730,\n 'co_prrq_asap' => '03',\n 'nombre' => 'GUARICO',\n 'municipio_id' => 193,\n 'co_stat_data' => 'A',\n ),\n 392 =>\n array(\n 'id' => 1731,\n 'co_prrq_asap' => '04',\n 'nombre' => 'HILARIO LUNA Y LUNA',\n 'municipio_id' => 193,\n 'co_stat_data' => 'A',\n ),\n 393 =>\n array(\n 'id' => 1732,\n 'co_prrq_asap' => '05',\n 'nombre' => 'HUMOCARO ALTO',\n 'municipio_id' => 193,\n 'co_stat_data' => 'A',\n ),\n 394 =>\n array(\n 'id' => 1758,\n 'co_prrq_asap' => '06',\n 'nombre' => 'HUMOCARO BAJO',\n 'municipio_id' => 193,\n 'co_stat_data' => 'A',\n ),\n 395 =>\n array(\n 'id' => 1733,\n 'co_prrq_asap' => '07',\n 'nombre' => 'LA CANDELARIA',\n 'municipio_id' => 193,\n 'co_stat_data' => 'A',\n ),\n 396 =>\n array(\n 'id' => 1734,\n 'co_prrq_asap' => '08',\n 'nombre' => 'MORAN',\n 'municipio_id' => 193,\n 'co_stat_data' => 'A',\n ),\n 397 =>\n array(\n 'id' => 1935,\n 'co_prrq_asap' => '03',\n 'nombre' => 'AGUA VIVA',\n 'municipio_id' => 194,\n 'co_stat_data' => 'A',\n ),\n 398 =>\n array(\n 'id' => 1735,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CABUDARE',\n 'municipio_id' => 194,\n 'co_stat_data' => 'A',\n ),\n 399 =>\n array(\n 'id' => 1736,\n 'co_prrq_asap' => '02',\n 'nombre' => 'JOSE GREGORIO BASTIDAS',\n 'municipio_id' => 194,\n 'co_stat_data' => 'A',\n ),\n 400 =>\n array(\n 'id' => 1738,\n 'co_prrq_asap' => '02',\n 'nombre' => 'BURIA',\n 'municipio_id' => 195,\n 'co_stat_data' => 'A',\n ),\n 401 =>\n array(\n 'id' => 1759,\n 'co_prrq_asap' => '03',\n 'nombre' => 'GUSTAVO VEGAS LEON',\n 'municipio_id' => 195,\n 'co_stat_data' => 'A',\n ),\n 402 =>\n array(\n 'id' => 1737,\n 'co_prrq_asap' => '01',\n 'nombre' => 'SARARE',\n 'municipio_id' => 195,\n 'co_stat_data' => 'A',\n ),\n 403 =>\n array(\n 'id' => 1943,\n 'co_prrq_asap' => '17',\n 'nombre' => 'ALTAGRACIA',\n 'municipio_id' => 196,\n 'co_stat_data' => 'A',\n ),\n 404 =>\n array(\n 'id' => 1740,\n 'co_prrq_asap' => '02',\n 'nombre' => 'ANTONIO DIAZ',\n 'municipio_id' => 196,\n 'co_stat_data' => 'A',\n ),\n 405 =>\n array(\n 'id' => 1760,\n 'co_prrq_asap' => '03',\n 'nombre' => 'CAMACARO',\n 'municipio_id' => 196,\n 'co_stat_data' => 'A',\n ),\n 406 =>\n array(\n 'id' => 1741,\n 'co_prrq_asap' => '04',\n 'nombre' => 'CASTAÑEDA',\n 'municipio_id' => 196,\n 'co_stat_data' => 'A',\n ),\n 407 =>\n array(\n 'id' => 1742,\n 'co_prrq_asap' => '05',\n 'nombre' => 'CECILIO ZUBILLAGA',\n 'municipio_id' => 196,\n 'co_stat_data' => 'A',\n ),\n 408 =>\n array(\n 'id' => 1743,\n 'co_prrq_asap' => '06',\n 'nombre' => 'CHIQUINQUIRA',\n 'municipio_id' => 196,\n 'co_stat_data' => 'A',\n ),\n 409 =>\n array(\n 'id' => 1744,\n 'co_prrq_asap' => '07',\n 'nombre' => 'EL BLANCO',\n 'municipio_id' => 196,\n 'co_stat_data' => 'A',\n ),\n 410 =>\n array(\n 'id' => 1745,\n 'co_prrq_asap' => '08',\n 'nombre' => 'ESPINOZA DE LOS MONTEROS',\n 'municipio_id' => 196,\n 'co_stat_data' => 'A',\n ),\n 411 =>\n array(\n 'id' => 1938,\n 'co_prrq_asap' => '15',\n 'nombre' => 'HERIBERTO ARROYO',\n 'municipio_id' => 196,\n 'co_stat_data' => 'A',\n ),\n 412 =>\n array(\n 'id' => 1746,\n 'co_prrq_asap' => '09',\n 'nombre' => 'LARA',\n 'municipio_id' => 196,\n 'co_stat_data' => 'A',\n ),\n 413 =>\n array(\n 'id' => 1747,\n 'co_prrq_asap' => '10',\n 'nombre' => 'LAS MERCEDES',\n 'municipio_id' => 196,\n 'co_stat_data' => 'A',\n ),\n 414 =>\n array(\n 'id' => 1748,\n 'co_prrq_asap' => '11',\n 'nombre' => 'MANUEL MORILLO',\n 'municipio_id' => 196,\n 'co_stat_data' => 'A',\n ),\n 415 =>\n array(\n 'id' => 1749,\n 'co_prrq_asap' => '12',\n 'nombre' => 'MONTAÑA VERDE',\n 'municipio_id' => 196,\n 'co_stat_data' => 'A',\n ),\n 416 =>\n array(\n 'id' => 1750,\n 'co_prrq_asap' => '13',\n 'nombre' => 'MONTES DE OCA',\n 'municipio_id' => 196,\n 'co_stat_data' => 'A',\n ),\n 417 =>\n array(\n 'id' => 1941,\n 'co_prrq_asap' => '16',\n 'nombre' => 'REYES VARGAS',\n 'municipio_id' => 196,\n 'co_stat_data' => 'A',\n ),\n 418 =>\n array(\n 'id' => 1751,\n 'co_prrq_asap' => '14',\n 'nombre' => 'TORRES',\n 'municipio_id' => 196,\n 'co_stat_data' => 'A',\n ),\n 419 =>\n array(\n 'id' => 1739,\n 'co_prrq_asap' => '01',\n 'nombre' => 'TRINIDAD SAMUEL',\n 'municipio_id' => 196,\n 'co_stat_data' => 'A',\n ),\n 420 =>\n array(\n 'id' => 1753,\n 'co_prrq_asap' => '02',\n 'nombre' => 'MOROTURO',\n 'municipio_id' => 197,\n 'co_stat_data' => 'A',\n ),\n 421 =>\n array(\n 'id' => 1754,\n 'co_prrq_asap' => '03',\n 'nombre' => 'SAN MIGUEL',\n 'municipio_id' => 197,\n 'co_stat_data' => 'A',\n ),\n 422 =>\n array(\n 'id' => 1752,\n 'co_prrq_asap' => '01',\n 'nombre' => 'SIQUISIQUE',\n 'municipio_id' => 197,\n 'co_stat_data' => 'A',\n ),\n 423 =>\n array(\n 'id' => 1755,\n 'co_prrq_asap' => '04',\n 'nombre' => 'XAGUAS',\n 'municipio_id' => 197,\n 'co_stat_data' => 'A',\n ),\n 424 =>\n array(\n 'id' => 1761,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CACHAMAY',\n 'municipio_id' => 198,\n 'co_stat_data' => 'A',\n ),\n 425 =>\n array(\n 'id' => 1762,\n 'co_prrq_asap' => '02',\n 'nombre' => 'CHIRICA',\n 'municipio_id' => 198,\n 'co_stat_data' => 'A',\n ),\n 426 =>\n array(\n 'id' => 1763,\n 'co_prrq_asap' => '03',\n 'nombre' => 'DALLA COSTA',\n 'municipio_id' => 198,\n 'co_stat_data' => 'A',\n ),\n 427 =>\n array(\n 'id' => 1764,\n 'co_prrq_asap' => '04',\n 'nombre' => 'ONCE DE ABRIL',\n 'municipio_id' => 198,\n 'co_stat_data' => 'A',\n ),\n 428 =>\n array(\n 'id' => 1769,\n 'co_prrq_asap' => '09',\n 'nombre' => 'POZO VERDE',\n 'municipio_id' => 198,\n 'co_stat_data' => 'A',\n ),\n 429 =>\n array(\n 'id' => 1765,\n 'co_prrq_asap' => '05',\n 'nombre' => 'SIMON BOLIVAR',\n 'municipio_id' => 198,\n 'co_stat_data' => 'A',\n ),\n 430 =>\n array(\n 'id' => 1766,\n 'co_prrq_asap' => '06',\n 'nombre' => 'UNARE',\n 'municipio_id' => 198,\n 'co_stat_data' => 'A',\n ),\n 431 =>\n array(\n 'id' => 1767,\n 'co_prrq_asap' => '07',\n 'nombre' => 'UNIVERSIDAD',\n 'municipio_id' => 198,\n 'co_stat_data' => 'A',\n ),\n 432 =>\n array(\n 'id' => 1768,\n 'co_prrq_asap' => '08',\n 'nombre' => 'VISTA AL SOL',\n 'municipio_id' => 198,\n 'co_stat_data' => 'A',\n ),\n 433 =>\n array(\n 'id' => 1770,\n 'co_prrq_asap' => '10',\n 'nombre' => 'YOCOIMA',\n 'municipio_id' => 198,\n 'co_stat_data' => 'A',\n ),\n 434 =>\n array(\n 'id' => 1805,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL EL CALLAO',\n 'municipio_id' => 199,\n 'co_stat_data' => 'A',\n ),\n 435 =>\n array(\n 'id' => 1806,\n 'co_prrq_asap' => '02',\n 'nombre' => 'IKABARU',\n 'municipio_id' => 200,\n 'co_stat_data' => 'A',\n ),\n 436 =>\n array(\n 'id' => 1777,\n 'co_prrq_asap' => '01',\n 'nombre' => 'SECCION CAPITAL GRAN SABANA',\n 'municipio_id' => 200,\n 'co_stat_data' => 'A',\n ),\n 437 =>\n array(\n 'id' => 1778,\n 'co_prrq_asap' => '01',\n 'nombre' => 'AGUA SALADA',\n 'municipio_id' => 201,\n 'co_stat_data' => 'A',\n ),\n 438 =>\n array(\n 'id' => 1779,\n 'co_prrq_asap' => '02',\n 'nombre' => 'CATEDRAL',\n 'municipio_id' => 201,\n 'co_stat_data' => 'A',\n ),\n 439 =>\n array(\n 'id' => 1780,\n 'co_prrq_asap' => '03',\n 'nombre' => 'JOSE ANTONIO PAEZ',\n 'municipio_id' => 201,\n 'co_stat_data' => 'A',\n ),\n 440 =>\n array(\n 'id' => 1781,\n 'co_prrq_asap' => '04',\n 'nombre' => 'LA SABANITA',\n 'municipio_id' => 201,\n 'co_stat_data' => 'A',\n ),\n 441 =>\n array(\n 'id' => 1782,\n 'co_prrq_asap' => '05',\n 'nombre' => 'MARHUANTA',\n 'municipio_id' => 201,\n 'co_stat_data' => 'A',\n ),\n 442 =>\n array(\n 'id' => 1784,\n 'co_prrq_asap' => '07',\n 'nombre' => 'ORINOCO',\n 'municipio_id' => 201,\n 'co_stat_data' => 'A',\n ),\n 443 =>\n array(\n 'id' => 1785,\n 'co_prrq_asap' => '08',\n 'nombre' => 'PANAPANA',\n 'municipio_id' => 201,\n 'co_stat_data' => 'A',\n ),\n 444 =>\n array(\n 'id' => 1783,\n 'co_prrq_asap' => '06',\n 'nombre' => 'VISTA HERMOSA',\n 'municipio_id' => 201,\n 'co_stat_data' => 'A',\n ),\n 445 =>\n array(\n 'id' => 1786,\n 'co_prrq_asap' => '09',\n 'nombre' => 'ZEA',\n 'municipio_id' => 201,\n 'co_stat_data' => 'A',\n ),\n 446 =>\n array(\n 'id' => 1788,\n 'co_prrq_asap' => '02',\n 'nombre' => 'ANDRES ELOY BLANCO',\n 'municipio_id' => 202,\n 'co_stat_data' => 'A',\n ),\n 447 =>\n array(\n 'id' => 1787,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL PIAR',\n 'municipio_id' => 202,\n 'co_stat_data' => 'A',\n ),\n 448 =>\n array(\n 'id' => 1789,\n 'co_prrq_asap' => '03',\n 'nombre' => 'PEDRO COVA',\n 'municipio_id' => 202,\n 'co_stat_data' => 'A',\n ),\n 449 =>\n array(\n 'id' => 1791,\n 'co_prrq_asap' => '02',\n 'nombre' => 'BARCELONETA',\n 'municipio_id' => 203,\n 'co_stat_data' => 'A',\n ),\n 450 =>\n array(\n 'id' => 1790,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL RIO LEONI',\n 'municipio_id' => 203,\n 'co_stat_data' => 'A',\n ),\n 451 =>\n array(\n 'id' => 1792,\n 'co_prrq_asap' => '03',\n 'nombre' => 'SAN FRANCISCO',\n 'municipio_id' => 203,\n 'co_stat_data' => 'A',\n ),\n 452 =>\n array(\n 'id' => 1793,\n 'co_prrq_asap' => '04',\n 'nombre' => 'SANTA BARBARA',\n 'municipio_id' => 203,\n 'co_stat_data' => 'A',\n ),\n 453 =>\n array(\n 'id' => 1796,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL SIFONTES',\n 'municipio_id' => 204,\n 'co_stat_data' => 'A',\n ),\n 454 =>\n array(\n 'id' => 1797,\n 'co_prrq_asap' => '02',\n 'nombre' => 'DALLA COSTA',\n 'municipio_id' => 204,\n 'co_stat_data' => 'A',\n ),\n 455 =>\n array(\n 'id' => 1798,\n 'co_prrq_asap' => '03',\n 'nombre' => 'SAN ISIDRO',\n 'municipio_id' => 204,\n 'co_stat_data' => 'A',\n ),\n 456 =>\n array(\n 'id' => 1804,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL PADRE PEDRO CHIEN',\n 'municipio_id' => 205,\n 'co_stat_data' => 'A',\n ),\n 457 =>\n array(\n 'id' => 1772,\n 'co_prrq_asap' => '02',\n 'nombre' => 'ALTAGRACIA',\n 'municipio_id' => 206,\n 'co_stat_data' => 'A',\n ),\n 458 =>\n array(\n 'id' => 1773,\n 'co_prrq_asap' => '03',\n 'nombre' => 'ASCENCION FARRERAS',\n 'municipio_id' => 206,\n 'co_stat_data' => 'A',\n ),\n 459 =>\n array(\n 'id' => 1774,\n 'co_prrq_asap' => '04',\n 'nombre' => 'GUANIAMO',\n 'municipio_id' => 206,\n 'co_stat_data' => 'A',\n ),\n 460 =>\n array(\n 'id' => 1775,\n 'co_prrq_asap' => '05',\n 'nombre' => 'LA URBANA',\n 'municipio_id' => 206,\n 'co_stat_data' => 'A',\n ),\n 461 =>\n array(\n 'id' => 1776,\n 'co_prrq_asap' => '06',\n 'nombre' => 'PIJIGUAOS',\n 'municipio_id' => 206,\n 'co_stat_data' => 'A',\n ),\n 462 =>\n array(\n 'id' => 1771,\n 'co_prrq_asap' => '01',\n 'nombre' => 'SECCION CAPITAL CEDEÑO',\n 'municipio_id' => 206,\n 'co_stat_data' => 'A',\n ),\n 463 =>\n array(\n 'id' => 1794,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL ROSCIO',\n 'municipio_id' => 207,\n 'co_stat_data' => 'A',\n ),\n 464 =>\n array(\n 'id' => 1795,\n 'co_prrq_asap' => '02',\n 'nombre' => 'SALOM',\n 'municipio_id' => 207,\n 'co_stat_data' => 'A',\n ),\n 465 =>\n array(\n 'id' => 1800,\n 'co_prrq_asap' => '02',\n 'nombre' => 'ARIPAO',\n 'municipio_id' => 208,\n 'co_stat_data' => 'A',\n ),\n 466 =>\n array(\n 'id' => 1799,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL SUCRE',\n 'municipio_id' => 208,\n 'co_stat_data' => 'A',\n ),\n 467 =>\n array(\n 'id' => 1801,\n 'co_prrq_asap' => '03',\n 'nombre' => 'GUARATARO',\n 'municipio_id' => 208,\n 'co_stat_data' => 'A',\n ),\n 468 =>\n array(\n 'id' => 1802,\n 'co_prrq_asap' => '04',\n 'nombre' => 'LAS MAJADAS',\n 'municipio_id' => 208,\n 'co_stat_data' => 'A',\n ),\n 469 =>\n array(\n 'id' => 1803,\n 'co_prrq_asap' => '05',\n 'nombre' => 'MOITACO',\n 'municipio_id' => 208,\n 'co_stat_data' => 'A',\n ),\n 470 =>\n array(\n 'id' => 1808,\n 'co_prrq_asap' => '02',\n 'nombre' => 'NO URBANA CANOABO',\n 'municipio_id' => 209,\n 'co_stat_data' => 'A',\n ),\n 471 =>\n array(\n 'id' => 1809,\n 'co_prrq_asap' => '03',\n 'nombre' => 'NO URBANA SIMON BOLIVAR',\n 'municipio_id' => 209,\n 'co_stat_data' => 'A',\n ),\n 472 =>\n array(\n 'id' => 1807,\n 'co_prrq_asap' => '01',\n 'nombre' => 'URBANA BEJUMA',\n 'municipio_id' => 209,\n 'co_stat_data' => 'A',\n ),\n 473 =>\n array(\n 'id' => 1811,\n 'co_prrq_asap' => '02',\n 'nombre' => 'NO URBANA BELEN',\n 'municipio_id' => 210,\n 'co_stat_data' => 'A',\n ),\n 474 =>\n array(\n 'id' => 1812,\n 'co_prrq_asap' => '03',\n 'nombre' => 'NO URBANA TACARIGUA',\n 'municipio_id' => 210,\n 'co_stat_data' => 'A',\n ),\n 475 =>\n array(\n 'id' => 1810,\n 'co_prrq_asap' => '01',\n 'nombre' => 'URBANA GUIGUE',\n 'municipio_id' => 210,\n 'co_stat_data' => 'A',\n ),\n 476 =>\n array(\n 'id' => 1813,\n 'co_prrq_asap' => '01',\n 'nombre' => 'URBANA AGUAS CALIENTES',\n 'municipio_id' => 211,\n 'co_stat_data' => 'A',\n ),\n 477 =>\n array(\n 'id' => 1814,\n 'co_prrq_asap' => '02',\n 'nombre' => 'URBANA MARIARA',\n 'municipio_id' => 211,\n 'co_stat_data' => 'A',\n ),\n 478 =>\n array(\n 'id' => 1817,\n 'co_prrq_asap' => '03',\n 'nombre' => 'NO URBANA YAGUA',\n 'municipio_id' => 212,\n 'co_stat_data' => 'A',\n ),\n 479 =>\n array(\n 'id' => 1815,\n 'co_prrq_asap' => '01',\n 'nombre' => 'URBANA CIUDAD ALIANZA',\n 'municipio_id' => 212,\n 'co_stat_data' => 'A',\n ),\n 480 =>\n array(\n 'id' => 1816,\n 'co_prrq_asap' => '02',\n 'nombre' => 'URBANA GUACARA',\n 'municipio_id' => 212,\n 'co_stat_data' => 'A',\n ),\n 481 =>\n array(\n 'id' => 1819,\n 'co_prrq_asap' => '02',\n 'nombre' => 'NO URBANA URAMA',\n 'municipio_id' => 213,\n 'co_stat_data' => 'A',\n ),\n 482 =>\n array(\n 'id' => 1818,\n 'co_prrq_asap' => '01',\n 'nombre' => 'URBANA MORON',\n 'municipio_id' => 213,\n 'co_stat_data' => 'A',\n ),\n 483 =>\n array(\n 'id' => 1822,\n 'co_prrq_asap' => '01',\n 'nombre' => 'URBANA MIRANDA',\n 'municipio_id' => 214,\n 'co_stat_data' => 'A',\n ),\n 484 =>\n array(\n 'id' => 1823,\n 'co_prrq_asap' => '01',\n 'nombre' => 'URBANA MONTALBAN',\n 'municipio_id' => 215,\n 'co_stat_data' => 'A',\n ),\n 485 =>\n array(\n 'id' => 1830,\n 'co_prrq_asap' => '07',\n 'nombre' => 'NO URBANA BORBURATA',\n 'municipio_id' => 216,\n 'co_stat_data' => 'A',\n ),\n 486 =>\n array(\n 'id' => 1831,\n 'co_prrq_asap' => '08',\n 'nombre' => 'NO URBANA PATANEMO',\n 'municipio_id' => 216,\n 'co_stat_data' => 'A',\n ),\n 487 =>\n array(\n 'id' => 1825,\n 'co_prrq_asap' => '01',\n 'nombre' => 'URBANA BARTOLOME SALOM',\n 'municipio_id' => 216,\n 'co_stat_data' => 'A',\n ),\n 488 =>\n array(\n 'id' => 1826,\n 'co_prrq_asap' => '02',\n 'nombre' => 'URBANA DEMOCRACIA',\n 'municipio_id' => 216,\n 'co_stat_data' => 'A',\n ),\n 489 =>\n array(\n 'id' => 1843,\n 'co_prrq_asap' => '03',\n 'nombre' => 'URBANA FRATERNIDAD',\n 'municipio_id' => 216,\n 'co_stat_data' => 'A',\n ),\n 490 =>\n array(\n 'id' => 1827,\n 'co_prrq_asap' => '04',\n 'nombre' => 'URBANA GOAIGOAZA',\n 'municipio_id' => 216,\n 'co_stat_data' => 'A',\n ),\n 491 =>\n array(\n 'id' => 1828,\n 'co_prrq_asap' => '05',\n 'nombre' => 'URBANA JUAN JOSE FLORES',\n 'municipio_id' => 216,\n 'co_stat_data' => 'A',\n ),\n 492 =>\n array(\n 'id' => 1829,\n 'co_prrq_asap' => '06',\n 'nombre' => 'URBANA UNION',\n 'municipio_id' => 216,\n 'co_stat_data' => 'A',\n ),\n 493 =>\n array(\n 'id' => 1833,\n 'co_prrq_asap' => '01',\n 'nombre' => 'URBANA SAN JOAQUIN',\n 'municipio_id' => 217,\n 'co_stat_data' => 'A',\n ),\n 494 =>\n array(\n 'id' => 1821,\n 'co_prrq_asap' => '02',\n 'nombre' => 'URBANA INDEPENDENCIA',\n 'municipio_id' => 218,\n 'co_stat_data' => 'A',\n ),\n 495 =>\n array(\n 'id' => 1820,\n 'co_prrq_asap' => '01',\n 'nombre' => 'URBANA TOCUYITO',\n 'municipio_id' => 218,\n 'co_stat_data' => 'A',\n ),\n 496 =>\n array(\n 'id' => 1842,\n 'co_prrq_asap' => '01',\n 'nombre' => 'URBANA LOS GUAYOS',\n 'municipio_id' => 219,\n 'co_stat_data' => 'A',\n ),\n 497 =>\n array(\n 'id' => 1824,\n 'co_prrq_asap' => '01',\n 'nombre' => 'URBANA NAGUANAGUA',\n 'municipio_id' => 220,\n 'co_stat_data' => 'A',\n ),\n 498 =>\n array(\n 'id' => 1832,\n 'co_prrq_asap' => '01',\n 'nombre' => 'URBANA SAN DIEGO',\n 'municipio_id' => 221,\n 'co_stat_data' => 'A',\n ),\n 499 =>\n array(\n 'id' => 1841,\n 'co_prrq_asap' => '09',\n 'nombre' => 'NO URBANA NEGRO PRIMERO',\n 'municipio_id' => 222,\n 'co_stat_data' => 'A',\n ),\n 500 =>\n array(\n 'id' => 1834,\n 'co_prrq_asap' => '01',\n 'nombre' => 'URBANA CANDELARIA',\n 'municipio_id' => 222,\n 'co_stat_data' => 'A',\n ),\n 501 =>\n array(\n 'id' => 1835,\n 'co_prrq_asap' => '02',\n 'nombre' => 'URBANA CATEDRAL',\n 'municipio_id' => 222,\n 'co_stat_data' => 'A',\n ),\n 502 =>\n array(\n 'id' => 1836,\n 'co_prrq_asap' => '03',\n 'nombre' => 'URBANA EL SOCORRO',\n 'municipio_id' => 222,\n 'co_stat_data' => 'A',\n ),\n 503 =>\n array(\n 'id' => 1837,\n 'co_prrq_asap' => '04',\n 'nombre' => 'URBANA MIGUEL PEÑA',\n 'municipio_id' => 222,\n 'co_stat_data' => 'A',\n ),\n 504 =>\n array(\n 'id' => 1838,\n 'co_prrq_asap' => '05',\n 'nombre' => 'URBANA RAFAEL URDANETA',\n 'municipio_id' => 222,\n 'co_stat_data' => 'A',\n ),\n 505 =>\n array(\n 'id' => 1844,\n 'co_prrq_asap' => '06',\n 'nombre' => 'URBANA SAN BLAS',\n 'municipio_id' => 222,\n 'co_stat_data' => 'A',\n ),\n 506 =>\n array(\n 'id' => 1839,\n 'co_prrq_asap' => '07',\n 'nombre' => 'URBANA SAN JOSE',\n 'municipio_id' => 222,\n 'co_stat_data' => 'A',\n ),\n 507 =>\n array(\n 'id' => 1840,\n 'co_prrq_asap' => '08',\n 'nombre' => 'URBANA SANTA ROSA',\n 'municipio_id' => 222,\n 'co_stat_data' => 'A',\n ),\n 508 =>\n array(\n 'id' => 1896,\n 'co_prrq_asap' => '02',\n 'nombre' => 'BOLIVAR',\n 'municipio_id' => 223,\n 'co_stat_data' => 'A',\n ),\n 509 =>\n array(\n 'id' => 1895,\n 'co_prrq_asap' => '01',\n 'nombre' => 'GUATIRE',\n 'municipio_id' => 223,\n 'co_stat_data' => 'A',\n ),\n 510 =>\n array(\n 'id' => 1885,\n 'co_prrq_asap' => '01',\n 'nombre' => 'GUARENAS',\n 'municipio_id' => 224,\n 'co_stat_data' => 'A',\n ),\n 511 =>\n array(\n 'id' => 1889,\n 'co_prrq_asap' => '02',\n 'nombre' => 'CAUCAGUITA',\n 'municipio_id' => 225,\n 'co_stat_data' => 'A',\n ),\n 512 =>\n array(\n 'id' => 1890,\n 'co_prrq_asap' => '03',\n 'nombre' => 'FILAS DE MARICHES',\n 'municipio_id' => 225,\n 'co_stat_data' => 'A',\n ),\n 513 =>\n array(\n 'id' => 1891,\n 'co_prrq_asap' => '04',\n 'nombre' => 'LA DOLORITA',\n 'municipio_id' => 225,\n 'co_stat_data' => 'A',\n ),\n 514 =>\n array(\n 'id' => 1892,\n 'co_prrq_asap' => '05',\n 'nombre' => 'LEONCIO MARTINEZ',\n 'municipio_id' => 225,\n 'co_stat_data' => 'A',\n ),\n 515 =>\n array(\n 'id' => 1888,\n 'co_prrq_asap' => '01',\n 'nombre' => 'PETARE',\n 'municipio_id' => 225,\n 'co_stat_data' => 'A',\n ),\n 516 =>\n array(\n 'id' => 1878,\n 'co_prrq_asap' => '01',\n 'nombre' => 'SAN ANTONIO DE LOS ALTOS',\n 'municipio_id' => 226,\n 'co_stat_data' => 'A',\n ),\n 517 =>\n array(\n 'id' => 1846,\n 'co_prrq_asap' => '02',\n 'nombre' => 'ARAGUITA',\n 'municipio_id' => 227,\n 'co_stat_data' => 'A',\n ),\n 518 =>\n array(\n 'id' => 1847,\n 'co_prrq_asap' => '03',\n 'nombre' => 'AREVALO GONZALEZ',\n 'municipio_id' => 227,\n 'co_stat_data' => 'A',\n ),\n 519 =>\n array(\n 'id' => 1848,\n 'co_prrq_asap' => '04',\n 'nombre' => 'CAPAYA',\n 'municipio_id' => 227,\n 'co_stat_data' => 'A',\n ),\n 520 =>\n array(\n 'id' => 1845,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAUCAGUA',\n 'municipio_id' => 227,\n 'co_stat_data' => 'A',\n ),\n 521 =>\n array(\n 'id' => 1849,\n 'co_prrq_asap' => '05',\n 'nombre' => 'EL CAFE',\n 'municipio_id' => 227,\n 'co_stat_data' => 'A',\n ),\n 522 =>\n array(\n 'id' => 1850,\n 'co_prrq_asap' => '06',\n 'nombre' => 'MARIZAPA',\n 'municipio_id' => 227,\n 'co_stat_data' => 'A',\n ),\n 523 =>\n array(\n 'id' => 1851,\n 'co_prrq_asap' => '07',\n 'nombre' => 'PANAQUIRE',\n 'municipio_id' => 227,\n 'co_stat_data' => 'A',\n ),\n 524 =>\n array(\n 'id' => 1852,\n 'co_prrq_asap' => '08',\n 'nombre' => 'RIBAS',\n 'municipio_id' => 227,\n 'co_stat_data' => 'A',\n ),\n 525 =>\n array(\n 'id' => 1854,\n 'co_prrq_asap' => '02',\n 'nombre' => 'CUMBO',\n 'municipio_id' => 228,\n 'co_stat_data' => 'A',\n ),\n 526 =>\n array(\n 'id' => 1853,\n 'co_prrq_asap' => '01',\n 'nombre' => 'SAN JOSE DE BARLOVENTO',\n 'municipio_id' => 228,\n 'co_stat_data' => 'A',\n ),\n 527 =>\n array(\n 'id' => 1855,\n 'co_prrq_asap' => '01',\n 'nombre' => 'BARUTA',\n 'municipio_id' => 229,\n 'co_stat_data' => 'A',\n ),\n 528 =>\n array(\n 'id' => 1856,\n 'co_prrq_asap' => '02',\n 'nombre' => 'EL CAFETAL',\n 'municipio_id' => 229,\n 'co_stat_data' => 'A',\n ),\n 529 =>\n array(\n 'id' => 1857,\n 'co_prrq_asap' => '03',\n 'nombre' => 'LAS MINAS DE BARUTA',\n 'municipio_id' => 229,\n 'co_stat_data' => 'A',\n ),\n 530 =>\n array(\n 'id' => 1859,\n 'co_prrq_asap' => '02',\n 'nombre' => 'CURIEPE',\n 'municipio_id' => 230,\n 'co_stat_data' => 'A',\n ),\n 531 =>\n array(\n 'id' => 1858,\n 'co_prrq_asap' => '01',\n 'nombre' => 'HIGUEROTE',\n 'municipio_id' => 230,\n 'co_stat_data' => 'A',\n ),\n 532 =>\n array(\n 'id' => 1860,\n 'co_prrq_asap' => '03',\n 'nombre' => 'TACARIGUA',\n 'municipio_id' => 230,\n 'co_stat_data' => 'A',\n ),\n 533 =>\n array(\n 'id' => 1861,\n 'co_prrq_asap' => '01',\n 'nombre' => 'MAMPORAL',\n 'municipio_id' => 231,\n 'co_stat_data' => 'A',\n ),\n 534 =>\n array(\n 'id' => 1862,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CARRIZAL',\n 'municipio_id' => 232,\n 'co_stat_data' => 'A',\n ),\n 535 =>\n array(\n 'id' => 1863,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CHACAO',\n 'municipio_id' => 233,\n 'co_stat_data' => 'A',\n ),\n 536 =>\n array(\n 'id' => 1864,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CHARALLAVE',\n 'municipio_id' => 234,\n 'co_stat_data' => 'A',\n ),\n 537 =>\n array(\n 'id' => 1865,\n 'co_prrq_asap' => '02',\n 'nombre' => 'LAS BRISAS',\n 'municipio_id' => 234,\n 'co_stat_data' => 'A',\n ),\n 538 =>\n array(\n 'id' => 1866,\n 'co_prrq_asap' => '01',\n 'nombre' => 'EL HATILLO',\n 'municipio_id' => 235,\n 'co_stat_data' => 'A',\n ),\n 539 =>\n array(\n 'id' => 1868,\n 'co_prrq_asap' => '02',\n 'nombre' => 'ALTAGRACIA DE LA MONTAÑA',\n 'municipio_id' => 236,\n 'co_stat_data' => 'A',\n ),\n 540 =>\n array(\n 'id' => 1869,\n 'co_prrq_asap' => '03',\n 'nombre' => 'CECILIO ACOSTA',\n 'municipio_id' => 236,\n 'co_stat_data' => 'A',\n ),\n 541 =>\n array(\n 'id' => 1897,\n 'co_prrq_asap' => '04',\n 'nombre' => 'EL JARILLO',\n 'municipio_id' => 236,\n 'co_stat_data' => 'A',\n ),\n 542 =>\n array(\n 'id' => 1867,\n 'co_prrq_asap' => '01',\n 'nombre' => 'LOS TEQUES',\n 'municipio_id' => 236,\n 'co_stat_data' => 'A',\n ),\n 543 =>\n array(\n 'id' => 1870,\n 'co_prrq_asap' => '05',\n 'nombre' => 'PARACOTOS',\n 'municipio_id' => 236,\n 'co_stat_data' => 'A',\n ),\n 544 =>\n array(\n 'id' => 1871,\n 'co_prrq_asap' => '06',\n 'nombre' => 'SAN PEDRO',\n 'municipio_id' => 236,\n 'co_stat_data' => 'A',\n ),\n 545 =>\n array(\n 'id' => 1872,\n 'co_prrq_asap' => '07',\n 'nombre' => 'TACATA',\n 'municipio_id' => 236,\n 'co_stat_data' => 'A',\n ),\n 546 =>\n array(\n 'id' => 1874,\n 'co_prrq_asap' => '02',\n 'nombre' => 'EL CARTANAL',\n 'municipio_id' => 237,\n 'co_stat_data' => 'A',\n ),\n 547 =>\n array(\n 'id' => 1873,\n 'co_prrq_asap' => '01',\n 'nombre' => 'SANTA TERESA DEL TUY',\n 'municipio_id' => 237,\n 'co_stat_data' => 'A',\n ),\n 548 =>\n array(\n 'id' => 1876,\n 'co_prrq_asap' => '02',\n 'nombre' => 'LA DEMOCRACIA',\n 'municipio_id' => 238,\n 'co_stat_data' => 'A',\n ),\n 549 =>\n array(\n 'id' => 1875,\n 'co_prrq_asap' => '01',\n 'nombre' => 'OCUMARE DEL TUY',\n 'municipio_id' => 238,\n 'co_stat_data' => 'A',\n ),\n 550 =>\n array(\n 'id' => 1877,\n 'co_prrq_asap' => '03',\n 'nombre' => 'SANTA BARBARA',\n 'municipio_id' => 238,\n 'co_stat_data' => 'A',\n ),\n 551 =>\n array(\n 'id' => 1880,\n 'co_prrq_asap' => '02',\n 'nombre' => 'EL GUAPO',\n 'municipio_id' => 239,\n 'co_stat_data' => 'A',\n ),\n 552 =>\n array(\n 'id' => 1882,\n 'co_prrq_asap' => '04',\n 'nombre' => 'PAPARO',\n 'municipio_id' => 239,\n 'co_stat_data' => 'A',\n ),\n 553 =>\n array(\n 'id' => 1879,\n 'co_prrq_asap' => '01',\n 'nombre' => 'RIO CHICO',\n 'municipio_id' => 239,\n 'co_stat_data' => 'A',\n ),\n 554 =>\n array(\n 'id' => 1926,\n 'co_prrq_asap' => '05',\n 'nombre' => 'SAN FERNANDO DEL GUAPO',\n 'municipio_id' => 239,\n 'co_stat_data' => 'A',\n ),\n 555 =>\n array(\n 'id' => 1881,\n 'co_prrq_asap' => '03',\n 'nombre' => 'TACARIGUA DE LA LAGUNA',\n 'municipio_id' => 239,\n 'co_stat_data' => 'A',\n ),\n 556 =>\n array(\n 'id' => 1883,\n 'co_prrq_asap' => '01',\n 'nombre' => 'SANTA LUCIA',\n 'municipio_id' => 240,\n 'co_stat_data' => 'A',\n ),\n 557 =>\n array(\n 'id' => 1884,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CUPIRA',\n 'municipio_id' => 241,\n 'co_stat_data' => 'A',\n ),\n 558 =>\n array(\n 'id' => 1927,\n 'co_prrq_asap' => '02',\n 'nombre' => 'MACHURUCUTO',\n 'municipio_id' => 241,\n 'co_stat_data' => 'A',\n ),\n 559 =>\n array(\n 'id' => 1887,\n 'co_prrq_asap' => '02',\n 'nombre' => 'SAN ANTONIO DE YARE',\n 'municipio_id' => 242,\n 'co_stat_data' => 'A',\n ),\n 560 =>\n array(\n 'id' => 1886,\n 'co_prrq_asap' => '01',\n 'nombre' => 'SAN FRANCISCO DE YARE',\n 'municipio_id' => 242,\n 'co_stat_data' => 'A',\n ),\n 561 =>\n array(\n 'id' => 1893,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CUA',\n 'municipio_id' => 243,\n 'co_stat_data' => 'A',\n ),\n 562 =>\n array(\n 'id' => 1894,\n 'co_prrq_asap' => '02',\n 'nombre' => 'NUEVA CUA',\n 'municipio_id' => 243,\n 'co_stat_data' => 'A',\n ),\n 563 =>\n array(\n 'id' => 2191,\n 'co_prrq_asap' => '04',\n 'nombre' => 'ACEQUIAS',\n 'municipio_id' => 244,\n 'co_stat_data' => 'A',\n ),\n 564 =>\n array(\n 'id' => 2189,\n 'co_prrq_asap' => '01',\n 'nombre' => 'FERNANDEZ PEÑA',\n 'municipio_id' => 244,\n 'co_stat_data' => 'A',\n ),\n 565 =>\n array(\n 'id' => 2192,\n 'co_prrq_asap' => '05',\n 'nombre' => 'JAJI',\n 'municipio_id' => 244,\n 'co_stat_data' => 'A',\n ),\n 566 =>\n array(\n 'id' => 2193,\n 'co_prrq_asap' => '06',\n 'nombre' => 'LA MESA',\n 'municipio_id' => 244,\n 'co_stat_data' => 'A',\n ),\n 567 =>\n array(\n 'id' => 2190,\n 'co_prrq_asap' => '02',\n 'nombre' => 'MATRIZ',\n 'municipio_id' => 244,\n 'co_stat_data' => 'A',\n ),\n 568 =>\n array(\n 'id' => 1909,\n 'co_prrq_asap' => '03',\n 'nombre' => 'MONTALBAN',\n 'municipio_id' => 244,\n 'co_stat_data' => 'A',\n ),\n 569 =>\n array(\n 'id' => 2194,\n 'co_prrq_asap' => '07',\n 'nombre' => 'SAN JOSE DEL SUR',\n 'municipio_id' => 244,\n 'co_stat_data' => 'A',\n ),\n 570 =>\n array(\n 'id' => 1915,\n 'co_prrq_asap' => '01',\n 'nombre' => 'JUAN IGNACIO MONTILLA',\n 'municipio_id' => 245,\n 'co_stat_data' => 'A',\n ),\n 571 =>\n array(\n 'id' => 2431,\n 'co_prrq_asap' => '02',\n 'nombre' => 'LA BEATRIZ',\n 'municipio_id' => 245,\n 'co_stat_data' => 'A',\n ),\n 572 =>\n array(\n 'id' => 2433,\n 'co_prrq_asap' => '05',\n 'nombre' => 'LA PUERTA',\n 'municipio_id' => 245,\n 'co_stat_data' => 'A',\n ),\n 573 =>\n array(\n 'id' => 2434,\n 'co_prrq_asap' => '06',\n 'nombre' => 'MENDOZA',\n 'municipio_id' => 245,\n 'co_stat_data' => 'A',\n ),\n 574 =>\n array(\n 'id' => 1917,\n 'co_prrq_asap' => '03',\n 'nombre' => 'MERCEDES DIAZ',\n 'municipio_id' => 245,\n 'co_stat_data' => 'A',\n ),\n 575 =>\n array(\n 'id' => 2432,\n 'co_prrq_asap' => '04',\n 'nombre' => 'SAN LUIS',\n 'municipio_id' => 245,\n 'co_stat_data' => 'A',\n ),\n 576 =>\n array(\n 'id' => 1925,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL GUANARE',\n 'municipio_id' => 246,\n 'co_stat_data' => 'A',\n ),\n 577 =>\n array(\n 'id' => 2256,\n 'co_prrq_asap' => '02',\n 'nombre' => 'CORDOBA',\n 'municipio_id' => 246,\n 'co_stat_data' => 'A',\n ),\n 578 =>\n array(\n 'id' => 2257,\n 'co_prrq_asap' => '03',\n 'nombre' => 'SAN JOSE DE LA MONTAÑA',\n 'municipio_id' => 246,\n 'co_stat_data' => 'A',\n ),\n 579 =>\n array(\n 'id' => 2258,\n 'co_prrq_asap' => '04',\n 'nombre' => 'SAN JUAN DE GUANAGUANARE',\n 'municipio_id' => 246,\n 'co_stat_data' => 'A',\n ),\n 580 =>\n array(\n 'id' => 2259,\n 'co_prrq_asap' => '05',\n 'nombre' => 'VIRGEN DE LA COROMOTO',\n 'municipio_id' => 246,\n 'co_stat_data' => 'A',\n ),\n 581 =>\n array(\n 'id' => 1923,\n 'co_prrq_asap' => '01',\n 'nombre' => 'ANTONIO SPINETTI DINI',\n 'municipio_id' => 247,\n 'co_stat_data' => 'A',\n ),\n 582 =>\n array(\n 'id' => 1919,\n 'co_prrq_asap' => '02',\n 'nombre' => 'ARIAS',\n 'municipio_id' => 247,\n 'co_stat_data' => 'A',\n ),\n 583 =>\n array(\n 'id' => 2206,\n 'co_prrq_asap' => '03',\n 'nombre' => 'CARACCIOLO PARRA PEREZ',\n 'municipio_id' => 247,\n 'co_stat_data' => 'A',\n ),\n 584 =>\n array(\n 'id' => 2207,\n 'co_prrq_asap' => '04',\n 'nombre' => 'DOMINGO PEÑA',\n 'municipio_id' => 247,\n 'co_stat_data' => 'A',\n ),\n 585 =>\n array(\n 'id' => 2208,\n 'co_prrq_asap' => '05',\n 'nombre' => 'EL LLANO',\n 'municipio_id' => 247,\n 'co_stat_data' => 'A',\n ),\n 586 =>\n array(\n 'id' => 2216,\n 'co_prrq_asap' => '14',\n 'nombre' => 'EL MORRO',\n 'municipio_id' => 247,\n 'co_stat_data' => 'A',\n ),\n 587 =>\n array(\n 'id' => 2209,\n 'co_prrq_asap' => '06',\n 'nombre' => 'GONZALO PICON FEBRES',\n 'municipio_id' => 247,\n 'co_stat_data' => 'A',\n ),\n 588 =>\n array(\n 'id' => 2210,\n 'co_prrq_asap' => '07',\n 'nombre' => 'JACINTO PLAZA',\n 'municipio_id' => 247,\n 'co_stat_data' => 'A',\n ),\n 589 =>\n array(\n 'id' => 2211,\n 'co_prrq_asap' => '08',\n 'nombre' => 'JUAN RODRIGUEZ SUAREZ',\n 'municipio_id' => 247,\n 'co_stat_data' => 'A',\n ),\n 590 =>\n array(\n 'id' => 2212,\n 'co_prrq_asap' => '09',\n 'nombre' => 'LASSO DE LA VEGA',\n 'municipio_id' => 247,\n 'co_stat_data' => 'A',\n ),\n 591 =>\n array(\n 'id' => 2217,\n 'co_prrq_asap' => '15',\n 'nombre' => 'LOS NEVADOS',\n 'municipio_id' => 247,\n 'co_stat_data' => 'A',\n ),\n 592 =>\n array(\n 'id' => 2213,\n 'co_prrq_asap' => '10',\n 'nombre' => 'MARIANO PICON SALAS',\n 'municipio_id' => 247,\n 'co_stat_data' => 'A',\n ),\n 593 =>\n array(\n 'id' => 1922,\n 'co_prrq_asap' => '11',\n 'nombre' => 'MILLA',\n 'municipio_id' => 247,\n 'co_stat_data' => 'A',\n ),\n 594 =>\n array(\n 'id' => 2214,\n 'co_prrq_asap' => '12',\n 'nombre' => 'OSUNA RODRIGUEZ',\n 'municipio_id' => 247,\n 'co_stat_data' => 'A',\n ),\n 595 =>\n array(\n 'id' => 2215,\n 'co_prrq_asap' => '13',\n 'nombre' => 'SAGRARIO',\n 'municipio_id' => 247,\n 'co_stat_data' => 'A',\n ),\n 596 =>\n array(\n 'id' => 1950,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL PAEZ',\n 'municipio_id' => 248,\n 'co_stat_data' => 'A',\n ),\n 597 =>\n array(\n 'id' => 2267,\n 'co_prrq_asap' => '02',\n 'nombre' => 'PAYARA',\n 'municipio_id' => 248,\n 'co_stat_data' => 'A',\n ),\n 598 =>\n array(\n 'id' => 2268,\n 'co_prrq_asap' => '03',\n 'nombre' => 'PIMPINELA',\n 'municipio_id' => 248,\n 'co_stat_data' => 'A',\n ),\n 599 =>\n array(\n 'id' => 2512,\n 'co_prrq_asap' => '04',\n 'nombre' => 'RAMON PERAZA',\n 'municipio_id' => 248,\n 'co_stat_data' => 'A',\n ),\n 600 =>\n array(\n 'id' => 1951,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL ALTO ORINOCO',\n 'municipio_id' => 249,\n 'co_stat_data' => 'A',\n ),\n 601 =>\n array(\n 'id' => 1952,\n 'co_prrq_asap' => '02',\n 'nombre' => 'HUACHAMACARE',\n 'municipio_id' => 249,\n 'co_stat_data' => 'A',\n ),\n 602 =>\n array(\n 'id' => 1953,\n 'co_prrq_asap' => '03',\n 'nombre' => 'MARAWAKA',\n 'municipio_id' => 249,\n 'co_stat_data' => 'A',\n ),\n 603 =>\n array(\n 'id' => 1954,\n 'co_prrq_asap' => '04',\n 'nombre' => 'MAVACA',\n 'municipio_id' => 249,\n 'co_stat_data' => 'A',\n ),\n 604 =>\n array(\n 'id' => 2468,\n 'co_prrq_asap' => '05',\n 'nombre' => 'SIERRA PARIMA',\n 'municipio_id' => 249,\n 'co_stat_data' => 'A',\n ),\n 605 =>\n array(\n 'id' => 1957,\n 'co_prrq_asap' => '03',\n 'nombre' => 'CANAME',\n 'municipio_id' => 250,\n 'co_stat_data' => 'A',\n ),\n 606 =>\n array(\n 'id' => 1955,\n 'co_prrq_asap' => '01',\n 'nombre' => 'UCATA',\n 'municipio_id' => 250,\n 'co_stat_data' => 'A',\n ),\n 607 =>\n array(\n 'id' => 1956,\n 'co_prrq_asap' => '02',\n 'nombre' => 'YACAPANA',\n 'municipio_id' => 250,\n 'co_stat_data' => 'A',\n ),\n 608 =>\n array(\n 'id' => 1958,\n 'co_prrq_asap' => '01',\n 'nombre' => 'FERNANDO GIRON TOVAR',\n 'municipio_id' => 251,\n 'co_stat_data' => 'A',\n ),\n 609 =>\n array(\n 'id' => 1959,\n 'co_prrq_asap' => '02',\n 'nombre' => 'LUIS ALBERTO GOMEZ',\n 'municipio_id' => 251,\n 'co_stat_data' => 'A',\n ),\n 610 =>\n array(\n 'id' => 1960,\n 'co_prrq_asap' => '03',\n 'nombre' => 'PARHUEÑA',\n 'municipio_id' => 251,\n 'co_stat_data' => 'A',\n ),\n 611 =>\n array(\n 'id' => 1961,\n 'co_prrq_asap' => '04',\n 'nombre' => 'PLATANILLAL',\n 'municipio_id' => 251,\n 'co_stat_data' => 'A',\n ),\n 612 =>\n array(\n 'id' => 1965,\n 'co_prrq_asap' => '04',\n 'nombre' => 'GUAYAPO',\n 'municipio_id' => 252,\n 'co_stat_data' => 'A',\n ),\n 613 =>\n array(\n 'id' => 1964,\n 'co_prrq_asap' => '03',\n 'nombre' => 'MUNDUAPO',\n 'municipio_id' => 252,\n 'co_stat_data' => 'A',\n ),\n 614 =>\n array(\n 'id' => 1962,\n 'co_prrq_asap' => '01',\n 'nombre' => 'SAMARIAPO',\n 'municipio_id' => 252,\n 'co_stat_data' => 'A',\n ),\n 615 =>\n array(\n 'id' => 1963,\n 'co_prrq_asap' => '02',\n 'nombre' => 'SIPAPO',\n 'municipio_id' => 252,\n 'co_stat_data' => 'A',\n ),\n 616 =>\n array(\n 'id' => 1967,\n 'co_prrq_asap' => '02',\n 'nombre' => 'COMUNIDAD',\n 'municipio_id' => 253,\n 'co_stat_data' => 'A',\n ),\n 617 =>\n array(\n 'id' => 1966,\n 'co_prrq_asap' => '01',\n 'nombre' => 'VICTORINO',\n 'municipio_id' => 253,\n 'co_stat_data' => 'A',\n ),\n 618 =>\n array(\n 'id' => 1968,\n 'co_prrq_asap' => '01',\n 'nombre' => 'ALTO VENTUARI',\n 'municipio_id' => 254,\n 'co_stat_data' => 'A',\n ),\n 619 =>\n array(\n 'id' => 1970,\n 'co_prrq_asap' => '03',\n 'nombre' => 'BAJO VENTUARI',\n 'municipio_id' => 254,\n 'co_stat_data' => 'A',\n ),\n 620 =>\n array(\n 'id' => 1969,\n 'co_prrq_asap' => '02',\n 'nombre' => 'MEDIO VENTUARI',\n 'municipio_id' => 254,\n 'co_stat_data' => 'A',\n ),\n 621 =>\n array(\n 'id' => 1971,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL RIO NEGRO',\n 'municipio_id' => 255,\n 'co_stat_data' => 'A',\n ),\n 622 =>\n array(\n 'id' => 1973,\n 'co_prrq_asap' => '03',\n 'nombre' => 'CASIQUIARE',\n 'municipio_id' => 255,\n 'co_stat_data' => 'A',\n ),\n 623 =>\n array(\n 'id' => 2469,\n 'co_prrq_asap' => '04',\n 'nombre' => 'COCUY',\n 'municipio_id' => 255,\n 'co_stat_data' => 'A',\n ),\n 624 =>\n array(\n 'id' => 1972,\n 'co_prrq_asap' => '02',\n 'nombre' => 'SOLANO',\n 'municipio_id' => 255,\n 'co_stat_data' => 'A',\n ),\n 625 =>\n array(\n 'id' => 1975,\n 'co_prrq_asap' => '02',\n 'nombre' => 'APURITO',\n 'municipio_id' => 256,\n 'co_stat_data' => 'A',\n ),\n 626 =>\n array(\n 'id' => 1976,\n 'co_prrq_asap' => '03',\n 'nombre' => 'EL YAGUAL',\n 'municipio_id' => 256,\n 'co_stat_data' => 'A',\n ),\n 627 =>\n array(\n 'id' => 1977,\n 'co_prrq_asap' => '04',\n 'nombre' => 'GUACHARA',\n 'municipio_id' => 256,\n 'co_stat_data' => 'A',\n ),\n 628 =>\n array(\n 'id' => 1978,\n 'co_prrq_asap' => '05',\n 'nombre' => 'MUCURITAS',\n 'municipio_id' => 256,\n 'co_stat_data' => 'A',\n ),\n 629 =>\n array(\n 'id' => 1979,\n 'co_prrq_asap' => '06',\n 'nombre' => 'QUESERAS DEL MEDIO',\n 'municipio_id' => 256,\n 'co_stat_data' => 'A',\n ),\n 630 =>\n array(\n 'id' => 1974,\n 'co_prrq_asap' => '01',\n 'nombre' => 'URBANA ACHAGUAS',\n 'municipio_id' => 256,\n 'co_stat_data' => 'A',\n ),\n 631 =>\n array(\n 'id' => 1980,\n 'co_prrq_asap' => '01',\n 'nombre' => 'URBANA BIRUACA',\n 'municipio_id' => 257,\n 'co_stat_data' => 'A',\n ),\n 632 =>\n array(\n 'id' => 1982,\n 'co_prrq_asap' => '02',\n 'nombre' => 'MANTECAL',\n 'municipio_id' => 258,\n 'co_stat_data' => 'A',\n ),\n 633 =>\n array(\n 'id' => 1983,\n 'co_prrq_asap' => '03',\n 'nombre' => 'QUINTERO',\n 'municipio_id' => 258,\n 'co_stat_data' => 'A',\n ),\n 634 =>\n array(\n 'id' => 1984,\n 'co_prrq_asap' => '04',\n 'nombre' => 'RINCON HONDO',\n 'municipio_id' => 258,\n 'co_stat_data' => 'A',\n ),\n 635 =>\n array(\n 'id' => 1985,\n 'co_prrq_asap' => '05',\n 'nombre' => 'SAN VICENTE',\n 'municipio_id' => 258,\n 'co_stat_data' => 'A',\n ),\n 636 =>\n array(\n 'id' => 1981,\n 'co_prrq_asap' => '01',\n 'nombre' => 'URBANA BRUZUAL',\n 'municipio_id' => 258,\n 'co_stat_data' => 'A',\n ),\n 637 =>\n array(\n 'id' => 1987,\n 'co_prrq_asap' => '02',\n 'nombre' => 'ARAMENDI',\n 'municipio_id' => 259,\n 'co_stat_data' => 'A',\n ),\n 638 =>\n array(\n 'id' => 1988,\n 'co_prrq_asap' => '03',\n 'nombre' => 'EL AMPARO',\n 'municipio_id' => 259,\n 'co_stat_data' => 'A',\n ),\n 639 =>\n array(\n 'id' => 1989,\n 'co_prrq_asap' => '04',\n 'nombre' => 'SAN CAMILO',\n 'municipio_id' => 259,\n 'co_stat_data' => 'A',\n ),\n 640 =>\n array(\n 'id' => 1986,\n 'co_prrq_asap' => '01',\n 'nombre' => 'URBANA GUASDUALITO',\n 'municipio_id' => 259,\n 'co_stat_data' => 'A',\n ),\n 641 =>\n array(\n 'id' => 1990,\n 'co_prrq_asap' => '05',\n 'nombre' => 'URDANETA',\n 'municipio_id' => 259,\n 'co_stat_data' => 'A',\n ),\n 642 =>\n array(\n 'id' => 1992,\n 'co_prrq_asap' => '02',\n 'nombre' => 'CODAZZI',\n 'municipio_id' => 260,\n 'co_stat_data' => 'A',\n ),\n 643 =>\n array(\n 'id' => 1993,\n 'co_prrq_asap' => '03',\n 'nombre' => 'CUNAVICHE',\n 'municipio_id' => 260,\n 'co_stat_data' => 'A',\n ),\n 644 =>\n array(\n 'id' => 1991,\n 'co_prrq_asap' => '01',\n 'nombre' => 'UBNA SAN JUAN DE PAYARA',\n 'municipio_id' => 260,\n 'co_stat_data' => 'A',\n ),\n 645 =>\n array(\n 'id' => 1995,\n 'co_prrq_asap' => '02',\n 'nombre' => 'LA TRINIDAD',\n 'municipio_id' => 261,\n 'co_stat_data' => 'A',\n ),\n 646 =>\n array(\n 'id' => 1994,\n 'co_prrq_asap' => '01',\n 'nombre' => 'URBANA ELORZA',\n 'municipio_id' => 261,\n 'co_stat_data' => 'A',\n ),\n 647 =>\n array(\n 'id' => 1997,\n 'co_prrq_asap' => '02',\n 'nombre' => 'EL RECREO',\n 'municipio_id' => 262,\n 'co_stat_data' => 'A',\n ),\n 648 =>\n array(\n 'id' => 1998,\n 'co_prrq_asap' => '03',\n 'nombre' => 'PEÑALVER',\n 'municipio_id' => 262,\n 'co_stat_data' => 'A',\n ),\n 649 =>\n array(\n 'id' => 1999,\n 'co_prrq_asap' => '04',\n 'nombre' => 'SAN RAFAEL DE ATAMAICA',\n 'municipio_id' => 262,\n 'co_stat_data' => 'A',\n ),\n 650 =>\n array(\n 'id' => 1996,\n 'co_prrq_asap' => '01',\n 'nombre' => 'URBANA SAN FERNANDO',\n 'municipio_id' => 262,\n 'co_stat_data' => 'A',\n ),\n 651 =>\n array(\n 'id' => 2001,\n 'co_prrq_asap' => '02',\n 'nombre' => 'RODRIGUEZ DOMINGUEZ',\n 'municipio_id' => 263,\n 'co_stat_data' => 'A',\n ),\n 652 =>\n array(\n 'id' => 2000,\n 'co_prrq_asap' => '01',\n 'nombre' => 'SABANETA',\n 'municipio_id' => 263,\n 'co_stat_data' => 'A',\n ),\n 653 =>\n array(\n 'id' => 2003,\n 'co_prrq_asap' => '02',\n 'nombre' => 'ANDRES BELLO',\n 'municipio_id' => 264,\n 'co_stat_data' => 'A',\n ),\n 654 =>\n array(\n 'id' => 2004,\n 'co_prrq_asap' => '03',\n 'nombre' => 'NICOLAS PULIDO',\n 'municipio_id' => 264,\n 'co_stat_data' => 'A',\n ),\n 655 =>\n array(\n 'id' => 2002,\n 'co_prrq_asap' => '01',\n 'nombre' => 'TICOPORO',\n 'municipio_id' => 264,\n 'co_stat_data' => 'A',\n ),\n 656 =>\n array(\n 'id' => 2005,\n 'co_prrq_asap' => '01',\n 'nombre' => 'ARISMENDI',\n 'municipio_id' => 265,\n 'co_stat_data' => 'A',\n ),\n 657 =>\n array(\n 'id' => 2006,\n 'co_prrq_asap' => '02',\n 'nombre' => 'GUADARRAMA',\n 'municipio_id' => 265,\n 'co_stat_data' => 'A',\n ),\n 658 =>\n array(\n 'id' => 2007,\n 'co_prrq_asap' => '03',\n 'nombre' => 'LA UNION',\n 'municipio_id' => 265,\n 'co_stat_data' => 'A',\n ),\n 659 =>\n array(\n 'id' => 2008,\n 'co_prrq_asap' => '04',\n 'nombre' => 'SAN ANTONIO',\n 'municipio_id' => 265,\n 'co_stat_data' => 'A',\n ),\n 660 =>\n array(\n 'id' => 2010,\n 'co_prrq_asap' => '02',\n 'nombre' => 'ALFREDO ARVELO LARRIVA',\n 'municipio_id' => 266,\n 'co_stat_data' => 'A',\n ),\n 661 =>\n array(\n 'id' => 2019,\n 'co_prrq_asap' => '11',\n 'nombre' => 'ALTO BARINAS',\n 'municipio_id' => 266,\n 'co_stat_data' => 'A',\n ),\n 662 =>\n array(\n 'id' => 2009,\n 'co_prrq_asap' => '01',\n 'nombre' => 'BARINAS',\n 'municipio_id' => 266,\n 'co_stat_data' => 'A',\n ),\n 663 =>\n array(\n 'id' => 2017,\n 'co_prrq_asap' => '09',\n 'nombre' => 'CORAZON DE JESUS',\n 'municipio_id' => 266,\n 'co_stat_data' => 'A',\n ),\n 664 =>\n array(\n 'id' => 2022,\n 'co_prrq_asap' => '14',\n 'nombre' => 'DOMINGA ORTIZ DE PAEZ',\n 'municipio_id' => 266,\n 'co_stat_data' => 'A',\n ),\n 665 =>\n array(\n 'id' => 2015,\n 'co_prrq_asap' => '07',\n 'nombre' => 'EL CARMEN',\n 'municipio_id' => 266,\n 'co_stat_data' => 'A',\n ),\n 666 =>\n array(\n 'id' => 2021,\n 'co_prrq_asap' => '13',\n 'nombre' => 'JUAN ANTONIO RODRIGUEZ DOMINGU',\n 'municipio_id' => 266,\n 'co_stat_data' => 'A',\n ),\n 667 =>\n array(\n 'id' => 2020,\n 'co_prrq_asap' => '12',\n 'nombre' => 'MANUEL PALACIO FAJARDO',\n 'municipio_id' => 266,\n 'co_stat_data' => 'A',\n ),\n 668 =>\n array(\n 'id' => 2018,\n 'co_prrq_asap' => '10',\n 'nombre' => 'RAMON IGNACIO MENDEZ',\n 'municipio_id' => 266,\n 'co_stat_data' => 'A',\n ),\n 669 =>\n array(\n 'id' => 2016,\n 'co_prrq_asap' => '08',\n 'nombre' => 'ROMULO BETANCOURT',\n 'municipio_id' => 266,\n 'co_stat_data' => 'A',\n ),\n 670 =>\n array(\n 'id' => 2011,\n 'co_prrq_asap' => '03',\n 'nombre' => 'SAN SILVESTRE',\n 'municipio_id' => 266,\n 'co_stat_data' => 'A',\n ),\n 671 =>\n array(\n 'id' => 2012,\n 'co_prrq_asap' => '04',\n 'nombre' => 'SANTA INES',\n 'municipio_id' => 266,\n 'co_stat_data' => 'A',\n ),\n 672 =>\n array(\n 'id' => 2013,\n 'co_prrq_asap' => '05',\n 'nombre' => 'SANTA LUCIA',\n 'municipio_id' => 266,\n 'co_stat_data' => 'A',\n ),\n 673 =>\n array(\n 'id' => 2014,\n 'co_prrq_asap' => '06',\n 'nombre' => 'TORUNOS',\n 'municipio_id' => 266,\n 'co_stat_data' => 'A',\n ),\n 674 =>\n array(\n 'id' => 2024,\n 'co_prrq_asap' => '02',\n 'nombre' => 'ALTAMIRA',\n 'municipio_id' => 267,\n 'co_stat_data' => 'A',\n ),\n 675 =>\n array(\n 'id' => 2023,\n 'co_prrq_asap' => '01',\n 'nombre' => 'BARINITAS',\n 'municipio_id' => 267,\n 'co_stat_data' => 'A',\n ),\n 676 =>\n array(\n 'id' => 2025,\n 'co_prrq_asap' => '03',\n 'nombre' => 'CALDERAS',\n 'municipio_id' => 267,\n 'co_stat_data' => 'A',\n ),\n 677 =>\n array(\n 'id' => 2026,\n 'co_prrq_asap' => '01',\n 'nombre' => 'BARRANCAS',\n 'municipio_id' => 268,\n 'co_stat_data' => 'A',\n ),\n 678 =>\n array(\n 'id' => 2027,\n 'co_prrq_asap' => '02',\n 'nombre' => 'EL SOCORRO',\n 'municipio_id' => 268,\n 'co_stat_data' => 'A',\n ),\n 679 =>\n array(\n 'id' => 2028,\n 'co_prrq_asap' => '03',\n 'nombre' => 'MASPARRITO',\n 'municipio_id' => 268,\n 'co_stat_data' => 'A',\n ),\n 680 =>\n array(\n 'id' => 2030,\n 'co_prrq_asap' => '02',\n 'nombre' => 'JOSE IGNACIO DEL PUMAR',\n 'municipio_id' => 269,\n 'co_stat_data' => 'A',\n ),\n 681 =>\n array(\n 'id' => 2031,\n 'co_prrq_asap' => '03',\n 'nombre' => 'PEDRO BRICEÑO MENDEZ',\n 'municipio_id' => 269,\n 'co_stat_data' => 'A',\n ),\n 682 =>\n array(\n 'id' => 2032,\n 'co_prrq_asap' => '04',\n 'nombre' => 'RAMON IGNACIO MENDEZ',\n 'municipio_id' => 269,\n 'co_stat_data' => 'A',\n ),\n 683 =>\n array(\n 'id' => 2029,\n 'co_prrq_asap' => '01',\n 'nombre' => 'SANTA BARBARA',\n 'municipio_id' => 269,\n 'co_stat_data' => 'A',\n ),\n 684 =>\n array(\n 'id' => 2035,\n 'co_prrq_asap' => '02',\n 'nombre' => 'EL REAL',\n 'municipio_id' => 270,\n 'co_stat_data' => 'A',\n ),\n 685 =>\n array(\n 'id' => 2036,\n 'co_prrq_asap' => '03',\n 'nombre' => 'LA LUZ',\n 'municipio_id' => 270,\n 'co_stat_data' => 'A',\n ),\n 686 =>\n array(\n 'id' => 2037,\n 'co_prrq_asap' => '04',\n 'nombre' => 'LOS GUASIMITOS',\n 'municipio_id' => 270,\n 'co_stat_data' => 'A',\n ),\n 687 =>\n array(\n 'id' => 2034,\n 'co_prrq_asap' => '01',\n 'nombre' => 'OBISPOS',\n 'municipio_id' => 270,\n 'co_stat_data' => 'A',\n ),\n 688 =>\n array(\n 'id' => 2038,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CIUDAD BOLIVIA',\n 'municipio_id' => 271,\n 'co_stat_data' => 'A',\n ),\n 689 =>\n array(\n 'id' => 2039,\n 'co_prrq_asap' => '02',\n 'nombre' => 'IGNACIO BRICEÑO',\n 'municipio_id' => 271,\n 'co_stat_data' => 'A',\n ),\n 690 =>\n array(\n 'id' => 2040,\n 'co_prrq_asap' => '03',\n 'nombre' => 'JOSE FELIX RIBAS',\n 'municipio_id' => 271,\n 'co_stat_data' => 'A',\n ),\n 691 =>\n array(\n 'id' => 2041,\n 'co_prrq_asap' => '04',\n 'nombre' => 'PAEZ',\n 'municipio_id' => 271,\n 'co_stat_data' => 'A',\n ),\n 692 =>\n array(\n 'id' => 2043,\n 'co_prrq_asap' => '02',\n 'nombre' => 'DOLORES',\n 'municipio_id' => 272,\n 'co_stat_data' => 'A',\n ),\n 693 =>\n array(\n 'id' => 2042,\n 'co_prrq_asap' => '01',\n 'nombre' => 'LIBERTAD',\n 'municipio_id' => 272,\n 'co_stat_data' => 'A',\n ),\n 694 =>\n array(\n 'id' => 2044,\n 'co_prrq_asap' => '03',\n 'nombre' => 'PALACIOS FAJARDO',\n 'municipio_id' => 272,\n 'co_stat_data' => 'A',\n ),\n 695 =>\n array(\n 'id' => 2045,\n 'co_prrq_asap' => '04',\n 'nombre' => 'SANTA ROSA',\n 'municipio_id' => 272,\n 'co_stat_data' => 'A',\n ),\n 696 =>\n array(\n 'id' => 2046,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CIUDAD DE NUTRIAS',\n 'municipio_id' => 273,\n 'co_stat_data' => 'A',\n ),\n 697 =>\n array(\n 'id' => 2047,\n 'co_prrq_asap' => '02',\n 'nombre' => 'EL REGALO',\n 'municipio_id' => 273,\n 'co_stat_data' => 'A',\n ),\n 698 =>\n array(\n 'id' => 2048,\n 'co_prrq_asap' => '03',\n 'nombre' => 'PUERTO DE NUTRIAS',\n 'municipio_id' => 273,\n 'co_stat_data' => 'A',\n ),\n 699 =>\n array(\n 'id' => 2049,\n 'co_prrq_asap' => '04',\n 'nombre' => 'SANTA CATALINA',\n 'municipio_id' => 273,\n 'co_stat_data' => 'A',\n ),\n 700 =>\n array(\n 'id' => 2050,\n 'co_prrq_asap' => '01',\n 'nombre' => 'COJEDES',\n 'municipio_id' => 274,\n 'co_stat_data' => 'A',\n ),\n 701 =>\n array(\n 'id' => 2051,\n 'co_prrq_asap' => '02',\n 'nombre' => 'JUAN DE MATA SUAREZ',\n 'municipio_id' => 274,\n 'co_stat_data' => 'A',\n ),\n 702 =>\n array(\n 'id' => 2052,\n 'co_prrq_asap' => '01',\n 'nombre' => 'TINAQUILLO',\n 'municipio_id' => 275,\n 'co_stat_data' => 'A',\n ),\n 703 =>\n array(\n 'id' => 2053,\n 'co_prrq_asap' => '01',\n 'nombre' => 'EL BAUL',\n 'municipio_id' => 276,\n 'co_stat_data' => 'A',\n ),\n 704 =>\n array(\n 'id' => 2054,\n 'co_prrq_asap' => '02',\n 'nombre' => 'SUCRE',\n 'municipio_id' => 276,\n 'co_stat_data' => 'A',\n ),\n 705 =>\n array(\n 'id' => 2056,\n 'co_prrq_asap' => '02',\n 'nombre' => 'LA AGUADITA',\n 'municipio_id' => 277,\n 'co_stat_data' => 'A',\n ),\n 706 =>\n array(\n 'id' => 2055,\n 'co_prrq_asap' => '01',\n 'nombre' => 'MACAPO',\n 'municipio_id' => 277,\n 'co_stat_data' => 'A',\n ),\n 707 =>\n array(\n 'id' => 2057,\n 'co_prrq_asap' => '01',\n 'nombre' => 'EL PAO',\n 'municipio_id' => 278,\n 'co_stat_data' => 'A',\n ),\n 708 =>\n array(\n 'id' => 2059,\n 'co_prrq_asap' => '02',\n 'nombre' => 'EL AMPARO',\n 'municipio_id' => 279,\n 'co_stat_data' => 'A',\n ),\n 709 =>\n array(\n 'id' => 2058,\n 'co_prrq_asap' => '01',\n 'nombre' => 'LIBERTAD DE COJEDES',\n 'municipio_id' => 279,\n 'co_stat_data' => 'A',\n ),\n 710 =>\n array(\n 'id' => 2060,\n 'co_prrq_asap' => '01',\n 'nombre' => 'ROMULO GALLEGOS',\n 'municipio_id' => 280,\n 'co_stat_data' => 'A',\n ),\n 711 =>\n array(\n 'id' => 2062,\n 'co_prrq_asap' => '02',\n 'nombre' => 'JUAN ANGEL BRAVO',\n 'municipio_id' => 281,\n 'co_stat_data' => 'A',\n ),\n 712 =>\n array(\n 'id' => 2063,\n 'co_prrq_asap' => '03',\n 'nombre' => 'MANUEL MANRIQUE',\n 'municipio_id' => 281,\n 'co_stat_data' => 'A',\n ),\n 713 =>\n array(\n 'id' => 2061,\n 'co_prrq_asap' => '01',\n 'nombre' => 'SAN CARLOS DE AUSTRIA',\n 'municipio_id' => 281,\n 'co_stat_data' => 'A',\n ),\n 714 =>\n array(\n 'id' => 2064,\n 'co_prrq_asap' => '01',\n 'nombre' => 'GENERAL JOSE LAURENCIO SILVA',\n 'municipio_id' => 282,\n 'co_stat_data' => 'A',\n ),\n 715 =>\n array(\n 'id' => 2066,\n 'co_prrq_asap' => '02',\n 'nombre' => 'ALMIRANTE LUIS BRION',\n 'municipio_id' => 283,\n 'co_stat_data' => 'A',\n ),\n 716 =>\n array(\n 'id' => 2065,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CURIAPO',\n 'municipio_id' => 283,\n 'co_stat_data' => 'A',\n ),\n 717 =>\n array(\n 'id' => 2067,\n 'co_prrq_asap' => '03',\n 'nombre' => 'FRANCISCO ANICETO LUGO',\n 'municipio_id' => 283,\n 'co_stat_data' => 'A',\n ),\n 718 =>\n array(\n 'id' => 2068,\n 'co_prrq_asap' => '04',\n 'nombre' => 'MANUEL RENAUD',\n 'municipio_id' => 283,\n 'co_stat_data' => 'A',\n ),\n 719 =>\n array(\n 'id' => 2069,\n 'co_prrq_asap' => '05',\n 'nombre' => 'PADRE BARRAL',\n 'municipio_id' => 283,\n 'co_stat_data' => 'A',\n ),\n 720 =>\n array(\n 'id' => 2070,\n 'co_prrq_asap' => '06',\n 'nombre' => 'SANTOS DE ABELGAS',\n 'municipio_id' => 283,\n 'co_stat_data' => 'A',\n ),\n 721 =>\n array(\n 'id' => 2072,\n 'co_prrq_asap' => '02',\n 'nombre' => 'CINCO DE JULIO',\n 'municipio_id' => 284,\n 'co_stat_data' => 'A',\n ),\n 722 =>\n array(\n 'id' => 2071,\n 'co_prrq_asap' => '01',\n 'nombre' => 'IMATACA',\n 'municipio_id' => 284,\n 'co_stat_data' => 'A',\n ),\n 723 =>\n array(\n 'id' => 2073,\n 'co_prrq_asap' => '03',\n 'nombre' => 'JUAN BAUTISTA ARISMENDI',\n 'municipio_id' => 284,\n 'co_stat_data' => 'A',\n ),\n 724 =>\n array(\n 'id' => 2074,\n 'co_prrq_asap' => '04',\n 'nombre' => 'MANUEL PIAR',\n 'municipio_id' => 284,\n 'co_stat_data' => 'A',\n ),\n 725 =>\n array(\n 'id' => 2554,\n 'co_prrq_asap' => '05',\n 'nombre' => 'ROMULO GALLEGOS',\n 'municipio_id' => 284,\n 'co_stat_data' => 'A',\n ),\n 726 =>\n array(\n 'id' => 2077,\n 'co_prrq_asap' => '02',\n 'nombre' => 'LUIS BELTRAN PRIETO FIGUEROA',\n 'municipio_id' => 285,\n 'co_stat_data' => 'A',\n ),\n 727 =>\n array(\n 'id' => 2076,\n 'co_prrq_asap' => '01',\n 'nombre' => 'PEDERNALES',\n 'municipio_id' => 285,\n 'co_stat_data' => 'A',\n ),\n 728 =>\n array(\n 'id' => 2079,\n 'co_prrq_asap' => '02',\n 'nombre' => 'JOSE VIDAL MARCANO',\n 'municipio_id' => 286,\n 'co_stat_data' => 'A',\n ),\n 729 =>\n array(\n 'id' => 2080,\n 'co_prrq_asap' => '03',\n 'nombre' => 'JUAN MILLAN',\n 'municipio_id' => 286,\n 'co_stat_data' => 'A',\n ),\n 730 =>\n array(\n 'id' => 2081,\n 'co_prrq_asap' => '04',\n 'nombre' => 'LEONARDO RUIZ PINEDA',\n 'municipio_id' => 286,\n 'co_stat_data' => 'A',\n ),\n 731 =>\n array(\n 'id' => 2082,\n 'co_prrq_asap' => '05',\n 'nombre' => 'MARISCAL ANTONIO JOSE DE SUCRE',\n 'municipio_id' => 286,\n 'co_stat_data' => 'A',\n ),\n 732 =>\n array(\n 'id' => 2083,\n 'co_prrq_asap' => '06',\n 'nombre' => 'MONSEÑOR ARGIMIRO GARCIA',\n 'municipio_id' => 286,\n 'co_stat_data' => 'A',\n ),\n 733 =>\n array(\n 'id' => 2078,\n 'co_prrq_asap' => '01',\n 'nombre' => 'SAN JOSE',\n 'municipio_id' => 286,\n 'co_stat_data' => 'A',\n ),\n 734 =>\n array(\n 'id' => 2084,\n 'co_prrq_asap' => '07',\n 'nombre' => 'SAN RAFAEL',\n 'municipio_id' => 286,\n 'co_stat_data' => 'A',\n ),\n 735 =>\n array(\n 'id' => 2085,\n 'co_prrq_asap' => '08',\n 'nombre' => 'VIRGEN DEL VALLE',\n 'municipio_id' => 286,\n 'co_stat_data' => 'A',\n ),\n 736 =>\n array(\n 'id' => 2087,\n 'co_prrq_asap' => '02',\n 'nombre' => 'CAPADARE',\n 'municipio_id' => 287,\n 'co_stat_data' => 'A',\n ),\n 737 =>\n array(\n 'id' => 2088,\n 'co_prrq_asap' => '03',\n 'nombre' => 'LA PASTORA',\n 'municipio_id' => 287,\n 'co_stat_data' => 'A',\n ),\n 738 =>\n array(\n 'id' => 2089,\n 'co_prrq_asap' => '04',\n 'nombre' => 'LIBERTADOR',\n 'municipio_id' => 287,\n 'co_stat_data' => 'A',\n ),\n 739 =>\n array(\n 'id' => 2086,\n 'co_prrq_asap' => '01',\n 'nombre' => 'SAN JUAN DE LOS CAYOS',\n 'municipio_id' => 287,\n 'co_stat_data' => 'A',\n ),\n 740 =>\n array(\n 'id' => 2091,\n 'co_prrq_asap' => '02',\n 'nombre' => 'ARACUA',\n 'municipio_id' => 288,\n 'co_stat_data' => 'A',\n ),\n 741 =>\n array(\n 'id' => 2092,\n 'co_prrq_asap' => '03',\n 'nombre' => 'LA PEÑA',\n 'municipio_id' => 288,\n 'co_stat_data' => 'A',\n ),\n 742 =>\n array(\n 'id' => 2090,\n 'co_prrq_asap' => '01',\n 'nombre' => 'SAN LUIS',\n 'municipio_id' => 288,\n 'co_stat_data' => 'A',\n ),\n 743 =>\n array(\n 'id' => 2094,\n 'co_prrq_asap' => '02',\n 'nombre' => 'BARIRO',\n 'municipio_id' => 289,\n 'co_stat_data' => 'A',\n ),\n 744 =>\n array(\n 'id' => 2095,\n 'co_prrq_asap' => '03',\n 'nombre' => 'BOROJO',\n 'municipio_id' => 289,\n 'co_stat_data' => 'A',\n ),\n 745 =>\n array(\n 'id' => 2093,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPATARIDA',\n 'municipio_id' => 289,\n 'co_stat_data' => 'A',\n ),\n 746 =>\n array(\n 'id' => 2096,\n 'co_prrq_asap' => '04',\n 'nombre' => 'GUAJIRO',\n 'municipio_id' => 289,\n 'co_stat_data' => 'A',\n ),\n 747 =>\n array(\n 'id' => 2097,\n 'co_prrq_asap' => '05',\n 'nombre' => 'SEQUE',\n 'municipio_id' => 289,\n 'co_stat_data' => 'A',\n ),\n 748 =>\n array(\n 'id' => 2098,\n 'co_prrq_asap' => '06',\n 'nombre' => 'ZAZARIDA',\n 'municipio_id' => 289,\n 'co_stat_data' => 'A',\n ),\n 749 =>\n array(\n 'id' => 2099,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL CACIQUE MANAURE',\n 'municipio_id' => 290,\n 'co_stat_data' => 'A',\n ),\n 750 =>\n array(\n 'id' => 2100,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CARIRUBANA',\n 'municipio_id' => 291,\n 'co_stat_data' => 'A',\n ),\n 751 =>\n array(\n 'id' => 2101,\n 'co_prrq_asap' => '02',\n 'nombre' => 'NORTE',\n 'municipio_id' => 291,\n 'co_stat_data' => 'A',\n ),\n 752 =>\n array(\n 'id' => 2102,\n 'co_prrq_asap' => '03',\n 'nombre' => 'PUNTA CARDON',\n 'municipio_id' => 291,\n 'co_stat_data' => 'A',\n ),\n 753 =>\n array(\n 'id' => 2103,\n 'co_prrq_asap' => '04',\n 'nombre' => 'SANTA ANA',\n 'municipio_id' => 291,\n 'co_stat_data' => 'A',\n ),\n 754 =>\n array(\n 'id' => 2105,\n 'co_prrq_asap' => '02',\n 'nombre' => 'ACURIGUA',\n 'municipio_id' => 292,\n 'co_stat_data' => 'A',\n ),\n 755 =>\n array(\n 'id' => 2106,\n 'co_prrq_asap' => '03',\n 'nombre' => 'GUAIBACOA',\n 'municipio_id' => 292,\n 'co_stat_data' => 'A',\n ),\n 756 =>\n array(\n 'id' => 2104,\n 'co_prrq_asap' => '01',\n 'nombre' => 'LA VELA DE CORO',\n 'municipio_id' => 292,\n 'co_stat_data' => 'A',\n ),\n 757 =>\n array(\n 'id' => 2107,\n 'co_prrq_asap' => '04',\n 'nombre' => 'LAS CALDERAS',\n 'municipio_id' => 292,\n 'co_stat_data' => 'A',\n ),\n 758 =>\n array(\n 'id' => 2108,\n 'co_prrq_asap' => '05',\n 'nombre' => 'MACORUCA',\n 'municipio_id' => 292,\n 'co_stat_data' => 'A',\n ),\n 759 =>\n array(\n 'id' => 2109,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL DABAJURO',\n 'municipio_id' => 293,\n 'co_stat_data' => 'A',\n ),\n 760 =>\n array(\n 'id' => 2111,\n 'co_prrq_asap' => '02',\n 'nombre' => 'AGUA CLARA',\n 'municipio_id' => 294,\n 'co_stat_data' => 'A',\n ),\n 761 =>\n array(\n 'id' => 2112,\n 'co_prrq_asap' => '03',\n 'nombre' => 'AVARIA',\n 'municipio_id' => 294,\n 'co_stat_data' => 'A',\n ),\n 762 =>\n array(\n 'id' => 2110,\n 'co_prrq_asap' => '01',\n 'nombre' => 'PEDREGAL',\n 'municipio_id' => 294,\n 'co_stat_data' => 'A',\n ),\n 763 =>\n array(\n 'id' => 2113,\n 'co_prrq_asap' => '04',\n 'nombre' => 'PIEDRA GRANDE',\n 'municipio_id' => 294,\n 'co_stat_data' => 'A',\n ),\n 764 =>\n array(\n 'id' => 2114,\n 'co_prrq_asap' => '05',\n 'nombre' => 'PURURECHE',\n 'municipio_id' => 294,\n 'co_stat_data' => 'A',\n ),\n 765 =>\n array(\n 'id' => 2121,\n 'co_prrq_asap' => '07',\n 'nombre' => 'ADAURE',\n 'municipio_id' => 295,\n 'co_stat_data' => 'A',\n ),\n 766 =>\n array(\n 'id' => 2116,\n 'co_prrq_asap' => '02',\n 'nombre' => 'ADICORA',\n 'municipio_id' => 295,\n 'co_stat_data' => 'A',\n ),\n 767 =>\n array(\n 'id' => 2117,\n 'co_prrq_asap' => '03',\n 'nombre' => 'BARAIVED',\n 'municipio_id' => 295,\n 'co_stat_data' => 'A',\n ),\n 768 =>\n array(\n 'id' => 2118,\n 'co_prrq_asap' => '04',\n 'nombre' => 'BUENA VISTA',\n 'municipio_id' => 295,\n 'co_stat_data' => 'A',\n ),\n 769 =>\n array(\n 'id' => 2122,\n 'co_prrq_asap' => '08',\n 'nombre' => 'EL HATO',\n 'municipio_id' => 295,\n 'co_stat_data' => 'A',\n ),\n 770 =>\n array(\n 'id' => 2123,\n 'co_prrq_asap' => '09',\n 'nombre' => 'EL VINCULO',\n 'municipio_id' => 295,\n 'co_stat_data' => 'A',\n ),\n 771 =>\n array(\n 'id' => 2119,\n 'co_prrq_asap' => '05',\n 'nombre' => 'JADACAQUIVA',\n 'municipio_id' => 295,\n 'co_stat_data' => 'A',\n ),\n 772 =>\n array(\n 'id' => 2120,\n 'co_prrq_asap' => '06',\n 'nombre' => 'MORUY',\n 'municipio_id' => 295,\n 'co_stat_data' => 'A',\n ),\n 773 =>\n array(\n 'id' => 2115,\n 'co_prrq_asap' => '01',\n 'nombre' => 'PUEBLO NUEVO',\n 'municipio_id' => 295,\n 'co_stat_data' => 'A',\n ),\n 774 =>\n array(\n 'id' => 2125,\n 'co_prrq_asap' => '02',\n 'nombre' => 'AGUA LARGA',\n 'municipio_id' => 296,\n 'co_stat_data' => 'A',\n ),\n 775 =>\n array(\n 'id' => 2124,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CHURUGUARA',\n 'municipio_id' => 296,\n 'co_stat_data' => 'A',\n ),\n 776 =>\n array(\n 'id' => 2126,\n 'co_prrq_asap' => '03',\n 'nombre' => 'EL PAUJI',\n 'municipio_id' => 296,\n 'co_stat_data' => 'A',\n ),\n 777 =>\n array(\n 'id' => 2127,\n 'co_prrq_asap' => '04',\n 'nombre' => 'INDEPENDENCIA',\n 'municipio_id' => 296,\n 'co_stat_data' => 'A',\n ),\n 778 =>\n array(\n 'id' => 2128,\n 'co_prrq_asap' => '05',\n 'nombre' => 'MAPARARI',\n 'municipio_id' => 296,\n 'co_stat_data' => 'A',\n ),\n 779 =>\n array(\n 'id' => 2130,\n 'co_prrq_asap' => '02',\n 'nombre' => 'AGUA LINDA',\n 'municipio_id' => 297,\n 'co_stat_data' => 'A',\n ),\n 780 =>\n array(\n 'id' => 2131,\n 'co_prrq_asap' => '03',\n 'nombre' => 'ARAURIMA',\n 'municipio_id' => 297,\n 'co_stat_data' => 'A',\n ),\n 781 =>\n array(\n 'id' => 2129,\n 'co_prrq_asap' => '01',\n 'nombre' => 'JACURA',\n 'municipio_id' => 297,\n 'co_stat_data' => 'A',\n ),\n 782 =>\n array(\n 'id' => 2133,\n 'co_prrq_asap' => '02',\n 'nombre' => 'JUDIBANA',\n 'municipio_id' => 298,\n 'co_stat_data' => 'A',\n ),\n 783 =>\n array(\n 'id' => 2132,\n 'co_prrq_asap' => '01',\n 'nombre' => 'LOS TAQUES',\n 'municipio_id' => 298,\n 'co_stat_data' => 'A',\n ),\n 784 =>\n array(\n 'id' => 2135,\n 'co_prrq_asap' => '02',\n 'nombre' => 'CASIGUA',\n 'municipio_id' => 299,\n 'co_stat_data' => 'A',\n ),\n 785 =>\n array(\n 'id' => 2134,\n 'co_prrq_asap' => '01',\n 'nombre' => 'MENE DE MAUROA',\n 'municipio_id' => 299,\n 'co_stat_data' => 'A',\n ),\n 786 =>\n array(\n 'id' => 2136,\n 'co_prrq_asap' => '03',\n 'nombre' => 'SAN FELIX',\n 'municipio_id' => 299,\n 'co_stat_data' => 'A',\n ),\n 787 =>\n array(\n 'id' => 2140,\n 'co_prrq_asap' => '04',\n 'nombre' => 'GUZMAN GUILLERMO',\n 'municipio_id' => 300,\n 'co_stat_data' => 'A',\n ),\n 788 =>\n array(\n 'id' => 2141,\n 'co_prrq_asap' => '05',\n 'nombre' => 'MITARE',\n 'municipio_id' => 300,\n 'co_stat_data' => 'A',\n ),\n 789 =>\n array(\n 'id' => 2142,\n 'co_prrq_asap' => '06',\n 'nombre' => 'RIO SECO',\n 'municipio_id' => 300,\n 'co_stat_data' => 'A',\n ),\n 790 =>\n array(\n 'id' => 2143,\n 'co_prrq_asap' => '07',\n 'nombre' => 'SABANETA',\n 'municipio_id' => 300,\n 'co_stat_data' => 'A',\n ),\n 791 =>\n array(\n 'id' => 2137,\n 'co_prrq_asap' => '01',\n 'nombre' => 'SAN ANTONIO',\n 'municipio_id' => 300,\n 'co_stat_data' => 'A',\n ),\n 792 =>\n array(\n 'id' => 2138,\n 'co_prrq_asap' => '02',\n 'nombre' => 'SAN GABRIEL',\n 'municipio_id' => 300,\n 'co_stat_data' => 'A',\n ),\n 793 =>\n array(\n 'id' => 2139,\n 'co_prrq_asap' => '03',\n 'nombre' => 'SANTA ANA',\n 'municipio_id' => 300,\n 'co_stat_data' => 'A',\n ),\n 794 =>\n array(\n 'id' => 2145,\n 'co_prrq_asap' => '02',\n 'nombre' => 'BOCA DE TOCUYO',\n 'municipio_id' => 301,\n 'co_stat_data' => 'A',\n ),\n 795 =>\n array(\n 'id' => 2144,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CHICHIRIVICHE',\n 'municipio_id' => 301,\n 'co_stat_data' => 'A',\n ),\n 796 =>\n array(\n 'id' => 2146,\n 'co_prrq_asap' => '03',\n 'nombre' => 'TOCUYO DE LA COSTA',\n 'municipio_id' => 301,\n 'co_stat_data' => 'A',\n ),\n 797 =>\n array(\n 'id' => 2147,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL PALMASOLA',\n 'municipio_id' => 302,\n 'co_stat_data' => 'A',\n ),\n 798 =>\n array(\n 'id' => 2148,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CABURE',\n 'municipio_id' => 303,\n 'co_stat_data' => 'A',\n ),\n 799 =>\n array(\n 'id' => 2149,\n 'co_prrq_asap' => '02',\n 'nombre' => 'COLINA',\n 'municipio_id' => 303,\n 'co_stat_data' => 'A',\n ),\n 800 =>\n array(\n 'id' => 2150,\n 'co_prrq_asap' => '03',\n 'nombre' => 'CURIMAGUA',\n 'municipio_id' => 303,\n 'co_stat_data' => 'A',\n ),\n 801 =>\n array(\n 'id' => 2151,\n 'co_prrq_asap' => '01',\n 'nombre' => 'PIRITU',\n 'municipio_id' => 304,\n 'co_stat_data' => 'A',\n ),\n 802 =>\n array(\n 'id' => 2152,\n 'co_prrq_asap' => '02',\n 'nombre' => 'SAN JOSE DE LA COSTA',\n 'municipio_id' => 304,\n 'co_stat_data' => 'A',\n ),\n 803 =>\n array(\n 'id' => 2153,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL SAN FRANCISCO',\n 'municipio_id' => 305,\n 'co_stat_data' => 'A',\n ),\n 804 =>\n array(\n 'id' => 2155,\n 'co_prrq_asap' => '02',\n 'nombre' => 'BOCA DE AROA',\n 'municipio_id' => 306,\n 'co_stat_data' => 'A',\n ),\n 805 =>\n array(\n 'id' => 2154,\n 'co_prrq_asap' => '01',\n 'nombre' => 'TUCACAS',\n 'municipio_id' => 306,\n 'co_stat_data' => 'A',\n ),\n 806 =>\n array(\n 'id' => 2157,\n 'co_prrq_asap' => '02',\n 'nombre' => 'PECAYA',\n 'municipio_id' => 307,\n 'co_stat_data' => 'A',\n ),\n 807 =>\n array(\n 'id' => 2156,\n 'co_prrq_asap' => '01',\n 'nombre' => 'SUCRE',\n 'municipio_id' => 307,\n 'co_stat_data' => 'A',\n ),\n 808 =>\n array(\n 'id' => 2158,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL TOCOPERO',\n 'municipio_id' => 308,\n 'co_stat_data' => 'A',\n ),\n 809 =>\n array(\n 'id' => 2160,\n 'co_prrq_asap' => '02',\n 'nombre' => 'EL CHARAL',\n 'municipio_id' => 309,\n 'co_stat_data' => 'A',\n ),\n 810 =>\n array(\n 'id' => 2161,\n 'co_prrq_asap' => '03',\n 'nombre' => 'LAS VEGAS DEL TUY',\n 'municipio_id' => 309,\n 'co_stat_data' => 'A',\n ),\n 811 =>\n array(\n 'id' => 2159,\n 'co_prrq_asap' => '01',\n 'nombre' => 'SANTA CRUZ DE BUCARAL',\n 'municipio_id' => 309,\n 'co_stat_data' => 'A',\n ),\n 812 =>\n array(\n 'id' => 2163,\n 'co_prrq_asap' => '02',\n 'nombre' => 'BRUZUAL',\n 'municipio_id' => 310,\n 'co_stat_data' => 'A',\n ),\n 813 =>\n array(\n 'id' => 2162,\n 'co_prrq_asap' => '01',\n 'nombre' => 'URUMACO',\n 'municipio_id' => 310,\n 'co_stat_data' => 'A',\n ),\n 814 =>\n array(\n 'id' => 2165,\n 'co_prrq_asap' => '02',\n 'nombre' => 'LA CIENAGA',\n 'municipio_id' => 311,\n 'co_stat_data' => 'A',\n ),\n 815 =>\n array(\n 'id' => 2166,\n 'co_prrq_asap' => '03',\n 'nombre' => 'LA SOLEDAD',\n 'municipio_id' => 311,\n 'co_stat_data' => 'A',\n ),\n 816 =>\n array(\n 'id' => 2167,\n 'co_prrq_asap' => '04',\n 'nombre' => 'PUEBLO CUMAREBO',\n 'municipio_id' => 311,\n 'co_stat_data' => 'A',\n ),\n 817 =>\n array(\n 'id' => 2164,\n 'co_prrq_asap' => '01',\n 'nombre' => 'PUERTO CUMAREBO',\n 'municipio_id' => 311,\n 'co_stat_data' => 'A',\n ),\n 818 =>\n array(\n 'id' => 2168,\n 'co_prrq_asap' => '05',\n 'nombre' => 'ZAZARIDA',\n 'municipio_id' => 311,\n 'co_stat_data' => 'A',\n ),\n 819 =>\n array(\n 'id' => 2471,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL CAMAGUAN',\n 'municipio_id' => 312,\n 'co_stat_data' => 'A',\n ),\n 820 =>\n array(\n 'id' => 2472,\n 'co_prrq_asap' => '02',\n 'nombre' => 'PUERTO MIRANDA',\n 'municipio_id' => 312,\n 'co_stat_data' => 'A',\n ),\n 821 =>\n array(\n 'id' => 2473,\n 'co_prrq_asap' => '03',\n 'nombre' => 'UVERITO',\n 'municipio_id' => 312,\n 'co_stat_data' => 'A',\n ),\n 822 =>\n array(\n 'id' => 2474,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CHAGUARAMAS',\n 'municipio_id' => 313,\n 'co_stat_data' => 'A',\n ),\n 823 =>\n array(\n 'id' => 2475,\n 'co_prrq_asap' => '01',\n 'nombre' => 'EL SOCORRO',\n 'municipio_id' => 314,\n 'co_stat_data' => 'A',\n ),\n 824 =>\n array(\n 'id' => 2476,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL SAN GERONIMO DE GUAYABAL',\n 'municipio_id' => 315,\n 'co_stat_data' => 'A',\n ),\n 825 =>\n array(\n 'id' => 2477,\n 'co_prrq_asap' => '02',\n 'nombre' => 'CAZORLA',\n 'municipio_id' => 315,\n 'co_stat_data' => 'A',\n ),\n 826 =>\n array(\n 'id' => 2478,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL VALLE DE LA PASCUA',\n 'municipio_id' => 316,\n 'co_stat_data' => 'A',\n ),\n 827 =>\n array(\n 'id' => 2479,\n 'co_prrq_asap' => '02',\n 'nombre' => 'ESPINO',\n 'municipio_id' => 316,\n 'co_stat_data' => 'A',\n ),\n 828 =>\n array(\n 'id' => 2481,\n 'co_prrq_asap' => '02',\n 'nombre' => 'CABRUTA',\n 'municipio_id' => 317,\n 'co_stat_data' => 'A',\n ),\n 829 =>\n array(\n 'id' => 2480,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL LAS MERCEDES',\n 'municipio_id' => 317,\n 'co_stat_data' => 'A',\n ),\n 830 =>\n array(\n 'id' => 2482,\n 'co_prrq_asap' => '03',\n 'nombre' => 'SANTA RITA MANAPIRE',\n 'municipio_id' => 317,\n 'co_stat_data' => 'A',\n ),\n 831 =>\n array(\n 'id' => 2483,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL EL SOMBRERO',\n 'municipio_id' => 318,\n 'co_stat_data' => 'A',\n ),\n 832 =>\n array(\n 'id' => 2484,\n 'co_prrq_asap' => '02',\n 'nombre' => 'SOSA',\n 'municipio_id' => 318,\n 'co_stat_data' => 'A',\n ),\n 833 =>\n array(\n 'id' => 2485,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL CALABOZO',\n 'municipio_id' => 319,\n 'co_stat_data' => 'A',\n ),\n 834 =>\n array(\n 'id' => 2486,\n 'co_prrq_asap' => '02',\n 'nombre' => 'EL CALVARIO',\n 'municipio_id' => 319,\n 'co_stat_data' => 'A',\n ),\n 835 =>\n array(\n 'id' => 2487,\n 'co_prrq_asap' => '03',\n 'nombre' => 'EL RASTRO',\n 'municipio_id' => 319,\n 'co_stat_data' => 'A',\n ),\n 836 =>\n array(\n 'id' => 2488,\n 'co_prrq_asap' => '04',\n 'nombre' => 'GUARDATINAJAS',\n 'municipio_id' => 319,\n 'co_stat_data' => 'A',\n ),\n 837 =>\n array(\n 'id' => 2489,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL ALTAGRACIA DE ORITUCO',\n 'municipio_id' => 320,\n 'co_stat_data' => 'A',\n ),\n 838 =>\n array(\n 'id' => 2490,\n 'co_prrq_asap' => '02',\n 'nombre' => 'LEZAMA',\n 'municipio_id' => 320,\n 'co_stat_data' => 'A',\n ),\n 839 =>\n array(\n 'id' => 2491,\n 'co_prrq_asap' => '03',\n 'nombre' => 'LIBERTAD DE ORITUCO',\n 'municipio_id' => 320,\n 'co_stat_data' => 'A',\n ),\n 840 =>\n array(\n 'id' => 2492,\n 'co_prrq_asap' => '04',\n 'nombre' => 'PASO REAL DE MACAIRA',\n 'municipio_id' => 320,\n 'co_stat_data' => 'A',\n ),\n 841 =>\n array(\n 'id' => 2493,\n 'co_prrq_asap' => '05',\n 'nombre' => 'SAN FRANCISCO DE MACAIRA',\n 'municipio_id' => 320,\n 'co_stat_data' => 'A',\n ),\n 842 =>\n array(\n 'id' => 2494,\n 'co_prrq_asap' => '06',\n 'nombre' => 'SAN RAFAEL DE ORITUCO',\n 'municipio_id' => 320,\n 'co_stat_data' => 'A',\n ),\n 843 =>\n array(\n 'id' => 2495,\n 'co_prrq_asap' => '07',\n 'nombre' => 'SOUBLETTE',\n 'municipio_id' => 320,\n 'co_stat_data' => 'A',\n ),\n 844 =>\n array(\n 'id' => 2496,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL ORTIZ',\n 'municipio_id' => 321,\n 'co_stat_data' => 'A',\n ),\n 845 =>\n array(\n 'id' => 2497,\n 'co_prrq_asap' => '02',\n 'nombre' => 'SAN FRANCISCO DE TIZNADOS',\n 'municipio_id' => 321,\n 'co_stat_data' => 'A',\n ),\n 846 =>\n array(\n 'id' => 2498,\n 'co_prrq_asap' => '03',\n 'nombre' => 'SAN JOSE DE TIZNADOS',\n 'municipio_id' => 321,\n 'co_stat_data' => 'A',\n ),\n 847 =>\n array(\n 'id' => 2499,\n 'co_prrq_asap' => '04',\n 'nombre' => 'SAN LORENZO DE TIZNADOS',\n 'municipio_id' => 321,\n 'co_stat_data' => 'A',\n ),\n 848 =>\n array(\n 'id' => 2500,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL TUCUPIDO',\n 'municipio_id' => 322,\n 'co_stat_data' => 'A',\n ),\n 849 =>\n array(\n 'id' => 2501,\n 'co_prrq_asap' => '02',\n 'nombre' => 'SAN RAFAEL DE LAYA',\n 'municipio_id' => 322,\n 'co_stat_data' => 'A',\n ),\n 850 =>\n array(\n 'id' => 2503,\n 'co_prrq_asap' => '02',\n 'nombre' => 'CANTAGALLO',\n 'municipio_id' => 323,\n 'co_stat_data' => 'A',\n ),\n 851 =>\n array(\n 'id' => 2502,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL SAN JUAN DE LOS MORROS',\n 'municipio_id' => 323,\n 'co_stat_data' => 'A',\n ),\n 852 =>\n array(\n 'id' => 2504,\n 'co_prrq_asap' => '03',\n 'nombre' => 'PARAPARA',\n 'municipio_id' => 323,\n 'co_stat_data' => 'A',\n ),\n 853 =>\n array(\n 'id' => 2505,\n 'co_prrq_asap' => '01',\n 'nombre' => 'SAN JOSE DE GUARIBE',\n 'municipio_id' => 324,\n 'co_stat_data' => 'A',\n ),\n 854 =>\n array(\n 'id' => 2507,\n 'co_prrq_asap' => '02',\n 'nombre' => 'ALTAMIRA',\n 'municipio_id' => 325,\n 'co_stat_data' => 'A',\n ),\n 855 =>\n array(\n 'id' => 2506,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL SANTA MARIA DE IPIRE',\n 'municipio_id' => 325,\n 'co_stat_data' => 'A',\n ),\n 856 =>\n array(\n 'id' => 2508,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL ZARAZA',\n 'municipio_id' => 326,\n 'co_stat_data' => 'A',\n ),\n 857 =>\n array(\n 'id' => 2509,\n 'co_prrq_asap' => '02',\n 'nombre' => 'SAN JOSE DE UNARE',\n 'municipio_id' => 326,\n 'co_stat_data' => 'A',\n ),\n 858 =>\n array(\n 'id' => 2172,\n 'co_prrq_asap' => '04',\n 'nombre' => 'GABRIEL PICON GONZALEZ',\n 'municipio_id' => 327,\n 'co_stat_data' => 'A',\n ),\n 859 =>\n array(\n 'id' => 2173,\n 'co_prrq_asap' => '05',\n 'nombre' => 'HECTOR AMABLE MORA',\n 'municipio_id' => 327,\n 'co_stat_data' => 'A',\n ),\n 860 =>\n array(\n 'id' => 2174,\n 'co_prrq_asap' => '06',\n 'nombre' => 'JOSE NUCETE SARDI',\n 'municipio_id' => 327,\n 'co_stat_data' => 'A',\n ),\n 861 =>\n array(\n 'id' => 2169,\n 'co_prrq_asap' => '01',\n 'nombre' => 'PRESIDENTE BETANCOURT',\n 'municipio_id' => 327,\n 'co_stat_data' => 'A',\n ),\n 862 =>\n array(\n 'id' => 2170,\n 'co_prrq_asap' => '02',\n 'nombre' => 'PRESIDENTE PAEZ',\n 'municipio_id' => 327,\n 'co_stat_data' => 'A',\n ),\n 863 =>\n array(\n 'id' => 2171,\n 'co_prrq_asap' => '03',\n 'nombre' => 'PRESIDENTE ROMULO GALLEGOS',\n 'municipio_id' => 327,\n 'co_stat_data' => 'A',\n ),\n 864 =>\n array(\n 'id' => 2175,\n 'co_prrq_asap' => '07',\n 'nombre' => 'PULIDO MENDEZ',\n 'municipio_id' => 327,\n 'co_stat_data' => 'A',\n ),\n 865 =>\n array(\n 'id' => 2176,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL ANDRES BELLO',\n 'municipio_id' => 328,\n 'co_stat_data' => 'A',\n ),\n 866 =>\n array(\n 'id' => 2177,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL ANTONIO PINTO SALINAS',\n 'municipio_id' => 329,\n 'co_stat_data' => 'A',\n ),\n 867 =>\n array(\n 'id' => 2178,\n 'co_prrq_asap' => '02',\n 'nombre' => 'MESA BOLIVAR',\n 'municipio_id' => 329,\n 'co_stat_data' => 'A',\n ),\n 868 =>\n array(\n 'id' => 2179,\n 'co_prrq_asap' => '03',\n 'nombre' => 'MESA DE LAS PALMAS',\n 'municipio_id' => 329,\n 'co_stat_data' => 'A',\n ),\n 869 =>\n array(\n 'id' => 2180,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL ARICAGUA',\n 'municipio_id' => 330,\n 'co_stat_data' => 'A',\n ),\n 870 =>\n array(\n 'id' => 2181,\n 'co_prrq_asap' => '02',\n 'nombre' => 'SAN ANTONIO',\n 'municipio_id' => 330,\n 'co_stat_data' => 'A',\n ),\n 871 =>\n array(\n 'id' => 2182,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL ARZOBISPO CHACON',\n 'municipio_id' => 331,\n 'co_stat_data' => 'A',\n ),\n 872 =>\n array(\n 'id' => 2183,\n 'co_prrq_asap' => '02',\n 'nombre' => 'CAPURI',\n 'municipio_id' => 331,\n 'co_stat_data' => 'A',\n ),\n 873 =>\n array(\n 'id' => 2184,\n 'co_prrq_asap' => '03',\n 'nombre' => 'CHACANTA',\n 'municipio_id' => 331,\n 'co_stat_data' => 'A',\n ),\n 874 =>\n array(\n 'id' => 2185,\n 'co_prrq_asap' => '04',\n 'nombre' => 'EL MOLINO',\n 'municipio_id' => 331,\n 'co_stat_data' => 'A',\n ),\n 875 =>\n array(\n 'id' => 2186,\n 'co_prrq_asap' => '05',\n 'nombre' => 'GUAIMARAL',\n 'municipio_id' => 331,\n 'co_stat_data' => 'A',\n ),\n 876 =>\n array(\n 'id' => 2188,\n 'co_prrq_asap' => '07',\n 'nombre' => 'MUCUCHACHI',\n 'municipio_id' => 331,\n 'co_stat_data' => 'A',\n ),\n 877 =>\n array(\n 'id' => 2187,\n 'co_prrq_asap' => '06',\n 'nombre' => 'MUCUTUY',\n 'municipio_id' => 331,\n 'co_stat_data' => 'A',\n ),\n 878 =>\n array(\n 'id' => 2195,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL CARACCIOLO PARRA OLMEDO',\n 'municipio_id' => 332,\n 'co_stat_data' => 'A',\n ),\n 879 =>\n array(\n 'id' => 2196,\n 'co_prrq_asap' => '02',\n 'nombre' => 'FLORENCIO RAMIREZ',\n 'municipio_id' => 332,\n 'co_stat_data' => 'A',\n ),\n 880 =>\n array(\n 'id' => 2197,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL CARDENAL QUINTERO',\n 'municipio_id' => 333,\n 'co_stat_data' => 'A',\n ),\n 881 =>\n array(\n 'id' => 2198,\n 'co_prrq_asap' => '02',\n 'nombre' => 'LAS PIEDRAS',\n 'municipio_id' => 333,\n 'co_stat_data' => 'A',\n ),\n 882 =>\n array(\n 'id' => 2199,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL GUARAQUE',\n 'municipio_id' => 334,\n 'co_stat_data' => 'A',\n ),\n 883 =>\n array(\n 'id' => 2200,\n 'co_prrq_asap' => '02',\n 'nombre' => 'MESA DE QUINTERO',\n 'municipio_id' => 334,\n 'co_stat_data' => 'A',\n ),\n 884 =>\n array(\n 'id' => 2201,\n 'co_prrq_asap' => '03',\n 'nombre' => 'RIO NEGRO',\n 'municipio_id' => 334,\n 'co_stat_data' => 'A',\n ),\n 885 =>\n array(\n 'id' => 2202,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL JULIO CESAR SALAS',\n 'municipio_id' => 335,\n 'co_stat_data' => 'A',\n ),\n 886 =>\n array(\n 'id' => 2203,\n 'co_prrq_asap' => '02',\n 'nombre' => 'PALMIRA',\n 'municipio_id' => 335,\n 'co_stat_data' => 'A',\n ),\n 887 =>\n array(\n 'id' => 2204,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL JUSTO BRICEÑO',\n 'municipio_id' => 336,\n 'co_stat_data' => 'A',\n ),\n 888 =>\n array(\n 'id' => 2205,\n 'co_prrq_asap' => '02',\n 'nombre' => 'SAN CRISTOBAL DE TORONDOY',\n 'municipio_id' => 336,\n 'co_stat_data' => 'A',\n ),\n 889 =>\n array(\n 'id' => 2219,\n 'co_prrq_asap' => '02',\n 'nombre' => 'ANDRES ELOY BLANCO',\n 'municipio_id' => 337,\n 'co_stat_data' => 'A',\n ),\n 890 =>\n array(\n 'id' => 2218,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL MIRANDA',\n 'municipio_id' => 337,\n 'co_stat_data' => 'A',\n ),\n 891 =>\n array(\n 'id' => 2220,\n 'co_prrq_asap' => '03',\n 'nombre' => 'LA VENTA',\n 'municipio_id' => 337,\n 'co_stat_data' => 'A',\n ),\n 892 =>\n array(\n 'id' => 2221,\n 'co_prrq_asap' => '04',\n 'nombre' => 'PIÑANGO',\n 'municipio_id' => 337,\n 'co_stat_data' => 'A',\n ),\n 893 =>\n array(\n 'id' => 2222,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL OBISPO RAMOS DE LORA',\n 'municipio_id' => 338,\n 'co_stat_data' => 'A',\n ),\n 894 =>\n array(\n 'id' => 2223,\n 'co_prrq_asap' => '02',\n 'nombre' => 'ELOY PAREDES',\n 'municipio_id' => 338,\n 'co_stat_data' => 'A',\n ),\n 895 =>\n array(\n 'id' => 2224,\n 'co_prrq_asap' => '03',\n 'nombre' => 'SAN RAFAEL DE ALCAZAR',\n 'municipio_id' => 338,\n 'co_stat_data' => 'A',\n ),\n 896 =>\n array(\n 'id' => 2225,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL PADRE NOGUERA',\n 'municipio_id' => 339,\n 'co_stat_data' => 'A',\n ),\n 897 =>\n array(\n 'id' => 2226,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL PUEBLO LLANO',\n 'municipio_id' => 340,\n 'co_stat_data' => 'A',\n ),\n 898 =>\n array(\n 'id' => 2228,\n 'co_prrq_asap' => '02',\n 'nombre' => 'CACUTE',\n 'municipio_id' => 341,\n 'co_stat_data' => 'A',\n ),\n 899 =>\n array(\n 'id' => 2227,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL RANGEL',\n 'municipio_id' => 341,\n 'co_stat_data' => 'A',\n ),\n 900 =>\n array(\n 'id' => 2229,\n 'co_prrq_asap' => '03',\n 'nombre' => 'LA TOMA',\n 'municipio_id' => 341,\n 'co_stat_data' => 'A',\n ),\n 901 =>\n array(\n 'id' => 2230,\n 'co_prrq_asap' => '04',\n 'nombre' => 'MUCURUBA',\n 'municipio_id' => 341,\n 'co_stat_data' => 'A',\n ),\n 902 =>\n array(\n 'id' => 2231,\n 'co_prrq_asap' => '05',\n 'nombre' => 'SAN RAFAEL',\n 'municipio_id' => 341,\n 'co_stat_data' => 'A',\n ),\n 903 =>\n array(\n 'id' => 2232,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL RIVAS DAVILA',\n 'municipio_id' => 342,\n 'co_stat_data' => 'A',\n ),\n 904 =>\n array(\n 'id' => 2233,\n 'co_prrq_asap' => '02',\n 'nombre' => 'GERONIMO MALDONADO',\n 'municipio_id' => 342,\n 'co_stat_data' => 'A',\n ),\n 905 =>\n array(\n 'id' => 2234,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL SANTOS MARQUINA',\n 'municipio_id' => 343,\n 'co_stat_data' => 'A',\n ),\n 906 =>\n array(\n 'id' => 2235,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL SUCRE',\n 'municipio_id' => 344,\n 'co_stat_data' => 'A',\n ),\n 907 =>\n array(\n 'id' => 2236,\n 'co_prrq_asap' => '02',\n 'nombre' => 'CHIGUARA',\n 'municipio_id' => 344,\n 'co_stat_data' => 'A',\n ),\n 908 =>\n array(\n 'id' => 2237,\n 'co_prrq_asap' => '03',\n 'nombre' => 'ESTANQUEZ',\n 'municipio_id' => 344,\n 'co_stat_data' => 'A',\n ),\n 909 =>\n array(\n 'id' => 2238,\n 'co_prrq_asap' => '04',\n 'nombre' => 'LA TRAMPA',\n 'municipio_id' => 344,\n 'co_stat_data' => 'A',\n ),\n 910 =>\n array(\n 'id' => 2239,\n 'co_prrq_asap' => '05',\n 'nombre' => 'PUEBLO NUEVO DEL SUR',\n 'municipio_id' => 344,\n 'co_stat_data' => 'A',\n ),\n 911 =>\n array(\n 'id' => 2240,\n 'co_prrq_asap' => '06',\n 'nombre' => 'SAN JUAN',\n 'municipio_id' => 344,\n 'co_stat_data' => 'A',\n ),\n 912 =>\n array(\n 'id' => 2241,\n 'co_prrq_asap' => '01',\n 'nombre' => 'EL AMPARO',\n 'municipio_id' => 345,\n 'co_stat_data' => 'A',\n ),\n 913 =>\n array(\n 'id' => 2242,\n 'co_prrq_asap' => '02',\n 'nombre' => 'EL LLANO',\n 'municipio_id' => 345,\n 'co_stat_data' => 'A',\n ),\n 914 =>\n array(\n 'id' => 2243,\n 'co_prrq_asap' => '03',\n 'nombre' => 'SAN FRANCISCO',\n 'municipio_id' => 345,\n 'co_stat_data' => 'A',\n ),\n 915 =>\n array(\n 'id' => 2244,\n 'co_prrq_asap' => '04',\n 'nombre' => 'TOVAR',\n 'municipio_id' => 345,\n 'co_stat_data' => 'A',\n ),\n 916 =>\n array(\n 'id' => 2245,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL TULIO FEBRES CORDERO',\n 'municipio_id' => 346,\n 'co_stat_data' => 'A',\n ),\n 917 =>\n array(\n 'id' => 2246,\n 'co_prrq_asap' => '02',\n 'nombre' => 'INDEPENDENCIA',\n 'municipio_id' => 346,\n 'co_stat_data' => 'A',\n ),\n 918 =>\n array(\n 'id' => 2247,\n 'co_prrq_asap' => '03',\n 'nombre' => 'MARIA DE LA CONCEPCION PALACIO',\n 'municipio_id' => 346,\n 'co_stat_data' => 'A',\n ),\n 919 =>\n array(\n 'id' => 2248,\n 'co_prrq_asap' => '04',\n 'nombre' => 'SANTA POLONIA',\n 'municipio_id' => 346,\n 'co_stat_data' => 'A',\n ),\n 920 =>\n array(\n 'id' => 2249,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL ZEA',\n 'municipio_id' => 347,\n 'co_stat_data' => 'A',\n ),\n 921 =>\n array(\n 'id' => 2250,\n 'co_prrq_asap' => '02',\n 'nombre' => 'CAÑO EL TIGRE',\n 'municipio_id' => 347,\n 'co_stat_data' => 'A',\n ),\n 922 =>\n array(\n 'id' => 2251,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL AGUA BLANCA',\n 'municipio_id' => 348,\n 'co_stat_data' => 'A',\n ),\n 923 =>\n array(\n 'id' => 2252,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL ARAURE',\n 'municipio_id' => 349,\n 'co_stat_data' => 'A',\n ),\n 924 =>\n array(\n 'id' => 2253,\n 'co_prrq_asap' => '02',\n 'nombre' => 'RIO ACARIGUA',\n 'municipio_id' => 349,\n 'co_stat_data' => 'A',\n ),\n 925 =>\n array(\n 'id' => 2254,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL ESTELLER',\n 'municipio_id' => 350,\n 'co_stat_data' => 'A',\n ),\n 926 =>\n array(\n 'id' => 2255,\n 'co_prrq_asap' => '02',\n 'nombre' => 'UVERAL',\n 'municipio_id' => 350,\n 'co_stat_data' => 'A',\n ),\n 927 =>\n array(\n 'id' => 2260,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL GUANARITO',\n 'municipio_id' => 351,\n 'co_stat_data' => 'A',\n ),\n 928 =>\n array(\n 'id' => 2262,\n 'co_prrq_asap' => '03',\n 'nombre' => 'DIVINA PASTORA',\n 'municipio_id' => 351,\n 'co_stat_data' => 'A',\n ),\n 929 =>\n array(\n 'id' => 2261,\n 'co_prrq_asap' => '02',\n 'nombre' => 'TRINIDAD DE LA CAPILLA',\n 'municipio_id' => 351,\n 'co_stat_data' => 'A',\n ),\n 930 =>\n array(\n 'id' => 2263,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAP MONSEÑOR JOSE VICENTE DE UNDA',\n 'municipio_id' => 352,\n 'co_stat_data' => 'A',\n ),\n 931 =>\n array(\n 'id' => 2264,\n 'co_prrq_asap' => '02',\n 'nombre' => 'PEÑA BLANCA',\n 'municipio_id' => 352,\n 'co_stat_data' => 'A',\n ),\n 932 =>\n array(\n 'id' => 2266,\n 'co_prrq_asap' => '02',\n 'nombre' => 'APARICION',\n 'municipio_id' => 353,\n 'co_stat_data' => 'A',\n ),\n 933 =>\n array(\n 'id' => 2265,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL OSPINO',\n 'municipio_id' => 353,\n 'co_stat_data' => 'A',\n ),\n 934 =>\n array(\n 'id' => 2511,\n 'co_prrq_asap' => '03',\n 'nombre' => 'LA ESTACION',\n 'municipio_id' => 353,\n 'co_stat_data' => 'A',\n ),\n 935 =>\n array(\n 'id' => 2269,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL PAPELON',\n 'municipio_id' => 354,\n 'co_stat_data' => 'A',\n ),\n 936 =>\n array(\n 'id' => 2270,\n 'co_prrq_asap' => '02',\n 'nombre' => 'CAÑO DELGADITO',\n 'municipio_id' => 354,\n 'co_stat_data' => 'A',\n ),\n 937 =>\n array(\n 'id' => 2272,\n 'co_prrq_asap' => '02',\n 'nombre' => 'ANTOLIN TOVAR',\n 'municipio_id' => 355,\n 'co_stat_data' => 'A',\n ),\n 938 =>\n array(\n 'id' => 2271,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL SAN GENARO DE BOCONOITO',\n 'municipio_id' => 355,\n 'co_stat_data' => 'A',\n ),\n 939 =>\n array(\n 'id' => 2273,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL SAN RAFAEL DE ONOTO',\n 'municipio_id' => 356,\n 'co_stat_data' => 'A',\n ),\n 940 =>\n array(\n 'id' => 2274,\n 'co_prrq_asap' => '02',\n 'nombre' => 'SANTA FE',\n 'municipio_id' => 356,\n 'co_stat_data' => 'A',\n ),\n 941 =>\n array(\n 'id' => 2275,\n 'co_prrq_asap' => '03',\n 'nombre' => 'THERMO MORLES',\n 'municipio_id' => 356,\n 'co_stat_data' => 'A',\n ),\n 942 =>\n array(\n 'id' => 2276,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL SANTA ROSALIA',\n 'municipio_id' => 357,\n 'co_stat_data' => 'A',\n ),\n 943 =>\n array(\n 'id' => 2277,\n 'co_prrq_asap' => '02',\n 'nombre' => 'FLORIDA',\n 'municipio_id' => 357,\n 'co_stat_data' => 'A',\n ),\n 944 =>\n array(\n 'id' => 2278,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL SUCRE',\n 'municipio_id' => 358,\n 'co_stat_data' => 'A',\n ),\n 945 =>\n array(\n 'id' => 2279,\n 'co_prrq_asap' => '02',\n 'nombre' => 'CONCEPCION',\n 'municipio_id' => 358,\n 'co_stat_data' => 'A',\n ),\n 946 =>\n array(\n 'id' => 2282,\n 'co_prrq_asap' => '05',\n 'nombre' => 'SAN JOSE DE SAGUAZ',\n 'municipio_id' => 358,\n 'co_stat_data' => 'A',\n ),\n 947 =>\n array(\n 'id' => 2280,\n 'co_prrq_asap' => '03',\n 'nombre' => 'SAN RAFAEL DE PALO ALZADO',\n 'municipio_id' => 358,\n 'co_stat_data' => 'A',\n ),\n 948 =>\n array(\n 'id' => 2281,\n 'co_prrq_asap' => '04',\n 'nombre' => 'UVENCIO ANTONIO VELASQUEZ',\n 'municipio_id' => 358,\n 'co_stat_data' => 'A',\n ),\n 949 =>\n array(\n 'id' => 2283,\n 'co_prrq_asap' => '06',\n 'nombre' => 'VILLA ROSA',\n 'municipio_id' => 358,\n 'co_stat_data' => 'A',\n ),\n 950 =>\n array(\n 'id' => 2285,\n 'co_prrq_asap' => '02',\n 'nombre' => 'CANELONES',\n 'municipio_id' => 359,\n 'co_stat_data' => 'A',\n ),\n 951 =>\n array(\n 'id' => 2284,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL TUREN',\n 'municipio_id' => 359,\n 'co_stat_data' => 'A',\n ),\n 952 =>\n array(\n 'id' => 2287,\n 'co_prrq_asap' => '04',\n 'nombre' => 'SAN ISIDRO LABRADOR',\n 'municipio_id' => 359,\n 'co_stat_data' => 'A',\n ),\n 953 =>\n array(\n 'id' => 2286,\n 'co_prrq_asap' => '03',\n 'nombre' => 'SANTA CRUZ',\n 'municipio_id' => 359,\n 'co_stat_data' => 'A',\n ),\n 954 =>\n array(\n 'id' => 2288,\n 'co_prrq_asap' => '01',\n 'nombre' => 'MARIÑO',\n 'municipio_id' => 360,\n 'co_stat_data' => 'A',\n ),\n 955 =>\n array(\n 'id' => 2289,\n 'co_prrq_asap' => '02',\n 'nombre' => 'ROMULO GALLEGOS',\n 'municipio_id' => 360,\n 'co_stat_data' => 'A',\n ),\n 956 =>\n array(\n 'id' => 2290,\n 'co_prrq_asap' => '01',\n 'nombre' => 'SAN JOSE DE AEROCUAR',\n 'municipio_id' => 361,\n 'co_stat_data' => 'A',\n ),\n 957 =>\n array(\n 'id' => 2291,\n 'co_prrq_asap' => '02',\n 'nombre' => 'TAVERA ACOSTA',\n 'municipio_id' => 361,\n 'co_stat_data' => 'A',\n ),\n 958 =>\n array(\n 'id' => 2293,\n 'co_prrq_asap' => '02',\n 'nombre' => 'ANTONIO JOSE DE SUCRE',\n 'municipio_id' => 362,\n 'co_stat_data' => 'A',\n ),\n 959 =>\n array(\n 'id' => 2294,\n 'co_prrq_asap' => '03',\n 'nombre' => 'EL MORRO DE PUERTO SANTO',\n 'municipio_id' => 362,\n 'co_stat_data' => 'A',\n ),\n 960 =>\n array(\n 'id' => 2295,\n 'co_prrq_asap' => '04',\n 'nombre' => 'PUERTO SANTO',\n 'municipio_id' => 362,\n 'co_stat_data' => 'A',\n ),\n 961 =>\n array(\n 'id' => 2292,\n 'co_prrq_asap' => '01',\n 'nombre' => 'RIO CARIBE',\n 'municipio_id' => 362,\n 'co_stat_data' => 'A',\n ),\n 962 =>\n array(\n 'id' => 2296,\n 'co_prrq_asap' => '05',\n 'nombre' => 'SAN JUAN DE LAS GALDONAS',\n 'municipio_id' => 362,\n 'co_stat_data' => 'A',\n ),\n 963 =>\n array(\n 'id' => 2297,\n 'co_prrq_asap' => '01',\n 'nombre' => 'EL PILAR',\n 'municipio_id' => 363,\n 'co_stat_data' => 'A',\n ),\n 964 =>\n array(\n 'id' => 2298,\n 'co_prrq_asap' => '02',\n 'nombre' => 'EL RINCON',\n 'municipio_id' => 363,\n 'co_stat_data' => 'A',\n ),\n 965 =>\n array(\n 'id' => 2299,\n 'co_prrq_asap' => '03',\n 'nombre' => 'GRAL FRANCISCO ANTONIO VASQUEZ',\n 'municipio_id' => 363,\n 'co_stat_data' => 'A',\n ),\n 966 =>\n array(\n 'id' => 2300,\n 'co_prrq_asap' => '04',\n 'nombre' => 'GUARAUNOS',\n 'municipio_id' => 363,\n 'co_stat_data' => 'A',\n ),\n 967 =>\n array(\n 'id' => 2301,\n 'co_prrq_asap' => '05',\n 'nombre' => 'TUNAPUICITO',\n 'municipio_id' => 363,\n 'co_stat_data' => 'A',\n ),\n 968 =>\n array(\n 'id' => 2302,\n 'co_prrq_asap' => '06',\n 'nombre' => 'UNION',\n 'municipio_id' => 363,\n 'co_stat_data' => 'A',\n ),\n 969 =>\n array(\n 'id' => 2303,\n 'co_prrq_asap' => '01',\n 'nombre' => 'BOLIVAR',\n 'municipio_id' => 364,\n 'co_stat_data' => 'A',\n ),\n 970 =>\n array(\n 'id' => 2304,\n 'co_prrq_asap' => '02',\n 'nombre' => 'MACARAPANA',\n 'municipio_id' => 364,\n 'co_stat_data' => 'A',\n ),\n 971 =>\n array(\n 'id' => 2305,\n 'co_prrq_asap' => '03',\n 'nombre' => 'SANTA CATALINA',\n 'municipio_id' => 364,\n 'co_stat_data' => 'A',\n ),\n 972 =>\n array(\n 'id' => 2306,\n 'co_prrq_asap' => '04',\n 'nombre' => 'SANTA ROSA',\n 'municipio_id' => 364,\n 'co_stat_data' => 'A',\n ),\n 973 =>\n array(\n 'id' => 2307,\n 'co_prrq_asap' => '05',\n 'nombre' => 'SANTA TERESA',\n 'municipio_id' => 364,\n 'co_stat_data' => 'A',\n ),\n 974 =>\n array(\n 'id' => 2308,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL BOLIVAR',\n 'municipio_id' => 365,\n 'co_stat_data' => 'A',\n ),\n 975 =>\n array(\n 'id' => 2310,\n 'co_prrq_asap' => '02',\n 'nombre' => 'EL PAUJIL',\n 'municipio_id' => 366,\n 'co_stat_data' => 'A',\n ),\n 976 =>\n array(\n 'id' => 2311,\n 'co_prrq_asap' => '03',\n 'nombre' => 'LIBERTAD',\n 'municipio_id' => 366,\n 'co_stat_data' => 'A',\n ),\n 977 =>\n array(\n 'id' => 2309,\n 'co_prrq_asap' => '01',\n 'nombre' => 'YAGUARAPARO',\n 'municipio_id' => 366,\n 'co_stat_data' => 'A',\n ),\n 978 =>\n array(\n 'id' => 2312,\n 'co_prrq_asap' => '01',\n 'nombre' => 'ARAYA',\n 'municipio_id' => 367,\n 'co_stat_data' => 'A',\n ),\n 979 =>\n array(\n 'id' => 2313,\n 'co_prrq_asap' => '02',\n 'nombre' => 'CHACOPATA',\n 'municipio_id' => 367,\n 'co_stat_data' => 'A',\n ),\n 980 =>\n array(\n 'id' => 2314,\n 'co_prrq_asap' => '03',\n 'nombre' => 'MANICUARE',\n 'municipio_id' => 367,\n 'co_stat_data' => 'A',\n ),\n 981 =>\n array(\n 'id' => 2316,\n 'co_prrq_asap' => '02',\n 'nombre' => 'CAMPO ELIAS',\n 'municipio_id' => 368,\n 'co_stat_data' => 'A',\n ),\n 982 =>\n array(\n 'id' => 2315,\n 'co_prrq_asap' => '01',\n 'nombre' => 'TUNAPUY',\n 'municipio_id' => 368,\n 'co_stat_data' => 'A',\n ),\n 983 =>\n array(\n 'id' => 2318,\n 'co_prrq_asap' => '02',\n 'nombre' => 'CAMPO CLARO',\n 'municipio_id' => 369,\n 'co_stat_data' => 'A',\n ),\n 984 =>\n array(\n 'id' => 2317,\n 'co_prrq_asap' => '01',\n 'nombre' => 'IRAPA',\n 'municipio_id' => 369,\n 'co_stat_data' => 'A',\n ),\n 985 =>\n array(\n 'id' => 2319,\n 'co_prrq_asap' => '03',\n 'nombre' => 'MARABAL',\n 'municipio_id' => 369,\n 'co_stat_data' => 'A',\n ),\n 986 =>\n array(\n 'id' => 2320,\n 'co_prrq_asap' => '04',\n 'nombre' => 'SAN ANTONIO DE IRAPA',\n 'municipio_id' => 369,\n 'co_stat_data' => 'A',\n ),\n 987 =>\n array(\n 'id' => 2321,\n 'co_prrq_asap' => '05',\n 'nombre' => 'SORO',\n 'municipio_id' => 369,\n 'co_stat_data' => 'A',\n ),\n 988 =>\n array(\n 'id' => 2322,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL MEJIA',\n 'municipio_id' => 370,\n 'co_stat_data' => 'A',\n ),\n 989 =>\n array(\n 'id' => 2324,\n 'co_prrq_asap' => '02',\n 'nombre' => 'ARENAS',\n 'municipio_id' => 371,\n 'co_stat_data' => 'A',\n ),\n 990 =>\n array(\n 'id' => 2325,\n 'co_prrq_asap' => '03',\n 'nombre' => 'ARICAGUA',\n 'municipio_id' => 371,\n 'co_stat_data' => 'A',\n ),\n 991 =>\n array(\n 'id' => 2326,\n 'co_prrq_asap' => '04',\n 'nombre' => 'COCOLLAR',\n 'municipio_id' => 371,\n 'co_stat_data' => 'A',\n ),\n 992 =>\n array(\n 'id' => 2323,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CUMANACOA',\n 'municipio_id' => 371,\n 'co_stat_data' => 'A',\n ),\n 993 =>\n array(\n 'id' => 2327,\n 'co_prrq_asap' => '05',\n 'nombre' => 'SAN FERNANDO',\n 'municipio_id' => 371,\n 'co_stat_data' => 'A',\n ),\n 994 =>\n array(\n 'id' => 2328,\n 'co_prrq_asap' => '06',\n 'nombre' => 'SAN LORENZO',\n 'municipio_id' => 371,\n 'co_stat_data' => 'A',\n ),\n 995 =>\n array(\n 'id' => 2330,\n 'co_prrq_asap' => '02',\n 'nombre' => 'CATUARO',\n 'municipio_id' => 372,\n 'co_stat_data' => 'A',\n ),\n 996 =>\n array(\n 'id' => 2331,\n 'co_prrq_asap' => '03',\n 'nombre' => 'RENDON',\n 'municipio_id' => 372,\n 'co_stat_data' => 'A',\n ),\n 997 =>\n array(\n 'id' => 2332,\n 'co_prrq_asap' => '04',\n 'nombre' => 'SANTA CRUZ',\n 'municipio_id' => 372,\n 'co_stat_data' => 'A',\n ),\n 998 =>\n array(\n 'id' => 2333,\n 'co_prrq_asap' => '05',\n 'nombre' => 'SANTA MARIA',\n 'municipio_id' => 372,\n 'co_stat_data' => 'A',\n ),\n 999 =>\n array(\n 'id' => 2329,\n 'co_prrq_asap' => '01',\n 'nombre' => 'VILLA FRONTADO',\n 'municipio_id' => 372,\n 'co_stat_data' => 'A',\n ),\n 1000 =>\n array(\n 'id' => 2334,\n 'co_prrq_asap' => '01',\n 'nombre' => 'ALTAGRACIA',\n 'municipio_id' => 373,\n 'co_stat_data' => 'A',\n ),\n 1001 =>\n array(\n 'id' => 2335,\n 'co_prrq_asap' => '02',\n 'nombre' => 'AYACUCHO',\n 'municipio_id' => 373,\n 'co_stat_data' => 'A',\n ),\n 1002 =>\n array(\n 'id' => 2339,\n 'co_prrq_asap' => '06',\n 'nombre' => 'RAUL LEONI',\n 'municipio_id' => 373,\n 'co_stat_data' => 'A',\n ),\n 1003 =>\n array(\n 'id' => 2338,\n 'co_prrq_asap' => '05',\n 'nombre' => 'SAN JUAN',\n 'municipio_id' => 373,\n 'co_stat_data' => 'A',\n ),\n 1004 =>\n array(\n 'id' => 2340,\n 'co_prrq_asap' => '07',\n 'nombre' => 'SANTA FE',\n 'municipio_id' => 373,\n 'co_stat_data' => 'A',\n ),\n 1005 =>\n array(\n 'id' => 2336,\n 'co_prrq_asap' => '03',\n 'nombre' => 'SANTA INES',\n 'municipio_id' => 373,\n 'co_stat_data' => 'A',\n ),\n 1006 =>\n array(\n 'id' => 2337,\n 'co_prrq_asap' => '04',\n 'nombre' => 'VALENTIN VALIENTE',\n 'municipio_id' => 373,\n 'co_stat_data' => 'A',\n ),\n 1007 =>\n array(\n 'id' => 2342,\n 'co_prrq_asap' => '02',\n 'nombre' => 'BIDEAU',\n 'municipio_id' => 374,\n 'co_stat_data' => 'A',\n ),\n 1008 =>\n array(\n 'id' => 2343,\n 'co_prrq_asap' => '03',\n 'nombre' => 'CRISTOBAL COLON',\n 'municipio_id' => 374,\n 'co_stat_data' => 'A',\n ),\n 1009 =>\n array(\n 'id' => 2341,\n 'co_prrq_asap' => '01',\n 'nombre' => 'GUIRIA',\n 'municipio_id' => 374,\n 'co_stat_data' => 'A',\n ),\n 1010 =>\n array(\n 'id' => 2344,\n 'co_prrq_asap' => '04',\n 'nombre' => 'PUNTA DE PIEDRAS',\n 'municipio_id' => 374,\n 'co_stat_data' => 'A',\n ),\n 1011 =>\n array(\n 'id' => 2346,\n 'co_prrq_asap' => '02',\n 'nombre' => 'ARAGUANEY',\n 'municipio_id' => 375,\n 'co_stat_data' => 'A',\n ),\n 1012 =>\n array(\n 'id' => 2347,\n 'co_prrq_asap' => '03',\n 'nombre' => 'EL JAGUITO',\n 'municipio_id' => 375,\n 'co_stat_data' => 'A',\n ),\n 1013 =>\n array(\n 'id' => 2348,\n 'co_prrq_asap' => '04',\n 'nombre' => 'LA ESPERANZA',\n 'municipio_id' => 375,\n 'co_stat_data' => 'A',\n ),\n 1014 =>\n array(\n 'id' => 2345,\n 'co_prrq_asap' => '01',\n 'nombre' => 'SANTA ISABEL',\n 'municipio_id' => 375,\n 'co_stat_data' => 'A',\n ),\n 1015 =>\n array(\n 'id' => 2352,\n 'co_prrq_asap' => '04',\n 'nombre' => 'AYACUCHO',\n 'municipio_id' => 376,\n 'co_stat_data' => 'A',\n ),\n 1016 =>\n array(\n 'id' => 2349,\n 'co_prrq_asap' => '01',\n 'nombre' => 'BOCONO',\n 'municipio_id' => 376,\n 'co_stat_data' => 'A',\n ),\n 1017 =>\n array(\n 'id' => 2353,\n 'co_prrq_asap' => '05',\n 'nombre' => 'BURBUSAY',\n 'municipio_id' => 376,\n 'co_stat_data' => 'A',\n ),\n 1018 =>\n array(\n 'id' => 2350,\n 'co_prrq_asap' => '02',\n 'nombre' => 'EL CARMEN',\n 'municipio_id' => 376,\n 'co_stat_data' => 'A',\n ),\n 1019 =>\n array(\n 'id' => 2354,\n 'co_prrq_asap' => '06',\n 'nombre' => 'GENERAL RIVAS',\n 'municipio_id' => 376,\n 'co_stat_data' => 'A',\n ),\n 1020 =>\n array(\n 'id' => 2355,\n 'co_prrq_asap' => '07',\n 'nombre' => 'GUARAMACAL',\n 'municipio_id' => 376,\n 'co_stat_data' => 'A',\n ),\n 1021 =>\n array(\n 'id' => 2357,\n 'co_prrq_asap' => '09',\n 'nombre' => 'MONSEÑOR JAUREGUI',\n 'municipio_id' => 376,\n 'co_stat_data' => 'A',\n ),\n 1022 =>\n array(\n 'id' => 2351,\n 'co_prrq_asap' => '03',\n 'nombre' => 'MOSQUEY',\n 'municipio_id' => 376,\n 'co_stat_data' => 'A',\n ),\n 1023 =>\n array(\n 'id' => 2358,\n 'co_prrq_asap' => '10',\n 'nombre' => 'RAFAEL RANGEL',\n 'municipio_id' => 376,\n 'co_stat_data' => 'A',\n ),\n 1024 =>\n array(\n 'id' => 2360,\n 'co_prrq_asap' => '12',\n 'nombre' => 'SAN JOSE',\n 'municipio_id' => 376,\n 'co_stat_data' => 'A',\n ),\n 1025 =>\n array(\n 'id' => 2359,\n 'co_prrq_asap' => '11',\n 'nombre' => 'SAN MIGUEL',\n 'municipio_id' => 376,\n 'co_stat_data' => 'A',\n ),\n 1026 =>\n array(\n 'id' => 2356,\n 'co_prrq_asap' => '08',\n 'nombre' => 'VEGA DE GUARAMACAL',\n 'municipio_id' => 376,\n 'co_stat_data' => 'A',\n ),\n 1027 =>\n array(\n 'id' => 2362,\n 'co_prrq_asap' => '02',\n 'nombre' => 'CHEREGUE',\n 'municipio_id' => 377,\n 'co_stat_data' => 'A',\n ),\n 1028 =>\n array(\n 'id' => 2363,\n 'co_prrq_asap' => '03',\n 'nombre' => 'GRANADOS',\n 'municipio_id' => 377,\n 'co_stat_data' => 'A',\n ),\n 1029 =>\n array(\n 'id' => 2361,\n 'co_prrq_asap' => '01',\n 'nombre' => 'SABANA GRANDE',\n 'municipio_id' => 377,\n 'co_stat_data' => 'A',\n ),\n 1030 =>\n array(\n 'id' => 2365,\n 'co_prrq_asap' => '02',\n 'nombre' => 'ARNOLDO GABALDON',\n 'municipio_id' => 378,\n 'co_stat_data' => 'A',\n ),\n 1031 =>\n array(\n 'id' => 2366,\n 'co_prrq_asap' => '03',\n 'nombre' => 'BOLIVIA',\n 'municipio_id' => 378,\n 'co_stat_data' => 'A',\n ),\n 1032 =>\n array(\n 'id' => 2367,\n 'co_prrq_asap' => '04',\n 'nombre' => 'CARILLO',\n 'municipio_id' => 378,\n 'co_stat_data' => 'A',\n ),\n 1033 =>\n array(\n 'id' => 2368,\n 'co_prrq_asap' => '05',\n 'nombre' => 'CEGARRA',\n 'municipio_id' => 378,\n 'co_stat_data' => 'A',\n ),\n 1034 =>\n array(\n 'id' => 2364,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CHEJENDE',\n 'municipio_id' => 378,\n 'co_stat_data' => 'A',\n ),\n 1035 =>\n array(\n 'id' => 2369,\n 'co_prrq_asap' => '06',\n 'nombre' => 'MANUEL SALVADOR ULLOA',\n 'municipio_id' => 378,\n 'co_stat_data' => 'A',\n ),\n 1036 =>\n array(\n 'id' => 2370,\n 'co_prrq_asap' => '07',\n 'nombre' => 'SAN JOSE',\n 'municipio_id' => 378,\n 'co_stat_data' => 'A',\n ),\n 1037 =>\n array(\n 'id' => 2371,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CARACHE',\n 'municipio_id' => 379,\n 'co_stat_data' => 'A',\n ),\n 1038 =>\n array(\n 'id' => 2372,\n 'co_prrq_asap' => '02',\n 'nombre' => 'CUICAS',\n 'municipio_id' => 379,\n 'co_stat_data' => 'A',\n ),\n 1039 =>\n array(\n 'id' => 2373,\n 'co_prrq_asap' => '03',\n 'nombre' => 'LA CONCEPCION',\n 'municipio_id' => 379,\n 'co_stat_data' => 'A',\n ),\n 1040 =>\n array(\n 'id' => 2374,\n 'co_prrq_asap' => '04',\n 'nombre' => 'PANAMERICANA',\n 'municipio_id' => 379,\n 'co_stat_data' => 'A',\n ),\n 1041 =>\n array(\n 'id' => 2375,\n 'co_prrq_asap' => '05',\n 'nombre' => 'SANTA CRUZ',\n 'municipio_id' => 379,\n 'co_stat_data' => 'A',\n ),\n 1042 =>\n array(\n 'id' => 2376,\n 'co_prrq_asap' => '01',\n 'nombre' => 'ESCUQUE',\n 'municipio_id' => 380,\n 'co_stat_data' => 'A',\n ),\n 1043 =>\n array(\n 'id' => 2377,\n 'co_prrq_asap' => '02',\n 'nombre' => 'LA UNION',\n 'municipio_id' => 380,\n 'co_stat_data' => 'A',\n ),\n 1044 =>\n array(\n 'id' => 2378,\n 'co_prrq_asap' => '03',\n 'nombre' => 'SABANA LIBRE',\n 'municipio_id' => 380,\n 'co_stat_data' => 'A',\n ),\n 1045 =>\n array(\n 'id' => 2379,\n 'co_prrq_asap' => '04',\n 'nombre' => 'SANTA RITA',\n 'municipio_id' => 380,\n 'co_stat_data' => 'A',\n ),\n 1046 =>\n array(\n 'id' => 2381,\n 'co_prrq_asap' => '02',\n 'nombre' => 'ANTONIO JOSE DE SUCRE',\n 'municipio_id' => 381,\n 'co_stat_data' => 'A',\n ),\n 1047 =>\n array(\n 'id' => 2380,\n 'co_prrq_asap' => '01',\n 'nombre' => 'EL SOCORRO',\n 'municipio_id' => 381,\n 'co_stat_data' => 'A',\n ),\n 1048 =>\n array(\n 'id' => 2382,\n 'co_prrq_asap' => '03',\n 'nombre' => 'LOS CAPRICHOS',\n 'municipio_id' => 381,\n 'co_stat_data' => 'A',\n ),\n 1049 =>\n array(\n 'id' => 2384,\n 'co_prrq_asap' => '02',\n 'nombre' => 'ARNOLDO GABALDON',\n 'municipio_id' => 382,\n 'co_stat_data' => 'A',\n ),\n 1050 =>\n array(\n 'id' => 2383,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAMPO ELIAS',\n 'municipio_id' => 382,\n 'co_stat_data' => 'A',\n ),\n 1051 =>\n array(\n 'id' => 2386,\n 'co_prrq_asap' => '02',\n 'nombre' => 'EL PROGRESO',\n 'municipio_id' => 383,\n 'co_stat_data' => 'A',\n ),\n 1052 =>\n array(\n 'id' => 2387,\n 'co_prrq_asap' => '03',\n 'nombre' => 'LA CEIBA',\n 'municipio_id' => 383,\n 'co_stat_data' => 'A',\n ),\n 1053 =>\n array(\n 'id' => 2385,\n 'co_prrq_asap' => '01',\n 'nombre' => 'SANTA APOLONIA',\n 'municipio_id' => 383,\n 'co_stat_data' => 'A',\n ),\n 1054 =>\n array(\n 'id' => 2388,\n 'co_prrq_asap' => '04',\n 'nombre' => 'TRES DE FEBRERO',\n 'municipio_id' => 383,\n 'co_stat_data' => 'A',\n ),\n 1055 =>\n array(\n 'id' => 2391,\n 'co_prrq_asap' => '03',\n 'nombre' => 'AGUA CALIENTE',\n 'municipio_id' => 384,\n 'co_stat_data' => 'A',\n ),\n 1056 =>\n array(\n 'id' => 2390,\n 'co_prrq_asap' => '02',\n 'nombre' => 'AGUA SANTA',\n 'municipio_id' => 384,\n 'co_stat_data' => 'A',\n ),\n 1057 =>\n array(\n 'id' => 2392,\n 'co_prrq_asap' => '04',\n 'nombre' => 'EL CENIZO',\n 'municipio_id' => 384,\n 'co_stat_data' => 'A',\n ),\n 1058 =>\n array(\n 'id' => 2389,\n 'co_prrq_asap' => '01',\n 'nombre' => 'EL DIVIDIVE',\n 'municipio_id' => 384,\n 'co_stat_data' => 'A',\n ),\n 1059 =>\n array(\n 'id' => 2393,\n 'co_prrq_asap' => '05',\n 'nombre' => 'VALERITA',\n 'municipio_id' => 384,\n 'co_stat_data' => 'A',\n ),\n 1060 =>\n array(\n 'id' => 2395,\n 'co_prrq_asap' => '02',\n 'nombre' => 'BUENA VISTA',\n 'municipio_id' => 385,\n 'co_stat_data' => 'A',\n ),\n 1061 =>\n array(\n 'id' => 2394,\n 'co_prrq_asap' => '01',\n 'nombre' => 'MONTE CARMELO',\n 'municipio_id' => 385,\n 'co_stat_data' => 'A',\n ),\n 1062 =>\n array(\n 'id' => 2396,\n 'co_prrq_asap' => '03',\n 'nombre' => 'SANTA MARIA DEL HORCON',\n 'municipio_id' => 385,\n 'co_stat_data' => 'A',\n ),\n 1063 =>\n array(\n 'id' => 2398,\n 'co_prrq_asap' => '02',\n 'nombre' => 'EL BAÑO',\n 'municipio_id' => 386,\n 'co_stat_data' => 'A',\n ),\n 1064 =>\n array(\n 'id' => 2399,\n 'co_prrq_asap' => '03',\n 'nombre' => 'JALISCO',\n 'municipio_id' => 386,\n 'co_stat_data' => 'A',\n ),\n 1065 =>\n array(\n 'id' => 2397,\n 'co_prrq_asap' => '01',\n 'nombre' => 'MOTATAN',\n 'municipio_id' => 386,\n 'co_stat_data' => 'A',\n ),\n 1066 =>\n array(\n 'id' => 2401,\n 'co_prrq_asap' => '02',\n 'nombre' => 'FLOR DE PATRIA',\n 'municipio_id' => 387,\n 'co_stat_data' => 'A',\n ),\n 1067 =>\n array(\n 'id' => 2402,\n 'co_prrq_asap' => '03',\n 'nombre' => 'LA PAZ',\n 'municipio_id' => 387,\n 'co_stat_data' => 'A',\n ),\n 1068 =>\n array(\n 'id' => 2400,\n 'co_prrq_asap' => '01',\n 'nombre' => 'PAMPAN',\n 'municipio_id' => 387,\n 'co_stat_data' => 'A',\n ),\n 1069 =>\n array(\n 'id' => 2403,\n 'co_prrq_asap' => '04',\n 'nombre' => 'SANTA ANA',\n 'municipio_id' => 387,\n 'co_stat_data' => 'A',\n ),\n 1070 =>\n array(\n 'id' => 2405,\n 'co_prrq_asap' => '02',\n 'nombre' => 'LA CONCEPCION',\n 'municipio_id' => 388,\n 'co_stat_data' => 'A',\n ),\n 1071 =>\n array(\n 'id' => 2404,\n 'co_prrq_asap' => '01',\n 'nombre' => 'PAMPANITO',\n 'municipio_id' => 388,\n 'co_stat_data' => 'A',\n ),\n 1072 =>\n array(\n 'id' => 2406,\n 'co_prrq_asap' => '03',\n 'nombre' => 'PAMPANITO II',\n 'municipio_id' => 388,\n 'co_stat_data' => 'A',\n ),\n 1073 =>\n array(\n 'id' => 2407,\n 'co_prrq_asap' => '01',\n 'nombre' => 'BETIJOQUE',\n 'municipio_id' => 389,\n 'co_stat_data' => 'A',\n ),\n 1074 =>\n array(\n 'id' => 2410,\n 'co_prrq_asap' => '04',\n 'nombre' => 'JOSE GREGORIO HERNANDEZ',\n 'municipio_id' => 389,\n 'co_stat_data' => 'A',\n ),\n 1075 =>\n array(\n 'id' => 2408,\n 'co_prrq_asap' => '02',\n 'nombre' => 'LA PUEBLITA',\n 'municipio_id' => 389,\n 'co_stat_data' => 'A',\n ),\n 1076 =>\n array(\n 'id' => 2409,\n 'co_prrq_asap' => '03',\n 'nombre' => 'LOS CEDROS',\n 'municipio_id' => 389,\n 'co_stat_data' => 'A',\n ),\n 1077 =>\n array(\n 'id' => 2412,\n 'co_prrq_asap' => '02',\n 'nombre' => 'ANTONIO NICOLAS BRICEÑO',\n 'municipio_id' => 390,\n 'co_stat_data' => 'A',\n ),\n 1078 =>\n array(\n 'id' => 2413,\n 'co_prrq_asap' => '03',\n 'nombre' => 'CAMPO ALEGRE',\n 'municipio_id' => 390,\n 'co_stat_data' => 'A',\n ),\n 1079 =>\n array(\n 'id' => 2411,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CARVAJAL',\n 'municipio_id' => 390,\n 'co_stat_data' => 'A',\n ),\n 1080 =>\n array(\n 'id' => 2515,\n 'co_prrq_asap' => '04',\n 'nombre' => 'JOSE LEONARDO SUAREZ',\n 'municipio_id' => 390,\n 'co_stat_data' => 'A',\n ),\n 1081 =>\n array(\n 'id' => 2415,\n 'co_prrq_asap' => '02',\n 'nombre' => 'EL PARAISO',\n 'municipio_id' => 391,\n 'co_stat_data' => 'A',\n ),\n 1082 =>\n array(\n 'id' => 2416,\n 'co_prrq_asap' => '03',\n 'nombre' => 'JUNIN',\n 'municipio_id' => 391,\n 'co_stat_data' => 'A',\n ),\n 1083 =>\n array(\n 'id' => 2414,\n 'co_prrq_asap' => '01',\n 'nombre' => 'SABANA DE MENDOZA',\n 'municipio_id' => 391,\n 'co_stat_data' => 'A',\n ),\n 1084 =>\n array(\n 'id' => 2417,\n 'co_prrq_asap' => '04',\n 'nombre' => 'VALMORE RODRIGUEZ',\n 'municipio_id' => 391,\n 'co_stat_data' => 'A',\n ),\n 1085 =>\n array(\n 'id' => 2418,\n 'co_prrq_asap' => '01',\n 'nombre' => 'ANDRES LINARES',\n 'municipio_id' => 392,\n 'co_stat_data' => 'A',\n ),\n 1086 =>\n array(\n 'id' => 2419,\n 'co_prrq_asap' => '02',\n 'nombre' => 'CHIQUINQUIRA',\n 'municipio_id' => 392,\n 'co_stat_data' => 'A',\n ),\n 1087 =>\n array(\n 'id' => 2420,\n 'co_prrq_asap' => '03',\n 'nombre' => 'CRISTOBAL MENDOZA',\n 'municipio_id' => 392,\n 'co_stat_data' => 'A',\n ),\n 1088 =>\n array(\n 'id' => 2421,\n 'co_prrq_asap' => '04',\n 'nombre' => 'CRUZ CARILLO',\n 'municipio_id' => 392,\n 'co_stat_data' => 'A',\n ),\n 1089 =>\n array(\n 'id' => 2422,\n 'co_prrq_asap' => '05',\n 'nombre' => 'MATRIZ',\n 'municipio_id' => 392,\n 'co_stat_data' => 'A',\n ),\n 1090 =>\n array(\n 'id' => 2423,\n 'co_prrq_asap' => '06',\n 'nombre' => 'MONSEÑOR CARILLO',\n 'municipio_id' => 392,\n 'co_stat_data' => 'A',\n ),\n 1091 =>\n array(\n 'id' => 2424,\n 'co_prrq_asap' => '07',\n 'nombre' => 'TRES ESQUINAS',\n 'municipio_id' => 392,\n 'co_stat_data' => 'A',\n ),\n 1092 =>\n array(\n 'id' => 2426,\n 'co_prrq_asap' => '02',\n 'nombre' => 'CABIMBU',\n 'municipio_id' => 393,\n 'co_stat_data' => 'A',\n ),\n 1093 =>\n array(\n 'id' => 2427,\n 'co_prrq_asap' => '03',\n 'nombre' => 'JAJO',\n 'municipio_id' => 393,\n 'co_stat_data' => 'A',\n ),\n 1094 =>\n array(\n 'id' => 2428,\n 'co_prrq_asap' => '04',\n 'nombre' => 'LA MESA DE ESNUJAQUE',\n 'municipio_id' => 393,\n 'co_stat_data' => 'A',\n ),\n 1095 =>\n array(\n 'id' => 2425,\n 'co_prrq_asap' => '01',\n 'nombre' => 'LA QUEBRADA',\n 'municipio_id' => 393,\n 'co_stat_data' => 'A',\n ),\n 1096 =>\n array(\n 'id' => 2429,\n 'co_prrq_asap' => '05',\n 'nombre' => 'SANTIAGO',\n 'municipio_id' => 393,\n 'co_stat_data' => 'A',\n ),\n 1097 =>\n array(\n 'id' => 2430,\n 'co_prrq_asap' => '06',\n 'nombre' => 'TUÑAME',\n 'municipio_id' => 393,\n 'co_stat_data' => 'A',\n ),\n 1098 =>\n array(\n 'id' => 2435,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL ARISTIDES BASTIDAS',\n 'municipio_id' => 394,\n 'co_stat_data' => 'A',\n ),\n 1099 =>\n array(\n 'id' => 2436,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL BOLIVAR',\n 'municipio_id' => 395,\n 'co_stat_data' => 'A',\n ),\n 1100 =>\n array(\n 'id' => 2438,\n 'co_prrq_asap' => '02',\n 'nombre' => 'CAMPO ELIAS',\n 'municipio_id' => 396,\n 'co_stat_data' => 'A',\n ),\n 1101 =>\n array(\n 'id' => 2437,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL BRUZUAL',\n 'municipio_id' => 396,\n 'co_stat_data' => 'A',\n ),\n 1102 =>\n array(\n 'id' => 2439,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL COCOROTE',\n 'municipio_id' => 397,\n 'co_stat_data' => 'A',\n ),\n 1103 =>\n array(\n 'id' => 2440,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL INDEPENDENCIA',\n 'municipio_id' => 398,\n 'co_stat_data' => 'A',\n ),\n 1104 =>\n array(\n 'id' => 2441,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL JOSE ANTONIO PAEZ',\n 'municipio_id' => 399,\n 'co_stat_data' => 'A',\n ),\n 1105 =>\n array(\n 'id' => 2442,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL LA TRINIDAD',\n 'municipio_id' => 400,\n 'co_stat_data' => 'A',\n ),\n 1106 =>\n array(\n 'id' => 2443,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL MANUEL MONGE',\n 'municipio_id' => 401,\n 'co_stat_data' => 'A',\n ),\n 1107 =>\n array(\n 'id' => 2444,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL NIRGUA',\n 'municipio_id' => 402,\n 'co_stat_data' => 'A',\n ),\n 1108 =>\n array(\n 'id' => 2445,\n 'co_prrq_asap' => '02',\n 'nombre' => 'SALOM',\n 'municipio_id' => 402,\n 'co_stat_data' => 'A',\n ),\n 1109 =>\n array(\n 'id' => 2446,\n 'co_prrq_asap' => '03',\n 'nombre' => 'TEMERLA',\n 'municipio_id' => 402,\n 'co_stat_data' => 'A',\n ),\n 1110 =>\n array(\n 'id' => 2447,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL PEÑA',\n 'municipio_id' => 403,\n 'co_stat_data' => 'A',\n ),\n 1111 =>\n array(\n 'id' => 2448,\n 'co_prrq_asap' => '02',\n 'nombre' => 'SAN ANDRES',\n 'municipio_id' => 403,\n 'co_stat_data' => 'A',\n ),\n 1112 =>\n array(\n 'id' => 2450,\n 'co_prrq_asap' => '02',\n 'nombre' => 'ALBARICO',\n 'municipio_id' => 404,\n 'co_stat_data' => 'A',\n ),\n 1113 =>\n array(\n 'id' => 2449,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL SAN FELIPE',\n 'municipio_id' => 404,\n 'co_stat_data' => 'A',\n ),\n 1114 =>\n array(\n 'id' => 2451,\n 'co_prrq_asap' => '03',\n 'nombre' => 'SAN JAVIER',\n 'municipio_id' => 404,\n 'co_stat_data' => 'A',\n ),\n 1115 =>\n array(\n 'id' => 2452,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL SUCRE',\n 'municipio_id' => 405,\n 'co_stat_data' => 'A',\n ),\n 1116 =>\n array(\n 'id' => 2453,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL URACHICHE',\n 'municipio_id' => 406,\n 'co_stat_data' => 'A',\n ),\n 1117 =>\n array(\n 'id' => 2454,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAPITAL VEROES',\n 'municipio_id' => 407,\n 'co_stat_data' => 'A',\n ),\n 1118 =>\n array(\n 'id' => 2455,\n 'co_prrq_asap' => '02',\n 'nombre' => 'EL GUAYABO',\n 'municipio_id' => 407,\n 'co_stat_data' => 'A',\n ),\n 1119 =>\n array(\n 'id' => 2456,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CARABALLEDA',\n 'municipio_id' => 408,\n 'co_stat_data' => 'A',\n ),\n 1120 =>\n array(\n 'id' => 2457,\n 'co_prrq_asap' => '02',\n 'nombre' => 'CARAYACA',\n 'municipio_id' => 408,\n 'co_stat_data' => 'A',\n ),\n 1121 =>\n array(\n 'id' => 2517,\n 'co_prrq_asap' => '11',\n 'nombre' => 'CARLOS SOUBLETTE',\n 'municipio_id' => 408,\n 'co_stat_data' => 'A',\n ),\n 1122 =>\n array(\n 'id' => 2458,\n 'co_prrq_asap' => '03',\n 'nombre' => 'CARUAO',\n 'municipio_id' => 408,\n 'co_stat_data' => 'A',\n ),\n 1123 =>\n array(\n 'id' => 2459,\n 'co_prrq_asap' => '04',\n 'nombre' => 'CATIA LA MAR',\n 'municipio_id' => 408,\n 'co_stat_data' => 'A',\n ),\n 1124 =>\n array(\n 'id' => 2460,\n 'co_prrq_asap' => '05',\n 'nombre' => 'EL JUNKO',\n 'municipio_id' => 408,\n 'co_stat_data' => 'A',\n ),\n 1125 =>\n array(\n 'id' => 2461,\n 'co_prrq_asap' => '06',\n 'nombre' => 'LA GUAIRA',\n 'municipio_id' => 408,\n 'co_stat_data' => 'A',\n ),\n 1126 =>\n array(\n 'id' => 2462,\n 'co_prrq_asap' => '07',\n 'nombre' => 'MACUTO',\n 'municipio_id' => 408,\n 'co_stat_data' => 'A',\n ),\n 1127 =>\n array(\n 'id' => 2463,\n 'co_prrq_asap' => '08',\n 'nombre' => 'MAIQUETIA',\n 'municipio_id' => 408,\n 'co_stat_data' => 'A',\n ),\n 1128 =>\n array(\n 'id' => 2464,\n 'co_prrq_asap' => '09',\n 'nombre' => 'NAIGUATA',\n 'municipio_id' => 408,\n 'co_stat_data' => 'A',\n ),\n 1129 =>\n array(\n 'id' => 2516,\n 'co_prrq_asap' => '10',\n 'nombre' => 'RAUL LEONI',\n 'municipio_id' => 408,\n 'co_stat_data' => 'A',\n ),\n 1130 =>\n array(\n 'id' => 2655,\n 'co_prrq_asap' => '05',\n 'nombre' => 'AGUSTIN',\n 'municipio_id' => 409,\n 'co_stat_data' => 'A',\n ),\n 1131 =>\n array(\n 'id' => 2664,\n 'co_prrq_asap' => '14',\n 'nombre' => 'BURRO',\n 'municipio_id' => 409,\n 'co_stat_data' => 'A',\n ),\n 1132 =>\n array(\n 'id' => 2656,\n 'co_prrq_asap' => '06',\n 'nombre' => 'CAYO CARENERO',\n 'municipio_id' => 409,\n 'co_stat_data' => 'A',\n ),\n 1133 =>\n array(\n 'id' => 2657,\n 'co_prrq_asap' => '07',\n 'nombre' => 'CAYO FERNANDO',\n 'municipio_id' => 409,\n 'co_stat_data' => 'A',\n ),\n 1134 =>\n array(\n 'id' => 2653,\n 'co_prrq_asap' => '03',\n 'nombre' => 'CAYO PIRATA',\n 'municipio_id' => 409,\n 'co_stat_data' => 'A',\n ),\n 1135 =>\n array(\n 'id' => 2662,\n 'co_prrq_asap' => '12',\n 'nombre' => 'CHIMANAS',\n 'municipio_id' => 409,\n 'co_stat_data' => 'A',\n ),\n 1136 =>\n array(\n 'id' => 2654,\n 'co_prrq_asap' => '04',\n 'nombre' => 'CRASQUI',\n 'municipio_id' => 409,\n 'co_stat_data' => 'A',\n ),\n 1137 =>\n array(\n 'id' => 2658,\n 'co_prrq_asap' => '08',\n 'nombre' => 'DOS MOSQUISES SUR',\n 'municipio_id' => 409,\n 'co_stat_data' => 'A',\n ),\n 1138 =>\n array(\n 'id' => 2535,\n 'co_prrq_asap' => '01',\n 'nombre' => 'GRAN ROQUE',\n 'municipio_id' => 409,\n 'co_stat_data' => 'A',\n ),\n 1139 =>\n array(\n 'id' => 2661,\n 'co_prrq_asap' => '11',\n 'nombre' => 'IGUANA',\n 'municipio_id' => 409,\n 'co_stat_data' => 'A',\n ),\n 1140 =>\n array(\n 'id' => 2663,\n 'co_prrq_asap' => '13',\n 'nombre' => 'LA BORRACHA',\n 'municipio_id' => 409,\n 'co_stat_data' => 'A',\n ),\n 1141 =>\n array(\n 'id' => 2659,\n 'co_prrq_asap' => '09',\n 'nombre' => 'LOS TESTIGOS',\n 'municipio_id' => 409,\n 'co_stat_data' => 'A',\n ),\n 1142 =>\n array(\n 'id' => 2652,\n 'co_prrq_asap' => '02',\n 'nombre' => 'MADRISQUI',\n 'municipio_id' => 409,\n 'co_stat_data' => 'A',\n ),\n 1143 =>\n array(\n 'id' => 2660,\n 'co_prrq_asap' => '10',\n 'nombre' => 'TESTIGOS GRANDES',\n 'municipio_id' => 409,\n 'co_stat_data' => 'A',\n ),\n 1144 =>\n array(\n 'id' => 2518,\n 'co_prrq_asap' => '01',\n 'nombre' => 'CAP OCUMARE DE LA COSTA DE ORO',\n 'municipio_id' => 416,\n 'co_stat_data' => 'A',\n ),\n 1145 =>\n array(\n 'id' => 2532,\n 'co_prrq_asap' => '01',\n 'nombre' => 'EL CANTON',\n 'municipio_id' => 417,\n 'co_stat_data' => 'A',\n ),\n 1146 =>\n array(\n 'id' => 2534,\n 'co_prrq_asap' => '03',\n 'nombre' => 'PUERTO VIVAS',\n 'municipio_id' => 417,\n 'co_stat_data' => 'A',\n ),\n 1147 =>\n array(\n 'id' => 2533,\n 'co_prrq_asap' => '02',\n 'nombre' => 'SANTA CRUZ DE GUACAS',\n 'municipio_id' => 417,\n 'co_stat_data' => 'A',\n ),\n 1148 =>\n array(\n 'id' => 2665,\n 'co_prrq_asap' => '01',\n 'nombre' => 'ARCHIPIELAGO LOS MONJES',\n 'municipio_id' => 438,\n 'co_stat_data' => 'A',\n ),\n 1149 =>\n array(\n 'id' => 2666,\n 'co_prrq_asap' => '01',\n 'nombre' => 'ARCHIPIELAGO LAS AVES',\n 'municipio_id' => 439,\n 'co_stat_data' => 'A',\n ),\n 1150 =>\n array(\n 'id' => 2667,\n 'co_prrq_asap' => '01',\n 'nombre' => 'ARCHIPIELAGO LA ORCHILA',\n 'municipio_id' => 440,\n 'co_stat_data' => 'A',\n ),\n 1151 =>\n array(\n 'id' => 2668,\n 'co_prrq_asap' => '01',\n 'nombre' => 'ARCHIPIELAGO LOS HERMANOS',\n 'municipio_id' => 441,\n 'co_stat_data' => 'A',\n ),\n 1152 =>\n array(\n 'id' => 2669,\n 'co_prrq_asap' => '01',\n 'nombre' => 'ARCHIPIELAGO LOS FRAILES',\n 'municipio_id' => 442,\n 'co_stat_data' => 'A',\n ),\n 1153 =>\n array(\n 'id' => 2670,\n 'co_prrq_asap' => '01',\n 'nombre' => 'ARCHIPIELAGO LOS TESTIGOS',\n 'municipio_id' => 443,\n 'co_stat_data' => 'A',\n ),\n 1154 =>\n array(\n 'id' => 2671,\n 'co_prrq_asap' => '01',\n 'nombre' => 'ISLA LA TORTUGA',\n 'municipio_id' => 444,\n 'co_stat_data' => 'A',\n ),\n 1155 =>\n array(\n 'id' => 2672,\n 'co_prrq_asap' => '01',\n 'nombre' => 'ISLA LA BLANQUILLA',\n 'municipio_id' => 445,\n 'co_stat_data' => 'A',\n ),\n 1156 =>\n array(\n 'id' => 2673,\n 'co_prrq_asap' => '01',\n 'nombre' => 'ISLA LA SOLA',\n 'municipio_id' => 446,\n 'co_stat_data' => 'A',\n ),\n 1157 =>\n array(\n 'id' => 2674,\n 'co_prrq_asap' => '01',\n 'nombre' => 'ISLA DE PATOS',\n 'municipio_id' => 447,\n 'co_stat_data' => 'A',\n ),\n 1158 =>\n array(\n 'id' => 2675,\n 'co_prrq_asap' => '01',\n 'nombre' => 'ISLA DE AVES',\n 'municipio_id' => 448,\n 'co_stat_data' => 'A',\n ),\n );\n }", "public function copy_to_representation($id)\n {\n $this->_ci->employeedisputes->load($id);\n $this->_ci->representation->EmployeeNumber = $this->_ci->employeedisputes->EmployeeNumber;\n $this->_ci->representation->RepresentationAmt = $this->_ci->employeedisputes->TaxableAmt;\n $this->_ci->representation->Type = $this->_ci->db->escape('REP');\n $this->_ci->representation->PeriodStart = $this->_ci->db->escape($this->_ci->employeedisputes->PeriodStart);\n $this->_ci->representation->PeriodEnd = $this->_ci->db->escape($this->_ci->employeedisputes->PeriodEnd);\n $this->_ci->representation->Remarks = $this->_ci->db->escape($this->_adjtypes[$this->_ci->employeedisputes->Type] . ' - ' . $this->_ci->employeedisputes->Remarks);\n $this->_ci->representation->AuditUser = $this->_ci->employeedisputes->AuditUser;\n $this->_ci->representation->AuditDate = $this->_ci->db->escape($this->_ci->employeedisputes->AuditDate);\n $this->_ci->representation->insert();\n }", "function setAllValues($id=\"\",$condition=\"\")\n\t{\n\t\t$rs=$this->fetchRecordSet($id, $condition);\n\t\tif($artickets= mysql_fetch_array($rs))\n\t\t{\n\t\t\t$this->ticket_id = $artickets[\"ticket_id\"];\n\t\t\t$this->client_id = $artickets[\"client_id\"];\n\t\t\t$this->user_id = $artickets[\"user_id\"];\n\t\t\t$this->ticket_no = $artickets[\"ticket_no\"];\n\t\t\t$this->ticket_priority = $artickets[\"ticket_priority\"];\n\t\t\t$this->ticket_status = $artickets[\"ticket_status\"];\n\t\t\t$this->ticket_type_id = $artickets[\"ticket_type_id\"];\n\t\t\t$this->assign_to_user_id = $artickets[\"assign_to_user_id\"];\n\t\t\t$this->oppened_by_user_id = $artickets[\"oppened_by_user_id\"];\n\t\t\t$this->open_date = $artickets[\"open_date\"];\n\t\t\t$this->due_date = $artickets[\"due_date\"];\n\t\t\t$this->closed_by_user_id = $artickets[\"closed_by_user_id\"];\n\t\t\t$this->close_date = $artickets[\"close_date\"];\n\t\t\t$this->ticket_description = $artickets[\"ticket_description\"];\n\t\t\t$this->ticket_title = $artickets[\"ticket_title\"];\n\t\t\t$this->created_by = $artickets[\"created_by\"];\n\t\t\t$this->created_date = $artickets[\"created_date\"];\n\t\t\t$this->updated_by = $artickets[\"updated_by\"];\n\t\t\t$this->updated_date = $artickets[\"updated_date\"];\n\t\t}\n\t}", "public function loadData($id)\n {\n $this->id_identitas = $id;\n $data = IdentitasSekolah::find($id)->first();\n $this->nama = $data->nama;\n $this->nis = $data->nis;\n $this->alamat = $data->alamat;\n $this->kab = $data->kab;\n $this->provinsi = $data->provinsi;\n $this->negara = $data->negara;\n $this->email = $data->email;\n $this->web = $data->web;\n $this->telp = $data->telp;\n $this->pos = $data->pos;\n }", "function setAllValues($id = \"\",$condition = \"\")\n\t{\n\t\t$rs = $this->fetchRecordSet($id, $condition);\n\t\tif($artf_user = mysql_fetch_array($rs))\n\t\t{\n\t\t\t$this->user_id = $artf_user[\"user_id\"];\n\t\t\t$this->client_id = $artf_user[\"client_id\"];\n\t\t\t$this->user_type_id = $artf_user[\"user_type_id\"];\n\t\t\t$this->user_username = $artf_user[\"user_username\"];\n\t\t\t$this->user_password = $artf_user[\"user_password\"];\n\t\t\t$this->user_firstname = $artf_user[\"user_firstname\"];\n\t\t\t$this->user_lastname = $artf_user[\"user_lastname\"];\n\t\t\t$this->user_email = $artf_user[\"user_email\"];\n\t\t\t$this->user_company = $artf_user[\"user_company\"];\n\t\t\t$this->user_designation = $artf_user[\"user_designation\"];\n\t\t\t$this->user_phone = $artf_user[\"user_phone\"];\n\t\t\t$this->user_address1 = $artf_user[\"user_address1\"];\n\t\t\t$this->user_address2 = $artf_user[\"user_address2\"];\n\t\t\t$this->user_city = $artf_user[\"user_city\"];\n\t\t\t$this->user_state = $artf_user[\"user_state\"];\n\t\t\t$this->user_country = $artf_user[\"user_country\"];\n\t\t\t$this->user_zipcode = $artf_user[\"user_zipcode\"];\n\t\t\t$this->user_lastlogin = $artf_user[\"user_lastlogin\"];\n\t\t\t$this->user_isactive = $artf_user[\"user_isactive\"];\n\t\t\t$this->created_date = $artf_user[\"created_date\"];\n\t\t\t$this->created_by = $artf_user[\"created_by\"];\n\t\t\t$this->updated_date = $artf_user[\"updated_date\"];\n\t\t\t$this->updated_by = $artf_user[\"updated_by\"];\n\t\t}\n\t}", "function setAllValues($id=\"\",$condition=\"\")\n\t{\n\t\t$rs=$this->fetchRecordSet($id, $condition);\n\t\tif($artf_email_templates= mysql_fetch_array($rs))\n\t\t{\n\t\t\t$this->email_templates_id = $artf_email_templates[\"email_templates_id\"];\n\t\t\t$this->client_id = $artf_email_templates[\"client_id\"];\n\t\t\t$this->email_templates_name = $artf_email_templates[\"email_templates_name\"];\n\t\t\t$this->email_templates_description = $artf_email_templates[\"email_templates_description\"];\n\t\t\t$this->email_from = $artf_email_templates[\"email_from\"];\n\t\t\t$this->email_to = $artf_email_templates[\"email_to\"];\n\t\t\t$this->email_cc = $artf_email_templates[\"email_cc\"];\n\t\t\t$this->email_bcc = $artf_email_templates[\"email_bcc\"];\n\t\t\t$this->email_reply_to = $artf_email_templates[\"email_reply_to\"];\n\t\t\t$this->email_subject = $artf_email_templates[\"email_subject\"];\n\t\t\t$this->email_body = $artf_email_templates[\"email_body\"];\n\t\t\t$this->email_type = $artf_email_templates[\"email_type\"];\n\t\t\t$this->email_isactive = $artf_email_templates[\"email_isactive\"];\n\t\t\t$this->created_by = $artf_email_templates[\"created_by\"];\n\t\t\t$this->created_date = $artf_email_templates[\"created_date\"];\n\t\t\t$this->updated_by = $artf_email_templates[\"updated_by\"];\n\t\t\t$this->updated_date = $artf_email_templates[\"updated_date\"];\n\t\t}\n\t}", "public function save($id){\n\t\t$this->db->where('state_id' , $id);\n\t\t$query = $this->db->get(CITIES);\n\t\treturn $query->result_array();\n\t}", "private function setSubDataTableData()\n {\n foreach ($this->storageData->getDataTableFieldMap() as $key => $field) {\n $keysToUpdate = $field->getDataTable()->getCachedNewIds();\n $relatedModel = $field->getDataTable()->getModel();\n\n $this->storageData->getObject()->$key = $this->modelService->getObjects($relatedModel, $keysToUpdate);\n }\n }", "public function setData($id, $data);", "public function setRisksData() {\n\t\t$data = $this->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'ThirdParty.id' => $this->id\n\t\t\t),\n\t\t\t'contain' => array(\n\t\t\t\t'ThirdPartyRisk' => array(\n\t\t\t\t\t'fields' => array('id')\n\t\t\t\t)\n\t\t\t)\n\t\t));\n\n\t\t$this->TpRiskIds = array();\n\t\tforeach ($data as $tp) {\n\t\t\tforeach ($tp['ThirdPartyRisk'] as $tpr) {\n\t\t\t\t$this->TpRiskIds[] = $tpr['id'];\n\t\t\t}\n\t\t}\n\t}", "function locationDetail($id) {\n return $this->find($id)->toArray();\n }", "public static function Get_City_State_ByID_all($id){\n\t\t\n\t\tif(gettype($id)!=\"integer\")\n\t\t\treturn;\n\t\t\n\t\t$connection=Yii::app()->db;\n\t\t$sql = '\n\t\t\n SELECT intersezioni.nome, st_area(intersezioni.clipped_geom) / st_area(lotto.lotto) * 100::double precision AS percentuale\n FROM ( \n \t\tSELECT toccano.gid, toccano.id, toccano.nome, toccano.the_geom,\n \t\t\tst_intersection(toccano.the_geom, ST_Transform(( SELECT water_request_geometries.geom\n \t\t\t\t\t\t\t\t\t\t\tFROM water_request_geometries\n \t\t\t\t\t\t\t\t\t\t\tWHERE water_request_geometries.id = '.$id.'),\n \t\t\t\t\t\t\t\t\t\t '.Yii::app()->params['geoserver']['citystate_layer_srid'].')\n \t\t\t) AS clipped_geom\n FROM ( \n \t\tSELECT confini_comunali.gid, confini_comunali.id, confini_comunali.nome, confini_comunali.the_geom\n FROM confini_comunali\n WHERE st_intersects(\n \t\t\tconfini_comunali.the_geom,\n \t\t\tST_Transform(( SELECT water_request_geometries.geom\n \t\t\t\tFROM water_request_geometries\n \t\t\t\tWHERE water_request_geometries.id = '.$id.'),\n \t\t\t '.Yii::app()->params['geoserver']['citystate_layer_srid'].')\n )\n ) toccano\n ) intersezioni, ST_Transform(( SELECT water_request_geometries.geom\n \t\t\t\t\t\t\t\tFROM water_request_geometries\n \t\t\t\t\t\t\t\tWHERE water_request_geometries.id = '.$id.'),\n \t\t\t\t\t\t\t'.Yii::app()->params['geoserver']['citystate_layer_srid'].') lotto(lotto) ORDER BY percentuale DESC;\n\t\t';\n\t\t$command=$connection->createCommand($sql);\n\t\t$dataReader=$command->query();\n\t\t// retrieving all rows at once in a single array\n\t\t$rows=$dataReader->readAll();\n\t\t//Yii::log(print_r($rows) , CLogger::LEVEL_INFO, 'Query.DB'); // DEBUG\n\t\treturn $rows;\n\t\t\n\t}", "public function get_data() {\n return array_merge( array( 'id' => $this->get_id() ), $this->data);\n }", "function setId($id)\r\n\t{\r\n\t\t// Set related ID and wipe data\r\n\t\t$this->_id\t\t\t= $id;\r\n\t\t$this->_data\t\t= array();\r\n\t\t$this->_total\t\t= null;\r\n\t}", "public function setData() {\n\t\t$data = $this->get();\n\t\twhile ($snapshot = $data->fetch()) {\n\t\t\t$this->_store[] = $snapshot;\n\t\t}\n\t}", "public function getById($id)\n {\n $location = Table\\MapLocations::findById($id);\n if (isset($location->id)) {\n $this->data = array_merge($this->data, $location->getColumns());\n }\n }", "function setAll( $row , $trace = true )\n\n {\n\n \t\n\n \t$this->save['Id'] \t\t\t= $this->id = $row['Id'];\n\n\t \t$this->save['name'] \t\t= $this->name = $row['name'];\n\n\t \t$this->save['phone'] \t\t= $this->phone = $row['phone'];\n\n\t \t$this->save['email'] \t\t= $this->email = $row['email'];\n\n\t \t$this->save['DOB'] \t\t\t= $this->dob = $row['DOB'];\n\n\t\t$this->save['created_date']\t= $this->createddate = $row['created_date'];\n\n \t \t$this->save['username']\t\t= $this->username = $row['username'];\n\n\t\t$this->save['firebase_token']\t\t= $this->firebase_token = $row['firebase_token'];\n\n }", "protected function loadRegionData(){\r\n\t\t$col = Mage::getResourceModel('directory/region_collection');\r\n\t\tforeach($col as $regionObject){\r\n\t\t\t$this->_regionData[$regionObject->getCountryId()][$regionObject->getCode()]\t=\t$regionObject;\r\n\t\t}\r\n\t}", "protected function getOtherEmploymentsData($id)\n {\n return $this->getServiceLocator()->get('Helper\\TransportManager')->getOtherEmploymentData($id);\n }", "function general_post_data($id){\n\n\t\t$data = array(\n\t\t\t'employee_id' \t\t=> $this->input->post('i_employee', TRUE),\n\t\t\t'delivery_date' \t=> $this->format_date_day_mid($this->input->post('i_date', TRUE)),\n\t\t\t//'delivery_cost' \t=> $this->input->post('i_cost', TRUE),\n\t\t\t'delifery_freight_cost' \t=> $this->input->post('i_freight', TRUE)\n\t\t\t);\n\t\t\t\n\n\t\treturn $data;\n\t}", "public function setId($id)\n\t{\n\t\t$this->_id\t\t= $id;\n\t\t$this->_sdata\t= null;\n\t}", "public function __setDbData(){\n\t\t\t\n\t\t\t$this->dbdata = array(\n\t\t\t\t\t'uniqueid' => $this->uniqueid,\n\t\t\t\t\t'startpricing' => maybe_serialize($this->startpricing),\n\t\t\t\t\t'schedule' => maybe_serialize($this->schedule),\n\t\t\t\t\t'frequency' => maybe_serialize($this->frequency),\n\t\t\t\t\t'servicearea' => maybe_serialize($this->servicearea),\n\t\t\t\t\t'sqfootage' => maybe_serialize($this->sqfootage),\n\t\t\t\t\t'bedrooms' => maybe_serialize($this->bedrooms),\n\t\t\t\t\t'bathrooms' => maybe_serialize($this->bathrooms),\t\t\t\t\t\n\t\t\t\t\t'pets' => maybe_serialize($this->pets),\n\t\t\t\t\t'addServices' => maybe_serialize($this->addServices),\n\t\t\t\t\t'contactinfo' => maybe_serialize($this->contactinfo),\n\t\t\t\t\t'marketingRef' => maybe_serialize($this->marketingRef),\n\t\t\t\t\t'totalprice' => $this->totalprice,\n\t\t\t\t\t'isHourlyRate' => $this->isHourlyRate,\n\t\t\t\t\t'hourlyrate' => maybe_serialize($this->hourlyrate),\n\t\t\t\t\t'isActive' => $this->isActive,\n\t\t\t\t\t'isLocked' => $this->isLocked,\n\t\t\t\t\t'payment' => maybe_serialize($this->payment) \n\t\t\t);\n\t\t}", "public function setData($receieveDataArray){\n if(array_key_exists(\"id\",$receieveDataArray)){\n $this->id = $receieveDataArray['id'];\n }\n if(array_key_exists(\"deptName\",$receieveDataArray)){\n $this->deptName = $receieveDataArray['deptName'];\n }\n }", "public function load_by_id( $id ){\n\t\t\tglobal $wpdb;\n\t\t\t\n\t\t\t$results = $wpdb->get_results( \n\t\t\t\t\"SELECT * FROM {$wpdb->prefix}gate WHERE id = '{$id}' LIMIT 1;\" ,\n\t\t\t\t\"ARRAY_A\"\n\t\t\t);\n\t\t\t\n\t\t\t$gate = $results[0];\n\t\t\t\n\t\t\t$this->gate_id = $gate[ 'id' ];\n\t\t\tunset( $gate[ 'id' ] );\n\t\t\t\n\t\t\t//Set Data\n\t\t\t$this->obj = json_decode( $gate[ 'data' ] , true );\n\t\t\tunset( $gate[ 'data' ] );\n\t\t\t\n\t\t\t//dump( __LINE__, __METHOD__, $gate );\n\t\t\t\n\t\t\t//all remaining data coming from DB should have a corresponding property. \n\t\t\tforeach( $gate as $key => $val )\n\t\t\t\t$this->$key = $val;\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//Finish setting up properties found in the data. \n\t\t\t$this->setup( $this->obj );\n\t\t}", "private function setIdFields()\n\t{\n\t\t$this->searchCustomFieldsInDbase();\n\t\t\n\t\t//2.Recorremos el arreglo y comparamos los campos personalizados encontrados de la base de datos para\n\t\t//obtener los identificadores.\n\t\t$search = array('Ñ', 'ñ', 'Á', 'á', 'É', 'é', 'Í', 'í', 'Ó', 'ó', 'Ú', 'ú');\n\t\t$replace = array('N', 'n', 'A', 'a', 'E', 'e', 'I', 'i', 'O', 'o', 'U', 'u');\n\t\t\n\t\t$this->idFields = array();\n\t\t$this->fieldsDB = array();\n\t\t\n\t\tif ($this->fieldsInDbase) {\n\t\t\t\n\t\t\t$ff = array();\n\t\t\tforeach ($this->fieldsInDbase as $r) {\n\t\t\t\tforeach ($this->customFields as $c) {\n\t\t\t\t\t$fieldDB = str_replace($search, $replace, $r->name);\n\t\t\t\t\t$fieldDB = strtoupper($fieldDB);\n\t\t\t\t\t$fieldHtml = str_replace(array('_', '%%'), array(' ', ''), $c);\n\t\t\t\t\tif ($fieldDB == $fieldHtml) {\n\t\t\t\t\t\t$this->idFields[] = $r->idCustomField;\n\t\t\t\t\t\t$ff[$r->idCustomField] = $c;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$this->customFields = $ff;\n\t\t}\n\t}", "public function persist()\n {\n foreach (static::$data as & $row) {\n if ($row['id'] == $this->id) {\n foreach ($this as $key => $value) {\n $row[$key] = $value;\n }\n }\n }\n }", "public static function getAssignArray($id){\n\t\t$t = JTable::getInstance('Assign', 'GeofactoryTable');\n\t\t$t->load($id) ;\n\n\t\t$vRet = array() ;\n\t\t$fields = array(\"field_latitude\",\"field_longitude\",\"field_street\",\"field_postal\",\"field_city\",\"field_county\",\"field_state\",\"field_country\") ;\n\t\t// pour chaque champs, si il est utilisé on le mets dans le vecteur.\n\t\tforeach ($fields as $f){ \n\t\t\tif ((isset($t->$f)) AND ($t->$f != '0'))\t\n\t\t\t\t$vRet[$f] = $t->$f ;\n\t\t} \n\n\t\treturn $vRet ;\n\t}", "public function setRecordId($id)\n {\n\n $this->id = $id;\n\n }", "private function init ($id) {\n\t\t$connection = new PDO('mysql:host=example.com;dbname=database', 'user', 'password');\n\t\t$sql = 'SELECT name, status FROM objects WHERE id = :\"$this->id\"';\n\t\t$result = connection->prepare($sql);\n\t\t$result->execute(['id'=>$this->id]);\n\t\t\n\t\t$data = $result->fetch();\n\n\t\t// $this->setName($data['name']);\n\t\t// $this->setStatus($data['status']);\n\t\t$this->data = $data;\n\n\t}", "private function getLeadData() : array\n {\n $result = [];\n foreach ($this->results['data'] AS $data) {\n $result[] = [\n $data->id,\n $data->created_at,\n $data->current_sit,\n $data->tax_debt,\n $data->enrolled_irs,\n $data->first_name,\n $data->last_name,\n $data->email_address,\n $data->primary_phone,\n $data->state,\n ];\n }\n return $result;\n }", "public function data($id);", "public static function setArray($id_value_array){\n foreach($id_value_array as $v){\n self::set($v[0], $v[1]);}}", "public function setRecord($data, $type)\n {\n $addressArray = array('city','county','state','country');\n $defaultAddress = unserialize($this->detail);\n \n $address = array();\n\n \n foreach ($addressArray as $value) {\n \n if (isset($data['address']) && $data['address'] == 'default') {\n $address[$value] = $defaultAddress[$value];\n } else {\n if (empty($type.'_'.$value) && isset($defaultAddress[$value])) {\n $data[$type.'_'.$value] = $this->$value;\n }\n $address[$value] = $data[$type.'_'.$value];\n }\n \n }\n \n $year['date'] = null;\n \n if(isset($data[$type.'_year'])) {\n \n // Setting date \n $year['date'] = $data[$type.'_year'];\n }\n\n // No of witness\n $wittnessNo = 3;\n \n for($i= 1; $i <= $wittnessNo; $i++) {\n $nameArray[] = 'wittness'.$i;\n }\n \n // Setting the name\n foreach ($nameArray as $value) {\n \n $name[$value]['first_name'] = $data[$type.'_'.$value.'_first_name'];\n $name[$value]['last_name'] = $data[$type.'_'.$value.'_last_name'];\n }\n\n return array('address' => $address, 'date' => $year['date'], 'name' => $name);\n }", "public function updateData($id)\n {\n // TODO: Implement updateData() method.\n }", "public function __set($id, $data) {\n\t\t$this->store($id, $data);\n\t}", "public function __set($id, $data) {\n\t\t$this->store($id, $data);\n\t}", "public function setDataByProvinceId() {\n\t\t$province_id = $this->input->post ( 'province_id' );\n\t\t$data = $this->conn->getDataByProvinceId ( $province_id );\n\t\tdie ( \"{data : \" . json_encode ( $data ) . \"}\" );\n\t}", "function setAll($phonebook_id,$number,$description) {\n $this->phonebook_id = $phonebook_id;\n $this->number = $number;\n $this->description = $description;\n }", "function _row_data($id) {\n $custom_fields = $this->Custom_fields_model->get_available_fields_for_table(\"master_vendor\", $this->login_user->is_admin, $this->login_user->user_type);\n $options = array(\n \"id\" => $id\n );\n\n $data = $this->Vendor_model->get_details($options)->row();\n return $this->_make_row($data, $custom_fields);\n }", "private function _get_leavedata( $id ){\n\t $leave_data = DB::table( 'n_leave_type' )\t \n\t ->where( 'leave_type_id', '=', $id )\n\t ->first();\n\t return $leave_data; \n\t}", "public function ed_data($id)\n\n\t\t{\n\n\t\t\t$this->db->where($this->pro->banner.'_id',$id);\n\t\t\t$rs = $this->db->get($this->pro->prifix.$this->pro->banner);\n\n\t\t\treturn $rs->row_array();\n\n\t\t\t\n\n\t\t}", "public function populate($data = array())\n {\n $this->id = $data['id'];\n }", "public function populate($id) {\n $this->jobId = $id;\n $query = \"SELECT * FROM jobs WHERE job_id=\".$id;\n\n $db = new DB_Connection();\n\n $result = $db->retrieveResults($query);\n if (@mysql_num_rows($result)) {\n while ($r=@mysql_fetch_assoc($result)) {\n $this->setCompany($r[\"company\"]);\n $this->setJobTitle($r[\"job_title\"]);\n $this->setCity($r[\"city\"]);\n $this->setDescription($r[\"desc\"]);\n $this->setJobLink($r[\"job_link\"]);\n $this->setDateUpdated($r[\"date\"]);\n $this->setPublished($r[\"published\"]);\n $this->setIsInternal($r[\"isInternal\"]);\n }\n }\n\n $query = \"SELECT * FROM job_category_map WHERE job_id=\".$id;\n $result = $db->retrieveResults($query);\n $categories = \"\";\n if (@mysql_num_rows($result)) {\n while ($r=@mysql_fetch_assoc($result)) {\n $categories .= $r[\"job_category_id\"];\n $categories .=\"|\";\n \n }\n \n $this->setCategories($categories);\n } \n }", "public function getStateDataById( $id = null )\n {\n $getList = $this->findById( $id );\n return $getList; \n }", "function setId($id)\n\t{\n\t\t// Set person id and wipe data\n\t\t$this->_pers_id\t\t= $id;\n\t\t$this->_data\t= null;\n\t}", "function importdata($id, $record) {\n // kalau blm ada, insert\n $this->_db->where('IDHoliday', $id);\n if ($this->_db->count_all_results($this->_table) > 0) {\n $this->update($id, $record);\n } else {\n $this->insert($record);\n }\n }", "public function reset()\n {\n $this->values[self::wholesaler_id] = array();\n $this->values[self::store_id] = array();\n }", "public function edit($id)\n {\n\n $data = [];\n $data['record'] = Map::findOrFail($id);\n $data['datasets_list'] = Dataset::pluck('title', 'id');\n $data['tilesets_list'] = Tileset::pluck('title', 'id');\n $data['categories_list'] = Category::pluck('title', 'id');\n $data['tags'] = explode(',', $data['record']->tags);\n $data['legends'] = $data['record']->legends()->orderBy('sort', 'ASC')->get();\n\n $dataArray = [];\n\n foreach ($data['record']->datasets as $key => $dataset) {\n\n if ($dataset) {\n\n if (in_array($dataset->file_type, config('pmaps.csv'))) {\n $file_data = json_decode($dataset->file_data, true);\n $file_data[0] = str_replace(\"longitude\", \"lng\", str_replace(\"latitude\", \"lat\", $file_data[0]));\n $file_data[0] = str_replace(\"Longitude\", \"lng\", str_replace(\"Latitude\", \"lat\", $file_data[0]));\n $csv = \"\";\n\n foreach($file_data as $csvdata) {\n $csv .= implode(\",\", $csvdata) . \";\";\n }\n \n $dataset->file_data = addslashes($csv);\n }\n\n $dataArray[$key] = $dataset;\n\n }\n }\n\n $data['datasets'] = collect($dataArray);\n\n if(count($data['record']->tilesets)) {\n $data['tilesets'] = $data['record']->tilesets;\n } else {\n $data['tilesets'] = collect([ (object) config('pmaps.map.tileset') ]);\n }\n \n return view('maps.edit', $data);\n }", "public function loadById ($id) {\r\n\t\t$values = array_merge($this->getParent ()->loadById($id), $this->_loadById($id));\r\n\t\t$this->setValues ($values);\r\n\r\n\t\treturn $values;\t\t\r\n\t}", "public function setId($id)\n {\n $this->data['id'] = $id;\n }", "public function state_zone_list_all($id)\r\r\n\r\r\n\t{\r\r\n\r\r\n\t\t \t$res_county = $this->db->query(\"SELECT * FROM kr_users WHERE admin_type='state_zone' and State_admin_id='$id'\");\r\r\n\r\r\n\t\t \treturn $res_county->result_array();\r\r\n\r\r\n\t}", "public function setData($data){\n $this->setId($data['id']);\n $this->setMes($data['mes']);\n $this->setano($data['ano']);\n $this->setIndiceJAN3($data['IndiceJAN3']);\n $this->setIndiceINPC_E($data['IndiceINPC_E']);\n $this->setJuros3_E($data['Juros3_E']);\n $this->setNovoIndice_E($data['NovoIndice_E']);\n\n }", "function setId($id)\n\t{\n\t\t// Set record id and wipe data, if setting a different ID\n\t\tif ($this->_id != $id)\n\t\t{\n\t\t\t$this->_id = (int) $id;\n\t\t\t$this->_record = null;\n\t\t\t$this->setState($this->getName() . '.id', $this->_id);\n\t\t}\n\t}", "abstract protected function loadData($id);", "public function getData($id)\n\t{\n\t\t$id = (int)$id;\n\t\t$sql = 'SELECT * FROM ' . TABLE_PREFIX . 'archivedorder a\n\t\t\t\tWHERE a.o_id = ?';\n\t\t$row = $this->db->query($sql, array($id))->fetch();\n\n\t\t$this->id = $row['o_id'];\n\t\t$this->ordertypeid = $row['o_ordertypeid'];\n\t\t$this->saleorderid = $row['o_saleorderid'];\n\t\t$this->deliverytypeid = $row['o_deliverytypeid'];\n\t\t$this->datearchived = $row['o_datearchived'];\n\t\t$this->companyid = $row['o_companyid'];\n\t\t$this->customerid = $row['o_customerid'];\n\t\t$this->customername = $row['o_customername'];\n\t\t$this->customeraddress = $row['o_customeraddress'];\n\t\t$this->customerphone = $row['o_customerphone'];\n\t\t$this->contactname = $row['o_contactname'];\n\t\t$this->gender = $row['o_gender'];\n\t\t$this->ageid = $row['o_ageid'];\n\t\t$this->deliveryaddress = $row['o_deliveryaddress'];\n\t\t$this->provinceid = $row['o_provinceid'];\n\t\t$this->districtid = $row['o_districtid'];\n\t\t$this->isreviewed = $row['o_isreviewed'];\n\t\t$this->payabletypeid = $row['o_payabletypeid'];\n\t\t$this->currencyunitid = $row['o_currencyunitid'];\n\t\t$this->currencyexchange = $row['o_currencyexchange'];\n\t\t$this->totalquantity = $row['o_totalquantity'];\n\t\t$this->totalamount = $row['o_totalamount'];\n\t\t$this->totaladvance = $row['o_totaladvance'];\n\t\t$this->shippingcost = $row['o_shippingcost'];\n\t\t$this->debt = $row['o_debt'];\n\t\t$this->discountreasonid = $row['o_discountreasonid'];\n\t\t$this->discount = $row['o_discount'];\n\t\t$this->originatestoreid = $row['o_originatestoreid'];\n\t\t$this->isoutproduct = $row['o_isoutproduct'];\n\t\t$this->outputstoreid = $row['o_outputstoreid'];\n\t\t$this->isincome = $row['o_isincome'];\n\t\t$this->isdeleted = $row['o_isdeleted'];\n\t\t$this->promotiondiscount = $row['o_promotiondiscount'];\n\t\t$this->vouchertypeid = $row['o_vouchertypeid'];\n\t\t$this->voucherconcern = $row['o_voucherconcern'];\n\t\t$this->deliveryuser = $row['o_deliveryuser'];\n\t\t$this->saleprogramid = $row['o_saleprogramid'];\n\t\t$this->totalpaid = $row['o_totalpaid'];\n\t\t$this->issmspromotion = $row['o_issmspromotion'];\n\t\t$this->deliverytime = $row['o_deliverytime'];\n\t\t$this->isdelivery = $row['o_isdelivery'];\n\t\t$this->deliveryupdatetime = $row['o_deliveryupdatetime'];\n\t\t$this->ismove = $row['o_ismove'];\n\t\t$this->parentsaleorderid = $row['o_parentsaleorderid'];\n\t\t$this->thirdpartyvoucher = $row['o_thirdpartyvoucher'];\n\t\t$this->payabletime = $row['o_payabletime'];\n\t\t$this->createdbyotherapps = $row['o_createdbyotherapps'];\n\t\t$this->contactphone = $row['o_contactphone'];\n\t\t$this->customercarestatusid = $row['o_customercarestatusid'];\n\t\t$this->totalprepaid = $row['o_totalprepaid'];\n\t\t$this->crmcustomerid = $row['o_crmcustomerid'];\n\t\t$this->IsDetail = $row['o_IsDetail'];\n\t\t$this->originatestoreregionid = $row['o_originatestoreregionid'];\n\t\t$this->outputstoreregionid = $row['o_outputstoreregionid'];\n\t\t$this->createdate = $row['o_createdate'];\n\t\t$this->lat = $row['o_lat'];\n\t\t$this->lng = $row['o_lng'];\n\t\t$this->iscomplete = $row['o_iscomplete'];\n\t\t$this->taxid = $row['o_taxid'];\n\t\t$this->note = $row['o_note'];\n\t\t$this->revieweduser = $row['o_revieweduser'];\n\t\t$this->revieweddate = $row['o_revieweddate'];\n\t\t$this->outproductdate = $row['o_outproductdate'];\n\t\t$this->inputtime = $row['o_inputtime'];\n\t\t$this->userdeleted = $row['o_userdeleted'];\n\t\t$this->datedelete = $row['o_datedelete'];\n\t\t$this->contentdeleted = $row['o_contentdeleted'];\n\t\t$this->staffuser = $row['o_staffuser'];\n\t\t$this->printtimes = $row['o_printtimes'];\n\t\t$this->deliveryupdateuser = $row['o_deliveryupdateuser'];\n\t\t$this->movetime = $row['o_movetime'];\n\t\t$this->outputuser = $row['o_outputuser'];\n\t\t$this->deliveryuserupdatetime = $row['o_deliveryuserupdatetime'];\n\t\t$this->deliveryuserupdateuser = $row['o_deliveryuserupdateuser'];\n\t\t$this->customercarestausupdatetime = $row['o_customercarestausupdatetime'];\n\t\t$this->customercarestatusupdateuser = $row['o_customercarestatusupdateuser'];\n\t\t$this->contactid = $row['o_contactid'];\n\t\t$this->customercode = $row['o_customercode'];\n\t\t$this->birthday = $row['o_birthday'];\n\t\t$this->customeridcard = $row['o_customeridcard'];\n\t\t$this->createdapplicationid = $row['o_createdapplicationid'];\n\t\t$this->iscreatefromoutputreceipt = $row['o_iscreatefromoutputreceipt'];\n\t\t$this->iscreatefromsimprocessreq = $row['o_iscreatefromsimprocessreq'];\n\t\t$this->bankvoucher = $row['o_bankvoucher'];\n\t\t$this->processuser = $row['o_processuser'];\n\t\t$this->contractid = $row['o_contractid'];\n\t\t$this->isinputimeicomplete = $row['o_isinputimeicomplete'];\n\t\t$this->organizationname = $row['o_organizationname'];\n\t\t$this->positionname = $row['o_positionname'];\n\t\t$this->currentreviewlevelid = $row['o_currentreviewlevelid'];\n\t\t$this->mspromotionlevelidlist = $row['o_mspromotionlevelidlist'];\n\t\t$this->crmcustomercardcode = $row['o_crmcustomercardcode'];\n\t\t$this->iswarningduplicatesaleorder = $row['o_iswarningduplicatesaleorder'];\n\t\t$this->duplicatesaleorderid = $row['o_duplicatesaleorderid'];\n\t\t$this->pointpaid = $row['o_pointpaid'];\n\t\t$this->inputuser = $row['o_inputuser'];\n\t\t$this->datedelete = $row['o_datedelete'];\n\n\t}", "final public function setId($id)\n {\n $this->data['id'] = $id;\n }", "public function _save_data()\n\t{\n\t\t//pull the data from the event\n\t\t$incident = Event::$data;\n\t\t\n\t\t\n\t\t$data = $incident->as_array();\n\t\t$data['location'] = $incident->location->as_array();\n\t\t$data['incident_person'] = $incident->incident_person->as_array();\n\t\t\n\t\t$data['category'] = array();\n\t\tforeach ($incident->category as $category)\n\t\t{\n\t\t\t$data['category'][] = $category->as_array();\n\t\t}\n\t\t\n\t\t$data['form_response'] = array();\n\t\tforeach ($incident->form_response as $response)\n\t\t{\n\t\t\t$data['form_response'][] = $response->as_array();\n\t\t}\n\t\t\n\t\t$data['media'] = array();\n\t\tforeach ($incident->media as $media)\n\t\t{\n\t\t\t$data['media'][] = $media->as_array();\n\t\t}\n\t\t\n\t\t$revision = ORM::factory('revision_incident');\n\t\t$revision->incident_id = $incident->id;\n\t\t$revision->data = serialize($data);\n\t\tif (Auth::instance()->get_user() instanceof User_Model)\n\t\t{\n\t\t\t$revision->user_id = Auth::instance()->get_user()->id;\n\t\t}\n\t\t\n\t\t// Get previous revision\n\t\t$prev_revision = ORM::factory('revision_incident')->where('incident_id',$incident->id)->orderby('time','DESC')->find();\n\t\t\n\t\t// Save the diff from previous version\n\t\tif ($prev_revision->loaded)\n\t\t{\n\t\t\t$revision->changed_data = serialize($revision->diff($prev_revision));\n\t\t}\n\t\t\n\t\t$revision->save();\n\t}", "public function CargarDatosEmpresaupd($id)\n {\n $response = [];\n $consulta2 = mysqli_query($this->conexion, \"SELECT empresas.*,departamento.codigo FROM empresas,ciudad,departamento WHERE empresas.ciudad=ciudad.codigo and ciudad.departamento=departamento.codigo and empresas.id=$id\");\n\n if ($datos = mysqli_fetch_array($consulta2)) {\n //$id,$nit,$raz,$act,$tam,$dep,$ciu,$dir,$cp,$tel,$ema,$ndoc,$dcrl,$grl,$aluc,$rep\n $num_ver=\"0\";\n if($datos['num_ver']!=0 && $datos['num_ver']!=null)\n {\n $num_ver=$datos['num_ver'];\n }\n $response = [\n $datos['id'],\n $datos['nit'],\n $datos['razon_social'],\n $datos['act_eco'],\n $datos['tam'],\n $datos['codigo'],\n $datos['ciudad'],\n $datos['direccion'],\n $datos['cod_postal'],\n $datos['tel'],\n $datos['email'],\n $datos['num_doc_rl'],\n $datos['tip_ide_rl'],\n $datos['gen_rl'],\n $datos['ent_al'],\n $datos['rep_legal'],\n $datos['tel_con'],\n $datos['car_con'],\n $num_ver,\n $datos['fec_cons']\n ];\n }\n\n echo json_encode($response);\n }", "function toeditEpisodeData($id) {\n $this->db->select('*,id as episode_id');\n $this->db->from('episodes');\n $this->db->where('id', $id);\n $query = $this->db->get();\n return $query->row_array();\n }", "public function setId($id)\n {\n $this->setIdProbaResourceClimate($id);\n }", "public function setfor($id='')\n {\n return $this->setId($id);\n }", "public function location_data(){\n $table = 'location';\n $primaryKey = \"id\";\n // indexes\n $columns = array(\n array( 'db' => 'id', 'dt' => \"id\", 'field' => 'id'),\n array( 'db' => 'name', 'dt' => \"name\", 'field' => 'name' ),\n array( 'db' => 'type', 'dt' => \"type\", 'field' => 'type' ),\n array( 'db' => 'country', 'dt' => \"country\", 'field' => 'country' ),\n array( 'db' => 'province', 'dt' => \"province\", 'field' => 'province' ),\n array( 'db' => 'district', 'dt' => \"district\", 'field' => 'district' ),\n array( 'db' => 'commune', 'dt' => \"commune\", 'field' => 'commune' ),\n array( 'db' => 'village', 'dt' => \"village\", 'field' => 'village' )\n );\n\n $sql_details = array(\n 'user' => $this->sys->username,\n 'pass' => $this->sys->password,\n 'port' => $this->sys->port,\n 'db' => $this->sys->database,\n 'host' => $this->sys->hostname\n );\n\n $this->load->model('datatable');\n echo json_encode(Datatable::simple($_POST, $sql_details,$table,$primaryKey, $columns));\n\n }", "public function edit($id)\n { \n $ShowRoomAdmin = Company::where('myid',$id)->first();\n $countries = DB::table('countries')->get();\n $cities = DB::table('city')->get();\n\n $cityid = DB::table('showroom_city')->where('admin_id',$id)->get();\n\n \n $result['countries'] = $countries;\n $result['cities'] = $cities;\n\n $setProperty = array();\n \n foreach ($cityid as $value) {\n $setProperty[] = $value->city_id;\n }\n\n return view('admin.company.edit', compact('ShowRoomAdmin','result','setProperty'));\n }", "protected function hydrate($dataSet)\r\n {\r\n $this->id = $dataSet['id'];\r\n $this->mini = $dataSet['mini'];\r\n $this->maxi = $dataSet['maxi'];\r\n $this->grade = $dataSet['grade'];\r\n $this->extBareme = $dataSet['bareme_id'];\r\n }", "public function edit($id)\n {\n //\n $this->data[\"RecordData\"] = Role_User::find($id);\n return $this->data;\n }", "function setArrCommon()\n\t{\n\t\tself::$_arr=array('id','value','ordering');\n\t}", "function LoadDbValues(&$rs) {\n\t\tif (!$rs || !is_array($rs) && $rs->EOF) return;\n\t\t$row = is_array($rs) ? $rs : $rs->fields;\n\t\t$this->hotel_id->DbValue = $row['hotel_id'];\n\t\t$this->h_name->DbValue = $row['h_name'];\n\t\t$this->h_slug->DbValue = $row['h_slug'];\n\t\t$this->h_feature_image->Upload->DbValue = $row['h_feature_image'];\n\t\t$this->h_description->DbValue = $row['h_description'];\n\t\t$this->h_meta_key->DbValue = $row['h_meta_key'];\n\t\t$this->h_deatail->DbValue = $row['h_deatail'];\n\t\t$this->h_facilities->DbValue = $row['h_facilities'];\n\t\t$this->h_address->DbValue = $row['h_address'];\n\t\t$this->h_create->DbValue = $row['h_create'];\n\t\t$this->dest_id->DbValue = $row['dest_id'];\n\t\t$this->province->DbValue = $row['province'];\n\t\t$this->whylike->DbValue = $row['whylike'];\n\t\t$this->lang_spoken->DbValue = $row['lang_spoken'];\n\t\t$this->map->DbValue = $row['map'];\n\t\t$this->what_todo->DbValue = $row['what_todo'];\n\t\t$this->h_id_cod->DbValue = $row['h_id_cod'];\n\t\t$this->h_email->DbValue = $row['h_email'];\n\t\t$this->h_contact_name->DbValue = $row['h_contact_name'];\n\t\t$this->h_pass->DbValue = $row['h_pass'];\n\t\t$this->h_contact_phone->DbValue = $row['h_contact_phone'];\n\t\t$this->h_site->DbValue = $row['h_site'];\n\t\t$this->contact_fax->DbValue = $row['contact_fax'];\n\t\t$this->star_rating->DbValue = $row['star_rating'];\n\t\t$this->create_date->DbValue = $row['create_date'];\n\t\t$this->update_date->DbValue = $row['update_date'];\n\t\t$this->h_online_status->DbValue = $row['h_online_status'];\n\t\t$this->hotel_blocked->DbValue = $row['hotel_blocked'];\n\t}", "function LoadDbValues(&$rs) {\n\t\tif (!$rs || !is_array($rs) && $rs->EOF) return;\n\t\t$row = is_array($rs) ? $rs : $rs->fields;\n\t\t$this->hotel_id->DbValue = $row['hotel_id'];\n\t\t$this->h_name->DbValue = $row['h_name'];\n\t\t$this->h_slug->DbValue = $row['h_slug'];\n\t\t$this->h_feature_image->Upload->DbValue = $row['h_feature_image'];\n\t\t$this->h_description->DbValue = $row['h_description'];\n\t\t$this->h_meta_key->DbValue = $row['h_meta_key'];\n\t\t$this->h_deatail->DbValue = $row['h_deatail'];\n\t\t$this->h_facilities->DbValue = $row['h_facilities'];\n\t\t$this->h_address->DbValue = $row['h_address'];\n\t\t$this->h_create->DbValue = $row['h_create'];\n\t\t$this->dest_id->DbValue = $row['dest_id'];\n\t\t$this->province->DbValue = $row['province'];\n\t\t$this->whylike->DbValue = $row['whylike'];\n\t\t$this->lang_spoken->DbValue = $row['lang_spoken'];\n\t\t$this->map->DbValue = $row['map'];\n\t\t$this->what_todo->DbValue = $row['what_todo'];\n\t\t$this->h_id_cod->DbValue = $row['h_id_cod'];\n\t\t$this->h_email->DbValue = $row['h_email'];\n\t\t$this->h_contact_name->DbValue = $row['h_contact_name'];\n\t\t$this->h_pass->DbValue = $row['h_pass'];\n\t\t$this->h_contact_phone->DbValue = $row['h_contact_phone'];\n\t\t$this->h_site->DbValue = $row['h_site'];\n\t\t$this->contact_fax->DbValue = $row['contact_fax'];\n\t\t$this->star_rating->DbValue = $row['star_rating'];\n\t\t$this->create_date->DbValue = $row['create_date'];\n\t\t$this->update_date->DbValue = $row['update_date'];\n\t\t$this->h_online_status->DbValue = $row['h_online_status'];\n\t\t$this->hotel_blocked->DbValue = $row['hotel_blocked'];\n\t}", "private function set_data($data) {\n\t\t\t$this->id\t = $data[site::$fields['id']];\n\t\t\t$this->name\t = $data[site::$fields['name']];\n\t\t\t$this->scan\t = $data[site::$fields['scan']];\n\t\t\t$this->refresh= $data[site::$fields['refresh']];\n\t\t\t$this->loaded = true;\n\t\t\t$this->load_rooms();\n\t\n\t\t}", "public function updateData(array $data,$id) {\n $where = \"id = \".$id;\n $fields = $this->info(Zend_Db_Table_Abstract::COLS);\n foreach ($data as $field => $value) {\n if (!in_array($field, $fields)) {\n unset($data[$field]);\n }\n }\n \n\t\tif($data['time_loged'])\n\t\t{\n\t\t\t$data['time_loged'] = date('Y-m-d H:i:s', strtotime($data['time_loged']));\n }\n\t\t$data['modified'] = date('Y-m-d H:i:s'); \n return $this->update($data,$where);\n }", "function setArrPro()\n\t{\n\t\tself::$_arr=array('id','title','type_id','kind_id','price','address','town_id','area_id',\n\t\t\t\t'living_space','rooms','bath_room','toilets','floor','advantages','description',\n\t\t\t\t'published','ordering','emphasis','date_created','checked_out','direction_id',\n\t\t\t\t'contact_name','contact_address', 'contact_phone', 'project_id' , 'living_width',\n\t\t\t\t'living_length','project_type_id','legal_id','currency_id','area_unit_id',\n\t\t\t\t'new_sest','realtor_id', 'map_lat' ,'map_lng' , 'success' ,'kind_value' ,'town_value');\n\t}", "public function edit(Request $request, $id) {\n\n $state_id = $id;\n $stateData = array();\n \n \n\n // dd($states);\n $stateData['countryDetails'] = Country::where('status',1)->where('deleted_at',NULL)->get();\n \n $stateData['states'] = State::where('id', $state_id)->first();;\n\n $stateData['localData'] = [];\n foreach($stateData['states']->local as $l) {\n $stateData['localData'][$l->lang_code] = $l->name; \n }\n //dd($stateData);\n return view('state/edit',$stateData);\n\n }", "public function edit($id){\n\t\t$data['restaurant'] = $this->Restaurant_model->getrestaurantById($id);\t\n\t\t$data['allHotel'] = $this->Restaurant_model->getHotel();\n\t\t$data['allCuisine'] = $this->Restaurant_model->getCuisine();\n\t\t$data['allSeating'] = $this->Restaurant_model->getSeating();\n\t\t$data['allFacilities'] = $this->Restaurant_model->getFacilities();\n\t\t$data['allTag'] = $this->Restaurant_model->getTag();\n\t\t$data['allType'] = $this->Restaurant_model->getType();\n\t\t$data['allMenu'] = $this->Restaurant_model->getMenu();\n\t\t$data['getMenubyIDdata'] = $this->Restaurant_model->RestMenubyID($id);\t\t\n\t\t$data['getResTime'] = $this->Restaurant_model->getResTimebyID($id);\t\t\n\t\t$data['allRegion'] = $this->Restaurant_model->getRegion();\n\t\t$data['allstate'] = $this->Restaurant_model->getState();\n\t\t\n\t\t$data['Fetchcity'] = $this->Restaurant_model->AllCity();\n\t\t\n\t\t$resstateId=$data['restaurant']['State'];\n\t\t$data['allcity'] = $this->Restaurant_model->getCity($resstateId);\n\t\t$rescityID=$data['restaurant']['City'];\n\t\t$data['allarea'] = $this->Restaurant_model->getArea($rescityID);\n\t\t\t\n\t \t$this->form_validation->set_rules('hotal_id', 'Hotel Name', 'trim|required');\t\t\t\n\t\t$this->form_validation->set_rules('restaurant_name', 'Restaurant', 'trim|required');\n\t\t/*$this->form_validation->set_rules('cuisines', 'cuisines', 'trim|required');*/\n\t\t/*$this->form_validation->set_rules('seating', 'seating', 'trim|required');\n\t\t$this->form_validation->set_rules('facilities', 'facilities', 'trim|required');\n\t\t$this->form_validation->set_rules('tag', 'tag', 'trim|required');*/\n\t/*\t$this->form_validation->set_rules('type', 'Restaurant Type', 'trim|required');\n\t\t$this->form_validation->set_rules('State', 'State', 'trim|required');\n\t\t$this->form_validation->set_rules('City', 'City', 'trim|required');\n\t\t$this->form_validation->set_rules('Area', 'Area', 'trim|required');\n\t\t$this->form_validation->set_rules('Res_address', 'Address', 'trim|required');\n\t\t$this->form_validation->set_rules('Contact_Name', 'Contact Name', 'trim|required|alpha');\n\t\t$this->form_validation->set_rules('Contact_NO', 'Contact Number', 'trim|required');\n\t\t$this->form_validation->set_rules('CallUs', 'CallUs number', 'trim|required');\n\t\t$this->form_validation->set_rules('Support_Email', 'Support Email', 'trim|required|valid_email');\n\t\t$this->form_validation->set_rules('Contact_Email', 'Contact Email', 'trim|required|valid_email');\n\t\t$this->form_validation->set_rules('Order_Email', 'Order Email', 'trim|required|valid_email');\t*/\n $this->form_validation->set_error_delimiters('<div class=\"error\">', '</div>');\n\n if ($this->form_validation->run() == true) {\n\t\t\t\n\t\t\tif(isset($_FILES['logo']['name']) && !empty( $_FILES['logo']['name'] ))\n\t\t\t{\n\t\t\t\t$image_banner = $this->Restaurant_model->do_upload();\t\t\n\t\t\t\t$image = $image_banner['file_name'];\n\t\t\t\t@unlink(\"./../upload/restaurant/\".$data['restaurant']['logo']);\n\t\t\t}\t\n\t\t\telse\n\t\t\t{\n\t\t\t\t$image = req('old_logo');\t\t\t\t\n\t\t\t}\t\n\t\t\t\n\t\t\t$cuisines = implode(\"|\",req('cuisines')); \t\n\t\t\t\n\t\t\t$seating = implode(\"|\",req('seating')); \t\n\t\t\t\n\t\t\t$facilities = implode(\"|\",req('facilities')); \t\n\t\t\t\n\t\t\t$tag = implode(\"|\",req('tag')); \n\t\t\t\n\t\t\t\n\t\t\t$data = array( \n\t\t\t\t'hotal_id'=>req('hotal_id'),\n\t\t\t\t'restaurant_name'=>req('restaurant_name'),\t\n\t\t\t\t'cuisines'=>$cuisines,\n\t\t\t\t'seating'=>$seating,\n\t\t\t\t'facilities'=>$facilities,\n\t\t\t\t'tag'=>$tag,\n\t\t\t\t'type'=>req('type'),\t\t\t\t\t\t\n\t\t\t\t'logo'=>$image,\n\t\t\t\t'Open_Time'=>req('Open_Time'),\n\t\t\t\t'Close_Time'=>req('Close_Time'),\n\t\t\t\t'Visitor_Attraction'=>req('Visitor_Attraction'),\n\t\t\t\t'COST_FOR_TWO'=>req('COST_FOR_TWO'),\n\t\t\t\t'Longitude'=>req('Longitude'),\n\t\t\t\t'Latitude'=>req('Latitude'),\n\t\t\t\t'Available'=>req('Available'),\n\t\t\t\t'Not_Available'=>req('Not_Available'),\n\t\t\t\t'Booking'=>req('Booking'),\n\t\t\t\t'Serves'=>req('Serves'),\n\t\t\t\t'Gift'=>req('Gift'),\n\t\t\t\t'Giftvoucher'=>req('Giftvoucher'),\n\t\t\t\t'Offer_Claim'=>req('Offer_Claim'),\n\t\t\t\t'Event'=>req('Event'),\n\t\t\t\t'Region'=>req('Region'),\n\t\t\t\t'State'=>req('State'),\n\t\t\t\t'City'=>req('City'),\n\t\t\t\t'Zipcode'=>req('Zipcode'),\n\t\t\t\t'Area'=>req('Area'),\n\t\t\t\t'Res_address'=>req('Res_address'),\n\t\t\t\t'Contact_Name'=>req('Contact_Name'),\n\t\t\t\t'Contact_NO'=>req('Contact_NO'),\n\t\t\t\t'CallUs'=>req('CallUs'),\n\t\t\t\t'Support_Email'=>req('Support_Email'),\n\t\t\t\t'Contact_Email'=>req('Contact_Email'),\n\t\t\t\t'Order_Email'=>req('Order_Email'),\n\t\t\t\t'Paypal'=>req('Paypal'),\n\t\t\t\t'Paypal_Url'=>req('Paypal_Url'),\n\t\t\t\t'Paypal_Email'=>req('Paypal_Email'),\n\t\t\t\t'Meta_Title'=>req('Meta_Title'),\n\t\t\t\t'Meta_Tag'=>req('Meta_Tag'),\n\t\t\t\t'Meta_Keyword'=>req('Meta_Keyword'),\n\t\t\t\t'Meta_Description'=>req('Meta_Description'),\n\t\t\t\t'Friendly_URL'=>req('Friendly_URL'),\t\t\t\n\t\t\t\t/*'is_active'=>req('is_active'),*/\n\t\t\t\t'modified_at'=>date(\"Y-m-d H:i:s\")\t,\t\n\t\t\t\t'modified_by'=>$this->session->userdata('id')\t\t\n\t\t\t);\n\t\t\t\n\t\t\t$result = $this->Restaurant_model->update($data,$id);\n\t\t\t\n\t\t\tif($result){\t\t\t\t\n\t/*********************************************************************************Start Restaurant Time Insert*****************/\t\t\t\n\t\t\t$deleteresultTime = $this->Restaurant_model->deletResTime( $id );\t\t\n\t\t\t\t$data = array(\t\t\t\t\n\t\t\t\t'hotal_id'=>req('hotal_id'),\n\t\t\t\t'rest_id'=>$id,\n\t\t\t\t'Sunday'=>req('Sunday'),\n\t\t\t\t'Time_Sun'=>req('Time_Sun'),\n\t\t\t\t'Monday'=>req('Monday'),\n\t\t\t\t'Time_Mon'=>req('Time_Mon'),\n\t\t\t\t'Tuesday'=>req('Tuesday'),\n\t\t\t\t'Time_Tue'=>req('Time_Tue'),\n\t\t\t\t'Wednesday'=>req('Wednesday'),\n\t\t\t\t'Time_Wed'=>req('Time_Wed'),\n\t\t\t\t'Thursday'=>req('Thursday'),\n\t\t\t\t'Time_Thu'=>req('Time_Thu'),\n\t\t\t\t'Friday'=>req('Friday'),\n\t\t\t\t'Time_Fri'=>req('Time_Fri'),\n\t\t\t\t'Saturdy'=>req('Saturdy'),\n\t\t\t\t'Time_Sat'=>req('Time_Sat'),\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t'modified_at'=>date(\"Y-m-d H:i:s\")\t,\t\n\t\t\t\t'modified_by'=>$this->session->userdata('id')\t\t\t\t\t\n\t\t\t);\n\t\t\n\t\t\t$resmenu = $this->db->insert(RESTIME,$data);\n\t/*********************************************************************************End Restaurant Time Insert*****************/\t\n\t\t\t\n\t/*********************************************************************************Restaurant Menu Insert*****************/\t\t\t\n\t\t\t$deleteresult = $this->Restaurant_model->deletemenu( $id );\n\t\t\t\t\n\t\t\tif($deleteresult)\n\t\t\t{\n\n\t\t\t$ItemName=implode(',',req('menu_id'));\n\n $ItemNameData=explode(',',rtrim($ItemName,','));\t\t\t\n\t\t\t\n\t\t\tforeach($ItemNameData as $key=>$val)\n\t\t\t{ \n\t\t\t\n\t\t\t $ss=req('menu_type'.$val.'');\n\t\t\t\t$menu_type = implode(\"|\",$ss);\n\t\t\t\t\t\t\t\t\n\t\t\t\t$data = array(\t\t\t\t\n\t\t\t\t'hotal_id'=>req('hotal_id'),\n\t\t\t\t'restaurant_id'=>$id,\n\t\t\t\t'menu_id'=>$val,\n\t\t\t\t'menu_type'=>$menu_type,\t\t\t\t\t\t\t\t\n\t\t\t\t'created_at'=>date(\"Y-m-d H:i:s\")\t,\t\n\t\t\t\t'created_by'=>$this->session->userdata('id')\t\t\t\t\t\n\t\t\t);\n\t\t\n\t\t\t$resmenu = $this->db->insert(RESTAURANT_MENU,$data);\n\t\t\t}\n\t\t\t}\n\t/****************************************************************************************End Restaurant Menu Insert*****************/\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$msg = \"Restaurant Update Sucessfully!!!\";\n\t\t\t\t$this->session->set_flashdata('message',alert('success',$msg));\t\t\t\t\n\t\t\t\tredirect('restaurant');\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$msg = \"Error in updating!!!\";\n\t\t\t\t$this->session->set_flashdata('message',alert('danger',$msg));\t \n\t\t\t\tredirect('restaurant');\n\t\t\t}\t\n }\n\t\t$data['Title'] = \"Edit Restaurant\";\t\n\t\t$this->load->view('edit',$data );\n\t}", "function abm($id = NULL)\n {\n $db['conductores'] = $this->m_conductores->getRegistros();\n $db['vehiculos'] = $this->m_vehiculos->getRegistros();\n $db['tipos'] = $this->m_viajes_tipos->getRegistros();\n \n $db['campos'] = array(\n array('select', 'id_conductor', 'conductor', $db['conductores']),\n array('select', 'id_vehiculo', 'vehiculo', $db['vehiculos']),\n array('destino', '', ''),\n array('fecha_salida', '', ''),\n array('fecha_llegada', '', ''),\n array('caja_inicial', '', ''),\n array('select', 'id_tipo', 'tipo', $db['tipos']),\n array('comentario', '', ''),\n );\n \n $this->armarAbm($id, $db);\n }", "public function setData($data, $allMode=false) {\n\t\tif($allMode) {\n\t\t\t// Used to create refs to dependents\n\t\t} else {\n\t\t\tif(is_null($this->schema)) {\n\t\t\t\t$this->data = $data;\n\t\t\t} else {\n\t\t\t\t$intersect = array_intersect_key($data, $this->schema);\n\t\t\t\t$this->data = array_replace($this->schema, $intersect);\n\t\t\t}\n\t\t}\n\t}", "public function setId($id) {\n $this->id = $id;\n $item = $this->get($id);\n\n foreach ($item as $field => $value) {\n if (property_exists($this, $field)) {\n $this->$field = $value;\n }\n }\n\n return $item;\n }", "public function set_employee_bank_account($id) {\n\n\t\t$condition = \"employee_id =\" . \"'\" . $id . \"'\";\n\t\t$this->db->select('*');\n\t\t$this->db->from('xin_employee_bankaccount');\n\t\t$this->db->where($condition);\n\t\t$this->db->limit(500);\n\t\treturn $this->db->get();\n\t}", "function LoadDbValues(&$rs) {\r\n\t\tif (!$rs || !is_array($rs) && $rs->EOF)\r\n\t\t\treturn;\r\n\t\t$row = is_array($rs) ? $rs : $rs->fields;\r\n\t\t$this->id->DbValue = $row['id'];\r\n\t\t$this->no_st->DbValue = $row['no_st'];\r\n\t\t$this->tgl_st->DbValue = $row['tgl_st'];\r\n\t\t$this->employee_id->DbValue = $row['employee_id'];\r\n\t\t$this->kd_latih->DbValue = $row['kd_latih'];\r\n\t\t$this->tgl_mulai->DbValue = $row['tgl_mulai'];\r\n\t\t$this->tgl_akhir->DbValue = $row['tgl_akhir'];\r\n\t\t$this->kd_lmbg->DbValue = $row['kd_lmbg'];\r\n\t\t$this->kd_jbt->DbValue = $row['kd_jbt'];\r\n\t\t$this->jam->DbValue = $row['jam'];\r\n\t\t$this->tempat->DbValue = $row['tempat'];\r\n\t\t$this->app->DbValue = $row['app'];\r\n\t\t$this->app_empid->DbValue = $row['app_empid'];\r\n\t\t$this->app_jbt->DbValue = $row['app_jbt'];\r\n\t\t$this->app_date->DbValue = $row['app_date'];\r\n\t\t$this->created_by->DbValue = $row['created_by'];\r\n\t\t$this->created_date->DbValue = $row['created_date'];\r\n\t\t$this->last_update_by->DbValue = $row['last_update_by'];\r\n\t\t$this->last_update_date->DbValue = $row['last_update_date'];\r\n\t\t$this->sertifikat->DbValue = $row['sertifikat'];\r\n\t}", "public function getStateById($id){\t\n\t\t$this->db->where('id', $id);\n\t\t$query = $this->db->get(ADDRESS);\n\t\treturn $query->row_array();\n\t}", "public function setData($data)\r\n {\r\n if(isset($data['id']))\r\n {\r\n $this->id = $data['id'];\r\n }\r\n \r\n if(isset($data['entity_type_id']))\r\n {\r\n $this->entity_type_id = $data['entity_type_id'];\r\n }\r\n if(isset($data['name']))\r\n {\r\n $this->name = $data['name'];\r\n }\r\n if(isset($data['code']))\r\n {\r\n $this->code = $data['code'];\r\n }\r\n if(isset($data['description']))\r\n {\r\n $this->description = $data['description'];\r\n }\r\n \r\n if(isset($data['attributes']))\r\n {\r\n $this->attributes = array();\r\n foreach($data['attributes'] as $attributeData)\r\n {\r\n $aModel = new AttributeValueModel($this->dbAdapter);\r\n $aModel->setData($attributeData);\r\n $this->attributes[$aModel->code] = $aModel;\r\n }\r\n }\r\n \r\n }", "function setId($id)\r\n\t{\r\n\t\t$this->_id\t\t= $id;\r\n\t\t$this->_data\t= null;\r\n\t}", "function setId($id)\n\t{\n\t\t$this->_id\t\t= $id;\n\t\t$this->_data\t= null;\n\t}", "function setId($id)\n\t{\n\t\t$this->_id\t\t= $id;\n\t\t$this->_data\t= null;\n\t}", "protected function AddressTable($id=NULL) {\n\treturn $this->ValueRecords()->AddrTable($id);\n }", "public function updateStation($data, $id) {\n foreach ($data as $field => $value)\n $this->addUpdateSet($field, $value);\n\n $this->setUpdateTable('stations');\n $this->addUpdateWhere('id = \"' . $id . '\"');\n\n $this->runUpdate();\n }", "function _set_data()\n\t{\n\t\tforeach ($this as $key => $value) {\n\t\t\tif ($key != '_CI' && $key != '_data') {\n\t\t\t\t$key = substr($key, 1);\n\t\t\t\t$this->_data[$key] = $value;\n\t\t\t}\n\t\t}\n\t}", "public function setData()\n {\n $data = \"\";\n\n if(!empty($this->trackParams))\n {\n $data .= \"track=\";\n\n $data .= implode(',', $this->trackParams);\n }\n\n if(!empty($this->locationParams))\n {\n if(!empty($data))\n {\n $data .= '&';\n }\n\n $data .= 'locations=';\n\n $data .= $this->locationParams;\n }\n\n $this->data = $data;\n }", "public function loadById ($id) {\r\n\t\t$values = $this->_loadById($id);\r\n\t\t$this->setValues ($values);\r\n\t\treturn $this->getData();\r\n\t}", "private function _row_data($id) {\n $custom_fields = $this->Custom_fields_model->get_available_fields_for_table(\"patients\", $this->login_user->is_admin, $this->login_user->user_type);\n $options = array(\n \"id\" => $id,\n \"custom_fields\" => $custom_fields\n );\n $data = $this->Patients_model->get_details($options)->row();\n return $this->_make_row($data, $custom_fields);\n }", "private function _row_data($id) {\n $options = array(\"id\" => $id);\n $data = $this->Estimates_model->get_details($options)->row();\n return $this->_make_row($data);\n }" ]
[ "0.65332425", "0.63834107", "0.63505197", "0.61430466", "0.60673964", "0.60131484", "0.5883502", "0.5839804", "0.57591426", "0.56349164", "0.56102186", "0.5545604", "0.5542655", "0.55283767", "0.5510706", "0.55055904", "0.54931253", "0.54926986", "0.54767424", "0.54673713", "0.5465957", "0.5414191", "0.54137254", "0.5413293", "0.5387762", "0.5386359", "0.52898234", "0.5246091", "0.52285147", "0.52147275", "0.5203104", "0.51980305", "0.51583725", "0.515735", "0.51506406", "0.51319903", "0.51192933", "0.511915", "0.5118504", "0.51183486", "0.51128477", "0.5109833", "0.5095871", "0.508809", "0.5084698", "0.5084698", "0.5082986", "0.5066227", "0.5064258", "0.5053526", "0.50382936", "0.5033447", "0.50309044", "0.5028769", "0.5028721", "0.502325", "0.50155866", "0.50118095", "0.5009582", "0.5007122", "0.5000779", "0.4999659", "0.49978328", "0.49890682", "0.49792755", "0.49790007", "0.49705192", "0.4967978", "0.4965332", "0.49639383", "0.49608272", "0.4959954", "0.49597815", "0.495197", "0.49494034", "0.4946065", "0.49445087", "0.49445087", "0.4944336", "0.49409142", "0.49350613", "0.49333283", "0.49315724", "0.493147", "0.4929398", "0.4925372", "0.49237183", "0.49213642", "0.49188", "0.49184194", "0.49172404", "0.49147087", "0.49147087", "0.49135998", "0.49131587", "0.4911964", "0.49113134", "0.49094328", "0.49086383", "0.49080655" ]
0.7238437
0
Return messages from Order ID
Возврат сообщений по идентификатору заказа
public static function getMessagesByOrderId($order_id, $private = false, JeproshopContext $context = null){ if (!JeproshopTools::isBool($private)) die(JError::raiseError()); if (!$context){ $context = JeproshopContext::getContext(); } $db = JFactory::getDBO(); $query = "SELECT message.*, customer." . $db->quoteName('firstname') . " AS customer_firstname, customer."; $query .= $db->quoteName('lastname') . " AS customer_lastname, employee." . $db->quoteName('name') . " AS employee_name, "; $query .= "employee." . $db->quoteName('username') . " AS employee_user_name, (COUNT(message_readed.message_id) = 0 AND "; $query .= "message.customer_id != 0) AS is_new_for_me FROM " . $db->quoteName('#__jeproshop_message') . " AS message LEFT JOIN "; $query .= $db->quoteName('#__jeproshop_customer') . " AS customer ON message." . $db->quoteName('customer_id') . " = "; $query .= "customer." . $db->quoteName('customer_id') . " LEFT JOIN " . $db->quoteName('#__jeproshop_message_readed'); $query .= " AS message_readed ON message_readed." . $db->quoteName('message_id') . " = message." . $db->quoteName('message_id'); $query .= " AND message_readed." . $db->quoteName('employee_id') . " = " .(isset($context->employee) ? (int)$context->employee->employee_id : ""); $query .= " LEFT OUTER JOIN " . $db->quoteName('#__users') . " AS employee ON employee." . $db->quoteName('id'); $query .= " = message." . $db->quoteName('employee_id') . " WHERE order_id = " . (int)$order_id; $query .= (!$private ? " AND message." . $db->quoteName('private') . " = 0" : "") . " GROUP BY message.message_id"; $query .= " ORDER BY message.date_add DESC"; $db->setQuery($query); return $db->loadObjectList(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static public function getMessagesByOrderId($id_order, $private = false)\n\t{\n\t \tif (!Validate::isBool($private))\n\t \t\tdie(Tools::displayError());\n\n\t\tglobal $cookie;\n\t\t$result = Db::getInstance()->ExecuteS('\n\t\t\tSELECT m.*, c.`firstname` AS cfirstname, c.`lastname` AS clastname, e.`firstname` AS efirstname, e.`lastname` AS elastname, (COUNT(mr.id_message) = 0 AND m.id_customer != 0) AS is_new_for_me\n\t\t\tFROM `'._DB_PREFIX_.'message` m\n\t\t\tLEFT JOIN `'._DB_PREFIX_.'customer` c ON m.`id_customer` = c.`id_customer`\n\t\t\tLEFT JOIN `'._DB_PREFIX_.'message_readed` mr ON (mr.id_message = m.id_message AND mr.id_employee = '.intval($cookie->id_employee).')\n\t\t\tLEFT OUTER JOIN `'._DB_PREFIX_.'employee` e ON e.`id_employee` = m.`id_employee`\n\t\t\tWHERE id_order = '.intval($id_order).'\n\t\t\t'.(!$private ? ' AND m.`private` = 0' : '').'\n\t\t\tGROUP BY m.id_message\n\t\t\tORDER BY m.date_add DESC\n\t\t');\n\t\treturn $result;\n\t}", "private static function order_received($order_id = 0)\n {\n }", "public function getMessages()\n {\n if(count($this->Messages) > 0) return $this->Messages;\n $messageDb = new MessageDb();\n $messages = $messageDb->orderId($this->getOrderId()); \n $this->Messages = new ArrayOfMessage();\n foreach($messages as $message) {\n $this->Messages->add($message);\n }\n return $this->Messages;\n }", "public function getMessages()\r\n {\r\n if(count($this->Messages) > 0) return $this->Messages;\r\n $messageDb = new MessageDb();\r\n $messages = $messageDb->orderId($this->getOrderId()); \r\n $this->Messages = new ArrayOfMessage();\r\n foreach($messages as $message) {\r\n $this->Messages->add($message);\r\n }\r\n return $this->Messages;\r\n }", "public function getOrderMessages()\n {\n $objUser = BackendUser::getInstance();\n\n if (!\\Database::getInstance()->tableExists(OrderStatus::getTable())\n || !$objUser->hasAccess('iso_orders', 'modules')\n ) {\n return '';\n }\n\n // Can't see any orders if user does not have access to any shop config\n $strConfig = '';\n if (!BackendUser::getInstance()->isAdmin) {\n $arrConfigs = BackendUser::getInstance()->iso_configs;\n\n if (empty($arrConfigs) || !\\is_array($arrConfigs)) {\n return '';\n }\n\n $strConfig = \"AND c.config_id IN (\" . implode(',', $arrConfigs) . \")\";\n }\n\n $arrMessages = array();\n $objOrders = Database::getInstance()->query(\"\n SELECT COUNT(*) AS total, s.name\n FROM tl_iso_product_collection c\n LEFT JOIN tl_iso_orderstatus s ON c.order_status=s.id\n WHERE c.type='order' AND s.welcomescreen='1' $strConfig\n GROUP BY s.id\"\n );\n\n while ($objOrders->next()) {\n $arrMessages[] = '<p class=\"tl_new\">' . sprintf($GLOBALS['TL_LANG']['MSC']['newOrders'], $objOrders->total, $objOrders->name) . '</p>';\n }\n\n return implode(\"\\n\", $arrMessages);\n }", "public function get($order_id);", "public function getMessages($id) // Item and user must match\n {\n $user = Auth::user();\n $user_id = $user->id;\n $item_id = $id;\n \n \n //The query will return everything that the user received or send as message according to the item, it can return \n $messages = Message::with('user','receiver')\n ->where(['user_id'=> $user_id, 'item_id' => $item_id])\n ->orWhere(function($query) use($user_id, $item_id){\n $query->where(['receiver_id' => $user_id, 'item_id' => $item_id]);\n })\n ->get();\n \n return $messages;\n }", "public function messagesById($ids) {\n\t\t$res = $this->zap->request($this->zap->base . 'core/view/messagesById/', array('ids' => $ids));\n\t\treturn reset($res);\n\t}", "public function get_order_detail($order_id){\n\t\t$this->db->select('o.id, o.quantity, u.email as user_email, s.name as service_name');\n\t\t$this->db->from($this->tb_order.\" o\");\n\t\t$this->db->join($this->tb_services.\" s\", \"s.id = o.service_id\", 'left');\n\t\t$this->db->join($this->tb_users.\" u\", \"u.id = o.uid\", 'left');\n\t\t$this->db->where('o.id', $order_id);\n\t\t$query = $this->db->get();\n\t\tif (!empty($query->row())) {\n\t\t\t$result = $query->row();\n\t\t}else{\n\t\t\t$result = \"\";\n\t\t}\n\t\treturn $result;\n\t}", "public function getMessages();", "public function getMessages();", "public function getMessages();", "public function getMessages();", "public function message($id) {\n\t\t$res = $this->zap->request($this->zap->base . 'core/view/message/', array('id' => $id));\n\t\treturn reset($res);\n\t}", "public function get_recieved(){\n\t\t\tglobal $db;\n\n\n\t\t\t$user_id = $_SESSION['logged_admin_id'];\n\n\t\t\t\n\t\t\t$sql = \"SELECT * FROM message \";\n\t\t\t$sql .= \" WHERE reciever_id = {$user_id} \";\n\t\t\t$sql .= \" ORDER BY stamp DESC \";\n\n\t\t\t$messages = $db->query($sql);\n\n\t\t\tconfirm($messages);\n\n\t\t\treturn $messages;\n\t\t}", "public function getOrderById($order_id);", "function getOrderPlacedMessage($name,$message,$orderid,$orderstatus){\n\t\t$message_body = \"Dear \".$name.\",\\n\\n\";\n\t\t$message_body .= \"Greetings of the day !\\n\\n\";\n\t\t$message_body .= \"Thanks for choosing Glass Co. as your destination to the services required.\\n\\n\";\n\t\t$message_body .= \"We have recorded and updated your order to \".$orderstatus.\" with below remarks:\\n\";\n\t\t$message_body .= \"------------------------------\\n\";\n\t\t$message_body .= $message.\"\\n\";\n\t\t$message_body .= \"------------------------------\\n\";\n\t\t$message_body .= \"You can track status for the order through <a href ='\".$this->getBaseUrl().\"order.php?orderkey=\".$this->getEncodeSting($orderid).\"'>this link </a>.\\n\\n\";\n\t\t$message_body .= \"Please refer your friends and family to give us opertunity to serve.\\n\\n\";\n\t\t$message_body .= \"Cheers\\n\";\n\t\t$message_body .= \"Glass Co.\\n\";\t\n\t\treturn $message_body;\n\t}", "public function getMessages() {}", "public function getMessages() {}", "public function getOrderItemsFromOrderID($id){\n include '../dbcon/init.php';\n $query = \"SELECT fk1_Product_ID, Quantity FROM ORDER_ITEMS WHERE fk2_Order_ID = $id;\";\n $result = $sqli->query($query);\n while ($row = $result->fetch_assoc()) {\n echo \"<p style=\\\"line-height: 0.5; font-size: 10pt\\\">{$row['Quantity']} x {$this->getProductFromForeignKey($row['fk1_Product_ID'])}</p>\";\n }\n $result->close();\n $sqli->close();\n }", "function wc_msg_order_completed( $order_id ){\r\n $order = new WC_Order($order_id);\r\n $order_phone = $order->get_billing_phone();\r\n $total_order = $order->get_total();\r\n $order_currency = $order->get_currency();\r\n \r\n $site_name = get_bloginfo( 'name' );\r\n \r\n $checkadminsms = get_option('complete_sendadmin_check');\r\n $checkcustsms = get_option('complete_sendcust_check');\r\n \r\n \t//Message to Customer\r\n\tif ($checkcustsms == \"checked\") {\r\n //$msgtocustomer = str_replace(\"ORDER_ID\",$order_id,get_option('sms_to_cust'));\r\n\t $orderid_rep_cust = str_replace(\"ORDER_ID\",$order_id,get_option('complete_msgtxt_cust', 'Your order ORDER_ID of ORDER_TOTAL ORDER_CURRENCY has been completed on SITE_NAME.'));\r\n\t $ordertotal_rep_cust = str_replace(\"ORDER_TOTAL\",$total_order,$orderid_rep_cust);\r\n\t $sitename_rep_cust = str_replace(\"SITE_NAME\",$site_name,$ordertotal_rep_cust);\r\n\t $msgtocustomer = str_replace(\"ORDER_CURRENCY\",$order_currency,$sitename_rep_cust);\r\n\t \r\n\t//$customerfile = fopen(\"https://control.msg91.com/api/sendhttp.php?authkey=\". get_option('msg_api_key') .\"&mobiles=$order_phone&message=\".urlencode($msgtocustomer).\"&sender=\". get_option('sms_sender_id') .\"&route=4&country=0\", \"r\")or die(\"Unable to open file!\");\r\n $customerfile = @wp_remote_get(\"https://control.msg91.com/api/sendhttp.php?authkey=\". get_option('msg_api_key') .\"&mobiles=$order_phone&message=\".urlencode($msgtocustomer).\"&sender=\". get_option('sms_sender_id') .\"&route=4&country=0\")['body'];\r\n $output = fgets($customerfile);\r\n fclose($customerfile);\r\n\t\r\n\t}\r\n \r\n \r\n \r\n //Message to admin\r\n if ($checkadminsms == \"checked\") {\r\n\t $orderid_rep_admin = str_replace(\"ORDER_ID\",$order_id,get_option('complete_msgtxt_admin', 'Order ORDER_ID of ORDER_TOTAL ORDER_CURRENCY has been completed on SITE_NAME.'));\r\n\t $ordertotal_rep_admin = str_replace(\"ORDER_TOTAL\",$total_order,$orderid_rep_admin);\r\n\t $sitename_rep_admin = str_replace(\"SITE_NAME\",$site_name,$ordertotal_rep_admin);\r\n\t $msgtoadmin = str_replace(\"ORDER_CURRENCY\",$order_currency,$sitename_rep_admin);\r\n\t\r\n\t// $adminfile = fopen(\"https://control.msg91.com/api/sendhttp.php?authkey=\". get_option('msg_api_key') .\"&mobiles=\". get_option('admin_phone_number') .\"&message=\".urlencode($msgtoadmin).\"&sender=\". get_option('sms_sender_id') .\"&route=4&country=0\", \"r\")or die(\"Unable to open file!\");\r\n $adminfile = @wp_remote_get(\"https://control.msg91.com/api/sendhttp.php?authkey=\". get_option('msg_api_key') .\"&mobiles=\". get_option('admin_phone_number') .\"&message=\".urlencode($msgtoadmin).\"&sender=\". get_option('sms_sender_id') .\"&route=4&country=0\")['body'];\r\n $output = fgets($adminfile);\r\n fclose($adminfile);\r\n }\r\n\r\n }", "public function getMessagesFor($id)\n {\n App\\Message::where('emisor', $id)->where('receptor', Auth::user()->id)->update(['readmessage' => true]);\n $messages = App\\Message::where(function ($q) use ($id) {\n $q->where('emisor', Auth::user()->id);\n $q->where('receptor', $id);\n })->orWhere(function ($q) use ($id) {\n $q->where('emisor', $id);\n $q->where('receptor', Auth::user()->id);\n })->get();\n\n return response()->json($messages);\n }", "public function getMessagesFor($id)\n {\n Message::where('from', $id)->where('to', auth()->id())->update(['read' => true]);\n\n $messages = Message::where(function($q) use ($id) {\n $q->where('from', auth()->id());\n $q->where('to', $id);\n })->orWhere(function($q) use ($id) {\n $q->where('from', $id);\n $q->where('to', auth()->id());\n })\n ->get(); // (a = 1 AND b=2) OR (c=1 OR d=2) Two functions and if statements between them.\n \n return response()->json($messages);\n }", "function wc_get_email_order_items($order, $args = array())\n {\n }", "public static function getMessageList()\n {\n \n $query = \"SELECT id, send_time, company_id, user_id, code, terminal, function, content\n FROM message_t\n WhERE del_flag = 0\n ORDER BY id DESC;\";\n \n $records = Database::currentDb()->getMultiRecord($query, $t); \n return $records;\n }", "public function get_message($id)\n {\n $this->db->select(\"*\");\n $this->db->from('tbl_messages');\n $this->db->where('id', $id);\n\t\t$query = $this->db->get();\n $result = $query->row();\n return $result;\n }", "function getMessages();", "abstract protected function getMessages();", "public function getMessage($id) {\n\t\treturn $this->dataBase->getEntryById(\"message\", $id);\n\t}", "public function messages_get($id)\n {\n $expInfo = $this->db->query(\"select * from expert_opinion where expert_opinion_id='\".$id.\"'\")->row();\n // echo $this->db->last_query();\n if(count($expInfo)>0)\n {\n $messagesInfo = $this->db->query(\"select * from expert_opinion_conversations where expert_opinion_id='\".$expInfo->expert_opinion_id.\"'\")->result();\n $i = 0;\n if(count($messagesInfo)>0)\n {\n foreach($messagesInfo as $value)\n {\n $param['messages'][$i]['sent_by'] = getDoctorName($value->sent_by);\n $param['messages'][$i]['doctor_id'] = $value->sent_by;\n $param['messages'][$i]['message'] = $value->message;\n $i++;\n }\n }\n else\n {\n $param['messages'] = [];\n }\n \n $this->response(array('code'=>'200','message'=>'Success','result'=>$param));\n }\n else{\n $param['messages'] = [];\n $this->response(array('code'=>'201','message'=>'Error','result'=>$param));\n }\n }", "public function getAllMsg(){\n\t\t$reponse = $this->bdd->query(\"SELECT m.Id_message as id,\n\t\t\tm.contenu as message,\n\t\t\tm.datedebut as datedebut,\n\t\t\tm.datefin as datefin,\n\t\t\tm.nom as nom\n\t\t\tFROM Message m\n\t\t\tORDER BY m.Id_message\");\n\t\treturn $reponse;\n\t}", "public function messageByUserId($id){\n $messages = Message::where(function($query) use ($id){\n $query->where('from',auth()->user()->id);\n $query->where('to',$id);\n $query->where('type',0);\n })->orWhere(function($query) use ($id){\n $query->where('from',$id);\n $query->where('to',auth()->user()->id);\n $query->where('type',1);\n })->with('user')->get();\n\n return $messages;\n }", "public function getOrder($idOrder)\n {\n $aRes = null;\n $oSnippet = \\DB_Query::getSnippet('select total, shipping, name, email, custinfo from `'\n . static::TABLE_NAME_ORDER . '` where id = ' . intval($idOrder));\n //$this->deb('getOrder oSnippet', $oSnippet->get());\n $aOrder = $this->oDB->fetchRow($oSnippet);\n //$this->deb('getOrder aOrder', $aOrder);\n if (is_array($aOrder)) {\n $aRes = $aOrder;\n $aRes['custinfo'] = unserialize($aRes['custinfo']);\n }\n //$this->deb('getOrder aRes', $aRes);\n return $aRes;\n }", "public static function get_order_tokens($order_id)\n {\n }", "function get_order($order_id)\n{\n\treturn api_get('orders/'.$order_id);\n}", "public function get_order($id = 0)\n {\n }", "public function getMessages()\n {\n //PEMBAHASAN MENGENAI EAGER LOADING BISA DI CARI DI DAENGWEB.ID\n return Grub_message::with('user')->get();\n }", "static function show_received_message($id_user){\n if(!is_int($id_user))\n return false;\n $query = self::$PDO->prepare(\"SELECT t1.*,concat(t2.fname,' ',t2.name) as recipient_name,concat(t3.fname,' ',t3.name) as sender_name from \".self::$prefix.\"messages t1,\".self::$prefix.\"users t2, \".self::$prefix.\"users t3 where id_recipient = :id_user and t1.id_recipient = t2.ID AND t1.id_sender = t3.ID and (deleted IS NULL OR deleted=0)\");\n $query->execute(array(':id_user'=>$id_user));\n return $query->fetchAll();\n }", "function get_orders_email_conment($db,$orders_id)\n{\n\tob_start();\n\tinclude(dirname(__FILE__).'/template_orders_email.php');\n\t$msg_body = ob_get_clean();\n\t\n\treturn $msg_body;\n}", "public function fetchMessagesByID($messageID) {\n $results = $this->readtbl();\n //Create an array for storing the required items fetched\n $itemArray = array();\n //While the current row can be fetched from the readtbl() variable\n while ($row = $results->fetch()) {\n //Check if the row's \"threadID\" value is the same as the parameter\n $compare = stristr($row['receiverID'], $messageID);\n \n //If the compare variable is not false\n if ($compare !== false) {\n //Create the row as an item and store it in the local array\n $itemArray[] = new Message($row);\n }\n }\n //Return the local array\n return $itemArray;\n }", "public function getMessages($forceorder = null) {\r\n $order = 'ASC';\r\n\r\n if (Mage::getStoreConfig('crmticket/ticket_data/new_messages_in_first') == 1) {\r\n $order = 'DESC';\r\n }\r\n if (strlen($forceorder) > 2) {\r\n $order = $forceorder;\r\n }\r\n\r\n if ($this->getId()) {\r\n $this->_messages = mage::getModel('CrmTicket/Message')\r\n ->getCollection()\r\n ->addFieldToFilter('ctm_ticket_id', $this->getId())\r\n ->setOrder('ctm_id', $order);\r\n } else {\r\n $this->_messages = mage::getModel('CrmTicket/Message')\r\n ->getCollection()\r\n ->addFieldToFilter('ctm_ticket_id', -1)\r\n ->setOrder('ctm_id', $order);\r\n }\r\n return $this->_messages;\r\n }", "public function get_dispute($order_id) {\n\t\t$this->db->where('order_id', $order_id);\n\t\t$query = $this->db->get('disputes');\n\t\tif($query->num_rows() > 0) {\n\t\t\t$row = $query->row_array();\n\t\t\t$row['dispute_message'] = nl2br($row['dispute_message']);\n\t\t\t$row['last_update_f'] = $this->general->format_time($row['last_update']);\n\t\t\treturn $row;\n\t\t}\n\t\treturn FALSE;\n\t}", "public function get_one_message($message_id) \r\n\t{\r\n\t\tglobal $wpdb, $xoouserultra;\r\n\t\t\r\n\t\t$logged_user_id = get_current_user_id();\r\n\t\t\r\n\t\t\r\n\t\tif(current_user_can( 'administrator' ))\r\n\t\t{\r\n\t\t\t$sql = 'SELECT * FROM ' . $wpdb->prefix . 'usersultra_wall WHERE `comment_id` = ' . $message_id . ' ' ;\r\n\t\t\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\t$sql = 'SELECT * FROM ' . $wpdb->prefix . 'usersultra_wall WHERE `comment_id` = ' . $message_id . ' AND `comment_wall_user_id` = ' . $logged_user_id . ' ' ;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\r\n\t\t$messages = $wpdb->get_results($sql );\r\n\t\t\r\n\r\n\t\tforeach ( $messages as $message )\r\n\t\t{\r\n\t\t\treturn $message;\r\n\t\t\t\t\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\r\n\t}", "public static function getMessage($id) {\n return self::get(self::T(DB::MESSAGE), $id);\n }", "protected function getOrderLevelGiftMessages()\n {\n $cartId = $this->checkoutSession->getQuoteId();\n return $this->cartRepository->get($cartId);\n }", "function get_received_messages(){\n\t\t\t\t$sql=\"SELECT * FROM $this->table WHERE message_mode = :messageMode ORDER BY message_id DESC\";\n\t\t\t\t$stmt = $this->dbConn->prepare($sql);\n\t\t\t\t$stmt->bindParam(\":messageMode\",$this->messageMode);\n\t\t\t\tif ($stmt->execute()) {\n\t\t\t\t\t$newResults = [];\n\t\t\t\t\t$results = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\t\t\t\t\treturn $results;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tdie();\n\t\t\t\t\t}\n\n\t\t\t}", "function orderInfo($order_id) {\n\n\tglobal $api;\n\n\t$params = array(\n\t\t'order_id' => $order_id\n\t);\n\n\treturn $api->apiCall(\"BTCEUR/money/order/result\", $params);\n}", "public function getOrderTicket($orderid) {\n \n $order = $this->orderCollectionFactory->create()->addFieldToFilter('entity_id',$orderid)->getFirstItem();\n if (!is_object($order)) {\n $order = $this->orderFactory->create()->load($order);\n }\n $res = \"#{$order->getRealOrderId()}\";\n $res .= __(\n ' at %1 (%2) - %3',\n $this->formatDate($order->getCreatedAt(), \\IntlDateFormatter::MEDIUM),\n strip_tags($order->formatPrice($order->getGrandTotal())),\n __(ucwords($order->getStatus()))\n );\n\n return $res; \n }", "public function getMessages() {\n $parameters = StatusAPI::getParameters();\n if ($_GET['action'] == 'messages') {\n $db = new \\Status\\DB\\Messages();\n if (isset($parameters['field']['q']) || isset($parameters['field']['id'])) {//show a only array messages ID \n if(isset($parameters['field']['id'])){ \n if(is_numeric($parameters['field']['id'])){\n $response = $db->getMessageID($parameters['field']['id']);\n }else{\n StatusAPI::response(422, \"error\", \"The id value is incorrect\");\n exit;\n }\n }else{ \n $response = $db->getMessage($parameters);\n }\n print_r(json_encode($response));\n } else { //show a array with all messages \n if(isset($_GET['id'])){\n if(is_numeric($_GET['id'])){ \n $response = $db->getMessageID($_GET['id']);\n }else{\n StatusAPI::response(422, \"error\", \"The id value is incorrect\"); \n exit;\n }\n }else{ \n $response = $db->getAllMessages();\n }\n print_r(json_encode($response));\n }\n } else {\n StatusAPI::response(400,\"error\", \"Bad request\");\n }\n }", "public function getOrder_byID($orderID){\n return $this->getOrder('id', $orderID);\n }", "public function getMessages($roomId);", "public static function getTicketMessages($id_ticket){\n $connect = new Connect();\n $query = $connect->prepare('SELECT * FROM ticket_messages WHERE id_ticket = ' . $id_ticket);\n $query->execute();\n $response = $query->fetchAll();\n return $response;\n }", "function get_order($id)\n {\n return $this->builder->where(array('id'=>$id))->get()->getResultArray();\n }", "public static function getMessagesByCartId($cartId, $private = false, JeproshopContext $context = null)\n {\n if (!JeproshopTools::isBool($private)) {\n JeproshopTools::displayError(500, \"\");\n die();\n }\n\n if (!$context) {\n $context = JeproshopContext::getContext();\n }\n\n $db = JFactory::getDBO();\n\n $query = \"SELECT message.*, customer.\" . $db->quoteName('firstname') . \" AS first_name, customer.\" . $db->quoteName('lastname');\n $query .= \" AS last_name, employee.\" . $db->quoteName('username') . \" AS firstname, employee.\" . $db->quoteName('name');\n $query .= \" AS lastname, (COUNT(read_message.\" . $db->quoteName('message_id') . \") = 0 AND message.\" . $db->quoteName('customer_id');\n $query .= \" != 0) AS is_new_for_me FROM \" . $db->quoteName('#__jeproshop_message') . \" AS message LEFT JOIN \";\n $query .= $db->quoteName('#__jeproshop_customer') . \" AS customer ON message.\" . $db->quoteName('customer_id') . \" = customer.\";\n $query .= $db->quoteName('customer_id') . \" LEFT JOIN \" . $db->quoteName('#__jeproshop_message_readed') . \" AS read_message ON (\";\n $query .= \" read_message.\" . $db->quoteName('message_id') . \" = message.\" . $db->quoteName('message_id') . \" AND read_message.\" ;\n $query .= $db->quoteName('employee_id') . \" = \" . (int)$context->employee->employee_id . \") LEFT OUTER JOIN \";\n $query .= $db->quoteName('#__users') . \" AS employee ON (employee.\" . $db->quoteName('id') . \" = message.\";\n $query .= $db->quoteName('employee_id') . \") WHERE \" . $db->quoteName('cart_id') . \" = \" . (int)$cartId ;\n $query .= (!$private ? \" AND message.\" . $db->quoteName('private') . \" = 0 \" : \"\") . \"\tGROUP BY message.\" . $db->quoteName('message_id');\n $query .= \"\tORDER BY message.\" . $db->quoteName('date_add') . \" DESC \";\n//echo $query; exit();\n $db->setQuery($query);\n\n return $db->loadObjectList();\n }", "public function get_message_strings() {\n foreach($this->messages as $singleMessage) {\n \n }\n }", "public function getMessages(){ }", "public function show_messages($id)\n {\n $group = Group::find($id);\n\n $messages = $group->messages()->with(['group', 'user'])->get();\n\n $user_loggedIn = auth()->user();\n\n return ['messages' => $messages, 'user_loggedIn' => $user_loggedIn];\n }", "public function getMessages(){\n\n $db = $this->db;\n $id = $this->id;\n\n $q = new QueryObject;\n\n try{\n $db->setTable('messages as m');\n \n $q->setRule(['reader_id', '=', $id]);\n $q->setJoin(['INNER', 'users as u', 'u.id', 'm.sender_id']);\n \n $q->setCondition('ORDER BY created ASC');\n \n $messages = $db->whereJoin($q, [\n 'u.name',\n 'u.nickname',\n \n 'm.content',\n 'm.status',\n 'm.created',\n ])->getAll();\n }\n catch(PDOException $e){\n echo $e->getMessage();\n }\n\n $poruke = [];\n\n foreach($messages as $m){\n\n $m['date-diff'] = contentAge($m['created']);\n die($m['date-diff']);\n\n if($m['status'])\n $poruke['read'][] = $m;\n else\n $poruke['unread'][] = $m;\n\n \n\n }\n\n return $poruke;\n }", "public function getAllMessages($id) {\n $messages = Messages::get()->toJson(JSON_PRETTY_PRINT);\n return response($messages, 200);\n }", "public function msgdetail($txn = null) {\n $this->loadModel('Users');\n $user = $this->Users->get($this->request->session()->read('Auth.Doctor.id'));\n //pr($user); exit;\n $this->loadModel('Ordermsgs');\n $this->loadModel('Orders');\n $uid = $this->request->session()->read('Auth.Doctor.id');\n $msg = $this->Ordermsgs->find()->contain(['Users'])->where(['fromid' => $user->id, 'type' => 'd', 'ordid' => $txn])->orWhere(['toid' => $user->id, 'type' => 'd', 'ordid' => $txn])->order(['date' => 'DESC'])->all()->toArray(); \n \n //pr($msg); exit;\n \n $this->loadModel('Orders');\n $orderExist = $this->Orders->find()->where(['Orders.transaction_id' => $txn])->all()->toArray(); \n \n if($this->request->is('post')){\n if($this->request->data['ftype'] == 'msg'){\n $this->loadModel('Ordermsgs');\n $ordermsgsTable = TableRegistry::get('Ordermsgs');\n $ordermsg = $ordermsgsTable->newEntity(); \n $ordermsg->ordid = $this->request->data['transid'];\n $ordermsg->fromid = $this->request->data['fromid'];\n $ordermsg->toid = $this->request->data['toid'];\n $ordermsg->msg = $this->request->data['msg'];\n $ordermsg->pid = $this->request->data['pid'];\n $ordermsg->type = $this->request->data['type']; \n $ordermsg->fromtype = $this->request->data['fromtype'];\n $ordermsg->totype = $this->request->data['totype'];\n $ordermsg->date = gmdate('Y-m-d H:i:s'); \n if ($ordermsgsTable->save($ordermsg)){ $id = $ordermsg->id; } \n $this->Flash->success(__('Message Sent To Customer Care Successfully.'));\n $this->redirect(['controller'=>'Doctors' ,'action' => 'msgdetail',$txn]);\n }\n } \n \n $this->set(compact('user','msg','orderExist'));\n $this->set('_serialize', ['user']); \n }", "public function get_order_details($order_id) {\r\n $order = wc_get_order($order_id);\r\n\r\n // OUTPUT\r\n echo '<h3>RAW OUTPUT OF THE ORDER OBJECT: </h3>';\r\n echo '<pre>';\r\n print_r($order);\r\n echo '<br><br>';\r\n echo '<h3>THE ORDER OBJECT (Using the object syntax notation):</h3>';\r\n echo '$order->order_type: ' . $order->order_type . '<br>';\r\n echo '$order->id: ' . $order->id . '<br>';\r\n echo '<h4>THE POST OBJECT:</h4>';\r\n echo '$order->post->ID: ' . $order->post->ID . '<br>';\r\n echo '$order->post->post_author: ' . $order->post->post_author . '<br>';\r\n echo '$order->post->post_date: ' . $order->post->post_date . '<br>';\r\n echo '$order->post->post_date_gmt: ' . $order->post->post_date_gmt . '<br>';\r\n echo '$order->post->post_content: ' . $order->post->post_content . '<br>';\r\n echo '$order->post->post_title: ' . $order->post->post_title . '<br>';\r\n echo '$order->post->post_excerpt: ' . $order->post->post_excerpt . '<br>';\r\n echo '$order->post->post_status: ' . $order->post->post_status . '<br>';\r\n echo '$order->post->comment_status: ' . $order->post->comment_status . '<br>';\r\n echo '$order->post->ping_status: ' . $order->post->ping_status . '<br>';\r\n echo '$order->post->post_password: ' . $order->post->post_password . '<br>';\r\n echo '$order->post->post_name: ' . $order->post->post_name . '<br>';\r\n echo '$order->post->to_ping: ' . $order->post->to_ping . '<br>';\r\n echo '$order->post->pinged: ' . $order->post->pinged . '<br>';\r\n echo '$order->post->post_modified: ' . $order->post->post_modified . '<br>';\r\n echo '$order->post->post_modified_gtm: ' . $order->post->post_modified_gtm . '<br>';\r\n echo '$order->post->post_content_filtered: ' . $order->post->post_content_filtered . '<br>';\r\n echo '$order->post->post_parent: ' . $order->post->post_parent . '<br>';\r\n echo '$order->post->guid: ' . $order->post->guid . '<br>';\r\n echo '$order->post->menu_order: ' . $order->post->menu_order . '<br>';\r\n echo '$order->post->post_type: ' . $order->post->post_type . '<br>';\r\n echo '$order->post->post_mime_type: ' . $order->post->post_mime_type . '<br>';\r\n echo '$order->post->comment_count: ' . $order->post->comment_count . '<br>';\r\n echo '$order->post->filter: ' . $order->post->filter . '<br>';\r\n echo '<h4>THE ORDER OBJECT (again):</h4>';\r\n echo '$order->order_date: ' . $order->order_date . '<br>';\r\n echo '$order->modified_date: ' . $order->modified_date . '<br>';\r\n echo '$order->customer_message: ' . $order->customer_message . '<br>';\r\n echo '$order->customer_note: ' . $order->customer_note . '<br>';\r\n echo '$order->post_status: ' . $order->post_status . '<br>';\r\n echo '$order->prices_include_tax: ' . $order->prices_include_tax . '<br>';\r\n echo '$order->tax_display_cart: ' . $order->tax_display_cart . '<br>';\r\n echo '$order->display_totals_ex_tax: ' . $order->display_totals_ex_tax . '<br>';\r\n echo '$order->display_cart_ex_tax: ' . $order->display_cart_ex_tax . '<br>';\r\n echo '$order->formatted_billing_address->protected: ' . $order->formatted_billing_address->protected . '<br>';\r\n echo '$order->formatted_shipping_address->protected: ' . $order->formatted_shipping_address->protected . '<br><br>';\r\n echo '- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <br><br>';\r\n\r\n // 2) Get the Order meta data\r\n $order_meta = get_post_meta($order_id);\r\n\r\n echo '<h3>RAW OUTPUT OF THE ORDER META DATA (ARRAY): </h3>';\r\n echo '<pre>';\r\n print_r($order_meta);\r\n echo '<br><br>';\r\n echo '<h3>THE ORDER META DATA (Using the array syntax notation):</h3>';\r\n echo '$order_meta[_order_key][0]: ' . $order_meta['_order_key'][0] . '<br>';\r\n echo '$order_meta[_order_currency][0]: ' . $order_meta['_order_currency'][0] . '<br>';\r\n echo '$order_meta[_prices_include_tax][0]: ' . $order_meta['_prices_include_tax'][0] . '<br>';\r\n echo '$order_meta[_customer_user][0]: ' . $order_meta['_customer_user'][0] . '<br>';\r\n echo '$order_meta[_billing_first_name][0]: ' . $order_meta['_billing_first_name'][0] . '<br><br>';\r\n echo 'And so on ……… <br><br>';\r\n echo '- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <br><br>';\r\n\r\n // 3) Get the order items\r\n $items = $order->get_items();\r\n\r\n echo '<h3>RAW OUTPUT OF THE ORDER ITEMS DATA (ARRAY): </h3>';\r\n\r\n foreach ($items as $item_id => $item_data) {\r\n\r\n echo '<h4>RAW OUTPUT OF THE ORDER ITEM NUMBER: ' . $item_id . '): </h4>';\r\n echo '<pre>';\r\n print_r($item_data);\r\n echo '<br><br>';\r\n echo 'Item ID: ' . $item_id . '<br>';\r\n echo '$item[\"product_id\"] <i>(product ID)</i>: ' . $item_data['product_id'] . '<br>';\r\n echo '$item[\"name\"] <i>(Product Name)</i>: ' . $item_data['name'] . '<br>';\r\n echo '$item[\"url\"] <i>(Product Url)</i>: ' . get_the_permalink($item_data['product_id']) . '<br>';\r\n // Using get_item_meta() method\r\n echo 'Item quantity <i>(product quantity)</i>: ' . $order->get_item_meta($item_id, '_qty', true) . '<br><br>';\r\n echo 'Item line total <i>(product quantity)</i>: ' . $order->get_item_meta($item_id, '_line_total', true) . '<br><br>';\r\n echo 'And so on ……… <br><br>';\r\n echo '- - - - - - - - - - - - - <br><br>';\r\n\r\n $product_id = $item_data['product_id'];\r\n\r\n $product_category = wp_get_post_terms($product_id, 'product_cat');\r\n $cats = '';\r\n $c = 0;\r\n foreach ($product_category as $cat) {\r\n $sep = ( $c == 0 ? ',' : '');\r\n $cats .= $cat->name . $sep;\r\n $c++;\r\n }\r\n\r\n echo $cats;\r\n }\r\n\r\n echo $string = WC_Geolocation::get_ip_address();\r\n echo '- - - - - - E N D - - - - - <br><br>';\r\n }", "function getMessages(): array;", "public function getOrderById($orderId);", "public function show($id)\n {\n $messages = Message::with('user')\n ->where('user_id', $id)\n ->orWhere('to', $id)\n ->get();\n\n return $messages;\n }", "static public function getMessageByCartId($id_cart)\n\t{\n\t\t$db = Db::getInstance();\n\t\t$result = $db->getRow('\n\t\tSELECT *\n\t\tFROM `'._DB_PREFIX_.'message`\n\t\tWHERE `id_cart` = '.intval($id_cart));\n\t\t\n\t\treturn $result;\n\t}", "function getByID($orderID) {\n $connection = connectionFactory::getConnection();\n\n $result = $connection->query(\"SELECT * FROM `\".$this->symbol.$this->side.\"s` WHERE `ID`=$orderID LIMIT 1\");\n\n $order = NULL;\n if($result) {\n $result->data_seek(0);\n\n //fetch row\n $row = $result->fetch_row();\n $result->close();\n\n //make an order from the row\n $order = new Order($row[2], $row[3], $row[4], $row[5], $row[6], $row[7]);\n\n //set order ID and timestamp\n $order->setID($row[0]);\n $order->setTimestamp($row[1]);\n }\n return $order;\n }", "function GetOrderDetail($id){\n\t\t\t$curl = curl_init();\n\t\t\t$data_array = array(\n\t\t\t\t\"orderNum\" => $id,\n\t\t\t);\n\t\t\t\n\t\t\tcurl_setopt_array($curl, array(\n\t\t\tCURLOPT_URL => 'https://project-shop-324808.as.r.appspot.com/orderDetail/filter?orderNum='.$id,\n\t\t\tCURLOPT_RETURNTRANSFER => true,\n\t\t\tCURLOPT_ENCODING => '',\n\t\t\tCURLOPT_MAXREDIRS => 10,\n\t\t\tCURLOPT_TIMEOUT => 0,\n\t\t\tCURLOPT_FOLLOWLOCATION => true,\n\t\t\tCURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n\t\t\tCURLOPT_CUSTOMREQUEST => 'POST',\n\t\t\tCURLOPT_POSTFIELDS => json_encode($data_array),\n\t\t\tCURLOPT_HTTPHEADER => array(\n\t\t\t\t'Content-Type: application/json'\n\t\t\t),\n\t\t\t));\n\n\t\t\t$response = curl_exec($curl);\n\t\t\tcurl_close($curl);\n\t\t return json_decode($response, true);;\n\t\t}", "public function get_workorder_comments($workorder_id){\n $result = DB::query(Database::SELECT, \"SELECT work_order_id,date_time_utc, message, username FROM \n messages AS t1 INNER JOIN users AS t2 ON t1.from_id = t2.id WHERE work_order_id =\".$workorder_id)\n ->as_object()\n ->execute($this->db);\n return $result;\n\n }", "public function getAll()\n {\n return $this->message;\n }", "public function getAllMessages(){\n \n // possibilité de stocker dans la BDD\n global $bdd;\n $req = $bdd->prepare('SELECT * from contact');\n $req->execute();\n $data = $req->fetchAll();\n return $data;\n }", "public function getMessages(): array;", "function getAllMessages($uid)\n{\n\t$now = new \\DWDateTime();\n\t$sql = '\n\t\tSELECT msgid, title FROM dw_message\n\t\tWHERE uid_recipient = '.\\util\\mysql\\sqlval($uid).'\n\t\t\tAND ((read_datetime >= '.\\util\\mysql\\sqlval($now->format()).'\n\t\t\t\tOR read_datetime = 0)\n\t\t\t\tOR archive = 1)\n\t';\n\treturn \\util\\mysql\\query($sql, true);\n}", "public function messages($id)\n {\n $authUser = request()->user()->id;\n\n // Check if a thread exist and if the user is related to it\n $thread = MessageThread::where('id', $id)\n ->where(function($query) use ($authUser) {\n $query->where('user_one', $authUser)\n ->orWhere('user_two', $authUser);\n })\n ->firstOrFail();\n\n // Fetch all messages from this thread\n $messages = $thread\n ->messages()\n ->select('id','user_id','body','created_at','updated_at')\n ->with('sender:id,name')\n ->paginate();\n\n return response()->json($messages);\n }", "function getMessage($id = '')\n {\n\n //profiling::\n $this->debug_methods_trail[] = __function__;\n\n //declare\n $conditional_sql = '';\n\n //if no valie client id, return false\n if (! is_numeric($id)) {\n $this->__debugging(__line__, __function__, 0, \"Invalid Data [id=$id]\", '');\n return false;\n }\n\n //escape params items\n $id = $this->db->escape($id);\n\n //----------sql & benchmarking start----------\n $this->benchmark->mark('code_start');\n\n //_____SQL QUERY_______\n $query = $this->db->query(\"SELECT *\n FROM settings_emailtemplates\n WHERE id = $id\");\n\n $results = $query->row_array(); //single row array\n\n //----------benchmarking end------------------\n $this->benchmark->mark('code_end');\n $execution_time = $this->benchmark->elapsed_time('code_start', 'code_end');\n\n //debugging data\n $this->__debugging(__line__, __function__, $execution_time, __class__, $results);\n //----------sql & benchmarking end----------\n\n //return results\n return $results;\n }", "public function getMessagesFor($id)\n {\n Message::where('from', $id)->where('to', auth()->id())->update(['read' => true]);\n\n // get all messages between the authenticated user and the selected user\n $messages = Message::where(function($q) use ($id) {\n $q->where('from', auth()->id());\n $q->where('to', $id);\n })->orWhere(function($q) use ($id) {\n $q->where('from', $id);\n $q->where('to', auth()->id());\n })\n ->get();\n\n return response()->json($messages);\n }", "private function getSent($orderId)\n {\n //Getting connection\n $connection = $this->_resource->getConnection();\n //Getting full table name\n $tableName = $this->_resource->getTableName('pagseguro_orders');\n //Update sales_order_grid query\n $mapsDeleteQuery = \"SELECT sent FROM {$tableName} WHERE order_id={$orderId}\";\n return $connection->query($mapsDeleteQuery)->fetch();\n }", "public function messagesHarById($ids, $apikey='') {\n\t\treturn $this->zap->requestother($this->zap->base_other . 'core/other/messagesHarById/', array('ids' => $ids, 'apikey' => $apikey));\n\t}", "public function getOrder($id){\n return $this->repository->find($id);\n }", "public function getOrder(int $orderId) : string\n {\n if (empty($orderId) || $orderId == 0) {\n return json_encode(['Error' => 'Invalid Order data.']);\n }\n\n /* check cache and return */\n $order = Cache::store('redis')->tags(['orders'])->get($orderId);\n\n /* not in cache, let's load */\n if (!$order) {\n $order = Order::with('order_items')->find($orderId);\n if ($order != null) {\n /* found it, cache it! */\n Cache::store('redis')->put($orderId, json_encode($order));\n }\n }\n\n if (empty($order)) { // null or false\n return json_encode(['Error' => 'Invalid Order Id.']);\n }\n\n return json_encode(['Success' => true, 'data' => $order]);\n }", "public function get_sent(){\n\t\t\tglobal $db;\n\n\t\t\t$user_id = $_SESSION['logged_admin_id'];\n\n\t\t\t$sql = \"SELECT * FROM message \";\n\t\t\t$sql .= \" WHERE sender_id = {$user_id} \";\n\n\t\t\t$messages = $db->query($sql);\n\n\t\t\tconfirm($messages);\n\n\t\t\treturn $messages;\n\t\t}", "public function get_order($platformOrderId);", "public function getTelyport($order_id);", "public function getMessages() : array {}", "public function get_data_message($id)\n {\n $query = $this->db->query(\"select * from inboxn right join usuarios on inboxnUsuarioId = id where inboxnId = \" . $id);\n return $query->row();\n }", "function getStatusMessage($id){\r\n\t\r\n\treturn getInfo('stato', 'messaggi', 'id = ' . $id);\r\n\r\n}", "public function getById($id){\r\n\t\t$url = WEBSERVICE. \"orders/getById/\" . $id;\r\n\t\t$this->HTTPRequest->setUrl($url);\r\n\t\t$this->HTTPRequest->setMethod(\"GET\");\r\n\t\t$arrayResponse = $this->HTTPRequest->sendHTTPRequest();\r\n\t\treturn $this->arrayToOrder($arrayResponse, true);\r\n\t}", "public function get_message();", "public function get_message();", "public function getOneInfo($order_id){\n\t\t\t$data_old = $this::get($order_id);\n\t\t\treturn $data_old;\n\t\t}", "function bosa_reservation_action_order_id($order) {\n error_log(basename(__FILE__) . ':' . __LINE__ . ' Var: $order = ' . print_r($order->order_id, 1));\n return $order;\n}", "public function order_detail($order_id) {\n //check order for logged user\n $this->load->model('Order_model', 'model');\n\n $where = ['user_id' => $this->userData['user_id'], 'id' => $order_id];\n $order = $this->model->row($where);\n if(!$order) {\n show_404();\n }\n $items = $this->model->get_items($order_id);\n\n $data = [\n 'order' => $order,\n 'items' => $items\n ];\n\n // load only container\n $this->load->view('order_detail', $data);\n }", "function getComments($message_id) {\n $db = Database::db();\n $stmt = $db->prepare('SELECT * FROM Message WHERE parent_message_id = ?');\n $stmt->execute(array($message_id));\n return $stmt->fetchAll(); \n }", "public function getOrderById($id)\n {\n\n }", "function getOrderDetails($orderId)\n{\n $sqlOrder = \"SELECT Client_id,PrixHT,Reglement,DateEmission FROM webcontrat_contrat WHERE Commande='$orderId';\";\n $rowsOrder = querySQL($sqlOrder, $GLOBALS['connectionR']);\n\n foreach ($rowsOrder as $rowOrder) {\n\n $clientId = $rowOrder['Client_id'];\n $priceRaw = $rowOrder['PrixHT'];\n $sqlClient = \"SELECT id,NomSociete,NomContact1 FROM webcontrat_client WHERE id='$clientId';\";\n $rowClient = querySQL($sqlClient, $GLOBALS['connectionR'], true, true);\n\n $companyName = $rowClient['NomSociete'];\n $contactName = $rowClient['NomContact1'];\n $orderCreation = $rowOrder['DateEmission'];\n\n $details = array('clientId' => $clientId, 'companyName' => $companyName, 'contactName' => $contactName, 'priceRaw' => $priceRaw, 'creation' => $orderCreation);\n return ($details);\n }\n}", "public static function get_message_by_id($message_id)\n {\n $tbl_message = Database::get_main_table(TABLE_MESSAGE);\n $message_id = intval($message_id);\n $sql = \"SELECT * FROM $tbl_message\n WHERE id = '$message_id' AND msg_status <> '\" . MESSAGE_STATUS_DELETED . \"' \";\n $res = Database::query($sql);\n $item = array();\n if (Database::num_rows($res) > 0) {\n $item = Database::fetch_array($res, 'ASSOC');\n }\n return $item;\n }", "public function message_get($id)\n\t\t{\t\t\n\t\t\t$query = $this->db\n\t\t\t\t\t->select('*')\n\t\t\t\t\t->from('tbl_messsage')\n\t\t\t\t\t->where('message_id',$id)\t\n\t\t\t\t\t->get();\n\t\t\t\n\t\t\tif(isset($query))\n {\n return $query->result();\n }\n else\n {\n return FALSE;\n }\n\t\t}", "public function getOrderDetail($orderid) {\n $row = array();\n if ($orderid > 0) {\n $db = new clsDBdbConnection();\n $orderid = (int)$orderid;\n $sql = \"select id,quantity,package_id,price from order_detail\n where order_id = $orderid limit 1\";\n $db->query($sql);\n $db->next_record();\n\n $row[\"id\"] = $db->f(\"id\");\n $row[\"quantity\"] = $db->f(\"quantity\");\n $row[\"package_id\"] = $db->f(\"package_id\");\n $row[\"package_price\"] = $db->f(\"price\");\n $package_id = (int)$db->f(\"package_id\");\n\n $sql = \"select currency,total,datecreated,timecreated,customer_id from orders where id = $orderid\";\n $db->query($sql);\n $db->next_record();\n $currency = $db->f(\"currency\");\n $total = $db->f(\"total\");\n $row[\"currency\"] = $currency;\n $row[\"total\"] = $total;\n $row[\"price\"] = $currency.\" \".$total;\n $row[\"datecreated\"] = $db->f(\"datecreated\");\n $row[\"timecreated\"] = $db->f(\"timecreated\");\n $customer_id = (int)$db->f(\"customer_id\");\n\n //Orders after paid will expire 15 days after arrival date, configurable in options\n $arrival_date = CCDLookUp(\"arrivaldate\",\"customer_tripinfo\",\"customer_id = $customer_id\",$db);\n $options = new Options();\n $ordersOptions = $options->getOrdersOptions();\n $expiration_indays = (int)$ordersOptions[\"orders_expiration_indays\"];\n if ( (strtotime($arrival_date) > 0) ) {\n $expiration_date = date(\"Y-m-d\",strtotime($arrival_date.\" + $expiration_indays days\"));\n } else {\n $expiration_date = \"0000-00-00\";\n }\n\n //Get package description for order detail\n $sql = \"select guid,title,title_summary from packages where id = $package_id\";\n $db->query($sql);\n $db->next_record();\n\n $row[\"title\"] = $db->f(\"title\");\n $row[\"title_summary\"] = $db->f(\"title_summary\");\n $row[\"valid_to\"] = $expiration_date;\n $row[\"package_guid\"] = $db->f(\"guid\");\n\n $db->close();\n\n }\n\n return $row;\n }", "function ordGetOrderContent($orderID)\n {\n $data = array();\n $orderID = intval($orderID);\n $orderID = $orderID ? $orderID : -1;\n\n $q_order = db_phquery('SELECT currency_code, currency_value, customerID, order_time FROM ?#ORDERS_TABLE WHERE orderID=?', $orderID);\n $order = db_fetch_row($q_order);\n if (!$order) {\n return $data;\n }\n $currency_code = $order[\"currency_code\"];\n $currency_value = $order[\"currency_value\"];\n unset($q_order);\n\n $q = db_phquery('SELECT name, Price, Quantity, tax, load_counter, itemID FROM ?#ORDERED_CARTS_TABLE WHERE orderID=?', $orderID);\n while ($row = db_fetch_row($q)) {\n $productID = GetProductIdByItemId($row[\"itemID\"]);\n $product = GetProduct($productID);\n if ($product[\"eproduct_filename\"] != null &&\n $product[\"eproduct_filename\"] != null\n ) {\n if (file_exists(DIR_PRODUCTS_FILES . \"/\" . $product[\"eproduct_filename\"])) {\n $row[\"eproduct_filename\"] = $product[\"eproduct_filename\"];\n $row[\"file_size\"] = filesize(DIR_PRODUCTS_FILES . \"/\" . $product[\"eproduct_filename\"]);\n $row[\"file_size_str\"] = getDisplayFileSize($row[\"file_size\"], 'B');\n\n if ($order[\"customerID\"] != null) {\n $custID = $order[\"customerID\"];\n } else {\n $custID = -1;\n }\n\n $row[\"getFileParam\"] =\n \"orderID=\" . $orderID . \"&\" .\n \"productID=\" . $productID . \"&\" .\n \"customerID=\" . $custID;\n\n //additional security for non authorized customers\n if ($custID == -1) {\n $row[\"getFileParam\"] .= \"&order_time=\" . base64_encode($order[\"order_time\"]);\n }\n\n $row[\"getFileParam\"] = Crypt::FileParamCrypt(\n $row[\"getFileParam\"], null);\n $row[\"load_counter_remainder\"] =\n $product[\"eproduct_download_times\"] - $row[\"load_counter\"];\n\n//\t\t\t\t\t$currentDate\t= dtGetParsedDateTime( Time::dateTime() );\n//\t\t\t\t\t$betweenDay\t\t= _getDayBetweenDate(\n//\t\t\t\t\t\t\tdtGetParsedDateTime( $order[\"order_time\"] ),\n//\t\t\t\t\t\t\t$currentDate );\n //TODO: use class instead function \n $betweenDay = Time::getDaysInterval($order[\"order_time\"]);\n\n\n $row[\"day_count_remainder\"] =\n $product[\"eproduct_available_days\"] - $betweenDay;\n\n }\n }\n\n $row[\"PriceToShow\"] = $currency_code . \" \" . RoundFloatValueStr($currency_value * $row[\"Price\"] * $row[\"Quantity\"]);\n $row[\"ItemPrice\"] = RoundFloatValueStr($currency_value * $row[\"Price\"] * $row[\"Quantity\"]);\n $row[\"ItemBPrice\"] = RoundFloatValueStr($currency_value * $row[\"Price\"]);\n $data[] = $row;\n }\n\n return $data;\n }", "public function getOrder($id){\n $this->db->select('o.*, c.name, c.email, c.phone, c.address');\n $this->db->from($this->ordTable.' as o');\n $this->db->join($this->custTable.' as c', 'c.id = o.customer_id', 'left');\n $this->db->where('o.id', $id);\n $query = $this->db->get();\n $result = $query->row_array();\n \n // Get order items\n $this->db->select('i.*, p.image, p.name, p.price');\n $this->db->from($this->ordItemsTable.' as i');\n $this->db->join($this->proTable.' as p', 'p.id = i.product_id', 'left');\n $this->db->where('i.order_id', $id);\n $query2 = $this->db->get();\n $result['items'] = ($query2->num_rows() > 0)?$query2->result_array():array();\n \n // Return fetched data\n return !empty($result)?$result:false;\n }", "public function getMessageById($ticketMessageId);" ]
[ "0.7444374", "0.68695325", "0.6848723", "0.6825689", "0.67536336", "0.6525853", "0.6404732", "0.63732004", "0.63544387", "0.63276553", "0.63276553", "0.63276553", "0.63276553", "0.62869376", "0.62760055", "0.62728745", "0.6240173", "0.6201205", "0.6200441", "0.6185477", "0.6181355", "0.6178124", "0.61775875", "0.6175684", "0.61710024", "0.6170001", "0.6155786", "0.6148177", "0.6126583", "0.61217016", "0.61062074", "0.6091511", "0.60519314", "0.6037083", "0.60334265", "0.6023528", "0.6015515", "0.60051477", "0.5996217", "0.5993598", "0.59885526", "0.5976111", "0.5964087", "0.5951455", "0.5934834", "0.59177816", "0.5905175", "0.5901454", "0.58919406", "0.5885899", "0.5880137", "0.58650804", "0.58621573", "0.58563346", "0.585508", "0.58506775", "0.58439237", "0.5841594", "0.58322406", "0.58307207", "0.58265376", "0.5814697", "0.5814166", "0.58107054", "0.5774691", "0.57681054", "0.57570565", "0.57561725", "0.5752939", "0.57516253", "0.5741871", "0.57397276", "0.57390577", "0.5724507", "0.5723563", "0.5721638", "0.5720546", "0.5713363", "0.57118785", "0.5702406", "0.5702334", "0.5702156", "0.5698472", "0.56975335", "0.56943196", "0.5686057", "0.568536", "0.568536", "0.56811076", "0.56774163", "0.5675732", "0.5672924", "0.56704557", "0.5668233", "0.56662655", "0.5664345", "0.5662973", "0.56585914", "0.5653171", "0.5643202" ]
0.7201004
1
Return current process title
Вернуть текущее название процесса
public static function getProcessTitle() { return cli_get_process_title(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPidTitle()\n\t{\n\t\treturn $this->pidTitle;\n\t}", "protected function getTitle() : string\n\t{\n\t\t$title = str_ireplace('{TITLE}', $this->app->title->get(), $this->app->config->title);\n\n\t\t$this->app->plugins->run('system_theme_get_title', $this, $title);\n\n\t\treturn $title;\n\t}", "public static function getTitle()\r\n {\r\n $title = wcmProject::getInstance()->title . ' :: ';\r\n\r\n $context = self::getContext();\r\n if ($context)\r\n {\r\n if ($context instanceOf wcmSysobject)\r\n {\r\n $title .= getConst($context->getMasterclass()->name);\r\n }\r\n elseif ($context instanceOf wcmObject)\r\n {\r\n $title .= get_class($context);\r\n }\r\n if (isset($context->id) && $context->id)\r\n $title .= ' #' . $context->id;\r\n }\r\n else\r\n {\r\n $title .= ucfirst(wcmSession::getInstance()->getCurrentAction());\r\n }\r\n\r\n return $title;\r\n }", "public static function title()\n {\n return call_user_func(ucfirst(Uri::command()).'::title');\n }", "public function get_page_title_default() {\n $ctx = $this->get_context();\n return $ctx->get_context_name(false);\n }", "function GetTitle()\n{\n\t// If the current page is not set then exit\n\tif( !isset($_SESSION['CURRENT_PAGE']))\n\t{\n\t\treturn '';\n\t}\n\n\t$title = strtolower( $_SESSION['CURRENT_PAGE'] );\n\t$title = str_replace( '.php', '', $title );\n\t$title = str_replace( '_', ' ', $title );\n\t$title = ucwords( $title );\n\t\n\treturn $title;\n}", "final private function getTitle() {\n\t\tif ($this->getPageTitle() != '') {\n\t\t\t$str = $this->getPageTitle().\" | \".$this->getSiteTitle();\n\t\t} else {\n\t\t\t$str = $this->getSiteTitle();\n\t\t}\n\t\treturn $str;\n\t}", "public static function get_title() {\n return static::get_string(\"title\");\n }", "public static function getProjectTitle()\r\n\t{\r\n\t\t// Make sure we are in the Project context\r\n\t\tself::checkProjectContext(__METHOD__);\r\n\t\t// Return project title\r\n\t\tglobal $app_title;\r\n\t\treturn $app_title;\r\n\t}", "static function title(): string\n {\n $title = Extend::buffer('tpl.title', ['head' => false]);\n\n return $title !== '' ? $title : $GLOBALS['_index']->title;\n }", "public function getName()\n\t{\n\t\treturn $this->get('profilename');\n\t}", "protected function setProcessTitle()\n {\n if (version_compare(PHP_VERSION, '5.5', 'lt')) {\n return;\n }\n\n // Mac OS X does not support cli_set_process_title() due to security issues\n // Bug fix for issue https://github.com/zfcampus/zf-console/issues/21\n if (PHP_OS == 'Darwin') {\n return;\n }\n\n cli_set_process_title($this->name);\n }", "public function getTitle(){\n\t\t$path = $_SERVER['SCRIPT_FILENAME'];\n\t\t$title = basename($path,'.php');\n\t\t$title = str_replace(\"_\", \" \", $title);\n\t\tif($title == 'index'){\n\t\t\t$title = 'home';\n\t\t}\n\t\telse if($title == 'contact'){\n\t\t\t$title = 'contact';\n\t\t}\n\n\t\treturn $title = ucwords($title);\n\t}", "public static function getTitle() {\n self::create();\n return self::$instance->title;\n }", "public function title()\n\t{\n\t\tif ( empty( $this->title ) )\n\t\t{\n\t\t\treturn \"no title\";\n\t\t}\n\t\t\n\t\treturn $this->title;\n\t}", "public static function getTitle()\r\n\t{\r\n\t\treturn self::$siteTitle . (is_null(self::$siteTitle) || is_null(self::$pageTitle) ? '' : ' - ') . self::$pageTitle;\r\n\t}", "public function getProgName();", "public static function get_title() {\n\t\t$klass = self::getInstance();\n\t\t$title = $klass->page_title;\n\t\t\n\t\tif(isset($klass->config['site_title'])) {\n\t\t\t$title = $klass->config['site_title'] . $klass->config['title_seperator'] . $title;\n\t\t}\n\t\t\n\t\t\n\t\tif(isset($klass->page_title)){\n\t\t\treturn $title;\n\t\t}else{\n\t\t\treturn '';\n\t\t}\n\t}", "public static function getTitle() {\n if(self::isMain()) {\n return Structure::findOne(1)->title;\n } else {\n return self::$currentTitle\n ? self::$currentTitle\n : (self::$current ? self::$current->title : null);\n }\n }", "final private function getSiteTitle() {\n\t\treturn SITE_TITLE;\n\t}", "public function getTitle() {\n if (empty($this->title)) {\n $this->title = $this->getDefaultTitle();\n }\n return $this->title;\n }", "public function get_title() {\n\t\t\tif ( isset( $this->project['title'] ) ) {\n\t\t\t\treturn $this->project['title'];\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}", "public function getPageTitle() {\n\t\treturn $this->pageTitle;\n\t}", "protected function pageTitle()\n {\n return $this->webDriver()->getTitle();\n }", "public function getTitle() {\n return \"Title | \" . time(); \n }", "public function title()\n {\n if ($this->title === null)\n $this->title = \"Unnamed Page\";\n\n return $this->title;\n }", "public function title()\n {\n if ($this->title === null)\n $this->title = \"Unnamed Page\";\n\n return $this->title;\n }", "private function _getPageTitle()\n {\n if (empty($this->_title)) {\n $this->_title = 'Hostel-J';\n }\n\n return $this->_title;\n }", "public function getTitle() {\n if ($page = $this->getActivePage()) {\n return $page->getTitle();\n }\n }", "public function getTitle()\n\t{\n\t\t$title = null;\n\t\tif(!is_null($this->title)){\n\t\t\t$title = $this->title.((!is_null($this->appendTitle)) ? $this->appendTitle : '');\n\t\t} else if (!is_null($this->defaultTitle)){\n\t\t\t$title = $this->defaultTitle;\n\t\t}\n\t\treturn $title;\n\t}", "public function get_title() {\n\t\treturn $this->definition['name'];\n\t}", "public function page_title() {\n\n $title = array_key_exists('page_title', $this->curr_page) ?\n $this->curr_page['page_title'] :\n $this->curr_page['page'];\n\n echo $title;\n\n }", "public function getTitle() {\n\t\t$this->checkDisposed();\n\t\t\t\n\t\tif ($this->_title === null)\n\t\t\t$this->load();\n\t\treturn $this->_title;\t\n\t}", "public function getTitle()\n {\n return $this->execute(DriverCommand::GET_TITLE);\n }", "function getTitle()\n\t{\n\t\t// Remove filename extension from title\n\t\treturn preg_replace('/\\\\.[a-z0-9]+\\\\z/i','', $this->title);\n\t}", "function getTitle() {\n\t\tglobal $pageTitle;\n\t\tif (isset($pageTitle)) {\n\t\t\techo $pageTitle;\n\t\t} else {\n\t\t\techo 'Default';\n\t\t}\n\t\t\n\t}", "public function getSiteTitle(){\n\t\treturn $this->titlePage;\n\t}", "protected function getTitle() {\n\t\treturn $this->title;\n\t}", "public function getTitle()\n {\n if (!isset($this->assigned_variables['title']))\n return false;\n\n return $this->assigned_variables['title'];\n }", "public function title() {\n\t\treturn ItmCommon::get_option( $this->prefix, 'blogname' );\n\t}", "public function getPageTitle()\n {\n return $this->pageTitle;\n }", "public function getPageTitle()\n {\n return $this->pageTitle;\n }", "public function getPageTitle()\n {\n return $this->_pageTitle;\n }", "public function getTitle()\n {\n return !empty($this->config('title')) ? $this->config('title') : $this->_identifier;\n }", "public function getTitle()\n {\n $title = $this->name;\n $title = str_replace('_', ' ', $title);\n $title = ucwords($title);\n\n return $title;\n }", "function getTitle (){\n\t\tglobal $pageTitle;\n\n\t\tif (isset($pageTitle)) {\n\t\t\techo $pageTitle;\n\t\t}else {\n\t\t\techo 'Default';\n\t\t}\n\t}", "public function getTitle()\n\t{\n\t\tif ($this->pageTitle)\n\t\t{\n\t\t\treturn '<title>' . $this->pageTitle . \"</title>\\n\";\n\t\t}\n\t}", "function getTitle(){\n\n\t\tglobal $pageTitle;\n\n\t\t\tif (isset($pageTitle)) {\n\t\t\t\techo $pageTitle;\n\t\t\t}else{\n\t\t\t\techo 'Default';\n\t\t\t}\n\t}", "public function getPageTitle()\r\n {\r\n return $this->pageTitle;\r\n }", "public function get_siteTitle()\n {\n return $this->_siteTitle;\n }", "public static function get_title()\n\t{\n\t\tif(!isset(self::$meta['title']))\n\t\t{\n\t\t\treturn format::friendly_model_name(Router::$controller) . ' :: ' . format::friendly_model_name(Router::$method);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn strip_tags(self::$meta['title']);\n\t\t}\n\t}", "public function baseTitle()\n {\n return $this->baseTitle;\n }", "public function getProcessUsername()\n {\n $info = posix_getpwuid(posix_getuid());\n\n return $info['name'];\n }", "public function title()\n\t{\n\t\treturn $this->title;\n\t}", "public function title()\n\t{\n\t\treturn $this->title;\n\t}", "public function get_title()\n {\n return $this->user->lang($this->titleKey).':';\n }", "public function get_title() {\n\t\treturn $this->title;\n\t}", "public function get_title() {\n\t\treturn $this->title;\n\t}", "public function get_title() {\n\t\treturn $this->title;\n\t}", "private function Title() {\n\t\tif ($this->HtmlTitle !== null)\n\t\t\treturn \"title=\\\"$this->HtmlTitle\\\" \";\n\t}", "public static function getPageTitle() {\r\n // Set the current page of the WP query since it's used by SEO plugins.\r\n global $wp_query, $page;\r\n $oldPage = $wp_query->get('page');\r\n if ($page > 1) {\r\n $wp_query->set('page', $page);\r\n }\r\n else {\r\n $wp_query->set('page', null);\r\n }\r\n\r\n // Get the title.\r\n $title = self::getPageTitleHelper();\r\n $title = html_entity_decode($title, ENT_QUOTES, 'UTF-8');\r\n\r\n // Set back the current page.\r\n $wp_query->set('page', $oldPage);\r\n\r\n // Return the title.\r\n return $title;\r\n }", "public function GetTitle()\r\n {\r\n return $this->title_;\r\n }", "function getPageTitle() {\n\t\treturn $this->pageTitle;\n\t}", "public function getTabTitle()\n {\n return $this->getTabLabel();\n }", "public function getTabTitle()\n {\n return $this->getTabLabel();\n }", "public function getTabTitle()\n {\n return $this->getTabLabel();\n }", "public function getTabTitle()\n {\n return $this->getTabLabel();\n }", "public function getTabTitle()\n {\n return $this->getTabLabel();\n }", "public function getTabTitle()\n {\n return $this->getTabLabel();\n }", "public function getTabTitle()\n {\n return $this->getTabLabel();\n }", "public function getTabTitle()\n {\n return $this->getTabLabel();\n }", "public function getTabTitle()\n {\n return $this->getTabLabel();\n }", "public function getTabTitle()\n {\n return $this->getTabLabel();\n }", "public function title()\n {\n if($this->internal_code) {\n return $this->internal_code.'-'.$this->name;\n } else {\n return $this->name;\n }\n }", "public function title()\n\t{\n\t\t$page = $this->getParent();\n\n\t\treturn count($page) == 0 ? null: $page['title'];\n\t}", "public function getTitle()\n\t\t{\n\t\t\treturn $this->title !== '' ? $this->title : $this->name;\n\t\t}", "public static function setProcessTitle($title)\n {\n return cli_set_process_title($title);\n }", "function getTitle() {\n\t\tglobal $pageTitle;\n\t\tif (isset($pageTitle)) {\n\t\t\techo $pageTitle;\n\t\t} else {\n\t\t\techo \"VIT\";\n\t\t}\n\t}", "public function getProjectTitle()\r\n\t\t{\r\n\t\t\treturn $this->projectTitle;\r\n\t\t}", "public function getName() {\n return trim(`hostname`) . ':' . getmypid() .\n (isset($this->params['label']) ? \" ({$this->params['label']})\" : '');\n }", "public function title()\n {\n $heading = null;\n if (session()->has('active_menu')) {\n $heading = session('active_menu')->param('page_heading');\n }\n\n return $heading ? $heading : $this->entity->title;\n }", "public function title()\n\t{\n\t\treturn $this -> title;\n\t}", "public static function getName() {\n return self::$currentTitle\n ? self::$currentTitle\n : (self::$current ? self::$current->name : null);\n }", "public function getTitle()\n\t\t{\n\t\t\treturn $this->_title;\n\t\t}", "public function title(){\r\n\t\t$path = $_SERVER['SCRIPT_FILENAME'];\r\n\t\t$title = basename($path, '.php');\r\n\t\t// divide worde \r\n\t\t// first a konta reaplace korte chai, then ki diye replace korte chai, then konta replace korte chai.\r\n\t\t$title = str_replace('_', ' ', $title);\r\n\t\tif ($title == 'index') {\r\n\t\t\t$title = 'home';\r\n\t\t} elseif ($title == 'contact') {\r\n\t\t\t$title = 'contact';\r\n\t\t}\r\n\t\treturn $title = ucwords($title);\r\n\t}", "public function get_title()\n {\n // Return the title value\n return $this->_title;\n }", "public function get_title()\n {\n return $this->get_content_object()->get_title();\n }", "protected function getPageTitle() {\n return $this->getWords()->getFormatted($this->pagename());\n }", "public function getNomeTitularProcessoExterno() {\n return $this->sNomeTitularProcessoExterno;\n }", "public function getPAGE_TITLE()\n {\n\t\t$site_page_title = $this->getSiteDetail('PAGE_TITLE','Official Web Page');\n\t\t$control_page_title = $this->getControlDetail('PAGE_TITLE');\n\t\t\n\t\treturn (!is_null($control_page_title)) ? $control_page_title : $site_page_title;\n }", "public function getTitle()\n\t{\n\t\treturn $this->_getHelper('heidelpay')->__($this->getConfigData('title'));\n\t}", "public static function title()\n\t{\n\t\tif (!empty(self::$value))\n\t\t\treturn self::$value;\n\t\t\n\t\tif (!empty(self::$title))\n\t\t\treturn self::$title;\t\n\t\t\n\t\tif (!empty(Routes::$func))\n\t\t\treturn ucfirst(str_replace('-', ' ', Routes::$func));\n\t\telseif (!empty(Routes::$module))\n\t\t\treturn ucfirst(str_replace('-', ' ', Routes::$module));\n\t\telse\n\t\t\treturn strip_tags(self::$name);\n\t}", "function getTitle() {\n\t\t\tif (isset($this->title)) {\n\t\t\t\treturn $this->title;\n\t\t\t} else {\n\t\t\t\tif (isset($this->paragraphs[0])) {\n\t\t\t\t\treturn trim($this->paragraphs[0]);\n\t\t\t\t} else {\n\t\t\t\t\treturn 'Untitled Document';\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function getTitle()\n\t{\n\t\treturn $this->data[self::KEY_TITLE];\n\t}", "public function getMetaTitle() {\n // Get the main title by default with disabled default title generation.\n $metaTitle = $this->getMainTitle(false);\n\n // Apply custom modifications.\n if (!$this->error && $this->current_view) {\n if ($this->current_view === 'forum' && $this->current_forum) {\n $metaTitle = $this->addCurrentPageToString($metaTitle);\n } else if ($this->current_view === 'topic' && $this->current_topic) {\n $metaTitle = $this->addCurrentPageToString($metaTitle);\n }\n }\n\n return $metaTitle;\n }", "public function getTitle() : string\n {\n $rtn = $this->data['title'];\n\n return $rtn;\n }", "public function pageTitle()\n {\n $res = GlobalRequestStorage::obj()->get('pageTitle');\n if ($res) {\n return strip_tags($res);\n }\n\n return AlinaCfg('title');\n }", "private function getTitle()\n {\n $title = array();\n\n // Get title of IntermediateController\n $intermediateController = $this->agent->getIntermediateAgent()->controller;\n if($intermediateController instanceof \\hhu\\z\\controllers\\IntermediateController) {\n $title = $intermediateController->getTitle();\n }\n if(!is_array($title)) {\n $title = array($title);\n }\n\n // Add application name\n $title[] = \\nre\\configs\\AppConfig::$app['name'];\n\n\n // Return title with delimiter\n return implode(\\nre\\configs\\AppConfig::$misc['title_delimiter'], $title);\n }", "public function title (): string\n {\n return $this->title;\n }", "public function getTitle()\r\n\t{\r\n\t\treturn (isset($this->raw['title']) ? $this->raw['title'] : $this->raw['name']);\r\n\t}" ]
[ "0.74782443", "0.732295", "0.7284166", "0.7187032", "0.7123633", "0.7121802", "0.71147627", "0.7111135", "0.709305", "0.705577", "0.70235455", "0.69686365", "0.6967575", "0.69607204", "0.69564164", "0.69517887", "0.69159055", "0.6913097", "0.6907573", "0.6892404", "0.68659234", "0.6824673", "0.682325", "0.6818498", "0.68051565", "0.6804137", "0.6804137", "0.68037003", "0.68031436", "0.6800005", "0.6781387", "0.67743963", "0.6771925", "0.6765674", "0.6754978", "0.67376304", "0.6730366", "0.6727105", "0.67167556", "0.67077833", "0.66977656", "0.66977656", "0.66940075", "0.6681833", "0.6678552", "0.6669769", "0.66696477", "0.6666632", "0.66662145", "0.66658306", "0.6664825", "0.6658007", "0.6652619", "0.66499436", "0.66499436", "0.6649381", "0.6634586", "0.6634586", "0.6634586", "0.6632576", "0.66270894", "0.66263115", "0.662597", "0.66214967", "0.66214967", "0.66214967", "0.66214967", "0.66214967", "0.66214967", "0.66214967", "0.66214967", "0.66214967", "0.66214967", "0.6621087", "0.66161376", "0.66153353", "0.66131717", "0.6610072", "0.66088736", "0.65999866", "0.6588727", "0.6587273", "0.6583391", "0.65830976", "0.6579352", "0.6577683", "0.6575182", "0.65749466", "0.657254", "0.6564667", "0.65436345", "0.6539998", "0.6537034", "0.6533065", "0.6532585", "0.652792", "0.652678", "0.65261304", "0.6525323", "0.6525244" ]
0.9014263
0
Randomly draws one card out of card deck, determines its face value, then removes the card from the deck. returns array[][display]/[value] Initial ACE value = 11
Случайным образом из колоды карт вытягивается одна карта, определяется её достоинство, затем карта удаляется из колоды. Возвращается массив [display]/[value]. Начальное значение туза = 11
function DrawCards(&$deck, $amount = 1) { for ($i=1; $i<=$amount;$i++) { $suit = array_rand($deck); $faceCard = array_rand($deck[$suit]); unset($deck[$suit][$faceCard]); if ($faceCard > 10) $faceValue = 10; else $faceValue = (int)$faceCard; if ($faceCard == 1) $cardName = "ace"; elseif ($faceCard>1 && $faceCard<11) $cardName = $faceCard; elseif ($faceCard == 11) $cardName = "jack"; elseif ($faceCard == 12) $cardName = "queen"; elseif ($faceCard == 13) $cardName = "king"; $returnValue[] = array ('display' => "$cardName"."_of_"."$suit.png", 'value' => $faceValue); } return $returnValue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function drawCard()\r\n {\r\n $card = array_pop($this->cardsInDeck);\r\n return $card;\r\n }", "public function drawCard(){\n $return_card = $this->deck[$this->cards_drawn];//retrieve current card\n $this->cards_drawn++;\n if($this->cards_drawn >= self::DECKSIZE){//if we have drawn 45 cards, shuffle the deck\n $this->shuffleDeck();\n $this->cards_drawn = 0;\n }\n return $return_card;\n }", "function getHand() {\n $playerCards = array();\n foreach ($GLOBALS['deck'] as $category => $cards) {\n \n // get random, unique cards\n $getCard = null;\n $card = null;\n while ($card == '') {\n $getCard = rand(0, count($cards) - 1);\n $card = explode('.', $cards[$getCard])[0];\n }\n \n // remove card from array and add drawn card to players cards\n unset($GLOBALS['deck'][$category][$getCard]);\n array_push($playerCards, $card);\n }\n \n return $playerCards;\n }", "function pickCard() {\n $cards=[2=>2, 3=>3, 4=>4, 5=>5, 6=>6, 7=>7, 8=>8, 9=>9, 10=>10, 'Jack'=>10, 'Queen'=>10, 'King'=>10, 'Ace'=>11];\n return $card = array_rand($cards,1);\n}", "function drawCard(&$hand, &$deck) {\n\t$hand[] = array_pop($deck);\n}", "public function removeACard($card)\n {\n $cards = $this->cards;\n $randomCardIndex = array_search($card, $cards);\n unset ($cards[$randomCardIndex]);\n }", "function draw_black_card(int $id_room): array\n{\n $sql = \"SELECT C.id_card, C.content\n FROM card C, `use` U\n WHERE C.id_pack = U.id_pack\n AND U.id_room = :id_room\n AND C.id_card LIKE 'B%'\n AND C.id_card NOT IN (\n SELECT H.id_card FROM had H\n WHERE H.id_room = :id_room\n )\n ORDER BY RAND()\n LIMIT 1;\n \";\n $blackCard = get_multiple($sql, ['id_room' => $id_room])[0];\n set('room', $id_room, 'id_card', $blackCard['id_card']);\n\n if (count($blackCard) === 0) {\n // There is no more black cards\n purge_room_cards_history($id_room);\n // Retry after purge\n return draw_black_card($id_room);\n }\n add_room_card_to_history($id_room, $blackCard['id_card']);\n return $blackCard;\n}", "public function shuffle($card)\n {\n //calculating total value\n $totalCount = (count($this->suite) * count($this->rank));\n\n // loops till the end of the count\n for ($x = 0; $x < $totalCount; $x++) {\n\n //method to get random num from 0 to total count -1(i.e, 51)\n $random = mt_rand(0, $totalCount - 1);\n\n $temp = $card[$x]; //copying data from x index of arary to temp var\n\n $card[$x] = $card[$random]; //swaping the data\n\n $card[$random] = $temp; //swaping the data\n }\n return $card;\n }", "function cardShuffle($deck)\n {\n for ($i = 0; $i < count($deck); $i++) {\n for ($j = 0; $j < count($deck[$i]); $j++) {\n $r1 = rand(0, 3);\n $c1 = rand(0, 12);\n $r = rand(0, count($deck));\n $r2 = rand(0, 3);\n $r = rand(0, count($deck));\n $c2 = rand(0, 12);\n $r = rand(0, count($deck));\n $temp = $deck[$r1][$c1];\n $r = rand(0, count($deck));\n $deck[$r1][$c1] = $deck[$r2][$c2];\n $deck[$r2][$c2] = $temp;\n }\n }\n // print_r($deck);\n return $deck;\n }", "function dealCards(&$deck, $num_cards, &$players) { //takes in # of cards user should get and a shuffled deck and players\n foreach ($players as $name=>&$cards) {\n $cards[0] = [];\n //take the deck and slice $num_cards from the beginning\n $cards[0] = array_slice($deck, 0, $num_cards, $preserve_keys = true);\n //remove cards from deck\n array_splice($deck, 0, $num_cards);\n }\n \n}", "public function shuffleCards()\n {\n\n // looping over the suite array\n for ($i = 0; $i < count($this->suite); $i++) {\n\n // looping over the rank array\n for ($j = 0; $j < count($this->rank); $j++) {\n $firstRand = mt_rand(0, 3); //getting a random value btw 0 and 3\n $secondRand = mt_rand(0, 12); //getting a random value btw 0 and 12\n\n // creating a temporary variable and swaping the data\n $temp = $this->cards[$firstRand][$secondRand];\n $this->cards[$firstRand][$secondRand] = $this->cards[$i][$j];\n $this->cards[$i][$j] = $temp;\n }\n }\n // returns the card array\n return $this->cards;\n }", "protected function shuffleCard()\n\t{\n\t\t$this->getCache('singleCardName');\n\t\t$cards = range(1, 54);\n\t\t$shuffleRound = range(1,10);\n\t\tfor($i=0;$i < shuffle($shuffleRound);$i++){\n\t\t\tshuffle($cards);\n\t\t}\n\n\t\t$chairId=$this->lastWinner?:1;\n\t\tfor ($i=0;$i < 54;$i++) {\n\t\t\t$this->cards[$chairId][]=$this->_singleCardName[$cards[$i]];\n\t\t\t$this->detailCards[$chairId]['single'][]=$this->_singleCardName[$cards[$i]];\n\t\t\tif($chairId==$this->chairAmount){\n\t\t\t\t$chairId = 1;\n\t\t\t}else{\n\t\t\t\t$chairId++;\n\t\t\t}\n\t\t}\n\n\t\tif($this->firstRound){\n\t\t\tforeach($this->cards as $k=>$v){\n\t\t\t\tif(in_array('3c',$v)){\n\t\t\t\t\t$this->have3c = $k;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function genrateRandomCard(){\n $avaiables = [];\n foreach ($this->cardCollection as $card) {\n if(!$card->getState()){\n continue;\n }\n $avaiables[] = $card->getName();\n }\n if(count($avaiables) == 0) {\n return false;\n }\n shuffle($avaiables);\n return $this->getCard(current($avaiables));\n }", "function drawCard(&$hand, &$deck) {\n // todo\n}", "function cardShuffle($deck)\n{\n for ($i = 0; $i < count($deck); $i++) {\n for ($j = 0; $j < count($deck[$i]); $j++) {\n $r1 = rand(0, 3);\n $c1 = rand(0, 12);\n $r = rand(0, count($deck));\n $r2 = rand(0, 3);\n $r = rand(0, count($deck));\n $c2 = rand(0, 12);\n $r = rand(0, count($deck));\n $temp = $deck[$r1][$c1];\n $r = rand(0, count($deck));\n $deck[$r1][$c1] = $deck[$r2][$c2];\n $deck[$r2][$c2] = $temp;\n }\n }\n// / print_r($deck);\n return $deck;\n}", "public function pickACard()\n {\n $cards = $this->cards;\n $randomCardIndex = array_rand($this->cards);\n\n return $cards[$randomCardIndex];\n }", "public function cut()\r\n\t{\r\n\t\t$card_count = $this->get_number_of_cards() ;\r\n\t\t$lower_bound = round( $card_count * 0.2, 0 ) ;\r\n\t\t$upper_bound = round( $card_count * 0.8, 0 ) ;\r\n\t\t$cut_index = (int) rand( $lower_bound, $upper_bound ) ;\r\n\t\t\r\n\t\t// cut it up: top to bottom\r\n\t\t$this->cards = array_slice( $this->cards, $cut_index, NULL, TRUE ) + array_slice( $this->cards, 0, $cut_index, TRUE ) ;\r\n\t}", "public function createDeck(){\r\n\r\n for ($x = 0; $x <= 15; $x++)\r\n {\r\n $this->cardsInDeck[] = $x;\r\n }\r\n shuffle($this->cardsInDeck);\r\n }", "public function removeCard($cardval)\n {\n $count = count($this->cards);\n for($x = 0; $x < $count; $x ++)\n {\n if($this->cards[$x]->getValue().$this->cards[$x]->getSuit() == $cardval)\n {\n $card = $this->cards[$x];\n unset($this->cards[$x]);\n return $card;\n }\n }\n return false;\n }", "public function getDrawDeck();", "function createDeck(){\n \t$deck = array();\n \t$suits = array (\n \t\t\"clubs\", \n \t\t\"diamonds\", \n \t\t\"hearts\", \n \t\t\"spades\"\n \t);\n\t\t$faces = array (\n\t \"Ace\" => 1,\n\t \"2\" => 2,\n\t \"3\" => 3, \n\t \"4\" => 4, \n\t \"5\" => 5, \n\t \"6\" => 6, \n\t \"7\" => 7,\n\t \"8\" => 8, \n\t \"9\" => 9, \n\t \"10\" => 10, \n\t \"Jack\" => 11, \n\t \"Queen\" => 12, \n\t \"King\" => 13\n );\n\t\t\n\t // assigns the suits array to each face in faces array\n\t foreach($suits as $suit){\n\t // assign each face a value \n\t foreach($faces as $face => $value){\n\t $deck[\"$face of $suit\"] = $value;\n\t }\n \t}\n\t return $deck;\n }", "private function shuffleDeck(){\n shuffle($this->deck);//using php's built in array shuffle function\n }", "public function deal_one_card();", "function createRandomDeck($deckWithoutInitValues) {\n shuffle($deckWithoutInitValues);\n return $deckWithoutInitValues;\n //make a for loop that limits the number of cards FOR THE USER\n //IN THAT LOOP ARRAY_SHIFT FROM THE DECK AND ARRAY_PUSH THOSE CARDS INTO USER CONTAINER\n}", "public function firstCard(array $deck)\r\n {\r\n $this->playCard = array_pop($deck);\r\n }", "function dealBlackjackCards(&$deck, $num_cards, &$players) {\n foreach ($players as $player) {\n $player->hand = array_slice($deck, 0, $num_cards, $preserve_keys = true);\n array_splice($deck, 0, $num_cards);\n }\n}", "public static function getDeck()\n {\n /* no of suits in the deck */\n $suits = [\"♣\", \"♦\", \"♥\", \"♠\"];\n /* no of ranks in the deck */\n $rank = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14];\n /* deck array wth the empty value */\n $deck = [];\n for ($i = 0; $i < count($suits); $i++) {\n for ($j = 0; $j < count($rank); $j++) {\n /* giving the values of cards in the deck array */\n $deck[$i][$j] = new card($suits[$i], $rank[$j]);\n }\n }\n //print_r($deck);\n return $deck;\n }", "function shuffleDeck($deck) { \n \t$randomDeck = array(); \n\t $keys = array_keys($deck); \n\t shuffle($keys); \n\t foreach($keys as $key) { \n\t $randomDeck[$key] = $deck[$key]; \n\t }\n\t return $randomDeck; \n\t}", "function cardIsAce($card) {\n // todo\n}", "public function shuffleCards()\n {\n shuffle($this->cards);\n }", "function make_deck()\n{\n $deck = [];\n for($rank = 0; $rank < RANK_COUNT; $rank++){\n for($suit = 0; $suit < SUIT_COUNT; $suit++){\n $deck[] = [$rank, $suit];\n }\n }\n shuffle($deck);\n return($deck);\n}", "function dealCards($randomDeck, $numOfPlayers, $cardsPerPlayer){\n \t$players = [];\n\n\t $randomDeckLength = count($randomDeck); // 52 cards\n\n \tfor ($i=0; $i < $numOfPlayers; $i++) { \n \t\t$randomDeckLengthCurrent = count($randomDeck); \n\t\t\t$findIndex = $randomDeckLengthCurrent - $cardsPerPlayer; \n\n\t\t\t// create hand for player/ dealer, each gets 2 cards\n \t\t$usersHand = array_splice($randomDeck, $findIndex);\n\t\t\t$players[$i] = $usersHand;\n \t}\n\t\treturn $players;\n }", "public function ejectCard()\n {\n return $this->currentAtmState->ejectCard();\n }", "function getLastGameCard() {\n if (!PKR_GET_LAST_DEAL)\n return null;\n\n $query = \"select CONCAT(number,':',seed) as cards from pkr_card where game=(select idgame from pkr_game where idtable=\" . $this->curr_table . \" and end=1 and (select count(*) as n from pkr_card where game=idgame)=52 order by idgame desc limit 1) order by seq\";\n $temp = $GLOBALS['mydb']->select($query);\n\n if (!isset($temp))\n return null;\n\n $n = count($temp);\n\n $lcards = array($n);\n for ($i = 0; $i < $n; $i++) {\n $lcards[$i] = $temp[$i][\"cards\"];\n }\n unset($temp);\n\n return $lcards;\n }", "public function removeCard($card,$cards){\n\n\t\tif(!is_array($card)){\n\t\t\t$card = [$card];\n\t\t}\n\n\t\t$this->log[]='card :'.implode($card);\n\t\tforeach($card as $k=>$v){\n\t\t\tforeach($cards as $kk=>$vv){\n\t\t\t\tif(is_array($vv)){\n\t\t\t\t\tif((array_search($v, $vv)) !== false) {\n\t\t\t\t\t\tunset($cards[$kk]);\n\t\t\t\t\t\treturn $cards;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tif(($key = array_search($v, $cards)) !== false) {\n\t\t\t\t\t\tunset($cards[$key]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->log[]='cards :'.implode($cards);\n\t\treturn $cards;\n\t}", "function deal_cards($number_of_cards, $number_of_players)\n{\n\t$players = 0;\n\tif($players > 2)\n\t{\n\n\t}\n}", "public function testCreateFaceCard() {\n \n $suit = 'hearts';\n $value = 'K'; // suicide king\n $card = new Cards\\Card($suit, $value);\n $this->assertEqual($card->getValue(), $value);\n \n }", "public function cards()\n {\n //creating array of cardzz\n $cardzz = [];\n $i = 0; //taking temp var and intializing to 0\n for ($x = 0; $x < count($this->suite); $x++) {\n\n for ($y = 0; $y < count($this->rank); $y++) {\n\n //adding all the data into the cardzz array\n $cardzz[$i++] = $this->rank[$y] . \",\" . $this->suite[$x];\n\n }\n }\n return $cardzz;\n }", "function shufflecards32(){\n\t$cards = 1;\n\tdo {\n\t\t$number = rand(1,32);\n\t\tif ($number == 1 AND $a[$number] != 1)\t\t{$deck[$cards]= \"1-7\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 2 AND $a[$number] != 1)\t{$deck[$cards]= \"2-7\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 3 AND $a[$number] != 1)\t{$deck[$cards]= \"3-7\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 4 AND $a[$number] != 1)\t{$deck[$cards]= \"4-7\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 5 AND $a[$number] != 1)\t{$deck[$cards]= \"1-8\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 6 AND $a[$number] != 1)\t{$deck[$cards]= \"2-8\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 7 AND $a[$number] != 1)\t{$deck[$cards]= \"3-8\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 8 AND $a[$number] != 1)\t{$deck[$cards]= \"4-8\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 9 AND $a[$number] != 1)\t{$deck[$cards]= \"1-9\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 10 AND $a[$number] != 1)\t{$deck[$cards]= \"2-9\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 11 AND $a[$number] != 1)\t{$deck[$cards]= \"3-9\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 12 AND $a[$number] != 1)\t{$deck[$cards]= \"4-9\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 13 AND $a[$number] != 1)\t{$deck[$cards]= \"1-10\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 14 AND $a[$number] != 1)\t{$deck[$cards]= \"2-10\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 15 AND $a[$number] != 1)\t{$deck[$cards]= \"3-10\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 16 AND $a[$number] != 1)\t{$deck[$cards]= \"4-10\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 17 AND $a[$number] != 1)\t{$deck[$cards]= \"1-11\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 18 AND $a[$number] != 1)\t{$deck[$cards]= \"2-11\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 19 AND $a[$number] != 1)\t{$deck[$cards]= \"3-11\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 20 AND $a[$number] != 1)\t{$deck[$cards]= \"4-11\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 21 AND $a[$number] != 1)\t{$deck[$cards]= \"1-12\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 22 AND $a[$number] != 1)\t{$deck[$cards]= \"2-12\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 23 AND $a[$number] != 1)\t{$deck[$cards]= \"3-12\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 24 AND $a[$number] != 1)\t{$deck[$cards]= \"4-12\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 25 AND $a[$number] != 1)\t{$deck[$cards]= \"1-13\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 26 AND $a[$number] != 1)\t{$deck[$cards]= \"2-13\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 27 AND $a[$number] != 1)\t{$deck[$cards]= \"3-13\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 28 AND $a[$number] != 1)\t{$deck[$cards]= \"4-13\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 29 AND $a[$number] != 1)\t{$deck[$cards]= \"1-14\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 30 AND $a[$number] != 1)\t{$deck[$cards]= \"2-14\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 31 AND $a[$number] != 1)\t{$deck[$cards]= \"3-14\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 32 AND $a[$number] != 1)\t{$deck[$cards]= \"4-14\" ;$cards++; $a[$number] = 1;}\n\t} while ($cards <= 32);\n\t\n\treturn $deck;\n}", "function shuffleCards($values)\n{\n// i used shuffle to randomize the order of the elements in my array\n shuffle($values);\n// i used the foreach loop so that it can loop through the values of my array, it will loop\n// through the array and each value\n foreach ($values as $value) {\n // The shuffle array variable is equal to the value\n $shuffleArray[] = $value;\n // i used array_slice so it can return a part of my array,\n $sliceFour = array_slice($shuffleArray, 0, 4);\n }\n// i used return so i could stop and get back the array\n return $sliceFour;\n}", "function getDeck()\n {\n /* no of suits in the deck */\n $suits = [\"♣\", \"♦\", \"♥\", \"♠\"];\n /* no of ranks in the deck */\n $rank = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14];\n /* deck array wth the empty value */\n $deck = [];\n for ($i = 0; $i < count($suits); $i++) {\n for ($j = 0; $j < count($rank); $j++) {\n /* giving the values of cards in the deck array */\n $deck[$i][$j] = new card($suits[$i], $rank[$j]);\n }\n }\n //print_r($deck);\n return $deck;\n }", "public function dealICards();", "function generate($cards){\n\t\t$index =rand(1,20);\n\t\twhile (alreadyHave($index,$cards)==true){\n\t\t\t$index =rand(1,20);\n\t\t}\n\t\treturn $index;\n\t}", "function shuffle($deck)\n {\n for($i = 0; $i < $this->n; $i++) {\n $r = $i + floor(rand(0,1) * ($this->n-$i));\n $temp = $this->deck[$r];\n $this->deck[$r] = $this->deck[$i];\n $this->deck[$i] = $temp;\n }\n return $this->deck;\n }", "public function getHoleCards(){\n\t\treturn array($this->dealCard(), $this->dealCard());\n\t}", "protected function shuffleDeck() {\n\n shuffle($this->shoe);\n\n }", "function cardIsAce($card) {\n\t$face = substr($card, 0, 1);\n\tif ($face == 'A') {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "public function again()\n {\n $cards = array(\n\n \"card1\" => array(\"img\"=>\"/Works/Tarot/public/photos/cards/a01.jpg\",\"description\" => 'Card 1. The Magician: Start of something. Beginner’s luck. Having various tools and means at our disposal. Use of supernatural forces. Creating reality with mind power. Training and acquisition of practical skills. Improvisation. Display or show for other people. Inverse: Tricks, sleight of hand, cheating. Showing off, pretending. Lack of self-awareness about body, sexuality or basic motives. Near miss due to inexperience or inaccuracy. Message: create a new reality.'),\n \"card2\" => array(\"img\"=>\"/Works/Tarot/public/photos/cards/a02.jpg\",\"description\" => 'card2'),\n \"card3\" => array(\"img\"=>\"/Works/Tarot/public/photos/cards/a03.jpg\",\"description\" => 'card3'),\n \"card4\" => array(\"img\"=>\"/Works/Tarot/public/photos/cards/a04.jpg\",\"description\" => 'card4'),\n \"card5\" => array(\"img\"=>\"/Works/Tarot/public/photos/cards/a05.jpg\",\"description\" => 'card5'),\n \"card6\" => array(\"img\"=>\"/Works/Tarot/public/photos/cards/a06.jpg\",\"description\" => 'card6'),\n \"card7\" => array(\"img\"=>\"/Works/Tarot/public/photos/cards/a07.jpg\",\"description\" => 'card7'),\n \"card8\" => array(\"img\"=>\"/Works/Tarot/public/photos/cards/a08.jpg\",\"description\" => 'card8'),\n \"card9\" => array(\"img\"=>\"/Works/Tarot/public/photos/cards/a09.jpg\",\"description\" => 'card9'),\n \"card10\" => array(\"img\"=>\"/Works/Tarot/public/photos/cards/a10.jpg\",\"description\" => 'card10'),\n );\n\n $rand_keys = array_rand($cards, 3);\n\n return $rand_keys;\n }", "function getRemainDeal() {\n $query = \"select * from pkr_card c where game=\" . $this->curr_game . \" and ((number,seed) not in (select card,seed from pkr_dealer where game=\" . $this->curr_game . \" order by seat)) order by seq limit 15\";\n $rows = $GLOBALS['mydb']->select($query);\n return $rows;\n }", "public function shuffle()\n {\n $cardIds = $this->getAllCardIds();\n $count = count($cardIds);\n\n // Fisher Yates @ O(n)\n for ($i = $count - 1; $i > 0; $i--) {\n $j = random_int(0, $i);\n\n $temp = $cardIds[$i];\n $cardIds[$i] = $cardIds[$j];\n $cardIds[$j] = $temp;\n }\n $this->storeCardIdsInCache($cardIds);\n }", "function getDeck()\n{\n /**\n * no of suits in the deck\n */\n $suits = [\"Clubs\", \"Diamonds\", \"Hearts\", \"Spades\"];\n //no of ranks in the deck\n $rank = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14];\n //deck array wth the empty value\n $deck = [];\n for ($i = 0; $i < count($suits); $i++) {\n for ($j = 0; $j < count($rank); $j++) {\n //giving the values of cards in the deck array\n $deck[$i][$j] = new card($suits[$i], $rank[$j]);\n }\n }\n //print_r($deck);\n return $deck;\n}", "public function getCardsRemaining(){\n return count($this->deck) - $this->cards_drawn;\n }", "private function getDeck(){\n\t\treturn implode(\" | \", $this->cards);\n\t}", "public function dealOneCard()\n {\n $cardIds = $this->getCardIdsInCache();\n if (empty($cardIds)) {\n throw new NoMoreCardsException();\n }\n $cardId = array_shift($cardIds);\n $this->storeCardIdsInCache($cardIds);\n\n return $cardId;\n }", "private function randFiche() {\n $fiche_key = array_rand($this->fichesstack);\n $number = $this->fichesstack[$fiche_key];\n\n unset($this->fichesstack[$fiche_key]);\n\n return $number;\n }", "private function selectFromHigherCards($cards): Card\n {\n if ($this->turn === 4) {\n return end($cards);\n }\n return $cards[0];\n }", "function DrawFincaCard($fincaindex)\n{\n global $FincaCards;\n for($f=0; $f<count($FincaCards[$fincaindex]); $f++) {\n $fr = $FincaCards[$fincaindex][$f];\n DrawFruit($fr, '');\n }\n}", "public function get_deck() {\r\n\t\t$all = (array)$this->get_many_by('room_id', $this->session->userdata('room_id'));\r\n\t\t$deck = array();\r\n\t\tforeach ($all as $card) {\r\n\t\t\t$card = (array)$card;\r\n\t\t\t$card['place'] = unserialize($card['place']);\r\n\t\t\tif ($card['place']['type'] == 'deck') {\r\n\t\t\t\tarray_push($deck, $card);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $deck;\r\n\t}", "public function resetIDeck();", "public function fedRandomly(){ \n $random_fed = array_rand($this->elements,1);\n $this->current_fed = $this->elements[$random_fed];\n $this->current_turn = $_SESSION['fed_details']['turn'] ?? $this->current_turn;\n $this->current_turn++;\n $_SESSION['fed_details']['turn'] = $this->current_turn;\n $_SESSION['fed_details']['fedding'][] = array('turn'=>$this->current_turn,$this->current_fed=>1);\n $_SESSION['fed_details']['fed_to'][] = $this->current_fed;\n $this->elements = $_SESSION['fed_details']['elements'];\n $this->fed_details = $_SESSION['fed_details']['fedding']; \n if($this->validateElements()){\n if($this->current_turn>=COUNT_LIMIT){\n $this->flash_message = 'Fed count is reach to its limit!!!';\n $this->is_game_over = true;\n return FALSE;\n }\n } \n return TRUE;\n }", "function getHand(){\n $players = 0;\n \n //creates arrays for the cards for each player\n $player1 = array();\n $player2 = array();\n $player3 = array();\n $player4 = array();\n \n //array to hold the scores of each player\n $scores = array();\n \n //value that cards will stop being distributed at\n $stop = 36;\n \n //creates the deck\n $deck = array();\n for ($i = 1; $i <= 52; $i++) {\n $deck[] = $i;\n }\n \n //shuffles the deck\n shuffle($deck);\n \n $j = 0;\n $k = 0;\n $temp;\n \n //test printing of array\n //prints each value of the array one a new line\n for($i = 0; $i < 4; $i++){\n while($players == 0)\n {\n if($score < $stop){\n $player1[$j] = $deck[$k];\n \n if($deck[$k] >= 13){\n $temp = $deck[$k] % 13;\n \n $score = $score + $temp;\n }\n \n else{\n $score = $score + $deck[$k];\n }\n\n $k++;\n $j++;\n }\n \n if($score >= $stop){\n $scores[$players] = $score;\n $players++;\n $j = 0;\n $score = 0;\n }\n }\n while($players == 1)\n {\n if($score < $stop){\n $player2[$j] = $deck[$k];\n \n if($deck[$k] >= 13){\n $temp = $deck[$k] % 13;\n \n $score = $score + $temp;\n }\n \n else{\n $score = $score + $deck[$k];\n }\n $k++;\n $j++;\n }\n \n if($score >= $stop){\n $scores[$players] = $score;\n $players++;\n $j = 0;\n $score = 0;\n }\n }\n while($players == 2)\n {\n if($score < $stop){\n $player3[$j] = $deck[$k];\n \n if($deck[$k] >= 13){\n $temp = $deck[$k] % 13;\n \n $score = $score + $temp;\n }\n \n else{\n $score = $score + $deck[$k];\n }\n\n $k++;\n $j++;\n }\n \n if($score >= $stop){\n $scores[$players] = $score;\n $players++;\n $j = 0;\n $score = 0;\n }\n }\n while($players == 3)\n {\n if($score < $stop){\n $player4[$j] = $deck[$k];\n \n if($deck[$k] >= 13){\n $temp = $deck[$k] % 13;\n \n $score = $score + $temp;\n }\n \n else{\n $score = $score + $deck[$k];\n }\n \n $k++;\n $j++;\n }\n \n if($score >= $stop){\n $scores[$players] = $score;\n $players++;\n $j = 0;\n $score = 0;\n }\n }\n }\n echo $scores[0];\n echo \"<img src='img/players/Scott.jpg' />\";\n displayHand($player1);\n \n echo $scores[1];\n echo \"<img src='img/players/Michael.jpg' />\";\n displayHand($player2);\n \n echo $scores[2];\n echo \"<img src='img/players/Tristen.jpg' />\";\n displayHand($player3);\n \n echo $scores[3];\n echo \"<img src='img/players/Unknown.png' />\";\n displayHand($player4);\n \n \n $f = 0;\n \n ///////used to display the scores/////////////////////////\n \n // while ($f < 4) {\n // echo $scores[$f] . \"<br/>\";\n // $f++;\n // }\n return $scores;\n////////////////////////////////////////////\n \n}", "public function getCard();", "public function ejectCard()\n {\n $this->atmMachine->setATMState($this->atmMachine->getNoCardState());\n return 'Card ejected';\n }", "public function find_available_cards( ) {\n\t\tcall(__METHOD__);\n\n\t\t$avail_cards = array_keys(self::$CARDS);\n\t\t$used_cards = [];\n\n\t\tif (is_array($this->players)) {\n\t\t\tforeach ($this->players as $player_id => $player) {\n\t\t\t\tif (is_array($player['cards'])) {\n\t\t\t\t\tforeach ($player['cards'] as $card_id) {\n\t\t\t\t\t\tif (in_array($card_id, $used_cards)) {\n\t\t\t\t\t\t\tthrow new MyException(__METHOD__.': Duplicate card (#'.$card_id.') found');\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$used_cards[] = $card_id;\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$this->players[$player_id]['cards'] = [];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$avail_cards = array_diff($avail_cards, $used_cards);\n\n\t\t$this->_available_cards = $avail_cards;\n\t\tshuffle($this->_available_cards);\n\t}", "protected function cards()\n {\n return [];\n }", "public function resetGame(){\r\n $array = $this->getCardsInHand();\r\n $joueurs = array_keys($array);\r\n $this->playerTurn = 0;\r\n foreach ($joueurs as $joueur){\r\n $this->addPlayer($joueur);\r\n }\r\n $this->setCardHidden(null);\r\n $this->setCardsDiscarded(array());\r\n $this->setCardsInDeck(array());\r\n }", "public function testNoMatchingCards() {\n\t\t$game = $this->game;\n\t\t$board = $game->getBoard();\n\t\t$image = 'imposible to match';\n\t\t$board[1]->setImage($image);\n\t\t$result = $game->uncoverCard(2);\n\t\t$expected = ['attempt' => 1, 'isMatch' => false,\n\t\t\t'currentImage' => $board[2]->getImage(), 'remainingCards' => $game->getNumberOfCards()];\n\t\t$this->assertEquals($result, $expected);\n\t\t$result = $game->uncoverCard(1);\n\t\t$expected = ['attempt' => 0, 'isMatch' => false,\n\t\t\t'currentImage' => $image, 'remainingCards' => $game->getNumberOfCards()];\n\t\t$this->assertEquals($result, $expected);\n\t\t$this->assertNull($this->game->getPreviousIndex());\n\t\t$this->assertNull($this->game->getCurrentIndex());\n\t}", "function getRemainCards($arr_rank, $my_plr_cards, $b_cards) {\n $res_arr = array();\n\n $ele_rank = array();\n for ($i = 0; $i < 5; $i++) {\n if (isset($arr_rank[$i])) {\n $v = key($arr_rank[$i]);\n $w = $arr_rank[$i][key($arr_rank[$i])];\n array_push($ele_rank, $v . \",\" . $w);\n }\n }\n\n $ele_own_cards = array();\n $c_my_plr_cards = count($my_plr_cards);\n for ($i = 0; $i < $c_my_plr_cards; $i++) {\n $card = $my_plr_cards[$i][\"card\"];\n $card = $this->pic2Number($card);\n //if ($card == 1) $card = 14;\t\t\t\n array_push($ele_own_cards, $card . \",\" . $my_plr_cards[$i][\"seed\"]);\n }\n\n $ele_b_cards = array();\n $c_b_cards = count($b_cards);\n for ($i = 0; $i < $c_b_cards; $i++) {\n $card = $b_cards[$i][\"card\"];\n $card = $this->pic2Number($card);\n //if ($card == 1) $card = 14;\n array_push($ele_b_cards, $card . \",\" . $b_cards[$i][\"seed\"]);\n }\n\n $arr1 = array_diff($ele_own_cards, $ele_rank);\n $arr2 = array_diff($ele_b_cards, $ele_rank);\n\n $res_arr = array_merge($arr1, $arr2); //array_$arr1 + $arr2;\t\t\n\n unset($ele_rank);\n unset($ele_own_cards);\n unset($ele_b_cards);\n unset($arr1);\n unset($arr2);\n\n $n = 0;\n $c_res_arr = count($res_arr);\n for ($i = 0; $i < $c_res_arr; $i++) {\n list($card, $seed) = split(',', $res_arr[$i]);\n //if ($card == 1) $card = 14;\n $tmp[$n][$card] = $seed;\n\n $n++;\n }\n $res_arr = $tmp;\n unset($tmp);\n\n usort($res_arr, by_key);\n\n $res_arr = array_slice($res_arr, 0, 5);\n\n $n = 0;\n foreach ($res_arr as $k) {\n foreach ($k as $card => $value) {\n $tmp[$n][\"card\"] = $card;\n $tmp[$n][\"seed\"] = $seed;\n\n $n++;\n if ($n > 4)\n break;\n }\n }\n $res_arr = $tmp;\n unset($tmp);\n\n return $res_arr;\n }", "public function getDeckArray(){\n return $this->deck;\n }", "public function damageDealt()\n {\n return rand(0,10);\n }", "function delete_card($id)\n {\n return $this->db->delete('card',array('id'=>$id));\n }", "function random_element($array)\n{\n shuffle($array);\n return array_pop($array);\n}", "function random_element($array)\n{\n shuffle($array);\n return array_pop($array);\n}", "function shuffleDeck() {\n $imgDir = array_diff(scandir($GLOBALS['path']), array());\n \n // remove .files\n array_splice($imgDir, 0, 2);\n \n for ($i = 0; $i < count($imgDir); $i++) {\n \n // read from each cartegory and get its images\n $categoryCards = array_diff(scandir($GLOBALS['path'] . $imgDir[$i]), array());\n \n // remove .files\n array_splice($categoryCards, 0, 2);\n \n // push category and its cards to deck (eg: clubs -> [1.png, 2.png ...])\n $GLOBALS['deck'][$imgDir[$i]] = $categoryCards;\n }\n \n // start game\n play(players());\n }", "public function getFiveCards() : array;", "function getCard() {\n //$query = \"select number,card,seed,seat,s.player as player from pkr_dealer d inner join pkr_seat s on d.seat=s.seat_number where s.player=\".$this->curr_player.\" and game=\".$this->curr_game.\" and d.idtable=\".$this->curr_table.\" and s.status=\".PLAYING.\" order by number\";\n $query = \"select number,card,seed,seat,player from pkr_dealer where player=\" . $this->curr_player . \" and game=\" . $this->curr_game . \" and idtable=\" . $this->curr_table . \" and player in (select player from pkr_seat where status=\" . PLAYING . \") order by number\";\n $rows = $GLOBALS['mydb']->select($query);\n return $rows;\n }", "public function createCards($cards)\n {\n ksort($cards);\n return array_filter(array_merge([0], array_values($cards)));\n }", "private function shuffleCards(array $cards)\n {\n \n $total_cards = count($cards);\n \n foreach ($cards as $index => $card) {\n \n // Pick a random second card.\n $card2_index = mt_rand(1, $total_cards) - 1;\n $card2 = $cards[$card2_index];\n \n // Swap the positions of the two cards.\n $cards[$index] = $card2;\n $cards[$card2_index] = $card;\n \n }\n \n return $cards;\n }", "public function getCards()\n {\n return [\n 'WHITE' => self::WHITE_CARDS,\n 'BLACK' => self::BLACK_CARDS,\n ];\n }", "public function getCards()\n {\n return [\n 'WHITE' => self::WHITE_CARDS,\n 'BLACK' => self::BLACK_CARDS,\n ];\n }", "public function getCardsUsedCount(){\n\t\treturn 52 - count($this->cards);\n\t}", "function getAssaultMechArray() {\r\n\t\t$dice = rand (1, 2);\r\n\t\tswitch($dice) {\r\n\t\t\tcase 1 :\r\n\t\t\t\treturn array(2,3,3);\r\n\t\t\tcase 2 :\r\n\t\t\t\treturn array(3,3,3);\r\n\t\t}\r\n\t\treturn array(3,3,3);\r\n\t}", "public function releaseCard($chairId,$cards){\n\n\t\tif(!$this->inCards($cards,$this->cards[$chairId])){\n\t\t\tYii::$app->session->setFlash('warning','card not exists');\n\t\t\treturn false;\n\t\t}\n\n\t\tif( \n\t\t\t!$this->releasedCards &&\n\t\t\t$this->firstRound &&\n\t\t\t$this->have3c == $chairId &&\n\t\t\t$cards[0]!='3c'\n\t\t){\n\t\t\tYii::$app->session->setFlash('warning','card not allowed, must 3c');\n\t\t\treturn false;\n\t\t}\n\n\t\t$this->getCache('cardMapByName');\n\t\t$this->getCache('singleCardValue');\n\t\t$this->getCache('singleCardName');\n\t\t$this->getCache('treeCardValue');\n\t\t$this->getCache('treeSeriesCardValue');\n\t\t$this->getCache('fourSeriesCardValue');\n\t\t$this->getCache('jendralCardValue');\n\n\t\t$cards = $this->sortCards($cards);\n\t\t$cardName = $this->concatCards($cards);\n\n\t\t$cardNotAllowed = 1;\n\n\t\tif(isset($this->_singleCardValue[$cardName])){\n\n\t\t\t//joker hanya bisa membantai yg sama warna. joker merah bisa bantai joker hitam\n\t\t\tif( $this->_cardMapByName[$cardName]['label'] == 'r' && \n\t\t\t\t(\t$this->currentCardValue['value'] > 52 ||\n\t\t\t\t\t$this->_cardMapByName[$cardName]['color'] != \n\t\t\t\t\t$this->_cardMapByName[\n\t\t\t\t\t\t$this->_singleCardName[$this->currentCardValue['value']]]['color']\n\t\t\t\t)\n\t\t\t){\n\t\t\t\tYii::$app->session->setFlash('warning','card not allowed');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$cardNotAllowed = 0;\n\t\t\t$card = ['type'=>'single','value'=>$this->_singleCardValue[$cardName]];\n\t\t}elseif(isset($this->_treeCardValue[$cardName])){\n\t\t\t$cardNotAllowed = 0;\n\t\t\t$card = ['type'=>'tree','value'=>$this->_treeCardValue[$cardName]];\n\t\t}elseif(isset($this->_treeSeriesCardValue[$cardName])){\n\t\t\t$cardNotAllowed = 0;\n\t\t\t$card = ['type'=>'treeSeries','value'=>$this->_treeSeriesCardValue[$cardName]];\n\t\t}elseif(isset($this->_fourSeriesCardValue[$cardName])){\n\t\t\t$cardNotAllowed = 0;\n\t\t\t$card = ['type'=>'fourSeries','value'=>$this->_fourSeriesCardValue[$cardName]];\n\t\t}elseif(isset($this->_jendralCardValue[$cardName])){\n\t\t\t$cardNotAllowed = 0;\n\t\t\t$card = ['type'=>'jendral','value'=>$this->_jendralCardValue[$cardName]];\n\t\t}\n\n\t\t//cek apakah kartu yang direlease sesuai dengan mapping\n\t\t//jika tidak sesuai, lakukan penyesuaian\n\t\t//artinya rekomendasi sistem tidak dipakai\n\t\tif(\n\t\t\tisset($this->currentCardValue['owner']) &&\n\t\t\t$this->currentCardValue['owner']!=$chairId && !$this->inCards($cards,$this->detailCards[$chairId][$card['type']])\n\t\t){\n\t\t\t$this->log[]='tidak ada kartu dengan tipe '.$card['type'];\n\t\t}\n\n\t\tif($cardNotAllowed){\n\t\t\tYii::$app->session->setFlash('warning','card not allowed');\n\t\t\treturn false;\n\t\t}else{\n\t\t\t$cardNotAllowed = 1;\n\t\t\tif(!$this->currentCardValue || \n\t\t\t\t(\t$this->currentCardValue['owner']!=$chairId &&\n\t\t\t\t\t(\n\t\t\t\t\t\t( \n\t\t\t\t\t\t\t$card['type'] == $this->currentCardValue['type'] && \n\t\t\t\t\t\t\t$card['value'] > $this->currentCardValue['value'] \n\t\t\t\t\t\t) ||\n\t\t\t\t\t\t( \n\t\t\t\t\t\t\t$card['type'] == 'jendral' && \n\t\t\t\t\t\t\t$card['value'] > $this->currentCardValue['value'] \n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t) || \n\t\t\t\t$this->currentCardValue['owner']==$chairId\n\t\t\t){\n\t\t\t\t$this->setReleaseCard($chairId,$cards,$card['type'],$card['value']);\n\t\t\t\t$cardNotAllowed=0;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "private function getTheFirstDeckCard($deck)\n {\n\n return reset($deck);\n \n }", "public function getCard()\t\t\r\n\t{\r\n\t\treturn $this->card;\r\n\t}", "public function testUncoverTwoIdenticalCards() {\n\t\t$game = $this->game;\n\t\t$board = $game->getBoard();\n\t\t$realImage = $board[1]->getImage();\n\t\t$board[2]->setImage($realImage);\n\t\t$game->setBoard($board);\n\t\t$game->uncoverCard(1);\n\t\t$result = $game->uncoverCard(2);\n\t\t$expected = ['attempt' => 0, 'isMatch' => true,\n\t\t\t\t\t'currentImage' => $realImage, 'remainingCards' => $game->getNumberOfCards() - 1];\n\t\t$this->assertEquals($expected, $result);\n\t\t$this->assertNull($this->game->getPreviousIndex());\n\t\t$this->assertNull($this->game->getCurrentIndex());\n\t\t$this->assertEquals($this->game->getAttempt(), 0);\n\t}", "public function destroy(Card $card)\n {\n $card->delete();\n return back();\n }", "public function destroy(Card $card)\n {\n //\n }", "function playerDist($deck)\n {\n $playerQue = new queue();\n for ($i = 1; $i < 5; $i++) {\n echo \"Enter player $i name \";\n $player = new Player(Utility::String_input());\n for ($j = 0; $j < 9; $j++) {\n $r = rand(0, 3);\n $c = rand(0, count($deck[$r]) - 1);\n $player->pushCard($deck[$r][$c]);\n array_splice($deck[$r], $c, 1);\n }\n $playerQue->enqueue($player);\n }\n return $playerQue;\n }", "function generateRechargeCards($total, $length){\n\t\t// get the first number\n\t\t$card = genRandomNumber($length);\n\t\techo('1: ' . $card);\n\t\techo('<br/>');\n\n\t\tfor ($i = 2; $i <= $total; $i++) {\n\t\t\t$card += 7;\n\t\t\techo(\"$i: \" .$card);\n\t\t\techo '<br/>';\n\t\t}\n\t}", "function getCards() {\n $query = \"select * from pkr_card where game=\" . $this->curr_game . \" order by seq\";\n $rows = $GLOBALS['mydb']->select($query);\n return $rows;\n }", "public function cards (): Vault;", "public function draw($count = 1, $player_id = null) {\r\n\t\tif ($player_id === null)\r\n\t\t\t$player_id = $this->session->userdata('user_id');\r\n\t\t$deck = $this->get_deck();\r\n\t\t$draw = array();\r\n\t\tfor ($i = 0; $i < $count; $i++) {\r\n\t\t\tarray_push($draw, array_pop($deck));\r\n\t\t}\r\n\t\tunset($deck);\r\n\t\tforeach ($draw as $v) {\r\n\t\t\tif ($v == null) continue;\r\n\t\t\t$v['place']['type'] = 'player';\r\n\t\t\t$v['place']['id'] = $player_id;\r\n\t\t\t$v['place']['value'] = 'hand';\r\n\t\t\t$this->update($v['id'], $v);\r\n\t\t}\r\n\t}", "private function selectFromLowerCards($cards): Card\n {\n return end($cards);\n }", "function getChamber(){\n\t global $connection;\n\t global $gid;\n \t $saDiceNum = 0;\n \t $sum = 0;\n \t $i = 1;\n \t $saDetail = \"\";\n \t $sql = \"select chamberDiceNum from chamber\";\n \t $result = mysqli_query($connection, $sql);\n \t while ($row = mysqli_fetch_array($result)): {\n \t\t$saDiceNum += $row['chamberDiceNum'];\n \t }endwhile;\n\n \t $rdmGen = rand(1,$saDiceNum);\n\n \t mysqli_data_seek($result, 0);\n\n while($row = mysqli_fetch_array($result)): {\n $sum += $row['chamberDiceNum'];\n //echo \"sum= \" . $sum . \"\\n\";\n if ($sum >= $rdmGen){\n break;\n }\n $i++;\n }endwhile;\n\n/*\n \t while ($row = mysqli_fetch_array($result)): {\n \t\tif($sum != $rdmGen){\n \t\t\t$sum += $row['chamberDiceNum'];\n \t\t\t$i++;\n \t\t }\n \t\t else\n \t\t\tbreak;\n \t }endwhile;\n*/\n \t $finalSQL = \"select chamberDetails from chamber where chamberID = '$i'\";\n \t $finalResult = mysqli_query($connection, $finalSQL);\n\n \t while($row = mysqli_fetch_array($finalResult)):{\n\t\t $saDetail = $row['chamberDetails'];\n\t }endwhile;\n\t $gid = $i;\n return $saDetail;\n }", "public function shuffleDeck(): void\n {\n shuffle($this->deck);\n session()->put('deck', $this->deck);\n }", "public function destroy(game_cards $game_cards)\n {\n //\n }", "public function getOpponentCards()\n\t\t{\n\t\t\t$this->_populateOpponentCards();\n\t\t\treturn $this->_opponent_cards;\n\t\t}", "function delete_deck($deck_id){\n\t\t$this->db->delete('flashcards',array('deck_id'=>$deck_id));\n\t\t//Then delete deck\n\t\t$this->db->delete('deck',array('deck_id'=>$deck_id));\n\n\t}", "public function getCards(): array\n {\n return $this->cards;\n }" ]
[ "0.66922235", "0.66361", "0.63593745", "0.6309206", "0.623363", "0.614574", "0.61143655", "0.60158044", "0.58917016", "0.58144695", "0.5803489", "0.57653314", "0.57534844", "0.575118", "0.57298625", "0.57181144", "0.571198", "0.570174", "0.5695425", "0.5651855", "0.5561825", "0.5556892", "0.55185455", "0.5500956", "0.54977524", "0.54597694", "0.54363966", "0.5428944", "0.53962815", "0.5390422", "0.5371569", "0.536406", "0.5356971", "0.5355467", "0.53546464", "0.53300583", "0.5312529", "0.53076637", "0.5303242", "0.5295366", "0.52853185", "0.5239666", "0.52378845", "0.51966745", "0.51917166", "0.5188672", "0.5174677", "0.5171866", "0.5169234", "0.5134648", "0.509884", "0.5094399", "0.5090535", "0.5071979", "0.50537723", "0.50441545", "0.5042606", "0.501774", "0.50046384", "0.5003635", "0.49973306", "0.49934238", "0.49931487", "0.49868804", "0.49848285", "0.49696004", "0.49641663", "0.49631384", "0.49541482", "0.495293", "0.49526158", "0.4949706", "0.4949706", "0.49268374", "0.49158928", "0.49141306", "0.49125776", "0.49098766", "0.48941562", "0.48941562", "0.4883199", "0.48551977", "0.48533505", "0.4851118", "0.4850092", "0.4831188", "0.4827999", "0.48266584", "0.4826069", "0.48247764", "0.48246005", "0.48195258", "0.4818769", "0.48050547", "0.4792624", "0.4782637", "0.47816467", "0.4776497", "0.47674254", "0.47613263" ]
0.72845304
0
Count remaining cards in deck.
Посчитать оставшиеся карты в колоде.
function CountRemainingCards($deck) { $cards = 0; foreach ($deck as $value) $cards = $cards + count($value); return $cards; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRemainingCardCount(){\n\t\treturn count($this->cards);\n\t}", "public function getCardsRemaining(){\n return count($this->deck) - $this->cards_drawn;\n }", "public function count()\n {\n $this->cards;\n return count($this->cards);\n }", "public function count()\n {\n return count($this->cards);\n }", "public function getCardsUsedCount(){\n\t\treturn 52 - count($this->cards);\n\t}", "public function countCards();", "public function getTotalOfCards()\n {\n $sql = 'SELECT COUNT(id) AS counter FROM cards\n WHERE bin != \"yes\"';\n $this->cards_count = $this->dbConnect($sql);\n $cards = $this->cards_count->fetch(\\PDO::FETCH_ASSOC);\n $number_of_cards = $cards['counter'];\n return $number_of_cards;\n }", "public function count_deck_items()\n {\n $this->db->select('deck_item');\n $this->db->from('tour_decks');\n $this->db->group_by('deck_item');\n\n $query = $this->db->get();\n\n return $query->num_rows();\n }", "function getTotalNumberOfCards() {\n\t\t\n\t\t// total number of cards\n\t\t$totalNumberCards = count(self::$spadesCards) + count(self::$clubsCards) + count(self::$heartCards) + count(self::$diamondCards);\n\t\t\n\t\treturn $totalNumberCards;\n\t}", "public function count() {\n return count($this->boardingCards);\n }", "public function getCountTotalUnconfirmedCards()\n {\n $this->utf8();\n $query = $this->pdo->prepare(\"SELECT count(*) FROM cards WHERE confirmed = 0 AND declined = 0\");\n $query->execute();\n $result = $query->fetch();\n if ($result) {\n return $result['count(*)'];\n } else {\n return 0;\n } \n }", "public function getGiftCardCount();", "public function getTotalCardCount()\n {\n return $this->total_card_count;\n }", "public function getCardCount()\n {\n return $this->card_count;\n }", "function getAmountOfCardsChosen($alreadyPickedCards) {\n\t\treturn count($alreadyPickedCards);\n\t}", "public function getTotalOfItemsFront()\n {\n $sql = 'SELECT COUNT(id) AS counter FROM extended_cards\n WHERE bin != \"yes\"\n AND draft = \"no\"\n ';\n $this->items_count = $this->dbConnect($sql);\n $items = $this->items_count->fetch(\\PDO::FETCH_ASSOC);\n $number_of_items = $items['counter'];\n return $number_of_items;\n }", "protected function countRemainingItems() {\n return $this->getIndex()->getTrackerInstance()->getRemainingItemsCount();\n }", "public function remaining(): int;", "public function getCountTotalRefundsPending()\n {\n $this->utf8();\n $query = $this->pdo->prepare(\"SELECT count(*) \n FROM cards \n JOIN orders\n ON cards.id = orders.id_product\n WHERE cards.refunded = 1 \n AND orders.hide = 0\n \");\n $query->execute();\n $result = $query->fetch();\n if ($result) {\n return $result['count(*)'];\n } else {\n return 0;\n } \n }", "public function getTotalOfItemsHome()\n {\n $sql = 'SELECT COUNT(id) AS counter FROM extended_cards\n WHERE bin != \"yes\"\n AND draft = \"no\"\n UNION SELECT COUNT(id) AS countercards FROM cards\n WHERE bin != \"yes\"\n ';\n $this->items_count = $this->dbConnect($sql);\n $items = $this->items_count->fetch(\\PDO::FETCH_ASSOC);\n $number_of_items = $items['counter'];\n return $number_of_items;\n }", "public function Count()\n {\n $cart = $this->Read();\n $count = count($cart);\n\n return (int) $count;\n }", "public function getNumberOfCards($deckId){\n try{\n $stmt = $this->conn->prepare(\"SELECT cards FROM decks where id = :deckId\");\n $stmt->bindParam(\":deckId\", $deckId);\n $stmt->execute();\n return $stmt->fetch();\n } catch(PDOException $e) {\n echo $e->getMessage();\n }\n }", "public function remaining(): int\n {\n return $this->capacity() - $this->offset;\n }", "function get_all_card_count()\n {\n $this->db->from('card');\n return $this->db->count_all_results();\n }", "function calculateTheBlackDeckLength() {\n\t\t\n\t\t//the length of the array's\n\t\t$clubsLength = count(self::$clubsCards) - 1;\n\t\t$spadesLength = count(self::$spadesCards) - 1;\n\t\t\n\t\t//if the length is the same, just return the size of one of them\n\t\tif($clubsLength === $spadesLength) {\n\t\t\t\n\t\t\treturn $clubsLength;\n\t\t\t\n\t\t} else if($clubsLength > $spadesLength) {\n\t\t\t\n\t\t\t//clubs has more cards, so pick the spadeslength\t\n\t\t\treturn $spadesLength;\n\t\t\t\n\t\t} else if($clubsLength < $spadesLength) {\n\t\t\t\n\t\t\t//spades has more cards, so pick the clubslength\t\n\t\t\treturn $clubsLength;\n\t\t}\n\t}", "public function getCount () {\n if ($this->_count === null) {\n $this->_count = $this->getConnection ()->getSlave ()->zcard ($this->name);\n }\n return $this->_count;\n }", "protected function countRemainingItems() {\n /** @var $index \\Drupal\\search_api\\Index\\IndexInterface */\n $index = entity_load('search_api_index', $this->indexId);\n return $index->getTracker()->getRemainingItemsCount();\n }", "public function numToLearn()\n\t{\n\t\t$learned = collect();\n\t\tforeach($this->user->sessions as $session)\n\t\t{\n\t\t\t$learned = $learned->merge(\n\t\t\t\t$session->flashcards()->where('interaction', 'learned')->where('correct', 1)->get()\n\t\t\t);\n\t\t}\n\n\t\t$notLearned = $this->deckCards->diff($learned);\n\t\treturn $notLearned->count();\n\t}", "public function getCountTotalDepositsPending()\n {\n $this->utf8();\n $query = $this->pdo->prepare(\"SELECT count(*) FROM deposits WHERE status = 'Pending'\");\n $query->execute();\n $result = $query->fetch();\n if ($result) {\n return $result['count(*)'];\n } else {\n return 0;\n } \n }", "public function getJokerCount() : int;", "public function remaining(): int\n {\n return (int) max(0, $this->max() - $this->drips());\n }", "public function getRemainingTotal();", "function calculateTheRedDeckLength() {\n\t\t\n\t\t$heartLength = count(self::$heartCards) - 1;\n\t\t$diamondLength = count(self::$diamondCards) - 1;\n\t\t\n\t\t//if the length is the same, just return the size of one of them\n\t\tif($heartLength === $diamondLength) {\n\t\t\t\n\t\t\treturn $heartLength;\n\t\t\t\n\t\t} else if($heartLength > $diamondLength) {\n\t\t\t\n\t\t\t//diamond has more cards, so pick the heartLength\t\n\t\t\treturn $heartLength;\n\t\t\t\n\t\t} else if($heartLength < $diamondLength) {\n\t\t\t\n\t\t\t//heart has more cards, so pick the diamondLength\t\n\t\t\treturn $diamondLength;\n\t\t}\n\t}", "public function count(): int\n {\n return \\count($this->arrSlots);\n }", "public function count(): int\n {\n return count($this->blocks);\n }", "public function getRemaining()\n {\n return $this->remaining;\n }", "public function testCardinal()\n {\n $counter = 0;\n foreach ($this->deck as $key => $card) {\n $counter++;\n }\n\n $this->assertEquals(32, $counter);\n }", "protected function count(): int {\n return count($this->cache());\n }", "function cart_count()\n\t{\n\t\treturn $this->total_items_count(); \n\t}", "public function count()\n {\n return count($this->collectItems());\n }", "public function count()\n {\n return $this->count($this->container);\n }", "public function itemCount()\n {\n return collect($this->cart)->sum();\n }", "function get_remaining_coupons( $coupon_id ) {\n\t\t$remaining = 0;\n\t\t$coupon = get_post( $coupon_id );\n\t\tif ( $coupon && $coupon->post_type == 'tix_coupon' ) {\n\t\t\t$quantity = intval( get_post_meta( $coupon->ID, 'tix_coupon_quantity', true ) );\n\t\t\t$remaining = $quantity;\n\n\t\t\t$used = $this->get_used_coupons_count( $coupon_id );\n\t\t\t$remaining -= $used;\n\t\t}\n\t\treturn $remaining;\n\t}", "public function count(): int\n {\n return count($this->payouts);\n }", "public static function countPendingDisputes()\n {\n return 0;\n }", "public function GetItemsCount(){\n $count_total = 0;\n if ($this->_cart == null && count($this->_cart)==0) return 0;\n foreach($this->_cart as $cart_position){\n $count_total += $cart_position['count'];\n }\n return (int)$count_total;\n }", "public function count()\n {\n $num = 0;\n foreach ($this->items as $item) {\n $num += $item['qty'];\n }\n\n return $num;\n }", "public function count()\n {\n $container = $this->getContainer();\n\n if ($container->notices instanceof SplQueue) {\n return $container->notices->count();\n }\n\n return 0;\n }", "private function getPackagesQuantity(array $postCards): int\n {\n $quantity = 0;\n foreach ($postCards as $cards) {\n $quantity += $cards->getPackagesQuantity();\n }\n\n return $quantity;\n }", "public function count()\n {\n return count($this->factors);\n }", "public function actionCartCount()\r\n {\r\n return CustomerCart::item_count();\r\n }", "public function getGamesQuantity(): int\n {\n return count($this->games);\n }", "public function\n\tgetRemainingCredits(): int\n\t{\n\t\treturn $this -> credits;\n\t}", "public function countItems()\n {\n $result = 0;\n\n foreach ($this->getItems() as $item) {\n $result += $item->getAmount();\n }\n\n return $result;\n }", "public function getTotalOfItemsAdmin()\n {\n $sql = 'SELECT COUNT(id) AS counter FROM extended_cards\n WHERE bin != \"yes\"\n ';\n $this->items_count = $this->dbConnect($sql);\n $items = $this->items_count->fetch(\\PDO::FETCH_ASSOC);\n $number_of_items = $items['counter'];\n return $number_of_items;\n }", "final public function count(): int\n {\n return count($this->items);\n }", "public function itemCount(): int\n {\n return count($this->cartItems);\n }", "public function getRemovedCount(): int\n {\n return count($this->getRemoved());\n }", "private function CountKeys()\n {\n $cart = $this->Read();\n $count = count($cart);\n\n return (int) $count;\n }", "public function count(): int\n {\n return count($this->items);\n }", "public function count(): int\n {\n return count($this->items);\n }", "public function count(): int\n {\n return count($this->items);\n }", "public function count(): int\n {\n return \\count($this->items);\n }", "public function numToReview()\n\t{\n\t\t$userCalculator = new UserStatsCalculator($this->user);\n\t\t$userCalculator->calcRecallScores();\n\t\t$needToReview = $this->user->flashcards()->where('recall_score', '<=', self::REVIEW_THRESHOLD)\n\t\t\t\t\t\t\t\t\t\t\t ->get();\n\t\t$numToReview = $this->deckCards->intersect($needToReview)->count();\n\t\treturn $numToReview;\n\t}", "public function getRepeatsNum($deckName){\n $currentDeck = $this->getDoctrine()->getRepository('AppBundle:Deck')->findOneByName($deckName);\n $loggedUser = $this->getUser();\n $newWords = $this->getDoctrine()->getRepository('AppBundle:Repeater')->findNewWords($loggedUser, $currentDeck);\n $toRepeatWords = $this->getDoctrine()->getRepository('AppBundle:Repeater')->findtoRepeatWords($loggedUser, $currentDeck);\n $toRepeatWordNum = count($toRepeatWords);\n $newWordsNum = count($newWords);\n $numbers = [\"new\"=>$newWordsNum, \"toRepeat\"=>$toRepeatWordNum];\n return $numbers;\n }", "public function count(): int\n {\n return count($this->container);\n }", "public function remainingHopCount()\n {\n return $this->getSNMP()->walk1d( self::OID_STP_X_SMST_REMAINING_HOP_COUNT );\n }", "public function count(): int\n {\n return count($this->messages, COUNT_RECURSIVE) - count($this->messages);\n }", "public function count()\n {\n $this->load();\n return count($this->_items);\n }", "public function count() : int\n {\n return count($this->items);\n }", "public function countEtat_stock(){\n\t\t\t\t\t return count($this->listeEtat_stock());\n\t\t\t\t\t }", "public function count()\n {\n return count($this->items);\n }", "public function count()\n {\n return count($this->items);\n }", "public function count()\n {\n return count($this->items);\n }", "public function count()\n {\n return count($this->items);\n }", "public function count()\n {\n return count($this->items);\n }", "public function count()\n {\n return count($this->items);\n }", "public function count()\n {\n return count($this->items);\n }", "public function count()\n {\n return count($this->items);\n }", "public function count()\n {\n return count($this->items);\n }", "public function count()\n {\n return count($this->items);\n }", "public function count()\n {\n return count($this->items);\n }", "public function count()\n {\n return count($this->items);\n }", "public function count()\n {\n return count($this->items);\n }", "public function count()\n {\n return count($this->items);\n }", "public function count()\n {\n return count($this->items);\n }", "public function count()\n {\n return count($this->items);\n }", "public function getRemaining(): int\n {\n return floor($this->capacityLimit - $this->request->getCapacity());\n }", "public static function count()\n {\n $session = self::init();\n return count($session->notices);\n }", "public function count(): int\n {\n return count($this->getItems());\n }", "public function count() : int\n {\n return \\count($this->items);\n }", "public function count() {\n return count($this->items);\n }", "public function count()\r\n {\r\n return count($this->items);\r\n }", "public function count()\r\n {\r\n return count($this->items);\r\n }", "public function count()\n {\n return count($this->baskets);\n }", "public function get_cart_contents_count()\n {\n }", "public function count()\n {\n return count( $this->items );\n }", "public function getCount() {\n return count($this->items);\n }", "private function getRemainingCountiesCount() {\r\n return self::getUniqueValueFromDB(\"SELECT COUNT(*) FROM `counties` WHERE district IS NULL\");\r\n }", "public function remainInvitations()\n {\n $count = $this->db->query(\"SELECT COUNT(fk_iduserfrom) as nbRemain FROM we__contactsask WHERE fk_iduserto = ?\",[\n $this->session->read('auth')->pk_iduser\n ])->fetch()->nbRemain;\n if($count)\n {\n return $count;\n }\n return 0;\n }" ]
[ "0.8283974", "0.8147469", "0.7646667", "0.76171625", "0.7484095", "0.7439241", "0.74361914", "0.7397886", "0.7255958", "0.7195863", "0.7039659", "0.7017326", "0.6857269", "0.6832754", "0.667717", "0.6620155", "0.6498911", "0.6443188", "0.64196235", "0.6403297", "0.6368915", "0.63538843", "0.6348554", "0.6345818", "0.63107216", "0.63049936", "0.6280168", "0.62791663", "0.6258733", "0.6222325", "0.6174666", "0.6156016", "0.61506397", "0.61480945", "0.60894233", "0.60592103", "0.60572636", "0.6056648", "0.6035778", "0.59958065", "0.59875566", "0.5980865", "0.597568", "0.5964997", "0.596431", "0.5964045", "0.59341395", "0.5921347", "0.59158045", "0.59143734", "0.5912634", "0.5911274", "0.59110284", "0.5904291", "0.5899919", "0.5894897", "0.58842987", "0.5869219", "0.58681214", "0.583925", "0.583925", "0.583925", "0.5830235", "0.58294284", "0.5817816", "0.58172673", "0.58098286", "0.58064663", "0.58001083", "0.57990927", "0.5796258", "0.5796097", "0.5796097", "0.5796097", "0.5796097", "0.5796097", "0.5796097", "0.5796097", "0.5796097", "0.5796097", "0.5796097", "0.5796097", "0.5796097", "0.5796097", "0.5796097", "0.5796097", "0.5796097", "0.5794496", "0.57926077", "0.57881826", "0.5777842", "0.57744354", "0.57740706", "0.57740706", "0.5770828", "0.57654554", "0.57630646", "0.57627285", "0.57620066", "0.5760402" ]
0.84611315
0
Sum up values of cards in an array.
Суммируйте значения карт в массиве.
function SumOflValues($cards) { $sum = 0; foreach ($cards as $card) { $sum = $sum + $card['value']; } return $sum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getHandScore($playerCards) {\n return array_sum($playerCards);\n }", "function arraySumUp ($arrays){\n $sumUp = 0;\n foreach($arrays as $array){\n $sumUp +=$array[\"price\"];\n }\n return $sumUp;\n\n}", "function simpleArraySum($ar) {\n\n return array_sum($ar);\n\n}", "public function total($array, $value){\n $x = 0;\n foreach($array as $a){\n $x += $a[$value];\n // dump($a);\n }\n return $x;\n }", "public function getTotal($array){\n //for mobile inventory\n $mobileSum=0;\n for($i=0;$i<count($array[\"mobile\"]);$i++){\n $mobileSum=$mobileSum+$array[\"mobile\"][$i][\"count\"]*$array[\"mobile\"][$i][\"price\"];\n }\n echo \"Total value for inventory mobile : \".$mobileSum.\"\\n\";\n //for tv inventory\n $tvSum=0;\n for($i=0;$i<count($array[\"tv\"]);$i++){\n $tvSum=$tvSum+$array[\"tv\"][$i][\"count\"]*$array[\"tv\"][$i][\"price\"];\n }\n echo \"Total value for inventory tv : \".$tvSum.\"\\n\";\n $new_array=array(\"mobile\"=>$mobileSum,\"tv\"=>$tvSum);\n //return to use in function printresult\n return $new_array;\n }", "public function get_card_sum_value()\r\n\t{\r\n\t\t\r\n\t\t$sum = 0 ;\r\n\t\t$aces = 0 ;\r\n\t\t\r\n\t\t// first we need a total worst-case summation to see if we have to reduce aces\r\n\t\tforeach( $this->cards as $card )\r\n\t\t{\r\n\t\t\t$value = $card->get_value() ;\r\n\t\t\t$sum += $value ;\r\n\t\t\t\r\n\t\t\tif( $card->get_value() === self::ACE_VALUE )\r\n\t\t\t{\r\n\t\t\t\t$aces += 1 ;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// if we had aces available for reduction, try until we are below the sum threshold\r\n\t\tif( $sum > self::MAX_HAND_VALUE && $aces > 0 )\r\n\t\t{\r\n\t\t\tfor( $i=0; $i<$aces; $i+=1 )\r\n\t\t\t{\r\n\t\t\t\t$sum -= 10 ;\r\n\t\t\t\t\r\n\t\t\t\tif( $sum <= self::MAX_HAND_VALUE )\r\n\t\t\t\t{\r\n\t\t\t\t\treturn $sum ;\r\n\t\t\t\t}\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $sum ;\r\n\t}", "private function calculateSums(array $array): void \n {\n foreach ($array as $element) \n $this->gruppiAccumulator[$element['gruppo']] += $element['peso']; \n }", "public function sumNums(Array $nums);", "function sumDiceHand($aHand) {\n //global $hand;\n \n return array_sum($aHand);\n}", "public function SumArray($array) {\r\n\t\t//harus key yg countnya adalah total\r\n\t\t$sum = array_reduce($array, function ($a, $b) {\r\n\t\t\tif (isset($a[$b['nama']])) {\r\n\t\t\t\t$a[$b['nama']]['total'] += $b['total'];\r\n\t\t\t} else {\r\n\t\t\t\t$a[$b['nama']] = $b;\r\n\t\t\t}\r\n\r\n\t\t\treturn $a;\r\n\t\t});\r\n\r\n\t\treturn array_values($sum);\r\n\t}", "function array_sum($array)\n{\n\treturn array();\n}", "public function sum()\n {\n return array_sum($this->values);\n }", "public function sum()\n {\n return array_sum($this->values);\n }", "public function sum()\n {\n return array_sum($this->values);\n }", "function getTotal($hand)\n{\n $total = 0;\n $hold = []; \n foreach ($hand as $card)\n {\n \n $hold[] = explode('-', $card);\n \n }\n foreach ($hold as $card){\n \t\n switch($card[0]) {\n \t \tcase 'A':\n \t \t\tbreak;\n \t \tcase 'K':\n \t \tcase 'Q':\n \t \tcase 'J':\n $total +=10;\n break;\n default:\n \t \t\t$total += (int)$card[0];\n \t \t\tbreak;\n \t }\n\n }\n foreach ($hold as $card){\n\n \tif($card[0] == 'A') {\n \t\tif(($total + 11) <=\t 21) {\n \t\t\t$total += 11;\n \t\t} else {\n \t\t\t$total += 1;\n \t\t}\n\n \t}\n }\n\n\n return $total;\n}", "public function sum()\n {\n return array_sum($this->toArray());\n }", "public function sum() {\n\t\treturn array_sum( $this->data );\n\t}", "function total($values)\n{\n $resultat = 0;\n foreach ($values as $value)\n {\n $resultat += $value;\n //$resultat = $resultat + $value;\n }\n\n return $resultat;\n}", "function sumArray($inp)\n{\n $sum = $inp[0] + $inp[1] + $inp[2] + $inp[3] + $inp[4];\n return $sum;\n}", "public function sum()\n {\n return array_sum($this->a);\n }", "private function total($array)\n { \n //Retorna el total.\n $total = 0;\n foreach ($array as $item) {\n // Se agrega al total el subtotal de cada item.\n $total += $item->precio * $item->cantidad;\n }\n // Retornando el total.\n return $total;\n }", "function array_sum($array)\n{\n return array();\n}", "private function creditSlot($array)\n {\n $total_win = [];\n foreach ($array as $matchItem) {\n switch ($matchItem) {\n case 3:\n $total_win[] = $this->bet * 0.2;\n continue;\n case 4:\n $total_win[] = $this->bet * 2;\n continue;\n case 5:\n $total_win[] = $this->bet * 10;\n continue;\n }\n }\n return array_sum($total_win);\n }", "function sum($numbers){\n $total = 0;\n for($i = 0; $i < count($numbers); $i++){\n $total += $numbers[$i];\n }\n \n return $total;\n}", "public function sum();", "public function sum();", "function getHandTotal($hand) {\n\t$sum = 0;\n\tforeach ($hand as $card) {\n\t\tif (cardIsAce($card)) {\n\t\t\t$ace = true;\n\t\t}\n\t\t$sum += getCardValue($card);\n\t}\n\tif ($ace == true && $sum > 21) {\n\t\t$newSum = $sum - 10;\n\t\treturn $newSum;\n\t} else {\n\t\treturn $sum;\n\t}\n\n}", "public static function sum(...$arrays): array\n {\n $sum = [];\n\n foreach ($arrays as $array) {\n foreach ($array as $index => $value) {\n if (! array_key_exists($index, $sum)) {\n $sum[$index] = $value;\n } else {\n $sum[$index] += $value;\n }\n }\n }\n\n return $sum;\n }", "public static function sum(...$arrays) {\n\n }", "public static function sum($array, $axis = false)\n {\n if (!is_array($array)) {\n return $array;\n }\n\n $shape = self::shape($array);\n\n if (count($shape) <= 1) {\n return $array;\n }\n\n if ($axis === false) {\n return array_sum(Matrix::flatten($array));\n }\n\n $sum = [];\n $lengthOfArrays = count($array);\n\n if ($axis === 0) {\n if (count($shape) > 2) {\n for ($i = 0; $i < $shape[1]; $i++) {\n $cols = array_column($array, $i);\n if (!empty($cols) && count($cols) > 1) {\n $sum[] = self::sum($cols, 0);\n }\n }\n return $sum;\n }\n return Map\\Multi::add(...$array);\n }\n\n if (!is_array(reset($array))) {\n return array_sum($array);\n }\n\n if (count($shape) > 2) {\n for ($i = 0; $i < $shape[0]; $i++) {\n $sum[] = self::sum($array[$i], 0);\n }\n return $sum;\n }\n\n for ($i = 0; $i < $lengthOfArrays; $i++) {\n $sum[] = array_sum($array[$i]);\n }\n\n return $sum;\n }", "private function sum($value)\n {\n $sum = 0;\n\n for ($i = 0; $i < 12; $i++) {\n if ($i % 2 == 0) {\n $sum += $value[$i];\n continue;\n }\n\n $sum += 3 * $value[$i];\n }\n\n return $sum;\n }", "protected function arraySum($arr)\n\t{\n\t\t$sum = 0;\n\t\tforeach($arr as $a)\n\t\t{\n\t\t\t$sum += $a;\n\t\t}\n\t\treturn $sum;\n\t}", "public static function add(array $data)\n {\n return array_sum($data);\n }", "function sum($numbers[10]){\r\n\r\n \r\n $entireSum =($numbers[0]+$numbers[1]+$numbers[2]+$numbers[3]+$numbers[4]+$numbers[5]+$numbers[6]+$numbers[7]+$numbers[8]+$numbers[9]);\r\n \r\n return $entireSum;\r\n}", "public function findSum() {\n \n //check field arrayNumbers\n if(empty($this->arrayNumbers)) {\n \n $this->arrayNumbers = $this->findArrayNumbers();\n \n }\n \n foreach($this->arrayNumbers as $num) {\n \n $this->sum += $num;\n \n }\n \n return $this->sum; \n \n }", "function sum($arrArg) {\n $total = 0; // Declare a variable to store the sum.\n\n // Iterate through the array and add its elements to total.\n foreach ($arrArg as $arrElement) {\n $total += $arrElement;\n }\n\n return $total; // Return the sum generated.\n}", "function sum_check_box($array)\n{\n\t$num_checks = count($array); \n\t$sum = 0;\n\tfor ($i = 0; $i < $num_checks; $i++)\n\t{\n\t $sum += $array[$i]; \n\t}\n\treturn $sum;\n}", "function sum_check_box($array)\n{\n\t$num_checks = count($array); \n\t$sum = 0;\n\tfor ($i = 0; $i < $num_checks; $i++)\n\t{\n\t $sum += $array[$i]; \n\t}\n\treturn $sum;\n}", "public function sum()\n {\n $sumOfDices = 0;\n foreach ($this->values as $value) {\n $sumOfDices += $value;\n }\n return $sumOfDices;\n }", "function CountRemainingCards($deck)\n{\n $cards = 0;\n foreach ($deck as $value)\n $cards = $cards + count($value);\n return $cards;\n}", "private function getArraySumByKey($array, $key) : int\n\t{\n\t\treturn array_reduce($array, function ($carry, $item) use ($key) {\n\t\t\treturn $carry + $item[$key];\n\t\t});\n\t}", "public function getHandSum()\n {\n $handSum = 0;\n\n for ($i = 0; $i < $this->dices; $i++) {\n $handSum += $this->hand[$i]->getDiceValue();\n }\n return $handSum;\n }", "function card_value($card) {\n $numerals = [\n '2' => 2, '3' => 3, '4' => 4, '5' => 5, '6' => 6,\n '7' => 7, '8' => 8, '9' => 9, 'T' => 10, 'J' => 11,\n 'Q' => 12, 'K' => 13, 'A' => 14\n ];\n $suits = ['c' => 0, 'd' => 100, 'h' => 200, 's' => 300];\n\n return $numerals[$card[0]] + $suits[$card[1]];\n }", "function sumarArrays(array ...$arrays): array\n{\n return array_map(function(array $array): int {\n return array_sum($array);\n }, $arrays);\n}", "public function sum()\n {\n $res = 0;\n for ($i = 0; $i < count($this->values); $i++) {\n $res = $res + $this->values[$i];\n }\n\n return $res;\n }", "public function getCardBalanceTotalsAttribute()\n {\n return $this->cards->sum('balance');\n }", "public static function array_sum_key(array $array, $key)\n\t{\n\t\t$ret = 0;\n\t\tforeach ($array as $k => $data)\n\t\t\t$ret += (isset($data[$key])) ? $data[$key] : 0;\n\n\t\treturn $ret;\n\t}", "function calculate_items($cart) {\n $items = 0;\n if(is_array($cart)) {\n foreach($cart as $product => $qty) {\n $items += $qty;\n }\n }\n return $items;\n}", "public static function bcsum($array, $scale = 4)\r\n\t{\r\n\t\t// use the bcadd function if available\r\n\t\tif (function_exists('bcadd'))\r\n\t\t{\r\n\t\t\t// set the start value\r\n\t\t\t$value = 0.0;\r\n\t\t\t// loop the values and run bcadd\r\n\t\t\tforeach($array as $val)\r\n\t\t\t{\r\n\t\t\t\t$value = bcadd($value, $val, $scale);\r\n\t\t\t}\r\n\t\t\treturn $value;\r\n\t\t}\r\n\t\t// fall back on array sum\r\n\t\treturn array_sum($array);\r\n\t}", "public function sum()\n {\n $this->exception('array', $this->val, __CLASS__, __FUNCTION__);\n\n $this->val = array_sum($this->val);\n\n return Num::set($this->val);\n }", "public function getValue(){\n $value = 0;\n \n foreach($cards as $card){\n if ($card->type == 'COM') $value += 1;\n if ($card->type == 'UNC') $value += 3;\n if ($card->type == 'RAR') $value += 7;\n if ($card->type == 'LEG') $value += 12;\n }\n \n return $value;\n }", "function soma (int ... $valores):string {\n //soma os elementos do array\n return array_sum($valores);\n}", "function sum($arr,$level = 0) {\r\n static $items;\r\n static $count;\r\n if (is_array($arr)){\r\n $level++;\r\n foreach ($arr as $value) {\r\n// echo '<pre>';\r\n// print_r($arr);\r\n// echo '</pre>';\r\n sum($value,$level);\r\n }\r\n } else {\r\n //echo '<br> не масив';\r\n $count++;\r\n $items += $arr; \r\n }\r\n return array('count'=>$count,'item'=>$items);\r\n }", "public function sum()\n {\n if (in_array(1, $this->values)) {\n return -1;\n }\n return array_sum($this->values);\n }", "function sumArrayValue(&$acct_rows, $keys)\n{\n if (!is_array($keys))\n {\n $keys = array($keys);\n $is_karray = false;\n }\n else\n $is_karray = true;\n $sum = array();\n foreach ($keys as $key)\n $sum[$key] = 0;\n foreach ($acct_rows as $row)\n foreach ($keys as $key)\n $sum[$key] += $row[$key];\n if ($is_karray)\n return $sum;\n else\n return $sum[array_shift($keys)];\n}", "function sumAll(...$values)\n{\n $total = 0;\n foreach ($values as $value) {\n $total += $value;\n }\n echo \"Total\" . implode(\",\", $values) . \" = $total\" . PHP_EOL;\n}", "function for_loop_sum($ary_of_nums) {\n $count = 0;\n foreach ($ary_of_nums as $val) {\n $count += $val;\n }\n return $count;\n}", "function returnSumOfAnArray(array $array): float {\n return array_sum($array);\n}", "function calc_scorecard_fcr($scorecards) {\n\t \n\t $fcr_sum = 0;\n\t $count = 0;\n\t \n\t foreach($scorecards AS $values) {\n\t if($values['m3_survey'] > 0) {\n\t $fcr_sum += $values['m3_score'] * $values['m3_survey']; \n\t $count += $values['m3_survey']; \n\t }\n\t }\n\t \n\t if($count == 0) { $true_fcr = 0; }\n\t else { $true_fcr = $fcr_sum / $count; }\n\t \n\t $true_fcr = number_format($true_fcr, 1, '.', ''); \n\t \n\t $array[] = $count;\n\t $array[] = $true_fcr;\n\t \n\t return $array;\n\t}", "function sumOfArrElement($arrData = array())\n{\n\t$total = 0;\n\tforeach($arrData as $data){\n\t\t$total += floatval($data);\n\t}\n\treturn $total;\n}", "function calc_scorecard_nrs($scorecards) {\n\t \n\t $nrs_sum = 0;\n\t $count = 0;\n\t \n\t foreach($scorecards AS $values) {\n\t if($values['m2_survey'] > 0) {\n\t $nrs_sum += $values['m2_score'] * $values['m2_survey']; \n\t $count += $values['m2_survey']; \n\t }\n\t }\n\t \n\t if($count == 0) { $true_nrs = 0; }\n\t else { $true_nrs = $nrs_sum / $count; }\n\t \n\t $true_nrs = number_format($true_nrs, 1, '.', '');\n\n\t $array[] = $count;\n\t $array[] = $true_nrs;\n\t \n\t return $array;\n\t}", "function soma(int...$valores){\n // array_sum efetua a soma\n return array_sum($valores);\n\n}", "function sum(int ...$ints) {\n return array_sum($ints);\n}", "function aVeryBigSum($n, $ar)\n{\n $result = 0;\n foreach ($ar as $number)\n {\n $result += $number;\n }\n\n return $result;\n}", "public function sum()\n {\n return array_sum($this->content);\n }", "function recursiveSum($input){\n //Call it on everything\n\n if(is_int($input)){\n return $input;\n }\n\n $runningTotal = 0;\n for($i=0; $i<count($input); $i++){\n $runningTotal += recursiveSum($input[$i]);\n\n\n }\n \n return $runningTotal;\n\n}", "function total($array) {\n\t\t\t$this->total = $array;\n\t\t}", "function product_sum($id)\n {\n $length = sizeof($id);\n $sum = 0;\n for ($i = 0; $i < $length; $i++) {\n $sum = [$sum[0] + $id[$i]['product_sum']];\n }\n return $sum;\n }", "public static function totalAmounts()\n {\n $total = [];\n foreach (Cart::totalCarts() as $cart) {\n if ($cart->product->offer_price) {\n $total[] = $cart->product_quantity * $cart->product->offer_price;\n } else {\n $total[] = $cart->product_quantity * $cart->product->price;\n }\n }\n return array_sum($total);\n }", "function aggregateSum(array $data, string $column) : array\n{\n $data[0]['sum'] = array_reduce(array_column($data, $column), function ($accumulator, $value) {\n return $accumulator + $value;\n }, 0);\n array_splice($data, 1);\n\n return $data;\n}", "function total_items($cart){\n\t\t$items = 0;\n\t\tif(is_array($cart)){\n\t\t\tforeach($cart as $id => $qty){\n\t\t\t\t$items += $qty;\n\t\t\t}\n\t\t}\n\t\treturn $items;\n\t}", "public static function add()\n {\n return array_sum(func_get_args());\n // return array_sum($numbers);\n }", "function SquareAll($data){\n $a=0;\n //print_r($data);\n foreach ($data as $app) {\n foreach ($app['room'] as $room) {\n $sumR[$app['type']] = $sumR[$app['type']] + $room['area'];\n }\n $a++;\n }\n return $sumR;\n}", "function getColumnSum($arr, $columns)\n\t{\n\t\t$total_array = array();\n\t\tif($columns)\n\t\t{\n\t\t\tforeach($columns as $column_name)\n\t\t\t{\n\t\t\t\tfor($i=0,$c=count($arr); $i<$c; $i++)\n\t\t\t\t{\n\t\t\t\t\t$total_array[$column_name] += $arr[$i][$column_name];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $total_array;\n\t}", "function printSumToConsole(array $data): void\n{\n $total_count = 0;\n foreach ($data as $count) {\n $total_count += $count;\n }\n echo(\"\\rZaznamu vyhodnoceno: \" . $total_count);\n}", "public static function cumsum($array)\n {\n $shape = self::shape($array);\n $sum = [];\n $lengthOfArrays = count($array);\n\n if (! is_array(reset($array))) {\n $arrSum = [];\n for ($i = 0; $i < $lengthOfArrays; $i++) {\n $arrSum[] = ( $i === 0 ? 0 : $arrSum[$i-1] ) + $array[$i];\n }\n return $arrSum;\n }\n\n for ($i = 0; $i < $lengthOfArrays; $i++) {\n $sum[] = self::cumsum($array[$i]);\n }\n return $sum;\n }", "public function calculateSum()\n {\n $sum = 0;\n foreach ($this->positions as $position) {\n $position->calculate();\n $sum += $position->priceSum;\n }\n\n $this->total = ['priceSum' => $sum];\n }", "function total_price()\n{\n\n\t$total = 0;\n\tglobal $con;\n\n\t$sel_price = \"select * from cart \";\n\t$run_price = mysqli_query($con, $sel_price);\n\n\twhile ($p_price = mysqli_fetch_array($run_price)) {\n\n\t\t$pro_id = $p_price['product_id']; //from cart table\n\t\t$pro_qty = $p_price['qty']; // from cart table\n\n\t\t$pro_price = \"select * from products where sport_id = '$pro_id'\";\n\t\t$run_pro_price = mysqli_query($con, $pro_price);\n\n\t\twhile ($pp_price = mysqli_fetch_array($run_pro_price)) {\n\n\t\t\t$sport_price = array($pp_price['sport_price']);\n\t\t\t$single_price = $pp_price['sport_price'];\n\t\t\t$sports_price = $single_price * $pro_qty;\n\t\t\t$values = array_sum($sport_price);\n\t\t\t$total += $sports_price;\n\t\t}\n\t}\n\techo \"RM\" . $total;\n}", "function getHandTotal($hand) {\n // todo\n}", "public function getTotalOfCards()\n {\n $sql = 'SELECT COUNT(id) AS counter FROM cards\n WHERE bin != \"yes\"';\n $this->cards_count = $this->dbConnect($sql);\n $cards = $this->cards_count->fetch(\\PDO::FETCH_ASSOC);\n $number_of_cards = $cards['counter'];\n return $number_of_cards;\n }", "public function f_Sum()\n {\n $value = null;\n $args = func_get_args();\n for ($i = 0; $i < count($args); $i ++) {\n if (is_numeric($args[$i])) {\n if ($i == 0) {\n $value = $args[$i];\n } else {\n $value += $args[$i];\n }\n }\n }\n return $value;\n }", "function TOTAL_ARRAY($array)\n\n{\n\n$i=0;\n\n$cont=0;\n\nwhile(isset($array[$i])){\n\n$cont=$cont+1;\n$i=$i+1;\n\n}\n\nreturn($cont);\n\n\n}", "public static function sumKeys(array $array)\n {\n $final = [];\n array_walk_recursive($array, function ($item, $key) use (&$final) {\n $final[$key] = isset($final[$key]) ? $item + $final[$key] : $item;\n });\n\n return $final;\n }", "function getTotalNumberOfCards() {\n\t\t\n\t\t// total number of cards\n\t\t$totalNumberCards = count(self::$spadesCards) + count(self::$clubsCards) + count(self::$heartCards) + count(self::$diamondCards);\n\t\t\n\t\treturn $totalNumberCards;\n\t}", "public function sum()\n {\n $s = 0;\n foreach (func_get_args() as $a)\n {\n $s+= is_numeric($a) ? $a : 0;\n }\n return $s;\n }", "function update_amounts($value, $key){\n global $data_set;\n $data_set[$key]->amount += $value;\n }", "function improved_kadane(array $array) : int {\n $max_sum = $array[0];\n $current_sum = $array[0];\n \n for ($i=0; $i < count($array); $i++) {\n if ($i==0) {\n continue;\n }\n $current_sum = maximum($current_sum + $array[$i], $array[$i]);\n \n $max_sum = maximum($max_sum, $current_sum);\n \n echo \"(max_sum: $max_sum) current_sum: \".$current_sum.\" \\n\";\n }\n \n return $max_sum;\n}", "public function sum()\n\t{\n\t\treturn $this->n() ? array_sum($this->observations) : null;\n\t}", "function sumCheckBox($array)\r\n{\r\nin_array(\"Orange\",$_POST[\"food\"]);\r\n\t//$num_checks = count($array); \r\n\t//$sum = 0;\r\n\t//for ($i = 0; $i < $num_checks; $i++)\r\n//\t{\r\n\t// $sum += $array[$i]; \r\n\t//}\r\n\t//return $sum;\r\n}", "public function countCards();", "public function total(array $items = []);", "function cross_summa($val) {\n $val = (string) $val;\n $sum = 0;\n for ($i = 0; $i < strlen($val); $i ++)\n $sum += (int) $val[$i];\n return $sum;\n }", "function array_column_sum(array &$input, $column)\n{\n $sum = 0.0;\n\n foreach ($input as &$row) {\n if (isset($row[$column])) {\n $sum += (float) $row[$column];\n }\n }\n\n return $sum;\n}", "public function diceSum()\n {\n $sum = 0;\n foreach ($this->dice as $die) {\n $sum += $die->value;\n }\n return $sum;\n }", "function totalBuildingCapacity($arrayOfObjects ){\n //Temporary Array Value\n $tempArray = array();\n\n foreach($arrayOfObjects as $group){\n $tempArray[] = ($group->getBuildingTotalCapacity());\n //var_dump($group->getBuildingStudentsAssigned());\n }\n\n $arrayTotal = array_sum($tempArray);\n\n //Sum the array values and return the value in the function.\n return $this->totalPossibleBuildingCapacity=$arrayTotal;\n }", "function while_loop_sum ($ary2) {\n $count = 0;\n $iterator = 0;\n while ($iterator < count($ary2)) {\n $count += $ary2[$iterator];\n $iterator++;\n }\n return $count;\n}", "function SumLine($matriks)\n\t{\n\t\t$hasil = array();\n\t\tfor ($i=0; $i < sizeof($matriks); $i++) { \n\t\t\t$tampung = 0;\n\t\t\tfor ($j=0; $j < sizeof($matriks); $j++) { \n\t\t\t\t$tampung += $matriks[$i][$j];\n\t\t\t}\n\t\t\t$hasil[$i]=$tampung;\n\t\t}\n\n\t\t$total=0;\n\t\tfor ($k=0; $k < sizeof($hasil) ; $k++) { \n\t\t\t$total += $hasil[$k];\n\t\t}\n\t\t$hasil[$k] = $total;\n\t\treturn $hasil;\n\t}", "public static function sum($tab, $field){\n\t\t$r = 0;\n\t\tforeach ($tab as $t){\n\t\t\t$r = $r + $t[$field];\n\t\t}\n\t\treturn $r;\n\t}", "function calc_scorecard_wtr($scorecards) {\n\t \n\t $wtr_sum = 0;\n\t $count = 0;\n\t \n\t foreach($scorecards AS $values) {\n\t if($values['m1_survey'] > 0) {\n\t $wtr_sum += $values['m1_score'] * $values['m1_survey']; \n\t $count += $values['m1_survey']; \n\t }\n\t }\n\n\t \n\t if($count == 0) { $true_wtr = 0; }\n\t else { $true_wtr = $wtr_sum / $count; }\n\t \n\t $true_wtr = number_format($true_wtr, 1, '.', '');\n\n\n\t $array[] = $count;\n\t $array[] = $true_wtr;\n\t $array[] = $wtr_sum;\n\t \n\t return $array;\n\t}", "public function getTotal() {\n $sum=0;\n foreach ($this->counter as $key=>$value) {\n $sum+=$this->counter[$key]['darab']*$this->counter[$key]['price'];\n }\n return $sum;\n // Ez a metódus adja vissza a kosár összegét: SUM(termék darabszáma × termék ára)\n }" ]
[ "0.6711857", "0.662291", "0.6461713", "0.6455519", "0.6420145", "0.6389226", "0.6367862", "0.63374436", "0.63207275", "0.6302504", "0.6275954", "0.6214212", "0.6214212", "0.6214212", "0.62132925", "0.6206021", "0.6165616", "0.6164692", "0.6155523", "0.6152674", "0.610632", "0.6072775", "0.606936", "0.6047913", "0.6032", "0.6032", "0.5991471", "0.59871805", "0.5970207", "0.5921239", "0.59030724", "0.58969486", "0.5887731", "0.585018", "0.5810831", "0.579432", "0.5764938", "0.5764938", "0.57635283", "0.5755306", "0.57512033", "0.57426864", "0.57255477", "0.57044524", "0.5696758", "0.5589969", "0.55858994", "0.55600095", "0.55430293", "0.5529457", "0.5516147", "0.5511985", "0.55104035", "0.54994726", "0.5473143", "0.5432857", "0.5427846", "0.54097956", "0.54007226", "0.5399937", "0.53871447", "0.5377542", "0.53725064", "0.5368853", "0.53641856", "0.5354649", "0.5353777", "0.5350815", "0.5336076", "0.5327672", "0.5324196", "0.53150606", "0.53011566", "0.5285111", "0.5270774", "0.52666956", "0.52604526", "0.5237447", "0.5228808", "0.52265614", "0.520283", "0.52012795", "0.5187168", "0.51695454", "0.51614296", "0.51543653", "0.51523584", "0.5149566", "0.51441604", "0.51426965", "0.51401526", "0.51301235", "0.5129848", "0.5128675", "0.5126082", "0.51160586", "0.5115588", "0.5115324", "0.51110166", "0.5092704" ]
0.78628653
0
Serializes arbitrary data to the implemented format.
Сериализует произвольные данные в реализованный формат.
public function serialize($data);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function serialize($data);", "public function serializeData();", "abstract public function serialize();", "public function serialize(array $data) : string;", "public function serialize($data, array $params = array());", "public function serialize($data)\n {\n return $this->serializer->serialize($data);\n }", "abstract public function serialize($value);", "public function getSerialized($data);", "public function serialize($data)\n {\n //echo \"EEEEEEEEEEEEEEEEEEEEEEEE\";\n //exit;\n if ($data instanceof Model && $data->hasErrors()) {\n return $this->serializeModelErrors($data);\n } elseif ($data instanceof ResourceInterface) {\n //echo \"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\";\n //exit;\n return $this->serializeResource($data);\n } elseif (is_array($data)) {\n //echo \"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\";\n //print_r($this->serializeArray($data));\n //exit;\n return $this->serializeArray($data);\n //return $this->serializeDataProvider($data);\n }\n elseif ($data instanceof DataProviderInterface) {\n //echo \"############################################\";\n //exit;\n return $this->serializeDataProvider($data);\n } else {\n return $data;\n }\n }", "private function serialize($data)\n {\n return serialize($data);\n }", "public function serialize();", "public function serialize();", "protected function serializeData($data)\r\n {\r\n return Yii::createObject($this->serializer)->serialize($data);\r\n }", "private function _format_serialize ($data = array())\n\t{\n\t\treturn serialize($data);\n\t}", "abstract protected function write(array $data);", "protected function serializeData($data)\n\t{\n\t\treturn Yii::createObject($this->serializer)->serialize($data);\n\t}", "public function serialize($data, ?SerializerContextInterface $context = null): string;", "public function serialize()\n {\n return serialize($this->_data);\n }", "function _pack($data)\r\n\t{\r\n\t\treturn serialize($data);\r\n\t}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize($data, $format, array $context = array())\n {\n // TODO: Implement serialize() method.\n }", "public function serialize()\n {\n return serialize($this->getData());\n }", "public function serialize()\n {\n return serialize($this->data);\n }", "public function serialize()\n {\n return serialize($this->data);\n }", "abstract public function serialize(): void;", "abstract protected function encodePayload($data);", "public function serialize()\n {\n return \\Heystack\\Core\\serialize($this->getData());\n }", "abstract protected function _encode(array $data);", "public function __toString()\n {\n return serialize($this->_data);\n }", "private function serialize(mixed $data): string\n {\n return $this->serializer->serialize($data, JsonEncoder::FORMAT);\n }", "public function write ($data);", "private function serialize($data)\n\t{\n\t\tif (DEBUG_MODE) {\n\t\t\treturn json_encode($data, JSON_PRETTY_PRINT);\n\t\t}\n\t\treturn json_encode($data);\n\t}", "public function serialize()\n {\n // TODO: Implement serialize() method.\n }", "public function serialize() {\n // TODO: Implement serialize() method.\n }", "private function serializeData($data){\n\t\treturn json_encode($data);\n\t}", "public function encode($data)\n {\n return serialize($data);\n }", "public function __tostring()\n {\n return serialize($this->data);\n }", "public function getSerializedStructure(): string\n {\n return serialize([\n 'data' => $this->data,\n 'metadata' => $this->metadata\n ]);\n }", "public function serialise($data)\n {\n return json_encode($data);\n }", "function serialized_data($data) {\n\treturn base64_encode ( serialize ( $data ) );\n}", "public function write($data);", "public function write($data);", "public function write($data);", "public function write($data);", "public function write($data);", "public function write($data);", "protected function _serializeData() {\n\t\t$this->data['Wizard']['data'] = serialize(\n\t\t\t\tarray(\n\t\t\t\t\t'type' => $this->data['Wizard']['type'],\n\t\t\t\t\t'position' => $this->data['Wizard']['position'],\n\t\t\t\t\t'text' => $this->data['Wizard']['text'],\n\t\t\t\t\t'expires' => $this->data['Wizard']['expires'],\n\t\t\t\t\t'title' => $this->data['Wizard']['title']\n\t\t\t\t)\n\t\t);\n\t}", "public static function serializeData($data) {\n return base64_encode(serialize($data));\n }", "public function serialize()\n {\n }", "public function serialize() \n {\n return json_encode($this->data);\n }", "public function serialize(Node $data);", "function serialize()\n {\n }", "public function serialize()\n {\n return serialize(array(\n $this->accessor,\n $this->objectIdentifier,\n parent::serialize()\n ));\n }", "public function serialize()\n {\n return json_encode($this->getData());\n }", "function serialize() {\r\n\t\t$args = func_get_args();\r\n\t\tif (count($args) > 0) {\r\n\t\t\t$this->outputFormat = 'serialize';\r\n\t\t\tcall_user_func_array(array($this,$args[0]),array_slice($args,1));\r\n\t\t}\r\n\t\treturn; // make sure it stops\r\n\t}", "public function jsonSerialize()\n\t{\n\t\t// Serialize the data elements\n\t\t$serialized = parent::jsonSerialize();\n\n\t\t// Properties\n\t\tif (count($this->properties) > 0) {\n\t\t\t$serialized[\"properties\"] = $this->properties;\n\t\t}\n\n\t\t$serialized[\"SE\"] = $this->SE;\n\t\t$serialized[\"BEG\"] = $this->BEG;\n\t\t$serialized[\"FOB\"] = $this->FOB;\n\t\t$serialized[\"CSH\"] = $this->CSH;\n\t\t$serialized[\"PKG\"] = $this->PKG;\n\t\t\n\t\tif (count($this->HL) > 0) {\n\t\t\t$serialized[\"HL\"] = $this->HL;\n\t\t}\n\t\tif (count($this->REF) > 0) {\n\t\t\t$serialized[\"REF\"] = $this->REF;\n\t\t}\n\t\tif (count($this->DTM) > 0) {\n\t\t\t$serialized[\"DTM\"] = $this->DTM;\n\t\t}\n\t\t\n\t\treturn $serialized;\n\t}", "abstract protected function serializeElementData() : array;", "public function serialize($value)\n {\n }", "protected function writeObject($data = '') {\n\t\tif (is_bool($data)) {\n\t\t\t$data = $data ? 'true' : 'false';\n\t\t}\n\n\t\tif (is_array($data)) {\n\t\t\t$data = json_encode($data, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE);\n\t\t}\n\n\t\tif (is_object($data)) {\n\t\t\t$data = (string)$data;\n\t\t}\n\n\t\tif (is_null($data)) {\n\t\t\t$data = 'NULL';\n\t\t}\n\n\t\t$this->content .= $data;\n\t}", "public function serialize(Serializable $object): string;", "public function serialize()\n {\n return serialize($this->toArray());\n }", "public function serialize()\n {\n return serialize($this->toArray());\n }", "public function serialize()\n {\n return serialize($this->toArray());\n }", "public function serialize()\n {\n return serialize($this->toArray());\n }", "public function serialize()\n {\n return serialize($this->toArray());\n }", "public function serialize($data) {\n return $this->renderWith('Result', new ArrayData(['Data' => print_r($data, true)]));\n }", "public function serialize(object $object);", "function maybe_serialize($data)\n{\n}", "private function _toJSON () {\n return json_encode($this->data, JSON_NUMERIC_CHECK, JSON_PRETTY_PRINT);\n }", "public function serialize(): string {\n return $this->data;\n }", "public function serialize()\n {\n\n }", "abstract public function jsonSerialize () {}", "final public function jsonSerialize(): mixed {}", "final public function jsonSerialize(): mixed {}", "public function serialize(ArrayCollection $datas);", "public function write(array $data): void;", "protected function serialize($data)\n {\n if ($data instanceof JsonSerializable) {\n $data = $data->jsonSerialize();\n }\n\n $callback = Closure::fromCallable([$this, __FUNCTION__]);\n\n if (is_iterable($data)) {\n $data = Pipeline::with($data)->map($callback)->toArray();\n } elseif (is_object($data)) {\n $data = (object)Pipeline::with(object_get_properties($data, true))->map($callback)->toArray();\n }\n\n return $data;\n }", "function maybe_serialize( $data ) {\n\tif ( is_array( $data ) || is_object( $data ) )\n\t\treturn serialize( $data );\n\n\t// Double serialization is required for backward compatibility.\n\t// See https://core.trac.wordpress.org/ticket/12930\n\t// Also the world will end. See WP 3.6.1.\n\tif ( is_serialized( $data, false ) )\n\t\treturn serialize( $data );\n\n\treturn $data;\n}", "public function serialize()\n\t{\n\t\t$fields = $this->as_array();\n\n\t\t$data = json_encode($fields);\n\n\t\treturn $data;\n\t}", "public function jsonSerialize ()\r\n\t{\r\n\t\treturn json_encode( $this->data );\r\n\t}", "private function serialize($data)\n {\n $context = new SerializationContext();\n $context->setSerializeNull(true);\n\n return $this->get('jms_serializer')\n ->serialize($data, 'json', $context);\n }", "private function serialize($data)\n {\n $context = new SerializationContext();\n $context->setSerializeNull(true);\n\n return $this->get('jms_serializer')\n ->serialize($data, 'json', $context);\n }", "public static function _stringify_data( $data ) {\n\n\t\t// Booleans are special, lets just makes them and explicit 1/0 instead of the 0 being an empty string.\n\t\tif ( is_bool( $data ) ) {\n\t\t\treturn $data ? '1' : '0';\n\t\t}\n\n\t\t// Cast objects into arrays.\n\t\tif ( is_object( $data ) ) {\n\t\t\t$data = (array) $data;\n\t\t}\n\n\t\t// Non arrays at this point should be just converted to strings.\n\t\tif ( ! is_array( $data ) ) {\n\t\t\treturn (string) $data;\n\t\t}\n\n\t\tforeach ( $data as $key => &$value ) {\n\t\t\t$value = self::_stringify_data( $value );\n\t\t}\n\n\t\treturn $data;\n\t}", "public function _serialize($data)\n\t{\n\t\tif (is_array($data))\n\t\t{\n\t\t\tforeach ($data as $key => $val)\n\t\t\t{\n\t\t\t\tif (is_string($val))\n\t\t\t\t{\n\t\t\t\t\t$data[$key] = str_replace('\\\\', '{{slash}}', $val);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (is_string($data))\n\t\t\t{\n\t\t\t\t$data = str_replace('\\\\', '{{slash}}', $data);\n\t\t\t}\n\t\t}\n\n\t\treturn serialize($data);\n\t}", "public function jsonSerialize() {\n\t\treturn json_encode($this->data);\n\t}", "function serialize($data, $options = array()) {\n\t\t$data = new Xml($data, array_merge(array('attributes' => false, 'format' => 'attributes'), $options));\n\t\treturn $data->toString(array_merge(array('header' => false), $options));\n\t}", "public function toJSON() {\n\t\t$data = $this->_data;\n\t\t\t\t\n\t\treturn json_encode($data);\n\t}", "public function encode($data);", "public function encode($data);", "public function encode($data);", "public function serialize()\n {\n $me = get_object_vars($this);\n $me[self::SERIALIZE_VERSION_ENTRY_NAME] = 1;\n\n return serialize($me);\n }", "protected function serialize($data, $format='json') {\n $context = new SerializationContext();\n $context->setSerializeNull(true);\n\n return $this->container->get('jms_serializer')->serialize($data, $format, $context);\n //return json_encode($data);\n }" ]
[ "0.75389445", "0.74743384", "0.7207962", "0.7077527", "0.68420815", "0.6773912", "0.67628217", "0.67589664", "0.6719765", "0.6694839", "0.6692163", "0.6692163", "0.66645235", "0.66439396", "0.66353136", "0.6631736", "0.6626784", "0.6626313", "0.660586", "0.6605468", "0.6605468", "0.66043854", "0.66043854", "0.66043854", "0.66043854", "0.66043854", "0.66043854", "0.65897465", "0.65868264", "0.6557617", "0.6557617", "0.65329385", "0.647045", "0.64655817", "0.6457199", "0.6422515", "0.64150554", "0.6362827", "0.6353676", "0.631158", "0.6307741", "0.63055265", "0.6294089", "0.62921137", "0.6291982", "0.62854433", "0.62551945", "0.6241269", "0.6241269", "0.6241269", "0.6241269", "0.6241269", "0.6241269", "0.62124383", "0.62037057", "0.6193586", "0.61882967", "0.6178", "0.6166388", "0.6164049", "0.61418486", "0.61277133", "0.61014074", "0.60966974", "0.6091597", "0.6048453", "0.60470504", "0.6023841", "0.6023841", "0.6023841", "0.6023841", "0.6023841", "0.6016915", "0.6004569", "0.59908694", "0.5984995", "0.59845114", "0.5977803", "0.5965435", "0.5962327", "0.5962327", "0.59603333", "0.5959544", "0.5958787", "0.59537005", "0.59485835", "0.59428877", "0.59390986", "0.59390986", "0.5929458", "0.5895487", "0.58913344", "0.5890127", "0.58863896", "0.58856326", "0.58856326", "0.58856326", "0.58789", "0.58752596" ]
0.75288177
1